(()=>{var a={};a.id=1395,a.ids=[1395],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},6958:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{f:()=>h});var e=c(18629),f=c(84253),g=a([e]);function h(a,b){let c=b?.organizationName,d=b?.currency??"EUR",g=a.slides.map((b,c)=>`
      <section ${c<a.slides.length-1?'class="page-break"':""} style="padding-top:8pt;">
        <h2 style="border:none;margin-top:0;">${(0,e.ZD)(b.title)}</h2>
        <p>${(0,e.ZD)(b.content)}</p>
        ${b.highlight?`
          <div class="summary-box" style="margin-top:14pt;">
            ${b.highlightLabel?`<div style="font-size:9pt;color:#64748b;text-transform:uppercase;letter-spacing:0.5px;">${(0,e.ZD)(b.highlightLabel)}</div>`:""}
            <div style="font-size:24pt;font-weight:700;color:#6366f1;margin-top:4pt;">${(0,e.ZD)(b.highlight)}</div>
          </div>
        `:""}
        ${b.bullets?.length?`<ul>${b.bullets.map(a=>`<li>${(0,e.ZD)(a)}</li>`).join("")}</ul>`:""}
      </section>
    `).join(""),h=`
    <h1>${(0,e.ZD)(a.title)}</h1>
    <div class="meta">
      ${c?`<strong>${(0,e.ZD)(c)}</strong> \xb7 `:""}
      Currency: ${(0,e.ZD)(d)}
    </div>
    <div class="summary-box">
      <div style="font-size:9pt;color:#64748b;text-transform:uppercase;letter-spacing:0.5px;">One-line pitch</div>
      <p style="margin:4pt 0 0 0;font-size:12pt;font-weight:500;">${(0,e.ZD)(a.oneLinePitch)}</p>
    </div>
    <h2>Executive Summary</h2>
    <p>${(0,e.ZD)(a.executiveSummary)}</p>
    <div class="page-break"></div>
    ${g}
  `;return(0,f.w)(`${a.title} — ROI Deck`,h)}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},18629:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{ZD:()=>h,eB:()=>i,fj:()=>g});var e=c(83636),f=a([e]);e=(f.then?(await f)():f)[0];let j={top:"20mm",right:"16mm",bottom:"20mm",left:"16mm"};async function g(a,b={}){let c=await e.default.launch({headless:!0,args:["--no-sandbox","--disable-setuid-sandbox","--disable-dev-shm-usage"]});try{let d=await c.newPage();await d.setContent(a,{waitUntil:"load"});let e={...j,...b.margin??{}},f=!!(b.footerTemplate||b.headerTemplate),g=await d.pdf({format:b.format??"A4",landscape:b.landscape??!1,printBackground:!0,margin:e,displayHeaderFooter:f,headerTemplate:b.headerTemplate??"<span></span>",footerTemplate:b.footerTemplate??"<span></span>"});return Buffer.from(g)}finally{await c.close()}}function h(a){return null==a?"":String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function i(a){let b=a.isPro?"":'<div style="font-size:8px;color:#94a3b8;margin-top:2px;">Generated by forge0x2B</div>';return`
    <div style="font-size:9px;color:#475569;width:100%;padding:0 16mm;display:flex;justify-content:space-between;align-items:center;">
      <span style="font-family:sans-serif;">forge0x2B</span>
      <div style="display:flex;flex-direction:column;align-items:flex-end;">
        <span style="font-family:sans-serif;"><span class="pageNumber"></span> / <span class="totalPages"></span></span>
        ${b}
      </div>
    </div>
  `}d()}catch(a){d(a)}})},19642:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>k,maxDuration:()=>m,runtime:()=>l});var e=c(23211),f=c(27753),g=c(65792),h=c(18629),i=c(6958),j=a([h,i]);[h,i]=j.then?(await j)():j;let l="nodejs",m=60;async function k(a){let b;try{b=await a.json()}catch{return e.NextResponse.json({error:"Invalid JSON"},{status:400})}if(!b.slide||!b.slide.title||!Array.isArray(b.slide.slides))return e.NextResponse.json({error:"`slide` is required"},{status:400});let c=b.target??a.nextUrl.searchParams.get("target")??process.env.FORGE_TARGET??process.cwd(),d=(0,g.vr)((0,f.A5)(c)),j=(0,i.f)(b.slide,{organizationName:b.organizationName,currency:b.currency}),k=await (0,h.fj)(j,{format:"A4",landscape:!0,footerTemplate:(0,h.eB)({isPro:d})}),l=b.slide.title.replace(/[^A-Za-z0-9_-]+/g,"-").slice(0,80)||"roi-deck",m=new Uint8Array(k);return new e.NextResponse(m,{status:200,headers:{"Content-Type":"application/pdf","Content-Disposition":`attachment; filename="${l}.pdf"`,"Content-Length":String(m.length)}})}d()}catch(a){d(a)}})},27753:(a,b,c)=>{"use strict";c.d(b,{A5:()=>m,lU:()=>p,lz:()=>n,pR:()=>o});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(37701),i=c(61013);function j(a){return g().join(a,".forge/license.json")}function k(a){try{let b=e().readFileSync(j(a),"utf-8"),c=JSON.parse(b);if(!c.tier)return{...h.Vb};return{tier:c.tier,userId:c.userId,issuedAt:c.issuedAt??0,expiresAt:c.expiresAt??0,features:Array.isArray(c.features)?c.features:[],signature:c.signature,licenseKey:c.licenseKey,instanceId:c.instanceId,productName:c.productName,subscriptionStatus:c.subscriptionStatus,validatedAt:c.validatedAt,revalidationDue:c.revalidationDue,gracePeriodEnd:c.gracePeriodEnd,activationLimit:c.activationLimit,activationUsage:c.activationUsage}}catch{return{...h.Vb}}}function l(a){switch((a??"").trim().toLowerCase()){case"spectrum":return"spectrum";case"forge-pro":return"forge-pro";default:return"free"}}function m(a){let b=k(a);if("free"!==b.tier)return b;let c=(0,i.LK)();if(!c)return b;let d=function(a){let b=l(a.tier);if("free"===b)return{...h.Vb};let c="number"==typeof a.validatedAt?a.validatedAt:0,d="number"==typeof a.expiresAt?a.expiresAt:0,e="active"===a.subscriptionStatus||"cancelled"===a.subscriptionStatus||"expired"===a.subscriptionStatus||"paused"===a.subscriptionStatus?a.subscriptionStatus:"active";return{tier:b,issuedAt:c,expiresAt:d,features:[],licenseKey:a.licenseKey,instanceId:a.instanceId,productName:a.productName,subscriptionStatus:e,validatedAt:c||void 0,revalidationDue:c?c+h.Vu:void 0,gracePeriodEnd:c?c+h.Vu+h.eC:void 0}}(c);return"free"===d.tier?b:d}function n(a){if("free"!==k(a).tier)return!1;let b=(0,i.LK)();return!!b&&"free"!==l(b.tier)}function o(a,b){let c=j(a),d=g().dirname(c);e().existsSync(d)||e().mkdirSync(d,{recursive:!0});let f=c+".tmp."+Date.now();e().writeFileSync(f,JSON.stringify(b,null,2),{encoding:"utf-8",mode:384}),e().renameSync(f,c);try{e().chmodSync(c,384)}catch{}}function p(a){o(a,{...h.Vb})}},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},37701:(a,b,c)=>{"use strict";c.d(b,{Vb:()=>d,Vu:()=>f,eC:()=>g,mG:()=>e});let d={tier:"free",issuedAt:0,expiresAt:0,features:[]},e={free:0,"forge-pro":1,spectrum:1},f=2592e3,g=604800},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{"use strict";a.exports=require("node:os")},61013:(a,b,c)=>{"use strict";c.d(b,{EZ:()=>m,LK:()=>l,lp:()=>k});var d=c(73024),e=c.n(d),f=c(48161),g=c.n(f),h=c(76760),i=c.n(h);function j(){return i().join(g().homedir(),".atomar","config.json")}function k(){try{let a=e().readFileSync(j(),"utf-8"),b=JSON.parse(a),c=b?.anthropicApiKey;if("string"!=typeof c||""===c.trim())return null;return c.trim()}catch{return null}}function l(){try{let a=e().readFileSync(j(),"utf-8"),b=JSON.parse(a),c=b?.license;if(!c||"object"!=typeof c||Array.isArray(c))return null;let d=c.tier;if("string"!=typeof d||!d.trim())return null;return c}catch{return null}}function m(a){let b,c=i().dirname(j());e().mkdirSync(c,{recursive:!0});let d={};try{let a=e().readFileSync(j(),"utf-8"),b=JSON.parse(a);b&&"object"==typeof b&&!Array.isArray(b)&&(d=b)}catch{}let f=(a.tier??"free").trim()||"free";if("free"===f)b={tier:"free"};else for(let c of Object.keys(b={tier:f,licenseKey:a.licenseKey,instanceId:a.instanceId,productName:a.productName,subscriptionStatus:a.subscriptionStatus,validatedAt:a.validatedAt,expiresAt:a.expiresAt}))void 0===b[c]&&delete b[c];let g={...d,license:b,updatedAt:new Date().toISOString(),updatedBy:"forge0x2b"},h=`${j()}.tmp.${Date.now()}`;e().writeFileSync(h,JSON.stringify(g,null,2),{encoding:"utf-8",mode:384}),e().renameSync(h,j());try{e().chmodSync(j(),384)}catch{}}j()},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65792:(a,b,c)=>{"use strict";c.d(b,{DO:()=>g,MJ:()=>e,OH:()=>h,bT:()=>f,dJ:()=>j,vr:()=>i});var d=c(37701);function e(a){return!!a?.tier&&"free"!==a.tier}function f(a){return!!a.expiresAt&&Math.floor(Date.now()/1e3)>a.expiresAt}function g(a){if(!a.validatedAt)return"no-cache";let b=Math.floor(Date.now()/1e3),c=a.revalidationDue??a.validatedAt+d.Vu;return b<=c?"valid":b<=c+d.eC?"grace":"expired"}function h(a){return!e(a)||f(a)||a.licenseKey&&"expired"===g(a)?"free":a.tier}function i(a){let b=h(a);return"forge-pro"===b||"spectrum"===b}function j(a,b){let c=h(a);return d.mG[c]>=d.mG[b]}},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},83636:a=>{"use strict";a.exports=import("puppeteer")},84253:(a,b,c)=>{"use strict";c.d(b,{w:()=>e});let d=`
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 11pt;
    line-height: 1.5;
    color: #0f172a;
    background: #ffffff;
  }
  h1 { font-size: 22pt; margin: 0 0 4pt 0; color: #0f172a; letter-spacing: -0.5px; }
  h2 { font-size: 14pt; margin: 18pt 0 6pt 0; color: #1e293b; border-bottom: 1px solid #e2e8f0; padding-bottom: 4pt; }
  h3 { font-size: 11pt; margin: 12pt 0 4pt 0; color: #334155; text-transform: uppercase; letter-spacing: 0.5px; }
  p  { margin: 0 0 8pt 0; }
  ul, ol { margin: 4pt 0 10pt 0; padding-left: 18pt; }
  li { margin-bottom: 3pt; }
  .meta {
    color: #64748b;
    font-size: 9pt;
    margin: 4pt 0 12pt 0;
  }
  .badge {
    display: inline-block;
    padding: 2pt 8pt;
    border-radius: 4pt;
    font-size: 9pt;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .badge-low      { background: #dcfce7; color: #166534; }
  .badge-medium   { background: #fef3c7; color: #854d0e; }
  .badge-high     { background: #fed7aa; color: #9a3412; }
  .badge-critical { background: #fee2e2; color: #991b1b; }
  .badge-pass     { background: #dcfce7; color: #166534; }
  .badge-warn     { background: #fef3c7; color: #854d0e; }
  .badge-fail     { background: #fee2e2; color: #991b1b; }
  .badge-unknown  { background: #e2e8f0; color: #475569; }
  .kv { display: grid; grid-template-columns: 160px 1fr; gap: 4pt 12pt; margin: 8pt 0; font-size: 10pt; }
  .kv dt { color: #64748b; font-weight: 500; }
  .kv dd { margin: 0; color: #0f172a; }
  table { width: 100%; border-collapse: collapse; margin: 8pt 0 12pt 0; font-size: 9.5pt; }
  th, td { text-align: left; padding: 6pt 8pt; border-bottom: 1px solid #e2e8f0; }
  th { color: #64748b; font-weight: 600; text-transform: uppercase; font-size: 8pt; letter-spacing: 0.5px; }
  .summary-box {
    background: #f8fafc;
    border-left: 3px solid #6366f1;
    padding: 10pt 14pt;
    margin: 10pt 0;
    border-radius: 0 4pt 4pt 0;
  }
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8pt 16pt; }
  .metric { text-align: center; padding: 10pt; background: #f8fafc; border-radius: 4pt; }
  .metric .num { font-size: 18pt; font-weight: 700; color: #6366f1; }
  .metric .lbl { font-size: 8pt; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2pt; }
  .page-break { page-break-after: always; }
`;function e(a,b){return`<!doctype html><html><head><meta charset="utf-8"/><title>${a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</title><style>${d}</style></head><body>${b}</body></html>`}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},89692:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(19642),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/forge/roi-slide/pdf/route",pathname:"/api/forge/roi-slide/pdf",filename:"route",bundlePath:"app/api/forge/roi-slide/pdf/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/private/tmp/forge-publish/app/api/forge/roi-slide/pdf/route.ts",nextConfigOutput:"standalone",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/forge/roi-slide/pdf/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[3445,1813],()=>b(b.s=89692));module.exports=c})();