{"version":3,"sources":["../../../../src/server/lib/router-utils/resolve-routes.ts"],"names":["getResolveRoutes","debug","setupDebug","fsChecker","config","opts","renderServer","renderServerOpts","ensureMiddleware","routes","match","name","minimalMode","headers","redirects","rewrites","beforeFiles","afterFiles","check","fallback","resolveRoutes","req","res","isUpgradeReq","invokedOutputs","finished","resHeaders","matchedOutput","parsedUrl","url","parse","didRewrite","urlParts","split","urlNoQuery","normalizeRepeatedSlashes","statusCode","protocol","socket","encrypted","initUrl","experimental","trustHostHeader","host","port","formatHostname","hostname","addRequestMeta","query","getCloneableBody","maybeAddTrailingSlash","pathname","trailingSlash","skipMiddlewareUrlNormalize","endsWith","domainLocale","defaultLocale","initialLocaleResult","undefined","i18n","hadTrailingSlash","hadBasePath","pathHasPrefix","basePath","normalizeLocalePath","removePathPrefix","locales","detectDomainLocale","domains","getHostname","__nextDefaultLocale","__nextLocale","detectedLocale","startsWith","addPathPrefix","checkLocaleApi","checkTrue","has","output","getItem","useFileSystemPublicRoutes","type","dynamicRoutes","getDynamicRoutes","curPathname","substring","length","localeResult","handleLocale","route","page","params","pageOutput","__nextDataReq","handleRoute","internal","isDefaultLocale","missing","hasParams","matchHas","Object","assign","interceptionRoutes","interceptionRoute","result","getMiddlewareMatchers","nextDataPrefix","buildId","locale","then","catch","serverResult","initialize","Error","invokeHeaders","middlewareRes","bodyStream","readableController","mockedRes","createRequestResponseMocks","method","filterReqHeaders","ipcForbiddenHeaders","resWriter","chunk","enqueue","Buffer","from","on","close","requestHandler","err","response","status","body","ReadableStream","start","controller","e","isAbortError","closed","middlewareHeaders","toNodeOutgoingHttpHeaders","overriddenHeaders","Set","overrideHeaders","key","add","trim","keys","valueKey","newValue","oldValue","value","entries","includes","rel","relativizeURL","curLocaleResult","destination","parsedDestination","prepareDestination","appendParamsToQuery","search","stringifyQuery","getRedirectStatus","header","compileNonPath","toLowerCase","Array","isArray","val","push"],"mappings":";;;;+BAyCgBA;;;eAAAA;;;4DA9BA;8DACO;6BACU;uBACqB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