1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1390],{1001:(e,t,r)=>{r.d(t,{$:()=>rr,$V:()=>e1,$y:()=>eq,A5:()=>e0,AZ:()=>ec,Av:()=>rQ,B2:()=>th,C7:()=>tp,Cg:()=>eh,Cz:()=>E,Et:()=>eG,Ev:()=>e4,FX:()=>rY,Fg:()=>e5,Fl:()=>ln,GI:()=>rj,Gm:()=>tC,H3:()=>tw,IE:()=>tE,JB:()=>tQ,Jh:()=>rq,KJ:()=>rS,L3:()=>rv,LT:()=>N,Lq:()=>tv,Mp:()=>eE,NG:()=>tU,NJ:()=>k,Nt:()=>li,Or:()=>t_,PC:()=>em,PM:()=>t3,Pt:()=>tn,QN:()=>eR,Qc:()=>tq,Ql:()=>ei,R8:()=>r4,RO:()=>ed,Rl:()=>I,Rm:()=>tu,S8:()=>t5,UJ:()=>M,Un:()=>rZ,Uy:()=>t2,V4:()=>rJ,W1:()=>eW,XF:()=>r2,Y1:()=>ti,Yz:()=>eB,ZF:()=>rB,ZQ:()=>rG,ZW:()=>ex,Zd:()=>r6,b:()=>tP,b6:()=>rx,dK:()=>C,dT:()=>ez,g$:()=>rF,gR:()=>ts,gV:()=>tx,hC:()=>eM,hg:()=>rK,i:()=>eI,i7:()=>r5,iB:()=>P,iG:()=>r1,iP:()=>tz,iW:()=>tm,j9:()=>r7,jx:()=>tK,kW:()=>Z,kv:()=>tY,ls:()=>ty,nn:()=>rT,pW:()=>r0,p_:()=>rA,qd:()=>S,r0:()=>r3,s7:()=>ru,sM:()=>eD,sj:()=>lr,sl:()=>tF,tE:()=>tN,u0:()=>tZ,um:()=>rO,vU:()=>lt,xs:()=>tG,yC:()=>A,yG:()=>rz,z5:()=>rN});var l=r(3524),a=r(2490),n=r(2253),s=r(4707),i=r(3301),o=r(4002),d=r(1019),c=r(6475),u=r(9914),m=r(6065),x=r(9310),h=r(8234),p=r(7306),g=r(9988);function f(e,t=[]){let r=[],l=t.filter(e=>Number.isFinite(e.every)&&e.every>=1);return e.forEach((e,t)=>{r.push({kind:"unit",id:e,index:t});let a=t+1;l.forEach((e,t)=>{a%e.every==0&&r.push({kind:"ad",ad:e,key:`ad-${e.id??t}-${a}`})})}),r}function b({unitId:e,index:t,renderItem:r,fallbackItem:l}){let{item:s}=(0,n.pT)("id",String(e),{fallbackData:l}),{isAdmin:o}=(0,i.YQ)();return s?o?(0,c.jsx)(a.px,{item:s,children:(0,c.jsxs)("div",{className:"relative h-full [&>*:first-child]:h-full",children:[r(s,t),(0,c.jsx)(i.RI,{mode:"card",unit:s})]})}):(0,c.jsx)(a.px,{item:s,children:r(s,t)}):(0,c.jsxs)("div",{role:"presentation",className:"animate-pulse overflow-hidden rounded-lg border border-gray-200 bg-white",children:[(0,c.jsx)("div",{className:"aspect-[4/3] bg-gray-200"}),(0,c.jsxs)("div",{className:"p-4",children:[(0,c.jsx)("div",{className:"mb-1 h-5 w-16 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-4 w-3/4 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"mt-1 h-3 w-1/2 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"mt-3 grid grid-cols-4 gap-1",children:Array.from({length:4}).map((e,t)=>(0,c.jsx)("div",{className:"h-8 rounded bg-gray-200"},t))}),(0,c.jsx)("div",{className:"mt-3 h-6 w-2/5 rounded bg-gray-200"}),(0,c.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[(0,c.jsx)("div",{className:"h-9 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-9 rounded bg-gray-200"})]})]})]})}function y({ad:e}){return(0,c.jsx)(c.Fragment,{children:e.render()})}function v({columns:e,gap:t}){let r=["grid-cols-1",e.sm?w.sm[e.sm]:"sm:grid-cols-1",e.md?w.md[e.md]:"md:grid-cols-2",e.lg?w.lg[e.lg]:"lg:grid-cols-3",e.xl?w.xl[e.xl]:"xl:grid-cols-3"].join(" ");return(0,c.jsx)("div",{className:`grid ${r} gap-${t}`,children:Array.from({length:12}).map((e,t)=>(0,c.jsxs)("div",{role:"presentation",className:"animate-pulse overflow-hidden rounded-lg border border-gray-200 bg-white",children:[(0,c.jsx)("div",{className:"aspect-[4/3] bg-gray-200"}),(0,c.jsxs)("div",{className:"p-4",children:[(0,c.jsx)("div",{className:"mb-1 h-5 w-16 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-4 w-3/4 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"mt-1 h-3 w-1/2 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"mt-3 grid grid-cols-4 gap-1",children:Array.from({length:4}).map((e,t)=>(0,c.jsx)("div",{className:"h-8 rounded bg-gray-200"},t))}),(0,c.jsx)("div",{className:"mt-3 h-6 w-2/5 rounded bg-gray-200"}),(0,c.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[(0,c.jsx)("div",{className:"h-9 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-9 rounded bg-gray-200"})]})]})]},t))})}function j(){return(0,c.jsx)("div",{className:"py-12 text-center text-gray-500",children:"No inventory found matching your filters."})}var w={sm:{1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4"},xl:{1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4"}};function N({unitIds:e,pagination:t,isLoading:r,layout:l="grid",columns:a={sm:1,md:2,lg:3,xl:3},gap:n=6,renderItem:s,renderNoResults:i,renderLoading:o,ads:u=[],initialUnits:m}){let x=(0,d.useMemo)(()=>new Map((m??[]).map(e=>[e.id,e])),[m]);if(r&&0===e.length)return o?(0,c.jsx)(c.Fragment,{children:o()}
1):(0,c.jsx)(v,{columns:a,gap:n});if(!e.length)return i?(0,c.jsx)(c.Fragment,{children:i()}):(0,c.jsx)(j,{});if("list"===l)return(0,c.jsx)("div",{className:`flex flex-col gap-${n}`,children:f(e,u).map(e=>"unit"===e.kind?(0,c.jsx)(b,{unitId:e.id,index:e.index,renderItem:s,fallbackItem:x.get(e.id)},e.id):(0,c.jsx)(y,{ad:e.ad},e.key))});let h=["grid-cols-1",a.sm?w.sm[a.sm]:"sm:grid-cols-1",a.md?w.md[a.md]:"md:grid-cols-2",a.lg?w.lg[a.lg]:"lg:grid-cols-3",a.xl?w.xl[a.xl]:"xl:grid-cols-3"].join(" ");return(0,c.jsx)("div",{className:`grid ${h} gap-${n}`,children:f(e,u).map(e=>"unit"===e.kind?(0,c.jsx)(b,{unitId:e.id,index:e.index,renderItem:s,fallbackItem:x.get(e.id)},e.id):(0,c.jsx)(y,{ad:e.ad},e.key))})}function k({pagination:e,format:t="Showing {start}-{end} of {total} results",className:r}){if(!e)return(0,c.jsx)("span",{className:`text-sm text-gray-400 ${r??""}`,children:"Showing 0-0 of 0 results"});let l=(e.current_page-1)*e.per_page+1,a=Math.min(l+e.per_page-1,e.total),n=t.replace("{start}",l.toLocaleString()).replace("{end}",a.toLocaleString()).replace("{total}",e.total.toLocaleString());return(0,c.jsx)("span",{className:`text-sm font-medium text-gray-600 ${r??""}`,children:n})}function C({pagination:e,onPageChange:t,variant:r="numbered",hrefForPage:l}){let{current_page:a,last_page:n}=e;if(n<=1)return null;let s=(e,r,a,n={})=>{let{rel:s,ariaLabel:i,ariaCurrent:o,key:d}=n;return l?(0,c.jsx)("a",{href:l(e),rel:s,onClick:r=>{r.metaKey||r.ctrlKey||r.shiftKey||r.altKey||(r.preventDefault(),t(e))},className:r,"aria-label":i,"aria-current":o?"page":void 0,children:a},d):(0,c.jsx)("button",{onClick:()=>t(e),className:r,"aria-label":i,"aria-current":o?"page":void 0,children:a},d)};if("prev-next"===r){let e="rounded border px-4 py-2.5 text-base sm:px-3 sm:py-1 sm:text-sm disabled:opacity-50";return(0,c.jsxs)("nav",{className:"flex items-center justify-center gap-2","aria-label":"Pagination",children:[a>1?s(a-1,e,"Previous",{rel:"prev"}):(0,c.jsx)("button",{disabled:!0,className:e,children:"Previous"}),(0,c.jsxs)("span",{className:"text-base sm:text-sm text-gray-600",children:["Page ",a," of ",n]}),a<n?s(a+1,e,"Next",{rel:"next"}):(0,c.jsx)("button",{disabled:!0,className:e,children:"Next"})]})}let i=function(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t+1);let r=[1];e>3&&r.push("...");let l=Math.max(2,e-1),a=Math.min(t-1,e+1);for(let e=l;e<=a;e++)r.push(e);return e<t-2&&r.push("..."),r.push(t),r}(a,n),o="rounded border px-3 py-2.5 text-base sm:px-2 sm:py-1 sm:text-sm disabled:opacity-50";return(0,c.jsxs)("nav",{className:"flex items-center justify-center gap-2 sm:gap-1","aria-label":"Pagination",children:[a>1?s(a-1,o,"\xab",{rel:"prev",ariaLabel:"Previous page"}):(0,c.jsx)("button",{disabled:!0,className:o,"aria-label":"Previous page",children:"\xab"}),i.map((e,t)=>"..."===e?(0,c.jsx)("span",{className:"px-2 text-gray-400",children:"..."},`ellipsis-${t}`):s(e,`rounded border min-w-[44px] min-h-[44px] sm:min-w-0 sm:min-h-0 px-3 py-2.5 text-base sm:px-3 sm:py-1 sm:text-sm ${e===a?"bg-dealer-primary text-white border-dealer-primary":"hover:bg-gray-100"}`,e,{key:e,ariaCurrent:e===a})),a<n?s(a+1,o,"\xbb",{rel:"next",ariaLabel:"Next page"}):(0,c.jsx)("button",{disabled:!0,className:o,"aria-label":"Next page",children:"\xbb"})]})}function $(e){return`${e.key}:${e.direction}`}function L({open:e,onClose:t,options:r,value:l,onChange:a}){return((0,d.useEffect)(()=>{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),e)?(0,u.createPortal)((0,c.jsxs)("div",{className:"fixed inset-0 z-[9998] lg:hidden",children:[(0,c.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),(0,c.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 flex flex-col rounded-t-2xl bg-white shadow-2xl animate-in slide-in-from-bottom",children:[(0,c.jsxs)("div",{className:"flex-none border-b border-gray-100 px-5 pb-3 pt-3",children:[(0,c.jsx)("div",{className:"mx-auto mb-3 h-1 w-10 rounded-full bg-gray-300"}),(0,c.jsxs)("div",{className:"flex items-center justify-between",children:[(0,c.jsx)("h2",{className:"text-lg font-bold text-gray-900",children:"Sort By"}),(0,c.jsx)("button",{type:"button",onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 text-gray-500 hover:bg-gray-200","aria-label":"Close sort",children:(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),(0,c.jsx)("div",{className:"px-3 py-3",children:[{label:"Recommended",val:""},...r.map(e=>({label:e.label,val:$(e)}))].map(({label:e,val:r})=>{let n=r===l;return(0,c.jsxs)("button",{type:"button",onClick:()=>{a(r),t()},className:`flex w-full items-center gap-3 rounded-xl px-4 py-3.5 text-left text-sm font-medium transition-colors ${n?"bg-dealer-primary/10 text-dealer-primary":"text-gray-700 active:bg-gray-50"}`,children:[(0,c.jsx)("span",{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-full border-2 transition-colors ${n?"border-dealer-primary bg-dealer-primary":"border-gray-300"}
1`,children:n&&(0,c.jsx)("svg",{className:"h-3 w-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),e]},r||"__recommended")})})]})]}),document.body):null}function M({options:e,value:t,onChange:r,className:l,drawerOpen:a,onDrawerOpenChange:n}){let[s,i]=(0,d.useState)(!1),o=void 0!==a,u=(0,d.useCallback)(e=>{o?n?.(e):i(e)},[o,n]),m=e.find(e=>$(e)===t)?.label??"Recommended";return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:`relative hidden lg:block ${l??""}`,children:[(0,c.jsx)("svg",{className:"pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12"})}),(0,c.jsxs)("select",{value:t,onChange:e=>r(e.target.value),className:"w-full appearance-none rounded-lg border border-gray-200 bg-white py-2 pl-8 pr-8 text-sm font-medium text-gray-700 shadow-sm transition-colors hover:border-gray-300 focus:border-dealer-primary focus:outline-none focus:ring-1 focus:ring-dealer-primary","aria-label":"Sort by",children:[(0,c.jsx)("option",{value:"",children:"Sort By"}),e.map(e=>{let t=$(e);return(0,c.jsx)("option",{value:t,children:e.label},t)})]}),(0,c.jsx)("svg",{className:"pointer-events-none absolute right-2 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),(0,c.jsxs)("button",{type:"button",onClick:()=>u(!0),className:`relative flex w-full items-center rounded-lg border border-gray-200 bg-white py-2 pl-8 pr-8 text-sm font-medium text-gray-700 shadow-sm transition-colors active:bg-gray-50 lg:hidden ${l??""}`,"aria-label":`Sort by: ${m}`,children:[(0,c.jsx)("svg",{className:"pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12"})}),(0,c.jsx)("span",{className:"truncate",children:m}),(0,c.jsx)("svg",{className:"pointer-events-none absolute right-2 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),(0,c.jsx)(L,{open:o?a:s,onClose:()=>u(!1),options:e,value:t,onChange:r})]})}function S({options:e,value:t,onChange:r}){return(0,c.jsxs)("div",{className:"relative",children:[(0,c.jsx)("svg",{className:"pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})}),(0,c.jsx)("select",{value:t,onChange:e=>r(Number(e.target.value)),className:"appearance-none rounded-lg border border-gray-200 bg-white py-2 pl-8 pr-8 text-sm font-medium text-gray-700 shadow-sm transition-colors hover:border-gray-300 focus:border-dealer-primary focus:outline-none focus:ring-1 focus:ring-dealer-primary","aria-label":"Results per page",children:e.map(e=>(0,c.jsxs)("option",{value:e,children:[e," per page"]},e))}),(0,c.jsx)("svg",{className:"pointer-events-none absolute right-2 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}var _=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0});function z(e,t){return"currency"===t?_.format(e):"lbs"===t?`${e.toLocaleString()} lbs`:"feet"===t?`${e.toLocaleString()} ft`:"number"===t?e.toLocaleString():String(e)}function W({min:e,max:t,valueLow:r,valueHigh:l,step:a,format:n,label:s,onDrag:i,onChange:o}){let u=e===t,[m,x]=(0,d.useState)(r),[h,p]=(0,d.useState)(l),g=(0,d.useRef)(!1);(0,d.useEffect)(()=>{g.current||x(r)},[r]),(0,d.useEffect)(()=>{g.current||p(l)},[l]);let f=t-e||1,b=(m-e)/f*100,y=(h-e)/f*100,v=()=>{g.current&&(g.current=!1,o(m,h))};return(0,c.jsxs)("div",{children:[(0,c.jsx)("style",{children:` 2 .kessel-range-thumb::-webkit-slider-thumb { 3 -webkit-appearance: none; 4 pointer-events: auto; 5 height: 1.25rem; 6 width: 1.25rem; 7 border-radius: 9999px; 8 background: white; 9 border: 2px solid var(--color-dealer-primary, #3b82f6); 10 box-shadow: 0 1px 3px rgba(0,0,0,0.15); 11 cursor: pointer; 12 position: relative; 13 z-index: 1; 14 } 15 .kessel-range-thumb::-webkit-slider-thumb:hover { 16 transform: scale(1.1); 17 } 18 .kessel-range-thumb::-moz-range-thumb { 19 pointer-events: auto; 20 height: 1.25rem; 21 width: 1.25rem; 22 border-radius: 9999px; 23 background: white; 24 border: 2px solid var(--color-dealer-primary, #3b82f6); 25 box-shadow: 0 1px 3px rgba(0,0,0,0.15); 26 cursor: pointer; 27 position: relative; 28 z-index: 1; 29 } 30 .kessel-range-thumb::-moz-range-thumb:hover { 31 transform: scale(1.1); 32 } 33 .kessel-range-thumb::-moz-range-track { 34 background: transparent; 35 } 36 `}),(0,c.jsxs)("div",{className:"relative h-5 mt-2",children:[(0,c.jsx)("div",{className:"absolute top-1/2 left-0 right-0 h-1.5 -translate-y-1/2 roun
36ded-full bg-gray-200"}),(0,c.jsx)("div",{className:"absolute top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-dealer-primary",style:{left:`${b}%`,right:`${100-y}%`}}),(0,c.jsx)("input",{type:"range",min:e,max:t,step:a,value:m,disabled:u,onChange:e=>{g.current=!0;let t=Math.min(Number(e.target.value),h);x(t),i?.(t,h)},onPointerUp:v,onKeyUp:v,"aria-label":s?`Minimum ${s}`:"Minimum",className:"kessel-range-thumb absolute inset-0 w-full appearance-none bg-transparent pointer-events-none"}),(0,c.jsx)("input",{type:"range",min:e,max:t,step:a,value:h,disabled:u,onChange:e=>{g.current=!0;let t=Math.max(Number(e.target.value),m);p(t),i?.(m,t)},onPointerUp:v,onKeyUp:v,"aria-label":s?`Maximum ${s}`:"Maximum",className:"kessel-range-thumb absolute inset-0 w-full appearance-none bg-transparent pointer-events-none"})]}),(0,c.jsxs)("div",{className:"mt-1 flex justify-between",children:[(0,c.jsx)("span",{className:"text-[10px] text-gray-400",children:z(e,n)}),(0,c.jsx)("span",{className:"text-[10px] text-gray-400",children:z(t,n)})]})]})}function T({config:e,options:t,selected:r,onChange:l,showBadgeCounts:a,annotations:n}){let[s,i]=(0,d.useState)(""),o=t=>{let r=e.valueLabels?.[t],l="string"==typeof r?r:t,a=n?.[t];return void 0!==a?`${l} (${Math.round(a)} mi)`:l},u=(0,d.useMemo)(()=>t.filter(t=>e.valueLabels?.[t.value]!==null),[t,e.valueLabels]),m=u.length>10,x=u.length>8,h=(0,d.useMemo)(()=>{if(!s)return u;let e=s.toLowerCase();return u.filter(t=>o(t.value).toLowerCase().includes(e))},[u,s,n]),p=(0,d.useMemo)(()=>[...h].sort((e,t)=>{let l=+!r.includes(e.value),a=+!r.includes(t.value);if(l!==a)return l-a;let s=n?.[e.value],i=n?.[t.value];return void 0!==s&&void 0!==i&&s!==i?s-i:void 0!==s!=(void 0!==i)?void 0!==s?-1:1:o(e.value).localeCompare(o(t.value))}),[h,r,n]);return(0,c.jsxs)("div",{className:"mt-2",children:[m&&(0,c.jsxs)("div",{className:"relative mb-2",children:[(0,c.jsx)("svg",{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,c.jsx)("input",{type:"text",value:s,onChange:e=>i(e.target.value),placeholder:`Search ${e.label.toLowerCase()}...`,className:"w-full rounded-md border border-gray-200 bg-gray-50 py-1.5 pl-8 pr-3 text-xs text-gray-700 placeholder-gray-400 outline-none focus:border-dealer-primary focus:bg-white focus:ring-1 focus:ring-dealer-primary"})]}),(0,c.jsxs)("div",{className:x?"space-y-0.5 overflow-y-auto pr-1":"space-y-0.5",style:x?{maxHeight:"14rem"}:void 0,children:[0===p.length&&(0,c.jsx)("p",{className:"py-2 text-center text-xs text-gray-400",children:"No matches"}),p.map(t=>{let n=r.includes(t.value);return(0,c.jsxs)("label",{className:`flex cursor-pointer items-center gap-2.5 rounded-md px-2 py-1.5 text-sm transition-colors ${n?"bg-dealer-primary/5 font-medium text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:[(0,c.jsx)("input",{type:"checkbox",checked:n,onChange:()=>{var a;let n;return a=t.value,n=r.includes(a)?r.filter(e=>e!==a):[...r,a],void l(e.key,n)},className:"h-4 w-4 rounded border-gray-300 text-dealer-primary focus:ring-dealer-primary cursor-pointer"}),(0,c.jsx)("span",{className:"flex-1 truncate",children:o(t.value)}),a&&null!=t.count&&(0,c.jsx)("span",{className:`ml-auto rounded-full px-1.5 py-0.5 text-[10px] font-medium leading-none ${n?"bg-dealer-primary/10 text-dealer-primary":"bg-gray-100 text-gray-600"}`,children:t.count.toLocaleString()})]},t.value)})]})]})}function B({config:e,min:t,max:r,bounds:l,onChange:a}){let[n,s]=(0,d.useState)(t),[i,o]=(0,d.useState)(r),u=(0,d.useRef)(null);(0,d.useEffect)(()=>{s(t)},[t]),(0,d.useEffect)(()=>{o(r)},[r]);let m=(t,r)=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{a(e.key,{min:t,max:r})},500)},x="currency"===e.format,h=x?"$":"",p=x?"$0":"0",g="currency"===e.format?500:"lbs"===e.format?100:1,f=t=>{if(!t)return"";let r=Number(t);return Number.isNaN(r)?t:e.format&&"text"!==e.format?r.toLocaleStr
36ing():String(r)},[b,y]=(0,d.useState)(null);return(0,c.jsxs)("div",{className:"mt-2",children:[l&&(0,c.jsx)(W,{min:l.min,max:l.max,valueLow:n?Number(n):l.min,valueHigh:i?Number(i):l.max,step:g,format:e.format,label:e.label,onDrag:(e,t)=>{s(e===l?.min?"":String(e)),o(t===l?.max?"":String(t))},onChange:(t,r)=>{u.current&&clearTimeout(u.current);let n=t===l?.min?"":String(t),i=r===l?.max?"":String(r);s(n),o(i),a(e.key,{min:n,max:i})}}),(0,c.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,c.jsxs)("div",{className:"relative flex-1",children:[h&&(0,c.jsx)("span",{className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-xs text-gray-400",children:h}),(0,c.jsx)("input",{type:"text",inputMode:"numeric",value:"min"===b?n:f(n),onChange:e=>{let t=e.target.value.replace(/[^0-9.-]/g,"");s(t),m(t,i)},onFocus:()=>y("min"),onBlur:()=>y(null),placeholder:p,"aria-label":`${e.label} minimum`,className:`w-full rounded-md border border-gray-200 bg-gray-50 py-1.5 text-sm text-gray-700 outline-none focus:border-dealer-primary focus:bg-white focus:ring-1 focus:ring-dealer-primary ${h?"pl-6 pr-2.5":"px-2.5"}`})]}),(0,c.jsx)("span",{className:"text-xs font-medium text-gray-400",children:"to"}),(0,c.jsxs)("div",{className:"relative flex-1",children:[h&&(0,c.jsx)("span",{className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-xs text-gray-400",children:h}),(0,c.jsx)("input",{type:"text",inputMode:"numeric",value:"max"===b?i:f(i),onChange:e=>{let t=e.target.value.replace(/[^0-9.-]/g,"");o(t),m(n,t)},onFocus:()=>y("max"),onBlur:()=>y(null),placeholder:p,"aria-label":`${e.label} maximum`,className:`w-full rounded-md border border-gray-200 bg-gray-50 py-1.5 text-sm text-gray-700 outline-none focus:border-dealer-primary focus:bg-white focus:ring-1 focus:ring-dealer-primary ${h?"pl-6 pr-2.5":"px-2.5"}`})]})]})]})}function F(e,t){if("checkbox"===e.type){let r=t[e.key];return Array.isArray(r)?r.length:0}if("range"===e.type){let r=0;return t[`${e.key}Min`]&&r++,t[`${e.key}Max`]&&r++,r}return 0}function A({filters:e,values:t,onChange:r,availableOptions:l={},rangeBounds:a={},collapsible:n=!0,showBadgeCounts:o=!1,coloredHeaders:u=!1,disabled:m=!1,className:x,distanceAnnotations:h}){let[p,g]=(0,d.useState)(()=>{let t={};for(let r of e)r.collapsed&&(t[r.key]=!0);return t});return e.reduce((e,r)=>e+F(r,t),0),(0,c.jsxs)("div",{className:`${x??""} ${m?"pointer-events-none opacity-60":""}`,children:[(0,c.jsx)("div",{className:"mb-3 flex items-center justify-between",children:(0,c.jsx)("h2",{className:"text-sm font-bold uppercase tracking-wider text-gray-700",children:"Filters"})}),(0,c.jsx)("div",{className:"space-y-1",children:e.filter(e=>{if(!e.autoHide)return!0;if("checkbox"===e.type){let t=l[e.key];return t&&t.length>1}return!0}).map(e=>{let d=p[e.key],m=F(e,t);return(0,c.jsxs)("div",{className:"relative rounded-lg border border-gray-100 bg-white overflow-hidden",children:[e.key===s.lW&&(0,c.jsx)(i.kE,{section:"inventoryCollections",label:"collections",className:`absolute right-8 top-1.5 z-10 h-7 w-7 rounded-lg ${s.Gz} ${s.jO}`}),(0,c.jsxs)("button",{type:"button",onClick:()=>n&&g(t=>({...t,[e.key]:!t[e.key]})),className:u?"flex w-full items-center justify-between rounded-t-lg px-3 py-2.5 text-sm font-semibold text-white bg-dealer-primary transition-colors hover:bg-dealer-primary-dark":"flex w-full items-center justify-between px-3 py-2.5 text-sm font-semibold text-gray-800 transition-colors hover:bg-gray-50",children:[(0,c.jsxs)("span",{className:"flex items-center gap-2",children:[e.label,m>0&&(0,c.jsx)("span",{className:`flex h-5 min-w-[1.25rem] items-center justify-center rounded-full px-1.5 text-[10px] font-bold ${u?"bg-white/20 text-white":"bg-dealer-primary text-white"}`,children:m})]}),n&&(0,c.jsx)("svg",{className:`h-4 w-4 transition-transform ${d?"":"rotate-180"} ${u?"text-white/70":"text-gray-400"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),!d&&(0,c.jsxs)("div",{className:"border-t border-gray-100 px-3 pb-3",children:["checkbox"===e.type&&(0,c.jsx)(T,{config:e,options:l[e.key]??[],selected:t[e.key]??[],onChange:r,showBadgeCounts:o,annotations:h?.[e.key]}),"range"===e.type&&(0,c.jsx)(B,{config:e,min:String(t[`${e.key}Min`]??""),max:String(t[`${e.key}Max`]??""),bounds:a[e.key],onChange:r})]})]},e.key)})})]})}function P({placeholder:e="Search inventory...",onSearch:t,debounce:r=300,defaultValue:l="",className:a}){let[n,s]=(0,d.useState)(l),i=(0,d.useRef)(null);(0,d.useEffect)(()=>{s(l)},[l]);let o=(0,d.useCallback)(e=>{let l=e.target.value;s(l),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>t(l),r)},[t,r]);return(0,d.useEffect)(()=>()=>{i.current&&clearTimeout(i.current)},[]),(0,c.jsx)("input",{type:"search",value:n,onChange:o,placeholder:e,className:a??"w-full rounded border border-gray-300 px-3 py-2 text-sm"})}function I({activeFilters:e,implicitFilters:t,onRemove:r,onClearAll:l,filters:a,className:n}){let s=[];for(let[r,l]of Object.entries(t))r in e||!(l.length>0)||s.push([r,l]);for(let[t,r]of Object.entries(e))r.length>0&&s.push([t,r]);let i=s.length>0,o=Object.values(e).some(e=>e.length>0);return(0,c.jsxs)("div",{className:n??"rounded-lg bg-gray-100 p-4",children:[(0,c.jsxs)("div",{className:"flex items-center justify-between",children:[(0,c.jsx)("h3",{className:"text-sm font-bold uppercase tracking-wide text-gray-900",children:"Your Search"}),o&&(0,c.jsx)("button",{type:"button",onClick:l,className:"text-gray-600 transition hover:text-red-500","aria-label":"Clear all filters",children:(0,c.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]}),i?(0,c.jsx)("div",{className:"mt-3 flex flex-wrap gap-1.5",children:s.map(([e,t])=>t.map(t=>
36{let l,n=null===(l=a?.find(t=>t.key===e)?.valueLabels?.[t])?null:"string"==typeof l?l:t;return null===n?null:(0,c.jsxs)("button",{type:"button",onClick:()=>r(e,t),className:"inline-flex cursor-pointer items-center gap-1 rounded-full bg-white px-2.5 py-1 text-xs font-medium text-gray-700 shadow-sm transition-colors hover:bg-red-50 hover:text-red-600","aria-label":`Remove ${n} filter`,children:[n,(0,c.jsx)("svg",{className:"h-3 w-3 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]},`${e}-${t}`)}))}):(0,c.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:"Add some filters to start building your custom search"})]})}var R=[25,50,100,150,250];function E({className:e,radiusOptions:t=R}){let r,{enabled:n,geoLocations:s}=(0,l.vB)(),{location:o,status:u,error:m,setFromZip:x,setFromBrowser:h,clear:p}=(0,i.VG)(),[g,f]=(0,d.useState)(""),b=(0,a.Cc)(),y="number"==typeof b?.userFilters.radius?b.userFilters.radius:"",v=(0,d.useId)();return n&&0!==s.length?(0,c.jsxs)("div",{className:e??"mb-4",children:[(0,c.jsx)("h2",{className:"mb-2 text-sm font-bold uppercase tracking-wider text-gray-700",children:"Your Location"}),o&&(0,c.jsxs)("div",{className:"mb-2 flex items-center gap-2 text-sm text-gray-700",children:[(0,c.jsxs)("svg",{className:"h-4 w-4 flex-none text-dealer-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),(0,c.jsx)("span",{className:"truncate font-medium",children:(r=o.city&&o.state?`${o.city}, ${o.state}`:o.city||o.state||"")&&o.zip?`${r} ${o.zip}`:r||(o.zip?o.zip:"Current location")}),(0,c.jsx)("button",{type:"button","aria-label":"Clear location",onClick:p,className:"ml-auto flex-none rounded p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:(0,c.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,c.jsxs)("form",{"aria-label":"Set location by zip code",onSubmit:e=>{e.preventDefault(),/^\d{5}$/.test(g)&&x(g).then(e=>{e&&f("")})},className:"flex gap-2",children:[(0,c.jsx)("input",{type:"text",inputMode:"numeric",maxLength:5,value:g,onChange:e=>f(e.target.value.replace(/\D/g,"")),placeholder:"Enter zip code",className:"w-full rounded-md border border-gray-200 bg-gray-50 px-3 py-1.5 text-sm outline-none focus:border-dealer-primary focus:bg-white focus:ring-1 focus:ring-dealer-primary"}),(0,c.jsx)("button",{type:"submit",disabled:"locating"===u||!/^\d{5}$/.test(g),className:"flex-none rounded-md bg-dealer-primary px-3 py-1.5 text-sm font-semibold text-white disabled:opacity-50",children:"Go"})]}),(0,c.jsx)("button",{type:"button",onClick:h,disabled:"locating"===u,className:"mt-2 text-xs font-medium text-dealer-primary hover:underline disabled:opacity-50","aria-label":"Use my location",children:"Use my location"}),o&&b&&(0,c.jsxs)("div",{className:"mt-3",children:[(0,c.jsx)("label",{htmlFor:v,className:"mb-1 block text-xs font-medium text-gray-500",children:"Distance"}),(0,c.jsxs)("select",{id:v,value:y,onChange:e=>b.setFilter("radius",""===e.target.value?void 0:Number(e.target.value)),className:"w-full rounded-md border border-gray-200 bg-gray-50 px-3 py-1.5 text-sm outline-none focus:border-dealer-primary focus:bg-white focus:ring-1 focus:ring-dealer-primary",children:[(0,c.jsx)("option",{value:"",children:"Any distance"}),t.map(e=>(0,c.jsxs)("option",{value:e,children:["Within ",e," mi"]},e)),"number"==typeof y&&!t.includes(y)&&(0,c.jsxs)("option",{value:y,children:["Within ",y," mi"]})]})]}),"error"===u&&m&&(0,c.jsx)("p",{className:"mt-1 text-xs text-red-600",children:m})]}):null}var U=new Set(["a","an","the","and","but","or","for","nor","on","at","to","from","by","of","in","as"]),H=new Set(["fsx","xlr","xlt","sle","slt","ltz","ltd","sr5","trd","awd","rwd","fwd","gmc","bmw","crv","rav","tsv","suv","sav","utv","atv","mpv","ev","hev","phev","bev","fcev","srx","sro","svo","svr","svt","stx","wrx","trx","fx4","4x4","4wd","mpg","nobo","rog","cnw","rv","ssn"]),V=new Set(["my","no","us","am","is","be","it","we","he","if","so","up","ok"]);function D(e){if(!e)return"";let t=e.replace(/[-_]/g," ").trim();if(!t)return"";let r=t.split(/\s+/),l=[];for(let e=0;e<r.length;e++){let t=r[e],a=t.toLowerCase(),n=e===r.length-1;if(H.has(a)||t.length<=2&&/^[a-zA-Z]+$/.test(t)&&!U.has(a)&&!V.has(a)&&"go"!==a){l.push(t.toUpperCase());continue}if(0===e){l.push(a.charAt(0).toUpperCase()+a.slice(1));continue}if(U.has(a)&&!n){l.push(a);continue}l.push(a.charAt(0).toUpperCase()+a.slice(1))}return l.join(" ")}var O=["condition.name","unitMake.name","unitModel.name","unitTrim.name","unitClassification.name","type"],G=["fuel_type","floorplan_style","floorplan_feature","floorplan_lifestyle","websiteInventoryCollections.name","collection"],K=["on_special","newest_arrivals"],Y=[],q=new Set(["0","false","no",""]);function Q(e,t,r){return e.split(t).join(r)}function Z({fallbackTitle:e}){let{config:t}=(0,i.dY)(),{userFilters:r,implicitFilters:n,lockedFilters:s}=(0,a.my)(),{slugMap:o}
36=(0,l.Zh)(),u=(0,l.xF)(),m=(0,d.useMemo)(()=>(function(e,t){if(e||t)return{shared:{...e?.shared,...t?.shared},framing:{...e?.framing,...t?.framing}}})(t.srpCopy,u?.srpCopy),[t.srpCopy,u?.srpCopy]),x=(0,d.useMemo)(()=>{if(!m)return e;let a=t.inventory?.filterConfig??[],i=(0,l.US)(a,o.keyToSlug),d=[];for(let e of i){let t=r[e.apiKey]??r[e.urlSlug];if(null==t)continue;let a=(0,l.cV)(t);a.length>0&&d.push({apiKey:e.apiKey,values:a})}let c=[],u=new Set(Object.keys(s));for(let e of i){if(u.has(e.apiKey)||u.has(e.urlSlug))continue;let t=n[e.apiKey]??n[e.urlSlug];if(null==t)continue;let r=(0,l.lo)(t);if(!r)continue;let a=(0,l.cV)(r);a.length>0&&c.push({apiKey:e.apiKey,values:a})}let{phrase:x,location:h,event:p}=function(e,t={},r={}){let{primaries:l=O,secondaries:a=G,flags:n=K,subsumption:s={"unitClassification.name":["type"]},nounKeys:i=Y,industryLabel:o="RVs",locationEligibility:d=!0,locationMap:c={},eventEligibility:u=!0,h1ExcludePrimaries:m}=t,x=r.applyH1Exclusions&&m?.length?l.filter(e=>!m.includes(e)):l,h=new Map;for(let t of[...e.pillarTaxonomies,...e.userTaxonomies]){h.has(t.apiKey)||h.set(t.apiKey,new Set);let e=h.get(t.apiKey);for(let r of t.values)e.add(r)}let p=x.some(e=>{let t=h.get(e);return t&&t.size>0}),g=[];if(!p)for(let e of n){let t=h.get(e);t&&Array.from(t).some(e=>!q.has(e.trim().toLowerCase()))&&("on_special"===e?g.push("Special"):"newest_arrivals"===e&&g.push("New Arrival"))}let f=new Set;for(let[e,t]of Object.entries(s)){let r=h.get(e);if(r&&r.size>0)for(let e of t)f.add(e)}let b=new Set(i),y=!1;for(let e of x){if(f.has(e))continue;let t=h.get(e);if(t&&0!==t.size){if("unitClassification.name"===e&&2===t.size){let r=t.has("fifth-wheel-toy-hauler")||t.has("Fifth Wheel Toy Hauler"),l=t.has("travel-trailer-toy-hauler")||t.has("Travel Trailer Toy Hauler");if(r&&l){g.push("Toy Hauler"),b.has(e)&&(y=!0);continue}}if(1===t.size){let r=Array.from(t)[0];g.push(D(r)),b.has(e)&&(y=!0)}}}for(let e of a){let t=h.get(e);if(t&&1===t.size){let e=Array.from(t)[0];g.push(D(e))}}let v="";if(d){let e=h.get("companyLocation.name")||h.get("company_location_name");if(e&&1===e.size){let t=Array.from(e)[0];v=new Map(Object.entries(c).map(([e,t])=>[e.trim().toLowerCase(),t])).get(t.trim().toLowerCase())??D(t)}}let j="";if(u){let e=h.get("events.name");e&&1===e.size&&(j=D(Array.from(e)[0]))}let w=g.join(" ").trim();if(!y){let e=RegExp(`\\b${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"i"),t=w.length>0&&e.test(w);w=w?t?w:`${w} ${o}`:o}return{phrase:w,location:v,event:j}}({userTaxonomies:d,pillarTaxonomies:c},m.shared,{applyH1Exclusions:!0});return function(e,t){let{phrase:r,location:l,event:a,siteName:n,page:s}=t,i=l?/^(in|at|near)\s/i.test(l)?` ${l}`:` in ${l}`:"",o=a?` at ${a}`:"",d=s&&s>1?` - Page ${s}`:"",c=e;return c=Q(c,"{phrase}",r),c=Q(c,"{label}",""),c=Q(c,"{event}",o),c=Q(c,"{location}",i),c=Q(c,"{page}",d),(c=Q(c,"{siteName}",n)).replace(/\s+/g," ").replace(/\s+([.,])/g,"$1").trim()}(m.framing?.h1Template??"{phrase} for Sale{event}{location}",{phrase:x,location:h,event:p,siteName:t.name})},[m,e,t,r,n,s,o]);return(0,c.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:x})}var J="closest";function X(e,t){return`_geoPoint(${e.lat},${e.lng}):${t}`}var ee="events.name";function et(e,t){let r={},l={};for(let a of e){if("checkbox"===a.type){let e=t[a.key];e?.filters&&(r[a.key]=Object.entries(e.filters).map(([e,t])=>({value:e,count:t})))}if("range"===a.type){let e=t[a.key];e?.min!=null&&e?.max!=null&&(l[a.key]={min:e.min,max:e.max})}}return{checkboxOptions:r,rangeBounds:l}}function er({open:e,onClose:t,totalResults:r,hideShowingCount:l=!1,children:a}){return((0,d.useEffect)(()=>{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),e)?(0,u.createPortal)((0,c.jsxs)("div",{className:"fixed inset-0 z-[9998] lg:hidden",children:[(0,c.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),(0,c.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 flex max-h-[85vh] flex-col rounded-t-2xl bg-white shadow-2xl animate-in slide-in-from-bottom",children:[(0,c.jsxs)("div",{className:"flex-none border-b border-gray-100 px-5 pb-3 pt-3",children:[(0,c.jsx)("div",{className:"mx-auto mb-3 h-1 w-10 rounded-full bg-gray-300"}),(0,c.jsxs)("div",{className:"flex items-center justify-between",children:[(0,c.jsx)("h2",{className:"text-lg font-bold text-gray-900",children:"Filters"}),(0,c.jsx)("button",{type:"button",onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 text-gray-500 hover:bg-gray-200","aria-label":"Close filters",children:(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),(0,c.jsx)("div",{className:"flex-1 overflow-y-auto overscroll-contain px-5 py-4",children:a}),(0,c.jsx)("div",{className:"flex-none border-t border-gray-100 bg-white px-5 py-3 safe-area-inset-bottom",children:(0,c.jsx)("button",{type:"button",onClick:t,className:"w-full rounded-lg bg-dealer-primary py-3 text-sm font-bold text-white shadow-sm hover:opacity-90 active:opacity-80",children:0===r?"No Results â Adjust Your Filters":`Show${!l&&null!=r?` ${r.toLocaleStr
36ing()}`:""} Results`})})]})]}),document.body):null}var el=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0});function ea(e,t){return"currency"===t?el.format(e):"number"===t?e.toLocaleString():"lbs"===t?`${e.toLocaleString()} lbs`:"feet"===t?`${e.toLocaleString()} ft`:String(e)}var en=[{key:"price_current",direction:"asc",label:"Price: Low to High"},{key:"price_current",direction:"desc",label:"Price: High to Low"},{key:"year",direction:"desc",label:"Year: Newest"},{key:"year",direction:"asc",label:"Year: Oldest"},{key:"received_date",direction:"desc",label:"Recently Added"}],es=[12,24,48];function ei({renderItem:e,renderNoResults:t,renderLoading:r,filterConfig:n,coloredFilterHeaders:s=!1,hideFilterCounts:o=!1,hideShowingCount:u=!1,implicitSort:m,sortConfig:x,perPageOptions:h=es,disclaimer:p,className:g,ads:f,initialData:b,srpBase:y="/inventory"}){let v=x&&x.length>0?x:en,j=(0,d.useMemo)(()=>{let e=n?.filter(e=>e.excludeZero).map(e=>e.key)??[];return e.length>0?new Set(e):void 0},[n]),{title:w,mergedFilters:$,userFilters:L,implicitFilters:_,lockedFilters:z,implicitApiFilters:W,setFilter:T,setFilters:B,clearFilters:F,buildPageUrl:R,removeImplicitValue:U}=(0,a.my)(),{enabled:H,coords:V,sortEligible:D,locationDistances:O}=(0,l.vB)(),{options:G}=(0,l.Ie)(),K=(0,d.useMemo)(()=>D?[{key:J,direction:"asc",label:"Closest First"},...v]:v,[D,v]),Y=(0,d.useMemo)(()=>H&&Object.keys(O).length>0?{"companyLocation.name":O}:void 0,[H,O]),{filters:q,implicitSort:Q}=(0,d.useMemo)(()=>(function(e,t,r,l){let a,{radius:n,...s}=e,i=s,o="number"==typeof(a="string"==typeof n?Number(n):n)&&Number.isFinite(a)&&a>0?a:null;if(l.radius&&r&&null!==o){let e={lat:r.lat,lng:r.lng,meters:Math.round(1609.344*o)};i={...i,geoRadius:e}}let d="string"==typeof i.sort?i.sort:void 0,c=d?.split(":")[0]===J;if(!l.sort||!r){if(c){let{sort:e,...r}=i;return{filters:r,implicitSort:t}}return{filters:i,implicitSort:t}}if(c){let e="desc"===d.split(":")[1]?"desc":"asc";return{filters:{...i,sort:X(r,e)},implicitSort:t}}if(!d){let e=void 0===t?{}:Array.isArray(t)?{default:t}:t;return{filters:i,implicitSort:{...e,default:[X(r,"asc"),...e.default??[]]}}}return{filters:i,implicitSort:t}})($,m,V,{sort:D,radius:H}),[$,m,V,D,H]),{unitIds:el,pagination:ei,availableFilters:eo,isLoading:ed}=(0,l.od)(q,W,Q,j,b?{fallbackData:{ids:b.ids,pagination:b.pagination,available_filters:b.available_filters}}:{fallbackData:void 0}),ec=(0,d.useMemo)(()=>new Set(Object.keys(z)),[z]),eu=(0,d.useMemo)(()=>{var e;let t,r=n?.filter(e=>!ec.has(e.key));return r?(t=Array.isArray(e=$["events.name"])&&e.length>0,G.length>0||t?r:r.filter(e=>e.key!==ee)):r},[n,ec,G,$]),em=(0,d.useMemo)(()=>({...z,..._,perPage:1,page:1}),[z,_]),{availableFilters:ex}=(0,l.od)(em,W,m),{checkboxOptions:eh}=(0,d.useMemo)(()=>eu?et(eu,eo):{checkboxOptions:{},rangeBounds:{}},[eu,eo]),ep=(0,d.useMemo)(()=>0===G.length?eh:{...eh,[ee]:G},[eh,G]),eg=(0,d.useMemo)(()=>eu?et(eu,ex).rangeBounds:{},[eu,ex]),ef=(0,d.useCallback)(e=>{T("sort",e)},[T]),eb=(0,d.useCallback)(e=>{T("perPage",e)},[T]),ey=(0,d.useCallback)(e=>{T("page",e>1?e:void 0),window.scrollTo({top:0,behavior:"smooth"})},[T]),ev=(0,d.useCallback)((e,t)=>{if(t&&"object"==typeof t&&!Array.isArray(t)){let r={};r[`${e}Min`]=t.min?Number(t.min):void 0,r[`${e}Max`]=t.max?Number(t.max):void 0,B(r);return}let r=(0,i.WW)(_[e]);if(r&&Array.isArray(t)){let l=r.filter(e=>!t.includes(e));if(l.length>0){for(let t of l)U(e,t,y);return}}T(e,t)},[T,B,_,U,y]),ej=(0,d.useCallback)(e=>{T("search",e||void 0)},[T]),ew=(0,d.useCallback)((e,t)=>{let r=(0,i.WW)(_[e]);if(r&&r.includes(t))return void U(e,t,y);if(n?.some(t=>"range"===t.type&&t.key===e))return void B({[`${e}Min`]:void 0,[`${e}Max`]:void 0});if("radius"===e)return void T("radius",void 0);let l=L[e];Array.isArray(l)?T(e,l.filter(e=>e!==t)):"search"===e?T("search",void 0):T(e,void 0)},[n,L,_,T,B,U,y]),eN=H&&null!==V&&"number"==typeof L.radius&&L.radius>0,ek=(0,d.useMemo)(()=>{let e={};for(let[t,r]of Object.entries(L))!ec.has(t)&&Array.isArray(r)&&r.length>0&&(e[t]=r);
36if(L.search&&(e.search=[L.search]),eN&&(e.radius=[`Within ${L.radius} mi`]),eu)for(let l of eu){var t,r;if("range"!==l.type)continue;let a=L[`${l.key}Min`],n=L[`${l.key}Max`];(null!=a||null!=n)&&(e[l.key]=[(t=l.label,r=l.format,null!=a&&null!=n?`${t}: ${ea(a,r)} \u2013 ${ea(n,r)}`:null!=a?`${t}: ${ea(a,r)}+`:null!=n?`${t}: Up to ${ea(n,r)}`:t)])}return e},[L,eu,ec,eN]),eC=(0,d.useMemo)(()=>{let e={};for(let[t,r]of Object.entries(_)){if(ec.has(t))continue;let l=(0,i.WW)(r);l&&(e[t]=l)}return e},[_,ec]),[e$,eL]=(0,d.useState)(!1),[eM,eS]=(0,d.useState)(!1),e_=!!eu&&eu.length>0,ez=(0,d.useRef)(null),[eW,eT]=(0,d.useState)(!1);(0,d.useEffect)(()=>{let e=ez.current;if(!e)return;let t=new IntersectionObserver(([e])=>eT(!e.isIntersecting),{threshold:0});return t.observe(e),()=>t.disconnect()},[]);let eB=(0,d.useMemo)(()=>{if(!eu)return 0;let e=0;for(let t of eu){if("checkbox"===t.type){let r=L[t.key];Array.isArray(r)&&(e+=r.length)}"range"===t.type&&(L[`${t.key}Min`]&&e++,L[`${t.key}Max`]&&e++)}return eN&&e++,e},[eu,L,eN]);return(0,a.Mh)({onOpenFilters:()=>eL(!0),onOpenSort:()=>eS(!0),activeFilterCount:eB,hasFilters:e_}),(0,c.jsxs)("div",{className:`flex min-w-0 flex-col gap-6 lg:flex-row ${g??""}`,children:[(0,c.jsx)(i.PO,{section:"inventoryUnits"}),e_&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("aside",{className:"hidden w-64 shrink-0 lg:block",children:[(0,c.jsx)("div",{ref:ez,className:"h-0 w-0","aria-hidden":"true"}),(0,c.jsx)(I,{activeFilters:ek,implicitFilters:eC,onRemove:ew,onClearAll:F,filters:eu,className:"mb-4 rounded-lg bg-gray-100 p-4"}),(0,c.jsx)(E,{}),(0,c.jsxs)("div",{className:"mb-4",children:[(0,c.jsx)("h2",{className:"mb-2 text-sm font-bold uppercase tracking-wider text-gray-700",children:"Search"}),(0,c.jsx)(P,{onSearch:ej,defaultValue:String(L.search??""),placeholder:"Search inventory...",className:"w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-sm outline-none focus:border-dealer-primary focus:bg-white focus:ring-1 focus:ring-dealer-primary"})]}),(0,c.jsx)(A,{filters:eu,values:$,onChange:ev,availableOptions:ep,rangeBounds:eg,showBadgeCounts:!o,coloredHeaders:s,disabled:ed,distanceAnnotations:Y})]}),(0,c.jsxs)(er,{open:e$,onClose:()=>eL(!1),totalResults:ei?.total??null,hideShowingCount:u,children:[(0,c.jsx)(I,{activeFilters:ek,implicitFilters:eC,onRemove:ew,onClearAll:F,filters:eu,className:"mb-4 rounded-lg bg-gray-100 p-4"}),(0,c.jsx)(E,{}),(0,c.jsxs)("div",{className:"mb-4",children:[(0,c.jsx)("h2",{className:"mb-2 text-sm font-bold uppercase tracking-wider text-gray-700",children:"Search"}),(0,c.jsx)(P,{onSearch:ej,defaultValue:String(L.search??""),placeholder:"Search inventory...",className:"w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-sm outline-none focus:border-dealer-primary focus:bg-white focus:ring-1 focus:ring-dealer-primary"})]}),(0,c.jsx)(A,{filters:eu,values:$,onChange:ev,availableOptions:ep,rangeBounds:eg,showBadgeCounts:!o,coloredHeaders:s,disabled:ed,distanceAnnotations:Y})]})]}),(0,c.jsxs)("main",{className:"min-w-0 flex-1",children:[(0,c.jsx)("div",{className:"mb-6",children:(0,c.jsx)(Z,{fallbackTitle:w})}),(0,c.jsxs)("div",{className:"mb-4 mt-2 flex flex-wrap items-center gap-2",children:[!u&&(0,c.jsx)(k,{pagination:ei,className:"w-full lg:w-auto"}),(0,c.jsxs)("div",{className:"flex flex-1 items-center gap-2 lg:ml-auto lg:flex-none",children:[e_&&(0,c.jsxs)("button",{type:"button",onClick:()=>eL(!0),className:"flex flex-1 items-center justify-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2 text-sm font-semibold text-gray-700 shadow-sm active:bg-gray-50 lg:hidden",children:[(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filters",eB>0&&(0,c.jsx)("span",{className:"flex h-5 min-w-[1.25rem] items-center justify-center rounded-full bg-dealer-primary px-1.5 text-[10px] font-bold text-white",children:eB}
36)]}),(0,c.jsxs)("div",{className:"flex flex-1 gap-2 lg:flex-none",children:[(0,c.jsx)(M,{options:K,value:String(L.sort??""),onChange:ef,className:"w-full lg:w-auto",drawerOpen:eM,onDrawerOpenChange:eS}),(0,c.jsx)("div",{className:"hidden sm:block",children:(0,c.jsx)(S,{options:h,value:L.perPage??12,onChange:eb})})]})]})]}),(0,c.jsx)(N,{unitIds:el,pagination:ei,isLoading:ed,layout:"grid",columns:e_?{sm:1,md:2,lg:3,xl:3}:void 0,renderItem:t=>e(t),ads:f,renderNoResults:t,renderLoading:r,initialUnits:b?.units}),ei&&ei.last_page>1&&(0,c.jsx)("div",{className:"mt-6",children:(0,c.jsx)(C,{pagination:ei,onPageChange:ey,hrefForPage:R})}),p&&(0,c.jsx)("p",{className:"mt-8 text-xs text-gray-600",children:p})]})]})}function eo({renderItem:e,renderNoResults:t,renderLoading:r,className:n,ads:s,initialData:i}){let o=(0,l.xF)(),{slugMap:u}=(0,l.Zh)(),m=(0,d.useMemo)(()=>(function(e,t){let r={...e.keyToSlug},l={...e.slugToKey};for(let e of t)e.slug&&e.slug!==e.key&&(r[e.key]=e.slug,l[e.slug]=e.key);return{keyToSlug:r,slugToKey:l}})(u,o?.filterConfig??[]),[u,o?.filterConfig]);return o?(0,c.jsx)(a.IN,{implicitFilters:o.implicitFilters,title:o.title,permalinkBase:o.vdpBase,slugMap:m,children:(0,c.jsx)("div",{className:"mx-auto max-w-7xl px-4 py-6",children:(0,c.jsx)(ei,{filterConfig:o.filterConfig,sortConfig:o.sortConfig,implicitSort:o.implicitSort,perPageOptions:o.perPageConfig,disclaimer:o.disclaimer,coloredFilterHeaders:o.coloredFilterHeaders,hideFilterCounts:o.hideFilterCounts,hideShowingCount:o.hideShowingCount,renderItem:t=>e(t,o.vdpBase),srpBase:o.srpBase,ads:s,renderNoResults:t,renderLoading:r,className:n,initialData:i})})}):(0,c.jsx)("div",{className:"py-12 text-center text-gray-500",children:"Page not found."})}function ed(e){return(0,c.jsx)(d.Suspense,{fallback:(0,c.jsx)("div",{className:"py-12 text-center text-gray-500",children:"Loading inventory..."}),children:(0,c.jsx)(eo,{...e})})}function ec({items:e,className:t}){return(0,c.jsx)("nav",{className:t,children:e.map(e=>(0,c.jsxs)("a",{href:e.href,children:[e.image&&(0,c.jsx)("img",{src:e.image,alt:e.label}),(0,c.jsx)("span",{children:e.label}),e.description&&(0,c.jsx)("p",{children:e.description})]},e.href))})}var eu=["Class A","Class B","Class C","Travel Trailer","Fifth Wheel"];function em({classifications:e=eu,srpLink:t="/inventory",className:r}){let[a,n]=(0,d.useState)(0),[s,i]=(0,d.useState)(""),{slugMap:o}=(0,l.Zh)();function u(e){let r=new URLSearchParams,l=o.keyToSlug["unitClassification.name"]??"unitClassification.name",a=o.keyToSlug["condition.name"]??"condition.name";r.set(l,s),r.set(a,e),window.location.href=`${t}?${r.toString()}`}return 0===a?(0,c.jsxs)("div",{className:r,children:[(0,c.jsx)("h3",{children:"What type?"}),e.map(e=>(0,c.jsx)("button",{type:"button",onClick:()=>{i(e),n(1)},children:e},e))]}):(0,c.jsxs)("div",{className:r,children:[(0,c.jsx)("h3",{children:"New or Used?"}),(0,c.jsx)("button",{type:"button",onClick:()=>u("New"),children:"New"}),(0,c.jsx)("button",{type:"button",onClick:()=>u("Used"),children:"Used"}),(0,c.jsx)("button",{type:"button",onClick:function(){n(0),i("")},children:"Back"})]})}function ex({defaultPrice:e=0,defaultDownPayment:t=0,defaultTerm:r=60,defaultRate:l=0,className:a}){let[n,s]=(0,d.useState)(String(e)),[i,o]=(0,d.useState)(String(t)),[u,m]=(0,d.useState)(String(r)),[x,h]=(0,d.useState)(String(l)),p=(0,d.useMemo)(()=>(function(e,t,r,l){let a=e-t;if(a<=0||r<=0)return 0;if(0===l)return Math.round(a/r);let n=l/100/12;return Math.round(a*n*Math.pow(1+n,r)/(Math.pow(1+n,r)-1))})(Number(n)||0,Number(i)||0,Number(u)||0,Number(x)||0),[n,i,u,x]);return(0,c.jsxs)("div",{className:a,children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"calc-price",children:"Vehicle price"}),(0,c.jsx)("input",{id:"calc-price",type:"number",value:n,onChange:e=>s(e.target.value)})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"calc-down",children:"Down payment"}),(0,c.jsx)("input",{id:"calc-down",type:"number",value:i,onChange:e=>o(e.target.value)})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"calc-term",children:"Loan term"}),(0,c.jsx)("input",{id:"calc-term",type:"number",value:u,onChange:e=>m(e.target.value)})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"calc-rate",children:"Interest rate"}),(0,c.jsx)("input",{id:"calc-rate",type:"number",value:x,step:"0.01",onChange:e=>h(e.target.value)})]}),(0,c.jsxs)("div",{"data-testid":"monthly-payment",children:[new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(p),"/mo"]})]})}function eh({mode:e,onToggle:t,className:r}){return(0,c.jsxs)("div",{className:r,role:"group","aria-label":"Image view mode",children:[(0,c.jsx)("button",{type:"button","aria-pressed":"photos"===e,onClick:()=>t("photos"),children:"Photos"}),(0,c.jsx)("button",{type:"button","aria-pressed":"floorplans"===e,onClick:()=>t("floorplans"),children:"Floorplans"})]})}function ep(e){let t=Math.floor(e),r=Math.round((e-t)*12);return 12===r?`${t+1}\u2032`:0===r?`${t}\u2032`:`${t}\u2032 ${r}\u2033`}var eg=[{family:"equipment",pattern:/tractor|mower|implement|excavat|skid|loader|backhoe|attachment|utility\s*trailer|dump\s*trailer|equipment|forklift/i},{family:"powersports",pattern:/atv|utv|side\s*by\s*side|motorcycle|scooter|moped|snowmobile|dirt\s*bike|jet\s*ski|personal\s*watercraft|pwc|golf\s*cart/i},{family:"marine",pattern:/boat|pontoon|yacht|sailboat|cruiser|deck\s*boat|fishing|tritoon|houseboat/i},{family:"motorizedRv",pattern:/class\s*(a|b|c|super)|motor\s*home|motorhome|motorcoach|camper\s*van|diesel\s*pusher/i},{family:"towableRv",pattern:/travel\s*trailer|fifth\s*wheel|5th\s*wheel|toy\s*hauler|destination|popup|pop\s*up|tent\s*trailer|truck\s*camper|teardrop|hybrid|trailer/i},{family:"auto",pattern:/\bcar\b|truck|suv|sedan|coupe|crossover|\bvan\b|pickup|wagon|hatchback|convert
36ible/i}],ef={rv:"towableRv",marine:"marine",auto:"auto",powersports:"powersports"};function eb(e,t){return e?function(e){if(!e)return null;for(let{family:t,pattern:r}of eg)if(r.test(e))return t;return null}(e.unit_classification?.name)??ef[t??""]??null:null}var ey=[{field:"condition",label:"Condition"},{field:"unit_classification",label:"Class"},{field:"year",label:"Year"},{field:"unit_make",label:"Make"},{field:"unit_model",label:"Model"}],ev={motorizedRv:[{field:"vehicle_body_length",label:"Length",format:"feet"},{field:"mileage",label:"Mileage",format:"number"},{field:"fuel_type",label:"Fuel Type"},{field:"max_sleeping_count",label:"Sleeps"},{field:"number_of_slideouts",label:"Slideouts"},{field:"gvwr",label:"GVWR",format:"lbs"},{field:"fresh_water_capacity",label:"Fresh Water",format:"gallons"}],towableRv:[{field:"vehicle_body_length",label:"Length",format:"feet"},{field:"max_sleeping_count",label:"Sleeps"},{field:"number_of_slideouts",label:"Slideouts"},{field:"dry_weight",label:"Dry Weight",format:"lbs"},{field:"gvwr",label:"GVWR",format:"lbs"},{field:"hitch_weight",label:"Hitch Weight",format:"lbs"},{field:"fresh_water_capacity",label:"Fresh Water",format:"gallons"},{field:"cargo_capacity",label:"Cargo Capacity",format:"lbs"}],auto:[{field:"mileage",label:"Mileage",format:"number"},{field:"fuel_type",label:"Fuel Type"},{field:"trim",label:"Trim"}],marine:[{field:"vehicle_body_length",label:"Length",format:"feet"},{field:"exterior_width",label:"Beam",format:"feet"},{field:"dry_weight",label:"Weight",format:"lbs"},{field:"fuel_type",label:"Fuel Type"},{field:"max_sleeping_count",label:"Sleeps"}],powersports:[{field:"mileage",label:"Mileage",format:"number"},{field:"fuel_type",label:"Fuel Type"},{field:"dry_weight",label:"Weight",format:"lbs"},{field:"trim",label:"Trim"}],equipment:[{field:"mileage",label:"Hours / Miles",format:"number"},{field:"fuel_type",label:"Fuel Type"},{field:"dry_weight",label:"Weight",format:"lbs"},{field:"vehicle_body_length",label:"Length",format:"feet"},{field:"gvwr",label:"GVWR",format:"lbs"}]};function ej(e,t){if(!e)return;let r=t.split(".").reduce((e,t)=>{if(e&&"object"==typeof e)return e[t]},e);return r&&"object"==typeof r&&"name"in r?r.name:r}function ew(e,t){return null==e||""===e||!!t&&"text"!==t&&0===Number(e)}function eN(e,t){if(null==e||""===e)return"â";let r="number"==typeof e?e:Number(e);switch(t){case"currency":if(isNaN(r))return String(e);if(0===r)return"â";return`$${r.toLocaleString("en-US",{maximumFractionDigits:0})}`;case"number":return isNaN(r)?String(e):r.toLocaleString("en-US");case"feet":return isNaN(r)?String(e):ep(r);case"lbs":return isNaN(r)?String(e):`${r.toLocaleString("en-US")} lbs`;case"gallons":return isNaN(r)?String(e):`${r.toLocaleString("en-US")} gal`;default:return String(e)}}function ek({unitId:e,onRemove:t}){let{item:r,isLoading:a}=(0,n.pT)("id",String(e)),{config:s}=(0,i.dY)(),o=(0,l.zm)(),d=s.branding.placeholderImage;if(a)return(0,c.jsx)("th",{className:"min-w-[180px] border-b border-gray-200 p-4",children:(0,c.jsxs)("div",{className:"animate-pulse space-y-2",children:[(0,c.jsx)("div",{className:"aspect-[4/3] rounded-lg bg-gray-200"}),(0,c.jsx)("div",{className:"h-4 w-3/4 rounded bg-gray-200"})]})});if(!r)return(0,c.jsxs)("th",{className:"min-w-[180px] border-b border-gray-200 p-4 text-center text-sm text-gray-400",children:[(0,c.jsx)("p",{children:"Unit not found"}),(0,c.jsx)("button",{type:"button",onClick:t,className:"mt-1 text-xs text-red-500 hover:text-red-700",children:"Remove"})]});let u=o(r);return(0,c.jsx)("th",{className:"min-w-[180px] border-b border-gray-200 p-4 text-left font-normal",children:(0,c.jsxs)("div",{className:"relative",children:[(0,c.jsx)("button",{type:"button",onClick:t,className:"absolute -right-1 -top-1 z-10 flex h-5 w-5 items-center justify-center rounded-full bg-black/70 text-xs text-white hover:bg-black","aria-label":`Remove ${r.title}`,children:"\xd7"}),(0,c.jsx)("a",{href:u,className:"mx-auto block w-full max-w-[200px]",children:(0,c.jsx)("div",{className:`aspect-[4/3] overflow-hidden rounded-lg ${r.display_image||d?"":"bg-gray-100"}`,children:r.display_image?(0,c.jsx)("img",{src:r.display_image,alt:r.title,className:"h-full w-full object-cover"}):d?(0,c.jsx)("img",{src:d,alt:"Coming soon",className:"h-full w-full object-cover"}):(0,c.jsx)("div",{className:"flex h-full w-full items-center justify-center text-xs text-gray-400",children:"No Image"})})}),(0,c.jsx)("a",{href:u,className:"mt-2 block text-sm font-bold text-gray-900 hover:text-dealer-primary",children:r.title}),(0,c.jsxs)("a",{href:u,className:"mt-1 inline-flex items-center gap-1 text-xs font-medium text-dealer-primary hover:underline",children:["View Details",(0,c.jsx)("svg",{className:"h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})})}function eC({spec:e,items:t}){let r=t.map(t=>eN(ej(t,e.field),e.format)),l=r.every(e=>e===r[0]);return(0,c.jsxs)("tr",{className:l?"":"bg-amber-50",children:[(0,c.jsx)("td",{className:"sticky left-0 z-10 whitespace-nowrap border-b border-r border-gray-200 bg-gray-50 px-4 py-2.5 text-sm font-medium text-gray-500",children:e.label}),r.map((e,r)=>(0,c.jsx)("td",{className:"border-b border-gray-200 px-4 py-2.5 text-center text-sm text-gray-900",children:e},t[r]?.id??r))]})}function e$({items:e}){return e.some(e=>e?.floorplan_image)?(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:"sticky left-0 z-10 whitespace-nowrap border-b border-r border-gray-200 bg-gray-50 px-4 py-2.5 text-sm font-medium text-gray-500",children:"Floorplan"}),e.map((e,t)=>(0,c.jsx)("td",{className:"border-b border-gray-200 px-4 py-3 text-center",children:e?.floorplan_image?(0,c.jsx)("img",{src:e.floorplan_image,alt:`${e.title} floorplan`,className:"mx-auto max-h-32 rounded object-contain"}):(0,c.jsx)("span",{className:"text-sm text-gray-300",children:"â"})},e?.id??t))]}):null}function eL({unitIds:e,onRemove:t,specs:r,showFloorplans:l,dealerType:a}){let s=[(0,n.pT)("id",String(e[0])),(0,n.pT)("id",String(e[1])),(0,n.pT)("id",e[2]?String(e[2]):""),(0,n.pT)("id",e[3]?String(e[3]):"")],i=e.map((e,t)=>s[t].item),o=function(e,t,r){let l=[],a=new Set,n=e=>{a.has(e.field)||(a.add(e.field),l.push(e))};if(r)r.forEach(n);
36else{ey.forEach(n);let r=new Set;for(let l of e){let e=eb(l,t);e&&r.add(e)}for(let e of eg.map(e=>e.family))r.has(e)&&ev[e].forEach(n)}return r?l:l.filter(t=>e.some(e=>!ew(ej(e,t.field),t.format)))}(i,a,r);return(0,c.jsx)("div",{className:"overflow-x-auto",children:(0,c.jsxs)("table",{className:"w-full border-collapse",children:[(0,c.jsx)("thead",{children:(0,c.jsxs)("tr",{children:[(0,c.jsx)("th",{className:"sticky left-0 z-10 min-w-[120px] border-b border-r border-gray-200 bg-gray-50 p-4"}),e.map(e=>(0,c.jsx)(ek,{unitId:e,onRemove:()=>t(e)},e))]})}),(0,c.jsxs)("tbody",{children:[o.map(e=>(0,c.jsx)(eC,{spec:e,items:i},e.field)),l&&(0,c.jsx)(e$,{items:i})]})]})})}function eM({unitIds:e,onClose:t,onRemove:r,specs:l}){let{config:a}=(0,i.dY)(),n=a.dealerType??"rv";return(0,u.createPortal)((0,c.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:t,children:(0,c.jsxs)("div",{className:"flex max-h-[95vh] w-full flex-col overflow-hidden bg-white shadow-2xl sm:mx-4 sm:max-h-[85vh] sm:max-w-5xl sm:rounded-2xl",onClick:e=>e.stopPropagation(),children:[(0,c.jsxs)("div",{className:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-4",children:[(0,c.jsxs)("h2",{className:"text-lg font-bold text-gray-900",children:["Compare Units (",e.length,")"]}),(0,c.jsx)("button",{type:"button",onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 text-gray-500 hover:bg-gray-200","aria-label":"Close comparison",children:(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,c.jsx)("div",{className:"flex-1 overflow-auto",children:(0,c.jsx)(eL,{unitIds:e,onRemove:r,specs:l,showFloorplans:"rv"===n,dealerType:n})})]})}),document.body)}function eS({unitId:e,onRemove:t}){let{item:r,isLoading:a}=(0,n.pT)("id",String(e)),{config:s}=(0,i.dY)(),o=(0,l.zm)(),d=s.branding.placeholderImage,u=function(e,t,r=3){if(!e)return[];let l=eb(e,t);if(!l)return[];let a=[];for(let t of ev[l]){if(a.length>=r)break;let l=ej(e,t.field);ew(l,t.format)||a.push({label:t.label,value:eN(l,t.format)})}return a}(r,s.dealerType,3);if(a)return(0,c.jsxs)("div",{className:"flex w-40 shrink-0 animate-pulse flex-col overflow-hidden rounded-lg border border-gray-200 bg-white",children:[(0,c.jsx)("div",{className:"aspect-[4/3] bg-gray-200"}),(0,c.jsxs)("div",{className:"space-y-1 p-2",children:[(0,c.jsx)("div",{className:"h-3 w-3/4 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-3 w-1/2 rounded bg-gray-200"})]})]});if(!r)return null;let m=o(r);return(0,c.jsxs)("div",{className:"relative w-40 shrink-0 overflow-hidden rounded-lg border border-gray-200 bg-white shadow-sm",children:[(0,c.jsx)("button",{type:"button",onClick:t,className:"absolute right-1 top-1 z-10 flex h-5 w-5 items-center justify-center rounded-full bg-black/70 text-xs text-white hover:bg-black","aria-label":`Remove ${r.title}`,children:"\xd7"}),(0,c.jsxs)("a",{href:m,children:[r.display_image?(0,c.jsx)("img",{src:r.display_image,alt:r.title,className:"aspect-[4/3] w-full object-cover"}):d?(0,c.jsx)("img",{src:d,alt:"Coming soon",className:"aspect-[4/3] w-full object-cover"}):(0,c.jsx)("div",{className:"flex aspect-[4/3] items-center justify-center bg-gray-100 text-xs text-gray-400",children:"No Image"}),(0,c.jsxs)("div",{className:"p-2",children:[(0,c.jsx)("p",{className:"truncate text-xs font-medium text-gray-900",children:r.title}),u.length>0&&(0,c.jsx)("dl",{className:"mt-1 space-y-0.5",children:u.map(e=>(0,c.jsxs)("div",{className:"flex items-baseline justify-between gap-1",children:[(0,c.jsx)("dt",{className:"truncate text-[10px] text-gray-500",children:e.label}),(0,c.jsx)("dd",{className:"whitespace-nowrap text-[10px] font-semibold text-gray-900",children:e.value})]},e.label))})]})]})]})}function e_({open:e,onClose:t,favorites:r,compareItems:l,removeFavorite:a,removeCompare:n,clearFavorites:s,clearCompare:i,onCompare:o,compareReady:m}){if((0,d.useEffect)(()=>
36{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),!e)return null;let x="favorites"===e,h=x?r:l,p=x?a:n;return(0,u.createPortal)((0,c.jsxs)("div",{className:"fixed inset-0 z-[9998]",children:[(0,c.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),(0,c.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 mx-auto flex max-h-[85vh] flex-col rounded-t-2xl bg-white shadow-2xl animate-in slide-in-from-bottom lg:max-w-lg",children:[(0,c.jsxs)("div",{className:"flex-none border-b border-gray-100 px-5 pb-3 pt-3",children:[(0,c.jsx)("div",{className:"mx-auto mb-3 h-1 w-10 rounded-full bg-gray-300"}),(0,c.jsxs)("div",{className:"flex items-center justify-between",children:[(0,c.jsx)("h2",{className:"text-lg font-bold text-gray-900",children:x?`Favorites (${r.length})`:`Compare (${l.length}/4)`}),(0,c.jsxs)("div",{className:"flex items-center gap-3",children:[h.length>0&&(0,c.jsx)("button",{type:"button",onClick:x?s:i,className:"text-xs text-red-500 hover:text-red-700",children:"Clear All"}),(0,c.jsx)("button",{type:"button",onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 text-gray-500 hover:bg-gray-200","aria-label":`Close ${x?"favorites":"compare"}`,children:(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]})]}),(0,c.jsx)("div",{className:"flex-1 overflow-y-auto overscroll-contain px-5 py-4",children:0===h.length?(0,c.jsx)("p",{className:"py-6 text-center text-sm text-gray-400",children:x?"No favorites yet. Click the heart on any listing.":"No items to compare. Click Compare on any listing."}):(0,c.jsx)("div",{className:"flex gap-3 overflow-x-auto pb-2",children:h.map(e=>(0,c.jsx)(eS,{unitId:e,onRemove:()=>p(e)},e))})}),!x&&m&&(0,c.jsx)("div",{className:"flex-none border-t border-gray-100 px-5 py-3",children:(0,c.jsxs)("button",{type:"button",onClick:o,className:"w-full rounded-lg bg-dealer-primary py-2.5 text-sm font-bold text-white hover:opacity-90",children:["Compare Now (",h.length," units)"]})})]})]}),document.body)}function ez({className:e}){let{favorites:t,remove:r,clear:n}=(0,l.rB)(),{items:s,remove:i,clear:o}=(0,l.fo)(),m=(0,a.gF)(),[x,h]=(0,d.useState)(null),[p,g]=(0,d.useState)(!1),[f,b]=(0,d.useState)(!1);(0,d.useEffect)(()=>b(!0),[]);let y=!!m,v=e=>{h(t=>t===e?null:e)};return f?(0,u.createPortal)((0,c.jsxs)("div",{className:e??"fixed inset-x-0 bottom-0 z-[9997]",children:[(0,c.jsx)(e_,{open:x,onClose:()=>h(null),favorites:t,compareItems:s,removeFavorite:r,removeCompare:i,clearFavorites:n,clearCompare:o,onCompare:()=>{h(null),g(!0)},compareReady:s.length>=2}),p&&s.length>=2&&(0,c.jsx)(eM,{unitIds:s,onClose:()=>g(!1),onRemove:e=>{i(e),s.length<=2&&g(!1)}}),(0,c.jsx)("div",{className:"mx-auto border-t border-gray-200 bg-white/95 shadow-[0_-2px_10px_rgba(0,0,0,0.08)] backdrop-blur-sm safe-area-inset-bottom lg:max-w-lg lg:rounded-t-xl lg:border-x",children:(0,c.jsxs)("div",{className:"flex w-full items-stretch divide-x divide-gray-200",children:[y&&m.hasFilters&&(0,c.jsxs)("button",{type:"button",onClick:m.onOpenFilters,className:"relative flex flex-1 items-center justify-center py-3 text-gray-700 active:bg-gray-50 lg:hidden","aria-label":"Open filters",children:[(0,c.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),m.activeFilterCount>0&&(0,c.jsx)("span",{className:"absolute right-1.5 top-1 flex h-4 min-w-[1rem] items-center justify-center rounded-full bg-dealer-primary px-1 text-[10px] font-bold text-white",children:m.activeFilterCount})]}),y&&(0,c.jsx)("button",{type:"button",onClick:m.onOpenSort,className:"flex flex-1 items-center justify-center gap-1.5 py-3 text-xs font-semibold text-gray-700 active:bg-gray-50 lg:hidden","aria-label":"Sort results",children:(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12"})})}),(0,c.jsxs)("button",{type:"button",onClick:()=>v("favorites"),className:`flex flex-1 items-center justify-center gap-1.5 py-3 text-xs font-semibold transition ${"favorites"===x?"bg-red-50 text-red-600":"text-gray-700 active:bg-gray-50"}`,"aria-label":"Favorites",children:[t.length>
360?(0,c.jsx)("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{d:"M11.645 20.91l-.007-.003-.022-.012a15.247 15.247 0 01-.383-.218 25.18 25.18 0 01-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0112 5.052 5.5 5.5 0 0116.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 01-4.244 3.17 15.247 15.247 0 01-.383.219l-.022.012-.007.004-.003.001a.752.752 0 01-.704 0l-.003-.001z"})}):(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})}),(0,c.jsx)("span",{className:y?"hidden sm:inline":"",children:"Favorites"}),t.length>0&&(0,c.jsx)("span",{className:"flex h-4 min-w-[1rem] items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-bold text-white",children:t.length})]}),(0,c.jsxs)("button",{type:"button",onClick:()=>v("compare"),className:`flex flex-1 items-center justify-center gap-1.5 py-3 text-xs font-semibold transition ${"compare"===x?"bg-blue-50 text-blue-600":"text-gray-700 active:bg-gray-50"}`,"aria-label":"Compare",children:[(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),(0,c.jsx)("span",{className:y?"hidden sm:inline":"",children:"Compare"}),s.length>0&&(0,c.jsx)("span",{className:"flex h-4 min-w-[1rem] items-center justify-center rounded-full bg-blue-500 px-1 text-[10px] font-bold text-white",children:s.length})]})]})})]}),document.body):null}function eW({action:e="/inventory",paramName:t="search",placeholder:r="Search",className:a,inputClassName:n,buttonClassName:s}){let o=(0,m.useRouter)(),u=(0,m.useSearchParams)(),{config:x}=(0,i.dY)(),h=u.get(t)??"",[p,g]=(0,d.useState)(h),[f,b]=(0,d.useState)(!1);(0,d.useEffect)(()=>{g(h)},[h]);let y=(0,d.useRef)(null),{suggestions:v,isLoading:j}=(0,l.SQ)(p),w=(0,d.useMemo)(()=>(function(e){let t=new Map,r=new Map,l=new Map;for(let a of e){let e=a.unit_make?.name,n=a.unit_model?.name,s="object"==typeof a.unit_classification?a.unit_classification?.name:void 0;e&&t.set(e,(t.get(e)??0)+1),n&&r.set(n,(r.get(n)??0)+1),s&&l.set(s,(l.get(s)??
360)+1)}let a=[];return l.size>0&&a.push({label:"Types",filterKey:"unitClassification.name",items:[...l.keys()]}),t.size>0&&a.push({label:"Makes",filterKey:"unitMake.name",items:[...t.keys()]}),r.size>0&&a.push({label:"Models",filterKey:"unitModel.name",items:[...r.keys()]}),a})(v),[v]),N=(0,d.useMemo)(()=>{let e=p.trim().toLowerCase();return e.length<2?[]:(x.pages??[]).filter(t=>t.title.toLowerCase().includes(e))},[p,x.pages]),{slugMap:k}=(0,l.Zh)(),C=(0,l.zm)(),$=(0,d.useCallback)((t,r)=>{b(!1),g("");let l=k.keyToSlug[t]??t;o.push(`${e}?${l}=${encodeURIComponent(r)}`)},[e,o,k]),L=(0,d.useCallback)(r=>{r.preventDefault(),b(!1);let l=p.trim();l?o.push(`${e}?${t}=${encodeURIComponent(l)}`):o.push(e)},[p,e,t,o]),M=(0,d.useCallback)(e=>{g(e.target.value),b(!0)},[]),S=(0,d.useCallback)(e=>{b(!1),g(""),o.push(e)},[o]);(0,d.useEffect)(()=>{function e(e){y.current&&!y.current.contains(e.target)&&b(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let _=f&&p.trim().length>=2;return(0,c.jsxs)("div",{ref:y,className:"relative",children:[(0,c.jsxs)("form",{onSubmit:L,className:a??"flex rounded border border-gray-600",children:[(0,c.jsx)("input",{type:"text",value:p,onChange:M,onFocus:()=>p.trim().length>=2&&b(!0),placeholder:r,className:n??"w-32 bg-transparent px-3 py-1.5 text-base text-black placeholder-gray-400 outline-none"}),(0,c.jsx)("button",{type:"submit","aria-label":"Search inventory",className:s??"px-3 text-gray-400 hover:text-white",children:(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})]}),_&&(0,c.jsxs)("div",{className:"absolute left-0 top-full z-50 mt-1 w-72 rounded-md border border-gray-200 bg-white shadow-lg",children:[N.length>0&&(0,c.jsxs)("div",{className:"border-b border-gray-100 px-3 py-2",children:[(0,c.jsx)("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-gray-400",children:"Pages"}),N.map(e=>(0,c.jsxs)("button",{type:"button",onClick:()=>S(e.href),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-gray-700 hover:bg-gray-50",children:[(0,c.jsx)("svg",{className:"h-3.5 w-3.5 shrink-0 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})}),e.title]},e.href))]}),j&&0===v.length&&(0,c.jsx)("div",{className:"px-3 py-2 text-sm text-gray-400",children:"Searching..."}),!j&&0===v.length&&0===N.length&&(0,c.jsx)("div",{className:"px-3 py-2 text-sm text-gray-400",children:"No results"}),v.map(e=>{let t=C(e);return(0,c.jsxs)("button",{type:"button",onClick:()=>S(t),className:"flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-gray-50",children:[e.display_image&&(0,c.jsx)("img",{src:e.display_image,alt:"",className:"h-10 w-14 shrink-0 rounded object-cover"}),(0,c.jsxs)("div",{className:"min-w-0",children:[(0,c.jsxs)("div",{className:"truncate text-sm font-medium text-gray-900",children:[e.year," ",e.unit_make.name," ",e.unit_model.name]}),(0,c.jsxs)("div",{className:"text-xs text-gray-500",children:["#",e.stock_number,"object"==typeof e.unit_classification&&e.unit_classification?.name?` \xb7 ${e.unit_classification.name}`:""]})]})]},e.id)}),v.length>0&&w.length>0&&(0,c.jsx)("div",{className:"border-t border-gray-100 px-3 py-2",children:w.map(e=>(0,c.jsxs)("div",{className:"mt-1 first:mt-0",children:[(0,c.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-gray-400",children:e.label}),(0,c.jsx)("div",{className:"mt-0.5 flex flex-wrap gap-1",children:e.items.map(t=>(0,c.jsx)("button",{type:"button",onClick:()=>$(e.filterKey,t),className:"rounded-full bg-gray-100 px-2 py-0.5 text-xs text-gray-700 hover:bg-gray-200",children:t},t))})]},e.filterKey))}),v.length>0&&(0,c.jsx)("button",{type:"button",onClick:r=>{r.preventDefault(),b(!1),o.push(`${e}?${t}=${encodeURIComponent(p.trim())}`)},className:"block w-full border-t border-gray-100 px-3 py-2 text-center text-xs font-medium text-blue-600 hover:bg-gray-50",children:"View all results \xbb"})]})]})}var eT={pill:"rounded-full border px-6 py-2 text-sm font-bold uppercase tracking-wide",chip:"roun
36ded-full border px-4 py-1.5 text-xs font-semibold uppercase tracking-wide"};function eB({options:e,active:t=[],onChange:r,multiple:l=!0,variant:a="pill",labels:n={},className:s="",buttonClassName:i=""}){let o=new Set(t),d=n.ariaLabel??"Filter by condition",u=eT[a];return(0,c.jsx)("div",{role:"group","aria-label":d,className:s,children:e.map(e=>{let a=o.has(e);return(0,c.jsx)("button",{type:"button","aria-pressed":a,onClick:()=>{var a;return a=e,void(l?r(o.has(a)?t.filter(e=>e!==a):[...t,a]):r(o.has(a)?[]:[a]))},className:`${u} ${i}`.trim(),"data-active":a?"true":"false",children:n.optionLabels?.[e]??e},e)})})}function eF(e,t={}){let{alt:r="",className:l}=t;return"string"==typeof e?(0,d.createElement)("img",{src:e,alt:r,className:l}):(0,d.createElement)(e,{className:l})}var eA={hero:"grid grid-cols-3 gap-3 lg:grid-cols-6",chip:"flex gap-2 overflow-x-auto pb-1",sidebar:"flex flex-col gap-2"},eP={hero:"group relative flex h-28 shrink-0 flex-col items-center justify-end overflow-hidden rounded-xl border text-center transition-all duration-200 lg:h-32",chip:"inline-flex shrink-0 items-center gap-1.5 rounded-full border px-4 py-2 text-[11px] font-bold uppercase tracking-wide transition-all",sidebar:"inline-flex items-center justify-between gap-2 rounded-lg border px-3 py-2 text-left text-sm transition-all"};function eI({tiles:e,active:t=[],onSelect:r,variant:l="hero",labels:a={},showCounts:n=!1,resolveCount:s,className:i="",tileClassName:o=""}){let d=new Set(t),u=`${eA[l]} ${i}`.trim(),m=eP[l],x=a.countSuffix??"";return(0,c.jsx)("div",{className:u,children:e.map(e=>{let t=e.filters.some(e=>d.has(e)),a="hero"===l?e.photo??e.icon:e.icon??e.photo,i=n&&s?s(e):null;return(0,c.jsxs)("button",{type:"button","aria-pressed":t,onClick:()=>r(e),"data-active":t?"true":"false",className:`${m} ${o}`.trim(),children:[a&&"hero"===l&&(0,c.jsx)("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center p-5 pb-9",children:eF(a,{alt:"",className:"h-full w-full object-contain"})}),a&&"hero"!==l&&(0,c.jsx)("span",{className:"pointer-events-none inline-flex items-center justify-center",children:eF(a,{alt:"",className:"h-4 w-6"})}),(0,c.jsxs)("span",{className:"hero"===l?"relative z-10 pb-3 text-center text-[11px] font-bold uppercase leading-tight":"",children:[e.label,null!==i&&(0,c.jsxs)("span",{className:"ml-1 opacity-60",children:[i.toLocaleString(),x?` ${x}`:""]})]})]},e.label)})})}function eR({chips:e,active:t,onChange:r,showCounts:l=!1,resolveCount:a,labels:n={},className:s="",chipClassName:i=""}){let o=new Set(t),d=n.ariaLabel??"Filter by feature";return(0,c.jsx)("div",{role:"group","aria-label":d,className:`flex gap-2 overflow-x-auto pb-1 ${s}`.trim(),children:e.map(e=>{let n=o.has(e.label),s=l&&a?a(e):null;return(0,c.jsxs)("button",{type:"button","aria-pressed":n,onClick:()=>{r(o.has(e.label)?t.filter(t=>t!==e.label):[...t,e.label])},"data-active":n?"true":"false",className:`inline-flex shrink-0 items-center gap-1.5 rounded-full border px-4 py-1.5 text-xs font-semibold transition-all ${i}`.trim(),children:[e.icon&&(0,c.jsx)("span",{className:"pointer-events-none inline-flex",children:eF(e.icon,{alt:"",className:"h-3.5 w-3.5"})}),(0,c.jsxs)("span",{children:[e.label,null!==s&&(0,c.jsx)("span",{className:"ml-1 opacity-60",children:s.toLocaleString()})]})]},e.label)})})}function eE({unit:e,className:t}){let{enabled:r}=(0,l.vB)(),{distanceTo:a}=(0,i.VG)();if(!r)return null;let n=e.company_location,s=n.city&&n.state?`${n.city}, ${n.state}`:n.city||n.state||"",o=null!=n.latitude&&null!=n.longitude?a(n.latitude,n.longitude):null;if(!s&&null===o)return null;let d=null!==o&&s?`${s} \xb7 ${Math.round(o)} mi`:s||`${Math.round(o)} mi`;return(0,c.jsx)("span",{className:t??"text-xs text-gray-500",children:d})}function eU(e,t){return t.split(".").reduce((e,t)=>{if(e&&"object"==typeof e)return e[t]},e)}function eH(e,t){let r=eU(e,t);return"number"==typeof r?r:0}function eV(e,t,r){if(null==e||""===e)return"";let l="number"==typeof e?e:Number(e);switch(t){case"currency":return`$${l.toLocaleString("en-US",{maximumFractionDigits:0})}`;
36case"number":return!1!==r?l.toLocaleString("en-US"):String(l);case"feet":return ep(l);case"lbs":return`${l.toLocaleString("en-US")} lbs`;default:return String(e)}}function eD({field:e,computed:t,format:r="text",prefix:l,suffix:n,fallback:s,showCommas:i,interaction:o,as:u="span",className:m}){let x,h,{item:p}=(0,a.H)(),g=(0,d.useMemo)(()=>t&&p?function(e,t){let r=t.split(/\s+/);if(0===r.length)return 0;let l=eH(e,r[0]);for(let t=1;t<r.length;t+=2){let a=r[t],n=eH(e,r[t+1]);switch(a){case"+":l+=n;break;case"-":l-=n;break;case"*":l*=n;break;case"/":l=0!==n?l/n:0}}return l}(p,t):null,[p,t]);if(!p)return null;if(t){let e=g??0;if(0===e&&s)return(0,c.jsx)(u,{className:m,children:s});if(0===e)return null;h=eV(e,r,i),x=e}else{if(x=eU(p,e??""),!(h="mileage"===r?(0,a.sN)(p):eV(x,r,i))&&s)return(0,c.jsx)(u,{className:m,children:s});if(!h)return null}let f=(0,c.jsxs)(u,{className:m,children:[l&&(0,c.jsx)("span",{children:l}),h,n&&(0,c.jsx)("span",{children:n})]});return o?(0,c.jsx)("a",{href:function(e,t){switch(e){case"tel":return`tel:${t.replace(/[^\d+]/g,"")}`;case"sms":return`sms:${t.replace(/[^\d+]/g,"")}`;case"mailto":return`mailto:${t}`;case"whatsapp":return`https://wa.me/${t.replace(/[^\d]/g,"")}`;default:return"#"}}(o,String(x)),children:f}):f}var eO=["year","make","model","trim"];function eG({as:e="h1",fields:t=eO,className:r}){let{item:l}=(0,a.H)();if(!l)return null;if(t===eO)return(0,c.jsx)(e,{className:r,children:(0,a.TZ)(l)??l.title});let n={year:l.year,make:l.unit_make.name,model:l.unit_model.name,trim:l.trim},s=t.map(e=>n[e]).filter(Boolean);return(0,c.jsx)(e,{className:r,children:s.join(" ")})}function eK(e,t,r){if(null==e||0===e)return"";let l=r?e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):e.toLocaleString("en-US",{maximumFractionDigits:0});return`${t}${l}`}function eY(e,t){let r=t.split(".").reduce((e,t)=>{if(e&&"object"==typeof e)return e[t]},e);return null==r?null:"number"==typeof r?r:Number(r)}function eq(e){let{symbol:t="$",showCents:r=!1,className:l}=e,{item:n}=(0,a.H)(),s=(0,d.useContext)(i.BN)?.config.offerPolicy?.priceFallback;if(!n)return null;let o=e=>{let t=eY(n,e);return t||"price_current"!==e?t:(0,a.dS)(n,s)??null};if("msrpField"in e&&e.msrpField){let a=eY(n,e.msrpField),s=o(e.saleField),i=e.promoField?eY(n,e.promoField):null,d=e.callForPriceText??"Call for Price",u=e.msrpLabel??"MSRP:",m=e.saleLabel??"Sale Price:",x=e.promoLabel??"Today's Price
36:",h=e.layout??"stacked",p="split"===h;if(!s)return(0,c.jsxs)("div",{className:l,children:[a?(0,c.jsxs)("div",{className:`text-sm text-gray-600 line-through ${p?"flex items-center justify-between":""}`,children:[(0,c.jsxs)("span",{children:[u," "]}),p?(0,c.jsx)("span",{children:eK(a,t,r)}):eK(a,t,r)]}):null,(0,c.jsx)("div",{className:e.callForPriceClassName??"text-lg font-bold text-gray-900",children:d})]});let g=null!=a&&a>s,f=p?"flex items-center justify-between":"";return(0,c.jsxs)("div",{className:`${l??""} ${"inline"===h?"flex flex-wrap items-baseline gap-x-3":"space-y-1"}`,children:[g&&(0,c.jsxs)("div",{className:`text-sm text-gray-600 line-through ${f}`,children:[(0,c.jsxs)("span",{children:[u," "]}),p?(0,c.jsx)("span",{children:eK(a,t,r)}):eK(a,t,r)]}),(0,c.jsxs)("div",{className:`text-sm ${f}`,children:[(0,c.jsxs)("span",{className:"text-gray-500",children:[m," "]}),(0,c.jsx)("span",{className:"font-bold",children:eK(s,t,r)})]}),i?(0,c.jsxs)("div",{className:`text-lg font-bold text-dealer-accent ${f}`,children:[(0,c.jsxs)("span",{children:[x," "]}),p?(0,c.jsx)("span",{children:eK(i,t,r)}):eK(i,t,r)]}):null]})}let u=e.field??"price_current",m=eK(o(u),t,r);if(!m)return null;let x=e.showMsrp&&"price_current"===u&&n.price_msrp>n.price_current;return(0,c.jsxs)("div",{className:l,children:[x&&(0,c.jsx)("span",{className:"mr-2 text-gray-600 line-through",children:eK(n.price_msrp,t,r)}),(0,c.jsx)("span",{className:"font-bold",children:m})]})}function eQ(e){if(!e||0===e.length)return;let t=e.map(e=>{let t,r=(t=e.match(/_(\d+)_\d+\./))?t[1]:"";return r?`${e} ${r}w`:null}).filter(e=>null!==e);return t.length>0?t.join(", "):void 0}function eZ({url:e,alt:t,responsive:r,onClick:l,className:a,priority:n=!1,eager:s=!1}){let i=(0,d.useRef)(null),[o,u]=(0,d.useState)(!1);(0,d.useEffect)(()=>{i.current?.complete&&i.current.naturalWidth>0&&u(!0)},[]);let m=!n&&!s;return(0,c.jsxs)("div",{className:`relative h-full w-full flex-none snap-start bg-gray-100 ${l?"cursor-zoom-in":""} ${a??""}`,onClick:l,children:[!o&&(0,c.jsx)("div",{className:"absolute inset-0 animate-pulse bg-gray-200","aria-hidden":"true"}),(0,c.jsx)("img",{ref:i,src:e,srcSet:eQ(r),alt:t,onLoad:()=>u(!0),className:`relative h-full w-full object-contain ${m?"transition-opacity duration-300":""} ${m&&!o?"opacity-0":"opacity-100"}`,decoding:"async",...n?{loading:"eager",fetchPriority:"high"}:s?{loading:"eager"}:{loading:"lazy"}})]})}var eJ="meov-video-frame";function eX({url:e,provider:t,className:r,bdvTracking:l}){let a="mp4"===t||"bdv"===t,n=(0,d.useRef)(null);return((0,d.useEffect)(()=>{if("bdv"===t&&l?.dealerId&&l?.vin)return function({dealerId:e,vin:t},r){let l=()=>{};if("u"<typeof document||!e||!t)return l;if(r){if("1"===r.dataset.bdvTracked)return l;r.dataset.bdvTracked="1"}let a=document.querySelector(`.${eJ}`);a||((a=document.createElement("div")).className=eJ,a.style.display="none",document.body.appendChild(a)),a.setAttribute("data-accountid",e),a.setAttribute("data-vin",t);let n=document.createElement("script");n.src="https://dd3gy7mtoah62.cloudfront.net/public/frame-track/v1/1.0.1/frame-track.js",n.async=!0,document.body.appendChild(n);let s=!1;return()=>{s||(s=!0,n.remove())}}(l,n.current)}
36,[t,l?.dealerId,l?.vin]),a)?(0,c.jsx)("div",{className:`h-full w-full flex-none snap-start ${r??""}`,children:(0,c.jsx)("video",{ref:n,src:e,controls:!0,className:"h-full w-full bg-black object-contain",preload:"metadata",playsInline:!0})}):(0,c.jsx)("div",{className:`h-full w-full flex-none snap-start ${r??""}`,children:(0,c.jsx)("iframe",{src:e,className:"h-full w-full",allow:"autoplay; fullscreen; picture-in-picture; encrypted-media",allowFullScreen:!0,title:"Video",loading:"lazy"})})}var e0="https://dashapi.autosonvideo.com:3001/api/v1/script/video-check-frame";function e2(e){return e.trim().toLowerCase()}function e1(e,t){if(!e||!1===e.enabled)return null;if(t&&e.dealerIds){let r=e2(t);for(let[t,l]of Object.entries(e.dealerIds))if(e2(t)===r&&null!=l&&""!==String(l))return String(l)}return null!=e.dealerId&&""!==String(e.dealerId)?String(e.dealerId):null}function e4(e,t){let r="vin"===t?e.vin:e.stock_number,l="string"==typeof r?r.trim():"";return""===l?null:l}function e5(e,t){let r=new URL(e0);return r.searchParams.set("dealerId",e),r.searchParams.set("vin",t),r.searchParams.set("is_bdv","1"),r.toString()}var e3={document:"Document",window_sticker:"Window Sticker",brochure:"Brochure"};function e6({url:e,kind:t,inline:r=!0,className:l}){let a=e3[t]??"Document",n=function(e){try{let t=new URL(e,"https://placeholder.local").pathname.split("/").pop()??"";return decodeURIComponent(t).trim()||null}catch{return null}}(e),s=t=>{t.preventDefault();let r=Math.min(900,window.screen.availWidth-40),l=Math.min(1100,window.screen.availHeight-80),a=Math.max(0,(window.screen.availWidth-r)/2),n=Math.max(0,(window.screen.availHeight-l)/2);window.open(e,"_blank",`popup,width=${r},height=${l},left=${a},top=${n},noopener,noreferrer`)},i=async()=>{try{let t=await fetch(e,{mode:"cors",credentials:"omit"});if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.blob(),l=URL.createObjectURL(r),s=document.createElement("a");s.href=l,s.download=n??`${a.toLowerCase().replace(/\s+/g,"-")}.pdf`,document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(l),1e3)}catch{window.open(e,"_blank","noopener,noreferrer")}};return r?(0,c.jsxs)("div",{className:`relative h-full w-full flex-none snap-start ${l??""}`,children:[(0,c.jsx)("iframe",{src:e,className:"h-full w-full bg-gray-100",title:a,loading:"lazy"}),(0,c.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",onClick:s,className:"absolute bottom-3 right-3 flex items-center gap-1.5 rounded-full bg-black/60 px-3 py-1.5 text-xs font-medium text-white backdrop-blur-sm hover:bg-black/80",children:[(0,c.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),"Open ",a]})]}):(0,c.jsx)("div",{className:`relative h-full w-full flex-none snap-start ${l??""}`,children:(0,c.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center gap-4 bg-gray-50 px-6 text-center",children:[(0,c.jsx)("svg",{className:"h-16 w-16 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,c.jsx)("p",{className:"text-sm font-semibold uppercase tracking-wide text-gray-900",children:a}),(0,c.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[(0,c.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",onClick:s,className:"inline-flex items-center gap-1.5 rounded-md bg-gray-900 px-4 py-2 text-xs font-semibold text-white hover:bg-gray-700",children:[(0,c.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),"Open ",a]}),(0,c.jsxs)("button",{type:"button",onClick:i,className:"inline-flex items-center gap-1.5 rounded-md border border-gray-300 bg-white px-4 py-2 text-xs font-semibold text-gray-900 hover:bg-gray-100",children:[(0,c.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v2a2 2 0 002 2h12a2 2 0 002-2v-2M7 10l5 5 5-5M12 15V3"})}),"Download"]})]})]})})}function e7({slide:e,index:t,isActive:r,onClick:l}){let a=`flex-none rounded transition-all ${r?"ring-2 ring-dealer-primary opacity-100":"opacity-60 hover:opacity-100"}`;return"image"===e.type?(0,c.jsx)("button",{type:"button",onClick:l,className:a,"aria-label":`Go to image ${t+1}`,children:(0,c.jsx)("img",{src:e.thumbnail,alt:"",className:"h-16 w-24 rounded object-cover",loading:"lazy"})}):"video"===e.type&&e.thumbnail?(0,c.jsxs)("button",{type:"button",onClick:l,className:`${a} relative`,"aria-label":`Go to video ${t+1}`,children:[(0,c.jsx)("img",{src:e.thumbnail,alt:"",className:"h-16 w-24 rounded object-cover",loading:"lazy"}),(0,c.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,c.jsx)("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-black/60 text-white",children:(0,c.jsx)("svg",{className:"h-3 w-3 translate-x-px",fill:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{d:"M8 5v14l11-7z"})})})})]}):"video"===e.type?(0,c.jsx)("button",{type:"button",onClick:l,className:`${a} flex h-16 w-24 items-center justify-center rounded bg-gray-800`,"aria-label":`Go to video ${t+1}
36`,children:(0,c.jsx)("svg",{className:"h-6 w-6 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{d:"M8 5v14l11-7z"})})}):"walkaround"===e.type?(0,c.jsxs)("button",{type:"button",onClick:l,className:`${a} relative`,"aria-label":`Go to walkaround ${t+1}`,children:[e.thumbnail?(0,c.jsx)("img",{src:e.thumbnail,alt:"",className:"h-16 w-24 rounded object-cover",loading:"lazy"}):(0,c.jsx)("div",{className:"h-16 w-24 rounded bg-gray-800"}),(0,c.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,c.jsx)("span",{className:"text-lg font-bold text-white drop-shadow-md",children:"360\xb0"})})]}):(0,c.jsxs)("button",{type:"button",onClick:l,className:`${a} flex h-16 w-24 flex-col items-center justify-center gap-0.5 rounded bg-gray-200`,"aria-label":`Go to document ${t+1}`,children:[(0,c.jsx)("svg",{className:"h-6 w-6 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),(0,c.jsx)("span",{className:"text-[9px] font-medium text-gray-500",children:"window_sticker"===e.kind?"Sticker":"brochure"===e.kind?"Brochure":"PDF"})]})}function e8({slides:e,initialIndex:t,onClose:r,itemParams:l,impelFlags:a}){let[n,s]=(0,d.useState)(t),m=e.length,x=e[n],h=(0,d.useRef)(null),p=(0,d.useRef)(!0),g=(0,d.useRef)(null),f=(0,d.useRef)(!0);(0,d.useEffect)(()=>{let e=g.current;if(!e)return;let t=e.children[n];t?.scrollIntoView({behavior:f.current?"auto":"smooth",block:"nearest",inline:"center"}),f.current=!1},[n]);let b=(0,d.useCallback)(()=>{h.current="prev",s(e=>(e-1+m)%m)},[m]),y=(0,d.useCallback)(()=>{h.current="next",s(e=>(e+1)%m)},[m]);(0,d.useEffect)(()=>{if(p.current){p.current=!1;return}let t=e[n];t&&((0,i.h1)({action:"view_slide",mediaType:t.type,slideIndex:n,slideCount:m,context:"lightbox",direction:h.current??"jump",itemParams:l}),h.current=null)},[n]);let v=(0,d.useCallback)(()=>{(0,i.h1)({action:"close_lightbox",mediaType:e[n]?.type,slideIndex:n,slideCount:m,context:"lightbox",itemParams:l}),r()},[r,e,n,m,l]);return(0,d.useEffect)(()=>{let e=e=>{"Escape"===e.key&&v(),"ArrowLeft"===e.key&&b(),"ArrowRight"===e.key&&y()};return document.addEventListener("keydown",e),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=""}},[v,b,y]),(0,u.createPortal)((0,c.jsxs)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/90",onClick:v,children:[(0,c.jsx)("button",{type:"button",onClick:v,className:"absolute right-4 top-4 z-10 flex h-10 w-10 items-center justify-center rounded-full bg-white/10 text-white backdrop-blur-sm hover:bg-white/20","aria-label":"Close lightbox",children:(0,c.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,c.jsx)("div",{className:"absolute left-4 top-4 z-10 rounded-full bg-white/10 px-3 py-1.5 backdrop-blur-sm",children:(0,c.jsxs)("span",{className:"text-sm font-medium text-white",children:[n+1," / ",m]})}),(0,c.jsxs)("div",{className:"flex max-h-[85vh] max-w-[90vw] items-center justify-center",onClick:e=>e.stopPropagation(),children:["image"===x.type&&(0,c.jsx)("img",{src:x.url,alt:x.alt,className:"max-h-[85vh] max-w-[90vw] object-contain"}),("video"===x.type||"walkaround"===x.type)&&"video"===x.type&&"mp4"===x.provider&&(0,c.jsx)("video",{src:x.url,controls:!0,autoPlay:!0,className:"max-h-[85vh] max-w-[90vw]"}),("video"===x.type||"walkaround"===x.type)&&("video"!==x.type||"mp4"!==x.provider)&&(0,c.jsx)("iframe",{src:"walkaround"===x.type&&"impel"===x.provider?`${x.url}${(0,o.a)(a)}`:x.url,className:"aspect-video w-[85vw] max-w-5xl",allow:"autoplay; fullscreen; picture-in-picture; encrypted-media",allowFullScreen:!0,title:"walkaround"===x.type?"360\xb0 Tour":"Video"})]}),m>1&&"walkaround"!==x.type&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),b()},className:"absolute left-4 top-1/2 z-10 flex h-12 w-12 -translate-y-1/2 items-center justify-center rounded-full bg-white/10 text-white backdrop-blur-sm hover:bg-white/20","aria-label":"Previous",children:(0,c.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),(0,c.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),y()},className:"absolute right-4 top-1/2 z-10 flex h-12 w-12 -translate-y-1/2 items-center justify-center rounded-full bg-white/10 text-white backdrop-blur-sm hover:bg-white/20","aria-label":"Next",children:(0,c.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),m>1&&(0,c.jsx)("div",{ref:g,className:"absolute bottom-4 left-1/2 z-10 flex max-w-[90vw] -translate-x-1/2 gap-1.5 overflow-x-auto rounded-lg bg-black/50 p-2 backdrop-blur-sm",style:{scrollbarWidth:"none"},children:e.map((e,t)=>(0,c.jsx)(e7,{slide:e,index:t,isActive:t===n,onClick:()=>s(t)},t))})]}),document.body)}var e9=(0,x.default)(()=>r.e(6785).then(r.bind(r,6785)).then(e=>e.WalkaroundSlide),{loadableGenerated:{webpack:()=>[require.resolveWeak("./walkaround-slide-Z6SHRARL.js")]},ssr:!1}),te=[{key:"all",label:"ALL"},{key:"exterior",label:"EXTERIOR"},{key:"interior",label:"INTERIOR"},{key:"floorplan",label:"FLOORPLAN"},{key:"walkaround",label:"360\xb0"},{key:"document",label:"DOCUMENTS"},{key:"video",label:"VIDEO"}],tt=[...te,{key:"photos",label:"PHOTOS"}];function tr(e,t){return"all"===t||("photos"===t?"walkaround"!==e.type:"walkaround"===t?"walkaround"===e.type:"document"===t?"document"===e.type:"video"===t?"video"===e.type:"image"===e.type&&e.category===t)}function tl({slide:e}){return("video"===e.type||"walkaround"===e.type)&&e.thumbnail?(0,c.jsxs)("div",{className:"relative h-full w-full flex-none snap-start bg-gray-900",children:[(0,c.jsx)("img",{src:e.thumbnail,alt:"",className:"h-full w-full object-cover",loading:"lazy"}),(0,c.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,c.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-black/60 text-white",children:"video"===e.type?(0,c.jsx)("svg",{className:"h-6 w-6 translate-x-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{d:"M8 5v14l11-7z"})}):(0,c.jsx)("span",{className:"text-sm font-bold",children:"360\xb0"})})})]}):"video"===e.type||"walkaround"===e.type?(0,c.jsx)("div",{className:"relative flex h-full w-full flex-none snap-start items-center justify-center bg-gray-800",children:(0,c.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-black/60 text-white",children:"video"===e.type?(0,c.jsx)("svg",{className:"h-6 w-6 translate-x-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{d:"M8 5v14l11-7z"})}):(0,c.jsx)("span",{className:"text-sm font-bold",children:"360\xb0"})})}):"document"!==e.type?null:(0,c.jsxs)("div",{className:"flex h-full w-full flex-none snap-start flex-col items-center justify-center gap-2 bg-gray-50",children:[(0,c.jsx)("svg",{className:"h-12 w-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,c.jsx)("span",{className:"text-xs font-medium uppercase tracking-wide text-gray-400",children:"window_sticker"===e.kind?"Window Sticker":"brochure"===e.kind?"Brochure":"Document"})]})}function ta({slide:e,isActive:t,isClone:r=!1,onOpenLightbox:l,inlineDocuments:a=!0,priority:n=!1,eager:s=!1,impelFlags:i,bdvTracking:o}){if("image"===e.type)return(0,c.jsx)(eZ,{url:e.url,alt:r?"":e.alt,responsive:e.responsive,onClick:l,priority:n,eager:s||r});if(!r&&t)switch(e.type){case"video":return(0,c.jsx)(eX,{url:e.url,provider:e.provider,bdvTracking:o});case"walkaround":return(0,c.jsx)(e9,{url:e.url,provider:e.provider,impelFlags:i});case"document":return(0,c.jsx)(e6,{url:e.url,kind:e.kind,inline:a})}return(0,c.jsx)(tl,{slide:e})}function tn({showArrows:e=!0,showThumbnails:t=!0,lightbox:r=!0,showFloorplan:l,showCategories:n=!1,inlineDocuments:s=!0,impelFlags:o,categoriesPosition:u="above",categories:m,categoryLabels:x,showCategoryCounts:h=!0,categoriesClassName:p,categoryChipClassName:g,categoryChipActiveClassName:f,className:b,priority:y=!0,eager:v=!1,excludeTypes:j}){let w,N,k,{item:C}=(0,a.H)(),{config:$}=(0,i.dY)(),L=$.branding.placeholderImage,M=e1($.bdv,C?.company_location?.name),S=C?e4(C,$.bdv?.lookupKey):null,_=(0,d.useMemo)(()=>M&&S?{dealerId:M,vin:S}:null,[M,S]),z=$.inventory.imageAspectRatio??"4/3",W=(0,d.useRef)(null),T=(0,d.useRef)(null),[B,F]=(0,d.useState)(0),[A,P]=(0,d.useState)(!1),[I,R]=(0,d.useState)(m?.[0]??"all"),[E,U]=(0,d.useState)(!1);(0,d.useEffect)(()=>U(!0),[]);let H=C?.gallery_slides??[],V=j?.length?H.filter(e=>!j.includes(e.type)):H,D=m?m.map(e=>tt.find(t=>t.key===e)).filter(e=>!!e):te,O=(()=>
36{if(!n)return[];let e=D.map(e=>({...e,label:x?.[e.key]??e.label,count:"all"===e.key?V.length:V.filter(t=>tr(t,e.key)).length})).filter(e=>"all"===e.key||e.count>0);return m&&e.length<2?[]:e})(),G=n&&O.length>0,K=G?V.filter(e=>tr(e,I)):V,Y=E&&K.length>1,q=+!!Y,[Q,Z]=(0,d.useState)(!1),J=Q&&K.length>1?Math.max(1,Math.ceil(6/K.length)):0,X=2*J+1,ee=J*K.length;(0,d.useLayoutEffect)(()=>{let e=T.current;!e||K.length<=1||0===e.children.length||Z(e.scrollWidth/e.children.length*K.length>e.clientWidth+1)},[K.length,I]);let et=(0,d.useRef)(K.length);et.current=K.length;let er=(0,d.useRef)(X);er.current=X;let el=(0,d.useRef)(ee);el.current=ee;let ea=(0,d.useRef)(null),en=(0,d.useRef)(!1),es=(0,d.useRef)(q),ei=(0,d.useRef)(0);(0,d.useEffect)(()=>{let e,t=W.current;if(!t)return;let r=()=>{let e=et.current;if(e<=1)return;let r=t.clientWidth;if(0===r)return;let l=Math.round(t.scrollLeft/r),a=((l-1)%e+e)%e;l<=0||l>=e+1?(t.scrollLeft=r*(a+1),es.current=a+1):es.current=l,F(e=>e===a?e:a)},l=()=>{clearTimeout(e),e=setTimeout(r,150)};return t.addEventListener("scrollend",r),t.addEventListener("scroll",l,{passive:!0}),()=>{t.removeEventListener("scrollend",r),t.removeEventListener("scroll",l),clearTimeout(e)}},[]),(0,d.useLayoutEffect)(()=>{W.current&&(W.current.scrollLeft=W.current.clientWidth*q,es.current=q)},[I,q]),(0,d.useLayoutEffect)(()=>{let e=T.current;if(!e||X<=1)return;let t=e.children[ee];t&&(e.scrollLeft+=t.getBoundingClientRect().left-e.getBoundingClientRect().left,ea.current=ee,en.current=!1)},[ee,X,I]),(0,d.useEffect)(()=>{let e=T.current,t=K.length;if(!e||0===t)return;if(X<=1)return void e.children[B]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"});null===ea.current&&(ea.current=ee+B);let r=ea.current,l=1/0;for(let e=0;e<X;e++){let a=e*t+B,n=Math.abs(a-ea.current);n<l&&(l=n,r=a)}ea.current=r;let a=e.children[r];if(a){if(!en.current){let t=e.getBoundingClientRect(),r=a.getBoundingClientRect();r.left+r.width/2>t.left+t.width/2&&(en.current=!0)}a.scrollIntoView({behavior:"smooth",block:"nearest",inline:en.current?"center":"nearest"})}},[B,ee,X,K.length]),(0,d.useEffect)(()=>{let e,t=T.current;if(!t)return;let r=()=>{let e=et.current;if(er.current<=1||0===e||null===ea.current)return;let r=(ea.current%e+e)%e,l=el.current+r;if(ea.current!==l){let e=t.children[ea.current],r=t.children[l];e&&r&&(t.scrollLeft+=r.offsetLeft-e.offsetLeft,ea.current=l)}},l=()=>{clearTimeout(e),e=setTimeout(r,200)};return t.addEventListener("scrollend",r),t.addEventListener("scroll",l,{passive:!0}),()=>{t.removeEventListener("scrollend",r),t.removeEventListener("scroll",l),clearTimeout(e)}},[]);let eo=(0,d.useRef)(null),ed=(0,d.useRef)(!0),ec=(0,d.useCallback)(e=>{let t=W.current,r=et.current;if(!t||r<=1)return;let l=t.clientWidth;if(0===l)return;eo.current=e;let a="u">typeof performance?performance.now():0,n=a-ei.current<400;ei.current=a;let s=es.current;s<=0?t.scrollLeft=l*(s=r):s>=r+1&&(t.scrollLeft=l*(s=1));let i="next"===e?s+1:s-1;es.current=i,F(((i-1)%r+r)%r),t.scrollTo({left:l*i,behavior:n?"auto":"smooth"})},[]),eu=(0,d.useCallback)(e=>{let t=W.current,r=et.current;if(!t||0===r)return;let l=t.clientWidth;if(0===l)return;let a=es.current;a<=0?a=r:a>=r+1&&(a=1);let n=((a-1)%r+r)%r;if(e===n)return;let s=(e-n+r)%r,i=(n-e+r)%r,o=Math.min(s,i)<Math.abs(e-n);o&&1===Math.min(s,i)?ec(s<i?"next":"prev"):(es.current!==a&&(t.scrollLeft=l*a),es.current=e+1,eo.current||(eo.current="jump"),F(e),t.scrollTo({left:l*(e+1),behavior:o?"auto":"smooth"}))},[ec]);(0,d.useEffect)(()=>{if(K.length<=1||A)return;let e=e=>{if("ArrowLeft"!==e.key&&"ArrowRight"!==e.key)return;let t=e.target;if(t){let e=t.tagName;if("INPUT"===e||"TEXTAREA"===e||"SELECT"===e||t.isContentEditable)return}e.preventDefault(),ec("ArrowRight"===e.key?"next":"prev")};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[K.length,A,ec]);let em=C?(0,i.E6)(C):void 0,ex=K[B];if((0,d.useEffect)(()=>{if(ed.current){ed.current=!1;return}C&&ex&&((0,i.h1)({action:"view_slide",mediaType:ex.type,slideIndex:B,slideCount:K.length,context:"main",direction:eo.current??"jump",itemParams:em}),eo.current=null)},[B,C?.id]),!C)return null;if(0===K.length)return L?(0,c.jsx)("img",{src:L,alt:"Coming soon",className:b??"w-full object-contain",style:{aspectRatio:z}}):(0,c.jsx)("div",{className:b??"flex items-center justify-center bg-gray-100 text-gray-400",style:{aspectRatio:z},children:"No Images Available"});let eh=K[B],ep=r&&eh?.type!=="document",eg=eh?.type==="walkaround",ef=()=>{if((0,i.h1)({action:"open_lightbox",mediaType:eh?.type,slideIndex:B,slideCount:K.length,context:"main",itemParams:em}),eh?.type==="document"){let e=Math.min(900,window.screen.availWi
36dth-40),t=Math.min(1100,window.screen.availHeight-80),r=Math.max(0,(window.screen.availWidth-e)/2),l=Math.max(0,(window.screen.availHeight-t)/2);window.open(eh.url,"_blank",`popup,width=${e},height=${t},left=${r},top=${l},noopener,noreferrer`)}else P(!0)},eb=G?(0,c.jsx)("div",{className:p??"mb-3 flex gap-2 overflow-x-auto",style:{scrollbarWidth:"none"},children:O.map(e=>{let t=I===e.key;return(0,c.jsx)("button",{type:"button",onClick:()=>{R(e.key),F(0)},className:`${g??"rounded-full px-3 py-1.5 text-xs font-semibold uppercase tracking-wide whitespace-nowrap"} ${t?f??(g?"":"text-white"):g?"":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`.trim(),style:t&&!f?{backgroundColor:$.branding.colors.primary}:void 0,children:h?`${e.label} (${e.count})`:e.label},e.key)})}):null;return(0,c.jsxs)("div",{children:["above"===u&&eb,(0,c.jsxs)("div",{className:`relative overflow-hidden ${b??""}`,style:{aspectRatio:z},children:[(0,c.jsxs)("div",{ref:W,className:"flex h-full snap-x snap-mandatory overflow-x-auto overflow-y-hidden",style:{scrollbarWidth:"none"},children:[Y&&(0,c.jsx)("div",{"aria-hidden":"true",className:"contents",children:(0,c.jsx)(ta,{slide:K[K.length-1],isActive:!1,isClone:!0,inlineDocuments:s})}),K.map((e,t)=>(0,c.jsx)(ta,{slide:e,isActive:t===B,onOpenLightbox:"image"===e.type&&r?ef:void 0,inlineDocuments:s,priority:y&&0===t,eager:"all"===v||1>=Math.abs(t-B),impelFlags:o,bdvTracking:_},t)),Y&&(0,c.jsx)("div",{"aria-hidden":"true",className:"contents",children:(0,c.jsx)(ta,{slide:K[0],isActive:!1,isClone:!0,inlineDocuments:s})})]}),e&&K.length>1&&!eg&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("button",{type:"button",onClick:()=>ec("prev"),className:"absolute left-3 top-1/2 z-10 flex h-12 w-12 -translate-y-1/2 items-center justify-center rounded-full bg-black/50 text-white shadow-lg hover:bg-black/70","aria-label":"Previous",children:(0,c.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),(0,c.jsx)("button",{type:"button",onClick:()=>ec("next"),className:"absolute right-3 top-1/2 z-10 flex h-12 w-12 -translate-y-1/2 items-center justify-center rounded-full bg-black/50 text-white shadow-lg hover:bg-black/70","aria-label":"Next",children:(0,c.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),(G?K.length>0:K.length>1)&&(0,c.jsx)("div",{className:`absolute left-3 flex items-center gap-2 rounded-full bg-black/60 px-3 py-1.5 ${eg?"bottom-3":"top-3"}`,children:(0,c.jsxs)("span",{className:"text-xs font-medium text-white",children:[B+1," / ",K.length]})}),r&&(0,c.jsx)("button",{type:"button",onClick:ef,className:`absolute right-3 z-10 flex h-9 w-9 items-center justify-center rounded-full bg-black/50 text-white shadow-lg hover:bg-black/70 ${eg?"bottom-3":"top-3"}`,"aria-label":eh?.type==="document"?"Open document":"View full size",children:(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:eh?.type==="document"?(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}):(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})})})]}),"below"===u&&eb,t&&(G?K.length>0:K.length>1)&&(0,c.jsx)("div",{ref:T,className:`mt-2 flex gap-1.5 overflow-x-auto ${Q?"":"justify-center"}`,style:{scrollbarWidth:"none"},children:Array.from({length:X}).map((e,t)=>K.map((e,r)=>(0,c.jsx)(e7,{slide:e,index:r,isActive:r===B,onClick:()=>eu(r)},`${t}-${r}`)))}),A&&ep&&(w=K.filter(e=>"document"!==e.type),N=K.slice(0,B).filter(e=>"document"===e.type).length,k=Math.min(B-N,w.length-1),(0,c.jsx)(e8,{slides:w,initialIndex:Math.max(k,0),onClose:()=>P(!1),itemParams:em,impelFlags:o}))]})}function ts({truncate:e,showReadMore:t=!0,className:r}){let{item:l}=(0,a.H)(),[n,s]=(0,d.useState)(!1);if(!l?.description)return null;let i=l.description.replace(/<[^>]*>/g,"").replace(/&[^;]+;/g," ").replace(/\s+/g," ").trim(),o=e&&!n&&i.length>e,u=t&&e&&i.length>e;return(0,c.jsxs)("div",{className:r,children:[o?(0,c.jsxs)("p",{children:[i.slice(0,e),"..."]}):(0,c.jsx)("div",{dangerouslySetInnerHTML:{__html:l.description}}),u&&(0,c.jsx)("button",{type:"button",onClick:()=>s(!n),className:"mt-2 text-sm text-blue-600 hover:underline",children:n?"Read Less":"Read More"})]})}function ti({separator:e="/",homeLabel:t="Home",homeHref:r="/",srpLabel:l="Inventory",srpHref:n="/inventory",className:s}){let{item:i}=(0,a.H)();return i?(0,c.jsx)("nav",{"aria-label":"Breadcrumb",className:s??"text-sm text-gray-500",children:(0,c.jsxs)("ol",{className:"flex items-center gap-1",children:[(0,c.jsx)("li",{children:(0,c.jsx)("a",{href:r,className:"hover:underline",children:t})}),(0,c.jsx)("li",{children:e}),(0,c.jsx)("li",{children:(0,c.jsx)("a",{href:n,className:"hover:underline",children:l})}),(0,c.jsx)("li",{children:e}),(0,c.jsx)("li",{className:"text-gray-900",children:i.title})]})}):null}function to(e){return e.replace(/[_/]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()}function td({category:e}){let t=e.toLowerCase();return t.includes("interior")?(0,c.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}):t.includes("comfort")?(0,c.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})}):t.includes("appliance")?(0,c.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"})}):t.includes("exterior")?(0,c.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})}):t.includes("powertrain")||t.includes("mechanical")?(0,c.jsxs)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}):t.includes("entertainment")?(0,c.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}):(0,c.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})}function tc(e,t){let r=e.toLowerCase();return t.some(e=>e.toLowerCase()===r)}function tu({layout:e="list",columns:t=3,className:r,exclude:l=[]}){let{item:n}=(0,a.H)();if(!n)return null;if("grouped"===e){let e=n.feature_groups??[];if(0===e.length)return null;let t=function(e){let t=new Map;for(let r of e){let e=t.get(r.category)??[];e.push(r),t.set(r.category,e)}return t}(e);return(0,c.jsx)("div",{className:r??"space-y-6",children:Array.from(t.entries()).map(([e,t])=>{let r=t.map(e=>({...e,items:e.items.filter(e=>!tc(e.displayName,l))})).filter(e=>e.items.length>0);return 0===r.length?null:(0,c.jsxs)("div",{className:"rounded-lg border bg-white shadow-sm",children:[(0,c.jsxs)("div",{className:"flex items-center gap-2 border-b bg-gray-50 px-4 py-3",children:[(0,c.jsx)("span",{className:"text-dealer-primary",children:(0,c.jsx)(td,{category:e})}),(0,c.jsx)("h3",{className:"text-sm font-bold uppercase tracking-wide text-gray-700",children:to(e)})]}),(0,c.jsx)("div",{className:"divide-y",children:r.map(e=>(0,c.jsxs)("div",{className:"px-4 py-3",children:[(0,c.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wider text-gray-600",children:to(e.subcategory)}),(0,c.jsx)("div",{className:"grid gap-x-8 gap-y-1 sm:grid-cols-2",children:e.items.map(e=>(0,c.jsxs)("div",{className:"flex items-baseline justify-between gap-2 text-sm",children:[(0,c.jsx)("span",{className:"text-gray-500",children:e.displayName}),(0,c.jsxs)("span",{className:"font-medium text-gray-900",children:[e.value,e.measureUnit?` ${e.measureUnit}`:""]})]},e.displayName))})]},e.subcategory))})]},e)})})}let s=(Array.isArray(n.features)?n.features:[]).filter(e=>!tc(e,l));return 0===s.length?null:"grid"===e?(0,c.jsx)("ul",{className:r??"text-sm",style:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"0.25rem"},children:s.map(e=>(0,c.jsx)("li",{children:e},e))}):(0,c.jsx)("ul",{className:r??"list-disc pl-5 text-sm space-y-0.5",children:s.map(e=>(0,c.jsx)("li",{children:e},e))})}function tm({layout:e="list",columns:t=3,className:r}){let{item:l}=(0,a.H)(),n=Array.isArray(l?.options)?l.options:[];return l&&0!==n.length?"grid"===e?(0,c.jsx)("ul",{className:r??"text-sm",style:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"0.25rem"},children:n.map(e=>(0,c.jsx)("li",{children:e},e))}):(0,c.jsx)("ul",{className:r??"list-disc pl-5 text-sm space-y-0.5",children:n.map(e=>(0,c.jsx)("li",{children:e},e))}):null}function tx({showDirectionsLink:e=!0,className:t}){let{item:r}=(0,a.H)();if(!r)return null;let l=r.company_location,n=[l.address,l.city,l.state,l.zip].filter(
36Boolean).join(", ");if(!n&&!l.name)return null;let s=encodeURIComponent(n||l.name),i=`https://www.google.com/maps/dir/?api=1&destination=${s}`;return(0,c.jsxs)("div",{className:t??"space-y-2",children:[(0,c.jsx)("p",{className:"font-medium",children:l.name}),n&&(0,c.jsx)("p",{className:"text-sm text-gray-600",children:n}),e&&(0,c.jsx)("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-block text-sm text-blue-600 hover:underline",children:"Get Directions"})]})}function th({size:e=128,className:t}){let{item:r}=(0,a.H)();if(!r)return null;let l="u">typeof window?window.location.href:"";return(0,c.jsxs)("div",{className:t??"inline-flex flex-col items-center gap-1","data-qr-url":l,"aria-label":"QR Code",children:[(0,c.jsx)("div",{style:{width:e,height:e},className:"flex items-center justify-center border-2 border-gray-300 rounded bg-white text-xs text-gray-400",children:"QR Code"}),(0,c.jsx)("span",{className:"text-xs text-gray-500",children:"Scan to view"})]})}function tp({className:e="p-2"}){let{item:t}=(0,a.H)(),{isFavorite:r,toggle:n}=(0,l.rB)();if(!t)return null;let s=r(t.id);return(0,c.jsx)("button",{type:"button",className:e,"aria-pressed":s,"aria-label":s?"Remove from favorites":"Add to favorites",onClick:()=>n(t.id),children:(0,c.jsx)("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:s?"currentColor":"none",stroke:"currentColor",strokeWidth:2*!s,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"})})})}var tg="rounded border px-2 py-1 text-sm transition-colors",tf=`${tg} border-gray-300 text-gray-700 hover:bg-gray-50`,tb=`${tg} border-transparent bg-dealer-primary text-white`;function ty({className:e}){let{item:t}=(0,a.H)(),{isComparing:r,toggle:n}=(0,l.fo)();if(!t)return null;let s=r(t.id);return(0,c.jsx)("button",{type:"button",className:e??(s?tb:tf),"aria-pressed":s,"aria-label":s?"Remove from compare":"Add to compare",onClick:()=>n(t.id),children:"Compare"})}function tv({text:e="Financing terms are subject to credit approval. Rates and terms may vary. Contact dealer for details.",className:t}){return(0,c.jsx)("p",{className:t,children:e})}function tj(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e)}function tw({defaultPrice:e=0,defaultDownPayment:t=0,defaultTerm:r=60,defaultRate:l=6.99,showTradeIn:n=!1,defaultTradeIn:s=0,editablePrice:o=!1,useWebFinancing:u=!1,cadence:m,colorScheme:x="primary",className:h}){let p=(0,d.useContext)(a.XZ),g=(0,d.useContext)(i.BN)?.config.paymentCadence,f=m??g??"monthly",b=p?.item??null,y=b?.price_current??b?.price_msrp??null,v=u?b?.web_financing??null:null,[j,w]=(0,d.useState)(null),[N,k]=(0,d.useState)(null),[C,$]=(0,d.useState)(null),[L,M]=(0,d.useState)(null),[S,_]=(0,d.useState)(null),z=!o&&null!==y,W=y??e,T=v?.rate??l,B=v?.term_months??r,F=v&&null!==y?Math.round(v.down_payment??(0,a.YO)(y,v.down_payment_percentage,v.include_rebates,b?.manufacturer_rebate)):t,A=j??String(W),P=N??String(F),I=C??String(B),R=L??String(T),E=S??String(s),U=z&&null!==y?y:Number(A)||0,H=Number(R)||0,V=Number(I)||0,D=Number(P)||0,O=n&&Number(E)||0,{financed:G,monthly:K,biweekly:Y}=(0,d.useMemo)(()=>(0,a.l4)({price:U,downPayment:D,tradeInAllowance:O,termMonths:V,rate:H,includeTax:v?.include_tax,taxPercentage:v?.tax_percentage,includeFees:v?.include_fees,fees:v?.fees,dealerFees:v?.dealer_fees,includeRebates:v?.include_rebates,manufacturerRebate:b?.manufacturer_rebate}),[U,D,O,V,H,v,b?.manufacturer_rebate]),q=Math.round("biweekly"===f?Y:K),Q=Math.max(0,(0,a.IG)(U,v?.include_rebates,b?.manufacturer_rebate)-D-O),Z=G>0&&Math.round(G)>Math.round(Q),J="secondary"===x?"w-full rounded-lg border border-gray-200 bg-white py-2.5 text-sm text-gray-900 shadow-sm transition-colors focus:border-dealer-secondary focus:outline-none focus:ring-1 focus:ring-dealer-secondary":"w-full rounded-lg border border-gray-200 bg-white py-2.5 text-sm text-gray-900 shadow-sm transition-colors focus:border-dealer-primary focus:outline-none focus:ring-1 focus:ring-dealer-primary";return(0,c.jsxs)("div",{className:h,children:[z&&null!==y?(0,c.jsxs)("div",{"data-testid":"item-price",className:"text-center",children:[(0,c.jsx)("span",{className:"text-sm text-gray-500",children:"Vehicle Price"}),(0,c.jsx)("div",{className:"text-2xl font-bold text-gray-900",children:tj(y)})]}):(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"item-calc-price",className:"block text-sm font-medium text-gray-700",children:"Vehicle price"}),(0,c.jsxs)("div",{className:"relative mt-1",children:[(0,c.jsx)("span",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-sm text-gray-400",children:"$"}),(0,c.jsx)("input",{id:"item-calc-price",type:"number",value:A,onChange:e=>w(e.target.value),className:`${J} pl-7 pr-3`})]})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"item-calc-down",className:"block text-sm font-medium text-gray-700",children:"Down payment"}),(0,c.jsxs)("div",{className:"relative mt-1",children:[(0,c.jsx)("span",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-sm text-gray-400",children:"$"}),(0,c.jsx)("input",{id:"item-calc-down",type:"number",value:P,onChange:e=>k(e.target.value),className:`${J} pl-7 pr-3`})]})]}),n&&(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"item-calc-trade",className:"block text-sm font-medium text-gray-700",children:"Trade-in allowance"}),(0,c.jsxs)("div",{className:"relative mt-1",children:[(0,c.jsx)("span",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-sm text-gray-400",children:"$"}),(0,c.jsx)("input",{id:"item-calc-trade",type:"number",value:E,onChange:e=>_(e.target.value),className:`${J} pl-7 pr-3`})]})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"item-calc-term",className:"block text-sm font-medium text-gray-700",children:"Loan term (months)"}),(0,c.jsx)("input",{id:"item-calc-term",type:"number",value:I,onChange:e=>$(e.target.value),className:`${J} mt-1 px-3`})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"item-calc-rate",className:"block text-sm font-medium text-gray-700",children:"Interest rate (%)"}),(0,c.jsx)("input",{id:"item-calc-rate",type:"number",value:R,step:"0.01",onChange:e=>M(e.target.value),className:`${J} mt-1 px-3`})]}),(0,c.jsxs)("div",{"data-testid":"monthly-payment",className:"secondary"===x?"rounded-lg bg-dealer-secondary/10 p-4 text-center":"rounded-lg bg-dealer-primary/10 p-4 text-center",children:[(0,c.jsx)("span",{className:"secondary"===x?"text-sm font-medium text-dealer-secondary":"text-sm font-medium text-dealer-primary",children:"Estimated Payment"}),(0,c.jsxs)("div",{className:"secondary"===x?"text-2xl font-bold text-dealer-secondary":"text-2xl font-bold text-dealer-primary",children:[tj(q),"biweekly"===f?"/bi-weekly":"/mo"]})]}),Z&&(0,c.jsxs)("div",{"data-testid":"amount-financed",className:"text-xs text-gray-500",children:["Amount financed ",tj(G),", including taxes and fees"]})]})}function tN({onSelect:e,className:t}){let{item:r}=(0,a.H)(),l=Array.isArray(r?.exterior_colors)?r.exterior_colors:[];return r&&0!==l.length?(0,c.jsx)("div",{className:t,role:"group","aria-label":"Exterior colors",children:l.map(t=>(0,c.jsx)("button",{type:"button","aria-label":t.name,style:{backgroundColor:t.hex_code??"#ccc"},onClick:()=>e?.(t.name)},t.id))}):null}function tk({children:e,onClose:t}){return(0,d.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",e),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=""}},[t]),(0,u.createPortal)((0,c.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/50","data-testid":"modal-backdrop",onClick:t,children:(0,c.jsxs)("div",{className:"relative mx-4 max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-lg bg-white p-6 shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,c.jsx)("button",{type:"button",onClick:t,className:"absolute right-3 top-3 flex h-8 w-8 items-center justify-center rounded-full text-gray-400 hover:bg-gray-100 hover:text-gray-600","aria-label":"Close modal",children:(0,c.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,c.jsx)(a.DK,{value:t,children:e})]})}),document.body)}function tC({label:e,icon:t,href:r,onClick:l,modal:a,variant:n="primary",className:o}){let[u,m]=(0,d.useState)(!1),x=o??("primary"===n?"inline-flex min-h-[36px] items-center justify-center gap-1.5 whitespace-nowrap rounded-md bg-dealer-primary px-3 py-2 text-sm font-semibold text-white hover:bg-dealer-primary-dark":"inline-flex min-h-[36px] items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-semibold text-gray-700 hover:bg-gray-50"),{isAdmin:h}=(0,i.YQ)(),p=(0,d.useMemo)(()=>(function e(t,r=0){if(r>8||null==t||"boolean"==typeof t)return null;if(Array.isArray(t)){for(let l of t){let t=e(l,r+1);if(t)return t}return null}if(!(0,d.isValidElement)(t))return null;let l=t.props;return"string"==typeof l.formId&&""!==l.formId?l.formId:e(l.children,r+1)}
36)(a),[a]),g=h&&!u&&null!==p,f=(0,c.jsxs)(c.Fragment,{children:[t&&(0,c.jsx)(s.In,{name:t,size:16}),(0,c.jsx)("span",{children:e})]});if(r)return(0,c.jsx)("a",{href:r,className:x,children:f});if(a){let e=(0,c.jsx)("button",{type:"button",onClick:()=>m(!0),className:x,children:f});return(0,c.jsxs)(c.Fragment,{children:[g?(0,c.jsxs)("span",{className:"relative inline-flex",children:[e,(0,c.jsx)(i.TD,{mode:"card",entity:"websiteForm",id:p})]}):e,u&&(0,c.jsx)(tk,{onClose:()=>m(!1),children:a})]})}return(0,c.jsx)("button",{type:"button",onClick:l,className:x,children:f})}function t$(e,t,r=85,l="auto"){let a=`format=${l},width=${t},quality=${r}`;if(/^https?:\/\//.test(e))return`/cdn-cgi/image/${a}/${e}`;let n=e.startsWith("/")?e:`/${e}`;return`/cdn-cgi/image/${a}${n}`}function tL(e,t,r=85,l="auto"){return t.map(t=>`${t$(e,t,r,l)} ${t}w`).join(", ")}var tM=[400,800,1200];function tS(e,t,r){let l=eQ(t);return l?{src:e,srcSet:l}:r?{src:t$(e,tM[tM.length-1],75),srcSet:tL(e,tM,75)}:{src:e,srcSet:void 0}}function t_({maxImages:e=5,className:t,sizes:r="(min-width: 1024px) 33vw, (min-width: 640px) 50vw, 100vw",priority:l=!1,optimizeImages:n=!1}){let{item:s}=(0,a.H)(),{config:o}=(0,i.dY)(),u=(0,d.useRef)(null),[m,x]=(0,d.useState)(0),h=o.branding.placeholderImage,p=o.inventory.imageAspectRatio??"4/3";if(!s)return null;let g=(s.gallery_slides??[]).filter(e=>"image"===e.type),f=g.length>0?g.slice(0,e).map(e=>({url:e.url,responsive:e.responsive})):s.display_image?[{url:s.display_image}]:[];if(0===f.length)return h?(0,c.jsx)("img",{src:h,alt:"Coming soon",className:`w-full object-contain ${t??""}`,style:{aspectRatio:p}}):(0,c.jsx)("div",{className:`flex items-center justify-center bg-gray-100 text-gray-400 ${t??""}`,style:{aspectRatio:p},children:"No Image"});if(1===f.length){let{src:e,srcSet:a}=tS(f[0].url,f[0].responsive,n);return(0,c.jsx)("img",{src:e,srcSet:a,sizes:r,alt:s.title,decoding:"async",...l?{loading:"eager",fetchPriority:"high"}:{loading:"lazy"},className:`w-full object-contain ${t??""}`,style:{aspectRatio:p}})}let b=e=>{let t=u.current;if(!t)return;let r=Math.max(0,Math.min(e,f.length-1));t.scrollTo({left:r*t.offsetWidth,behavior:"smooth"}),x(r)};return(0,c.jsxs)("div",{className:`group relative overflow-hidden ${t??""}`,style:{aspectRatio:p},children:[(0,c.jsx)("div",{ref:u,onScroll:()=>{let e=u.current;e&&x(Math.round(e.scrollLeft/e.offsetWidth))},className:"flex h-full snap-x snap-mandatory overflow-x-auto scrollbar-hide",style:{scrollbarWidth:"none"},children:f.map((e,t)=>{let{src:a,srcSet:i}=tS(e.url,e.responsive,n);return(0,c.jsx)("img",{src:a,srcSet:i,sizes:r,alt:`${s.title} - Image ${t+1}`,className:"h-full w-full flex-none snap-center object-contain",decoding:"async",...l&&0===t?{loading:"eager",fetchPriority:"high"}:{loading:"lazy"}},e.url)})}),(0,c.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),b(m-1)},className:"absolute left-1 top-1/2 -translate-y-1/2 rounded-full bg-black/50 p-1 text-white opacity-0 transition group-hover:opacity-100","aria-label":"Previous image",children:(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),(0,c.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),b(m+1)},className:"absolute right-1 top-1/2 -translate-y-1/2 rounded-full bg-black/50 p-1 text-white opacity-0 transition group-hover:opacity-100","aria-label":"Next image",children:(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),(0,c.jsx)("div",{className:"absolute bottom-0 left-1/2 flex -translate-x-1/2 gap-0",children:f.map((e,t)=>(0,c.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),b(t)},className:"flex h-6 w-6 items-center justify-center","aria-label":`Image ${t+1}`,children:(0,c.jsx)("span",{"aria-hidden":"true",className:`block h-1.5 w-1.5 rounded-full ${t===m?"bg-white":"bg-white/50"}`})},t))})]})}function tz({badgeField:e,className:t,badgeClassName:r}){let{item:l}=(0,a.H)();if(!l)return null;let n=[];if(e){let t=l[e];"string"==typeof t&&t?n.push(t):Array.isArray(t)&&n.push(...t.filter(e=>"string"==typeof e&&""!==e))}return 0===n.length?null:(0,c.jsx)("div",{className:t??"flex flex-wrap gap-1",children:n.map(e=>(0,c.jsx)("span",{className:r??"inline-block rounded bg-dealer-primary px-2 py-0.5 text-xs font-semibold text-white",children:e},e))})}function tW(e){let t=e.trim().toLowerCase();if(!t)return null;if("transparent"===t)return{r:0,g:0,b:0,a:0};if(t.startsWith("#")){let e=t.slice(1);if(!/^[0-9a-f]+$/.test(e))return null;let r=e=>parseInt(1===e.length?e+e:e,16);return 3===e.length||4===e.length?{r:r(e[0]),g:r(e[1]),b:r(e[2]),a:4===e.length?r(e[3])/255:1}:6===e.length||8===e.length?{r:r(e.slice(0,2)),g:r(e.slice(2,4)),b:r(e.slice(4,6)
36),a:8===e.length?r(e.slice(6,8))/255:1}:null}let r=/^rgba?\(([^)]*)\)$/.exec(t);if(!r)return null;let l=r[1].split(/[,/\s]+/).filter(Boolean);if(3!==l.length&&4!==l.length)return null;let a=l.map(e=>e.endsWith("%")?Number(e.slice(0,-1))/100:Number(e));if(a.some(e=>!Number.isFinite(e)))return null;let[n,s,i]=a;return{r:n,g:s,b:i,a:4===a.length?a[3]:1}}function tT(e){let t=Math.min(Math.max(e,0),255)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function tB(e){return .2126*tT(e.r)+.7152*tT(e.g)+.0722*tT(e.b)}function tF({location:e,className:t,taglineClassName:r}){let{item:l}=(0,a.H)();if(!l||!Array.isArray(l.taglines))return null;let n=new Set,s=l.taglines.filter(t=>{if(!t.locations.includes(e))return!1;let r=t.body.toLowerCase();return!n.has(r)&&(n.add(r),!0)});return 0===s.length?null:(0,c.jsx)("div",{className:t,children:s.map(e=>{let{background:t,text:l}=function(e,t){let r,l,a=e?.trim()??"",n=a?tW(a):null,s=""!==a&&(null===n||n.a>=.1),i=s?a:"rgb(var(--dealer-primary))",o=s?n:null,d=o&&tB(o)>.5?"#111111":"#ffffff",c=t?.trim()??"";if(!c)return{background:i,text:d};let u=tW(c);return u?u.a<.1?{background:i,text:d}:o&&(r=tB(u),(Math.max(r,l=tB(o))+.05)/(Math.min(r,l)+.05)<3)?{background:i,text:d}:{background:i,text:c}:{background:i,text:c}}(e.color,e.textColor);return(0,c.jsx)("div",{className:r??"px-3 py-2 text-center text-sm font-bold [&:not(:first-child)]:mt-1",style:{backgroundColor:t,color:l},children:e.body},e.body)})})}var tA=[400,800,1200];function tP({field:e="floorplan_image",zoomable:t=!0,className:r,optimizeImages:l=!1}){let{item:n}=(0,a.H)(),[s,i]=(0,d.useState)(!1);if((0,d.useEffect)(()=>{if(!s)return;let e=e=>{"Escape"===e.key&&i(!1)};return document.addEventListener("keydown",e),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=""}},[s]),!n)return null;let o=n[e];if(!o||"string"!=typeof o)return null;let m=l?t$(o,tA[tA.length-1],75):o,x=l?tL(o,tA,75):void 0,h=l?t$(o,1600,85):o;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("img",{src:m,srcSet:x,alt:`${n.title} floorplan`,className:r??"w-full cursor-zoom-in",width:800,height:600,style:{aspectRatio:"4 / 3",objectFit:"contain"},onClick:t?()=>i(!0):void 0,role:t?"button":void 0,tabIndex:t?0:void 0,onKeyDown:t?e=>"Enter"===e.key&&i(!0):void 0}),t&&s&&(0,u.createPortal)((0,c.jsxs)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/90",role:"dialog","aria-label":"Floorplan zoom",onClick:()=>i(!1),children:[(0,c.jsx)("button",{type:"button",onClick:()=>i(!1),className:"absolute right-4 top-4 z-10 flex h-10 w-10 items-center justify-center rounded-full bg-white/10 text-white backdrop-blur-sm hover:bg-white/20","aria-label":"Close",children:(0,c.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,c.jsx)("div",{className:"flex max-h-[85vh] max-w-[90vw] items-center justify-center",onClick:e=>e.stopPropagation(),children:(0,c.jsx)("img",{src:h,alt:`${n.title} floorplan`,className:"max-h-[85vh] max-w-[90vw] object-contain"})})]}),document.body)]})}var tI={classification:{apiKey:"unitClassification.name",getValue:e=>e.unit_classification?.name},"unitClassification.name":{apiKey:"unitClassification.name",getValue:e=>e.unit_classification?.name},make:{apiKey:"unitMake.name",getValue:e=>e.unit_make?.name},"unitMake.name":{apiKey:"unitMake.name",getValue:e=>e.unit_make?.name}},tR=["unitClassification.name"];function tE({matchFields:e=tR,rangeFields:t,limit:r=6,renderItem:l,className:n,initialUnits:s}){var o,u;let{item:m}=(0,a.H)(),{config:x}=(0,i.dY)(),p=(0,d.useMemo)(()=>new i.QG({companyId:x.inventory.companyId,websiteId:x.websiteId,baseUrl:x.inventory.baseUrl,globalImplicitFilters:x.inventory.implicitFilters,imageCollectionOrder:x.inventory.imageCollectionOrder,disableCache:x.inventory.disableCache}),[x.inventory.companyId,x.inventory.baseUrl,x.inventory.implicitFilters,x.inventory.imageCollectionOrder,x.inventory.disableCache]),g=(0,d.useMemo)(()=>(function(e,t=tR,r){if(!e)return null;let l={};for(let r of t){let t=tI[r];if(t){let r=t.getValue(e);r&&(l[t.apiKey]=[r])}}for(let t of r??[]){let r=function(e,t){let r=e[t];return"number"==typeof r&&isFinite(r)&&r>0?r:void 0}(e,t.field);void 0!==r&&(l[`${t.field}Min`]=Math.floor(r*(1-t.tolerance)),l[`${t.field}Max`]=Math.ceil(r*(1+t.tolerance)))}return Object.keys(l).length>0?l:null})(m,e,t),[m,e,t]),f=g?`similar-${m?.id}-${JSON.stringify(g)}`:null,{data:b}=(0,h.Ay)(f,()=>p.fetchInventory({...g,perPage:r+1}),{revalidateOnFocus:!1}),y=(o=b?.data??s,u=m?.id,(o??[]).filter(e=>e.id!==u).slice(0,r));return 0===y.length?null:(0,c.jsx)("div",{className:n??"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:y.map(l)})}function tU({className:e,children:t}){let{item:r}=(0,a.H)(),[l,n]=(0,d.useState)(!1);if(!r)return null;let s=async()=>{let e="u">typeof window?window.location.href:"";if("u">typeof navigator&&navigator.share)try{await navigator.share({title:r.title,url:e});return}catch{}"u">typeof navigator&&navigator.clipboard&&(await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3))};return(0,c.jsx)("button",{type:"button",onClick:s,className:e??"inline-flex items-center gap-1 text-sm",children:t??(l?"Copied!":"Share")})}function tH(e){if(null==e||""===e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null}
36function tV(e){return e.split("_").filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function tD(e){return e?e.toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0}):""}function tO(e){return e?e.toLocaleString("en-US"):""}function tG({className:e,children:t,cadence:r}){let{item:l}=(0,a.H)(),{config:n}=(0,i.dY)(),s=(0,d.useCallback)(async()=>{if("u"<typeof window||!l)return;let e="";try{e=await p.toDataURL(window.location.href,{margin:1,width:240,errorCorrectionLevel:"M"})}catch{e=""}let t="object"==typeof l.unit_make?l.unit_make?.name:"",s="object"==typeof l.unit_model?l.unit_model?.name:"",i="object"==typeof l.unit_classification?l.unit_classification?.name:"",o="object"==typeof l.condition?l.condition?.name:String(l.condition??""),d=l.company_location,c=[d?.city,d?.state].filter(Boolean).join(", "),u=l.display_image??(Array.isArray(l.images)&&l.images.length>0?l.images[0].url:""),m=(function(e,t={}){let{order:r=[],onZero:l="hide",labels:a={}}=t,n=new Map,s=[];for(let t of[e,e?._raw]){if(!t)continue;for(let e of t.dealer_fees??[]){let t=e?.key;if(!t)continue;let r=tH(e?.amount),l=n.get(t);l?null===l.amount&&null!==r&&(l.amount=r):(n.set(t,{label:e?.label??tV(t),amount:r}),s.push(t))}let e=t.web_settings?.web_financing?.dealer_fees??{};for(let t of Object.keys(e)){let r=tH(e[t]),l=n.get(t);l?null===l.amount&&null!==r&&(l.amount=r):(n.set(t,{label:tV(t),amount:r}),s.push(t))}let r=t.resolved_dealer_fees??{};for(let e of Object.keys(r)){let t=tH(r[e]),l=n.get(e);l?null===l.amount&&null!==t&&(l.amount=t):(n.set(e,{label:tV(e),amount:t}),s.push(e))}}for(let[e,t]of n.entries())a[e]&&(t.label=a[e]);let i=[];for(let e of r)n.has(e)&&!i.includes(e)&&i.push(e);for(let e of s)i.includes(e)||i.push(e);let o="included"===l?"Included":"hide"===l?null:l,d=[];for(let e of i){let t=n.get(e);if(!t||null===t.amount&&null===o)continue;let r={key:e,label:t.label,amount:t.amount};null===t.amount&&null!==o&&(r.zeroText=o),d.push(r)}return d})(l).reduce((e,t)=>e+(t.amount??0),0),x=l.price_current?l.price_current+m:null,h=r??n.paymentCadence??"monthly",g="biweekly"===h&&l.price_monthly?(0,a.fT)(l.price_monthly):l.price_monthly,f=m>0?"Price includes dealer fees. Excludes tax, title, and license. Subject to prior sale.":"Prices exclude tax, title, license, and dealer fees. Subject to prior sale.",b=[];l.year&&b.push({label:"Year",value:String(l.year)}),t&&b.push({label:"Make",value:t}),s&&b.push({label:"Model",value:s}),l.trim&&b.push({label:"Trim",value:l.trim}),i&&b.push({label:"Type",value:i}),o&&b.push({label:"Condition",value:o}),l.stock_number&&b.push({label:"Stock #",value:l.stock_number}),l.vehicle_body_length&&b.push({label:"Length",value:ep(l.vehicle_body_length)}),l.max_sleeping_count&&b.push({label:"Sleeps",value:String(l.max_sleeping_count)}),l.number_of_slideouts&&b.push({label:"Slides",value:String(l.number_of_slideouts)}),l.dry_weight&&b.push({label:"Dry Wt",value:`${tO(l.dry_weight)} lbs`}),l.gvwr&&b.push({label:"GVWR",value:`${tO(l.gvwr)} lbs`}),l.mileage&&b.push({label:"Mileage",value:tO(l.mileage)}),l.fuel_type&&b.push({label:"Fuel",value:l.fuel_type});let y=b.map((e,t)=>`<tr style="background:${t%2==0?"#f9fafb":"#fff"}"><td style="padding:3px 8px;font-weight:600;color:#374151;border-bottom:1px solid #e5e7eb;font-size:10px">${e.label}</td><td style="padding:3px 8px;text-align:right;color:#111827;border-bottom:1px solid #e5e7eb;font-size:10px">${e.value}</td></tr>`).join(""),v=Array.isArray(l.options)?l.options.slice(0,36):[],j="";if(v.length>0){let e=Math.ceil(v.length/3),t="";for(let r=0;r<e;r++){let l=r%2==0?"#f9fafb":"#fff",a="";for(let t=0;t<3;t++){let l=t*e+r,n=l<v.length?v[l]:"";a+=`<td style="padding:2px 6px;font-size:8px;color:#374151;border-bottom:1px solid #e5e7eb">${n}</td>`}t+=`<tr style="background:${l}">${a}</tr>`}j=`<div style="font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:#6b7280;margin-bottom:3px;border-bottom:2px solid ${n.branding.colors.primary};padding-bottom:2px">Options & Equipment</div> 37 <table style="width:100%;border-collapse:collapse">${t}</table>`}let w=n.branding.colors.primary,N=n.branding.colors.secondary,k=`<!DOCTYPE html> 38<html> 39<head> 40 <title>${l.title} - Window Sticker</title> 41 <style> 42 @page { margin: 0.3in; size: letter; } 43 * { margin: 0; padding: 0; box-sizing: border-box; } 44 body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #111827; } 45 @media print { 46 body { -webkit-print-color-adjust: exact; print-color-adjust: exact; } 47 } 48 </style> 49</head> 50<body onload="window.print();window.onfocus=function(){window.close()}"> 51 <div style="max-width:750px;margin:0 auto;border:3px solid ${w};overflow:hidden"> 52 53 <!-- Header: Logo + Dealer + Stock --> 54 <div style="background:${N};padding:10px 16px;display:flex;align-items:center;justify-content:space-between"> 55 <div style="display:flex;align-items:center;gap:12px"> 56 ${n.branding.logo?`<img src="${n.branding.logo}" style="height:36px;max-width:160px;object-fit:contain;filter:brightness(0) invert(1)" />`:""} 57 <div style="color:white"> 58 <div style="font-size:15px;font-weight:800">${n.name}</div> 59 ${c?`<div style="font-size:9px;opacity:0.85">${c}${d?.phone?" • "+d.phone:""}</div>`:""} 60 </div> 61 </div> 62 <div style="text-align:right;color:white"> 63 <div style="font-size:8px;text-transform:uppercase;letter-spacing:0.05em;opacity:0.7">Stock #</div> 64 <div style="font-size:14px;font-weight:700">${l.stock_number??""}</div> 65 </div> 66 </div> 67 68 <!-- Title Bar --> 69 <div style="background:${w};padding:8px 16px"> 70 <div style="color:white;font-size:16px;font-weight:800;letter-spacing:-0.02em">${l.title}</div> 71 ${i?`<div style="color:rgba(255,255,255,0.85);font-size:10px;margin-top:1px">${i}${o?" • "+o:""}</div>`:""} 72 </div> 73 74 <!-- Body --> 75 <div style="padding:12px 16px"> 76 77 <!-- Image + Specs side-by-side --> 78 <div style="display:flex;gap:12px;margin-bottom:10px"> 79 ${u?`<div style="width:48%"><img src="${u}" style="width:100%;aspect-ratio:4/3;object-fit:cover;border:1px solid #e5e7eb" /></div>`:""} 80 <div style="flex:1;min-width:0"> 81 <div style="font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:#6b7280;margin-bottom:4px;border-bottom:2px solid ${w};padding-bottom:2px">Specifications</div> 82 <table style="width:100%;border-collapse:collapse"> 83 ${y} 84 </table> 85 </div> 86 </div> 87 88 <!-- Pricing Box --> 89 <div style="background:linear-gradient(135deg, ${N}, ${w});padding:10px 16px;margin-bottom:10px;display:flex;align-items:center;justify-content:space-between"> 90 <div> 91 ${l.price_msrp?`<div style="color:rgba(255,255,255,0.8);font-size:10px">MSRP: <span style="text-decoration:line-through">${tD(l.price_msrp)}</span></div>`:""} 92 <div style="color:white;font-size:24px;font-weight:800;letter-spacing:-0.02em;line-height:1.1"> 93 ${x?tD(x):"Call for Price"} 94 </div> 95 ${x&&m>0?`<div style="color:rgba(255,255,255,0.75);font-size:9px;margin-top:1px">Includes ${tD(m)} in dealer fees</div>`:""} 96 </div> 97 <div style="text-align:right"> 98 ${l.price_monthly?`<div style="color:rgba(255,255,255,0.9);font-size:16px;font-weight:700">${tD(g)}${"biweekly"===h?"/bi-weekly":"/mo"}*</div><div style="color:rgba(255,255,255,0.7);font-size:9px">est. payment</div>`:""} 99 </div> 100 </div> 101 102 <!-- Options --> 103 ${j} 104 </div> 105 106 <!-- Footer --> 107 <div style="background:#f3f4f6;border-top:1px solid #e5e7eb;padding:8px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px"> 108 <div style="font-size:8px;color:#9ca3af"> 109 ${f} 110 <div style="font-size:8px;font-weight:600;color:${w};margin-top:2px">${n.name}</div> 111 </div> 112 ${e?`<div style="display:flex;align-items:center;gap:8px;flex-shrink:0"> 113 <div style="text-align:right"> 114 <div style="font-size:9px;font-weight:700;color:${N};line-height:1.2">Scan to view<br/>this listing online</div> 115 </div> 116 <img src="${e}" alt="Scan to view this listing online" style="width:56px;height:56px;display:block" /> 117 </div>`:""} 118 </div> 119 </div> 120</body> 121</html>`,C=window.open("","_blank","width=850,height=1100");C&&(C.document.write(k),C.document.close())},[l,n,r]);return(0,c.jsx)("button",{type:"button",onClick:s,className:e??"inline-flex items-center gap-1 text-sm",children:t??"Print"})}function tK({overrides:e}={}){let{item:t}=(0,a.H)(),{config:r}=(0,i.dY)();if(!t)return null;let l=(0,a.Ql)(t,r,{override:e?.primary});return(0,c.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}})}function tY({className:e,width:t="100%",height:r="500px"}){let{item:l}=(0,a.H)(),n=l?.integrations?.impel_walkaround_url;return n?(0,c.jsx)("iframe",{className:e,src:n,width:t,height:r,title:"360\xb0 Walkaround",allowFullScreen:!0}):null}function tq({className:e,heading:t="Video Walkaround",headingClassName:r,videoClassName:l}){let{config:n}=(0,i.dY)(),{item:s}=(0,a.H)(),o=e1(n.bdv,s?.company_location?.name),u=s?e4(s,n.bdv?.lookupKey):null,[m,x]=(0,d.useState)(null);return((0,d.useEffect)(()=>
121{if(x(null),!o||!u)return;let e=new AbortController;return fetch(e5(o,u),{signal:e.signal}).then(e=>e.ok?e.json():null).then(t=>{if(e.signal.aborted||!t?.showFrame||!t.videoUrl)return;let r=t.images?.[0]?.url;x({url:t.videoUrl,...r?{poster:r}:{}})}).catch(()=>{}),()=>e.abort()},[o,u]),m)?(0,c.jsxs)("div",{className:e,children:[null!=t&&""!==t&&(0,c.jsx)("h2",{className:r,children:t}),(0,c.jsx)("video",{className:l,controls:!0,preload:"metadata",playsInline:!0,...m.poster?{poster:m.poster}:{},children:(0,c.jsx)("source",{src:m.url,type:"video/mp4"})})]}):null}function tQ({item:e,fields:t,stickyClass:r="lg:sticky lg:top-24",labels:l={},className:a="",rowClassName:n="",hideTitle:s=!1}){if(!e)return null;let i=t.map(t=>({field:t,value:function(e,t){if("function"==typeof t.value)return t.value(e)??"";if("string"==typeof t.value)return t.value;if(t.field){let r=t.field.split(".").reduce((e,t)=>{if(e&&"object"==typeof e&&t in e)return e[t]},e);return null==r?"":String(r)}return""}(e,t)})).filter(({field:e,value:t})=>!1===e.hideWhenEmpty||t);if(0===i.length)return null;let o=l.title??"At a Glance",d=`rounded-xl border border-stone-200 bg-white p-5 ${r} ${a}`.trim();return(0,c.jsxs)("div",{className:d,children:[!s&&(0,c.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.25em] text-stone-500",children:o}),(0,c.jsx)("dl",{className:s?"space-y-3 text-sm":"mt-4 space-y-3 text-sm",children:i.map(({field:e,value:t})=>(0,c.jsxs)("div",{className:`flex justify-between gap-3 border-b border-stone-100 pb-2.5 last:border-b-0 last:pb-0 ${n}`.trim(),children:[(0,c.jsx)("dt",{className:"text-[11px] font-bold uppercase tracking-wider text-stone-500",children:e.label}),(0,c.jsx)("dd",{className:"text-right text-sm font-semibold text-stone-800",children:t})]},e.label))})]})}function tZ({triggerRef:e,infoSlot:t,priceSlot:r,actionsSlot:l,topClass:a="top-20",zClass:n="z-[60]",labels:s={},className:i="",infoClassName:o="",priceClassName:u="",actionsClassName:m=""}){let[x,h]=(0,d.useState)(!1);(0,d.useEffect)(()=>{let t=e.current;if(!t)return;let r=new IntersectionObserver(([e])=>{h(!e.isIntersecting&&e.boundingClientRect.top<0)},{threshold:0});return r.observe(t),()=>r.disconnect()},[e]);let p=s.ariaLabel??"Quick actions",g=["fixed left-0 right-0 border-b border-stone-200 bg-white/95 shadow-sm backdrop-blur-sm transition-all duration-200 ease-out",a,n,x?"translate-y-0 opacity-100":"pointer-events-none -translate-y-2 opacity-0",i].filter(Boolean).join(" ");return(0,c.jsx)("div",{role:"region","aria-label":p,className:g,children:(0,c.jsxs)("div",{className:"mx-auto flex max-w-7xl items-center justify-between gap-4 px-4 py-2 lg:px-6",children:[t&&(0,c.jsx)("div",{className:`min-w-0 flex-1 ${o}`.trim(),children:t}),r&&(0,c.jsx)("div",{className:`hidden lg:block ${u}`.trim(),children:r}),l&&(0,c.jsx)("div",{className:`flex shrink-0 items-center gap-2 ${m}`.trim(),children:l})]})})}function tJ({className:e=""}){return(0,c.jsx)("svg",{className:e,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,c.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}var tX={bottom:"top-full pt-1.5",top:"bottom-full pb-1.5"},t0={start:"left-0",end:"right-0"};function t2({children:e,triggerLabel:t="More information",icon:r,placement:l="bottom",align:a="start",className:n="",panelClassName:s="",iconClassName:i="h-3.5 w-3.5"}){let o=(0,d.useId)(),u=(0,d.useRef)(null),[m,x]=(0,d.useState)(!1),[h,p]=(0,d.useState)(!1),[g,f]=(0,d.useState)(!1),b=m||h||g;(0,d.useEffect)(()=>{if(b)return document.addEventListener("keydown",e,!0),document.addEventListener("pointerdown",t),()=>{document.removeEventListener("keydown",e,!0),document.removeEventListener("pointerdown",t)};function e(e){"Escape"===e.key&&(e.stopPropagation(),x(!1),p(!1),f(!1))}function t(e){u.current?.contains(e.target)||(p(!1),f(!1))}},[b]);let y=`relative inline-flex align-middle ${n}`.trim(),v=`absolute z-20 ${tX[l]} ${t0[a]}`,j=`block w-56 rounded-lg border border-stone-200 bg-white p-2.5 text-left text-[11px] font-normal normal-case leading-relaxed tracking-normal text-stone-600 shadow-lg ${s}`.trim();return(0,c.jsxs)("span",{ref:u,className:y,onPointerEnter:e=>{"touch"!==e.pointerType&&x(!0)},onPointerLeave:e=>{"touch"!==e.pointerType&&x(!1)},children:[(0,c.jsx)("button",{type:"button","aria-expanded":b,"aria-controls":o,"aria-label":t,className:"inline-flex items-center text-stone-400 transition-colors hover:text-stone-600",onClick:()=>{h?(p(!1),f(!1)):p(!0)},onFocus:()=>f(!0),onBlur:e=>{u.current?.contains(e.relatedTarget)||f(!1)},children:r?eF(r,{className:i}):(0,c.jsx)(tJ,{className:i})}),(0,c.jsx)("span",{id:o,hidden:!b,className:v,children:(0,c.jsx)("span",{className:j,children:e})})]})}var t1=e=>
121`$${Math.round(e).toLocaleString()}`;function t4(e){return null!=e&&!1!==e&&""!==e}function t5({item:e,feeResolvers:t={},fees:r=[],priceIncludesFees:l=!1,labels:n={},showMsrp:s=!0,showSavings:o=!0,showTotal:u=!0,infoIcon:m,className:x="",rowClassName:h="",classNames:p={},priceFallback:g}){let f=(0,d.useContext)(i.BN)?.config,b=g??f?.offerPolicy?.priceFallback,y=n.title??"Pricing Breakdown",v=n.msrp??"MSRP",j=n.salePrice??"Sale Price",w=n.basePrice??"Base Price",N=n.savings??"Save",k=n.total??"Total",C=n.callForPrice??"Call for Price",$=n.subjectToApproval??"See dealer for details. Excludes tax, tag, title, and license.",L=n.info,M=e.price_msrp&&Number(e.price_msrp)>0?Number(e.price_msrp):null,S=(0,a.dS)(e,b)??null,_=null!==M&&null!==S&&M>S?M-S:null,z=null===S,W=[...r.map((e,t)=>({key:`api:${e.key??t}`,label:e.label,amount:"number"==typeof e.amount&&e.amount>0?e.amount:null,zeroText:e.zeroText,description:e.description})),...Object.entries(t).filter(([,t])=>t.appliesTo?.(e)??!0).map(([t,r])=>{var l;let a=r.resolve(e);return{key:`res:${t}`,label:r.label,amount:"number"==typeof a&&a>0?a:null,zeroText:!0===(l=r.onZero)?"Included":"string"==typeof l?l:void 0,description:r.description}})].filter(e=>null!==e.amount||void 0!==e.zeroText||t4(e.description)),T=W.reduce((e,t)=>e+(t.amount??0),0),B=void 0!==(0,a.dS)(e,"current"),F=l&&B&&null!==S&&T>0&&S-T>0?S-T:null,A=z||null===S?null:l?S:S+T,P=`rounded-xl border ${p.card??"border-stone-200 bg-white"} p-5 ${x}`.trim(),I="flex items-baseline justify-between gap-3 py-2",R="text-xs font-semibold uppercase tracking-wider",E=`${R} ${p.feeLabel??"text-stone-500"}`,U=e=>(0,c.jsxs)("div",{className:`${I} ${h}`.trim(),children:[t4(e.description)?(0,c.jsxs)("span",{className:`inline-flex items-center gap-1 ${E}`,children:[e.label,(0,c.jsx)(t2,{triggerLabel:`More information about ${e.label}`,iconClassName:"h-3 w-3",children:e.description})]}):(0,c.jsx)("span",{className:E,children:e.label}),(0,c.jsx)("span",{className:`text-sm font-semibold ${p.feeValue??"text-stone-800"}`,children:null!==e.amount?t1(e.amount):e.zeroText??""})]},e.key),H=W.filter(e=>t4(e.description)||void 0!==e.zeroText);return(0,c.jsxs)("div",{className:P,children:[(0,c.jsxs)("div",{className:"mb-3 flex items-center gap-1.5",children:[(0,c.jsx)("p",{className:`text-[10px] font-bold uppercase tracking-[0.25em] ${p.title??"text-stone-500"}`,children:y}),t4(L)?(0,c.jsx)(t2,{triggerLabel:`More information about ${y}`,icon:m,children:L}):(0,c.jsx)("span",{className:p.titleIcon??"text-stone-400",children:m?eF(m,{className:"h-3.5 w-3.5"}):(0,c.jsx)(tJ,{className:"h-3.5 w-3.5"})})]}),z?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("p",{className:`text-xl font-black ${p.callForPrice??"text-stone-900"}`,children:C}),H.map(U)]}):(0,c.jsxs)(c.Fragment,{children:[s&&null!==M&&M>(S??0)&&(0,c.jsxs)("div",{className:`${I} ${h}`.trim(),children:[(0,c.jsx)("span",{className:`${R} ${p.msrpLabel??"text-stone-500"}`,children:v}),(0,c.jsx)("s",{className:`text-sm font-semibold ${p.msrpValue??"text-stone-400"}`,children:t1(M)})]}),(0,c.jsxs)("div",{className:`${I} ${h}`.trim(),children:[(0,c.jsx)("span",{className:`${R} ${p.salePriceLabel??"text-stone-700"}`,children:null!==F?w:j}),(0,c.jsx)("span",{className:`text-base font-bold ${p.salePriceValue??"text-stone-900"}`,children:t1(F??S)})]}),o&&null!==_&&(0,c.jsxs)("div",{className:`${I} ${h}`.trim(),children:[(0,c.jsx)("span",{className:`${R} ${p.savingsLabel??"text-emerald-700"}`,children:N}),(0,c.jsx)("span",{className:`text-sm font-bold ${p.savingsValue??"text-emerald-700"}`,children:t1(_)})]}),W.map(U),u&&null!==A&&(0,c.jsxs)("div",{className:`${I} border-t ${p.totalRow??"border-stone-200"} mt-1 pt-3 ${h}`.trim(),children:[(0,c.jsx)("span",{className:`text-xs font-bold uppercase tracking-wider ${p.totalLabel??"text-stone-900"}`,children:k}),(0,c.jsx)("span",{className:`text-lg font-black ${p.totalValue??"text-stone-900"}`,children:t1(A)})]})]}),(0,c.jsx)("p",{className:`mt-3 text-[10px] leading-relaxed ${p.disclaimer??"text-stone-500"}`,children:$})]})}function t3({locationId:e,locationName:t,className:r}){let{location:a,setLocation:n,clear:s}=(0,l.zy)(),i=a===e;return(0,c.jsx)("button",{type:"button",className:r,"aria-pressed":i,onClick:()=>i?s():n(e),children:i?`${t} (preferred)`:t})}var t6=new Date().getFullYear(),t7=["Year","Make","Model","Results"];function t8({className:e}){return(0,c.jsx)("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}function t9(){return(0,c.jsxs)("div",{className:"flex items-center justify-center gap-1.5 py-16",children:[(0,c.jsx)("div",{className:"h-2.5 w-2.5 animate-bounce rounded-full bg-dealer-primary/40 [animation-delay:0ms]"}),(0,c.jsx)("div",{className:"h-2.5 w-2.5 animate-bounce rounded-full bg-dealer-primary/40 [animation-delay:150ms]"}),(0,c.jsx)("div",{className:"h-2.5 w-2.5 animate-bounce rounded-full bg-dealer-primary/40 [animation-delay:300ms]"})]})}
121function re({value:e,onChange:t,placeholder:r}){return(0,c.jsxs)("div",{className:"relative mb-6",children:[(0,c.jsx)("svg",{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})}),(0,c.jsx)("input",{type:"text",value:e,onChange:e=>t(e.target.value),placeholder:r,className:"w-full rounded-lg border border-gray-300 py-2.5 pl-10 pr-4 text-sm text-gray-900 placeholder:text-gray-400 focus:border-dealer-primary focus:outline-none focus:ring-1 focus:ring-dealer-primary"})]})}function rt(e){return e.toLocaleString("en-US")}function rr({srpPath:e="/inventory",className:t,minYear:r}){let a=(0,m.useRouter)(),{slugMap:n}=(0,l.Zh)(),s=(0,d.useMemo)(()=>Array.from({length:Math.max(1,t6+1-(r??t6+1-19)+1)},(e,t)=>t6+1-t),[r]),[i,o]=(0,d.useState)(0),[u,x]=(0,d.useState)(void 0),[h,p]=(0,d.useState)(void 0),[g,f]=(0,d.useState)(void 0),[b,y]=(0,d.useState)(""),[v,j]=(0,d.useState)(""),[w,N]=(0,d.useState)(""),{makes:k,models:C,specs:$,isLoadingMakes:L,isLoadingModels:M,isLoadingSpecs:S}=(0,l.i3)({year:u,make:h,model:g}),_=(0,d.useMemo)(()=>b?s.filter(e=>String(e).includes(b)):s,[s,b]),z=(0,d.useMemo)(()=>{if(!v)return k;let e=v.toLowerCase();return k.filter(t=>t.toLowerCase().includes(e))},[k,v]),W=(0,d.useMemo)(()=>{if(!w)return C;let e=w.toLowerCase();return C.filter(t=>t.toLowerCase().includes(e))},[C,w]),T=(0,d.useMemo)(()=>0===$.length?0:Math.max(...$.map(e=>e.features["Max Towing Capacity"])),[$]),B=(0,d.useMemo)(()=>{let e;return 0===T?null:(e=Math.floor(.8*T))<3500?{label:"Popup or Folding Camper",classifications:["Popup","Folding Pop-Up Camper"]}:e<5e3?{label:"Travel Trailer or Hybrid",classifications:["Travel Trailer","Hybrid Trailer"]}:e<8e3?{label:"Travel Trailer or Fifth Wheel",classifications:["Travel Trailer","Fifth Wheel"]}:e<12e3?{label:"Fifth Wheel or Toy Hauler",classifications:["Fifth Wheel","Travel Trailer Toy Hauler"]}:{label:"Fifth Wheel or Heavy Toy Hauler",classifications:["Fifth Wheel","Fifth Wheel Toy Hauler"]}},[T]),F=0===i&&void 0!==u||1===i&&void 0!==h||2===i&&void 0!==g,A=()=>{o(0),x(void 0),p(void 0),f(void 0),y(""),j(""),N("")};return(0,c.jsxs)("div",{className:t,children:[(0,c.jsx)("div",{className:"mb-10",children:(0,c.jsx)("div",{className:"flex items-center justify-between",children:t7.map((e,t)=>(0,c.jsxs)("div",{className:"flex flex-1 items-center",children:[(0,c.jsx)("button",{onClick:()=>{t<i&&(t<=1&&(f(void 0),N("")),0===t&&(p(void 0),j("")),o(t))},className:`flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-full text-sm font-bold transition ${t<i?"bg-dealer-primary text-white":t===i?"bg-dealer-secondary text-white ring-4 ring-dealer-secondary/20":"bg-gray-200 text-gray-400"}`,children:t<i?(0,c.jsx)(t8,{className:"h-4 w-4"}):t+1}),(0,c.jsx)("span",{className:`ml-2 hidden text-sm font-semibold sm:block ${t===i?"text-gray-900":"text-gray-400"}`,children:e}),t<3&&(0,c.jsx)("div",{className:`mx-4 h-px flex-1 ${t<i?"bg-dealer-primary":"bg-gray-200"}`})]},e))})}),0===i&&(0,c.jsxs)("div",{children:[(0,c.jsx)("h2",{className:"mb-2 text-2xl font-bold text-gray-900",children:"What year is your tow vehicle?"}),(0,c.jsx)("p",{className:"mb-8 text-gray-500",children:"Select your vehicle's model year."}),(0,c.jsx)(re,{value:b,onChange:y,placeholder:"Search year..."}),(0,c.jsx)("div",{className:"grid grid-cols-4 gap-3 sm:grid-cols-5",children:_.map(e=>{let t=u===e;return(0,c.jsx)("button",{onClick:()=>x(e),className:`rounded-xl border-2 px-4 py-3 text-center transition ${t?"border-dealer-primary bg-dealer-primary/5 shadow-md":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"}`,children:(0,c.jsx)("p",{className:`text-sm font-bold ${t?"text-dealer-primary":"text-gray-800"}`,children:e})},e)})})]}),1===i&&(0,c.jsxs)("div",{children:[(0,c.jsx)("h2",{className:"mb-2 text-2xl font-bold text-gray-900",children:"What make is your vehicle?"}),(0,c.jsx)("p",{className:"mb-8 text-gray-500",children:"Select the manufacturer of your tow vehicle."}),L&&0===k.length?(0,c.jsx)(t9,{}
121):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(re,{value:v,onChange:j,placeholder:"Search makes..."}),(0,c.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",children:z.map(e=>{let t=h===e;return(0,c.jsx)("button",{onClick:()=>p(e),className:`rounded-xl border-2 px-4 py-4 text-center transition ${t?"border-dealer-primary bg-dealer-primary/5 shadow-md":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"}`,children:(0,c.jsx)("p",{className:`text-sm font-bold ${t?"text-dealer-primary":"text-gray-800"}`,children:e})},e)})})]})]}),2===i&&(0,c.jsxs)("div",{children:[(0,c.jsx)("h2",{className:"mb-2 text-2xl font-bold text-gray-900",children:"What model is your vehicle?"}),(0,c.jsxs)("p",{className:"mb-8 text-gray-500",children:["Select the specific model of your ",h,"."]}),M&&0===C.length?(0,c.jsx)(t9,{}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(re,{value:w,onChange:N,placeholder:"Search models..."}),(0,c.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:W.map(e=>{let t=g===e;return(0,c.jsx)("button",{onClick:()=>f(e),className:`rounded-xl border-2 px-4 py-4 text-center transition ${t?"border-dealer-primary bg-dealer-primary/5 shadow-md":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"}`,children:(0,c.jsx)("p",{className:`text-sm font-bold ${t?"text-dealer-primary":"text-gray-800"}`,children:e})},e)})})]})]}),3===i&&(0,c.jsxs)("div",{children:[(0,c.jsxs)("h2",{className:"mb-2 text-2xl font-bold text-gray-900",children:[u," ",h," ",g]}),(0,c.jsx)("p",{className:"mb-8 text-gray-500",children:"Towing specifications by configuration."}),S&&0===$.length?(0,c.jsx)(t9,{}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"grid gap-4 sm:grid-cols-2",children:$.map((e,t)=>(0,c.jsxs)("div",{className:"rounded-2xl border border-gray-200 bg-white p-6 shadow-sm",children:[(0,c.jsx)("p",{className:"text-lg font-bold text-gray-900",children:e.features.Engine}),(0,c.jsxs)("div",{className:"mt-3 space-y-1.5 text-sm text-gray-600",children:[(0,c.jsxs)("p",{children:[(0,c.jsx)("span",{className:"font-medium text-gray-700",children:"Drivetrain:"})," ",e.features.Drivetrain]}),(0,c.jsxs)("p",{children:[(0,c.jsx)("span",{className:"font-medium text-gray-700",children:"Transmission:"})," ",e.features.Transmission]}),(0,c.jsxs)("p",{children:[(0,c.jsx)("span",{className:"font-medium text-gray-700",children:"Tow Type:"})," ",e.features["Towing Type"]]}),(0,c.jsxs)("p",{children:[(0,c.jsx)("span",{className:"font-medium text-gray-700",children:"Axle Ratio:"})," ",e.features["Axle/Gear Ratio"]]}),e.features.Notes&&(0,c.jsxs)("p",{children:[(0,c.jsx)("span",{className:"font-medium text-gray-700",children:"Notes:"})," ",e.features.Notes]})]}),(0,c.jsxs)("div",{className:"mt-4 border-t border-gray-100 pt-4",children:[(0,c.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wide text-gray-400",children:"Max Towing Capacity"}),(0,c.jsxs)("p",{className:"text-3xl font-bold text-dealer-primary",children:[rt(e.features["Max Towing Capacity"])," lbs"]})]})]},t))}),B?(0,c.jsxs)("div",{className:"mt-8 rounded-2xl border-2 border-dealer-primary/20 bg-dealer-primary/5 p-6",children:[(0,c.jsx)("h3",{className:"text-lg font-bold text-gray-900",children:"Our Recommendation"}),(0,c.jsxs)("p",{className:"mt-1 text-sm text-gray-600",children:["With a max towing capacity of ",rt(T)," lbs (safe towing: ~",rt(Math.floor(.8*T))," lbs), your vehicle is a great match for:"]}),(0,c.jsx)("p",{className:"mt-2 text-xl font-bold text-dealer-primary",children:B.label}),(0,c.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:[(0,c.jsx)("button",{onClick:()=>{if(!B)return;let t=new URLSearchParams,r=n.keyToSlug["unitClassification.name"]??"class";t.set(r,B.classifications[0]),a.push(`${e}?${t.toString()}`)},className:"rounded-lg bg-dealer-secondary px-8 py-3 text-sm font-bold text-white shadow-lg transition hover:bg-dealer-secondary/90",children:"Browse Matching RVs"}),(0,c.jsx)("button",{onClick:A,className:"rounded-lg px-5 py-3 text-sm font-semibold text-gray-600 transition hover:bg-gray-100",children:"Start Over"})]})]}):$.length>0?null:(0,c.jsxs)("div",{className:"mt-8 text-center",children:[(0,c.jsx)("p",{className:"text-gray-500",children:"No towing data found for this configuration."}),(0,c.jsx)("button",{onClick:A,className:"mt-4 rounded-lg px-5 py-3 text-sm font-semibold text-gray-600 transition hover:bg-gray-100",children:"Start Over"})]})]})]}),i<3&&(0,c.jsxs)("div",{className:"mt-10 flex items-center justify-between",children:[(0,c.jsxs)("button",{onClick:()=>{2===i?(f(void 0),N(""),o(1)):1===i&&(p(void 0),f(void 0),j(""),N(""),o(0))},className:`flex items-center gap-2 rounded-lg px-5 py-3 text-sm font-semibold transition ${i>0?"text-gray-600 hover:bg-gray-100":"invisible"}`,children:[(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})}),"Back"]}),(0,c.jsxs)("button",{onClick:()=>{i<3&&o(i+1)},disabled:!F,className:`flex items-center gap-2 rounded-lg px-8 py-3 text-sm font-bold text-white transition ${F?"bg-dealer-secondary shadow-lg hover:bg-dealer-secondary/90":"cursor-not-allowed bg-gray-300"}`,children:["Continue",(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})]})}var rl={"Travel Trailer":"Towed by truck or SUV. Most popular and versatile.","Fifth Wheel":"Towed by pickup. More space and stability.","Class A":"Full-size motorhome. Maximum luxury and space.","Class A Diesel":"Diesel motorhome. Power and premium amenities.","Class A Gas":"Gas motorhome. Spacious and affordable.","Class B":"Camper van. Easy to drive, great fuel economy.","Class C":"Mid-size motorhome. Great family balance.","Class C Diesel":"Diesel mid-size. Efficient and capable.","Class C Gas":"Gas mid-size. Practical and popular.","Travel Trailer Toy Hauler":"Travel trailer with built-in garage.","Fifth Wheel Toy Hauler":"Fifth wheel with built-in garage.","Destination Trailer":"Semi-permanent. Residential feel.",Popup:"Lightweight and affordable. Great starter.","Folding Pop-Up Camper":"Compact and lightweight. Easy towing.","Hybrid Trailer":"Mix of hard-side and pop-out beds.","Truck Camper":"Mounts on your truck bed. Go anywhere.","Super C Motorhome":"Heavy-duty chassis. Best of both worlds."},ra={"Travel Trailer":(0,c.jsxs)("svg",{viewBox:"0 0 64 40",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-full w-full",children:[(0,c.jsx)("rect",{x:"4",y:"8",width:"44",height:"22",rx:"3"}),(0,c.jsx)("path",{d:"M48 14h8l4 8v8H48V14z"}),(0,c.jsx)("circle",{cx:"16",cy:"33",r:"4"}),(0,c.jsx)("circle",{cx:"38",cy:"33",r:"4"}),(0,c.jsx)("circle",{cx:"56",cy:"33",r:"4"}),(0,c.jsx)("line",{x1:"4",y1:"18",x2:"48",y2:"18"}
121),(0,c.jsx)("rect",{x:"8",y:"11",width:"8",height:"7",rx:"1"}),(0,c.jsx)("rect",{x:"20",y:"11",width:"8",height:"7",rx:"1"})]}),"Fifth Wheel":(0,c.jsxs)("svg",{viewBox:"0 0 64 40",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-full w-full",children:[(0,c.jsx)("path",{d:"M4 30V12a3 3 0 013-3h24v21"}),(0,c.jsx)("path",{d:"M31 9h14a3 3 0 013 3v18"}),(0,c.jsx)("path",{d:"M48 18h8l4 7v5H48V18z"}),(0,c.jsx)("circle",{cx:"14",cy:"33",r:"4"}),(0,c.jsx)("circle",{cx:"38",cy:"33",r:"4"}),(0,c.jsx)("circle",{cx:"56",cy:"33",r:"4"}),(0,c.jsx)("line",{x1:"4",y1:"20",x2:"31",y2:"20"}),(0,c.jsx)("rect",{x:"7",y:"12",width:"7",height:"6",rx:"1"}),(0,c.jsx)("rect",{x:"18",y:"12",width:"7",height:"6",rx:"1"})]}),"Class A":(0,c.jsxs)("svg",{viewBox:"0 0 64 40",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-full w-full",children:[(0,c.jsx)("path",{d:"M4 30V10a3 3 0 013-3h42a3 3 0 013 3v4l8 8v8H4z"}),(0,c.jsx)("circle",{cx:"14",cy:"33",r:"4"}),(0,c.jsx)("circle",{cx:"52",cy:"33",r:"4"}),(0,c.jsx)("rect",{x:"8",y:"10",width:"8",height:"8",rx:"1"}),(0,c.jsx)("rect",{x:"20",y:"10",width:"8",height:"8",rx:"1"}),(0,c.jsx)("rect",{x:"32",y:"10",width:"8",height:"8",rx:"1"}),(0,c.jsx)("path",{d:"M52 10h4v8h-4"})]}),"Class B":(0,c.jsxs)("svg",{viewBox:"0 0 64 40",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-full w-full",children:[(0,c.jsx)("path",{d:"M8 30V12a4 4 0 014-4h28v22"}),(0,c.jsx)("path",{d:"M40 8h8l8 10v12H40V8z"}),(0,c.jsx)("circle",{cx:"18",cy:"33",r:"4"}),(0,c.jsx)("circle",{cx:"50",cy:"33",r:"4"}),(0,c.jsx)("rect",{x:"14",y:"12",width:"8",height:"7",rx:"1"}),(0,c.jsx)("rect",{x:"26",y:"12",width:"8",height:"7",rx:"1"}),(0,c.jsx)("path",{d:"M44 12h6l4 6h-10V12z"})]}
121),"Class C":(0,c.jsxs)("svg",{viewBox:"0 0 64 40",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-full w-full",children:[(0,c.jsx)("path",{d:"M4 30V10a3 3 0 013-3h34v23"}),(0,c.jsx)("path",{d:"M41 7h8l8 10v13H41V7z"}),(0,c.jsx)("path",{d:"M41 3h10a2 2 0 012 2v2H41V3z"}),(0,c.jsx)("circle",{cx:"14",cy:"33",r:"4"}),(0,c.jsx)("circle",{cx:"52",cy:"33",r:"4"}),(0,c.jsx)("rect",{x:"8",y:"10",width:"8",height:"7",rx:"1"}),(0,c.jsx)("rect",{x:"20",y:"10",width:"8",height:"7",rx:"1"}),(0,c.jsx)("path",{d:"M45 11h6l4 6h-10V11z"})]})},rn=(0,c.jsxs)("svg",{viewBox:"0 0 64 40",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-full w-full",children:[(0,c.jsx)("rect",{x:"4",y:"8",width:"52",height:"22",rx:"3"}),(0,c.jsx)("circle",{cx:"16",cy:"33",r:"4"}),(0,c.jsx)("circle",{cx:"44",cy:"33",r:"4"}),(0,c.jsx)("line",{x1:"4",y1:"18",x2:"56",y2:"18"}),(0,c.jsx)("rect",{x:"8",y:"11",width:"8",height:"7",rx:"1"}),(0,c.jsx)("rect",{x:"20",y:"11",width:"8",height:"7",rx:"1"})]}),rs=[{label:"New",value:"New",description:"Factory fresh with full warranty"},{label:"Used",value:"Used",description:"Inspected and serviced pre-owned"},{label:"Either",value:"",description:"Show me everything"}],ri={New:(0,c.jsx)("svg",{className:"h-7 w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"})}),Used:(0,c.jsx)("svg",{className:"h-7 w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m-3-2.818l.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"":(0,c.jsx)("svg",{className:"h-7 w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})})},ro=["RV Type","Condition","Make","Budget"];function rd({className:e}){return(0,c.jsx)("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}function rc(){return(0,c.jsxs)("div",{className:"flex items-center justify-center gap-1.5 py-16",children:[(0,c.jsx)("div",{className:"h-2.5 w-2.5 animate-bounce rounded-full bg-dealer-primary/40 [animation-delay:0ms]"}),(0,c.jsx)("div",{className:"h-2.5 w-2.5 animate-bounce rounded-full bg-dealer-primary/40 [animation-delay:150ms]"}),(0,c.jsx)("div",{className:"h-2.5 w-2.5 animate-bounce rounded-full bg-dealer-primary/40 [animation-delay:300ms]"})]})}function ru({srpPath:e="/inventory",className:t}){let r=(0,m.useRouter)(),{slugMap:a}=(0,l.Zh)(),[n,s]=(0,d.useState)(0),[i,o]=(0,d.useState)(null),[u,x]=(0,d.useState)(null),[h,p]=(0,d.useState)(null),[g,f]=(0,d.useState)(null),b=(0,d.useMemo)(()=>{let e={perPage:1};return i&&(e["unitClassification.name"]=[i]),u&&(e["condition.name"]=[u]),h&&(e["unitMake.name"]=[h]),e},[i,u,h]),{availableFilters:y,isLoading:v}=(0,l.od)(b),j=(0,d.useMemo)(()=>{let e=y["unitClassification.name"];return e?.filter_type==="select"&&e.filters?Object.entries(e.filters).map(([e,t])=>({name:e,count:t})).sort((e,t)=>
121t.count-e.count):[]},[y]),w=(0,d.useMemo)(()=>{let e=y["unitMake.name"];return e?.filter_type==="select"&&e.filters?Object.entries(e.filters).map(([e,t])=>({name:e,count:t})).sort((e,t)=>t.count-e.count):[]},[y]),N=(0,d.useMemo)(()=>{let e=y.price_current;return e?.filter_type==="range"?{min:e.min||0,max:e.max||0}:{min:0,max:0}},[y]),k=(0,d.useMemo)(()=>{if(!N.max)return[];let e=[],t=[25e3,5e4,1e5,2e5,3e5,5e5];for(let r=0;r<t.length;r++){let l=0===r?0:t[r-1],a=t[r];if(l>=N.max)break;if(a<=N.min)continue;let n=0===r?`Under $${(a/1e3).toFixed(0)}K`:`$${(l/1e3).toFixed(0)}K \u2013 $${(a/1e3).toFixed(0)}K`;e.push({label:n,min:l,max:a})}let r=t[t.length-1];return N.max>r&&e.push({label:`$${(r/1e3).toFixed(0)}K+`,min:r,max:0}),e.push({label:"Any Budget",min:0,max:0}),e},[N]),C=0===n&&null!==i||1===n&&null!==u||2===n&&null!==h||3===n&&null!==g,$=i||void 0,L=h||void 0;return(0,c.jsxs)("div",{className:t,children:[(0,c.jsx)("div",{className:"mb-10",children:(0,c.jsx)("div",{className:"flex items-center justify-between",children:ro.map((e,t)=>(0,c.jsxs)("div",{className:"flex flex-1 items-center",children:[(0,c.jsx)("button",{onClick:()=>{t<n&&s(t)},className:`flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-full text-sm font-bold transition ${t<n?"bg-dealer-primary text-white":t===n?"bg-dealer-secondary text-white ring-4 ring-dealer-secondary/20":"bg-gray-200 text-gray-400"}`,children:t<n?(0,c.jsx)(rd,{className:"h-4 w-4"}):t+1}),(0,c.jsx)("span",{className:`ml-2 hidden text-sm font-semibold sm:block ${t===n?"text-gray-900":"text-gray-400"}`,children:e}),t<3&&(0,c.jsx)("div",{className:`mx-4 h-px flex-1 ${t<n?"bg-dealer-primary":"bg-gray-200"}`})]},e))})}),0===n&&(0,c.jsxs)("div",{children:[(0,c.jsx)("h2",{className:"mb-2 text-2xl font-bold text-gray-900",children:"What type of RV are you looking for?"}),(0,c.jsx)("p",{className:"mb-8 text-gray-500",children:"Select the style that best fits your travel plans."}),v&&0===j.length?(0,c.jsx)(rc,{}):(0,c.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[j.map(e=>{let t=i===e.name;return(0,c.jsxs)("button",{onClick:()=>o(e.name),className:`relative rounded-xl border-2 px-4 py-5 text-center transition ${t?"border-dealer-primary bg-dealer-primary/5 shadow-md":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"}`,children:[t&&(0,c.jsx)("div",{className:"absolute right-2 top-2 flex h-5 w-5 items-center justify-center rounded-full bg-dealer-primary text-white",children:(0,c.jsx)(rd,{className:"h-3 w-3"})}),(0,c.jsx)("div",{className:`mx-auto mb-3 h-10 w-20 ${t?"text-dealer-primary":"text-gray-400"}`,children:function(e){if(ra[e])return ra[e];for(let t of Object.keys(ra))if(e.startsWith(t))return ra[t];return rn}(e.name)}),(0,c.jsx)("p",{className:`text-sm font-bold ${t?"text-dealer-primary":"text-gray-800"}`,children:e.name}),(0,c.jsx)("p",{className:"mt-0.5 text-xs text-gray-400",children:rl[e.name]||e.name})]},e.name)}),(0,c.jsxs)("button",{onClick:()=>o(""),className:`relative rounded-xl border-2 px-4 py-5 text-center transition ${""===i?"border-dealer-primary bg-dealer-primary/5 shadow-md":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"}`,children:[""===i&&(0,c.jsx)("div",{className:"absolute right-2 top-2 flex h-5 w-5 items-center justify-center rounded-full bg-dealer-primary text-white",children:(0,c.jsx)(rd,{className:"h-3 w-3"})}),(0,c.jsx)("div",{className:`mx-auto mb-3 flex h-10 w-20 items-center justify-center ${""===i?"text-dealer-primary":"text-gray-400"}`,children:(0,c.jsx)("svg",{className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})})}),(0,c.jsx)("p",{className:`text-sm font-bold ${""===i?"text-dealer-primary":"text-gray-800"}`,children:"No Preference"}),(0,c.jsx)("p",{className:"mt-0.5 text-xs text-gray-400",children:"Show me all types"})]})]})]}),1===n&&(0,c.jsxs)("div",{children:[(0,c.jsx)("h2",{className:"mb-2 text-2xl font-bold text-gray-900",children:"New or used?"}),(0,c.jsx)("p",{className:"mb-8 text-gray-500",children:"We have a great selection of both."}),(0,c.jsx)("div",{className:"grid gap-4 sm:grid-cols-3",children:rs.map(e=>{let t=u===e.value;return(0,c.jsxs)("button",{onClick:()=>x(e.value),className:`rounded-2xl border-2 p-8 text-center transition ${t?"border-dealer-primary bg-dealer-primary/5 shadow-md":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"}`,children:[(0,c.jsx)("div",{className:`mx-auto mb-3 flex h-14 w-14 items-center justify-center rounded-full ${t?"bg-dealer-primary text-white":"bg-gray-100 text-gray-400"}`,children:ri[e.value]}),(0,c.jsx)("p",{className:`text-lg font-bold ${t?"text-dealer-primary":"text-gray-800"}`,children:e.label}),(0,c.jsx)("p",{className:"mt-1 text-sm text-gray-400",children:e.description})]},e.label)})})]}),2===n&&(0,c.jsxs)("div",{children:[(0,c.jsx)("h2",{className:"mb-2 text-2xl font-bold text-gray-900",children:"Any preferred brand?"}),(0,c.jsx)("p",{className:"mb-8 text-gray-500",children:"Select a manufacturer or skip to see all brands."}),v&&0===w.length?(0,c.jsx)(rc,{}):(0,c.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",children:[w.map(e=>{let t=h===e.name;return(0,c.jsx)("button",{onClick:()=>p(e.name),className:`rounded-xl border-2 px-4 py-4 text-center transition ${t?"border-dealer-primary bg-dealer-primary/5 shadow-md":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"}`,children:(0,c.jsx)("p",{className:`text-sm font-bold ${t?"text-dealer-primary":"text-gray-800"}`,children:e.name})},e.name)}),(0,c.jsx)("button",{onClick:()=>p(""),className:`rounded-xl border-2 px-4 py-4 text-center transition ${""===h?"border-dealer-primary bg-dealer-primary/5 shadow-md":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"}`,children:(0,c.jsx)("p",{className:`text-sm font-bold ${""===h?"text-dealer-primary":"text-gray-800"}`,children:"No Preference"})})]})]}),3===n&&(0,c.jsxs)("div",{children:[(0,c.jsx)("h2",{className:"mb-2 text-2xl font-bold text-gray-900",children:"What's your budget?"}),(0,c.jsx)("p",{className:"mb-8 text-gray-500",children:"Pick a range and we'll show you what's available."}),v&&0===k.length?(0,c.jsx)(rc,{}):(0,c.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:k.map(e=>{let t=g?.min===e.min&&g?.max===e.max;return(0,c.jsx)("button",{onClick:()=>f({min:e.min,max:e.max}),className:`rounded-2xl border-2 px-6 py-5 text-center transition ${t?"border-dealer-primary bg-dealer-primary/5 shadow-md":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"}`,children:(0,c.jsx)("p",{className:`text-lg font-bold ${t?"text-dealer-primary":"text-gray-800"}`,children:e.label})},e.label)})})]}),(0,c.jsxs)("div",{className:"mt-10 flex items-center justify-between",children:[(0,c.jsxs)("button",{onClick:()=>{n>0&&s(n-1)},className:`flex items-center gap-2 rounded-lg px-5 py-3 text-sm font-semibold transition ${n>0?"text-gray-600 hover:bg-gray-100":"invisible"}`,children:[(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})}),"Back"]}),(0,c.jsxs)("button",{onClick:()=>
121{if(n<3)s(n+1);else{let t=new URLSearchParams,l=a.keyToSlug["unitClassification.name"]??"class",n=a.keyToSlug["condition.name"]??"condition",s=a.keyToSlug["unitMake.name"]??"make";$&&t.set(l,$),u&&t.set(n,u),L&&t.set(s,L),g&&(g.min>0||g.max>0)&&(g.min>0&&t.set("priceMin",String(g.min)),g.max>0&&t.set("priceMax",String(g.max)));let i=t.toString();r.push(i?`${e}?${i}`:e)}},disabled:!C,className:`flex items-center gap-2 rounded-lg px-8 py-3 text-sm font-bold text-white transition ${C?"bg-dealer-secondary shadow-lg hover:bg-dealer-secondary/90":"cursor-not-allowed bg-gray-300"}`,children:[n<3?"Continue":"Show My Results",(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})]})}var rm={facebook:"M18 2h-3a5 5 0 00-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 011-1h3z",twitter:"M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5a4.5 4.5 0 00-.08-.83A7.72 7.72 0 0023 3z",youtube:"M22.54 6.42a2.78 2.78 0 00-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 00-1.94 2A29 29 0 001 11.75a29 29 0 00.46 5.33A2.78 2.78 0 003.4 19.1c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 001.94-2 29 29 0 00.46-5.25 29 29 0 00-.46-5.33z",instagram:"M16 4H8a4 4 0 00-4 4v8a4 4 0 004 4h8a4 4 0 004-4V8a4 4 0 00-4-4zm-4 11a3 3 0 110-6 3 3 0 010 6zm4.5-7.5a1 1 0 110-2 1 1 0 010 2z",pinterest:"M12 0C5.37 0 0 5.37 0 12c0 5.08 3.15 9.42 7.6 11.15-.1-.94-.2-2.39.04-3.42.22-.93 1.41-5.98 1.41-5.98s-.36-.72-.36-1.78c0-1.67.97-2.92 2.17-2.92 1.03 0 1.52.77 1.52 1.69 0 1.03-.66 2.57-1 4-.28 1.2.6 2.18 1.78 2.18 2.13 0 3.77-2.25 3.77-5.49 0-2.87-2.06-4.88-5-4.88-3.41 0-5.41 2.56-5.41 5.2 0 1.03.4 2.13.89 2.73.1.12.11.22.08.34l-.33 1.36c-.05.22-.18.27-.41.16-1.55-.72-2.52-2.99-2.52-4.81 0-3.92 2.85-7.52 8.21-7.52 4.31 0 7.66 3.07 7.66 7.18 0 4.28-2.7 7.73-6.45 7.73-1.26 0-2.45-.66-2.85-1.43l-.78 2.96c-.28 1.08-1.04 2.44-1.55 3.27C9.58 23.81 10.77 24 12 24c6.63 0 12-5.37 12-12S18.63 0 12 0z"};function rx({type:e,href:t,className:r,"aria-label":l}){return(0,c.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":l,className:r??"flex h-8 w-8 items-center justify-center rounded-full bg-gray-700 text-gray-300 hover:bg-dealer-primary hover:text-white",children:(0,c.jsx)("svg",{style:{width:"1rem",he
121ight:"1rem"},fill:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{d:rm[e]||""})})})}var rh=16/9;async function rp(e){return(await Promise.allSettled(e.map(e=>new Promise(t=>{let r=new window.Image;r.onload=()=>t({banner:e,ar:r.naturalWidth/r.naturalHeight,naturalWidth:r.naturalWidth,naturalHeight:r.naturalHeight}),r.onerror=()=>t({banner:e,ar:rh,naturalWidth:1600,naturalHeight:1600/rh}),r.src=e.imageUrl})))).filter(e=>"fulfilled"===e.status).map(e=>e.value)}function rg(e){if(e.length<=2)return e;let t=e.map(e=>e.ar).sort((e,t)=>e-t),r=Math.floor(t.length/2),l=t.length%2==0?(t[r-1]+t[r])/2:t[r],a=[...e].sort((e,t)=>Math.abs(e.ar-l)-Math.abs(t.ar-l)),n=[],s=0,i=e.length-1;for(;s<=i;)n.push(s++),s<=i&&n.push(i--);let o=Array(e.length);return a.forEach((e,t)=>{o[n[t]]=e}),o}function rf({group:e,maxHeight:t,isActive:r,optimizeImages:l}){let a=e.reduce((e,t)=>e+t.ar,0),n="auto"===t?void 0:t*a+(e.length-1)*10;return(0,c.jsx)("div",{"data-testid":"banner-row",style:{display:"flex",gap:10,width:"100%",maxWidth:n,alignItems:"center",margin:"0 auto"},children:e.map(({banner:e,ar:t,naturalWidth:n,naturalHeight:s},i)=>{let o=`${Math.round(t/a*100)}vw`,d=l?(0,c.jsx)(g.default,{src:e.imageUrl,alt:e.altText,width:n,height:s,sizes:o,priority:r,loading:r?void 0:"lazy",style:{width:"100%",height:"auto",display:"block"}}):(0,c.jsx)("img",{src:e.imageUrl,alt:e.altText,width:n,height:s,fetchPriority:r?"high":"auto",loading:r?"eager":"lazy",decoding:"async",style:{width:"100%",height:"auto",display:"block"}});return(0,c.jsx)("div",{style:{flex:t,minWidth:0,borderRadius:8,overflow:"hidden",boxShadow:"0 2px 8px rgba(0,0,0,0.12)"},children:e.linkUrl?(0,c.jsx)("a",{href:e.linkUrl,style:{display:"block"},children:d}):d},`${e.imageUrl}-${i}`)})})}function rb({dir:e,onClick:t}){return(0,c.jsx)("button",{type:"button",onClick:t,"aria-label":"prev"===e?"Previous banner":"Next banner",style:{flexShrink:0,width:36,height:36,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"1px solid rgba(0,0,0,0.12)",background:"rgba(255,255,255,0.9)",color:"#333",cursor:"pointer",padding:0,boxShadow:"0 1px 4px rgba(0,0,0,0.12)"},children:(0,c.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,"aria-hidden":!0,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"prev"===e?"M15 19l-7-7 7-7":"M9 5l7 7-7 7"})})})}function ry({banners:e,maxHeight:t,showArrows:r,optimizeImages:l}){let a=(0,d.useRef)(null),[n,s]=(0,d.useState)(0),[i,o]=(0,d.useState)([]),[u,m]=(0,d.useState)(0),[x,h]=(0,d.useState)(!1),p=(0,d.useRef)(null);(0,d.useEffect)(()=>{let e=a.current;if(!e)return;let t=new ResizeObserver(e=>{s(e[0].contentRect.width)});return t.observe(e),()=>t.disconnect()},[]),(0,d.useEffect)(()=>{if(0===e.length||0===n)return;let t=!1;return rp(e).then(e=>{if(!t){let t=function(e,t){if(0===e.length||0===t)return[];let r=t/120,l=[],a=[],n=0;for(let t of e)a.length>0&&n+t.ar>r?(l.push(a),a=[t],n=t.ar):(a.push(t),n+=t.ar);a.length>0&&l.push(a);let s=l.length-1;if(s>=0&&e.length>0){let t=[...l[s]],a=new Set(t.map(e=>e.banner.imageUrl)),n=t.reduce((e,t)=>e+t.ar,0);for(let l of e){if(n>=.6*r)break;a.has(l.banner.imageUrl)||(t.push(l),a.add(l.banner.imageUrl),n+=l.ar)}l[s]=t}return l.map(rg)}(e,n);o(t),m(t.length>1?Math.floor(Math.random()*t.length):0)}}),()=>{t=!0}},[e,n]);let g=(0,d.useCallback)(e=>{m(t=>(t+e+i.length)%i.length)},[i.length]);if((0,d.useEffect)(()=>{if(!(i.length<=1)&&!x)return p.current=setTimeout(()=>g(1),8e3),()=>{p.current&&clearTimeout(p.current)}},[i.length,u,x,g]),0===i.length){let e="auto"===t?120:t+8+5;return(0,c.jsx)("div",{ref:a,style:{width:"100%",minHeight:e}})}let f=r&&i.length>1;return(0,c.jsxs)("div",{ref:a,style:{width:"100%",position:"relative"},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[(0,c.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:9},children:[f&&(0,c.jsx)(rb,{dir:"prev",onClick:()=>g(-1)}),(0,c.jsx)("div",{"data-testid":"banner-stage",style:{position:"relative",flex:1,minWidth:0,width:"100%",height:"auto"===t?void 0:t,overflow:"hidden"},children:i.map((e,r)=>{let a=r===u,n="auto"===t&&a;return(0,c.jsx)("div",{"data-testid":"banner-slide","data-active":a,style:{position:n?"relative":"absolute",top:n?void 0:0,left:n?void 0:0,width:"100%",height:"auto"===t?void 0:"100%",display:"flex",alignItems:"center",opacity:+!!a,transition:"opacity 0.4s ease",pointerEvents:a?"auto":"none"},children:(0,c.jsx)(rf,{group:e,maxHeight:t,isActive:a,optimizeImages:l})},r)})}),f&&(0,c.jsx)(rb,{dir:"next",onClick:()=>g(1)})]}),(0,c.jsx)("div",{style:{display:"flex",justifyContent:"center",marginTop:8},children:i.length>1&&i.map((e,t)=>(0,c.jsx)("button",{type:"button","aria-label":`Go to slide ${t+1}`,onClick:()=>m(t),style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",border:"none",background:"transparent",curs
121or:"pointer",padding:0},children:(0,c.jsx)("span",{style:{width:t===u?24:8,height:5,borderRadius:3,background:t===u?"#555":"#ccc",transition:"width 0.3s ease, background 0.3s ease"}})},t))})]})}function rv({desktop:e,mobile:t,maxHeight:r,showArrows:l=!1,optimizeImages:a=!1,className:n}){return 0===e.length&&0===t.length?null:(0,c.jsx)("div",{className:n,style:{paddingTop:10,paddingBottom:10},children:(0,c.jsxs)("div",{className:"mx-auto max-w-7xl",children:[e.length>0&&(0,c.jsx)("div",{className:"hidden md:block",children:(0,c.jsx)(ry,{banners:e,maxHeight:r,showArrows:l,optimizeImages:a})}),t.length>0&&(0,c.jsx)("div",{className:"md:hidden",children:(0,c.jsx)(ry,{banners:t,maxHeight:r,showArrows:l,optimizeImages:a})})]})})}function rj({post:e,overrides:t}){let{config:r}=(0,i.dY)(),l=function(e,t,r={}){var l,n;let s=e.seo?.image??e.featuredImageUrl,i=e.seo?.description??e.excerpt,o=r.siteUrl?.replace(/\/+$/,""),d=e.url.startsWith("/")?e.url:`/${e.url}`,c=o?`${o}/blog${d}`:void 0,u=(l=r.siteUrl,(n=r.dealerLogo)?/^https?:\/\//i.test(n)?n:l?`${l.replace(/\/+$/,"")}${n.startsWith("/")?n:`/${n}`}`:void 0:void 0),m={"@context":"https://schema.org","@type":"BlogPosting",headline:e.title,...c&&{url:c,"@id":`${c}#article`,mainEntityOfPage:{"@type":"WebPage","@id":c}},datePublished:e.publishedAt,dateModified:e.updatedAt??e.publishedAt,description:i,...s&&{image:s},author:{"@type":"Organization",name:t},publisher:{"@type":"Organization",name:t,...u&&{logo:{"@type":"ImageObject",url:u}}},...e.tags.length>0&&{keywords:e.tags.join(", ")}};return(0,a.oh)(m,r.override)}(e,r.name,{override:t?.primary});return(0,c.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}})}var rw=[400,800,1200];function rN({post:e,optimizeImages:t=!1}){let{isAdmin:r}=(0,i.YQ)(),l=`/blog${e.url}`,a=!!e.featuredImageUrl&&e.featuredImageUrl.length>0,n=e.featuredImageUrl&&t?t$(e.featuredImageUrl,rw[rw.length-1],75):e.featuredImageUrl??void 0,s=e.featuredImageUrl&&t?tL(e.featuredImageUrl,rw,75):void 0,o=(0,c.jsxs)("article",{className:"group overflow-hidden rounded-lg border border-gray-200 bg-white shadow-sm transition-shadow hover:shadow-md",children:[(0,c.jsx)("a",{href:l,className:"block",children:a?(0,c.jsx)("div",{className:"aspect-[16/9] overflow-hidden bg-gray-100",children:(0,c.jsx)("img",{src:n,srcSet:s,sizes:s?"(min-width: 1024px) 33vw, (min-width: 640px) 50vw, 100vw":void 0,alt:e.title,className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-105",loading:"lazy"})}):(0,c.jsx)("div",{className:"flex aspect-[16/9] items-center justify-center bg-gray-100",children:(0,c.jsx)("svg",{className:"h-12 w-12 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"})})})}),(0,c.jsxs)("div",{className:"p-4",children:[(0,c.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[e.category&&(0,c.jsx)("a",{href:`/blog/${e.category.slug}`,className:"inline-block rounded-full bg-dealer-primary/10 px-2.5 py-0.5 text-xs font-semibold text-dealer-primary hover:bg-dealer-primary/20",children:e.category.name}),(0,c.jsx)("time",{dateTime:e.publishedAt,className:"text-xs text-gray-500",children:new Date(e.publishedAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]}),(0,c.jsx)("a",{href:l,className:"block",children:(0,c.jsx)("h2",{className:"mb-2 text-lg font-bold leading-tight text-gray-900 group-hover:text-dealer-primary",children:e.title})}),(0,c.jsx)("p",{className:"mb-3 line-clamp-3 text-sm text-gray-600",children:e.excerpt}),e.tags.length>0&&(0,c.jsx)("div",{className:"flex flex-wrap gap-1",children:e.tags.slice(0,3).map(e=>(0,c.jsx)("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs text-gray-500",children:e},e))})]})]});return r?(0,c.jsxs)("div",{className:"relative",children:[o,(0,c.jsx)(i.TD,{mode:"card",entity:"blogPost",id:e.id})]}):o}function rk({data:e,id:t,dataAttributes:r}){let l=JSON.stringify(e).replace(/</g,"\\u003c");return(0,c.jsx)("script",{type:"application/ld+json",id:t,suppressHydrationWarning:!0,...r,dangerouslySetInnerHTML:{__html:l}})}function rC({categories:e,activeCategory:t}){return(0,c.jsxs)("nav",{"aria-label":"Blog categories",children:[(0,c.jsx)("h2",{className:"mb-3 text-sm font-bold uppercase tracking-wider text-gray-700",children:"Categories"}),(0,c.jsxs)("ul",{className:"space-y-1",children:[(0,c.jsx)("li",{children:(0,c.jsx)("a",{href:"/blog",className:`block rounded-lg px-3 py-2 text-sm font-medium transition-colors ${!t?"bg-dealer-primary/10 text-dealer-primary":"text-gray-700 hover:bg-gray-100"}`,children:"All Posts"})}),e.map(e=>(0,c.jsx)("li",{children:(0,c.jsxs)("a",{href:`/blog/${e.slug}`,className:`flex items-center justify-between rounded-lg px-3 py-2 text-sm font-medium transition-colors ${t===e.slug?"bg-dealer-primary/10 text-dealer-primary":"text-gray-700 hover:bg-gray-100"}`,children:[(0,c.jsx)("span",{children:e.name}),(0,c.jsx)("span",{className:"rounded-full bg-gray-100 px-2 py-0.5 text-xs text-gray-500",children:e.postsCount})]})},e.id))]})]})}function r$({posts:e}){return 0===e.length?null:(0,c.jsxs)("nav",{"aria-label":"Recent posts",children:[(0,c.jsx)("h2",{className:"mb-3 text-sm font-bold uppercase tracking-wider text-gray-700",children:"Recent Posts"}),(0,c.jsx)("ul",{className:"space-y-2",children:e.map(e=>(0,c.jsx)("li",{children:(0,c.jsx)("a",{href:`/blog${e.url}`,className:"block text-sm text-gray-700 hover:text-dealer-primary",children:e.title})},e.id))})]})}function rL({archives:e}){return 0===e.length?null:(0,c.jsxs)("nav",{"aria-label":"Blog archives",children:[(0,c.jsx)("h2",{className:"mb-3 text-sm font-bold uppercase tracking-wider text-gray-700",children:"Archives"}),(0,c.jsx)("ul",{className:"space-y-1",children:e.map(e=>(0,c.jsx)("li",{children:(0,c.jsxs)("a",{href:`/blog/archives/${e.year}/${e.month}`,className:"flex items-center justify-between rounded-lg px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",children:[(0,c.jsxs)("span",{children:[e.monthName," ",e.year]}),(0,c.jsx)("span",{className:"text-xs text-gray-400",children:e.count})]})},`${e.year}-${e.month}`))})]})}function rM({open:e,onClose:t,categories:r,activeCategory:l}){return((0,d.useEffect)(()=>
121{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),e)?(0,u.createPortal)((0,c.jsxs)("div",{className:"fixed inset-0 z-[9998] lg:hidden",children:[(0,c.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),(0,c.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 flex max-h-[85vh] flex-col rounded-t-2xl bg-white shadow-2xl animate-in slide-in-from-bottom",children:[(0,c.jsxs)("div",{className:"flex-none border-b border-gray-100 px-5 pb-3 pt-3",children:[(0,c.jsx)("div",{className:"mx-auto mb-3 h-1 w-10 rounded-full bg-gray-300"}),(0,c.jsxs)("div",{className:"flex items-center justify-between",children:[(0,c.jsx)("h2",{className:"text-lg font-bold text-gray-900",children:"Categories"}),(0,c.jsx)("button",{type:"button",onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 text-gray-500 hover:bg-gray-200","aria-label":"Close categories",children:(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),(0,c.jsx)("div",{className:"flex-1 overflow-y-auto overscroll-contain px-5 py-4",children:(0,c.jsx)(rC,{categories:r,activeCategory:l})})]})]}),document.body):null}function rS({category:e,className:t,siteUrl:r,initialData:n,optimizeImages:s=!1}){let{config:o}=(0,i.dY)(),[u,m]=(0,d.useState)(1),[x,h]=(0,d.useState)([]),[p,g]=(0,d.useState)([]),[f,b]=(0,d.useState)([]),[y,v]=(0,d.useState)(!1),{posts:j,pagination:w,isLoading:N}=(0,l.BL)({page:u,category:e,fallbackData:1===u?n:void 0}),k=(0,d.useMemo)(()=>o.websiteId?new l.q1({websiteId:o.websiteId,baseUrl:o.inventory?.baseUrl}):null,[o.websiteId,o.inventory?.baseUrl]);(0,d.useEffect)(()=>{k&&(k.fetchCategories().then(h).catch(()=>{}),k.fetchRecentPosts(5).then(g).catch(()=>{}),k.fetchArchives().then(b).catch(()=>{}))},[k]);let $=x.find(t=>t.slug===e),L=$?$.name:"Blog",M=e?`/blog/${e}`:"/blog",S=r&&j.length>0?function({posts:e,pagination:t,siteUrl:r,path:l,title:n,currentPage:s=1,override:i}){let o=r.replace(/\/+$/,""),d=`${o}${l.startsWith("/")?l:`/${l}`}`,c=t?.current_page??s,u=c>1?`${d}?page=${c}`:d,m=t?(t.current_page-1)*t.per_page:0,x={"@context":"https://schema.org","@type":"CollectionPage","@id":`${u}#collection`,name:n,url:u,mainEntity:{"@type":"ItemList",numberOfItems:e.length,itemListElement:e.map((e,t)=>{let r,l=(r=e.url.startsWith("/")?e.url:`/${e.url}`,`${o}/blog${r}`);return{"@type":"ListItem",position:m+t+1,item:{"@type":"BlogPosting","@id":`${l}#article`,name:e.title}}})}};return(0,a.oh)(x,i)}({posts:j,pagination:w,siteUrl:r,path:M,title:L,currentPage:u}):null;return(0,c.jsxs)("div",{className:`mx-auto max-w-7xl px-4 py-8 ${t??""}`,children:[S&&(0,c.jsx)(rk,{data:S}),(0,c.jsx)(i.PO,{section:"blogPosts"}),(0,c.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,c.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:L}),(0,c.jsxs)("button",{type:"button",onClick:()=>v(!0),className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2 text-sm font-semibold text-gray-700 shadow-sm active:bg-gray-50 lg:hidden",children:[(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h7"})}),"Categories"]})]}),(0,c.jsxs)("div",{className:"flex min-w-0 gap-8 lg:flex-row",children:[(0,c.jsxs)("main",{className:"min-w-0 flex-1",children:[N&&(0,c.jsx)("div",{className:"grid gap-6 sm:grid-cols-2 xl:grid-cols-3",children:Array.from({length:6}).map((e,t)=>(0,c.jsxs)("div",{className:"animate-pulse rounded-lg border border-gray-200 bg-white",children:[(0,c.jsx)("div",{className:"aspect-[16/9] bg-gray-200"}),(0,c.jsxs)("div",{className:"space-y-3 p-4",children:[(0,c.jsx)("div",{className:"h-3 w-20 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-5 w-3/4 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-3 w-full rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-3 w-2/3 rounded bg-gray-200"})]})]},t))}),!N&&0===j.length&&(0,c.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-12 text-center",children:[(0,c.jsx)("svg",{className:"mx-auto mb-4 h-12 w-12 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"})}),(0,c.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"No posts yet"}),(0,c.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"Check back soon for new content."})]}),!N&&j.length>0&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"grid gap-6 sm:grid-cols-2 xl:grid-cols-3",children:j.map(e=>(0,c.jsx)(rN,{post:e,optimizeImages:s}
121,e.id))}),w&&w.last_page>1&&(0,c.jsx)("div",{className:"mt-8",children:(0,c.jsx)(C,{pagination:w,onPageChange:e=>{m(e),window.scrollTo({top:0,behavior:"smooth"})}})})]})]}),(0,c.jsx)("aside",{className:"hidden w-60 shrink-0 lg:block",children:(0,c.jsxs)("div",{className:"sticky top-4 space-y-8",children:[(0,c.jsx)(r$,{posts:p}),(0,c.jsx)(rL,{archives:f}),(0,c.jsx)(rC,{categories:x,activeCategory:e})]})})]}),(0,c.jsx)(rM,{open:y,onClose:()=>v(!1),categories:x,activeCategory:e})]})}var r_=[640,768,1152];function rz({slug:e,categorySlug:t,className:r,optimizeImages:a=!1}){let{post:n,isLoading:s,error:o}=(0,l.e7)(e,t);return s?(0,c.jsxs)("div",{className:`mx-auto max-w-3xl px-4 py-8 animate-pulse ${r??""}`,children:[(0,c.jsx)("div",{className:"mb-6 h-8 w-3/4 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"mb-4 h-4 w-40 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"mb-8 aspect-[16/9] rounded-lg bg-gray-200"}),(0,c.jsxs)("div",{className:"space-y-3",children:[(0,c.jsx)("div",{className:"h-4 w-full rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-4 w-full rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-4 w-2/3 rounded bg-gray-200"})]})]}):o||!n?(0,c.jsx)("div",{className:`mx-auto max-w-3xl px-4 py-8 ${r??""}`,children:(0,c.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-12 text-center",children:[(0,c.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Post not found"}),(0,c.jsx)("p",{className:"mt-2 text-gray-500",children:"The blog post you're looking for doesn't exist."}),(0,c.jsx)("a",{href:"/blog",className:"mt-4 inline-block rounded-lg bg-dealer-primary px-6 py-2 text-sm font-semibold text-white hover:opacity-90",children:"Back to Blog"})]})}):(0,c.jsxs)("article",{className:`mx-auto max-w-3xl px-4 py-8 ${r??""}`,children:[(0,c.jsx)(rj,{post:n}),(0,c.jsx)(i.TD,{mode:"vdp",entity:"blogPost",id:n.id}),(0,c.jsxs)("nav",{className:"mb-6 text-sm text-gray-500","aria-label":"Breadcrumb",children:[(0,c.jsx)("a",{href:"/blog",className:"hover:text-dealer-primary",children:"Blog"}),n.category&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"mx-2",children:"/"}),(0,c.jsx)("a",{href:`/blog/${n.category.slug}`,className:"hover:text-dealer-primary",children:n.category.name})]}),(0,c.jsx)("span",{className:"mx-2",children:"/"}),(0,c.jsx)("span",{className:"text-gray-900",children:n.title})]}),(0,c.jsxs)("header",{className:"mb-8",children:[(0,c.jsx)("h1",{className:"mb-4 text-3xl font-bold leading-tight text-gray-900 sm:text-4xl",children:n.title}),(0,c.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[n.category&&(0,c.jsx)("a",{href:`/blog/${n.category.slug}`,className:"inline-block rounded-full bg-dealer-primary/10 px-3 py-1 text-xs font-semibold text-dealer-primary hover:bg-dealer-primary/20",children:n.category.name}),(0,c.jsx)("time",{dateTime:n.publishedAt,className:"text-sm text-gray-500",children:new Date(n.publishedAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]})]}),n.featuredImageUrl&&(0,c.jsx)("div",{className:"mb-8 overflow-hidden rounded-lg",children:(0,c.jsx)("img",{src:a?t$(n.featuredImageUrl,r_[r_.length-1],80):n.featuredImageUrl,srcSet:a?tL(n.featuredImageUrl,r_,80):void 0,sizes:a?"(min-width: 768px) 768px, 100vw":void 0,alt:n.title,className:"w-full object-cover"})}),(0,c.jsx)("div",{className:"prose prose-lg max-w-none prose-headings:text-gray-900 prose-a:text-dealer-primary prose-img:rounded-lg",dangerouslySetInnerHTML:{__html:n.content??""}}),n.tags.length>0&&(0,c.jsxs)("div",{className:"mt-8 border-t border-gray-200 pt-6",children:[(0,c.jsx)("h2",{className:"mb-3 text-sm font-bold uppercase tracking-wider text-gray-700",children:"Tags"}),(0,c.jsx)("div",{className:"flex flex-wrap gap-2",children:n.tags.map(e=>(0,c.jsx)("span",{className:"rounded-full bg-gray-100 px-3 py-1 text-sm text-gray-600",children:e},e))})]}),(0,c.jsx)("div",{className:"mt-8 border-t border-gray-200 pt-6",children:(0,c.jsxs)("a",{href:"/blog",className:"inline-flex items-center gap-2 text-sm font-medium text-dealer-primary hover:opacity-80",children:[(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Back to Blog"]})})]})}var rW=[400,800,1200];function rT({event:e,optimizeImages:t=!1}){let{isAdmin:r}=(0,i.YQ)(),{href:a,isExternal:n}=(0,l._C)(e),s=n?{target:"_blank",rel:"noopener noreferrer"}:{}
121,o=[e.city,e.state].filter(Boolean).join(", "),d=e.imageUrl&&t?t$(e.imageUrl,rW[rW.length-1],75):e.imageUrl??void 0,u=e.imageUrl&&t?tL(e.imageUrl,rW,75):void 0,m=(0,c.jsxs)("article",{className:"group overflow-hidden rounded-lg border border-gray-200 bg-white shadow-sm transition-shadow hover:shadow-md",children:[(0,c.jsx)("a",{href:a,className:"block",...s,children:e.imageUrl?(0,c.jsx)("div",{className:"aspect-[16/9] overflow-hidden bg-gray-100",children:(0,c.jsx)("img",{src:d,srcSet:u,sizes:u?"(min-width: 1024px) 33vw, (min-width: 640px) 50vw, 100vw":void 0,alt:e.name,className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-105",loading:"lazy"})}):(0,c.jsx)("div",{className:"flex aspect-[16/9] items-center justify-center bg-gray-100",children:(0,c.jsx)("svg",{className:"h-12 w-12 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})})}),(0,c.jsxs)("div",{className:"p-4",children:[(0,c.jsx)("time",{className:"text-xs font-semibold uppercase tracking-wide text-dealer-primary",children:(0,l.z6)(e.startDate,e.endDate)}),(0,c.jsx)("a",{href:a,className:"block",...s,children:(0,c.jsx)("h2",{className:"mt-1 text-lg font-bold leading-tight text-gray-900 group-hover:text-dealer-primary",children:e.name})}),o&&(0,c.jsxs)("p",{className:"mt-1 flex items-center gap-1 text-sm text-gray-500",children:[(0,c.jsxs)("svg",{className:"h-4 w-4 flex-none",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a2 2 0 01-2.828 0l-4.243-4.243a8 8 0 1111.314 0z"}),(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),o]})]})]});return r?(0,c.jsxs)("div",{className:"relative",children:[m,(0,c.jsx)(i.TD,{mode:"card",entity:"event",id:e.id})]}):m}function rB({websiteId:e,className:t,siteUrl:r,optimizeImages:n=!1}){let{events:s,isLoading:o}=(0,l.LJ)({websiteId:e}),d=r&&!o&&s.length>0?function({events:e,siteUrl:t,path:r="/events",title:l="Events",override:n}){let s=t.replace(/\/+$/,""),i=`${s}${r.startsWith("/")?r:`/${r}`}`,o={"@context":"https://schema.org","@type":"CollectionPage","@id":`${i}#collection`,name:l,url:i,mainEntity:{"@type":"ItemList",numberOfItems:e.length,itemListElement:e.map(({event:e,path:t},r)=>({"@type":"ListItem",position:r+1,item:{"@type":"Event","@id":`${s}${t}#event`,name:e.name}}))}};return(0,a.oh)(o,n)}({events:s.map(e=>({event:e,path:`/events/${(0,l.Qc)(e)}`})),siteUrl:r}):null;return(0,c.jsxs)("div",{className:`mx-auto max-w-7xl px-4 py-8 ${t??""}`,children:[d&&(0,c.jsx)(rk,{data:d}),(0,c.jsx)(i.PO,{section:"events"}),(0,c.jsx)("h1",{className:"mb-6 text-2xl font-bold text-gray-900",children:"Events"}),o&&(0,c.jsx)("div",{className:"grid gap-6 sm:grid-cols-2 xl:grid-cols-3",children:Array.from({length:3}).map((e,t)=>(0,c.jsxs)("div",{className:"animate-pulse rounded-lg border border-gray-200 bg-white",children:[(0,c.jsx)("div",{className:"aspect-[16/9] bg-gray-200"}),(0,c.jsxs)("div",{className:"space-y-3 p-4",children:[(0,c.jsx)("div",{className:"h-3 w-24 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-5 w-3/4 rounded bg-gray-200"})]})]},t))}),!o&&0===s.length&&(0,c.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-12 text-center",children:[(0,c.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"No upcoming events"}),(0,c.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"Check back soon for upcoming events."})]}),!o&&s.length>0&&(0,c.jsx)("div",{className:"grid gap-6 sm:grid-cols-2 xl:grid-cols-3",children:s.map(e=>(0,c.jsx)(rT,{event:e,optimizeImages:n},e.id))})]})}function rF({event:e,overrides:t}){let{config:r}=(0,i.dY)(),l=function(e,t,{override:r}={}){let l=!!(e.address||e.city||e.state||e.zip),n={"@context":"https://schema.org","@type":"Event",name:e.name,startDate:e.startDate,...e.endDate&&{endDate:e.endDate},eventStatus:"https://schema.org/EventScheduled",...e.description&&{description:e.description},...e.imageUrl&&{image:e.imageUrl},organizer:{"@type":"Organization",name:t},...l&&{location:{"@type":"Place",name:t,address:{"@type":"PostalAddress",...e.address&&{streetAddress:e.address},...e.city&&{addressLocality:e.city},...e.state&&{addressRegion:e.state},...e.zip&&{postalCode:e.zip}}}}};
121return(0,a.oh)(n,r)}(e,r.name,{override:t?.primary});return(0,c.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}})}function rA({eventName:e,renderItem:t,limit:r=6,heading:l="Units at this event",className:n="mt-10",gridClassName:s="grid gap-4 sm:grid-cols-2 lg:grid-cols-3"}){let{config:o}=(0,i.dY)(),u=o.inventory.vdpBase??"/inventory",m=(0,d.useMemo)(()=>new i.QG({companyId:o.inventory.companyId,websiteId:o.websiteId,baseUrl:o.inventory.baseUrl,globalImplicitFilters:o.inventory.implicitFilters,imageCollectionOrder:o.inventory.imageCollectionOrder,disableCache:o.inventory.disableCache}),[o.inventory.companyId,o.inventory.baseUrl,o.inventory.implicitFilters,o.inventory.imageCollectionOrder,o.inventory.disableCache]),x=(0,d.useMemo)(()=>({"events.name":[e],perPage:r}),[e,r]),p=o.inventory.implicitSort,g=e?`event-inventory-${e}-${r}-${JSON.stringify(p??null)}`:null,{data:f}=(0,h.Ay)(g,()=>m.fetchInventory(x,void 0,p),{revalidateOnFocus:!1}),b=f?.data??[];return 0===b.length?null:(0,c.jsxs)("section",{className:n,children:[l&&(0,c.jsx)("h2",{className:"mb-4 text-sm font-bold uppercase tracking-wider text-gray-700",children:l}),(0,c.jsx)("div",{className:s,children:b.map(e=>(0,c.jsx)(a.px,{item:e,children:t(e,u)},e.id))})]})}var rP=[640,1024,1600],rI=(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),rR=(0,c.jsxs)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a2 2 0 01-2.828 0l-4.243-4.243a8 8 0 1111.314 0z"}),(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),rE=(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),rU=(0,c.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})});function rH({icon:e,label:t,value:r}){return(0,c.jsxs)("div",{className:"flex items-center gap-3 bg-white p-5",children:[(0,c.jsx)("span",{className:"flex h-10 w-10 flex-none items-center justify-center rounded-full bg-dealer-primary/10 text-dealer-primary",children:e}),(0,c.jsxs)("div",{className:"min-w-0",children:[(0,c.jsx)("dt",{className:"text-[11px] font-semibold uppercase tracking-wider text-gray-400",children:t}),(0,c.jsx)("dd",{className:"truncate text-sm font-semibold text-gray-900",children:r})]})]})}function rV({icon:e,children:t}){return(0,c.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-bold uppercase tracking-wider text-gray-700",children:[(0,c.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-dealer-primary/10 text-dealer-primary",children:e}),t]})}function rD({event:e}){let t=(0,l.Bc)(e.hours),r=[e.city,e.state].filter(Boolean).join(", "),a=[e.address,e.city,e.state,e.zip].filter(Boolean).join(", "),n=a?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(a)}`:null,s=a?`https://maps.google.com/maps?q=${encodeURIComponent(a)}&z=14&output=embed`:null;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"relative z-10 mx-auto -mt-8 max-w-5xl px-1",children:(0,c.jsxs)("dl",{className:"grid grid-cols-1 gap-px overflow-hidden rounded-2xl border border-gray-200 bg-gray-200 shadow-lg sm:grid-cols-2",children:[(0,c.jsx)(rH,{icon:rI,label:"Dates",value:(0,l.z6)(e.startDate,e.endDate)}),(0,c.jsx)(rH,{icon:rR,label:"Location",value:r||"â"})]})}),(0,c.jsxs)("div",{className:"mt-10 grid gap-8 lg:grid-cols-3",children:[(0,c.jsxs)("div",{className:"space-y-8 lg:col-span-2",children:[e.description&&(0,c.jsxs)("section",{className:"rounded-2xl border border-gray-200 bg-white p-6 shadow-sm",children:[(0,c.jsx)(rV,{icon:rU,children:"About This Event"}),(0,c.jsx)("p",{className:"mt-3 whitespace-pre-line leading-relaxed text-gray-600",children:e.description})]}),t.length>0&&(0,c.jsxs)("section",{className:"rounded-2xl border border-gray-200 bg-white p-6 shadow-sm",children:[(0,c.jsx)(rV,{icon:rE,children:"Event Hours"}),(0,c.jsx)("dl",{className:"mt-3 divide-y divide-gray-100",children:t.map((e,t)=>(0,c.jsxs)("div",{className:"flex items-center justify-between gap-4 py-2.5 text-sm",children:[(0,c.jsx)("dt",{className:"font-medium text-gray-900",children:e.days}),(0,c.jsx)("dd",{className:"Closed"===e.hours?"font-medium text-gray-400":"text-gray-600",children:e.hours})]},t))})]})]}),a&&(0,c.jsx)("aside",{className:"lg:col-span-1",children:(0,c.jsxs)("section",{className:"overflow-hidden rounded-2xl border border-gray-200 bg-white shadow-sm",children:[s&&(0,c.jsx)("iframe",{title:`Map of ${e.name}`,src:s,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",className:"h-56 w-full border-0"}),(0,c.jsxs)("div",{className:"p-6",children:[(0,c.jsx)(rV,{icon:rR,children:"Location"}),(0,c.jsx)("p",{className:"mt-3 text-sm font-medium text-gray-900",children:a}),n&&(0,c.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-flex items-center gap-1 text-sm font-semibold text-dealer-primary hover:underline",children:"Get Directions \xbb"})]})]})})]})]})}function rO({id:e,slug:t,websiteId:r,showInventoryCta:a=!0,showInventory:n=!1,renderItem:s,inventoryLimit:o=6,className:d,optimizeImages:u=!1}){let m=e??(0,l.$5)(t??"")??0,{event:x,isLoading:h}=(0,l._q)(m,{websiteId:r});if(h)return(0,c.jsx)("div",{className:`mx-auto max-w-7xl px-4 py-8 ${d??""}`,children:(0,c.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,c.jsx)("div",{className:"aspect-[21/9] rounded-2xl bg-gray-200"}),(0,c.jsx)("div",{className:"h-7 w-2/3 rounded bg-gray-200"}),(0,c.jsx)("div",{className:"h-4 w-1/3 rounded bg-gray-200"})]})});if(!x)return(0,c.jsxs)("div",{className:`mx-auto max-w-7xl px-4 py-16 text-center ${d??""}`,children:[(0,c.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Event not found"}),(0,c.jsx)("p",{className:"mt-2 text-gray-500",children:"This event may have ended or been removed."}),(0,c.jsx)("a",{href:"/events",className:"mt-4 inline-block text-dealer-primary hover:underline",children:"â Back to events"})]});
121let p=[x.city,x.state].filter(Boolean).join(", ");return(0,c.jsxs)("div",{className:`mx-auto max-w-7xl px-4 py-8 ${d??""}`,children:[(0,c.jsx)(rF,{event:x}),(0,c.jsx)(i.TD,{mode:"vdp",entity:"event",id:x.id}),(0,c.jsxs)("nav",{"aria-label":"Breadcrumb",className:"mb-4 text-sm text-gray-500",children:[(0,c.jsx)("a",{href:"/events",className:"font-medium text-dealer-primary hover:underline",children:"Events"}),(0,c.jsx)("span",{className:"mx-2","aria-hidden":"true",children:"/"}),(0,c.jsx)("span",{className:"text-gray-700",children:x.name})]}),(0,c.jsxs)("section",{className:"relative isolate overflow-hidden rounded-2xl bg-dealer-primary shadow-sm",children:[x.imageUrl&&(0,c.jsx)("img",{src:u?t$(x.imageUrl,rP[rP.length-1],80):x.imageUrl,srcSet:u?tL(x.imageUrl,rP,80):void 0,sizes:u?"100vw":void 0,alt:"","aria-hidden":"true",className:"absolute inset-0 h-full w-full object-cover"}),(0,c.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/45 to-black/10"}),(0,c.jsxs)("div",{className:"relative flex min-h-[260px] flex-col justify-end p-6 sm:min-h-[340px] sm:p-10",children:[(0,c.jsx)("p",{className:"text-xs font-bold uppercase tracking-[0.2em] text-white/80",children:(0,l.z6)(x.startDate,x.endDate)}),(0,c.jsx)("h1",{className:"mt-2 max-w-3xl text-3xl font-bold leading-tight text-white drop-shadow-sm sm:text-5xl",children:x.name}),p&&(0,c.jsxs)("p",{className:"mt-3 flex items-center gap-1.5 text-sm font-medium text-white/90",children:[(0,c.jsxs)("svg",{className:"h-4 w-4 flex-none",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a2 2 0 01-2.828 0l-4.243-4.243a8 8 0 1111.314 0z"}),(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),p]})]})]}),(0,c.jsx)(rD,{event:x}),n&&s&&(0,c.jsx)(rA,{eventName:x.name,renderItem:s,limit:o}),a&&x.inventoryCount>0&&(0,c.jsxs)("div",{className:"mt-10 rounded-2xl bg-dealer-primary px-6 py-10 text-center shadow-sm sm:px-10",children:[(0,c.jsx)("h2",{className:"text-2xl font-bold text-white sm:text-3xl",children:"Shop the units at this event"}),(0,c.jsx)("p",{className:"mt-2 text-sm text-white/80",children:"Browse the units featured at this event."}),(0,c.jsx)("a",{href:`/inventory?event=${encodeURIComponent(x.name)}`,className:"mt-6 inline-block rounded-lg bg-white px-8 py-3 text-sm font-bold text-dealer-primary shadow-sm transition hover:bg-white/90",children:"Browse Inventory"})]})]})}function rG({name:e,label:t,type:r="text",required:l=!1,placeholder:a,className:n,...s}){let i=`form-${e}`;return(0,c.jsxs)("div",{className:n,children:[(0,c.jsxs)("label",{htmlFor:i,className:"mb-1 block text-sm font-medium text-gray-700",children:[t,l&&(0,c.jsx)("span",{className:"ml-1 text-red-600","aria-hidden":"true",children:"*"})]}),(0,c.jsx)("input",{id:i,name:e,type:r,required:l,placeholder:a,className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-dealer-primary focus:outline-none focus:ring-1 focus:ring-dealer-primary",...s})]})}function rK({name:e,label:t,required:r=!1,placeholder:l,rows:a=4,className:n}){let s=`form-${e}`;return(0,c.jsxs)("div",{className:n,children:[(0,c.jsxs)("label",{htmlFor:s,className:"mb-1 block text-sm font-medium text-gray-700",children:[t,r&&(0,c.jsx)("span",{className:"ml-1 text-red-600","aria-hidden":"true",children:"*"})]}),(0,c.jsx)("textarea",{id:s,name:e,required:r,placeholder:l,rows:a,className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-dealer-primary focus:outline-none focus:ring-1 focus:ring-dealer-primary"})]})}function rY({name:e,label:t,options:r,required:l=!1,placeholder:a,className:n}){let s=`form-${e}`,i=r.map(e=>"string"==typeof e?{label:e,value:e}:e);return(0,c.jsxs)("div",{className:n,children:[(0,c.jsxs)("label",{htmlFor:s,className:"mb-1 block text-sm font-medium text-gray-700",children:[t,l&&(0,c.jsx)("span",{className:"ml-1 text-red-600","aria-hidden":"true",children:"*"})]}),(0,c.jsxs)("select",{id:s,name:e,required:l,className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-dealer-primary focus:outline-none focus:ring-1 focus:ring-dealer-primary",defaultValue:"",children:[a&&(0,c.jsx)("option",{value:"",disabled:!0,children:a}),i.map(e=>(0,c.jsx)("option",{value:e.value,children:e.label},e.value))]})]})}function rq({children:e="Submit",className:t,loadingText:r="Submitting..."}){let{formState:l}=(0,a.pB)(),n="submitting"===l;return(0,c.jsx)("button",{type:"submit",disabled:n,className:t??"w-full rounded-lg bg-dealer-primary px-6 py-3 font-semibold text-white hover:bg-dealer-primary-dark disabled:opacity-50",children:n?r:e})}function rQ(e){return(0,c.jsx)(rG,{name:"first_name",label:"First Name",required:!0,...e})}function rZ(e){return(0,c.jsx)(rG,{name:"last_name",label:"Last Name",required:!0,...e})}function rJ(e){return(0,c.jsx)(rG,{name:"email",label:"Email",type:"email",...e})}var rX="Please enter a 10-digit phone number.";
121function r0({onChange:e,onInvalid:t,...r}){return(0,c.jsx)(rG,{name:"phone",label:"Phone",type:"tel",inputMode:"tel",autoComplete:"tel",placeholder:"(555) 123-4567",pattern:"[^0-9]*([0-9][^0-9]*){10}",title:rX,onChange:function(t){let r,l=t.currentTarget,a=l.selectionStart??l.value.length,n=l.value.slice(0,a).replace(/\D/g,"").length,s=((r=l.value.replace(/\D/g,"")).length>10&&r.startsWith("1")&&(r=r.slice(1)),(r=r.slice(0,10)).length<=3)?r:r.length<=6?`(${r.slice(0,3)}) ${r.slice(3)}`:`(${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6)}`;if(s!==l.value&&(l.value=s,null!==l.selectionStart)){let e=function(e,t){let r=0,l=0;for(;l<e.length&&r<t;)/[0-9]/.test(e[l])&&r++,l++;return l}(s,n);l.setSelectionRange(e,e)}l.setCustomValidity(""),e?.(t)},onInvalid:function(e){let r=e.currentTarget;r.validity.patternMismatch&&r.setCustomValidity(rX),t?.(e)},...r})}function r2(e){return(0,c.jsx)(rK,{name:"comments",label:"Comments",rows:4,...e})}function r1({formId:e,itemId:t,hiddenFields:r,className:l}){return(0,c.jsxs)(a.or,{formId:e,itemId:t,hiddenFields:r,formName:"Get Best Price",className:l??"space-y-4",children:[(0,c.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,c.jsx)(rQ,{}),(0,c.jsx)(rZ,{})]}),(0,c.jsx)(rJ,{}),(0,c.jsx)(r0,{required:!0}),(0,c.jsx)(r2,{placeholder:"Tell us what you're looking for..."}),(0,c.jsx)(rq,{children:"Get Best Price"})]})}function r4({formId:e,itemId:t,hiddenFields:r,className:l}){return(0,c.jsxs)(a.or,{formId:e,itemId:t,hiddenFields:r,formName:"Contact Us",className:l??"space-y-4",children:[(0,c.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,c.jsx)(rQ,{}),(0,c.jsx)(rZ,{})]}),(0,c.jsx)(rJ,{required:!0}),(0,c.jsx)(r0,{}),(0,c.jsx)(r2,{placeholder:"How can we help you?"}),(0,c.jsx)(rq,{children:"Send Message"})]})}function r5({formId:e,itemId:t,hiddenFields:r,className:l}){return(0,c.jsxs)(a.or,{formId:e,itemId:t,hiddenFields:r,formName:"Check Availability",className:l??"space-y-4",children:[(0,c.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,c.jsx)(rQ,{}),(0,c.jsx)(rZ,{})]}),(0,c.jsx)(rJ,{}),(0,c.jsx)(r0,{required:!0}),(0,c.jsx)(rG,{name:"stock_number",label:"Stock Number",placeholder:"If known"}),(0,c.jsx)(r2,{placeholder:"Questions about availability?"}),(0,c.jsx)(rq,{children:"Check Availability"})]})}function r3({formId:e,itemId:t,hiddenFields:r,className:l}){return(0,c.jsxs)(a.or,{formId:e,itemId:t,hiddenFields:r,formName:"Schedule Appointment",className:l??"space-y-4",children:[(0,c.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,c.jsx)(rQ,{}),(0,c.jsx)(rZ,{})]}),(0,c.jsx)(rJ,{}),(0,c.jsx)(r0,{required:!0}),(0,c.jsx)(rG,{name:"preferred_date",label:"Preferred Date",type:"date"}),(0,c.jsx)(rY,{name:"preferred_time",label:"Preferred Time",placeholder:"Select a time",options:["Morning","Afternoon","Evening"]}),(0,c.jsx)(r2,{placeholder:"Anything we should know?"}),(0,c.jsx)(rq,{children:"Schedule Appointment"})]})}var r6=(0,x.default)(()=>r.e(8634).then(r.bind(r,8634)).then(e=>e.CookieConsentImpl),{loadableGenerated:{webpack:()=>[require.resolveWeak("./cookie-consent-impl-EC6GNHL2.js")]},ssr:!1});function r7({mode:e="opt-in"}={}){let t;return(0,c.jsx)("script",{id:"google-consent-mode-defaults",dangerouslySetInnerHTML:{__html:(t="opt-out"===e?"granted":"denied",` 122window.dataLayer = window.dataLayer || []; 123window.gtag = function gtag() { dataLayer.push(arguments) }; 124gtag('js', new Date()); 125gtag('consent', 'default', { 126 analytics_storage: '${t}', 127 ad_storage: '${t}', 128 ad_user_data: '${t}', 129 ad_personalization: '${t}', 130 functionality_storage: '${t}', 131 security_storage: 'granted', 132 wait_for_update: 2000, 133}); 134`.trim())}})}var r8={name:"static",resolve:e=>e.tracking?.trim()||e.real},r9=new Map;function le(e,t={}){if(!e)return null;let r=t.purpose??"display";for(let a of function({location:e,dept:t}){let r=[];return e&&t&&r.push(`${e}.${t}`),e&&r.push(e),t&&r.push(t),r.push("default"),r}(t)){var l;let n=e[a];if(!n)continue;let s="schema"===r?n.real:(!(l=n.provider)?r8:r9.get(l)??r8).resolve(n,{purpose:r,key:a});return{key:a,entry:n,number:"schema"===r?(0,i.yk)(s):(0,i.o$)(s,t.format),href:function(e){let t=e.trim(),r
134=t.startsWith("+")?"+":"";return`tel:${r}${t.replace(/\D/g,"")}`}(s)}}return null}function lt({location:e,dept:t,className:r,ariaLabel:l,children:a}){let{config:n}=(0,i.dY)(),s=le(n.phones,{location:e,dept:t,purpose:"display",format:n.phoneFormat});return s?(0,c.jsx)("a",{href:s.href,"data-phone-key":s.key,...r&&{className:r},...l&&{"aria-label":l},children:a??s.number}):null}function lr({location:e,dept:t,className:r}){let{config:l}=(0,i.dY)(),a=le(l.phones,{location:e,dept:t,purpose:"display",format:l.phoneFormat});return a?(0,c.jsx)("span",{"data-phone-key":a.key,...r&&{className:r},children:a.number}):null}var ll={bottom:"left-1/2 top-[calc(100%+4px)] -translate-x-1/2",top:"left-1/2 bottom-[calc(100%+4px)] -translate-x-1/2",right:"top-1/2 left-[calc(100%+4px)] -translate-y-1/2",left:"top-1/2 right-[calc(100%+4px)] -translate-y-1/2"},la={0:"",75:"group-hover/iconbtn:delay-75 group-focus/iconbtn:delay-75",100:"group-hover/iconbtn:delay-100 group-focus/iconbtn:delay-100",150:"group-hover/iconbtn:delay-150 group-focus/iconbtn:delay-150",200:"group-hover/iconbtn:delay-200 group-focus/iconbtn:delay-200",300:"group-hover/iconbtn:delay-300 group-focus/iconbtn:delay-300"};function ln({label:e,children:t,placement:r="bottom",delayMs:l=100,className:a="",tooltipClassName:n=""}){let s=`group/iconbtn relative inline-flex ${a}`.trim(),i=["pointer-events-none absolute z-10 whitespace-nowrap rounded-md bg-stone-900 px-2 py-0.5 text-[11px] font-medium text-white opacity-0 shadow-md transition-opacity duration-150 group-hover/iconbtn:opacity-100 group-focus/iconbtn:opacity-100",ll[r],la[l],n].filter(Boolean).join(" ");return(0,c.jsxs)("span",{className:s,children:[t,(0,c.jsx)("span",{className:i,role:"tooltip",children:e})]})}function ls({className:e=""}){return(0,c.jsx)("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,"aria-hidden":"true",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}function li({children:e,maxHeightPx:t=300,hideToggleSlackPx:r=60,fadeColor:l="white",chevronIcon:a,labels:n={},className:s="",toggleClassName:i="",defaultExpanded:o=!1}){let u=(0,d.useRef)(null),[m,x]=(0,d.useState)(o),[h,p]=(0,d.useState)(!1);(0,d.useEffect)(()=>{let e=u.current;if(!e)return;let l=()=>p(e.scrollHeight>t+r);l();let a=new ResizeObserver(l);return a.observe(e),()=>a.disconnect()},[t,r]);let g=n.showMore??"Show more",f=n.showLess??"Show less",b=!m&&h,y=b?{maxHeight:`${t}px`}:void 0,v={background:`linear-gradient(to top, ${l}, ${l} 10%, transparent)`};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{ref:u,className:`relative ${b?"overflow-hidden":""} transition-[max-height] duration-300 ease-out ${s}`.trim(),style:y,children:[e,b&&(0,c.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-24",style:v})]}),h&&(0,c.jsxs)("button",{type:"button",onClick:()=>x(e=>!e),"aria-expanded":m,className:`mt-3 inline-flex items-center gap-1 text-xs font-bold uppercase tracking-wider transition ${i}`.trim(),children:[m?f:g,a?eF(a,{className:`h-3 w-3 transition-transform ${m?"rotate-180":""}`}):(0,c.jsx)(ls,{className:`h-3 w-3 transition-transform ${m?"rotate-180":""}`})]})]})}}}]);
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.