{"version":3,"sources":["../../src/server/web-server.ts"],"names":["byteLength","BaseServer","NoFallbackError","generateETag","addRequestMeta","WebResponseCache","isAPIRoute","removeTrailingSlash","isDynamicRoute","interpolateDynamicPath","normalizeVercelUrl","getNamedRouteRegex","IncrementalCache","NextWebServer","constructor","options","Object","assign","renderOpts","webServerConfig","extendRenderOpts","getIncrementalCache","requestHeaders","dev","requestProtocol","appDir","hasAppDir","allowedRevalidateHeaderKeys","nextConfig","experimental","minimalMode","fetchCache","fetchCacheKeyPrefix","maxMemoryCacheSize","isrMemoryCacheSize","flushToDisk","CurCacheHandler","serverOptions","incrementalCacheHandler","getPrerenderManifest","getResponseCache","hasPage","page","getBuildId","buildId","getHasAppDir","pagesType","getPagesManifest","pathname","getAppPathsManifest","attachRequestMeta","req","parsedUrl","query","prerenderManifest","version","routes","dynamicRoutes","notFoundRoutes","preview","previewModeId","getNextFontManifest","nextFontManifest","handleCatchallRenderRequest","res","Error","normalizedPage","routeRegex","keys","routeKeys","i18nProvider","detectedLocale","analyze","__nextLocale","bubbleNoFallback","_nextBubbleNoFallback","render","finished","err","renderHTML","renderToHTML","disableOptimizedLoading","runtime","sendRenderResult","_req","setHeader","poweredByHeader","type","getHeader","result","contentType","isDynamic","writer","transformStream","writable","getWriter","innerClose","target","write","chunk","end","close","on","_event","cb","off","_cb","undefined","onClose","closed","then","pipe","payload","toUnchunkedString","String","generateEtags","body","send","findPageComponents","params","loadComponent","components","runApi","handleApiRequest","loadEnvConfig","getPublicDir","getHasStaticDir","getFallback","getFontManifest","handleCompression","handleUpgrade","getFallbackErrorComponents","getRoutesManifest","getMiddleware","getFilesystemPaths","Set","getPrefetchRsc"],"mappings":"AAeA,SAASA,UAAU,QAAQ,kBAAiB;AAC5C,OAAOC,cAAcC,eAAe,QAAQ,gBAAe;AAC3D,SAASC,YAAY,QAAQ,aAAY;AACzC,SAASC,cAAc,QAAQ,iBAAgB;AAC/C,OAAOC,sBAAsB,uBAAsB;AACnD,SAASC,UAAU,QAA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