"use strict";(()=>{var e={};e.id=153,e.ids=[153],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7561:e=>{e.exports=require("node:fs")},9411:e=>{e.exports=require("node:path")},4628:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>g,patchFetch:()=>x,requestAsyncStorage:()=>f,routeModule:()=>l,serverHooks:()=>y,staticGenerationAsyncStorage:()=>j});var n={};r.r(n),r.d(n,{GET:()=>p,POST:()=>d});var o=r(3277),s=r(5265),i=r(5356),a=r(7076),u=r(1760);let c={updated_at:new Date().toISOString(),reviewed_contracts:{}};async function p(){let e=(0,u.gn)("progress.json");return a.NextResponse.json(e??c)}async function d(e){let t=await e.json();if(!t.reviewed_contracts||"object"!=typeof t.reviewed_contracts)return a.NextResponse.json({error:"Invalid payload"},{status:400});let r=(0,u.gn)("progress.json")??{...c};for(let[e,n]of Object.entries(t.reviewed_contracts))r.reviewed_contracts[e]=n;return r.updated_at=new Date().toISOString(),(0,u.au)("progress.json",r),a.NextResponse.json(r)}let l=new o.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/progress/route",pathname:"/api/progress",filename:"route",bundlePath:"app/api/progress/route"},resolvedPagePath:"/home/dx/Work/hex/dashboard/app/api/progress/route.ts",nextConfigOutput:"",userland:n}),{requestAsyncStorage:f,staticGenerationAsyncStorage:j,serverHooks:y}=l,g="/api/progress/route";function x(){return(0,i.patchFetch)({serverHooks:y,staticGenerationAsyncStorage:j})}},1760:(e,t,r)=>{r.d(t,{J1:()=>f,V9:()=>j,ZN:()=>l,au:()=>p,gn:()=>u,ki:()=>d,ws:()=>c});var n=r(7561),o=r.n(n),s=r(9411),i=r.n(s);function a(){let e=process.env.HEX_PROJECT_DIR??process.env.SOLAUDIT_PROJECT_DIR??process.cwd();try{let t=i().join(e,".hex","config.json");if(o().existsSync(t))return i().join(e,".hex");let r=i().join(e,".solaudit","config.json");if(o().existsSync(r))return i().join(e,".solaudit")}catch{}return i().join(e,".hex")}function u(e){try{let t=i().join(a(),e),r=o().readFileSync(t,"utf-8");return JSON.parse(r)}catch{return null}}function c(e){try{let t=i().join(a(),e);return o().readFileSync(t,"utf-8")}catch{return null}}function p(e,t){let r=i().join(a(),e);o().writeFileSync(r,JSON.stringify(t,null,2),"utf-8")}function d(e){try{let t=i().join(a(),e);return o().existsSync(t)}catch{return!1}}function l(){return a()}function f(e){try{let t=i().join(a(),e);if(!o().existsSync(t))return[];return o().readdirSync(t,{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name)}catch{return[]}}function j(e){try{let t=i().join(a(),e),r=o().readFileSync(t,"utf-8");return JSON.parse(r)}catch{return null}}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[916,786],()=>r(4628));module.exports=n})();