"use strict";(()=>{var e={};e.id=9866,e.ids=[9866],e.modules={72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},6005:e=>{e.exports=require("node:crypto")},91626:(e,t,o)=>{o.r(t),o.d(t,{originalPathname:()=>m,patchFetch:()=>x,requestAsyncStorage:()=>l,routeModule:()=>u,serverHooks:()=>f,staticGenerationAsyncStorage:()=>y});var n={};o.r(n),o.d(n,{POST:()=>p});var r=o(49303),s=o(88716),a=o(60670),i=o(87070),c=o(19191),d=o(90455);async function p(e){let{email:t,code:o}=await e.json();if(!t||!o)return i.NextResponse.json({error:"Email and code are required"},{status:400});try{let e=await (0,c.q)("/customers/v1/password/verify-code",{apiBase:"mobile",method:"POST",token:(0,d.I2)(),body:{email:t,code:o},cache:"no-store"});return i.NextResponse.json(e)}catch{return i.NextResponse.json({error:"Code verification failed"},{status:500})}}let u=new r.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/password/verify-code/route",pathname:"/api/password/verify-code",filename:"route",bundlePath:"app/api/password/verify-code/route"},resolvedPagePath:"/Users/ferlando/Desktop/baboon-nextjs/app/api/password/verify-code/route.ts",nextConfigOutput:"standalone",userland:n}),{requestAsyncStorage:l,staticGenerationAsyncStorage:y,serverHooks:f}=u,m="/api/password/verify-code/route";function x(){return(0,a.patchFetch)({serverHooks:f,staticGenerationAsyncStorage:y})}},19191:(e,t,o)=>{o.d(t,{F:()=>a,q:()=>s});var n=o(47090),r=o(70446);async function s(e,t={}){let{apiBase:o="mobile",method:s="GET",body:a,token:i,langCode:c,notificationToken:d,headers:p={},revalidate:u,cache:l}=t,y=n.Y8[o],f=`${y}${e.startsWith("/")?e:"/"+e}`,m={"Content-Type":"application/json","User-Agent":"BaboonWeb",...p};i&&(m.Authorization=i),c&&(m.langCode=c);let x=d;if(!x)try{x=(await (0,r.Gg)()).fcmToken}catch{}x&&(m.notificationToken=x);let v={method:s,headers:m};a&&"GET"!==s&&(v.body=JSON.stringify(a)),void 0!==u&&(v.next={revalidate:u}),l&&(v.cache=l);let A=await fetch(f,v);if(!A.ok)throw Error(`API request failed: ${A.status} ${A.statusText}`);return A.json()}async function a(e,t={}){let{apiBase:o="mobile",method:s="GET",body:a,token:i,langCode:c,notificationToken:d,headers:p={}}=t,u=n.Y8[o],l=`${u}${e.startsWith("/")?e:"/"+e}`,y={"Content-Type":"application/json","User-Agent":"BaboonWeb",...p};i&&(y.Authorization=i),c&&(y.langCode=c);let f=d;if(!f)try{f=(await (0,r.Gg)()).fcmToken}catch{}f&&(y.notificationToken=f);let m={method:s,headers:y};return a&&"GET"!==s&&(m.body=JSON.stringify(a)),fetch(l,m)}},90455:(e,t,o)=>{function n(e){return e.token?e.token:e.user?.token?e.user.token:process.env.BABOON_APP_BUSINESS_TOKEN||""}function r(){return process.env.BABOON_APP_BUSINESS_TOKEN||""}o.d(t,{I2:()=>r,LP:()=>n})},47090:(e,t,o)=>{o.d(t,{RF:()=>n,Y8:()=>s,pH:()=>r});let n=["al","en","it"],r={AL:{latitude:41.327546,longitude:19.818698,cityId:1,countryId:1},XK:{latitude:42.662914,longitude:21.165503,cityId:2,countryId:2}},s={mobile:process.env.BABOON_API_MOBILE_URL,legacy:process.env.BABOON_API_URL,sysadmin:process.env.BABOON_API_SYSADMIN_URL,payment:process.env.BABOON_API_PAYMENT_URL}},70446:(e,t,o)=>{o.d(t,{Gg:()=>i,dx:()=>s,l7:()=>a,yK:()=>c});var n=o(78632),r=o(71615);let s={password:process.env.SESSION_SECRET,cookieName:"baboon-session",cookieOptions:{secure:!0,httpOnly:!0,sameSite:"lax",maxAge:604800}},a={...s,cookieName:"baboon-admin-session"};async function i(){let e=await (0,r.cookies)();return(0,n.iW)(e,s)}async function c(){let e=await (0,r.cookies)();return(0,n.iW)(e,a)}}};var t=require("../../../../webpack-runtime.js");t.C(e);var o=e=>t(t.s=e),n=t.X(0,[8948,3314,8632,5972],()=>o(91626));module.exports=n})();