PageSourceSearch

https://rentsolutions.com/assets/listings-CWzWq-dF.js

js rentsolutions.com collected 2026-10-09 03:35:18 UTC 56,407 bytes, 36 lines download raw bytes

1import{a as o,j as e}from"./vendor-react-DP1M2pbw.js";import{T as De}from"./team-CmW8M0y1.js";import{u as _e,a as H,b as Ae,m as U,A as G}from"./vendor-framer-Bxod-b_z.js";import{l as we,o as Ee,p as Re,V as Fe,q as ze,M as F,r as Ue,s as Oe,t as Ve,I as We,X as V,k as re,S as se,u as ae,v as Ke}from"./index-CI1Osibq.js";import{L as S,a as qe,u as He}from"./vendor-router-CKzhkitI.js";import{B as Ge}from"./index-5d3WWCcN.js";import{u as Xe,B as Ye,a as Qe,i as Ze,b as Q,c as Z,m as Je,g as et,h as tt}from"./geo-BPZDQeyY.js";import{C as ie}from"./chevron-left-Z6HIWJ6w.js";import{C as ne}from"./chevron-right-mSNTBp32.js";import{H as st}from"./heart-B6wWmu9M.js";import{M as at}from"./maximize-2-_cDx-81D.js";import{C as lt}from"./calendar-check-ClzOWh82.js";import{E as rt}from"./eye-DL_Uta-a.js";import{u as pe,a as it,b as nt,g as ge}from"./api-B8ZBL631.js";import{S as Ne,a as oe,b as ye,c as L,d as h}from"./select-BnU1WnYa.js";import{M as ot,T as ct,C as dt,a as ke,L as J,u as ce,P as xt}from"./vendor-map-vC42vrQN.js";import{C as mt}from"./chevron-up-jiZx7qIh.js";import{L as ht}from"./loader-circle-DiBshXec.js";import{M as fe}from"./map-D_MECAEG.js";import{R as ut}from"./rotate-ccw-DFu95Xg2.js";import{k as pt}from"./vendor-query-CCm1wPcS.js";import"./barb-headshot-BBEzEBAM.js";import"./tag-BWg0_AG2.js";import"./megaphone-uxrYtZms.js";import"./calendar-f1ufM4kJ.js";import"./percent-CYreeR-n.js";import"./index-Bvxtoxhw.js";import"./index-Bq0o6CKa.js";import"./index-BTGOfYVE.js";import"./check-CI6cJF7B.js";const gt=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],ft=we("list",gt);const bt=[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]],jt=we("navigation",bt),vt="/assets/lifestyle-tampa-home-DeDRrkj3.webp",wt="/assets/listings_hero_homes_bay-Dij0Rq2o.webp",Nt="/assets/support_team_duo-DADTLXhn.webp",yt="/assets/virtual_tour_interior-b0rIK29t.webp",kt=3,Ct=6e3,X={initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.4}},Pt=De[0].members.slice(0,4),Mt=["Living","Kitchen","Bedroom","Bath"],Tt=Array.from({length:4},(l,a)=>{const n=new Date;return n.setDate(n.getDate()+a),{label:a===0?"TODAY":n.toLocaleDateString("en-US",{weekday:"short"}).toUpperCase(),day:n.getDate(),month:n.toLocaleDateString("en-US",{month:"short"})}}),O={eyebrow:"BROWSE OUR RENTAL LISTINGS",headlineTop:"Find your next home",headlineBottom:"across Tampa Bay",body:"Explore available rentals from single-family homes to condos and townhomes — with live availability, photos, maps, and the details that matter, all in one place.",cta:"Explore Available Rentals"},Ce=56;function $t(){document.getElementById("listings-widget")?.scrollIntoView({behavior:"smooth",block:"start"})}function Lt(){const l=o.useRef(null),{scrollY:a}=_e(),[n,r]=o.useState(600),[t,i]=o.useState(14),[d,j]=o.useState(0),[c,u]=o.useState(0);o.useEffect(()=>{const g=window.setInterval(()=>j(b=>(b+1)%kt),Ct);return()=>window.clearInterval(g)},[]),o.useEffect(()=>{const g=()=>{const x=l.current?.offsetHeight??600;r(Math.max(x,1)),i(window.innerWidth<768?8:14),u(window.innerWidth<768?Math.max(x-window.innerHeight+Ce,0):0)};g(),window.addEventListener("resize",g);const b=l.current?new ResizeObserver(g):null;return l.current&&b&&b.observe(l.current),()=>{window.removeEventListener("resize",g),b?.disconnect()}},[]);const f=H(a,[c,c+n*.9],[0,t],{clamp:!0}),N=Ae`blur(${f}px)`,y=H(a,[c,c+n*.8],[1,.1],{clamp:!0}),k=H(a,[c,c+n],[1,.96],{clamp:!0}),$=H(a,[c,c+n],[0,-36],{clamp:!0});return e.jsxs(U.section,{ref:l,className:"sticky z-0 w-full overflow-hidden",style:{top:-c,filter:N,opacity:y,scale:k,y:$,background:"#1b3833",willChange:"filter, transform, opacity"},children:[e.jsx("img",{src:wt,alt:"","aria-hidden":"true",decoding:"async",className:"absolute inset-0 h-full w-full object-cover"}),e.jsx("div",{"aria-hidden":"true",className:"absolute inset-0",style:{background:"linear-gradient(to right, rgba(16,38,32,0.71) 0%, rgba(16,38,32,0.59) 42%, rgba(16,38,32,0.41) 70%, rgba(16,38,32,0.5) 100%), linear-gradient(to bottom, rgba(16,38,32,0.69) 0%, rgba(16,38,32,0.28) 35%, rgba(16,38,32,0.37) 75%, rgba(16,38,32,0.69) 100%)"}}),e.jsx("div",{className:"container relative mx-auto px-4 pb-[106px] pt-[182px] md:pb-[130px] md:pt-[198px]",children:e.jsxs("div",{className:"grid items-center gap-10 md:grid-cols-2 md:gap-12",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[16px] font-medium tracking-[0.12em] text-white",children:O.eyebrow}),e.jsxs("h1",{className:"mt-3 text-[clamp(2rem,5.4vw,3.9rem)] font-extrabold leading-[1.08] tracking-tight text-white",children:[O.headlineTop,e.jsx("br",{}),e.jsx("span",{className:"text-[#7AC04E]",children:O.headlineBottom})]}),e.jsx("p",{className:"mt-5 max-w-[480px] text-[clamp(1.0625rem,1.4vw,1.2625rem)] font-medium leading-snug text-[#d7e3da]",children:O.body}),e.jsxs("div",{className:"mt-7 flex flex-wrap items-center gap-3",children:[e.jsx("button",{type:"button",onClick:$t,className:"rounded-full border border-[#5B933B] bg-[#5B933B] px-8 py-3.5 text-[16px] font-semibold text-white transition [box-shadow:inset_0_1px_1px_rgba(255,255,255,0.15),0_3px_8px_rgba(0,0,0,0.1)] hover:bg-[#4C7D31]",children:O.cta}),e.jsx("a",{href:"/about/contact",className:"rounded-full border border-white/35 bg-gradient-to-b from-white/13 to-white/9 px-8 py-3.5 text-[16px] font-semibold text-white backdrop-blur-xl transition [box-shadow:inset_0_1px_1px_rgba(255,255,255,0.3),0_3px_8px_rgba(0,0,0,0.1)] hover:from-white/18 hover:to-white/12",children:"Talk to a Leasing Pro"})]})]}),e.jsxs("div",{className:"relative mx-auto w-full max-w-[520px] md:mx-0 md:ml-auto md:-translate-y-5",children:[e.jsxs("div",{className:"relative overflow-hidden rounded-[28px] ring-1 ring-white/25 shadow-[0_24px_60px_rgba(14,34,30,0.45)]",children:[e.jsxs("div",{className:"relative h-[clamp(260px,34vw,420px)] w-full",children:[e.jsx("img",{fetchPriority:"high",decoding:"async",src:vt,alt:"Charming Tampa Bay rental home at golden hour",className:"absolute inset-0 h-full w-full object-cover"}),e.jsx(G,{children:d!==0&&e.jsx(U.div,{className:"absolute inset-0",...X,children:e.jsx("img",{loading:"lazy",decoding:"async",src:d===1?Nt:yt,alt:d===1?"Rent Solutions supp
1ort specialists wearing headsets":"Interactive 3D virtual tour of a bright rental home interior",className:"h-full w-full object-cover"})},d===1?"rep":"tour")})]}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#0e221e]/35 via-transparent to-transparent"}),e.jsxs("div",{className:"absolute left-4 top-4 inline-flex items-center gap-1.5 rounded-full bg-[#0e221e]/45 px-3 py-1.5 text-[11px] font-semibold uppercase tracking-[0.12em] text-white backdrop-blur-md ring-1 ring-white/25",children:[e.jsx("span",{className:"h-2 w-2 rounded-full bg-[#9fe3c5] shadow-[0_0_8px_rgba(159,227,197,0.9)]","aria-hidden":"true"}),e.jsx(G,{mode:"wait",initial:!1,children:e.jsx(U.span,{...X,children:d===0?"Live availability":d===1?"Live support":"Virtual tours"},d)})]})]}),e.jsx("div",{className:"absolute -bottom-6 -left-5 hidden w-[44%] overflow-hidden rounded-[20px] bg-white ring-1 ring-white/30 shadow-[0_18px_40px_rgba(14,34,30,0.5)] sm:block",children:e.jsx(G,{mode:"wait",initial:!1,children:e.jsx(U.div,{...X,className:"flex h-[clamp(120px,14vw,170px)] w-full flex-col justify-center px-4 py-3",children:d===0?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-[15px] font-extrabold leading-tight tracking-tight text-[#1e2d41]",children:"Schedule a Tour"}),e.jsxs("div",{className:"mt-2 flex gap-1.5",children:[e.jsxs("span",{className:"inline-flex flex-1 items-center justify-center gap-1 whitespace-nowrap rounded-lg border border-[#61c237]/60 bg-[#61c237]/10 px-1.5 py-1 text-[10px] font-bold text-[#4ea52c]",children:[e.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",className:"shrink-0",children:[e.jsx("circle",{cx:"7.5",cy:"15.5",r:"4",stroke:"currentColor",strokeWidth:"2"}),e.jsx("path",{d:"m10.5 12.5 8-8M15 7l3 3M18 4l2 2",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),"Self-Guided"]}),e.jsxs("span",{className:"inline-flex flex-1 items-center justify-center gap-1 whitespace-nowrap rounded-lg border border-slate-200 bg-slate-50 px-1.5 py-1 text-[10px] font-bold text-slate-400",children:[e.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",className:"shrink-0",children:[e.jsx("circle",{cx:"12",cy:"7.5",r:"3.5",stroke:"currentColor",strokeWidth:"2"}),e.jsx("path",{d:"M5.5 20a6.5 6.5 0 0 1 13 0",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),"In-Person"]})]}),e.jsx("p",{className:"mt-2.5 text-[9px] font-bold tracking-[0.08em] text-slate-500",children:"SELECT A DATE"}),e.jsx("div",{className:"mt-1.5 flex gap-1.5",children:Tt.map((g,b)=>e.jsxs("div",{className:`flex flex-1 flex-col items-center rounded-lg px-1 py-1.5 ${b===0?"bg-[#61c237] text-white":"border border-slate-200 bg-slate-50 text-slate-600"}`,children:[e.jsx("span",{className:`text-[7px] font-bold tracking-wide ${b===0?"text-white":"text-slate-400"}`,children:g.label}),e.jsx("span",{className:"text-[13px] font-extrabold leading-tight",children:g.day}),e.jsx("span",{className:`text-[7px] font-medium ${b===0?"text-white":"text-slate-400"}`,children:g.month})]},g.label))})]}):d===1?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-[15px] font-extrabold leading-tight tracking-tight text-[#1e2d41]",children:"Real people, standing by"}),e.jsxs("div",{className:"mt-2 flex gap-1.5",children:[e.jsxs("span",{className:"inline-flex flex-1 items-center justify-center gap-1 whitespace-nowrap rounded-lg border border-[#61c237]/60 bg-[#61c237]/10 px-1.5 py-1 text-[10px] font-bold text-[#4ea52c]",children:[e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",className:"shrink-0",children:e.jsx("path",{d:"M6.8 3.5 9 5.7a1.4 1.4 0 0 1 .1 1.9L7.9 9a12.8 12.8 0 0 0 7.1 7.1l1.4-1.2a1.4 1.4 0 0 1 1.9.1l2.2 2.2a1.4 1.4 0 0 1 0 2l-1.3 1.3c-1 1-2.6 1.2-3.9.6A22.6 22.6 0 0 1 4.9 10.7c-.6-1.3-.4-2.9.6-3.9l1.3-1.3z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"})}),"Call Now"]}),e.jsxs("span",{className:"inline-flex flex-1 items-center justify-center gap-1 whitespace-nowrap rounded-lg border border-slate-200 bg-slate-50 px-1.5 py-1 text-[10px] font-bold text-slate-400",children:[e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",className:"shrink-0",children:e.jsx("path",{d:"M21 11.5a8.5 8.5 0 0 1-8.5 8.5 8.4 8.4 0 0 1-3.6-.8L3 21l1.8-5.9A8.5 8.5 0 1 1 21 11.5z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"})}),"Chat Now"]})]}),e.jsx("p",{className:"mt-2.5 text-[9px] font-bold tracking-[0.08em] text-slate-500",children:"OUR TEAM IS STANDING BY"}),e.jsx("div",{className:"mt-1.5 flex items-center",children:Pt.map((g,b)=>e.jsx("div",{className:"relative h-[42px] w-[42px] shrink-0 overflow-hidden rounded-full border-2 border-white bg-slate-50 shadow-sm",style:{marginLeft:b===0?0:-10}
1,children:e.jsx("img",{loading:"lazy",src:g.photo,alt:g.name,className:"h-full w-full object-cover object-top"})},g.name))})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-[15px] font-extrabold leading-tight tracking-tight text-[#1e2d41]",children:"Tour from anywhere"}),e.jsxs("div",{className:"mt-2 flex gap-1.5",children:[e.jsxs("span",{className:"inline-flex flex-1 items-center justify-center gap-1 whitespace-nowrap rounded-lg border border-[#61c237]/60 bg-[#61c237]/10 px-1.5 py-1 text-[10px] font-bold text-[#4ea52c]",children:[e.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",className:"shrink-0",children:[e.jsx("path",{d:"M12 2.5 20.5 7v10L12 21.5 3.5 17V7L12 2.5z",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),e.jsx("path",{d:"M3.5 7 12 11.5 20.5 7M12 11.5v10",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})]}),"3D Walkthrough"]}),e.jsxs("span",{className:"inline-flex flex-1 items-center justify-center gap-1 whitespace-nowrap rounded-lg border border-slate-200 bg-slate-50 px-1.5 py-1 text-[10px] font-bold text-slate-400",children:[e.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",className:"shrink-0",children:[e.jsx("rect",{x:"3",y:"6",width:"13",height:"12",rx:"2.5",stroke:"currentColor",strokeWidth:"2"}),e.jsx("path",{d:"m16 10.5 5-3v9l-5-3",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})]}),"Video Tour"]})]}),e.jsx("p",{className:"mt-2.5 text-[9px] font-bold tracking-[0.08em] text-slate-500",children:"EXPLORE EVERY ROOM"}),e.jsx("div",{className:"mt-1.5 flex gap-1.5",children:Mt.map((g,b)=>e.jsxs("div",{className:`flex flex-1 flex-col items-center justify-center rounded-lg px-1 py-2 ${b===0?"bg-[#61c237] text-white":"border border-slate-200 bg-slate-50 text-slate-600"}`,children:[e.jsx("span",{className:"text-[9px] font-bold leading-tight",children:g}),e.jsx("span",{className:`text-[7px] font-medium ${b===0?"text-white":"text-slate-400"}`,children:"360°"})]},g))})]})},d)})}),e.jsxs("div",{className:"absolute -right-3 -bottom-6 rounded-2xl border border-white/25 bg-white/12 px-4 py-3 backdrop-blur-md [box-shadow:inset_0_1px_1px_rgba(255,255,255,0.4),0_12px_30px_rgba(14,34,30,0.35)]",children:[e.jsx("div",{"aria-hidden":"true",className:"invisible h-0 overflow-hidden",children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("span",{className:"h-9 w-9 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"whitespace-nowrap text-[13px] font-semibold leading-tight",children:"Updated in real time"}),e.jsx("p",{className:"mt-0.5 whitespace-nowrap text-[11px] font-medium",children:"New rentals appear the moment they list"})]})]})}),e.jsx(G,{mode:"wait",initial:!1,children:e.jsxs(U.div,{...X,className:"flex items-center gap-2.5",children:[e.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-[#9fe3c5]/25 text-[#bff2dc] ring-1 ring-white/30",children:d===0?e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"2.4",fill:"currentColor"}),e.jsx("path",{d:"M8.1 15.9a5.5 5.5 0 0 1 0-7.8M15.9 8.1a5.5 5.5 0 0 1 0 7.8M5.3 18.7a9.5 9.5 0 0 1 0-13.4M18.7 5.3a9.5 9.5 0 0 1 0 13.4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}):d===1?e.jsx(Ee,{className:"h-[18px] w-[18px]","aria-hidden":"true"}):e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("ellipse",{cx:"12",cy:"12",rx:"9",ry:"4.5",stroke:"currentColor",strokeWidth:"1.6"}),e.jsx("ellipse",{cx:"12",cy:"12",rx:"4.5",ry:"9",stroke:"currentColor",strokeWidth:"1.6"}),e.jsx("circle",{cx:"12",cy:"12",r:"1.6",fill:"currentColor"})]})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[13px] font-semibold leading-tight text-white",children:d===0?"Updated in real time":d===1?"AI Assistant":"3D Walkthroughs"}),e.jsx("p",{className:"mt-0.5 text-[11px] font-medium text-white",children:d===0?"New rentals appear the moment they list":d===1?"24/7 AI support to answer any questions":"Walk every room from your couch"})]})]},d)})]})]})]})})]})}const St=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0});function It(l,a){if(a==="rented")return{text:"Rented",isNow:!1};if(!l)return{text:"Available Now",isNow:!0};const n=Ue(l);return n<=new Date?{text:"Available Now",isNow:!0}:{text:`Available ${n.toLocaleDateString()}`,isNow:!1}}function Bt(l){if(!l)return null;const a=l.toLowerCase();return a.includes("no pet")||a.includes("not allowed")?null:a.includes("cat")&&!a.includes("dog")?"Cats OK":a.includes("dog")&&!a.includes("cat")?"Dogs OK":"Pets OK"}const Dt=o.memo(function({property:a,distance:n}){const r=a.imageUrls&&a.imageUrls.length>0?a.imageUrls:a.primaryImageUrl?[a.primaryImageUrl]:[],[t,i]=o.useState(0),{isFavorite:d,toggleFavorite:j}=Xe(),c=d(a.id),u=a.promotions?.[0],f=o.useRef(null),N=o.useRef(0),y=o.useCallback(p=>{p.preventDefault(),p.stopPropagation(),i(M=>(M+1)%r.length)},[r.length]),k=o.useCallback(p=>{p.preventDefault(),p.stopPropagation(),i(M=>(M-1+r.length)%r.length)},[r.length]),$=o.useCallback(p=>{f.current=p.touches[0].clientX,N.current=0},[]),g=o.useCallback(p=>{f.current!==null&&(N.current=p.touches[0].clientX-f.current)}
1,[]),b=o.useRef(!1),x=o.useCallback(()=>{if(f.current===null)return;const p=40;N.current<-p?(i(M=>(M+1)%r.length),b.current=!0):N.current>p?(i(M=>(M-1+r.length)%r.length),b.current=!0):b.current=!1,f.current=null,N.current=0},[r.length]),v=o.useCallback(p=>{b.current&&(p.preventDefault(),p.stopPropagation(),b.current=!1)},[]),D=It(a.availabilityDate,a.status),z=Bt(a.petPolicy);return e.jsxs(Re,{className:"overflow-hidden group hover:shadow-lg transition-all duration-300 border-border/50",children:[e.jsxs("div",{className:"relative aspect-[4/3] overflow-hidden bg-slate-100",children:[e.jsx(S,{href:`/listing/${a.id}`,className:"block w-full h-full",onTouchStart:r.length>1?$:void 0,onTouchMove:r.length>1?g:void 0,onTouchEnd:r.length>1?x:void 0,onClick:r.length>1?v:void 0,children:r.length>0?e.jsx("img",{src:r[t],alt:a.streetAddress,loading:"lazy",decoding:"async",className:"object-cover w-full h-full group-hover:scale-105 transition-transform duration-500 select-none pointer-events-none",draggable:!1}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-slate-300",children:e.jsx(_t,{className:"h-12 w-12"})})}),r.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:k,className:"absolute left-2 top-1/2 -translate-y-1/2 bg-white/90 hover:bg-white rounded-full p-1.5 shadow-md opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-opacity z-10","aria-label":"Previous image",children:e.jsx(ie,{className:"h-4 w-4 text-slate-700"})}),e.jsx("button",{onClick:y,className:"absolute right-2 top-1/2 -translate-y-1/2 bg-white/90 hover:bg-white rounded-full p-1.5 shadow-md opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-opacity z-10","aria-label":"Next image",children:e.jsx(ne,{className:"h-4 w-4 text-slate-700"})}),e.jsx("div",{className:"absolute bottom-2 left-1/2 -translate-x-1/2 flex gap-1.5 z-10",children:r.map((p,M)=>e.jsx("span",{className:`block rounded-full transition-colors ${M===t?"bg-white w-2 h-2":"bg-white/50 w-1.5 h-1.5"}`},M))})]}),u&&e.jsx(Ye,{promo:u,context:"card"}),e.jsxs("div",{className:"absolute top-3 right-3 z-10 flex items-center gap-1.5",children:[a.virtualTourUrl&&e.jsxs("a",{href:`/listing/${a.id}#3d-tour`,onClick:p=>p.stopPropagation(),className:"inline-flex items-center gap-1 bg-black/50 backdrop-blur-sm text-white text-[11px] font-medium px-2 py-1 rounded-full hover:bg-black/70 transition-colors active:scale-95",children:[e.jsx(Qe,{className:"h-3 w-3"}),"3D Tour"]}),Ze(a.videoTourUrl)&&e.jsxs("a",{href:`/listing/${a.id}#video`,onClick:p=>p.stopPropagation(),className:"inline-flex items-center gap-1 bg-black/50 backdrop-blur-sm text-white text-[11px] font-medium px-2 py-1 rounded-full hover:bg-black/70 transition-colors active:scale-95",children:[e.jsx(Fe,{className:"h-3 w-3"}),"Video Tour"]}),e.jsx("button",{onClick:p=>{p.preventDefault(),p.stopPropagation(),j(a.id)},className:"p-1.5 rounded-full bg-black/40 transition-colors hover:bg-black/60","aria-label":"Favorite",children:e.jsx(st,{className:`h-4 w-4 ${c?"fill-red-500 text-red-500":"text-white hover:text-white"}`})})]}),e.jsx("div",{className:"absolute bottom-3 left-3 flex gap-2 z-10",children:a.status==="rented"&&e.jsx(Ge,{variant:"destructive",className:"bg-red-500 font-semibold shadow-sm",children:"Rented"})})]}),e.jsxs(ze,{className:"p-5",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsxs("div",{className:"text-[22px] font-bold text-slate-900 tracking-tight leading-tight",children:[St.format(a.price),e.jsx("span",{className:"text-sm font-normal text-slate-500",children:"/mo"})]}),!D.isNow&&e.jsx("span",{className:`text-xs font-semibold px-3 py-1 rounded-full ${a.status==="rented"?"bg-red-50 text-red-600":"bg-emerald-50 text-emerald-700"}`,children:D.text})]}),e.jsx(S,{href:`/listing/${a.id}`,children:e.jsx("h3",{className:"font-bold text-[15px] text-slate-900 line-clamp-1 hover:text-w-brand transition-colors leading-snug",children:a.streetAddress})}),e.jsxs("div",{className:"flex items-center text-slate-500 text-[13px] mt-1 mb-4",children:[e.jsx(F,{className:"h-3.5 w-3.5 mr-1 flex-shrink-0 text-slate-400"}),e.jsxs("span",{className:"line-clamp-1",children:[a.city,", ",a.state," ",a.zip]})]}),e.jsxs("div",{className:"grid grid-cols-3 py-3 border-t border-slate-100",children:[e.jsxs("div",{className:"flex items-center gap-1.5 justify-center",children:[e.jsx(Q,{className:"h-[18px] w-[18px] text-slate-400"}),e.jsxs("span",{className:"text-sm font-medium",children:[a.beds," ",e.jsx("span",{className:"text-slate-400 font-normal",children:"Beds"})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 justify-center",children:[e.jsx(Z,{className:"h-[18px] w-[18px] text-slate-400"}),e.jsxs("span",{className:"text-sm font-medium",children:[a.baths," ",e.jsxs("span",{className:"text-slate-400 font-normal",children:["Bath",(a.baths??0)!==1?"s":""]})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 justify-center",children:[e.jsx(at,{className:"h-[18px] w-[18px] text-slate-400"}),e.jsx("span",{className:"text-sm font-medium",children:a.sqft?`${a.sqft.toLocaleStr
1ing()} sqft`:"--"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 pt-3 pb-4 border-t border-slate-100",children:[e.jsx("span",{className:"text-xs font-semibold text-slate-600 bg-slate-100 px-3 py-1 rounded-full",children:a.propertyType}),z&&e.jsx("span",{className:"text-xs font-semibold text-emerald-700 bg-emerald-50 px-3 py-1 rounded-full",children:z})]}),n!=null&&e.jsxs("div",{className:"flex items-center gap-1.5 pb-3 text-xs font-medium text-slate-500",children:[e.jsx(F,{className:"h-3.5 w-3.5"}),n.toFixed(1)," mi away"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(S,{href:`/listing/${a.id}#schedule-tour`,className:"flex-1 basis-0 inline-flex items-center justify-center gap-1.5 bg-w-brand hover:bg-w-brand-dark text-white text-[13px] font-semibold py-2.5 md:py-2.5 px-4 rounded-lg transition-colors min-h-[44px] md:min-h-0",onClick:p=>p.stopPropagation(),children:[e.jsx(lt,{className:"h-4 w-4"}),"Schedule Showing"]}),e.jsxs(S,{href:`/listing/${a.id}`,className:"flex-1 basis-0 hidden sm:inline-flex items-center justify-center gap-1.5 border border-slate-300 hover:border-slate-400 bg-white hover:bg-slate-50 text-slate-800 text-[13px] font-medium py-2.5 px-4 rounded-lg transition-colors",onClick:p=>p.stopPropagation(),children:[e.jsx(rt,{className:"h-4 w-4"}),"View Details"]})]})]})]})});function _t(l){return e.jsxs("svg",{...l,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2"}),e.jsx("path",{d:"M9 22v-4h6v4"}),e.jsx("path",{d:"M8 6h.01"}),e.jsx("path",{d:"M16 6h.01"}),e.jsx("path",{d:"M12 6h.01"}),e.jsx("path",{d:"M12 10h.01"}),e.jsx("path",{d:"M12 14h.01"}),e.jsx("path",{d:"M16 10h.01"}),e.jsx("path",{d:"M16 14h.01"}),e.jsx("path",{d:"M8 10h.01"}),e.jsx("path",{d:"M8 14h.01"})]})}function le({className:l,...a}){return e.jsx("div",{className:Oe("animate-pulse rounded-md bg-primary/10",l),...a})}function At({children:l}){return e.jsx("div",{className:"widget-shell w-full min-w-[320px] h-full min-h-[600px] overflow-hidden flex flex-col bg-white relative rounded-t-[40px] md:rounded-t-[56px]",children:l})}function W(){return getComputedStyle(document.documentElement).getPropertyValue("--w-brand").trim()||"#2563eb"}const Pe=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0});function Et(l,a){const n=W(),r=a?"#1e293b":n,t=a?"#1e293b":n;return J.divIcon({className:"custom-price-marker",html:`<div style="
2      display: inline-block;
3      transform: translate(-50%, -100%);
4      font-family: 'Plus Jakarta Sans', sans-serif;
5    ">
6      <div style="
7        display: block;
8        width: max-content;
9        background: ${r};
10        color: white;
11        border: 2px solid ${t};
12        border-radius: 8px;
13        padding: 2px 8px;
14        font-size: 12px;
15        font-weight: 700;
16        line-height: 1.35;
17        white-space: nowrap;
18        text-align: center;
19        box-shadow: 0 2px 6px rgba(0,0,0,0.3);
20      ">${Pe.format(l)}</div>
21      <div style="
22        width: 0;
23        height: 0;
24        border-left: 6px solid transparent;
25        border-right: 6px solid transparent;
26        border-top: 6px solid ${r};
27        margin: -1px auto 0;
28      "></div>
29    </div>`,iconSize:[0,0],iconAnchor:[0,0],popupAnchor:[0,-30]})}function Rt({properties:l,distanceSearch:a}){const n=ce(),r=o.useRef("");return o.useEffect(()=>{if(a)return;const t=l.filter(u=>u.latitude!=null&&u.longitude!=null).map(u=>[Number(u.latitude),Number(u.longitude)]),i=t.map(u=>`${u[0]},${u[1]}`).join("|");if(i===r.current||t.length===0)return;r.current=i;const d=J.latLngBounds(t),j=()=>{n.invalidateSize(),n.fitBounds(d,{padding:[40,40],maxZoom:15})};j();const c=setTimeout(j,150);return()=>clearTimeout(c)},[l,a,n]),null}function Ft({distanceSearch:l}){const a=ce(),n=o.useRef(null);return o.useEffect(()=>{if(!l){n.current=null;return}const r=`${l.lat},${l.lon},${l.radius}`;if(r===n.current)return;n.current=r;
29const t=l.radius/69,i=Math.cos(l.lat*Math.PI/180),d=J.latLngBounds([l.lat-t,l.lon-t/i],[l.lat+t,l.lon+t/i]);a.fitBounds(d,{padding:[40,40]})},[l,a]),null}function zt({propertyId:l,properties:a}){const n=ce();return o.useEffect(()=>{if(!l)return;const r=a.find(t=>t.id===l);r&&r.latitude!=null&&r.longitude!=null&&n.flyTo([Number(r.latitude),Number(r.longitude)],14,{duration:.5})},[l,a,n]),null}function Ut({property:l,isHighlighted:a,onHover:n,onClick:r,distance:t,enablePopup:i}){return e.jsx(ke,{position:[Number(l.latitude),Number(l.longitude)],icon:Et(Number(l.price),a),zIndexOffset:a?1e3:0,eventHandlers:{mouseover:()=>n(l.id),mouseout:()=>n(null),...i?{}:{click:()=>r(l.id)}},children:i&&e.jsx(xt,{className:"property-map-popup",closeButton:!0,minWidth:240,maxWidth:240,autoPan:!0,autoPanPadding:[24,24],offset:[0,-28],children:e.jsxs("div",{className:"cursor-pointer bg-white rounded-xl overflow-hidden w-[240px]",onClick:()=>r(l.id),children:[l.primaryImageUrl&&e.jsx("img",{loading:"lazy",src:l.primaryImageUrl,alt:l.streetAddress,className:"w-full h-32 object-cover"}),e.jsxs("div",{className:"p-3",children:[e.jsxs("div",{className:"font-bold text-base",style:{color:W()},children:[Pe.format(Number(l.price)),e.jsx("span",{className:"text-xs font-normal text-slate-500",children:"/mo"})]}),e.jsx("div",{className:"font-semibold text-sm text-slate-800 mt-1 truncate",children:l.streetAddress}),e.jsxs("div",{className:"text-xs text-slate-500",children:[l.city,", ",l.state]}),e.jsxs("div",{className:"flex gap-3 mt-2 text-xs text-slate-500",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Q,{className:"h-3 w-3"})," ",l.beds," bd"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Z,{className:"h-3 w-3"})," ",l.baths," ba"]}),l.sqft&&e.jsxs("span",{children:[Number(l.sqft).toLocaleString()," sqft"]})]}),t!=null&&e.jsxs("div",{className:"text-xs font-medium mt-1.5",style:{color:W()},children:[t.toFixed(1)," mi away"]}),e.jsx("div",{className:"mt-2.5 text-center text-xs font-semibold text-white rounded-lg py-1.5",style:{background:W()},children:"View details"})]})]})})})}function be({properties:l,highlightedId:a,onHoverProperty:n,onClickProperty:r,distanceSearch:t,flyToId:i,distances:d,enablePopup:j=!0}){const c=o.useMemo(()=>l.filter(f=>f.latitude!=null&&f.longitude!=null),[l]),u=o.useMemo(()=>{if(t)return[t.lat,t.lon];if(c.length>0){const f=c.reduce((y,k)=>y+Number(k.latitude),0)/c.length,N=c.reduce((y,k)=>y+Number(k.longitude),0)/c.length;return[f,N]}return[30.27,-81.66]},[c,t]);return e.jsx("div",{className:"w-full h-full rounded-xl overflow-hidden border",children:e.jsxs(ot,{center:u,zoom:11,className:"w-full h-full",zoomControl:!0,attributionControl:!0,children:[e.jsx(ct,{attribution:"© Google Maps",url:"https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}",maxZoom:20}),e.jsx(Rt,{properties:c,distanceSearch:t}),e.jsx(Ft,{distanceSearch:t}),e.jsx(zt,{propertyId:i,properties:c}),t&&e.jsx(dt,{center:[t.lat,t.lon],radius:Je(t.radius),pathOptions:{color:W(),fillOpacity:.08,weight:2}}),t&&e.jsx(ke,{position:[t.lat,t.lon],icon:J.divIcon({className:"distance-center-marker",html:`<div style="
30                width: 12px; height: 12px;
31                background: #ef4444;
32                border: 2px solid white;
33                border-radius: 50%;
34                box-shadow: 0 2px 4px rgba(0,0,0,0.3);
35                transform: translate(-50%, -50%);
36              "></div>`,iconSize:[0,0]})}),c.map(f=>e.jsx(Ut,{property:f,isHighlighted:a===f.id,onHover:n,onClick:r,distance:d?.get(f.id),enablePopup:j},f.id))]})})}const Ot=[1,3,5,10,15,25];function Vt({value:l,onChange:a}){const[n,r]=o.useState(l?.label||""),[t,i]=o.useState(l?.radius?.toString()||"5"),[d,j]=o.useState(!1),[c,u]=o.useState(""),[f,N]=o.useState(!1);o.useEffect(()=>{l?(r(l.label),i(l.radius.toString())):(r(""),u(""))},[l]);const y=async()=>{if(!n.trim())return;j(!0),u("");const x=await et(n.trim());if(j(!1),!x){u("Location not found. Try a more specific address.");return}a({lat:x.lat,lon:x.lon,radius:parseInt(t),label:n.trim()})},k=()=>
36{if(!navigator.geolocation){u("Geolocation is not supported by your browser.");return}j(!0),u(""),navigator.geolocation.getCurrentPosition(x=>{j(!1),r("My Location"),a({lat:x.coords.latitude,lon:x.coords.longitude,radius:parseInt(t),label:"My Location"})},()=>{j(!1),u("Unable to get your location. Check browser permissions.")},{timeout:1e4})},$=()=>{r(""),u(""),a(null)},g=x=>{i(x),l&&a({...l,radius:parseInt(x)})},b=x=>{x.key==="Enter"&&(x.preventDefault(),y())};return e.jsxs("div",{className:"bg-white border rounded-lg p-3 space-y-2",children:[e.jsxs("button",{onClick:()=>N(!f),className:"flex items-center justify-between w-full text-xs font-medium text-slate-500 uppercase tracking-wide hover:text-slate-700 transition-colors","aria-expanded":!f,"aria-controls":"distance-search-body",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(F,{className:"h-3 w-3"}),"Distance from a location",l&&e.jsxs("span",{className:"normal-case text-slate-400",children:["(",l.radius," mi of ",l.label,")"]})]}),f?e.jsx(Ve,{className:"h-3.5 w-3.5"}):e.jsx(mt,{className:"h-3.5 w-3.5"})]}),!f&&e.jsxs("div",{id:"distance-search-body",className:"space-y-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(We,{placeholder:"Enter address, city, or zip...",className:"h-8 text-sm pr-8",value:n,onChange:x=>r(x.target.value),onKeyDown:b}),l&&e.jsx("button",{onClick:$,className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600","aria-label":"Clear distance search",children:e.jsx(V,{className:"h-3.5 w-3.5"})})]}),e.jsxs(Ne,{value:t,onValueChange:g,children:[e.jsx(oe,{className:"h-8 w-[90px] text-sm",children:e.jsx(ye,{})}),e.jsx(L,{children:Ot.map(x=>e.jsxs(h,{value:String(x),children:[x," mi"]},x))})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(re,{size:"sm",className:"h-7 text-xs bg-w-brand hover:bg-w-brand-hover text-w-brand-on flex-1",onClick:y,disabled:d||!n.trim(),children:[d?e.jsx(ht,{className:"h-3 w-3 animate-spin mr-1"}):null,"Search"]}),e.jsxs(re,{size:"sm",variant:"outline",className:"h-7 text-xs",onClick:k,disabled:d,children:[e.jsx(jt,{className:"h-3 w-3 mr-1"}),"My Location"]})]}),c&&e.jsx("p",{className:"text-xs text-red-500",children:c}),l&&!c&&e.jsxs("p",{className:"text-xs text-slate-500",children:["Showing properties within ",l.radius," mi of ",l.label]})]})]})}const Y=18,Me={city:"",propertyType:"",beds:"",baths:"",sortBy:"date_desc",search:"",minPrice:"",maxPrice:""};function Wt(l){const a=new URLSearchParams(l),n=a.get("page")??"1",r=/^[1-9]\d*$/.test(n)?Math.min(Number(n),1e4):1,t=a.get("sortBy"),i={...Me,city:a.get("city")??"",propertyType:a.get("propertyType")??"",beds:a.get("beds")??"",baths:a.get("baths")??"",sortBy:t==="price_asc"||t==="price_desc"?t:"date_desc",search:a.get("search")??"",minPrice:a.get("minPrice")??"",maxPrice:a.get("maxPrice")??""},d=Number(a.get("lat")),j=Number(a.get("lon")),c=Number(a.get("radius")),u=a.has("lat")&&a.has("lon")&&a.has("radius")&&Number.isFinite(d)&&Number.isFinite(j)&&Number.isFinite(c)&&Math.abs(d)<=90&&Math.abs(j)<=180&&c>0&&c<=500?{lat:d,lon:j,radius:c,label:a.get("place")??"Selected location"}:null;return{page:r,filters:i,distance:u}}function T(l,a,n){const r=new URLSearchParams;for(const i of Object.keys(a))a[i]&&a[i]!==Me[i]&&r.set(i,a[i]);n&&(r.set("lat",String(n.lat)),r.set("lon",String(n.lon)),r.set("radius",String(n.radius)),r.set("place",n.label)),l>1&&r.set("page",String(l));const t=r.toString();return`/listings${t?`?${t}`:""}`}function Kt(l,a){if(a<=7)return Array.from({length:a},(i,d)=>d+1);const n=[1];l>3&&n.push("ellipsis");const r=Math.max(2,l-1),t=Math.min(a-1,l+1);for(let i=r;i<=t;i++)n.push(i);return l<a-2&&n.push("ellipsis"),n.push(a),n}const je=[{value:"date_desc",label:"Newest"},{value:"price_asc",label:"Price: Low"},{value:"price_desc",label:"Price: High"}],ve=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}),Te=o.createContext({openId:null,setOpenId:()=>{}});function qt(){const[l,a]=o.useState(null);return{openId:l,setOpenId:a}}function B({id:l,value:a,onValueChange:n,placeholder:r,isActive:t,onClear:i,children:d,minWidth:j="auto",compact:c=!1}){const{openId:u,setOpenId:f}=o.useContext(Te),N=u===l,y=x=>{x.preventDefault(),x.stopPropagation(),x.nativeEvent.stopImmediatePropagation(),x.currentTarget.focu
36s(),f(N?null:l)},k=x=>{x||f(null)},$=x=>{n(x),f(null)},g=c?`h-auto py-1.5 px-3 w-full text-xs font-medium rounded-full border transition-all whitespace-nowrap focus:outline-none focus:ring-0 focus-visible:ring-0 ${t?"bg-slate-50 border-slate-400 text-slate-800 font-semibold":"bg-white border-slate-300 text-slate-600"}`:`h-auto py-3 px-4 w-auto text-sm font-medium rounded-xl border transition-all focus:outline-none focus:ring-0 focus-visible:ring-0 ${t?"bg-slate-50 border-[#1e2d41] text-[#1e2d41] font-semibold pr-8":"bg-white border-slate-300 text-slate-600 shadow-sm hover:border-slate-400 hover:bg-slate-50"}`,b=c?"":"absolute right-2 top-1/2 -translate-y-1/2 p-0.5 rounded-full text-slate-400 hover:text-slate-700 hover:bg-slate-100 transition-colors z-10";return e.jsxs("div",{className:`relative group ${c?"flex-1 min-w-0":""}`,children:[e.jsxs(Ne,{value:a,onValueChange:$,open:N,onOpenChange:k,children:[c?e.jsx(oe,{"data-filter-id":l,onPointerDown:y,className:g,style:{pointerEvents:"auto"},children:e.jsxs("span",{className:"flex items-center gap-1",children:[r,t&&e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-slate-500"})]})}):e.jsx(oe,{"data-filter-id":l,onPointerDown:y,className:g,style:{minWidth:j,pointerEvents:"auto"},children:e.jsx(ye,{placeholder:r})}),d]}),t&&!c&&e.jsx("button",{onClick:x=>{x.stopPropagation(),i()},className:b,"aria-label":`Clear ${r}`,children:e.jsx(V,{className:"h-3.5 w-3.5"})})]})}function Ht(){const[l,a]=o.useState("grid"),n=qe(),{page:r,filters:t,distance:i}=o.useMemo(()=>Wt(n),[n]),[d,j]=o.useState(""),c=o.useRef(null),u=o.useRef(null),{openId:f,setOpenId:N}=qt(),[y,k]=o.useState(null),[$,g]=o.useState(null),[b,x]=o.useState(null),[,v]=He();o.useEffect(()=>{j(t.search)},[t.search]),o.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]);const D=o.useMemo(()=>({city:t.city||void 0,propertyType:t.propertyType||void 0,beds:t.beds?parseInt(t.beds):void 0,baths:t.baths?parseInt(t.baths):void 0,sortBy:t.sortBy,search:t.search||void 0,status:"active",minPrice:t.minPrice?parseInt(t.minPrice):void 0,maxPrice:t.maxPrice?parseInt(t.maxPrice):void 0}),[t]),z=o.useMemo(()=>({...D,page:r,limit:Y}),[D,r]),{data:p,isLoading:M,isPlaceholderData:de}=pe(z,{query:{queryKey:ge(z),placeholderData:pt}}),$e=l==="map"||i!==null,xe=o.useMemo(()=>({...D,limit:0}),[D]),{data:ee}=pe(xe,{query:{enabled:$e,queryKey:ge(xe)}}),{data:K=[]}=it(),{data:me=[]}=nt(),_=ee?.listings??[],A=o.useMemo(()=>{if(!i||!_.length)return new globalThis.Map;const s=new globalThis.Map;for(const m of _)m.latitude!=null&&m.longitude!=null&&s.set(m.id,tt(i.lat,i.lon,Number(m.latitude),Number(m.longitude)));return s},[i,_]),C=o.useMemo(()=>_.length?i?_.filter(s=>{const m=A.get(s.id);return m!=null&&m<=i.radius}):_:[],[_,i,A]),Le=o.useMemo(()=>{if(i){const s=(r-1)*Y;return C.slice(s,s+Y)}return p?.listings??[]},[i,C,r,p]),I=i?C.length:p?.total??0,E=Math.max(1,Math.ceil(I/Y)),P=o.useCallback((s,m)=>{v(T(1,{...t,[s]:m==="all"?"":m},i))},[t,i,v]),q=o.useCallback(s=>{j(s),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{v(T(1,{...t,search:s},i))},350)},[t,i,v]),Se=o.useCallback(()=>{c.current&&clearTimeout(c.current),v(T(1,{...t,search:d},i))},[d,t,i,v]),te=o.useCallback(()=>{j(""),c.current&&clearTimeout(c.current),v("/listings")},[v]),Ie=o.useCallback(s=>{v(`/listing/${s}`)},[v]),he=o.useCallback(s=>{x(s),setTimeout(()=>x(null),600)},[]),Be=o.useCallback(s=>{v(T(1,t,s))},[t,v]);o.useEffect(()=>{!de&&(i===null||ee)&&I>0&&r>E&&v(T(E,t,i),{replace:!0})},[r,E,I,t,i,v,de,ee]);const ue=[t.city,t.propertyType,t.beds,t.baths,t.minPrice,t.maxPrice,t.search].filter(Boolean).length+(i?1:0);return e.jsxs(At,{children:[e.jsxs(Te.Provider,{value:{openId:f,setOpenId:N},children:[e.jsx("div",{className:"bg-white flex-shrink-0 relative",children:e.jsxs("div",{className:"container mx-auto px-3 md:px-4 pt-[39px] pb-3.5 md:pt-[47px] md:pb-4",children:[e.jsxs("div",{className:"hidden md:flex items-center gap-2.5",children:[e.jsxs("div",{className:"relative flex-[1.6] min-w-0",children:[e.jsx(se,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-[18px] w-[18px] text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Search neighborhood, city, zip, or address...",className:"w-full py-3 pl-12 pr-4 border border-slate-300 rounded-xl text-sm font-normal text-slate-900 bg-white outline-none shadow-sm transition-colors focus:border-w-brand focus:ring-2 focus:ring-w-brand/10 placeholder:text-slate-400",value:d,onChange:s=>q(s.target.value)}),d&&e.jsx("button",{onClick:()=>q(""),className:"absolute right-3 top-1/2 -translate-y-1/2 p-1 rounded-full text-slate-400 hover:text-slate-600 hover:bg-slate-100 transition-colors","aria-label":"Clear search",children:e.jsx(V,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-1 justify-end",children:[e.jsx(B,{id:"city",value:t.city||"all",onValueChange:s=>P("city",s),placeholder:"All Cities",isActive:!!t.city,onClear:()=>P("city","all"),minWidth:"110px",children:e.jsxs(L,{children:[e.jsx(h,{value:"all",children:"All Cities"}),K.map(s=>e.jsx(h,{value:s,children:s},s))]})}),e.jsx(B,{id:"type",value:t.propertyType||"all",onValueChange:s=>P("propertyType",s),placeholder:"All Types",isActive:!!t.propertyType,onClear:()=>P("propertyType","all"),minWidth:"105px",children:e.jsxs(L,{children:[e.jsx(h,{value:"all",children:"All Types"}),me.map(s=>e.jsx(h,{value:s,children:s},s))]})}),e.jsx(B,{id:"beds",value:t.beds||"all",onValueChange:s=>P("beds",s),placeholder:"Any Beds",isActive:!!t.beds,onClear:()=>P("beds","all"),minWidth:"100px",children:e.jsxs(L,{children:[e.jsx(h,{value:"all",children:"Any Beds"}),e.jsx(h,{value:"1",children:"1+ Beds"}),e.jsx(h,{value:"2",children:"2+ Beds"}),e.jsx(h,{value:"3",children:"3+ Beds"}),e.jsx(h,{value:"4",children:"4+ Beds"})]})}),e.jsx(B,{id:"price",value:t.minPrice||t.maxPrice?`${t.minPrice||"0"}-${t.maxPrice||"max"}`:"all",onValueChange:s=>{let m;if(s==="all")m={...t,minPrice:"",maxPrice:""};else{const[w,R]=s.split("-");m={...t,minPrice:w==="0"?"":w,maxPrice:R==="max"?"":R}}v(T(1,m,i))},placeholder:t.minPrice||t.maxPrice?`${t.minPrice?`$${Number(t.minPrice).toLocaleStr
36ing()}`:"$0"} – ${t.maxPrice?`$${Number(t.maxPrice).toLocaleString()}`:"No Max"}`:"$0 – No Max",isActive:!!(t.minPrice||t.maxPrice),onClear:()=>v(T(1,{...t,minPrice:"",maxPrice:""},i)),minWidth:"130px",children:e.jsxs(L,{children:[e.jsx(h,{value:"all",children:"$0 – No Max"}),e.jsx(h,{value:"0-1000",children:"$0 – $1,000"}),e.jsx(h,{value:"0-1500",children:"$0 – $1,500"}),e.jsx(h,{value:"0-2000",children:"$0 – $2,000"}),e.jsx(h,{value:"1000-2000",children:"$1,000 – $2,000"}),e.jsx(h,{value:"1500-2500",children:"$1,500 – $2,500"}),e.jsx(h,{value:"2000-3000",children:"$2,000 – $3,000"})]})}),e.jsxs("button",{onClick:Se,className:"flex items-center gap-2 px-6 py-3 bg-w-brand hover:bg-w-brand-dark text-white text-[15px] font-bold rounded-xl transition-colors whitespace-nowrap",children:[e.jsx(se,{className:"h-4 w-4"}),"Search"]})]})]}),e.jsxs("div",{className:"md:hidden flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1 min-w-0",children:[e.jsx(se,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Search city, zip, address...",className:"w-full py-2 pl-9 pr-8 border border-slate-200 rounded-lg text-[13px] font-normal text-slate-900 bg-white outline-none transition-colors focus:border-w-brand placeholder:text-slate-400",value:d,onChange:s=>q(s.target.value)}),d&&e.jsx("button",{onClick:()=>q(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-0.5 rounded-full text-slate-400 hover:text-slate-600","aria-label":"Clear search",children:e.jsx(V,{className:"h-3.5 w-3.5"})})]}),l==="map"?e.jsxs("button",{onClick:()=>a("grid"),className:"flex items-center gap-1 px-2.5 py-2 rounded-lg border border-slate-900 bg-slate-900 text-white text-[13px] leading-5 font-medium transition-colors flex-shrink-0",children:[e.jsx(ae,{className:"h-3.5 w-3.5"}),"List"]}):e.jsxs("button",{onClick:()=>a("map"),className:"flex items-center gap-1 px-2.5 py-2 rounded-lg border border-slate-200 bg-white text-slate-500 text-[13px] leading-5 font-medium transition-colors flex-shrink-0",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),"Map"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(B,{id:"m-city",value:t.city||"all",onValueChange:s=>P("city",s),placeholder:"City",isActive:!!t.city,onClear:()=>P("city","all"),compact:!0,children:e.jsxs(L,{children:[e.jsx(h,{value:"all",children:"City"}),K.map(s=>e.jsx(h,{value:s,children:s},s))]})}),e.jsx(B,{id:"m-type",value:t.propertyType||"all",onValueChange:s=>P("propertyType",s),placeholder:"Type",isActive:!!t.propertyType,onClear:()=>P("propertyType","all"),compact:!0,children:e.jsxs(L,{children:[e.jsx(h,{value:"all",children:"Type"}),me.map(s=>e.jsx(h,{value:s,children:s},s))]})}),e.jsx(B,{id:"m-beds",value:t.beds||"all",onValueChange:s=>P("beds",s),placeholder:"Beds",isActive:!!t.beds,onClear:()=>P("beds","all"),compact:!0,children:e.jsxs(L,{children:[e.jsx(h,{value:"all",children:"Beds"}),e.jsx(h,{value:"1",children:"1+"}),e.jsx(h,{value:"2",children:"2+"}),e.jsx(h,{value:"3",children:"3+"}),e.jsx(h,{value:"4",children:"4+"})]})}),e.jsx(B,{id:"m-price",value:t.minPrice||t.maxPrice?`${t.minPrice||"0"}-${t.maxPrice||"max"}`:"all",onValueChange:s=>{let m;if(s==="all")m={...t,minPrice:"",maxPrice:""};else{const[w,R]=s.split("-");m={...t,minPrice:w==="0"?"":w,maxPrice:R==="max"?"":R}}v(T(1,m,i))},placeholder:"Price",isActive:!!(t.minPrice||t.maxPrice),onClear:()=>v(T(1,{...t,minPrice:"",maxPrice:""},i)),compact:!0,children:e.jsxs(L,{children:[e.jsx(h,{value:"all",children:"Price"}),e.jsx(h,{value:"0-1000",children:"Up to $1K"}),e.jsx(h,{value:"0-1500",children:"Up to $1.5K"}),e.jsx(h,{value:"0-2000",children:"Up to $2K"}),e.jsx(h,{value:"1000-2000",children:"$1K – $2K"}),e.jsx(h,{value:"1500-2500",children:"$1.5K – $2.5K"}),e.jsx(h,{value:"2000-3000",children:"$2K – $3K"})]})}),ue>0&&e.jsx("button",{onClick:te,className:"flex items-center justify-center w-7 h-7 rounded-full text-slate-400 hover:text-red-500 hover:bg-red-50 transition-colors flex-shrink-0","aria-label":"Clear all filters",children:e.jsx(V,{className:"h-3.5 w-3.5"})})]}),e.jsxs("div",{className:"flex items-center justify-between pt-1.5 pb-1 -mx-3 px-3 -mb-2.5 border-t border-slate-200 bg-white",children:[e.jsxs("span",{className:"text-[12px] text-slate-500",children:[e.jsx("strong",{className:"text-slate-800 font-semibold",children:I})," homes",t.city?` in ${t.city}`:""]}),e.jsx("select",{value:t.sortBy,onChange:s=>P("sortBy",s.target.value),className:"text-[12px] text-slate-500 font-medium bg-transparent outline-none cursor-pointer border-none p-0",children:je.map(s=>e.jsx("option",{value:s.value,children:s.label},s.value))})]})]})]})}),e.jsx("div",{className:"hidden md:block bg-white flex-shrink-0",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"flex justify-between items-center py-2.5",children:[e.jsxs("div",{className:"text-[14px] text-slate-500",children:[e.jsxs("strong",{className:"text-[#1e2d41] font-bold text-[15px]",children:[I," homes"]})," ","available",t.city?` in ${t.city}`:K.length>0?` in ${K.slice(0,3).join(" & ")}`:"",t.search?` matching "${t.search}"`:""]}),e.jsxs("div",{className:"flex items-center gap-3",children:[l==="map"&&e.jsxs("button",{onClick:()=>a("grid"),className:"flex items-center gap-1 text-sm text-slate-500 hover:text-slate-700 transition-colors",children:[e.jsx(ae,{className:"h-3.5 w-3.5"}),"Back to list"]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsxs("button",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg border text-[13px] font-medium transition-all shadow-sm ${l==="grid"?"bg-[#1e2d41] text-white border-[#1e2d41]":"bg-white text-slate-600 border-slate-300 hover:border-slate-400 hover:text-slate-700"}`,onClick:()=>a("grid"),"aria-pressed":l==="grid",children:[e.jsx(ft,{className:"h-3.5 w-3.5"}),"Grid"]}),e.jsxs("button",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg border text-[13px] font-medium transition-all shadow-sm ${l==="map"?"bg-[#1e2d41] text-white border-[#1e2d41]":"bg-white text-slate-600 border-slate-300 hover:border-slate-400 hover:text-slate-700"}`,onClick:()=>a("map"),"aria-pressed":l==="map",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),"Map"]})]}),e.jsx("span",{className:"text-sm text-slate-500",children:"Sort by:"}),e.jsx("select",{value:t.sortBy,onChange:s=>P("sortBy",s.target.value),className:"px-3 py-1.5 border border-slate-300 rounded-lg text-sm text-slate-700 bg-white font-medium outline-none cursor-pointer shadow-sm",children:je.map(s=>e.jsx("option",{value:s.value,children:s.label},s.value))}),ue>0&&e.jsxs("button",{onClick:te,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-slate-500 hover:text-slate-700 hover:bg-slate-100 rounded-lg border border-slate-300 transition-colors","aria-label":"Reset all filters",children:[e.jsx(ut,{className:"h-3.5 w-3.5"}),"Reset"]})]})]})})})]}),e.jsxs("div",{ref:u,className:"flex-1 overflow-y-auto min-h-0 no-scrollbar",children:[e.jsx("div",{className:`container mx-auto px-3 md:px-4 py-3 ${l==="map"?"h-full overflow-hidden":"min-h-full"}`,children:M?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[1,2,3,4,5,6].map(s=>e.jsxs("div",{className:"flex flex-col space-y-3",children:[e.jsx(le,{className:"h-[250px] w-full rounded-xl"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(le,{className:"h-4 w-[250px]"}),e.jsx(le,{className:"h-4 w-[200px]"})]})]},s))}):I===0&&!i?e.jsxs("div",{className:"text-center py-20",children:[e.jsx("h3",{className:"text-xl font-semibold text-slate-800 mb-2",children:"No properties found"}),e.jsx("p",{className:"text-slate-500",children:"Try adjusting your filters to 
36see more results."}),e.jsx(re,{variant:"outline",className:"mt-6",onClick:te,children:"Clear all filters"})]}):l==="grid"?e.jsxs("div",{children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Le.map(s=>e.jsx(Dt,{property:s,distance:A.get(s.id)},s.id))}),I>0&&e.jsxs("div",{className:"flex flex-col items-center py-8 gap-4",children:[E>1&&e.jsxs("nav",{className:"flex items-center gap-1.5","aria-label":"Pagination",children:[r>1?e.jsx(S,{href:T(r-1,t,i),onClick:()=>u.current?.scrollTo({top:0,behavior:"smooth"}),"aria-label":"Previous page",className:"flex items-center justify-center h-10 w-10 rounded-xl border border-slate-200 text-slate-600 hover:bg-slate-50 transition-colors",children:e.jsx(ie,{className:"h-4 w-4"})}):e.jsx("span",{"aria-hidden":"true",className:"flex items-center justify-center h-10 w-10 rounded-xl border border-slate-200 text-slate-400 opacity-40",children:e.jsx(ie,{className:"h-4 w-4"})}),Kt(r,E).map((s,m)=>s==="ellipsis"?e.jsx("span",{className:"flex items-center justify-center h-10 w-10 text-slate-400 text-sm select-none",children:"…"},`ellipsis-${m}`):e.jsx(S,{href:T(s,t,i),onClick:()=>u.current?.scrollTo({top:0,behavior:"smooth"}),"aria-current":s===r?"page":void 0,className:`flex items-center justify-center h-10 min-w-10 px-3 rounded-xl text-sm font-semibold transition-colors ${s===r?"bg-w-brand text-white":"border border-slate-200 text-slate-600 hover:bg-slate-50"}`,children:s},s)),r<E?e.jsx(S,{href:T(r+1,t,i),onClick:()=>u.current?.scrollTo({top:0,behavior:"smooth"}),"aria-label":"Next page",className:"flex items-center justify-center h-10 w-10 rounded-xl border border-slate-200 text-slate-600 hover:bg-slate-50 transition-colors",children:e.jsx(ne,{className:"h-4 w-4"})}):e.jsx("span",{"aria-hidden":"true",className:"flex items-center justify-center h-10 w-10 rounded-xl border border-slate-200 text-slate-400 opacity-40",children:e.jsx(ne,{className:"h-4 w-4"})})]}),e.jsxs("p",{className:"text-xs text-slate-400",children:["Page ",e.jsx("strong",{className:"text-slate-600",children:r})," of"," ",e.jsx("strong",{className:"text-slate-600",children:E}),e.jsx("span",{className:"mx-1.5",children:"·"}),e.jsx("strong",{className:"text-slate-600",children:I})," listings"]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden md:flex gap-4 h-full",style:{minHeight:0},children:[e.jsxs("div",{className:"w-[340px] flex-shrink-0 flex flex-col gap-3 min-h-0",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(Vt,{value:i,onChange:Be})}),e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto pr-1 no-scrollbar flex flex-col gap-3",children:C.length===0&&i?e.jsxs("div",{className:"text-center py-8",children:[e.jsx(F,{className:"h-8 w-8 mx-auto mb-2 text-slate-300"}),e.jsxs("p",{className:"text-sm text-slate-500",children:["No properties within ",i.radius," mi"]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Try increasing the radius"})]}):C.map(s=>{const m=A.get(s.id);return e.jsxs("div",{role:"button",tabIndex:0,"aria-label":`View ${s.streetAddress} on map`,onMouseEnter:()=>g(s.id),onMouseLeave:()=>g(null),onClick:()=>he(s.id),onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),he(s.id))},className:`flex gap-3 bg-white rounded-xl border p-3 cursor-pointer transition-all ${$===s.id?"shadow-md ring-2 ring-w-brand/30":"hover:shadow-md"}`,children:[e.jsx("div",{className:"w-24 h-20 rounded-lg overflow-hidden bg-slate-100 flex-shrink-0",children:s.primaryImageUrl?e.jsx("img",{loading:"lazy",src:s.primaryImageUrl,alt:s.streetAddress,className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-slate-300",children:e.jsx(F,{className:"h-5 w-5"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"font-bold text-base text-slate-900",children:[ve.format(s.price),e.jsx("span",{className:"text-xs text-slate-500 font-normal",children:"/mo"})]}),m!=null&&e.jsxs("span",{className:"text-xs font-medium text-slate-500 bg-slate-100 px-1.5 py-0.5 rounded flex-shrink-0",children:[m.toFixed(1)," mi"]})]}),e.jsx("div",{className:"font-semibold text-sm text-slate-800 truncate",children:s.streetAddress}),e.jsxs("div",{className:"text-xs text-slate-500",children:[s.city,", ",s.state]}),e.jsxs("div",{className:"flex gap-2 mt-1 text-xs text-slate-500",children:[e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(Q,{className:"h-3 w-3"})," ",s.beds]}),e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(Z,{className:"h-3 w-3"})," ",s.baths]}),s.sqft&&e.jsxs("span",{children:[s.sqft," sqft"]})]}),e.jsx(S,{href:`/listing/${s.id}`,className:"text-xs text-w-brand hover:underline mt-1 inline-block",onClick:w=>w.stopPropagation(),children:"View details"})]})]},s.id)})})]}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(be,{properties:C,highlightedId:$,onHoverProperty:g,onClickProperty:Ie,distanceSearch:i,flyToId:b,distances:A})})]}),e.jsx("div",{className:"md:hidden flex flex-col h-full",style:{minHeight:0},children:e.jsxs("div",{className:"flex-1 min-h-0 relative",children:[e.jsx(be,{properties:C,highlightedId:y!==null?C[y]?.id??null:null,onHoverProperty:s=>{if(s!==null){const m=C.findIndex(w=>w.id===s);m>=0&&k(m)}},onClickProperty:s=>{const m=C.findIndex(w=>w.id===s);m>=0&&k(m)},distanceSearch:i,flyToId:b,distances:A,enablePopup:!1}),e.jsxs("button",{onClick:()=>a("grid"),className:"absolute top-3 left-3 z-[500] flex items-center gap-1.5 px-3.5 py-2.5 bg-white rounded-xl shadow-lg text-[13px] font-semibold text-slate-800 border border-slate-200 active:scale-95 transition-transform",children:[e.jsx(ae,{className:"h-4 w-4"}),"Back to listings"]}),e.jsxs("div",{className:"absolute top-3 right-3 z-[500] bg-white rounded-lg shadow-md px-2.5 py-1.5 text-xs font-medium text-slate-600 border border-slate-200",children:[C.length," ",C.length===1?"home":"homes"]}),C.length>0&&e.jsx("div",{className:"absolute bottom-3 left-0 right-0 z-[500]",children:e.jsx("div",{className:"flex overflow-x-auto snap-x snap-mandatory scrollbar-none gap-3 px-4",style:{scrollbarWidth:"none"},onScroll:s=>{const m=s.currentTarget,w=m.firstElementChild?.getBoundingClientRect().width??0;if(w>0){const R=Math.round(m.scrollLeft/(w+12));k(R)}},children:C.map(s=>{const m=A.get(s.id);return e.jsxs(S,{href:`/listing/${s.id}`,className:"flex-shrink-0 snap-center flex gap-3 bg-white rounded-2xl shadow-lg border border-slate-100 p-3 w-[c
36alc(100vw-48px)]",children:[e.jsx("div",{className:"w-20 h-20 rounded-xl overflow-hidden bg-slate-100 flex-shrink-0",children:s.primaryImageUrl?e.jsx("img",{loading:"lazy",src:s.primaryImageUrl,alt:s.streetAddress,className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-slate-300",children:e.jsx(F,{className:"h-4 w-4"})})}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[e.jsxs("div",{className:"font-bold text-base text-slate-900",children:[ve.format(s.price),e.jsx("span",{className:"text-xs text-slate-500 font-normal",children:"/mo"})]}),e.jsx("div",{className:"font-semibold text-sm text-slate-800 truncate",children:s.streetAddress}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5 text-xs text-slate-500",children:[e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(Q,{className:"h-3 w-3"})," ",s.beds]}),e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(Z,{className:"h-3 w-3"})," ",s.baths]}),s.sqft&&e.jsxs("span",{children:[Number(s.sqft).toLocaleString()," sf"]}),m!=null&&e.jsxs("span",{className:"text-w-brand font-medium",children:[m.toFixed(1)," mi"]})]})]})]},s.id)})})})]})})]})}),l==="grid"&&e.jsx(Ke,{})]})]})}function ks(){return e.jsxs(e.Fragment,{children:[e.jsx(Lt,{}),e.jsx("div",{id:"listings-widget",style:{position:"sticky",top:0,height:"100dvh",display:"flex",flexDirection:"column",zIndex:60,marginTop:`-${Ce}px`},children:e.jsx(Ht,{})})]})}export{ks as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.