performance.mark('next-start');
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import module from 'node:module'
const require = module.createRequire(import.meta.url)
const __dirname = fileURLToPath(new URL('.', import.meta.url))


const dir = path.join(__dirname)

process.env.NODE_ENV = 'production'
process.chdir(__dirname)

const currentPort = parseInt(process.env.PORT, 10) || 3000
const hostname = process.env.HOSTNAME || '0.0.0.0'

let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
const nextConfig = {"env":{},"typescript":{"ignoreBuildErrors":true},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":true,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"D:\\Data\\Development\\Archbee\\archbee","cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"appNewScrollHandler":false,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"partialFallbacks":false,"dynamicOnHover":false,"varyParams":false,"prefetchInlining":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":15,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptSkipMetadata":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"viewTransition":false,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":false,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":false,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","transpilePackages":["@archbee/app-config","@archbee/codegen","@archbee/colors","@archbee/data-access","@archbee/editor","@archbee/editor-types","@archbee/markdown","@archbee/mdx","@archbee/editor-core","@archbee/app-ui-kit","@archbee/app-modules","@archbee/utilities","@archbee/config-schema","@archbee/app-router","@archbee/cli-config"],"outputFileTracingExcludes":{"*":["**/node_modules/typescript/**","**/@swc/core*/**","**/@esbuild/**","**/esbuild/**","**/webpack/**","**/webpack-sources/**","**/terser/**","**/terser-webpack-plugin/**","**/uglify-js/**","**/sharp/**","**/@img/**","**/ajv/**","**/ajv-keywords/**","**/ajv-formats/**","**/schema-utils/**","**/@webassemblyjs/**","**/@xtuc/**"]},"serverExternalPackages":["chokidar","fsevents"],"turbopack":{"resolveAlias":{"@/*":"D:/Data/Development/Archbee/archbee/apps/archbee-cli/packages/preview/src/*","@archbee/app-config":"D:/Data/Development/Archbee/archbee/packages/app-config/src/lib","@archbee/app-config/*":"D:/Data/Development/Archbee/archbee/packages/app-config/src/lib/*","@archbee/codegen":"D:/Data/Development/Archbee/archbee/packages/codegen/src/lib","@archbee/codegen/*":"D:/Data/Development/Archbee/archbee/packages/codegen/src/lib/*","@archbee/colors":"D:/Data/Development/Archbee/archbee/packages/colors/src/lib","@archbee/colors/*":"D:/Data/Development/Archbee/archbee/packages/colors/src/lib/*","@archbee/data-access":"D:/Data/Development/Archbee/archbee/packages/data-access/src/lib","@archbee/data-access/*":"D:/Data/Development/Archbee/archbee/packages/data-access/src/lib/*","@archbee/editor":"D:/Data/Development/Archbee/archbee/packages/editor/src/lib","@archbee/editor/*":"D:/Data/Development/Archbee/archbee/packages/editor/src/lib/*","@archbee/editor-types":"D:/Data/Development/Archbee/archbee/packages/editor-types/src/lib","@archbee/editor-types/*":"D:/Data/Development/Archbee/archbee/packages/editor-types/src/lib/*","@archbee/markdown":"D:/Data/Development/Archbee/archbee/packages/markdown/src/lib","@archbee/markdown/*":"D:/Data/Development/Archbee/archbee/packages/markdown/src/lib/*","@archbee/mdx":"D:/Data/Development/Archbee/archbee/packages/mdx/src/lib","@archbee/mdx/*":"D:/Data/Development/Archbee/archbee/packages/mdx/src/lib/*","@archbee/editor-core":"D:/Data/Development/Archbee/archbee/packages/editor-core/src/lib","@archbee/editor-core/*":"D:/Data/Development/Archbee/archbee/packages/editor-core/src/lib/*","@archbee/app-ui-kit":"D:/Data/Development/Archbee/archbee/packages/app-ui-kit/src/lib","@archbee/app-ui-kit/*":"D:/Data/Development/Archbee/archbee/packages/app-ui-kit/src/lib/*","@archbee/app-modules":"D:/Data/Development/Archbee/archbee/packages/app-modules/src/lib","@archbee/app-modules/*":"D:/Data/Development/Archbee/archbee/packages/app-modules/src/lib/*","@archbee/utilities":"D:/Data/Development/Archbee/archbee/packages/utilities/src/lib","@archbee/utilities/*":"D:/Data/Development/Archbee/archbee/packages/utilities/src/lib/*","@archbee/config-schema":"D:/Data/Development/Archbee/archbee/packages/config-schema/src/lib","@archbee/config-schema/*":"D:/Data/Development/Archbee/archbee/packages/config-schema/src/lib/*","@archbee/app-router":"D:/Data/Development/Archbee/archbee/packages/app-router/src/lib","@archbee/app-router/*":"D:/Data/Development/Archbee/archbee/packages/app-router/src/lib/*","@archbee/app-router/router":"D:/Data/Development/Archbee/archbee/apps/archbee-cli/packages/preview/src/shims/app-router-shim.ts","next/router":"D:/Data/Development/Archbee/archbee/apps/archbee-cli/packages/preview/src/shims/next-router-shim.ts","@archbee/app-ui-kit/hooks/use-link-prefetch-query":"D:/Data/Development/Archbee/archbee/apps/archbee-cli/packages/preview/src/shims/use-link-prefetch-query-shim.ts","@archbee/app-ui-kit/helpers/doc-space-common":"D:/Data/Development/Archbee/archbee/apps/archbee-cli/packages/preview/src/shims/doc-space-common-shim.ts","esbuild":"D:/Data/Development/Archbee/archbee/apps/archbee-cli/packages/preview/src/shims/esbuild-stub.ts","graphiql":"D:/Data/Development/Archbee/archbee/apps/archbee-cli/packages/preview/src/shims/empty-module.ts","@graphiql/react":"D:/Data/Development/Archbee/archbee/apps/archbee-cli/packages/preview/src/shims/empty-module.ts","@scalar/api-reference-react":"D:/Data/Development/Archbee/archbee/apps/archbee-cli/packages/preview/src/shims/empty-module.ts","@scalar/icons":"D:/Data/Development/Archbee/archbee/apps/archbee-cli/packages/preview/src/shims/empty-module.ts","radix-vue":"D:/Data/Development/Archbee/archbee/apps/archbee-cli/packages/preview/src/shims/empty-module.ts"},"root":"D:\\Data\\Development\\Archbee\\archbee"},"distDirRoot":".next"}

process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)

require('next')
const { startServer } = require('next/dist/server/lib/start-server')

if (
  Number.isNaN(keepAliveTimeout) ||
  !Number.isFinite(keepAliveTimeout) ||
  keepAliveTimeout < 0
) {
  keepAliveTimeout = undefined
}

startServer({
  dir,
  isDev: false,
  config: nextConfig,
  hostname,
  port: currentPort,
  allowRetry: false,
  keepAliveTimeout,
}).catch((err) => {
  console.error(err);
  process.exit(1);
});