"use strict";(()=>{var e={};e.id=555,e.ids=[555],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")},6517:(e,t,a)=>{a.r(t),a.d(t,{headerHooks:()=>w,originalPathname:()=>b,patchFetch:()=>k,requestAsyncStorage:()=>f,routeModule:()=>h,serverHooks:()=>m,staticGenerationAsyncStorage:()=>p,staticGenerationBailout:()=>g});var r={};a.r(r),a.d(r,{GET:()=>c,POST:()=>d});var o=a(2390),n=a(1498),s=a(9308),i=a(7024),u=a(9749);function l(e,t){let{url:a,headers:r,...o}=e,n=new URL(a);if(process.env.DEBUG_HUB_HTTP_URL){let e=new URL(process.env.DEBUG_HUB_HTTP_URL);n.protocol=e.protocol,n.hostname=e.hostname,n.port=e.port}else n.protocol="https",n.hostname="hub-api.neynar.com",n.port="443";console.log("info: Mock hub: Forwarding message to",n.toString()),n.pathname=t.join("/");let s=new Headers({api_key:"NEYNAR_FRAMES_JS",...r});return s.delete("host"),s.delete("referer"),new Request(n,{headers:s,...o})}async function c(e,{params:{hubPath:t}}){let a=await (0,u.K)(e,t);if(a)return i.default.json(await a.json(),{status:a.status});console.warn(`info: Mock hub: Forwarding message ${t.join("/")} to a real hub`);let r=l(e,t),o=await fetch(r);return i.default.json(await o.json(),{status:o.status})}async function d(e,{params:{hubPath:t}}){console.warn(`info: Mock hub: Forwarding message ${t.join("/")} to a real hub`);let a=l(e,t),r=await fetch(a);return i.default.json(await r.json(),{status:r.status})}let h=new o.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/hub/[...hubPath]/route",pathname:"/hub/[...hubPath]",filename:"route",bundlePath:"app/hub/[...hubPath]/route"},resolvedPagePath:"/Users/davidfurlong/Projects/active/frames.js/packages/debugger/app/hub/[...hubPath]/route.ts",nextConfigOutput:"",userland:r}),{requestAsyncStorage:f,staticGenerationAsyncStorage:p,serverHooks:m,headerHooks:w,staticGenerationBailout:g}=h,b="/hub/[...hubPath]/route";function k(){return(0,s.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:p})}},2390:(e,t,a)=>{e.exports=a(517)},9749:(e,t,a)=>{a.d(t,{K:()=>h,H:()=>f});var r=a(8762);a(365);let o=require("node:fs/promises");var n=a.n(o);let s=require("node:path");var i=a.n(s);let u=require("node:os");var l=a.n(u);function c(e){return Array.from(e).sort().map(e=>e.join("=")).join("&")}function d(){return i().join(l().tmpdir(),"framesjsmocks.json")}async function h(e,t){let a;let r=d();if(!await n().access(r,n().constants.F_OK).then(()=>!0).catch(()=>!1))return;let o=await n().readFile(r,"utf-8");try{a=JSON.parse(o)}catch(e){console.error(e);return}if(!a.enabled)return;let s=new URL(e.url).searchParams,i=`/${t.join("/")}?${c(s)}`,u=a.requests[i];if(u?.ok!=null)return console.log(`info: Mock hub: Found mock for ${i}, returning ${u.ok?"200":"404"}`),new Response(JSON.stringify(u),{headers:{"content-type":"application/json"},status:u.ok?200:404})}async function f(e){let{mockData:t,untrustedData:{fid:a,castId:r}}=await e.clone().json(),o=`/v1/linkById?${c(new URLSearchParams({fid:a,target_fid:r.fid,link_type:"follow"}))}`,s=`/v1/linkById?${c(new URLSearchParams({fid:r.fid,target_fid:a,link_type:"follow"}))}`,i=`/v1/reactionById?${c(new URLSearchParams({fid:a,reaction_type:"1",target_fid:r.fid,target_hash:r.hash}))}`,u=`/v1/reactionById?${c(new URLSearchParams({fid:a,reaction_type:"2",target_fid:r.fid,target_hash:r.hash}))}`,l=d(),h={enabled:t.enabled,requests:{[o]:{ok:t.requesterFollowsCaster},[s]:{ok:t.casterFollowsRequester},[i]:{ok:t.likedCast},[u]:{ok:t.recastedCast}}};await n().writeFile(l,JSON.stringify(h,null,2))}(0,a(8686).h)([h,f]),(0,r.U)("0a960cab62b86f19f05335d5152dbfe9d9adee9d",h),(0,r.U)("6af4d9a628e98b577746a391006ba84ccaf97328",f)}};var t=require("../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[369,24,322],()=>a(6517));module.exports=r})();