(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{90417:function(e,t,r){Promise.resolve().then(r.bind(r,90507))},41980:function(e,t,r){"use strict";r.d(t,{H:function(){return x},a:function(){return m}});var a=r(57437),s=r(2265),l=r(3141),o=r(41121),n=r(57685),i=r.n(n),d=r(50309),c=r.n(d);let u=(0,s.createContext)({isAuthenticated:!1,isVerifying:!0,username:null,firstName:null,login:()=>{},logout:()=>{}}),m=()=>(0,s.useContext)(u),x=e=>{let{children:t}=e,[r,n]=(0,s.useState)(!1),[d,m]=(0,s.useState)(!0),[x,h]=(0,s.useState)(null),[g,f]=(0,s.useState)(null),b=(0,s.useRef)(!1),p=(0,s.useRef)(!1),y=(0,s.useCallback)(async()=>{if(!b.current){b.current=!0,m(!0);try{console.log("Checking authentication status...");let e=await (0,l.WX)();e&&(h(e.username),f(i()(c()(e.first_name))||null),n(!0),console.log("✅ User authenticated:",e.username))}catch(e){console.error("❌ Token verification failed:",e),n(!1),h(null),f(null)}finally{m(!1),b.current=!1}}},[]);(0,s.useEffect)(()=>{y()},[y]);let v=(0,s.useCallback)(async()=>{try{await o.Z.post("/auth/logout/")}catch(e){console.error("❌ Logout failed:",e)}finally{h(null),f(null),n(!1)}},[]);(0,s.useEffect)(()=>{let e=setInterval(async()=>{if(r&&!p.current){p.current=!0;try{await (0,l.g$)(),console.log("\uD83D\uDD04 Token refreshed successfully.")}catch(e){console.error("❌ Auto token refresh failed:",e),v()}finally{p.current=!1}}},6e5);return()=>clearInterval(e)},[r,v]),(0,s.useEffect)(()=>{console.log("Auth state updated:",{username:x,firstName:g})},[x,g]);let w=(0,s.useCallback)((e,t)=>{h(e),f(i()(c()(t))),n(!0)},[]);return(0,a.jsxs)(u.Provider,{value:{isAuthenticated:r,isVerifying:d,username:x,firstName:g,login:w,logout:v},children:[!d&&t," "]})}},90507:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return M}});var a=r(57437),s=r(2265),l=r(75183),o=r(48614),n=r(27648),i=r(33145),d=r(41980),c=r(99376),u=r(14123),m=r.n(u),x=r(6275),h=r(2938),g=r(41427),f=r(37996),b=r(58690),p=r(93448);let y=b.zt,v=b.fC,w=b.xz,j=s.forwardRef((e,t)=>{let{className:r,sideOffset:s=4,...l}=e;return(0,a.jsx)(b.h_,{children:(0,a.jsx)(b.VY,{ref:t,sideOffset:s,className:(0,p.cn)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r),...l})})});j.displayName=b.VY.displayName;var k=r(12381),N=r(79820),E=r(95937),C=r(66542);let S=[];function F(e){let{selectedCountry:t}=e,[r,i]=(0,s.useState)(null),[d,c]=(0,s.useState)(!1),[u,m]=(0,s.useState)({coordinates:[0,0],zoom:1.5}),[x,b]=(0,s.useState)(!0),[p,F]=(0,s.useState)(5),z=(0,s.useRef)(null),{data:D}=(0,h.ZP)("/trip/countries/",C.tf,{fallbackData:S,revalidateOnFocus:!1,dedupingInterval:36e5}),R=d?{highlight:"#94e2d5",selected:"#E74C3C",defaultFill:"#2D3748",defaultStroke:"#4A5568",markerFill:"#3498DB",markerStroke:"#FFFFFF"}:{highlight:"#E67E22",selected:"#E74C3C",defaultFill:"#F7FAFC",defaultStroke:"#CBD5E0",markerFill:"#3498DB",markerStroke:"#FFFFFF"};(0,s.useEffect)(()=>{let e=window.matchMedia("(prefers-color-scheme: dark)");c(e.matches);let t=e=>c(e.matches);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,s.useEffect)(()=>{let e=setTimeout(()=>b(!1),3e3);return()=>clearTimeout(e)},[]),(0,s.useEffect)(()=>{let e=()=>{window.innerWidth<768?F(6):F(4)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let Z=e=>e.toLowerCase().replace(/\s/g,"-"),L=(0,s.useMemo)(()=>e=>{if(!e)return R.defaultFill;let r=Z(e);return t&&e&&t.toLowerCase()===e.toLowerCase()?R.selected:(null==D?void 0:D.find(e=>Z(e.name)===r&&e.capital&&""!==e.capital.trim()))?R.highlight:R.defaultFill},[D,t,R]),M=(0,s.useMemo)(()=>()=>R.defaultStroke,[R]),A=(0,s.useMemo)(()=>e=>{if(!e)return R.defaultFill;let t=Z(e);return(null==D?void 0:D.find(e=>Z(e.name)===t&&e.capital&&""!==e.capital.trim()))?d?"rgba(148, 226, 213, 0.8)":"rgba(230, 126, 34, 0.8)":d?"#4A5568":"#EDF2F7"},[D,d,R]),I=e=>{m(t=>({...t,zoom:Math.max(1,Math.min(p,t.zoom+e))}))};return(0,a.jsx)(y,{children:(0,a.jsx)(l.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:(0,a.jsxs)(N.Zb,{className:"relative mx-auto my-6 w-full max-w-7xl overflow-hidden rounded-2xl shadow-2xl bg-gradient-to-br from-white to-gray-50 dark:from-gray-900 dark:to-gray-800 border border-blue-100 dark:border-blue-900/30",children:[(0,a.jsxs)("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[(0,a.jsx)("div",{className:"absolute top-0 left-0 w-full h-32 bg-gradient-to-b from-blue-50/30 to-transparent dark:from-blue-900/10"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-0 w-full h-32 bg-gradient-to-t from-blue-50/30 to-transparent dark:from-blue-900/10"})]}),(0,a.jsxs)(N.aY,{className:"p-4 md:p-8 relative",children:[(0,a.jsxs)(l.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"mb-4 text-center",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-3 mb-4",children:[(0,a.jsx)(l.E.div,{whileHover:{rotate:360},transition:{duration:2,ease:"easeInOut"},className:"bg-blue-500/10 dark:bg-blue-400/10 p-2 rounded-full",children:(0,a.jsx)(f.RsK,{className:"text-3xl sm:text-4xl text-blue-500 dark:text-blue-400"})}),(0,a.jsx)("h2",{className:"text-3xl sm:text-5xl font-playfair font-bold bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400 bg-clip-text text-transparent",children:"Explore the World"})]}),(0,a.jsx)(o.M,{mode:"wait",children:x&&(0,a.jsx)(l.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"mb-4",children:(0,a.jsxs)(E.bZ,{className:"bg-blue-50 dark:bg-blue-900/30 border-blue-200 dark:border-blue-800",children:[(0,a.jsx)(f.H33,{className:"h-5 w-5 text-blue-500 dark:text-blue-400"}),(0,a.jsx)(E.X,{className:"text-sm",children:"Click on any country to explore detailed information. Use the zoom controls to navigate the map."})]})})}),(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 py-2 min-h-[40px]","aria-live":"polite",children:(0,a.jsx)(o.M,{mode:"wait",children:(0,a.jsxs)(l.E.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10},className:"flex items-center gap-2",children:[(0,a.jsx)(f.dyY,{className:"text-xl sm:text-2xl text-blue-500 dark:text-blue-400","aria-hidden":"true"}),(0,a.jsx)("span",{className:"text-sm sm:text-xl font-medium text-gray-700 dark:text-gray-300",children:r||"Hover over a country to begin"})]},r||"default")})})]}),(0,a.jsxs)("div",{ref:z,className:"relative w-full h-[60vh] md:h-[70vh] rounded-xl overflow-hidden border border-gray-200 dark:border-gray-700 bg-gradient-to-br from-blue-50 to-blue-100 dark:from-gray-800 dark:to-gray-900",children:[(0,a.jsxs)(l.E.div,{className:"absolute top-4 right-4 z-10 flex flex-col gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.4},children:[(0,a.jsxs)(v,{children:[(0,a.jsx)(w,{asChild:!0,children:(0,a.jsx)(k.z,{variant:"ghost",size:"icon",onClick:()=>I(1),className:"bg-white/90 dark:bg-gray-800/90 hover:bg-white dark:hover:bg-gray-700 shadow-lg border border-gray-200 dark:border-gray-700","aria-label":"Zoom in",children:(0,a.jsx)(f.SJS,{className:"h-5 w-5 text-blue-500 dark:text-blue-400"})})}),(0,a.jsx)(j,{children:"Zoom In"})]}),(0,a.jsxs)(v,{children:[(0,a.jsx)(w,{asChild:!0,children:(0,a.jsx)(k.z,{variant:"ghost",size:"icon",onClick:()=>I(-1),className:"bg-white/90 dark:bg-gray-800/90 hover:bg-white dark:hover:bg-gray-700 shadow-lg border border-gray-200 dark:border-gray-700","aria-label":"Zoom out",children:(0,a.jsx)(f.gjP,{className:"h-5 w-5 text-blue-500 dark:text-blue-400"})})}),(0,a.jsx)(j,{children:"Zoom Out"})]}),(0,a.jsxs)(v,{children:[(0,a.jsx)(w,{asChild:!0,children:(0,a.jsx)(k.z,{variant:"ghost",size:"icon",onClick:()=>{m({coordinates:[0,0],zoom:1.5})},className:"bg-white/90 dark:bg-gray-800/90 hover:bg-white dark:hover:bg-gray-700 shadow-lg border border-gray-200 dark:border-gray-700","aria-label":"Reset view",children:(0,a.jsx)(f.m6D,{className:"h-5 w-5 text-blue-500 dark:text-blue-400"})})}),(0,a.jsx)(j,{children:"Reset View"})]})]}),(0,a.jsx)(g.ComposableMap,{projectionConfig:{scale:150},style:{width:"100%",height:"100%"},"aria-label":"Interactive world map. Click on a country to explore details.",children:(0,a.jsx)(g.ZoomableGroup,{zoom:u.zoom,center:u.coordinates,onMoveEnd:e=>{m(e)},children:(0,a.jsx)(g.Geographies,{geography:"https://raw.githubusercontent.com/johan/world.geo.json/master/countries.geo.json",children:e=>{let{geographies:t}=e;return t.filter(e=>{var t;return(null===(t=e.properties)||void 0===t?void 0:t.name)!=="Bermuda"}).map(e=>{var t;let r=null===(t=e.properties)||void 0===t?void 0:t.name,s=r?Z(r):"";return r?(0,a.jsx)(n.default,{href:"/countries/".concat(encodeURIComponent(s)),passHref:!0,children:(0,a.jsx)(g.Geography,{geography:e,onMouseEnter:()=>i(r||null),onMouseLeave:()=>i(null),onFocus:()=>i(r||null),onBlur:()=>i(null),tabIndex:0,role:"button","aria-label":"Explore ".concat(r),style:{default:{fill:L(r),stroke:M(),strokeWidth:.5,strokeLinejoin:"round",outline:"none",transition:"all 0.3s ease"},hover:{fill:A(r),stroke:R.defaultStroke,strokeWidth:1.5,cursor:"pointer",outline:"none"},pressed:{fill:d?"#E74C3C":"#ED8936",stroke:R.defaultStroke,strokeWidth:2,outline:"none"}}})},e.rsmKey):(0,a.jsx)(g.Geography,{geography:e,onMouseEnter:()=>i(r||null),onMouseLeave:()=>i(null),onFocus:()=>i(r||null),onBlur:()=>i(null),style:{default:{fill:L(r),stroke:M(),strokeWidth:.5,strokeLinejoin:"round",outline:"none",transition:"all 0.3s ease"},hover:{fill:A(r),stroke:R.defaultStroke,strokeWidth:1.5,cursor:"pointer",outline:"none"},pressed:{fill:d?"#E74C3C":"#ED8936",stroke:R.defaultStroke,strokeWidth:2,outline:"none"}}},e.rsmKey)})}})})}),(0,a.jsxs)(l.E.div,{className:"absolute inset-0 pointer-events-none",initial:{opacity:0},animate:{opacity:1},transition:{delay:.6},children:[(0,a.jsx)("div",{className:"absolute top-2 left-2 w-10 h-10 border-l-2 border-t-2 border-blue-500/30 rounded-tl-lg"}),(0,a.jsx)("div",{className:"absolute bottom-2 right-2 w-10 h-10 border-r-2 border-b-2 border-blue-500/30 rounded-br-lg"})]}),(0,a.jsx)("div",{className:"absolute bottom-2 left-2 text-xs text-gray-500 dark:text-gray-400 bg-white/70 dark:bg-gray-800/70 px-2 py-1 rounded backdrop-blur-sm",children:"Map data \xa9 Contributors"})]}),(0,a.jsxs)(l.E.div,{className:"mt-4 flex flex-wrap justify-center items-center gap-4 text-sm",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.8},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-4 h-4 rounded-sm bg-gradient-to-r from-[#E67E22] to-[#F39C12] dark:from-[#94e2d5] dark:to-[#76E4D1]"}),(0,a.jsx)("span",{className:"text-gray-700 dark:text-gray-300",children:"Available destinations"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-4 h-4 rounded-sm",style:{backgroundColor:R.defaultFill,border:"1px solid ".concat(R.defaultStroke)}}),(0,a.jsx)("span",{className:"text-gray-700 dark:text-gray-300",children:"Other regions"})]})]})]})]})})})}var z=r(23818),D=r(98012),R=r(38704),Z=r(3289),L=r(16994);function M(){let{isAuthenticated:e,username:t,firstName:r}=(0,d.a)(),[u,h]=(0,s.useState)(""),[g,f]=(0,s.useState)([]),[b,p]=(0,s.useState)(!1),[y,v]=(0,s.useState)(-1),[w,j]=(0,s.useState)(!1),[k,N]=(0,s.useState)(0),E=(0,s.useRef)(null),C=(0,s.useRef)(null),S=(0,c.useRouter)();(0,s.useEffect)(()=>{let e=()=>{N(window.scrollY)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]);let M=m()(async e=>{if(e.trim()){j(!0);try{let t=await (0,x.ui)(e);f(t)}catch(e){console.error("Error fetching search results:",e),f([])}finally{j(!1)}}else f([])},300);return(0,s.useEffect)(()=>{let e=e=>{E.current&&!E.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,a.jsxs)("div",{className:"min-h-screen flex flex-col bg-white dark:from-gray-900 dark:to-gray-800 relative overflow-hidden",children:[(0,a.jsx)("div",{className:"absolute -top-40 -right-40 w-96 h-96 rounded-full bg-gradient-to-br from-blue-500/20 to-blue-700/30 blur-3xl",style:{transform:"translate(".concat(.05*k,"px, ").concat(-.03*k,"px)")}}),(0,a.jsx)("div",{className:"absolute -bottom-20 -left-20 w-80 h-80 rounded-full bg-gradient-to-tr from-red-500/20 to-red-700/20 blur-3xl",style:{transform:"translate(".concat(-.04*k,"px, ").concat(.02*k,"px)")}}),(0,a.jsx)("section",{className:"relative flex flex-col items-center justify-center min-h-screen pt-24 pb-16 px-4 md:px-6 w-full",children:(0,a.jsxs)("div",{className:"max-w-5xl w-full mx-auto text-center space-y-8 z-10",children:[(0,a.jsx)(l.E.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,ease:"easeOut"},className:"text-5xl md:text-6xl lg:text-7xl font-bold mb-6 font-playfair",children:(0,a.jsx)("span",{className:"bg-gradient-to-r from-blue-600 to-blue-800 bg-clip-text text-transparent",children:e?r?"Welcome back, ".concat(r,"!"):"Welcome back, ".concat(t,"!"):"Discover the World"})}),(0,a.jsx)(l.E.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2,ease:"easeOut"},className:"text-xl md:text-2xl text-gray-700 dark:text-gray-300 font-light mb-10 max-w-2xl mx-auto leading-relaxed",children:"Discover hidden gems, explore vibrant cities, and create unforgettable journeys with our global community."}),(0,a.jsx)(l.E.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.6,delay:.4,ease:"easeOut"},className:"relative max-w-full md:max-w-2xl mx-auto",ref:E,children:(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),-1!==y&&g[y]?S.push("/city?name=".concat(encodeURIComponent(g[y].name))):S.push("/search?q=".concat(encodeURIComponent(u))),p(!1)},className:"group relative",children:[(0,a.jsxs)("div",{className:"flex items-center bg-white/90 dark:bg-gray-900/90 backdrop-blur-lg rounded-xl shadow-lg transition-all duration-300 focus-within:shadow-xl focus-within:ring-2 ring-blue-500/30 hover:bg-white/95 dark:hover:bg-gray-800/95 border border-gray-200 dark:border-gray-700",children:[(0,a.jsx)("input",{type:"text",value:u,onChange:e=>{let t=e.target.value;h(t),M(t),p(!0),v(-1)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),v(e=>ee>0?e-1:g.length-1)):"Escape"===e.key&&p(!1)},placeholder:"Where would you like to go?","aria-autocomplete":"list","aria-controls":"search-suggestions",className:"w-full px-6 py-5 bg-transparent text-gray-700 dark:text-gray-200 placeholder-gray-400 text-lg border-none focus:ring-0 font-cabin",onFocus:()=>p(!0)}),(0,a.jsx)("button",{type:"submit",className:"pr-6 pl-4 py-5 text-blue-600 hover:text-blue-800 transition-colors","aria-label":"Search",children:(0,a.jsx)(z.Z,{className:"w-5 h-5 transform transition-transform hover:scale-110"})})]}),(0,a.jsx)(o.M,{children:b&&(0,a.jsx)(l.E.div,{id:"search-suggestions",role:"listbox",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"absolute top-full left-0 w-full mt-2 bg-white/95 dark:bg-gray-900/95 backdrop-blur-lg rounded-xl shadow-xl overflow-hidden border border-gray-200 dark:border-gray-700 z-20",children:w?(0,a.jsx)("div",{className:"px-6 py-4 text-gray-700 dark:text-gray-300",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600 mr-3"}),(0,a.jsx)("span",{children:"Searching for destinations..."})]})}):g.length>0?g.map((e,t)=>(0,a.jsxs)(n.default,{href:"/cities/".concat(encodeURIComponent(e.slug)),onMouseDown:e=>e.preventDefault(),className:"flex items-center px-6 py-4 transition-colors border-b border-gray-100 dark:border-gray-700/50 last:border-0 group ".concat(t===y?"bg-gray-100 dark:bg-gray-800":"hover:bg-gray-50 dark:hover:bg-gray-800/70"),role:"option","aria-selected":t===y,onClick:()=>p(!1),children:[(0,a.jsx)(D.Z,{className:"text-blue-600 mr-3 flex-shrink-0 transform transition-transform group-hover:scale-125"}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"text-gray-800 dark:text-gray-200 truncate font-medium",children:e.name}),(0,a.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:e.country_name})]})]},e.id)):""!==u.trim()?(0,a.jsx)("div",{className:"px-6 py-4 text-gray-700 dark:text-gray-300",children:"No results found. Try a different search term."}):null})})]})}),(0,a.jsx)(l.E.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.6},className:"mt-12",children:(0,a.jsxs)("button",{onClick:()=>{var e;null===(e=C.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},className:"inline-flex items-center text-blue-600 hover:text-blue-800 transition-colors group font-medium px-6 py-3 rounded-lg hover:bg-white/50 dark:hover:bg-gray-900/50 border border-transparent hover:border-gray-200 dark:hover:border-gray-700",children:[(0,a.jsx)(R.Z,{className:"w-5 h-5 mr-2"}),(0,a.jsx)("span",{children:"Explore interactive world map"}),(0,a.jsx)(Z.Z,{className:"w-5 h-5 ml-2 transition-transform group-hover:translate-y-1"})]})})]})}),(0,a.jsx)("section",{className:"py-20 px-4 md:px-6 relative w-full",children:(0,a.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-12 text-center",children:[(0,a.jsx)("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-4 font-playfair",children:(0,a.jsx)("span",{className:"bg-gradient-to-r from-blue-600 to-blue-800 bg-clip-text text-transparent",children:"Featured Destinations"})}),(0,a.jsx)("p",{className:"text-lg text-gray-600 dark:text-gray-300 max-w-2xl mx-auto",children:"Handpicked locations loved by our travel community"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:[{id:1,name:"Kyoto, Japan",image:"/api/placeholder/400/250",rating:4.8,description:"Traditional temples, gardens, and geisha districts",travelers:2453},{id:2,name:"Santorini, Greece",image:"/api/placeholder/400/250",rating:4.9,description:"Stunning sunsets over white-washed buildings",travelers:3768},{id:3,name:"Marrakech, Morocco",image:"/api/placeholder/400/250",rating:4.7,description:"Vibrant markets and rich cultural heritage",travelers:1982}].map((e,t)=>(0,a.jsxs)(l.E.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1*t},whileHover:{y:-5,transition:{duration:.2}},className:"bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden border border-gray-200 dark:border-gray-700 group",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(i.default,{src:e.image,alt:e.name,width:400,height:250,className:"w-full h-48 object-cover transition-transform duration-500 group-hover:scale-105"}),(0,a.jsxs)("div",{className:"absolute top-3 right-3 bg-white/90 dark:bg-gray-900/90 backdrop-blur-sm px-2 py-1 rounded-lg flex items-center",children:[(0,a.jsx)("span",{className:"text-yellow-500 mr-1",children:"★"}),(0,a.jsx)("span",{className:"text-sm font-medium text-gray-800 dark:text-gray-200",children:e.rating})]})]}),(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("h3",{className:"text-xl font-bold text-gray-800 dark:text-white mb-2",children:e.name}),(0,a.jsx)("p",{className:"text-gray-600 dark:text-gray-300 mb-4",children:e.description}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsxs)("span",{className:"text-sm text-gray-500 dark:text-gray-400 flex items-center",children:[(0,a.jsx)(L.Z,{className:"w-4 h-4 mr-1"}),e.travelers.toLocaleString()," travelers"]}),(0,a.jsx)(n.default,{href:"/cities/".concat(encodeURIComponent(e.name.split(",")[0].toLowerCase())),className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors",children:"Explore"})]})]})]},e.id))}),(0,a.jsx)("div",{className:"mt-12 text-center",children:(0,a.jsxs)(n.default,{href:"/explore-cities",className:"inline-flex items-center px-6 py-3 bg-gradient-to-r from-blue-600 to-blue-800 text-white font-medium rounded-lg shadow-lg hover:shadow-xl transition-shadow group",children:[(0,a.jsx)("span",{children:"View all destinations"}),(0,a.jsx)(Z.Z,{className:"w-5 h-5 ml-2 transform rotate-270 transition-transform group-hover:translate-x-1"})]})})]})}),(0,a.jsxs)("section",{ref:C,id:"world-map-section",className:"py-20 bg-gray-100 dark:bg-gray-900 border-t border-gray-200 dark:border-gray-800 relative w-full",children:[(0,a.jsx)("div",{className:"absolute top-0 left-0 w-24 h-24 border-l-2 border-t-2 border-blue-600/30"}),(0,a.jsx)("div",{className:"absolute bottom-0 right-0 w-24 h-24 border-r-2 border-b-2 border-blue-600/30"}),(0,a.jsxs)("div",{className:"max-w-7xl mx-auto px-4 md:px-6",children:[(0,a.jsxs)("div",{className:"max-w-3xl mx-auto text-center mb-12",children:[(0,a.jsx)("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-4 font-playfair",children:(0,a.jsx)("span",{className:"bg-gradient-to-r from-blue-600 to-blue-800 bg-clip-text text-transparent",children:"Global Adventure Map"})}),(0,a.jsx)("p",{className:"text-lg text-gray-600 dark:text-gray-300 max-w-md mx-auto leading-relaxed",children:"Click to explore destinations, view traveler insights, and start planning your next adventure."})]}),(0,a.jsxs)(l.E.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.8,ease:"easeOut"},className:"rounded-2xl overflow-hidden shadow-2xl border-2 border-gray-200 dark:border-gray-700 bg-white/95 dark:bg-gray-800/95 backdrop-blur-lg relative",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-white/10 to-gray-100/10 dark:from-gray-800/10 dark:to-gray-900/10 pointer-events-none"}),(0,a.jsx)(F,{})]})]})]}),(0,a.jsx)("section",{className:"py-20 px-4 md:px-6 relative w-full",children:(0,a.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-12 text-center",children:[(0,a.jsx)("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-4 font-playfair",children:(0,a.jsx)("span",{className:"bg-gradient-to-r from-blue-600 to-blue-800 bg-clip-text text-transparent",children:"Nomad Community Stories"})}),(0,a.jsx)("p",{className:"text-lg text-gray-600 dark:text-gray-300 max-w-2xl mx-auto",children:"Authentic travel experiences from our global community"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[1,2,3].map(e=>(0,a.jsxs)(l.E.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1*e},className:"bg-white dark:bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-200 dark:border-gray-700",children:[(0,a.jsxs)("div",{className:"flex items-center mb-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-500 to-blue-700 rounded-full flex items-center justify-center text-white shadow-md mr-4",children:String.fromCharCode(64+e)}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-bold text-gray-900 dark:text-white",children:"Traveler Name"}),(0,a.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Adventure Enthusiast"})]})]}),(0,a.jsx)("p",{className:"text-gray-600 dark:text-gray-300 italic",children:'"Using Nomad transformed my travel experience. From hidden local gems to seamless planning, it\'s been an essential companion on my journey."'}),(0,a.jsx)("div",{className:"mt-4 text-yellow-500",children:"★★★★★"})]},e))})]})}),(0,a.jsxs)("section",{className:"py-16 px-4 md:px-6 bg-gradient-to-r from-blue-600 to-blue-800 relative overflow-hidden w-full",children:[(0,a.jsxs)("div",{className:"absolute top-0 left-0 w-full h-full opacity-10",children:[(0,a.jsx)("div",{className:"absolute -top-20 -right-20 w-96 h-96 rounded-full bg-white blur-3xl"}),(0,a.jsx)("div",{className:"absolute -bottom-40 -left-20 w-80 h-80 rounded-full bg-white blur-3xl"})]}),(0,a.jsxs)("div",{className:"max-w-5xl mx-auto text-center relative z-10",children:[(0,a.jsx)("h2",{className:"text-3xl md:text-4xl font-bold text-white mb-6 font-playfair",children:"Ready to Begin Your Journey?"}),(0,a.jsx)("p",{className:"text-xl text-white/90 max-w-2xl mx-auto mb-8",children:"Join our community of global travelers and start creating unforgettable memories"}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row justify-center gap-4",children:[(0,a.jsx)(n.default,{href:"/signup",className:"px-8 py-4 bg-white text-blue-600 font-bold rounded-xl shadow-lg hover:shadow-xl transition-shadow",children:"Start Planning"}),(0,a.jsx)(n.default,{href:"/explore-cities",className:"px-8 py-4 bg-transparent text-white border-2 border-white/50 font-bold rounded-xl hover:bg-white/10 transition-colors",children:"Explore Destinations"})]})]})]})]})}},3141:function(e,t,r){"use strict";r.d(t,{WX:function(){return i},a$:function(){return c},g$:function(){return o},pH:function(){return d}});var a=r(41121),s=r(43577);let l=(e,t)=>{if(e instanceof s.d7){if("ECONNABORTED"===e.code)throw Error("Connection timeout. Please check your network");if(!e.response)throw Error("Network error. Please check your connection");throw Error(e.response.data.detail||e.response.data.error||t)}throw Error(t)},o=async()=>{try{let e=await a.Z.post("/auth/token/refresh/",{refresh:localStorage.getItem("refreshToken")});return localStorage.setItem("accessToken",e.data.access),a.Z.defaults.headers.common.Authorization="Bearer ".concat(e.data.access),e.data}catch(e){return l(e,"Session expired. Please log in again.")}},n=0,i=async()=>{try{let e=await a.Z.get("/auth/verify/");return n=0,e.data}catch(t){var e;if(t instanceof s.d7&&(null===(e=t.response)||void 0===e?void 0:e.status)===401&&n<2)return n++,await o(),i();return l(t,"Authentication failed")}},d=async(e,t)=>{try{console.log("Sending login request with:",{username:e,password:t});let r=await a.Z.post("/auth/login/",{username:e,password:t});return console.log("Login response:",r.data),r.data}catch(e){return console.error("Login error:",e),l(e,"Login failed")}},c=async(e,t,r,s,o)=>{try{return(await a.Z.post("/auth/register/",{username:e,email:t,password:r,first_name:s,last_name:o})).data}catch(e){return l(e,"Registration failed")}}},95937:function(e,t,r){"use strict";r.d(t,{X:function(){return d},bZ:function(){return i}});var a=r(57437),s=r(2265),l=r(90535),o=r(93448);let n=(0,l.j)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),i=s.forwardRef((e,t)=>{let{className:r,variant:s,...l}=e;return(0,a.jsx)("div",{ref:t,role:"alert",className:(0,o.cn)(n({variant:s}),r),...l})});i.displayName="Alert",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("h5",{ref:t,className:(0,o.cn)("mb-1 font-medium leading-none tracking-tight",r),...s})}).displayName="AlertTitle";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,o.cn)("text-sm [&_p]:leading-relaxed",r),...s})});d.displayName="AlertDescription"},12381:function(e,t,r){"use strict";r.d(t,{z:function(){return d}});var a=r(57437),s=r(2265),l=r(37053),o=r(90535),n=r(93448);let i=(0,o.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=s.forwardRef((e,t)=>{let{className:r,variant:s,size:o,asChild:d=!1,...c}=e,u=d?l.g7:"button";return(0,a.jsx)(u,{className:(0,n.cn)(i({variant:s,size:o,className:r})),ref:t,...c})});d.displayName="Button"},79820:function(e,t,r){"use strict";r.d(t,{Ol:function(){return n},Zb:function(){return o},aY:function(){return d},ll:function(){return i}});var a=r(57437),s=r(2265),l=r(93448);let o=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("rounded-xl border bg-card text-card-foreground shadow",r),...s})});o.displayName="Card";let n=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",r),...s})});n.displayName="CardHeader";let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("font-semibold leading-none tracking-tight",r),...s})});i.displayName="CardTitle",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",r),...s})}).displayName="CardDescription";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("p-6 pt-0",r),...s})});d.displayName="CardContent",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("flex items-center p-6 pt-0",r),...s})}).displayName="CardFooter"},93448:function(e,t,r){"use strict";r.d(t,{cn:function(){return l}});var a=r(61994),s=r(53335);function l(){for(var e=arguments.length,t=Array(e),r=0;r