"use strict";(()=>{var e={};e.id=8285,e.ids=[8285],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")},84985:(e,t,s)=>{s.r(t),s.d(t,{originalPathname:()=>x,patchFetch:()=>f,requestAsyncStorage:()=>l,routeModule:()=>d,serverHooks:()=>y,staticGenerationAsyncStorage:()=>m});var n={};s.r(n),s.d(n,{POST:()=>u});var o=s(49303),r=s(88716),a=s(60670),i=s(87070),c=s(19191),p=s(90455);async function u(e){let{email:t}=await e.json();if(!t)return i.NextResponse.json({error:"Email is required"},{status:400});try{let e=await (0,c.q)("/customers/v1/password/reset/sms",{apiBase:"mobile",method:"POST",token:(0,p.I2)(),body:{email:t},cache:"no-store"});return i.NextResponse.json(e)}catch{return i.NextResponse.json({error:"Failed to send SMS"},{status:500})}}let d=new o.AppRouteRouteModule({definition:{kind:r.x.APP_ROUTE,page:"/api/password/send-sms/route",pathname:"/api/password/send-sms",filename:"route",bundlePath:"app/api/password/send-sms/route"},resolvedPagePath:"/Users/ferlando/Desktop/baboon-nextjs/app/api/password/send-sms/route.ts",nextConfigOutput:"standalone",userland:n}),{requestAsyncStorage:l,staticGenerationAsyncStorage:m,serverHooks:y}=d,x="/api/password/send-sms/route";function f(){return(0,a.patchFetch)({serverHooks:y,staticGenerationAsyncStorage:m})}},19191:(e,t,s)=>{s.d(t,{F:()=>a,q:()=>r});var n=s(47090),o=s(70446);async function r(e,t={}){let{apiBase:s="mobile",method:r="GET",body:a,token:i,langCode:c,notificationToken:p,headers:u={},revalidate:d,cache:l}=t,m=n.Y8[s],y=`${m}${e.startsWith("/")?e:"/"+e}`,x={"Content-Type":"application/json","User-Agent":"BaboonWeb",...u};i&&(x.Authorization=i),c&&(x.langCode=c);let f=p;if(!f)try{f=(await (0,o.Gg)()).fcmToken}catch{}f&&(x.notificationToken=f);let A={method:r,headers:x};a&&"GET"!==r&&(A.body=JSON.stringify(a)),void 0!==d&&(A.next={revalidate:d}),l&&(A.cache=l);let g=await fetch(y,A);if(!g.ok)throw Error(`API request failed: ${g.status} ${g.statusText}`);return g.json()}async function a(e,t={}){let{apiBase:s="mobile",method:r="GET",body:a,token:i,langCode:c,notificationToken:p,headers:u={}}=t,d=n.Y8[s],l=`${d}${e.startsWith("/")?e:"/"+e}`,m={"Content-Type":"application/json","User-Agent":"BaboonWeb",...u};i&&(m.Authorization=i),c&&(m.langCode=c);let y=p;if(!y)try{y=(await (0,o.Gg)()).fcmToken}catch{}y&&(m.notificationToken=y);let x={method:r,headers:m};return a&&"GET"!==r&&(x.body=JSON.stringify(a)),fetch(l,x)}},90455:(e,t,s)=>{function n(e){return e.token?e.token:e.user?.token?e.user.token:process.env.BABOON_APP_BUSINESS_TOKEN||""}function o(){return process.env.BABOON_APP_BUSINESS_TOKEN||""}s.d(t,{I2:()=>o,LP:()=>n})},47090:(e,t,s)=>{s.d(t,{RF:()=>n,Y8:()=>r,pH:()=>o});let n=["al","en","it"],o={AL:{latitude:41.327546,longitude:19.818698,cityId:1,countryId:1},XK:{latitude:42.662914,longitude:21.165503,cityId:2,countryId:2}},r={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,s)=>{s.d(t,{Gg:()=>i,dx:()=>r,l7:()=>a,yK:()=>c});var n=s(78632),o=s(71615);let r={password:process.env.SESSION_SECRET,cookieName:"baboon-session",cookieOptions:{secure:!0,httpOnly:!0,sameSite:"lax",maxAge:604800}},a={...r,cookieName:"baboon-admin-session"};async function i(){let e=await (0,o.cookies)();return(0,n.iW)(e,r)}async function c(){let e=await (0,o.cookies)();return(0,n.iW)(e,a)}}};var t=require("../../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),n=t.X(0,[8948,3314,8632,5972],()=>s(84985));module.exports=n})();