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