module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},340060,e=>{"use strict";e.s(["resolve",0,function(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}])},810683,e=>{"use strict";var t=e.i(616881),r=e.i(423705),a=e.i(259355),n=e.i(445367),s=e.i(536661),o=e.i(669355),i=e.i(716632),l=e.i(403966),d=e.i(991885),u=e.i(740322),c=e.i(209383),p=e.i(35916),h=e.i(300984),v=e.i(431820),R=e.i(91357),g=e.i(193695);e.i(605063);var x=e.i(539271),f=e.i(340060);async function w(){let e=(0,f.resolve)("UpgradeCliUseCase"),t=new TextEncoder;return new Response(new ReadableStream({async start(r){try{let a=await e.execute(e=>{r.enqueue(t.encode(`data: ${e.replace(/\n/g,"\ndata: ")}

`))});if(r.enqueue(t.encode(`event: done
data: ${JSON.stringify(a)}

`)),"upgraded"===a.status){r.enqueue(t.encode(`event: restarting
data: restarting

`)),r.close(),await e.scheduleDaemonRestart();return}}catch(a){let e=a instanceof Error?a.message:"Upgrade failed";r.enqueue(t.encode(`event: done
data: ${JSON.stringify({status:"error",currentVersion:"",latestVersion:null,errorMessage:e})}

`))}finally{try{r.close()}catch{}}}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}e.s(["POST",0,w,"dynamic",0,"force-dynamic"],97284);var m=e.i(97284);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/cli-upgrade/route",pathname:"/api/cli-upgrade",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/cli-upgrade/route.ts",nextConfigOutput:"standalone",userland:m,...{}}),{workAsyncStorage:E,workUnitAsyncStorage:y,serverHooks:b}=C;async function A(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),C.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/cli-upgrade/route";f=f.replace(/\/index$/,"")||"/";let w=await C.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:m,deploymentId:E,params:y,nextConfig:b,parsedUrl:A,isDraftMode:T,prerenderManifest:N,routerServerContext:q,isOnDemandRevalidate:S,revalidateOnlyGenerated:P,resolvedPathname:O,clientReferenceManifest:_,serverActionsManifest:k}=w,U=(0,i.normalizeAppPath)(f),I=!!(N.dynamicRoutes[U]||N.routes[O]),H=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,A,!1):t.end("This page could not be found"),null);if(I&&!T){let e=!!N.routes[O],t=N.dynamicRoutes[U];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await H();throw new g.NoFallbackError}}let M=null;!I||C.isDev||T||(M="/index"===(M=O)?"/":M);let j=!0===C.isDev||!I,D=I&&!j;k&&_&&(0,o.setManifestsSingleton)({page:f,clientReferenceManifest:_,serverActionsManifest:k});let $=e.method||"GET",F=(0,s.getTracer)(),K=F.getActiveScopeSpan(),B=!!(null==q?void 0:q.isWrappedByNextServer),L=!!(0,n.getRequestMeta)(e,"minimalMode"),V=(0,n.getRequestMeta)(e,"incrementalCache")||await C.getIncrementalCache(e,b,N,L);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let G={params:y,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:j,incrementalCache:V,cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>C.onRequestError(e,t,a,n,q)},sharedContext:{buildId:m,deploymentId:E}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),z=d.NextRequestAdapter.fromNodeNextRequest(W,(0,d.signalFromNodeResponse)(t));try{let n,o=async e=>C.handle(z,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${$} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${$} ${f}`)}),i=async n=>{var s,i;let l=async({previousCacheEntry:r})=>{try{if(!L&&S&&P&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let i=G.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let l=G.renderOpts.collectedTags;if(!I)return await (0,p.sendResponse)(W,X,s,G.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[R.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=R.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,q),t}},d=await C.handleResponse({req:e,nextConfig:b,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:P,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:L});if(!I)return null;if((null==d||null==(s=d.value)?void 0:s.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",S?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return L&&I||u.delete(R.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,v.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(W,X,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};B&&K?await i(K):(n=F.getActiveScopeSpan(),await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${$} ${f}`,kind:s.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},i),void 0,!B))}catch(t){if(t instanceof g.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:U,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,q),I)throw t;return await (0,p.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:y})},"routeModule",0,C,"serverHooks",0,b,"workAsyncStorage",0,E,"workUnitAsyncStorage",0,y],810683)}];

//# sourceMappingURL=%5Broot-of-the-server%5D__0p-0isl._.js.map