module.exports=[93695,(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"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},18622,(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"))},56704,(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"))},32319,(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"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},24361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},36353,e=>{"use strict";e.s(["CAREERS_EMAIL",0,"skypnmanimart@gmail.com","CONTACT_EMAIL",0,"skypnmanimart@gmail.com","SITE_URL",0,"http://localhost:3000"])},36107,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),s=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),p=e.i(87718),d=e.i(95169),u=e.i(47587),c=e.i(66012),m=e.i(70101),h=e.i(26937),x=e.i(10372),f=e.i(93695);e.i(52474);var g=e.i(220),y=e.i(36353);let v=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"];async function R(t){let{jobTitle:r,jobSlug:a,name:n,email:s,phone:i,portfolio:o,coverLetter:l,cvFile:p}=t,d=process.env.CAREERS_TO_EMAIL??process.env.CONTACT_TO_EMAIL??y.CAREERS_EMAIL,u=`[Application] ${r} — ${n}`,c=["New job application received via the website.\n",`Position:   ${r} (/${a})`,`Applicant:  ${n}`,`Email:      ${s}`,`Phone:      ${i||"—"}`,`Portfolio:  ${o||"—"}`,`CV:         ${p?p.name:"—"}`,"",l?`── Cover Letter ───────────────────────────
${l}`:"(No cover letter provided)"].join("\n"),m=`
    <h2 style="margin:0 0 16px;font-family:sans-serif">New Job Application</h2>
    <table style="border-collapse:collapse;width:100%;font-size:14px;font-family:sans-serif">
      <tr><td style="padding:6px 16px 6px 0;color:#6b7280;white-space:nowrap">Position</td>
          <td style="padding:6px 0"><strong>${r}</strong></td></tr>
      <tr><td style="padding:6px 16px 6px 0;color:#6b7280">Applicant</td>
          <td style="padding:6px 0">${n}</td></tr>
      <tr><td style="padding:6px 16px 6px 0;color:#6b7280">Email</td>
          <td style="padding:6px 0"><a href="mailto:${s}">${s}</a></td></tr>
      <tr><td style="padding:6px 16px 6px 0;color:#6b7280">Phone</td>
          <td style="padding:6px 0">${i||"—"}</td></tr>
      <tr><td style="padding:6px 16px 6px 0;color:#6b7280">Portfolio</td>
          <td style="padding:6px 0">${o?`<a href="${o}">${o}</a>`:"—"}</td></tr>
      <tr><td style="padding:6px 16px 6px 0;color:#6b7280">CV Attached</td>
          <td style="padding:6px 0">${p?`✅ ${p.name}`:"—"}</td></tr>
    </table>
    ${l?`
      <hr style="margin:20px 0;border:none;border-top:1px solid #e5e7eb"/>
      <h3 style="margin:0 0 10px;font-size:14px;color:#374151;font-family:sans-serif">Cover Letter</h3>
      <p style="font-size:14px;color:#374151;white-space:pre-wrap;line-height:1.6;font-family:sans-serif">${l.replace(/</g,"&lt;").replace(/>/g,"&gt;")}</p>
    `:""}
  `,{SMTP_HOST:h,SMTP_PORT:x,SMTP_USER:f,SMTP_PASS:g}=process.env;if(h&&f&&g){let r;try{r=e.r(29508).createTransport}catch{console.warn("[apply] nodemailer not installed – run `npm i nodemailer`."),w(t);return}let a=r({host:h,port:Number(x??587),secure:465===Number(x),auth:{user:f,pass:g}}),i=[];p&&i.push({filename:p.name,content:p.buffer,contentType:p.mimeType}),await a.sendMail({from:`"${n}" <${f}>`,replyTo:s,to:d,subject:u,text:c,html:m,attachments:i});return}w(t)}function w(e){console.log("[apply] New application (configure SMTP to receive emails):",{jobTitle:e.jobTitle,name:e.name,email:e.email,hasCV:!!e.cvFile,receivedAt:new Date().toISOString()})}async function b(e){let t,r;try{t=await e.formData()}catch{return Response.json({success:!1,message:"Invalid form data."},{status:400})}let a=t.get("jobTitle")?.trim()??"",n=t.get("jobSlug")?.trim()??"",s=t.get("name")?.trim()??"",i=t.get("email")?.trim().toLowerCase()??"",o=t.get("phone")?.trim()||void 0,l=t.get("portfolio")?.trim()||void 0,p=t.get("coverLetter")?.trim()||void 0,d=t.get("cv");if(!a||!n||!s||!i)return Response.json({success:!1,message:"Please fill in your name and email address."},{status:422});if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i))return Response.json({success:!1,message:"Please provide a valid email address."},{status:422});if(d instanceof File&&d.size>0){if(d.size>5242880)return Response.json({success:!1,message:"CV file must be smaller than 5 MB. Please compress it and try again."},{status:413});if(!v.includes(d.type))return Response.json({success:!1,message:"Please upload your CV as a PDF, DOC, or DOCX file."},{status:415});let e=Buffer.from(await d.arrayBuffer());r={name:d.name,buffer:e,mimeType:d.type}}try{await R({jobTitle:a,jobSlug:n,name:s,email:i,phone:o,portfolio:l,coverLetter:p,cvFile:r})}catch(e){return console.error("[apply] Failed to send application email:",e),Response.json({success:!1,message:"We received your application but encountered an issue sending the notification. Please try again."},{status:500})}return Response.json({success:!0,message:"Application received! We'll review your submission and be in touch within 5–7 business days."},{status:200})}e.s(["POST",0,b],79538);var E=e.i(79538);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/apply/route",pathname:"/api/apply",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/apply/route.ts",nextConfigOutput:"",userland:E,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:T,serverHooks:P}=C;async function $(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),C.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/apply/route";y=y.replace(/\/index$/,"")||"/";let v=await C.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:R,deploymentId:w,params:b,nextConfig:E,parsedUrl:A,isDraftMode:T,prerenderManifest:P,routerServerContext:$,isOnDemandRevalidate:N,revalidateOnlyGenerated:S,resolvedPathname:_,clientReferenceManifest:j,serverActionsManifest:O}=v,q=(0,o.normalizeAppPath)(y),I=!!(P.dynamicRoutes[q]||P.routes[_]),M=async()=>((null==$?void 0:$.render404)?await $.render404(e,t,A,!1):t.end("This page could not be found"),null);if(I&&!T){let e=!!P.routes[_],t=P.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await M();throw new f.NoFallbackError}}let k=null;!I||C.isDev||T||(k="/index"===(k=_)?"/":k);let D=!0===C.isDev||!I,H=I&&!D;O&&j&&(0,i.setManifestsSingleton)({page:y,clientReferenceManifest:j,serverActionsManifest:O});let U=e.method||"GET",L=(0,s.getTracer)(),F=L.getActiveScopeSpan(),B=!!(null==$?void 0:$.isWrappedByNextServer),K=!!(0,n.getRequestMeta)(e,"minimalMode"),V=(0,n.getRequestMeta)(e,"incrementalCache")||await C.getIncrementalCache(e,E,P,K);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let z={params:b,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:D,incrementalCache:V,cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>C.onRequestError(e,t,a,n,$)},sharedContext:{buildId:R,deploymentId:w}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),G=p.NextRequestAdapter.fromNodeNextRequest(W,(0,p.signalFromNodeResponse)(t));try{let n,i=async e=>C.handle(G,z).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=L.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.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=`${U} ${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(`${U} ${y}`)}),o=async n=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&N&&S&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=z.renderOpts.fetchMetrics;let o=z.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=z.renderOpts.collectedTags;if(!I)return await (0,c.sendResponse)(W,X,s,z.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[x.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==z.renderOpts.collectedRevalidate&&!(z.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&z.renderOpts.collectedRevalidate,a=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:z.renderOpts.collectedExpire;return{value:{kind:g.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:y,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:N})},!1,$),t}},p=await C.handleResponse({req:e,nextConfig:E,cacheKey:k,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:S,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:K});if(!I)return null;if((null==p||null==(s=p.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(o=p.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",N?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,m.fromNodeOutgoingHttpHeaders)(p.value.headers);return K&&I||d.delete(x.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,h.getCacheControlHeader)(p.cacheControl)),await (0,c.sendResponse)(W,X,new Response(p.value.body,{headers:d,status:p.value.status||200})),null};B&&F?await o(F):(n=L.getActiveScopeSpan(),await L.withPropagatedContext(e.headers,()=>L.trace(d.BaseServerSpan.handleRequest,{spanName:`${U} ${y}`,kind:s.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},o),void 0,!B))}catch(t){if(t instanceof f.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:N})},!1,$),I)throw t;return await (0,c.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,$,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:T})},"routeModule",0,C,"serverHooks",0,P,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,T],36107)}];

//# sourceMappingURL=%5Broot-of-the-server%5D__0l5uq_2._.js.map