Unverified Commit bc335d7e authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

Prebundle react for appDir (#41337)

Inline a react and react-dom for app dir, when `appDir` flag is enabled
opt into the built-in version for all.

For server layer react, use the react share subset for server
components.
For all server side of react-dom usage, use the server-rendering-stub.
Co-authored-by: 's avatarShu Ding <g@shud.in>
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 17773a1c
...@@ -40,11 +40,9 @@ ...@@ -40,11 +40,9 @@
"next-with-deps": "./scripts/next-with-deps.sh", "next-with-deps": "./scripts/next-with-deps.sh",
"next": "node --trace-deprecation --enable-source-maps packages/next/dist/bin/next", "next": "node --trace-deprecation --enable-source-maps packages/next/dist/bin/next",
"next-react-17": "__NEXT_REACT_CHANNEL=17 node --trace-deprecation --enable-source-maps -r ./test/lib/react-channel-require-hook.js packages/next/dist/bin/next", "next-react-17": "__NEXT_REACT_CHANNEL=17 node --trace-deprecation --enable-source-maps -r ./test/lib/react-channel-require-hook.js packages/next/dist/bin/next",
"next-react-exp": "__NEXT_REACT_CHANNEL=exp node --trace-deprecation --enable-source-maps -r ./test/lib/react-channel-require-hook.js packages/next/dist/bin/next",
"next-no-sourcemaps": "node --trace-deprecation packages/next/dist/bin/next", "next-no-sourcemaps": "node --trace-deprecation packages/next/dist/bin/next",
"clean-trace-jaeger": "rm -rf test/integration/basic/.next && TRACE_TARGET=JAEGER node --trace-deprecation --enable-source-maps packages/next/dist/bin/next build test/integration/basic", "clean-trace-jaeger": "rm -rf test/integration/basic/.next && TRACE_TARGET=JAEGER node --trace-deprecation --enable-source-maps packages/next/dist/bin/next build test/integration/basic",
"debug": "node --inspect packages/next/dist/bin/next", "debug": "node --inspect packages/next/dist/bin/next",
"debug-react-exp": "__NEXT_REACT_CHANNEL=exp node --inspect --trace-deprecation --enable-source-maps -r ./test/lib/react-channel-require-hook.js packages/next/dist/bin/next",
"postinstall": "git config feature.manyFiles true && node scripts/install-native.mjs", "postinstall": "git config feature.manyFiles true && node scripts/install-native.mjs",
"version": "pnpm install && git add pnpm-lock.yaml", "version": "pnpm install && git add pnpm-lock.yaml",
"prepare": "husky install" "prepare": "husky install"
...@@ -183,8 +181,6 @@ ...@@ -183,8 +181,6 @@
"react-17": "npm:react@17.0.2", "react-17": "npm:react@17.0.2",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-dom-17": "npm:react-dom@17.0.2", "react-dom-17": "npm:react-dom@17.0.2",
"react-dom-exp": "npm:react-dom@0.0.0-experimental-a8c16a004-20221012",
"react-exp": "npm:react@0.0.0-experimental-a8c16a004-20221012",
"react-ssr-prepass": "1.0.8", "react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3", "react-virtualized": "9.22.3",
"relay-compiler": "13.0.2", "relay-compiler": "13.0.2",
......
...@@ -300,6 +300,9 @@ export default async function build( ...@@ -300,6 +300,9 @@ export default async function build(
const publicDir = path.join(dir, 'public') const publicDir = path.join(dir, 'public')
const isAppDirEnabled = !!config.experimental.appDir const isAppDirEnabled = !!config.experimental.appDir
if (isAppDirEnabled) {
process.env.HAS_APP_DIR = '1'
}
const { pagesDir, appDir } = findPagesDir(dir, isAppDirEnabled) const { pagesDir, appDir } = findPagesDir(dir, isAppDirEnabled)
const hasPublicDir = await fileExists(publicDir) const hasPublicDir = await fileExists(publicDir)
......
import type { NextConfigComplete } from '../server/config-shared' import type { NextConfigComplete } from '../server/config-shared'
import '../server/node-polyfill-fetch' import '../server/node-polyfill-fetch'
import loadRequireHook from '../build/webpack/require-hook'
import chalk from 'next/dist/compiled/chalk' import chalk from 'next/dist/compiled/chalk'
import getGzipSize from 'next/dist/compiled/gzip-size' import getGzipSize from 'next/dist/compiled/gzip-size'
import textTable from 'next/dist/compiled/text-table' import textTable from 'next/dist/compiled/text-table'
...@@ -49,6 +48,15 @@ import { denormalizePagePath } from '../shared/lib/page-path/denormalize-page-pa ...@@ -49,6 +48,15 @@ import { denormalizePagePath } from '../shared/lib/page-path/denormalize-page-pa
import { normalizePagePath } from '../shared/lib/page-path/normalize-page-path' import { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'
import { AppBuildManifest } from './webpack/plugins/app-build-manifest-plugin' import { AppBuildManifest } from './webpack/plugins/app-build-manifest-plugin'
import { getRuntimeContext } from '../server/web/sandbox' import { getRuntimeContext } from '../server/web/sandbox'
import {
loadRequireHook,
overrideBuiltInReactPackages,
} from './webpack/require-hook'
loadRequireHook()
if (process.env.HAS_APP_DIR) {
overrideBuiltInReactPackages()
}
export type ROUTER_TYPE = 'pages' | 'app' export type ROUTER_TYPE = 'pages' | 'app'
...@@ -69,8 +77,6 @@ const fsStat = (file: string) => { ...@@ -69,8 +77,6 @@ const fsStat = (file: string) => {
return (fileStats[file] = fileSize(file)) return (fileStats[file] = fileSize(file))
} }
loadRequireHook()
export function unique<T>(main: ReadonlyArray<T>, sub: ReadonlyArray<T>): T[] { export function unique<T>(main: ReadonlyArray<T>, sub: ReadonlyArray<T>): T[] {
return [...new Set([...main, ...sub])] return [...new Set([...main, ...sub])]
} }
......
...@@ -2,7 +2,7 @@ import ReactRefreshWebpackPlugin from 'next/dist/compiled/@next/react-refresh-ut ...@@ -2,7 +2,7 @@ import ReactRefreshWebpackPlugin from 'next/dist/compiled/@next/react-refresh-ut
import chalk from 'next/dist/compiled/chalk' import chalk from 'next/dist/compiled/chalk'
import crypto from 'crypto' import crypto from 'crypto'
import { webpack } from 'next/dist/compiled/webpack/webpack' import { webpack } from 'next/dist/compiled/webpack/webpack'
import path, { dirname, join as pathJoin, relative as relativePath } from 'path' import path, { join as pathJoin, relative as relativePath } from 'path'
import { escapeStringRegexp } from '../shared/lib/escape-regexp' import { escapeStringRegexp } from '../shared/lib/escape-regexp'
import { import {
DOT_NEXT_ALIAS, DOT_NEXT_ALIAS,
...@@ -89,9 +89,6 @@ const nodePathList = (process.env.NODE_PATH || '') ...@@ -89,9 +89,6 @@ const nodePathList = (process.env.NODE_PATH || '')
.split(process.platform === 'win32' ? ';' : ':') .split(process.platform === 'win32' ? ';' : ':')
.filter((p) => !!p) .filter((p) => !!p)
const reactDir = dirname(require.resolve('react/package.json'))
const reactDomDir = dirname(require.resolve('react-dom/package.json'))
const watchOptions = Object.freeze({ const watchOptions = Object.freeze({
aggregateTimeout: 5, aggregateTimeout: 5,
ignored: ['**/.git/**', '**/.next/**'], ignored: ['**/.git/**', '**/.next/**'],
...@@ -125,6 +122,12 @@ function isResourceInPackages(resource: string, packageNames?: string[]) { ...@@ -125,6 +122,12 @@ function isResourceInPackages(resource: string, packageNames?: string[]) {
) )
} }
const builtInReactImports = [
'react',
'react/jsx-runtime',
'next/dist/compiled/react-server-dom-webpack/writer.browser.server',
]
export function getDefineEnv({ export function getDefineEnv({
dev, dev,
config, config,
...@@ -573,11 +576,6 @@ export default async function getBaseWebpackConfig( ...@@ -573,11 +576,6 @@ export default async function getBaseWebpackConfig(
'`experimental.runtime` requires React 18 to be installed.' '`experimental.runtime` requires React 18 to be installed.'
) )
} }
if (hasAppDir) {
throw new Error(
'`experimental.appDir` requires React 18 to be installed.'
)
}
} }
} }
...@@ -869,11 +867,19 @@ export default async function getBaseWebpackConfig( ...@@ -869,11 +867,19 @@ export default async function getBaseWebpackConfig(
next: NEXT_PROJECT_ROOT, next: NEXT_PROJECT_ROOT,
react: reactDir, ...(hasServerComponents
'react-dom$': reactDomDir, ? {
'react-dom/server$': `${reactDomDir}/server`, // For react and react-dom, alias them dynamically for server layer
'react-dom/server.browser$': `${reactDomDir}/server.browser`, // and others in the loaders configuration
'react-dom/client$': `${reactDomDir}/client`, 'react-dom/client$': 'next/dist/compiled/react-dom/client',
'react-dom/server$': 'next/dist/compiled/react-dom/server',
'react-dom/server.browser$':
'next/dist/compiled/react-dom/server.browser',
'react/jsx-dev-runtime$':
'next/dist/compiled/react/jsx-dev-runtime',
'react/jsx-runtime$': 'next/dist/compiled/react/jsx-runtime',
}
: undefined),
'styled-jsx/style$': require.resolve(`styled-jsx/style`), 'styled-jsx/style$': require.resolve(`styled-jsx/style`),
'styled-jsx$': require.resolve(`styled-jsx`), 'styled-jsx$': require.resolve(`styled-jsx`),
...@@ -1035,12 +1041,7 @@ export default async function getBaseWebpackConfig( ...@@ -1035,12 +1041,7 @@ export default async function getBaseWebpackConfig(
// Special internal modules that must be bundled for Server Components. // Special internal modules that must be bundled for Server Components.
if (layer === WEBPACK_LAYERS.server) { if (layer === WEBPACK_LAYERS.server) {
if ( if (builtInReactImports.includes(request)) {
request === 'react' ||
request === 'react/jsx-runtime' ||
request ===
'next/dist/compiled/react-server-dom-webpack/writer.browser.server'
) {
return return
} }
} }
...@@ -1514,7 +1515,30 @@ export default async function getBaseWebpackConfig( ...@@ -1514,7 +1515,30 @@ export default async function getBaseWebpackConfig(
}, },
module: { module: {
rules: [ rules: [
...(hasAppDir && !isClient && !isEdgeServer // TODO: FIXME: do NOT webpack 5 support with this
// x-ref: https://github.com/webpack/webpack/issues/11467
...(!config.experimental.fullySpecified
? [
{
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
} as any,
]
: []),
...(hasAppDir && isEdgeServer
? [
// The Edge bundle includes the server in its entrypoint, so it has to
// be in the SSR layer — here we convert the actual page request to
// the RSC layer via a webpack rule.
{
resourceQuery: /__edge_ssr_entry__/,
layer: WEBPACK_LAYERS.server,
},
]
: []),
...(hasAppDir && !isClient
? [ ? [
{ {
issuerLayer: WEBPACK_LAYERS.server, issuerLayer: WEBPACK_LAYERS.server,
...@@ -1533,15 +1557,7 @@ export default async function getBaseWebpackConfig( ...@@ -1533,15 +1557,7 @@ export default async function getBaseWebpackConfig(
return true return true
}, },
resolve: process.env.__NEXT_REACT_CHANNEL resolve: {
? {
conditionNames: ['react-server', 'node', 'require'],
alias: {
react: `react-${process.env.__NEXT_REACT_CHANNEL}`,
'react-dom': `react-dom-${process.env.__NEXT_REACT_CHANNEL}`,
},
}
: {
conditionNames: ['react-server', 'node', 'require'], conditionNames: ['react-server', 'node', 'require'],
alias: { alias: {
// If missing the alias override here, the default alias will be used which aliases // If missing the alias override here, the default alias will be used which aliases
...@@ -1554,27 +1570,20 @@ export default async function getBaseWebpackConfig( ...@@ -1554,27 +1570,20 @@ export default async function getBaseWebpackConfig(
}, },
] ]
: []), : []),
...(hasServerComponents && !isClient
// TODO: FIXME: do NOT webpack 5 support with this
// x-ref: https://github.com/webpack/webpack/issues/11467
...(!config.experimental.fullySpecified
? [ ? [
// RSC server compilation loaders
{ {
test: /\.m?js/, test: codeCondition.test,
resolve: { include: [
fullySpecified: false, dir,
// To let the internal client components passing through flight loader
NEXT_PROJECT_ROOT_DIST,
],
issuerLayer: WEBPACK_LAYERS.server,
use: {
loader: 'next-flight-loader',
}, },
} as any,
]
: []),
...(hasAppDir && isEdgeServer
? [
// The Edge bundle includes the server in its entrypoint, so it has to
// be in the SSR layer — here we convert the actual page request to
// the RSC layer via a webpack rule.
{
resourceQuery: /__edge_ssr_entry__/,
layer: WEBPACK_LAYERS.server,
}, },
] ]
: []), : []),
...@@ -1586,27 +1595,61 @@ export default async function getBaseWebpackConfig( ...@@ -1586,27 +1595,61 @@ export default async function getBaseWebpackConfig(
include: [appDir], include: [appDir],
resolve: { resolve: {
alias: { alias: {
[require.resolve('next/dynamic')]: // Alias `next/dynamic` to React.lazy implementation for RSC
'next/dist/client/components/dynamic', [require.resolve('next/dynamic')]: require.resolve(
'next/dist/client/components/dynamic'
),
}, },
}, },
}, },
]
: []),
...(hasServerComponents && (isNodeServer || isEdgeServer)
? [
// RSC server compilation loaders
{ {
test: codeCondition.test, // Alias react-dom for ReactDOM.preload usage.
include: [ // Alias react for switching between default set and share subset.
dir, oneOf: [
// To let the internal client components passing through flight loader {
/next[\\/]dist/, // test: codeCondition.test,
],
issuerLayer: WEBPACK_LAYERS.server, issuerLayer: WEBPACK_LAYERS.server,
use: { test: (req: string) => {
loader: 'next-flight-loader', // If it's not a source code file, or has been opted out of
// bundling, don't resolve it.
if (
!codeCondition.test.test(req) ||
isResourceInPackages(
req,
config.experimental.serverComponentsExternalPackages
)
) {
return false
}
return true
}, },
resolve: {
// It needs `conditionNames` here to require the proper asset,
// when react is acting as dependency of compiled/react-dom.
alias: {
react: 'next/dist/compiled/react/react.shared-subset',
// Use server rendering stub for RSC
// x-ref: https://github.com/facebook/react/pull/25436
'react-dom$':
'next/dist/compiled/react-dom/server-rendering-stub',
},
},
},
{
test: codeCondition.test,
resolve: {
alias: {
react: 'next/dist/compiled/react',
'react-dom$': isClient
? 'next/dist/compiled/react-dom/index'
: 'next/dist/compiled/react-dom/server-rendering-stub',
'react-dom/client$':
'next/dist/compiled/react-dom/client',
},
},
},
],
}, },
] ]
: []), : []),
......
...@@ -2,16 +2,14 @@ ...@@ -2,16 +2,14 @@
// this is in order for userland plugins to attach to the same webpack instance as next.js // this is in order for userland plugins to attach to the same webpack instance as next.js
// the individual compiled modules are as defined for the compilation in bundles/webpack/packages/* // the individual compiled modules are as defined for the compilation in bundles/webpack/packages/*
export default function loadRequireHook(aliases: [string, string][] = []) { const hookPropertyMap = new Map()
const hookPropertyMap = new Map(
[
...aliases,
// Use `require.resolve` explicitly to make them statically analyzable
['styled-jsx', require.resolve('styled-jsx')],
['styled-jsx/style', require.resolve('styled-jsx/style')],
].map(([request, replacement]) => [request, replacement])
)
let initialized = false
function setupResolve() {
if (initialized) {
return
}
initialized = true
const mod = require('module') const mod = require('module')
const resolveFilename = mod._resolveFilename const resolveFilename = mod._resolveFilename
mod._resolveFilename = function ( mod._resolveFilename = function (
...@@ -25,3 +23,53 @@ export default function loadRequireHook(aliases: [string, string][] = []) { ...@@ -25,3 +23,53 @@ export default function loadRequireHook(aliases: [string, string][] = []) {
return resolveFilename.call(mod, request, parent, isMain, options) return resolveFilename.call(mod, request, parent, isMain, options)
} }
} }
export function setRequireOverrides(aliases: [string, string][]) {
for (const [key, value] of aliases) {
hookPropertyMap.set(key, value)
}
}
export function loadRequireHook(aliases: [string, string][] = []) {
const defaultAliases = [
...aliases,
// Use `require.resolve` explicitly to make them statically analyzable
['styled-jsx', require.resolve('styled-jsx')],
['styled-jsx/style', require.resolve('styled-jsx/style')],
['styled-jsx/style', require.resolve('styled-jsx/style')],
] as [string, string][]
setRequireOverrides(defaultAliases)
setupResolve()
}
export function overrideBuiltInReactPackages() {
setRequireOverrides([
['react', require.resolve('next/dist/compiled/react')],
[
'react/jsx-runtime',
require.resolve('next/dist/compiled/react/jsx-runtime'),
],
[
'react/jsx-dev-runtime',
require.resolve('next/dist/compiled/react/jsx-dev-runtime'),
],
[
'react-dom',
require.resolve('next/dist/compiled/react-dom/server-rendering-stub'),
],
[
'react-dom/client',
require.resolve('next/dist/compiled/react-dom/client'),
],
[
'react-dom/server',
require.resolve('next/dist/compiled/react-dom/server'),
],
[
'react-dom/server.browser',
require.resolve('next/dist/compiled/react-dom/server.browser'),
],
])
}
MIT License
Copyright (c) Facebook, Inc. and its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
/**
* @license React
* react-dom-server-rendering-stub.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
if (process.env.NODE_ENV !== "production") {
(function() {
'use strict';
var ReactVersion = '18.3.0-experimental-a8c16a004-20221012';
var Internals = {
usingClientEntryPoint: false,
Events: null,
Dispatcher: {
current: null
}
};
function createPortal() {
throw new Error('createPortal was called on the server. Portals are not currently' + ' supported on the server. Update your program to conditionally call' + ' createPortal on the client only.');
}
function flushSync() {
throw new Error('flushSync was called on the server. This is likely caused by a' + ' function being called during render or in module scope that was' + ' intended to be called from an effect or event handler. Update your' + ' to not call flushSync no the server.');
}
function preinit() {
var dispatcher = Internals.Dispatcher.current;
if (dispatcher) {
dispatcher.preinit.apply(this, arguments);
} // We don't error because preinit needs to be resilient to being called in a variety of scopes
// and the runtime may not be capable of responding. The function is optimistic and not critical
// so we favor silent bailout over warning or erroring.
}
function preload() {
var dispatcher = Internals.Dispatcher.current;
if (dispatcher) {
dispatcher.preload.apply(this, arguments);
} // We don't error because preload needs to be resilient to being called in a variety of scopes
// and the runtime may not be capable of responding. The function is optimistic and not critical
// so we favor silent bailout over warning or erroring.
}
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = createPortal;
exports.flushSync = flushSync;
exports.preinit = preinit;
exports.preload = preload;
exports.version = ReactVersion;
})();
}
/**
* @license React
* react-dom-server-rendering-stub.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var b={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function d(a){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)e+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b;
exports.createPortal=function(){throw Error(d(448));};exports.flushSync=function(){throw Error(d(449));};exports.preinit=function(){var a=b.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=b.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.version="18.3.0-experimental-a8c16a004-20221012";
This diff is collapsed.
'use strict';
var m = require('react-dom');
if (process.env.NODE_ENV === 'production') {
exports.createRoot = m.createRoot;
exports.hydrateRoot = m.hydrateRoot;
} else {
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
exports.createRoot = function(c, o) {
i.usingClientEntryPoint = true;
try {
return m.createRoot(c, o);
} finally {
i.usingClientEntryPoint = false;
}
};
exports.hydrateRoot = function(c, h, o) {
i.usingClientEntryPoint = true;
try {
return m.hydrateRoot(c, h, o);
} finally {
i.usingClientEntryPoint = false;
}
};
}
'use strict';
function checkDCE() {
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
) {
return;
}
if (process.env.NODE_ENV !== 'production') {
// This branch is unreachable because this function is only called
// in production, but the condition is true only in development.
// Therefore if the branch is still here, dead code elimination wasn't
// properly applied.
// Don't change the message. React DevTools relies on it. Also make sure
// this message doesn't occur elsewhere in this function, or it will cause
// a false positive.
throw new Error('^_^');
}
try {
// Verify that the code above has been dead code eliminated (DCE'd).
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
} catch (err) {
// DevTools shouldn't crash React, no matter what.
// We should still report in case we break this code.
console.error(err);
}
}
if (process.env.NODE_ENV === 'production') {
// DCE check should happen before ReactDOM bundle executes so that
// DevTools can report bad minification during injection.
checkDCE();
module.exports = require('./cjs/react-dom.production.min.js');
} else {
module.exports = require('./cjs/react-dom.development.js');
}
{
"name": "react-dom",
"version": "0.0.0-experimental-a8c16a004-20221012",
"description": "React package for working with the DOM.",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-dom"
},
"keywords": [
"react"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/facebook/react/issues"
},
"homepage": "https://reactjs.org/",
"dependencies": {
"loose-envify": "^1.1.0",
"scheduler": "0.0.0-experimental-a8c16a004-20221012"
},
"peerDependencies": {
"react": "0.0.0-experimental-a8c16a004-20221012"
},
"files": [
"LICENSE",
"README.md",
"index.js",
"client.js",
"profiling.js",
"server.js",
"server.browser.js",
"server.node.js",
"static.js",
"static.browser.js",
"static.node.js",
"server-rendering-stub.js",
"test-utils.js",
"unstable_testing.js",
"cjs/",
"umd/"
],
"exports": {
".": "./index.js",
"./client": "./client.js",
"./server": {
"deno": "./server.browser.js",
"worker": "./server.browser.js",
"browser": "./server.browser.js",
"default": "./server.node.js"
},
"./server.browser": "./server.browser.js",
"./server.node": "./server.node.js",
"./static": {
"deno": "./static.browser.js",
"worker": "./static.browser.js",
"browser": "./static.browser.js",
"default": "./static.node.js"
},
"./static.browser": "./static.browser.js",
"./static.node": "./static.node.js",
"./server-rendering-stub": "./server-rendering-stub.js",
"./profiling": "./profiling.js",
"./test-utils": "./test-utils.js",
"./unstable_testing": "./unstable_testing.js",
"./package.json": "./package.json"
},
"browser": {
"./server.js": "./server.browser.js",
"./static.js": "./static.browser.js"
},
"browserify": {
"transform": [
"loose-envify"
]
}
}
\ No newline at end of file
'use strict';
function checkDCE() {
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
) {
return;
}
if (process.env.NODE_ENV !== 'production') {
// This branch is unreachable because this function is only called
// in production, but the condition is true only in development.
// Therefore if the branch is still here, dead code elimination wasn't
// properly applied.
// Don't change the message. React DevTools relies on it. Also make sure
// this message doesn't occur elsewhere in this function, or it will cause
// a false positive.
throw new Error('^_^');
}
try {
// Verify that the code above has been dead code eliminated (DCE'd).
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
} catch (err) {
// DevTools shouldn't crash React, no matter what.
// We should still report in case we break this code.
console.error(err);
}
}
if (process.env.NODE_ENV === 'production') {
// DCE check should happen before ReactDOM bundle executes so that
// DevTools can report bad minification during injection.
checkDCE();
module.exports = require('./cjs/react-dom.profiling.min.js');
} else {
module.exports = require('./cjs/react-dom.development.js');
}
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-dom-server-rendering-stub.production.min.js');
} else {
module.exports = require('./cjs/react-dom-server-rendering-stub.development.js');
}
'use strict';
var l, s;
if (process.env.NODE_ENV === 'production') {
l = require('./cjs/react-dom-server-legacy.browser.production.min.js');
s = require('./cjs/react-dom-server.browser.production.min.js');
} else {
l = require('./cjs/react-dom-server-legacy.browser.development.js');
s = require('./cjs/react-dom-server.browser.development.js');
}
exports.version = l.version;
exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;
exports.renderToNodeStream = l.renderToNodeStream;
exports.renderToStaticNodeStream = l.renderToStaticNodeStream;
exports.renderToReadableStream = s.renderToReadableStream;
'use strict';
module.exports = require('./server.node');
'use strict';
var l, s;
if (process.env.NODE_ENV === 'production') {
l = require('./cjs/react-dom-server-legacy.node.production.min.js');
s = require('./cjs/react-dom-server.node.production.min.js');
} else {
l = require('./cjs/react-dom-server-legacy.node.development.js');
s = require('./cjs/react-dom-server.node.development.js');
}
exports.version = l.version;
exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;
exports.renderToNodeStream = l.renderToNodeStream;
exports.renderToStaticNodeStream = l.renderToStaticNodeStream;
exports.renderToPipeableStream = s.renderToPipeableStream;
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-dom-static.browser.production.min.js');
} else {
module.exports = require('./cjs/react-dom-static.browser.development.js');
}
'use strict';
module.exports = require('./static.node');
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-dom-static.node.production.min.js');
} else {
module.exports = require('./cjs/react-dom-static.node.development.js');
}
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-dom-test-utils.production.min.js');
} else {
module.exports = require('./cjs/react-dom-test-utils.development.js');
}
'use strict';
function checkDCE() {
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
) {
return;
}
if (process.env.NODE_ENV !== 'production') {
// This branch is unreachable because this function is only called
// in production, but the condition is true only in development.
// Therefore if the branch is still here, dead code elimination wasn't
// properly applied.
// Don't change the message. React DevTools relies on it. Also make sure
// this message doesn't occur elsewhere in this function, or it will cause
// a false positive.
throw new Error('^_^');
}
try {
// Verify that the code above has been dead code eliminated (DCE'd).
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
} catch (err) {
// DevTools shouldn't crash React, no matter what.
// We should still report in case we break this code.
console.error(err);
}
}
if (process.env.NODE_ENV === 'production') {
// DCE check should happen before ReactDOM bundle executes so that
// DevTools can report bad minification during injection.
checkDCE();
module.exports = require('./cjs/react-dom-unstable_testing.production.min.js');
} else {
module.exports = require('./cjs/react-dom-unstable_testing.development.js');
}
...@@ -75,7 +75,8 @@ function preloadModule(moduleData) { ...@@ -75,7 +75,8 @@ function preloadModule(moduleData) {
if (entry === undefined) { if (entry === undefined) {
var thenable = globalThis.__next_chunk_load__(chunkId); var thenable = globalThis.__next_chunk_load__(chunkId);
promises.push(thenable); promises.push(thenable); // $FlowFixMe[method-unbinding]
var resolve = chunkCache.set.bind(chunkCache, chunkId, null); var resolve = chunkCache.set.bind(chunkCache, chunkId, null);
thenable.then(resolve, ignoreReject); thenable.then(resolve, ignoreReject);
chunkCache.set(chunkId, thenable); chunkCache.set(chunkId, thenable);
......
MIT License
Copyright (c) Facebook, Inc. and its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
/**
* @license React
* react-jsx-dev-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var a=Symbol.for("react.fragment");exports.Fragment=a;exports.jsxDEV=void 0;
/**
* @license React
* react-jsx-dev-runtime.profiling.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var a=Symbol.for("react.fragment");exports.Fragment=a;exports.jsxDEV=void 0;
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var f=require("react"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
/**
* @license React
* react-jsx-runtime.profiling.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var f=require("react"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
This diff is collapsed.
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var k=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.server_context"),w=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),B=Symbol.for("react.debug_trace_mode"),aa=Symbol.for("react.offscreen"),ba=Symbol.for("react.cache"),
C=Symbol.for("react.default_value"),D=Symbol.iterator;function ca(a){if(null===a||"object"!==typeof a)return null;a=D&&a[D]||a["@@iterator"];return"function"===typeof a?a:null}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,G={};function H(a,b,d){this.props=a;this.context=b;this.refs=G;this.updater=d||E}H.prototype.isReactComponent={};
H.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};H.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function I(){}I.prototype=H.prototype;function J(a,b,d){this.props=a;this.context=b;this.refs=G;this.updater=d||E}var K=J.prototype=new I;
K.constructor=J;F(K,H.prototype);K.isPureReactComponent=!0;var L=Array.isArray,M=Object.prototype.hasOwnProperty,N={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};
function P(a,b,d){var c,e={},l=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(l=""+b.key),b)M.call(b,c)&&!O.hasOwnProperty(c)&&(e[c]=b[c]);var g=arguments.length-2;if(1===g)e.children=d;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];e.children=f}if(a&&a.defaultProps)for(c in g=a.defaultProps,g)void 0===e[c]&&(e[c]=g[c]);return{$$typeof:k,type:a,key:l,ref:h,props:e,_owner:N.current}}
function da(a,b){return{$$typeof:k,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function Q(a){return"object"===typeof a&&null!==a&&a.$$typeof===k}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var R=/\/+/g;function S(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
function T(a,b,d,c,e){var l=typeof a;if("undefined"===l||"boolean"===l)a=null;var h=!1;if(null===a)h=!0;else switch(l){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case k:case n:h=!0}}if(h)return h=a,e=e(h),a=""===c?"."+S(h,0):c,L(e)?(d="",null!=a&&(d=a.replace(R,"$&/")+"/"),T(e,b,d,"",function(a){return a})):null!=e&&(Q(e)&&(e=da(e,d+(!e.key||h&&h.key===e.key?"":(""+e.key).replace(R,"$&/")+"/")+a)),b.push(e)),1;h=0;c=""===c?".":c+":";if(L(a))for(var g=0;g<a.length;g++){l=
a[g];var f=c+S(l,g);h+=T(l,b,d,f,e)}else if(f=ca(a),"function"===typeof f)for(a=f.call(a),g=0;!(l=a.next()).done;)l=l.value,f=c+S(l,g++),h+=T(l,b,d,f,e);else if("object"===l)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}
function U(a,b,d){if(null==a)return a;var c=[],e=0;T(a,c,"","",function(a){return b.call(d,a,e++)});return c}function ea(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}
var V={current:null},W={current:null},X={transition:null},Y={ReactCurrentDispatcher:V,ReactCurrentCache:W,ReactCurrentBatchConfig:X,ReactCurrentOwner:N,ContextRegistry:{}},Z=Y.ContextRegistry;
exports.Children={map:U,forEach:function(a,b,d){U(a,function(){b.apply(this,arguments)},d)},count:function(a){var b=0;U(a,function(){b++});return b},toArray:function(a){return U(a,function(a){return a})||[]},only:function(a){if(!Q(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};exports.Component=H;exports.Fragment=p;exports.Profiler=r;exports.PureComponent=J;exports.StrictMode=q;exports.Suspense=x;exports.SuspenseList=y;
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y;
exports.cloneElement=function(a,b,d){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var c=F({},a.props),e=a.key,l=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(l=b.ref,h=N.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)M.call(b,f)&&!O.hasOwnProperty(f)&&(c[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)c.children=d;else if(1<f){g=Array(f);
for(var m=0;m<f;m++)g[m]=arguments[m+2];c.children=g}return{$$typeof:k,type:a.type,key:e,ref:l,props:c,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=P;exports.createFactory=function(a){var b=P.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};
exports.createServerContext=function(a,b){var d=!0;if(!Z[a]){d=!1;var c={$$typeof:v,_currentValue:b,_currentValue2:b,_defaultValue:b,_threadCount:0,Provider:null,Consumer:null,_globalName:a};c.Provider={$$typeof:t,_context:c};Z[a]=c}c=Z[a];if(c._defaultValue===C)c._defaultValue=b,c._currentValue===C&&(c._currentValue=b),c._currentValue2===C&&(c._currentValue2=b);else if(d)throw Error("ServerContext: "+a+" already defined");return c};exports.experimental_use=function(a){return V.current.use(a)};
exports.experimental_useEvent=function(a){return V.current.useEvent(a)};exports.forwardRef=function(a){return{$$typeof:w,render:a}};exports.isValidElement=Q;exports.lazy=function(a){return{$$typeof:A,_payload:{_status:-1,_result:a},_init:ea}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=X.transition;X.transition={};try{a()}finally{X.transition=b}};exports.unstable_Cache=ba;exports.unstable_DebugTracingMode=B;
exports.unstable_Offscreen=aa;exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};exports.unstable_getCacheForType=function(a){var b=W.current;return b?b.getCacheForType(a):a()};exports.unstable_getCacheSignal=function(){var a=W.current;return a?a.getCacheSignal():(a=new AbortController,a.abort(Error("This CacheSignal was requested outside React which means that it is immediately aborted.")),a.signal)};exports.unstable_useCacheRefresh=function(){return V.current.useCacheRefresh()};
exports.unstable_useMemoCache=function(a){return V.current.useMemoCache(a)};exports.useCallback=function(a,b){return V.current.useCallback(a,b)};exports.useContext=function(a){return V.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return V.current.useDeferredValue(a)};exports.useEffect=function(a,b){return V.current.useEffect(a,b)};exports.useId=function(){return V.current.useId()};
exports.useImperativeHandle=function(a,b,d){return V.current.useImperativeHandle(a,b,d)};exports.useInsertionEffect=function(a,b){return V.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return V.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return V.current.useMemo(a,b)};exports.useReducer=function(a,b,d){return V.current.useReducer(a,b,d)};exports.useRef=function(a){return V.current.useRef(a)};exports.useState=function(a){return V.current.useState(a)};
exports.useSyncExternalStore=function(a,b,d){return V.current.useSyncExternalStore(a,b,d)};exports.useTransition=function(){return V.current.useTransition()};exports.version="18.3.0-experimental-a8c16a004-20221012";
/**
* @license React
* react.shared-subset.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var m=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.server_context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),A=Symbol.for("react.debug_trace_mode"),B=Symbol.for("react.default_value"),C=Symbol.iterator;
function D(a){if(null===a||"object"!==typeof a)return null;a=C&&a[C]||a["@@iterator"];return"function"===typeof a?a:null}function E(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,e=1;e<arguments.length;e++)b+="&args[]="+encodeURIComponent(arguments[e]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
var F={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,H={};function I(a,b,e){this.props=a;this.context=b;this.refs=H;this.updater=e||F}I.prototype.isReactComponent={};I.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(E(85));this.updater.enqueueSetState(this,a,b,"setState")};I.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
function J(){}J.prototype=I.prototype;function K(a,b,e){this.props=a;this.context=b;this.refs=H;this.updater=e||F}var L=K.prototype=new J;L.constructor=K;G(L,I.prototype);L.isPureReactComponent=!0;var M=Array.isArray,N=Object.prototype.hasOwnProperty,O={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function aa(a,b){return{$$typeof:m,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function Q(a){return"object"===typeof a&&null!==a&&a.$$typeof===m}
function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var R=/\/+/g;function S(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
function T(a,b,e,c,d){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case m:case n:h=!0}}if(h)return h=a,d=d(h),a=""===c?"."+S(h,0):c,M(d)?(e="",null!=a&&(e=a.replace(R,"$&/")+"/"),T(d,b,e,"",function(a){return a})):null!=d&&(Q(d)&&(d=aa(d,e+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(R,"$&/")+"/")+a)),b.push(d)),1;h=0;c=""===c?".":c+":";if(M(a))for(var g=0;g<a.length;g++){k=
a[g];var f=c+S(k,g);h+=T(k,b,e,f,d)}else if(f=D(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=c+S(k,g++),h+=T(k,b,e,f,d);else if("object"===k)throw b=String(a),Error(E(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));return h}function U(a,b,e){if(null==a)return a;var c=[],d=0;T(a,c,"","",function(a){return b.call(e,a,d++)});return c}
function ba(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}var V={current:null},W={current:null},X={transition:null},Y={ReactCurrentDispatcher:V,ReactCurrentCache:W,ReactCurrentBatchConfig:X,ReactCurrentOwner:O,ContextRegistry:{}},Z=Y.ContextRegistry;
exports.Children={map:U,forEach:function(a,b,e){U(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;U(a,function(){b++});return b},toArray:function(a){return U(a,function(a){return a})||[]},only:function(a){if(!Q(a))throw Error(E(143));return a}};exports.Fragment=p;exports.Profiler=r;exports.StrictMode=q;exports.Suspense=w;exports.SuspenseList=x;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y;
exports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error(E(267,a));var c=G({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=O.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)N.call(b,f)&&!P.hasOwnProperty(f)&&(c[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)c.children=e;else if(1<f){g=Array(f);for(var l=0;l<f;l++)g[l]=arguments[l+2];c.children=g}return{$$typeof:m,type:a.type,
key:d,ref:k,props:c,_owner:h}};exports.createElement=function(a,b,e){var c,d={},k=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)N.call(b,c)&&!P.hasOwnProperty(c)&&(d[c]=b[c]);var g=arguments.length-2;if(1===g)d.children=e;else if(1<g){for(var f=Array(g),l=0;l<g;l++)f[l]=arguments[l+2];d.children=f}if(a&&a.defaultProps)for(c in g=a.defaultProps,g)void 0===d[c]&&(d[c]=g[c]);return{$$typeof:m,type:a,key:k,ref:h,props:d,_owner:O.current}};exports.createRef=function(){return{current:null}};
exports.createServerContext=function(a,b){var e=!0;if(!Z[a]){e=!1;var c={$$typeof:u,_currentValue:b,_currentValue2:b,_defaultValue:b,_threadCount:0,Provider:null,Consumer:null,_globalName:a};c.Provider={$$typeof:t,_context:c};Z[a]=c}c=Z[a];if(c._defaultValue===B)c._defaultValue=b,c._currentValue===B&&(c._currentValue=b),c._currentValue2===B&&(c._currentValue2=b);else if(e)throw Error(E(429,a));return c};exports.experimental_use=function(a){return V.current.use(a)};
exports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=Q;exports.lazy=function(a){return{$$typeof:z,_payload:{_status:-1,_result:a},_init:ba}};exports.memo=function(a,b){return{$$typeof:y,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=X.transition;X.transition={};try{a()}finally{X.transition=b}};exports.unstable_DebugTracingMode=A;exports.unstable_getCacheForType=function(a){var b=W.current;return b?b.getCacheForType(a):a()};
exports.unstable_getCacheSignal=function(){var a=W.current;if(!a){a=new AbortController;var b=Error(E(455));a.abort(b);return a.signal}return a.getCacheSignal()};exports.useCallback=function(a,b){return V.current.useCallback(a,b)};exports.useContext=function(a){return V.current.useContext(a)};exports.useDebugValue=function(){};exports.useId=function(){return V.current.useId()};exports.useMemo=function(a,b){return V.current.useMemo(a,b)};exports.version="18.3.0-experimental-a8c16a004-20221012";
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react.production.min.js');
} else {
module.exports = require('./cjs/react.development.js');
}
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-jsx-dev-runtime.production.min.js');
} else {
module.exports = require('./cjs/react-jsx-dev-runtime.development.js');
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{"name":"scheduler","main":"index.js","license":"MIT"}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment