module.exports=[50640,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"InvariantError",{enumerable:!0,get:function(){return d}});class d extends Error{constructor(a,b){super(`Invariant: ${a.endsWith(".")?a:a+"."} This is a bug in Next.js.`,b),this.name="InvariantError"}}},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54799,(a,b,c)=>{b.exports=a.x("crypto",()=>require("crypto"))},20539,a=>{"use strict";var b=a.i(45618);a.s(["createAdminClient",0,function(){return(0,b.createClient)("https://ftnuocwwcyggrkpendfa.supabase.co",process.env.SUPABASE_SERVICE_ROLE_KEY,{auth:{autoRefreshToken:!1,persistSession:!1}})}])},25333,a=>{a.v("/_next/static/media/icon.2jwlk11a7ruk_.png"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},21646,a=>{"use strict";let b={src:a.i(25333).default,width:445,height:352};a.s(["default",0,b])},10585,a=>{a.v("/_next/static/media/favicon.2vob68tjqpejf.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},68611,a=>{"use strict";let b={src:a.i(10585).default,width:256,height:256};a.s(["default",0,b])},11050,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/unsubscribe/unsubscribe-form.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/unsubscribe/unsubscribe-form.tsx <module evaluation>","default")},51507,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/unsubscribe/unsubscribe-form.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/unsubscribe/unsubscribe-form.tsx","default")},21603,a=>{"use strict";a.i(11050);var b=a.i(51507);a.n(b)},39998,a=>{"use strict";var b=a.i(7997),c=a.i(20539),d=a.i(54799),e=a.i(21603);async function f({searchParams:a}){let{c:g,s:h}=await a,i=!!(g&&h&&(0,d.createHmac)("sha256",process.env.CAMPAIGN_UNSUBSCRIBE_SECRET).update(g).digest("hex").slice(0,32)===h),j=null,k=!1;if(i&&g){let a=(0,c.createAdminClient)(),{data:b}=await a.from("customers").select("email, email_opt_in").eq("id",g).maybeSingle();j=b?.email??null,k=!!b&&!b.email_opt_in}return(0,b.jsx)("div",{className:"min-h-screen bg-bg text-ink flex items-center justify-center px-4",children:(0,b.jsx)("div",{className:"max-w-sm w-full text-center",children:i&&j?k?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h1",{className:"text-xl font-bold text-white mb-2",children:"Already unsubscribed"}),(0,b.jsxs)("p",{className:"text-muted",children:[j," won't receive any more campaign emails."]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h1",{className:"text-xl font-bold text-white mb-2",children:"Unsubscribe"}),(0,b.jsxs)("p",{className:"text-muted mb-6",children:["Stop sending campaign emails to ",(0,b.jsx)("span",{className:"text-ink",children:j}),"?"]}),(0,b.jsx)(e.default,{customerId:g,signature:h})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h1",{className:"text-xl font-bold text-white mb-2",children:"Invalid link"}),(0,b.jsx)("p",{className:"text-muted",children:"This unsubscribe link is invalid or has expired. Contact the organizer directly if you no longer want to hear from them."})]})})})}a.s(["default",0,f,"metadata",0,{title:"Unsubscribe"}],39998)},43570,a=>{a.n(a.i(39998))}];

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