1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5347],{23118:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var r=s(37876),i=s(14232),a=s(2794),l=s(73298);let o={Nissan:{storeCode:"N",crmStoreCode:"Nissan",websiteId:3},"Honda/Mazda":{storeCode:"H",crmStoreCode:"Honda / Mazda",websiteId:6},Mercedes:{storeCode:"MB",crmStoreCode:"Mercedes-Benz",websiteId:2},"Chevrolet/Cadillac":{storeCode:"C",crmStoreCode:"Chevrolet / Cadillac",websiteId:8},Toyota:{storeCode:"T",crmStoreCode:"Toyota",websiteId:10},Chrysler:{storeCode:"F",crmStoreCode:"CJDR-F",websiteId:9}},n=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),c=e=>{let{search:t,filters:s}=e,[c,d]=(0,i.useState)(""),[p,h]=(0,i.useState)(""),[u,y]=(0,i.useState)(""),[g,w]=(0,i.useState)(""),[m,x]=(0,i.useState)(""),[f,b]=(0,i.useState)(!1),[S,v]=(0,i.useState)(!1),[T,j]=(0,i.useState)(""),P=async e=>{if(e.preventDefault(),f)return;let r=c.trim(),i=p.trim(),d=o[m];if(!r||!i||!d)return void j("Please fill out all fields.");let h=(0,a.qh)(u);if(!h)return void j("Please enter a valid email address.");let y=(0,a.oe)(g);if(!y)return void j("Please enter a valid 10-digit phone number.");b(!0),j("");let w=(t||"").trim(),x=(s||[]).filter(e=>"string"==typeof e),S=window.location.pathname,T=await fetch("/api/leads/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({leadBucketId:"955a1563-a6ca-4afd-afe1-34141f24f3b0",FirstName:r,LastName:i,PhoneNumber:y,Email:h,StoreCode:d.storeCode,additionalFormData:{page:S,search:w,filters:x,selectedStore:m,website_id:d.websiteId,form_id:10,customer_comments:"Preferred Appraisal Tool: Option not Available"}})}).catch(()=>null),P=T?await T.json().catch(()=>null):null;if(!T||!T.ok||!P||P.error){console.error("Post lead error"),b(!1),j("We couldn't send your request. Please try again.");return}(0,l.c)("srp_no_results"),(e=>{let t="Search: ".concat(e.searchText||"none",". Filters: ").concat(e.filterList.length?e.filterList.join(", "):"none",".");fetch("https://crm.carumai.io/api/leads/sendToCRM",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({defaultHeaders:!0,defaultProvider:!0,leadJSON:{},leadXML:"<vehicle status='' interest='buy'>\n <year></year>\n <make></make>\n <model></model>\n <vin></vin>\n <stock></stock>\n </vehicle>\n <customer>\n <contact primarycontact='1'>\n <name part='first'>".concat(n(e.firstName),"</name>\n <name part='last'>").concat(n(e.lastName),"</name>\n <email>").concat(n(e.email),"</email>\n <phone type='cellphone'>").concat(e.phone,"</phone>\n </contact>\n <comments>No vehicles matched on ").concat(n(e.page),". This person asked to be told when we have what they're looking for. ").concat(n(t),"\n\n</comments>\n </customer>"),source:"SRP No Results Notify Me - Carumai",storeCode:e.crmStoreCode,bcc:" [email protected], [email protected]"})}).catch(e=>{console.log(e)})})({firstName:r,lastName:i,email:h,phone:y,crmStoreCode:d.crmStoreCode,page:S,searchText:w,filterList:x}),v(!0)};return S?(0,r.jsx)("div",{className:"sw--bold sw--center",style:{color:"green",marginTop:"24px",marginBottom:"24px"},children:"Thank you! We will let you know once we have what you're looking for."}):(0,r.jsxs)("form",{id:"Form",className:"sw-flex",style:{flexDirection:"column",width:"100%",maxWidth:"750px"},onSubmit:P,children:[(0,r.jsx)("input",{type:"text",name:"FirstName",placeholder:"First Name","aria-required":"true",required:!0,"aria-label":"first name",autoComplete:"given-name",value:c,onChange:e=>d(e.target.value)}),(0,r.jsx)("input",{type:"text",name:"LastName",placeholder:"Last Name","aria-required":"true",required:!0,"aria-label":"last name",autoComplete:"family-name",value:p,onChange:e=>h(e.target.value)}),(0,r.jsx)("input",{type:"email",name:"Email",placeholder:"Email","aria-required":"true",required:!0,"aria-label":"email",autoComplete:"email",value:u,onChange:e=>y(e.target.value)}),(0,r.jsx)("input",{type:"tel",name:"Phone Number",placeholder:"Phone Number","aria-required":"true",required:!0,"aria-label":"phone number",autoComplete:"tel",value:g,onChange:e=>w(e.target.value)}),(0,r.jsxs)("select",{name:"SelectedStore",required:!0,"aria-label":"selected store","aria-required":"true",className:"selectArrowShow",value:m,onChange:e=>x(e.target.value),children:[(0,r.jsx)("option",{value:"",children:"Select Store"}),(0,r.jsx)("option",{value:"Nissan",children:"Stephen Wade Nissan"}),(0,r.jsx)("option",{value:"Honda/Mazda",children:"Stephen Wade Honda/Mazda"}),(0,r.jsx)("option",{value:"Mercedes",children:"Mercedes-Benz of St. George"}),(0,r.jsx)("option",{value:"Chevrolet/Cadillac",children:"Stephen Wade Chevrolet/Cadillac"}),(0,r.jsx)("option",{value:"Toyota",children:"Stephen Wade Toyota"}),(0,r.jsx)("option",{value:"Chrysler",children:"Stephen Wade Chrysler Dodge Jeep Ram"})]}),(0,r.jsxs)("div",{className:"sw-flex",children:[(0,r.jsx)("input",{name:"AgreedToTerms","aria-required":"true",required:!0,"aria-label":"agreed to terms",type:"checkbox"}),(0,r.jsx)("label",{children:"We will let you know once we have what you're looking for."})]}),T?(0,r.jsx)("span",{className:"sw--danger",role:"alert",children:T}):null,(0,r.jsx)("button",{style:{width:"100%",margin:"auto",marginTop:"24px",marginBottom:"24px"},"aria-label":"submit",type:"submit",className:"sw-primary sw--center",disabled:f,children:f?"
1Sending...":"Submit"})]})}},42548:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/new-vehicles/trucks",function(){return s(91419)}])},44778:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var r=s(37876),i=s(14232);class a extends i.Component{componentDidUpdate(e){this.state.active!==this.props.activeByDefault&&this.props.controlled&&this.setState({active:this.props.activeByDefault})}render(){return(0,r.jsx)("div",{className:"sw-h-10px sw-w-35px sw-inline-block sw-round sw-flex sw-align-center sw-position-relative ".concat(this.state.active?this.props.activeColor?this.props.activeColor:"sw-primary-D":"sw-gray-D"," ")+this.props.className,id:this.props.id,style:{cursor:"pointer",...this.props.style},onClick:()=>{this.props.disabled||this.setState({active:!this.state.active},()=>{this.props.onChange&&this.props.onChange(this.state.active)})},onKeyDown:e=>{this.props.disabled||"Enter"!==e.key||this.setState({active:!this.state.active},()=>{this.props.onChange&&this.props.onChange(this.state.active)})},tabIndex:0,role:"switch","aria-label":this.state.active?"On":"Off","aria-checked":this.state.active,children:(0,r.jsx)("div",{className:"sw-h-20px sw-w-20px sw-round-100P sw-position-absolute sw-transition-all",style:{cursor:"pointer",transformOrigin:"center",top:"-50%",background:"white",transform:this.state.active?"translateX(15px)":"translateX(0px)",border:"1.5px solid ".concat(this.state.active?"#007bff":"#cbcbcb")},onClick:()=>{this.setState({active:!this.state.active})},onMouseEnter:e=>{e.currentTarget.style.border="1.5px solid #007bff"},onMouseLeave:e=>{e.currentTarget.style.border="1.5px solid ".concat(this.state.active?"#007bff":"#cbcbcb")}})})}constructor(e){super(e),this.state={active:this.props.activeByDefault||!1}}}a.defaultProps={activeByDefault:!1,className:"",id:"Switch",style:{},onChange:()=>{},controlled:!0,activeColor:""}},55722:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});var r=s(37876),i=s(14232);class a extends i.Component{componentDidMount(){if(window.YT)this.initializePlayer();else{let e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";let t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t),window.onYouTubeIframeAPIReady=this.initializePlayer}}componentWillUnmount(){this.state.player&&this.state.player.destroy()}render(){return(0,r.jsxs)("div",{style:{position:"fixed",bottom:0,left:0,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},className:"sw-w-500px sw-h-300px sw-w-250px-phone sw-h-150px-phone",children:[(0,r.jsx)("div",{ref:this.playerRef,style:{display:this.state.videoEnded?"none":"block"}},this.state.containerKey),this.state.videoEnded&&(0,r.jsx)("button",{onClick:this.handleReplay,style:{padding:"10px 20px",fontSize:"16px",cursor:"pointer",marginTop:"10px"},children:"Replay"})]})}constructor(e){super(e),this.initializePlayer=()=>{if(!this.playerRef.current)return;let e=window.innerWidth<700,t=new window.YT.Player(this.playerRef.current,{height:e?"150":"300",width:e?"250":"500",videoId:this.props.videoId,playerVars:{autoplay:1,controls:1,modestbranding:1,rel:0},events:{onStateChange:this.onPlayerStateChange}});this.setState({player:t,videoEnded:!1})},this.onPlayerStateChange=e=>{e.data===window.YT.PlayerState.ENDED&&this.state.player&&(this.state.player.destroy(),this.setState({player:null,videoEnded:!0}))},this.handleReplay=()=>{this.setState(e=>({containerKey:e.containerKey+1,videoEnded:!1}),()=>{this.initializePlayer()})},this.state={player:null,videoEnded:!1,containerKey:0},this.playerRef=i.createRef()}}let l=a},91419:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>L,default:()=>B});var r=s(37876),i=s(14232),a=s(77328),l=s.n(a),o=s(3422),n=s.n(o),c=s(44778),d=s(12033),p=s(40406),h=s(8102),u=s(54587),y=s.n(u),g=s(90733),w=s(98906),m=s(95575),x=s(46252),f=s(10284),b=s.n(f),S=s(72193),v=s(23118),T=s(39119),j=s(55722),P=s(72313),N=s(73298),C=s(45105),O=s.n(C),k=s(99606);class D extends i.Component{calculateFinancePayment(e){return .0075*(e-3e3)/(1-Math.pow(1.0075,-36))}calculateLeasePayment(e){let t=e-1500,s=.55*e;return(t-s)/36+.06/2400*(t+s)}render(){let e="sw-align-center sw-border sw-round sw-m-r-sm sw-p-sm sw-p-xsm-tablet sw-transition-swing sw-flex sw-justify-between",t="sw-align-center sw-border sw-round sw-m-r-sm sw-p-sm sw-p-xsm-tablet sw-transition-swing sw-flex sw-justify-center",s={borderColor:"rgba(255,255,255,0.1)",cursor:"pointer",textDecoration:"none",alignItems:"center",display:"",position:"relative",transition:"background 0.2s",background:"rgba(255, 255, 255, 0.15)",border:"1px solid rgba(203, 203, 203, 1.5)",backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)",boxShadow:"0 4px 10px rgba(0,0,0,0.1), 0 0 18px rgba(243,179,50,var(--spill))",overflow:"hidden","--glow":0,"--spill":0},i={borderColor:"rgba(255,255,255,0.1)",cursor:"pointer",textDecoration:"none",alignItems:"center",transition:"background 0.2s",background:"rgba(255, 255, 255, 0.15)",border:"1px solid rgba(203, 203, 203, 1)",backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)",overflow:"hidden","--glow":0,"--spill":0},a={transition:"background 0.2s",boxShadow:"0 4px 10px rgba(0,0,0,0.1), 0 0 18px rgba(243,179,50,var(--spill))","--glow":0,"--spill":0};return(0,r.jsxs)("div",{children:[(0,r.jsxs)(l(),{children:[(0,r.jsx)("title",{children:"New Trucks For Sale in St. George, UT - Stephen Wade"}),(0,r.jsx)("meta",{name:"description",content:"Stephen Wade Auto Center has the best selection of new trucks in the St. George area. Check out our new truck inventory at our southern Utah dealerships."}),(0,r.jsx)("meta",{name:"keywords",content:"new cars, used cars, trucks, SUVs, St. George, Utah, Stephen Wade, auto inventory, car dealership, search inventory"}),(0,r.jsx)("meta",{name:"author",content:"Stephen Wade Auto Center"}),(0,r.jsx)("meta",{name:"robots",content:"index, follow"}),(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,r.jsx)("link",{rel:"canonical",href:"https://www.stephenwade.com/used-vehicles/trucks"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{property:"og:title",content:"New Trucks For Sale in St. George, UT - Stephen Wade"}),(0,r.jsx)("meta",{property:"og:description",content:"Stephen Wade Auto Center has the best selection of new trucks in the St. George area. Check out our new truck inventory at our southern Utah dealerships."}),(0,r.jsx)("meta",{property:"og:url",content:"https://www.stephenwade.com/used-vehicles/trucks"}),(0,r.jsx)("meta",{property:"og:image",content:"https://stephenwade.com/images/swac-black.webp"}),(0,r.jsx)("meta",{property:"og:site_name",content:"Stephen Wade Auto Center"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:title",content:"New Trucks For Sale in St. George, UT - Stephen Wade"}),(0,r.jsx)("meta",{name:"twitter:description",content:"Find your perfect vehicle from a wide selection of cars, trucks, and SUVs in St. George. Filter and browse the Stephen Wade Auto Center inventory today."}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://stephenwade.com/images/swac-black.webp"})]}),(0,r.jsx)(O(),{id:"onsite",strategy:"afterInteractive",type:"text/javascript",src:"https://onsite.optimonk.com/script.js?account=252468",async:!0}),(0,r.jsx)(O(),{type:"text/javascript",id:"run-my-lease",strategy:"beforeInteractive",children:"\n (function(w,d,s,o,f,js,fjs){\n w['UnlockPrice']=o;w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments)};\n js=d.createElement(s),fjs=d.getElementsByTagName(s)[0];\n js.id=o;js.src=f;js.async=1;fjs.parentNode.insertBefore(js,fjs);\n }(window,document,'script','runmylease','https://runmylease-products.s3.us-east-1.amazonaws.com/unlockprice/other/stephenwade.js'));\n runmylease('init',{dealerCode: '5f8dc26476393207fc892fd0'});\n "}),(0,r.jsx)(O(),{id:"lesa-media-srp",src:"https://button-server.lesautomotive.com/lesa_media_srp.js",strategy:"afterInteractive",async:!0}),(0,r.jsxs)("div",{className:"sw-flex",children:[(0,r.jsxs)("div",{style:{backgroundImage:"linear-gradient(to bottom, #f3f3f35c, white)",borderWidth:"1.7px",borderStyle:"solid",borderImage:"linear-gradient(rgba(154, 154, 154, 1), rgba(255, 255, 255, 0)) 1 100% / 1 / 0 stretch"},className:"sw-w-25P sw-h-200vh sw-none-lap",children:[(0,r.jsxs)("div",{className:"sw-m-rl-md",children:["cash"===this.state.selectedTab&&(0,r.jsxs)("span",{className:"sw--bold",children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Price"}),(0,r.jsxs)("span",{style:{position:"relative",display:"inline-block",marginLeft:"4px",cursor:"pointer"},onMouseEnter:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="visible",t.style.opacity="1"},onMouseLeave:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="hidden",t.style.opacity="0"},children:[(0,r.jsx)(b(),{path:S.nO4,size:.8}),(0,r.jsx)("span",{className:"tooltip-text",style:{visibility:"hidden",opacity:0,width:"180px",backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",textAlign:"center",borderRadius:"4px",padding:"4px 6px",position:"absolute",bottom:"125%",left:"50%",transform:"translateX(-50%)",transition:"opacity 0.3s",zIndex:1e3,fontSize:"12px",pointerEvents:"none"},children:"Used vehicles reflect dealer asking price; new vehicles reflect MSRP. Actual prices may vary. See dealer for details."})]})]}),(0,r.jsx)("h3",{children:"cash"===this.state.selectedTab&&"$".concat(this.state.priceSliderStart.toLocaleStr
1ing()," - $").concat(this.state.priceSliderEnd.toLocaleString())})]}),(0,r.jsx)("div",{className:"sw-flex sw-justify-around",children:(0,r.jsx)("div",{className:"sw-flex-col sw-w-75P sw-m-md sw--center",children:(0,r.jsx)(d.A,{"aria-label":"slider",min:0,max:2e5,step:1e3,color:"info",initialStart:this.state.priceSliderStart,initialEnd:this.state.priceSliderEnd,size:"md",onChange:(e,t)=>{this.setState({priceSliderStart:e,priceSliderEnd:t,currPage:0,filtering:!0})},onMouseUp:()=>{this.setState({loading:!0}),this.loadInventory()}})})}),(0,r.jsxs)("div",{className:"sw-flex sw-flex-wrap sw-justify-around ",children:[(0,r.jsxs)("div",{className:"sw-flex-col sw-m-md sw--center sw-w-70px",children:[(0,r.jsx)("div",{className:"sw-p-b-sm sw--bold",children:"New"}),(0,r.jsx)(c.A,{activeByDefault:this.state.switchNew,activeColor:"sw-info",onChange:e=>{this.setState({switchNew:e,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsxs)("div",{className:"sw-flex-col sw-m-md sw--center sw-w-70px",children:[(0,r.jsx)("div",{className:"sw-p-b-sm sw--bold",children:"Used"}),(0,r.jsx)(c.A,{activeByDefault:this.state.switchUsed,activeColor:"sw-info",onChange:e=>{this.setState({switchUsed:e,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsxs)("div",{className:"sw-flex-col sw-m-md sw--center sw-w-70px",children:[(0,r.jsxs)("span",{style:{position:"relative",display:"inline-block",marginLeft:"4px",cursor:"pointer"},onMouseEnter:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="visible",t.style.opacity="1"},onMouseLeave:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="hidden",t.style.opacity="0"},children:[(0,r.jsxs)("div",{className:"sw-p-b-sm sw--bold",children:["Certified Vehicles",(0,r.jsx)(b(),{path:S.nO4,style:{position:"absolute",top:"0px",right:"-16px"},size:.68})]}),(0,r.jsx)("span",{className:"tooltip-text",style:{visibility:"hidden",opacity:0,width:"180px",backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",textAlign:"center",borderRadius:"4px",padding:"4px 6px",position:"absolute",bottom:"125%",left:"80%",transform:"translateX(-50%)",transition:"opacity 0.3s",zIndex:1e3,fontSize:"12px",pointerEvents:"none"},children:"Certified vehicles are inspected and come with a limited warranty."})]}),(0,r.jsx)(c.A,{activeByDefault:this.state.switchCertfied,activeColor:"sw-info",onChange:e=>{this.setState({switchCertfied:e,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsxs)("div",{className:"sw-flex-col sw-m-md sw--center sw-w-70px",children:[(0,r.jsxs)("span",{style:{position:"relative",display:"inline-block",marginLeft:"4px",cursor:"pointer"},onMouseEnter:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="visible",t.style.opacity="1"},onMouseLeave:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="hidden",t.style.opacity="0"},children:[(0,r.jsxs)("div",{className:"sw-p-b-sm sw--bold",children:["Special Vehicles",(0,r.jsx)(b(),{path:S.nO4,style:{position:"absolute",top:"0px",right:"-10px"},size:.68})]}),(0,r.jsx)("span",{className:"tooltip-text",style:{visibility:"hidden",opacity:0,width:"180px",backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",textAlign:"center",borderRadius:"4px",padding:"4px 6px",position:"absolute",bottom:"125%",left:"80%",transform:"translateX(-50%)",transition:"opacity 0.3s",zIndex:1e3,fontSize:"12px",pointerEvents:"none"},children:"Special Vehicles are discounted vehicles and have been reduced in price."})]}),(0,r.jsx)(c.A,{activeByDefault:this.state.switchSpecials,activeColor:"sw-info",onChange:e=>{this.setState({switchSpecials:e,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsxs)("div",{className:"sw-flex-col sw-m-md sw--center sw-w-70px",children:[(0,r.jsxs)("span",{style:{position:"relative",display:"inline-block",marginLeft:"4px",cursor:"pointer"},onMouseEnter:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="visible",t.style.opacity="1"},onMouseLeave:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="hidden",t.style.opacity="0"},children:[(0,r.jsx)("div",{className:"sw-p-b-sm sw--bold",children:"Fuel Efficient"}),(0,r.jsx)("span",{className:"tooltip-text",style:{visibility:"hidden",opacity:0,width:"180px",backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",textAlign:"center",borderRadius:"4px",padding:"4px 6px",position:"absolute",bottom:"125%",left:"80%",transform:"translateX(-50%)",transition:"opacity 0.3s",zIndex:1e3,fontSize:"12px",pointerEvents:"none"},children:"Only showing vehicles with fuel-efficient powertrains: Electric, EcoBoost, Flex Fuel, Hybrid, or vehicles with city MPG greater than 40."}),(0,r.jsx)(b(),{path:S.nO4,style:{position:"absolute",top:"0px",right:"0px"},size:.68})]}),(0,r.jsx)(c.A,{activeByDefault:this.state.switchFuel,activeColor:"sw-info",onChange:e=>{this.setState({switchFuel:e,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsxs)("div",{className:"sw-flex-col sw-m-md sw--center sw-w-70px",children:[(0,r.jsxs)("span",{style:{position:"relative",display:"inline-block",marginLeft:"4px",cursor:"pointer"},onMouseEnter:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="visible",t.style.opacity="1"},onMouseLeave:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="hidden",t.style.opacity="0"},children:[(0,r.jsxs)("div",{className:"sw-p-b-sm sw--bold",children:["$25k & Below ",(0,r.jsx)(b(),{path:S.nO4,style:{position:"absolute",top:"0px",right:"-10px"},size:.68})]}),(0,r.jsx)("span",{className:"tooltip-text",style:{visibility:"hidden",opacity:0,width:"180px",backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",textAlign:"center",borderRadius:"4px",padding:"4px 6px",position:"absolute",bottom:"125%",left:"50%",transform:"translateX(-50%)",transition:"opacity 0.3s",zIndex:1e3,fontSize:"12px",pointerEvents:"none"},children:"Only show vehicles priced at $25,000 or less. This filter is applied to all vehicles, including new and used."})]}),(0,r.jsx)(c.A,{activeByDefault:this.state.switch25,activeColor:"sw-info",onChange:e=>{this.setState({switch25:e,loading:!0,currPage:0,filtering:!0,priceSliderEnd:e?25e3:2e5},()=>{this.loadInventory()})}})]})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"sw-m-rl-md",children:[(0,r.jsx)("hr",{}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.locationDropdownOpen;this.setState({locationDropdownOpen:e,loadingLocations:!!e,modelDropdownOpen:!1,loadingModels:!1,yearDropdownOpen:!1,loadingYears:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/locations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,trans:this.state.selectedTrans,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,engine:this.state.selectedEngineTypes,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterLocations:t,loadingLocations:!1,displayNoFilters:0===t.length})}catch(e){console.log(e),this.setState({loadingLocations:!1})}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{children:"Location"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info",children:this.state.selectedLocations.length>0?this.state.selectedLocations.length:null}),(0,r.jsx)("div",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.locationDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.locationDropdownOpen?"500px":"0px",overflow:"hidden",transition:"max-height 0.2s ease"}
1,children:[this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingLocations?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterLocations.filter(e=>""!==e.LocationName&&e.Location.toLowerCase().includes(this.state.searchLocations.toLowerCase())).map((t,i)=>(0,r.jsx)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedLocations.includes(t.Location)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedLocations.includes(t.Location)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedLocations.includes(t.Location)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedLocations.includes(t.Location)?"white":"black",backgroundColor:this.state.selectedLocations.includes(t.Location)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedLocations.includes(t.Location)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm "),onClick:()=>{if(this.state.selectedLocations.includes(t.Location)){let e=JSON.parse(JSON.stringify(this.state.selectedLocations));e=e.filter(e=>e!==t.Location),this.setState({selectedLocations:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedLocations:[...this.state.selectedLocations,t.Location],loading:!0,currPage:0},()=>{this.loadInventory()})},children:(0,r.jsx)("span",{children:t.LocationName})},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.makeDropdownOpen;this.setState({makeDropdownOpen:e,loadingMakes:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/makes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,trans:this.state.selectedTrans,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterMakes:t,loadingMakes:!1,displayNoFilters:0===t.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{children:"Make"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info",children:this.state.selectedMakes.length>0?this.state.selectedMakes.length:null}),(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.makeDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.makeDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{id:"searchMakesInput",type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Makes...",value:this.state.searchMakes,onChange:e=>{this.setState({searchMakes:e.target.value})}})}
1),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingMakes?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterMakes.filter(e=>""!==e.Make&&e.Make.toLowerCase().includes(this.state.searchMakes.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedMakes.includes(t.Make)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedMakes.includes(t.Make)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedMakes.includes(t.Make)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedMakes.includes(t.Make)?"white":"black",backgroundColor:this.state.selectedMakes.includes(t.Make)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedMakes.includes(t.Make)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm "),onClick:()=>{if(this.state.selectedMakes.includes(t.Make)){let e=JSON.parse(JSON.stringify(this.state.selectedMakes));e=e.filter(e=>e!==t.Make),this.setState({selectedMakes:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedMakes:[...this.state.selectedMakes,t.Make],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Make}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.modelDropdownOpen;this.setState({modelDropdownOpen:e,loadingModels:!!e,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,year:this.state.selectedYears,trim:this.state.selectedTrims,trans:this.state.selectedTrans,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterModels:t,loadingModels:!1,displayNoFilters:0===t.length},()=>{})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{children:"Model"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("span",{className:"sw--info",children:this.state.selectedModels.length>0?this.state.selectedModels.length:null}),(0,r.jsx)("span",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.modelDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out",height:"0px",margin:"none"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.modelDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{id:"searchModelsInput",type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Models...",value:this.state.searchModels,onChange:e=>{this.setState({searchModels:e.target.value})}})}
1),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingModels?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterModels.filter(e=>""!==e.Model&&e.Model.toLowerCase().includes(this.state.searchModels.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow","0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedModels.includes(t.Model)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedModels.includes(t.Model)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedModels.includes(t.Model)?"white":"black",backgroundColor:this.state.selectedModels.includes(t.Model)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedModels.includes(t.Model)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm "),onClick:()=>{if(this.state.selectedModels.includes(t.Model)){let e=JSON.parse(JSON.stringify(this.state.selectedModels));e=e.filter(e=>e!==t.Model),this.setState({selectedModels:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedModels:[...this.state.selectedModels,t.Model],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Model}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.trimDropdownOpen;this.setState({trimDropdownOpen:e,loadingTrims:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/trims",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trans:this.state.selectedTrans,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterTrims:t,loadingTrims:!1,displayNoFilters:0===t.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{children:"Trim"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info",children:this.state.selectedTrims.length>0?this.state.selectedTrims.length:null}),(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.trimDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.trimDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"}
1,className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Trims...",value:this.state.searchTrims,onChange:e=>{this.setState({searchTrims:e.target.value})}})}),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingTrims?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterTrims.filter(e=>""!==e.Trim&&e.Trim.toLowerCase().includes(this.state.searchTrims.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedTrims.includes(t.Trim)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedTrims.includes(t.Trim)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedTrims.includes(t.Trim)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedTrims.includes(t.Trim)?"white":"black",backgroundColor:this.state.selectedTrims.includes(t.Trim)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedTrims.includes(t.Trim)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm "),onClick:()=>{if(this.state.selectedTrims.includes(t.Trim)){let e=JSON.parse(JSON.stringify(this.state.selectedTrims));e=e.filter(e=>e!==t.Trim),this.setState({selectedTrims:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedTrims:[...this.state.selectedTrims,t.Trim],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Trim}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.yearDropdownOpen;this.setState({yearDropdownOpen:e,loadingYears:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/years",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,trim:this.state.selectedTrims,trans:this.state.selectedTrans,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterYears:t,loadingYears:!1,displayNoFilters:0===t.length},()=>{})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{children:"Year"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info",children:this.state.selectedYears.length>0?this.state.selectedYears.length:null}),(0,r.jsx)("span",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.yearDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.yearDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Years...",value:this.state.searchYears,onChange:e=>{this.setState({searchYears:e.target.value})}})}
1),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingYears?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterYears.filter(e=>""!==e.Year&&e.Year.toLowerCase().includes(this.state.searchYears.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedYears.includes(t.Year)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedYears.includes(t.Year)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedYears.includes(t.Year)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedYears.includes(t.Year)?"white":"black",backgroundColor:this.state.selectedYears.includes(t.Year)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedYears.includes(t.Year)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm "),onClick:()=>{if(this.state.selectedYears.includes(t.Year)){let e=JSON.parse(JSON.stringify(this.state.selectedYears));e=e.filter(e=>e!==t.Year),this.setState({selectedYears:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedYears:[...this.state.selectedYears,t.Year],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Year}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{try{let e=!this.state.transDropdownOpen;this.setState({transDropdownOpen:e,loadingTrans:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});let t=await fetch("/api/filters/trans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),s=await t.json();this.setState({filterTrans:s,loadingTrans:!1,displayNoFilters:0===s.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{children:"Transmission"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info",children:this.state.selectedTrans.length>0?this.state.selectedTrans.length:null}),(0,r.jsx)("div",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.transDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.transDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"}
1,children:[this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingTrans?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterTrans.filter(e=>""!==e.Trans&&e.Trans.toLowerCase().includes(this.state.searchTrans.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedTrans.includes(t.Trans)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedTrans.includes(t.Trans)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedTrans.includes(t.Trans)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedTrans.includes(t.Trans)?"white":"black",backgroundColor:this.state.selectedTrans.includes(t.Trans)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedTrans.includes(t.Trans)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm "),onClick:()=>{if(this.state.selectedTrans.includes(t.Trans)){let e=JSON.parse(JSON.stringify(this.state.selectedTrans));e=e.filter(e=>e!==t.Trans),this.setState({selectedTrans:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedTrans:[...this.state.selectedTrans,t.Trans],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Trans}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.bodyStyleDropdownOpen;this.setState({bodyStyleDropdownOpen:e,loadingBodyStyles:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/bodyStyles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,trim:this.state.selectedTrims,year:this.state.selectedYears,trans:this.state.selectedTrans,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterBodyStyles:t,loadingBodyStyles:!1,displayNoFilters:0===t.length},()=>{})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{children:"Body Style"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info",children:this.state.selectedBodyStyles.length>0?this.state.selectedBodyStyles.length:null}),(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.bodyStyleDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.bodyStyleDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Body Styles...",value:this.state.searchBodyStyles,onChange:e=>{this.setState({searchBodyStyles:e.target.value})}})}),this.state.loadingBodyStyles?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterBodyStyles.filter(e=>""!==e.BodyStyle&&e.BodyStyle.toLowerCase().includes(this.state.searchBodyStyles.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedBodyStyles.includes(t.BodyStyle)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedBodyStyles.includes(t.BodyStyle)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedBodyStyles.includes(t.BodyStyle)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedBodyStyles.includes(t.BodyStyle)?"white":"black",backgroundColor:this.state.selectedBodyStyles.includes(t.BodyStyle)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedBodyStyles.includes(t.BodyStyle)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm "),onClick:()=>
1{if(this.state.selectedBodyStyles.includes(t.BodyStyle)){let e=JSON.parse(JSON.stringify(this.state.selectedBodyStyles));e=e.filter(e=>e!==t.BodyStyle),this.setState({selectedBodyStyles:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedBodyStyles:[...this.state.selectedBodyStyles,t.BodyStyle],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.BodyStyle}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{try{let e=!this.state.fuelDropdownOpen;this.setState({fuelDropdownOpen:e,loadingFuelTypes:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});let t=await fetch("/api/filters/fuelType",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,body:this.state.selectedBodyStyles,trans:this.state.selectedTrans,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),s=await t.json();this.setState({filterFuelTypes:s,loadingFuelTypes:!1,displayNoFilters:0===s.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{children:"Fuel Type"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info",children:this.state.selectedFuelTypes.length>0?this.state.selectedFuelTypes.length:null}),(0,r.jsx)("div",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.fuelDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.fuelDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingFuelTypes?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterFuelTypes.filter(e=>""!==e.FuelType&&e.FuelType.toLowerCase().includes(this.state.searchFuelTypes.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedFuelTypes.includes(t.FuelType)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedFuelTypes.includes(t.FuelType)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedFuelTypes.includes(t.FuelType)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedFuelTypes.includes(t.FuelType)?"white":"black",backgroundColor:this.state.selectedFuelTypes.includes(t.FuelType)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedFuelTypes.includes(t.FuelType)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm "),onClick:()=>
1{if(this.state.selectedFuelTypes.includes(t.FuelType)){let e=JSON.parse(JSON.stringify(this.state.selectedFuelTypes));e=e.filter(e=>e!==t.FuelType),this.setState({selectedFuelTypes:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedFuelTypes:[...this.state.selectedFuelTypes,t.FuelType],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.FuelType}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.featureDropdownOpen;this.setState({featureDropdownOpen:e,loadingFeatures:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/features",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,trim:this.state.selectedTrims,year:this.state.selectedYears,trans:this.state.selectedTrans,fuel:this.state.selectedFuelTypes,body:this.state.selectedBodyStyles,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterFeatures:t,loadingFeatures:!1,displayNoFilters:0===t.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{children:"Feature"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info",children:this.state.selectedFeatures.length>0?this.state.selectedFeatures.length:null}),(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.featureDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.featureDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Features...",value:this.state.searchFeatures,onChange:e=>{this.setState({searchFeatures:e.target.value})}})}),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingFeatures?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterFeatures.filter(e=>""!==e.Feature&&e.Feature.toLowerCase().includes(this.state.searchFeatures.toLowerCase())).map((t,i)=>(0,r.jsx)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedFeatures.includes(t.Feature)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedFeatures.includes(t.Feature)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedFeatures.includes(t.Feature)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedFeatures.includes(t.Feature)?"white":"black",backgroundColor:this.state.selectedFeatures.includes(t.Feature)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedFeatures.includes(t.Feature)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm "),onClick:()=>
1{if(this.state.selectedFeatures.includes(t.Feature)){let e=JSON.parse(JSON.stringify(this.state.selectedFeatures));e=e.filter(e=>e!==t.Feature),this.setState({selectedFeatures:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedFeatures:[...this.state.selectedFeatures,t.Feature],loading:!0,currPage:0},()=>{this.loadInventory()})},children:(0,r.jsx)("span",{children:t.Feature})},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{try{let e=!this.state.colorDropdownOpen;this.setState({colorDropdownOpen:e,loadingColors:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});let t=await fetch("/api/filters/colors",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,body:this.state.selectedBodyStyles,trans:this.state.selectedTrans,feature:this.state.selectedFeatures,fuel:this.state.selectedFuelTypes,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),s=await t.json();this.setState({filterColors:s,loadingColors:!1,displayNoFilters:0===s.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{children:"Color"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info",children:this.state.selectedColors.length>0?this.state.selectedColors.length:null}),(0,r.jsx)("div",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.colorDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.colorDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Colors...",value:this.state.searchColors,onChange:e=>{this.setState({searchColors:e.target.value})}})}),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingColors?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterColors.filter(e=>""!==e.Color&&e.Color.toLowerCase().includes(this.state.searchColors.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedColors.includes(t.Color)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedColors.includes(t.Color)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedColors.includes(t.Color)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedColors.includes(t.Color)?"white":"black",backgroundColor:this.state.selectedColors.includes(t.Color)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedColors.includes(t.Color)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm "),onClick:()=>
1{if(this.state.selectedColors.includes(t.Color)){let e=JSON.parse(JSON.stringify(this.state.selectedColors));e=e.filter(e=>e!==t.Color),this.setState({selectedColors:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedColors:[...this.state.selectedColors,t.Color],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Color}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{try{let e=!this.state.engineDropdownOpen;this.setState({engineDropdownOpen:e,loadingEngineTypes:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1});let t=await fetch("/api/filters/engines",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,body:this.state.selectedBodyStyles,trans:this.state.selectedTrans,feature:this.state.selectedFeatures,fuel:this.state.selectedFuelTypes,color:this.state.selectedColors,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),s=await t.json();this.setState({filterEngineTypes:s,loadingEngineTypes:!1,displayNoFilters:0===s.length},()=>{})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{children:"Engine Type"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info",children:this.state.selectedEngineTypes.length>0?this.state.selectedEngineTypes.length:null}),(0,r.jsx)("div",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.engineDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.engineDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Engine Types...",value:this.state.searchEngineTypes,onChange:e=>{this.setState({searchEngineTypes:e.target.value})}})}),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingEngineTypes?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterEngineTypes.filter(e=>""!==e.EngineType&&e.EngineType.toLowerCase().includes(this.state.searchEngineTypes.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedEngineTypes.includes(t.EngineType)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedEngineTypes.includes(t.EngineType)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedEngineTypes.includes(t.EngineType)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedEngineTypes.includes(t.EngineType)?"white":"black",backgroundColor:this.state.selectedEngineTypes.includes(t.EngineType)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedEngineTypes.includes(t.EngineType)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm "),onClick:()=>
1{if(this.state.selectedEngineTypes.includes(t.EngineType)){let e=JSON.parse(JSON.stringify(this.state.selectedEngineTypes));e=e.filter(e=>e!==t.EngineType),this.setState({selectedEngineTypes:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedEngineTypes:[...this.state.selectedEngineTypes,t.EngineType],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.EngineType}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{try{let e=!this.state.mileageDropdown;this.setState({mileageDropdown:e,loadingMileage:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,engineDropdownOpen:!1,loadingEngineTypes:!1})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:["Mileage Slider",(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.mileageDropdown?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.mileageDropdown?"500px":"0px",overflowX:"hidden",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("h3",{children:(0,r.jsxs)(r.Fragment,{children:[this.state.mileageSliderStart.toLocaleString()," ",(0,r.jsx)("span",{style:{fontSize:"13px"},children:"Mi"})," - ",this.state.mileageSliderEnd.toLocaleString()," ",(0,r.jsx)("span",{style:{fontSize:"13px"},children:"Mi"})]})}),(0,r.jsx)("div",{className:"sw-flex sw-justify-around sw-m-t-sm sw--center",children:(0,r.jsxs)("div",{className:"sw-flex-col sw-w-85P",children:[(0,r.jsx)(d.A,{"aria-label":"slider",min:0,max:2e5,step:2500,color:"info",initialStart:this.state.mileageSliderStart,initialEnd:this.state.mileageSliderEnd,size:"md",onChange:(e,t)=>
1{this.setState({mileageSliderStart:e,mileageSliderEnd:t,currPage:0,filtering:!0})},onMouseUp:(e,t)=>{this.setState({loading:!0}),this.loadInventory()}}),(0,r.jsxs)("div",{className:"sw-flex sw-justify-between sw-flex-wrap",children:[(0,r.jsxs)("div",{className:"sw-m-t-xsm sw-w-45P",children:[(0,r.jsx)("span",{className:"sw--black sw--bold",children:"Start"}),(0,r.jsx)("input",{"aria-label":"start",className:"sw-m-t-0 sw--center",type:"text",value:this.state.mileageSliderStart.toLocaleString(),onChange:e=>{let t=Number(e.target.value.replace(/,/g,""));isNaN(t)||(t>2e5&&(t=2e5),this.setState({mileageSliderStart:t,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()}))}})]}),(0,r.jsx)("span",{className:"sw-w-5P",children:"-"}),(0,r.jsxs)("div",{className:"sw-m-t-xsm sw-w-45P",children:[(0,r.jsx)("span",{className:"sw--black sw--bold",children:"End"}),(0,r.jsx)("input",{"aria-label":"end",className:"sw-m-t-0 sw--center",type:"text",value:this.state.mileageSliderEnd.toLocaleString(),onChange:e=>{let t=Number(e.target.value.replace(/,/g,""));if(isNaN(t))return void console.warn("Invalid input: Not a number");t>2e5&&(t=2e5),this.setState({mileageSliderEnd:t,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]})]})]})})]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{try{let e=!this.state.mpgDropdown;this.setState({mpgDropdown:e,loadingMPG:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,engineDropdownOpen:!1,loadingEngineTypes:!1})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:["MPG Slider",(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.mpgDropdown?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.mpgDropdown?"500px":"0px",overflowX:"hidden",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("h3",{children:(0,r.jsxs)(r.Fragment,{children:[this.state.mpgSliderStart.toLocaleString()," - ",this.state.mpgSliderEnd.toLocaleString()]})}),(0,r.jsx)("div",{className:"sw-flex sw-justify-around sw-m-t-sm sw--center",children:(0,r.jsxs)("div",{className:"sw-flex-col sw-w-85P",children:[(0,r.jsx)(d.A,{"aria-label":"slider",min:0,max:100,step:10,color:"info",initialStart:this.state.mpgSliderStart,initialEnd:this.state.mpgSliderEnd,size:"md",onChange:(e,t)=>
1{this.setState({mpgSliderStart:e,mpgSliderEnd:t,currPage:0,filtering:!0})},onMouseUp:(e,t)=>{this.setState({loading:!0}),this.loadInventory()}}),(0,r.jsxs)("div",{className:"sw-flex sw-justify-between sw-flex-wrap",children:[(0,r.jsxs)("div",{className:"sw-m-t-xsm sw-w-45P",children:[(0,r.jsxs)("span",{className:"sw--black sw--bold",children:["Start"," "]}),(0,r.jsx)("input",{"aria-label":"start",className:"sw-m-t-0 sw--center",type:"text",value:this.state.mpgSliderStart,onChange:e=>{let t=Number(e.target.value);isNaN(t)&&(t=0),t>100&&(t=100),this.setState({mpgSliderStart:t,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsx)("span",{className:"sw-w-5P",children:"-"}),(0,r.jsxs)("div",{className:"sw-m-t-xsm sw-w-45P",children:[(0,r.jsx)("span",{className:"sw--black sw--bold",children:"End"}),(0,r.jsx)("input",{"aria-label":"end",className:"sw-m-t-0 sw--center",type:"text",value:this.state.mpgSliderEnd,onChange:e=>{let t=Number(e.target.value);(isNaN(t)||t<0)&&(t=0),t>100&&(t=100),this.setState({mpgSliderEnd:t,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]})]})]})})]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsx)(h.A,{style:{backgroundColor:"white",border:"1px solid #bebebe",borderRadius:"5px",marginTop:"10px"},className:"sw-m-t-0 sw-flex sw-justify-center sw-flex-wrap ",placeholder:"Sort By",options:[{display:"Default",value:"Default",defaultOption:"Default"===this.state.sortSelect},{display:"Lowest Price",value:"Lowest Price",defaultOption:"Lowest Price"===this.state.sortSelect},{display:"Highest Price",value:"Highest Price",defaultOption:"Highest Price"===this.state.sortSelect},{display:"Lowest Miles",value:"Lowest Miles",defaultOption:"Lowest Miles"===this.state.sortSelect},{display:"Highest Miles",value:"Highest Miles",defaultOption:"Highest Miles"===this.state.sortSelect},{display:"Newest Year",value:"Newest",defaultOption:"Newest"===this.state.sortSelect},{display:"Oldest Year",value:"Oldest",defaultOption:"Oldest"===this.state.sortSelect},{display:"Stock Number",value:"Stock Number",defaultOption:"Stock Number"===this.state.sortSelect}],onChange:e=>{this.setState({sortSelect:e.value,loading:!0,currPage:0},()=>{this.loadInventory(),this.setURLParams()})}})]})})]}),(0,r.jsxs)("div",{className:"sw-w-75P sw-w-100P-lap sw-m-t-md",style:{maxWidth:"1549px",marginLeft:"auto",marginRight:"auto"},children:[(0,r.jsxs)("div",{className:" sw-none-lap sw-flex sw-justify-between sw-m-rl-md",children:[(0,r.jsx)("div",{className:"sw-w-20P",children:(0,r.jsxs)("button",{className:"".concat(t," sw-m-tb-xsm"),style:{...i,borderRadius:"0px",color:this.state.selectedBodyStyles.includes("Convertible")?"white":"black",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedBodyStyles.includes("Convertible")?"#007bff":"rgba(255,255,255,0.15)")},onBlur:e=>{this.state.selectedBodyStyles.includes("Convertible")||(e.currentTarget.style.borderColor="rgba(255,255,255,0.1)")},onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left,r=e.clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedBodyStyles.includes("Convertible")?"0.3":"0.1");let i=e.currentTarget.previousElementSibling,a=e.currentTarget.nextElementSibling;i&&i.style.setProperty("--spill","0.2"),a&&a.style.setProperty("--spill","0.2"),this.state.selectedBodyStyles.includes("Convertible")?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let t=e.currentTarget.previousElementSibling,s=e.currentTarget.nextElementSibling;t&&t.style.setProperty("--spill","0"),s&&s.style.setProperty("--spill","0"),this.state.selectedBodyStyles.includes("Convertible")?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onClick:()=>
1{if(this.state.selectedBodyStyles.includes("Convertible")){let e=JSON.parse(JSON.stringify(this.state.selectedBodyStyles));e=e.filter(e=>"Convertible"!==e),this.setState({selectedBodyStyles:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedBodyStyles:[...this.state.selectedBodyStyles,"Convertible"],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)(b(),{path:S.ACb,className:"sw-m-r-sm",size:1}),"Convertible"]})}),(0,r.jsx)("div",{className:"sw-w-20P",children:(0,r.jsxs)("button",{className:"".concat(t," sw-m-tb-xsm"),style:{...i,borderRadius:"0px",color:this.state.selectedBodyStyles.includes("SUV")?"white":"black",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedBodyStyles.includes("SUV")?"#007bff":"rgba(255,255,255,0.15)")},onBlur:e=>{this.state.selectedBodyStyles.includes("SUV")||(e.currentTarget.style.borderColor="rgba(255,255,255,0.1)")},onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left,r=e.clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedBodyStyles.includes("SUV")?"0.3":"0.1");let i=e.currentTarget.previousElementSibling,a=e.currentTarget.nextElementSibling;i&&i.style.setProperty("--spill","0.2"),a&&a.style.setProperty("--spill","0.2"),this.state.selectedBodyStyles.includes("SUV")?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let t=e.currentTarget.previousElementSibling,s=e.currentTarget.nextElementSibling;t&&t.style.setProperty("--spill","0"),s&&s.style.setProperty("--spill","0"),this.state.selectedBodyStyles.includes("SUV")?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onClick:()=>{if(this.state.selectedBodyStyles.includes("SUV")){let e=JSON.parse(JSON.stringify(this.state.selectedBodyStyles));e=e.filter(e=>"SUV"!==e),this.setState({selectedBodyStyles:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedBodyStyles:[...this.state.selectedBodyStyles,"SUV"],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)(b(),{path:S.H00,className:"sw-m-r-sm",size:1}),"SUV"]})}),(0,r.jsx)("div",{className:"sw-w-20P",children:(0,r.jsxs)("button",{className:"".concat(t," sw-m-tb-xsm"),style:{...i,borderRadius:"0px",color:this.state.selectedBodyStyles.includes("Crew Cab Pickup")?"white":"black",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedBodyStyles.includes("Crew Cab Pickup")?"#007bff":"rgba(255,255,255,0.15)")},onBlur:e=>{this.state.selectedBodyStyles.includes("Crew Cab Pickup")||(e.currentTarget.style.borderColor="rgba(255,255,255,0.1)")},onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left,r=e.clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedBodyStyles.includes("Crew Cab Pickup")?"0.3":"0.1");let i=e.currentTarget.previousElementSibling,a=e.currentTarget.nextElementSibling;i&&i.style.setProperty("--spill","0.2"),a&&a.style.setProperty("--spill","0.2"),this.state.selectedBodyStyles.includes("Crew Cab Pickup")?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let t=e.currentTarget.previousElementSibling,s=e.currentTarget.nextElementSibling;t&&t.style.setProperty("--spill","0"),s&&s.style.setProperty("--spill","0"),this.state.selectedBodyStyles.includes("Crew Cab Pickup")?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onClick:()=>
1{if(this.state.selectedBodyStyles.includes("Crew Cab Pickup")){let e=JSON.parse(JSON.stringify(this.state.selectedBodyStyles));e=e.filter(e=>"Crew Cab Pickup"!==e),this.setState({selectedBodyStyles:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedBodyStyles:[...this.state.selectedBodyStyles,"Crew Cab Pickup"],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)(b(),{path:S.PgB,className:"sw-m-r-sm",size:1}),"Truck"]})}),(0,r.jsx)("div",{className:"sw-w-20P",children:(0,r.jsxs)("button",{className:"".concat(t," sw-m-tb-xsm"),style:{...i,borderRadius:"0px",color:this.state.selectedBodyStyles.includes("2dr Car")?"white":"black",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedBodyStyles.includes("2dr Car")?"#007bff":"rgba(255,255,255,0.15)")},onBlur:e=>{this.state.selectedBodyStyles.includes("2dr Car")||(e.currentTarget.style.borderColor="rgba(255,255,255,0.1)")},onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left,r=e.clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedBodyStyles.includes("2dr Car")?"0.3":"0.1");let i=e.currentTarget.previousElementSibling,a=e.currentTarget.nextElementSibling;i&&i.style.setProperty("--spill","0.2"),a&&a.style.setProperty("--spill","0.2"),this.state.selectedBodyStyles.includes("2dr Car")?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let t=e.currentTarget.previousElementSibling,s=e.currentTarget.nextElementSibling;t&&t.style.setProperty("--spill","0"),s&&s.style.setProperty("--spill","0"),this.state.selectedBodyStyles.includes("2dr Car")?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onClick:()=>{if(this.state.selectedBodyStyles.includes("2dr Car")){let e=JSON.parse(JSON.stringify(this.state.selectedBodyStyles));e=e.filter(e=>"2dr Car"!==e),this.setState({selectedBodyStyles:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedBodyStyles:[...this.state.selectedBodyStyles,"2dr Car"],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)(b(),{path:S._ep,className:"sw-m-r-sm",size:1}),"Performance"]})})]}),(0,r.jsx)("div",{className:"sw-flex sw-justify-between sw-m-rl-md sw-m-b-sm-lap",children:(0,r.jsxs)("div",{className:"sw-flex",style:{overflow:"auto"},children:[this.state.allFilters.length>0?(0,r.jsx)("button",{className:"sw-black sw--white",style:{width:"fit-content",margin:"1px",borderRadius:"15px"},onClick:()=>{this.setState({selectedLocations:[],selectedMakes:[],selectedModels:[],selectedYears:[],selectedTrims:[],selectedBodyStyles:[],selectedTrans:[],selectedFuelTypes:[],selectedFeatures:[],selectedColors:[],selectedEngineTypes:[],searchVehicles:"",loading:!0,currPage:0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1,priceSliderStart:0,priceSliderEnd:2e5,mileageSliderStart:0,mileageSliderEnd:2e5,mpgSliderStart:0,mpgSliderEnd:100,switchNew:!1,switchUsed:!1,switchCertfied:!1,switchSpecials:!1,switch25:!1,switchFuel:!1},()=>{this.loadInventory()})},children:"Clear All"}):null,this.state.allFilters.length>0?this.state.allFilters.map((e,t)=>(0,r.jsx)("button",{className:"sw-black sw--white",style:{width:"fit-content",margin:"1px",borderRadius:"15px"},"aria-label":"".concat(e," filter"),onClick:()=>{this.state.selectedLocations.includes(e)&&this.setState({selectedLocations:this.state.selectedLocations.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedMakes.includes(e)&&this.setState({selectedMakes:this.state.selectedMakes.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedModels.includes(e)&&this.setState({selectedModels:this.state.selectedModels.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedYears.includes(e)&&this.setState({selectedYears:this.state.selectedYears.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedTrims.includes(e)&&this.setState({selectedTrims:this.state.selectedTrims.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedBodyStyles.includes(e)&&this.setState({selectedBodyStyles:this.state.selectedBodyStyles.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedTrans.includes(e)&&this.setState({selectedTrans:this.state.selectedTrans.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedFuelTypes.includes(e)&&this.setState({selectedFuelTypes:this.state.selectedFuelTypes.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedFeatures.includes(e)&&this.setState({selectedFeatures:this.state.selectedFeatures.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedColors.includes(e)&&this.setState({selectedColors:this.state.selectedColors.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedEngineTypes.includes(e)&&this.setState({selectedEngineTypes:this.state.selectedEngineTypes.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),e.includes("Min Price")&&this.setState({loading:!0,currPage:0,priceSliderStart:0},()=>{this.loadInventory()}),e.includes("Max Price")&&this.setState({loading:!0,currPage:0,priceSliderEnd:2e5,switch25:!1},()=>{this.loadInventory()}),e.includes("Min Mileage")&&this.setState({loading:!0,currPage:0,mileageSliderStart:0},()=>{this.loadInventory()}),e.includes("Max Mileage")&&this.setState({loading:!0,currPage:0,mileageSliderEnd:2e5},()=>{this.loadInventory()}),e.includes("Min MPG")&&this.setState({loading:!0,currPage:0,mpgSliderStart:0},()=>{this.loadInventory()}),e.includes("Max MPG")&&this.setState({loading:!0,currPage:0,mpgSliderEnd:100},()=>{this.loadInventory()}),e.includes("New Switch")&&this.setState({loading:!0,currPage:0,switchNew:!1},()=>{this.loadInventory()}),e.includes("Used Switch")&&this.setState({loading:!0,currPage:0,switchUsed:!1},()=>{this.loadInventory()}),e.includes("Certified Switch")&&this.setState({loading:!0,currPage:0,switchCertfied:!1},()=>{this.loadInventory()}),e.includes("Specials Switch")&&this.setState({loading:!0,currPage:0,switchSpecials:!1},()=>{this.loadInventory()}),e.includes("Fuel Efficient Switch")&&this.setState({loading:!0,currPage:0,switchFuel:!1},()=>{this.loadInventory()}),this.state.searchVehicles.includes(e)&&this.setState({searchVehicles:"",loading:!0},()=>{this.loadInventory()})},children:(0,r.jsxs)("span",{className:"sw-flex sw-justify-center",children:[(0,r.jsx)(b(),{path:S.rZW,
1size:.7,className:"sw-m-tb-0 sw-m-r-xsm sw-p-0"}),this.state.searchVehicles.includes(e)?"Search: ":null,e]})},t)):(0,r.jsx)("div",{})]})}),(0,r.jsxs)("div",{className:"sw-none sw-block-lap sw-m-rl-md",children:[(0,r.jsxs)("div",{className:"sw-m-t-xsm",children:["cash"===this.state.selectedTab&&(0,r.jsxs)("span",{className:"sw--bold",children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Price"}),(0,r.jsxs)("span",{style:{position:"relative",display:"inline-block",marginLeft:"4px",cursor:"pointer"},onMouseEnter:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="visible",t.style.opacity="1"},onMouseLeave:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="hidden",t.style.opacity="0"},children:[(0,r.jsx)(b(),{path:S.nO4,size:.8}),(0,r.jsx)("span",{className:"tooltip-text",style:{visibility:"hidden",opacity:0,width:"180px",backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",textAlign:"center",borderRadius:"4px",padding:"4px 6px",position:"absolute",bottom:"125%",left:"50%",transform:"translateX(-50%)",transition:"opacity 0.3s",zIndex:1e3,fontSize:"12px",pointerEvents:"none"},children:"Used vehicles reflect dealer asking price; new vehicles reflect MSRP. Actual prices may vary. See dealer for details."})]})]}),(0,r.jsx)("h3",{children:"cash"===this.state.selectedTab&&"$".concat(this.state.priceSliderStart.toLocaleString()," - $").concat(this.state.priceSliderEnd.toLocaleString())})]}),(0,r.jsx)("div",{className:"sw-flex sw-justify-around",children:(0,r.jsx)("div",{className:"sw-flex-col sw-w-75P sw-m-md sw--center",children:(0,r.jsx)(d.A,{"aria-label":"slider",min:0,max:2e5,step:1e3,color:"info",initialStart:this.state.priceSliderStart,initialEnd:this.state.priceSliderEnd,size:"md",onChange:(e,t)=>
1{this.setState({priceSliderStart:e,priceSliderEnd:t,currPage:0,filtering:!0})},onMouseUp:()=>{this.setState({loading:!0}),this.loadInventory()}})})})]}),(0,r.jsx)("div",{className:"sw-flex sw-justify-between sw-m-rl-md sw-m-tb-xsm",children:(0,r.jsxs)("span",{className:"sw-m-l-sm",children:["Showing"," ",this.state.displayStart,"-",this.state.displayEnd," ","out of"," ",this.state.totalInventory," ",1==this.state.totalInventory?"Vehicle":"Vehicles"]})}),(0,r.jsx)("div",{className:"sw-flex sw-flex-wrap sw-justify-around sw-justify-center-phone",children:this.state.inventory.length>0?this.state.inventory.map((e,t)=>{let s=[];s=e.photoURLs;let i=[];if(!this.state.loading){var a,l,o;return this.state.shopByPaymentAvailable&&(a=e.AskingPrice,l=this.state.shopByPaymentDownPayment,o=this.state.shopByPaymentMonthsToPayoff),8!==t||this.state.filtering||i.push((0,r.jsx)("div",{className:"sw-w-100P",children:(0,r.jsx)(w.p,{className:"sw-m-auto sw-w-95P",altButtons:!0,showArrows:!0,autoScroll:!0,centerActiveSlide:!1,children:this.state.interrupters.map((e,t)=>(0,r.jsx)(w.q,{children:(0,r.jsx)(x.Zp,{className:"sw-w-200px",style:{margin:"10px",backgroundColor:"#fdfdfd",height:e.buttonText&&e.linkURl?"380px":"180px"},children:(0,r.jsx)("div",{onMouseMove:this.handleHoverMove,onMouseLeave:this.handleHoverLeave,style:{background:"radial-gradient(circle at var(--x, 10%) var(--y, 10%), rgba(243,179,50,var(--glow)) 0 10%, transparent 45%), rgba(255,255,255,0.1)"},children:e.youtubeVideoCode?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{onClick:()=>{this.setState({youtubeVideoCode:e.youtubeVideoCode})},className:"sw-pointer sw-black sw-round sw-flex sw-flex-center",style:{height:"120px",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundImage:"url(https://img.youtube.com/vi/"+e.youtubeVideoCode+"/maxresdefault.jpg)"},children:(0,r.jsx)(b(),{className:"sw--white",path:S.LPM,size:1.5})}),(0,r.jsxs)("a",{href:e.linkURl,style:{textDecoration:"none",color:"inherit",cursor:"pointer"},children:[(0,r.jsx)(x.ZB,{children:e.title}),(0,r.jsx)(x.jq,{className:"sw--size-sm sw--bold",style:{color:"black"}
1,children:e.subtitle}),(0,r.jsx)(x.bw,{className:"sw-p-t-0 sw-m-b-sm sw-flex sw-align-end",children:e.buttonText&&e.linkURl?(0,r.jsx)("button",{className:"sw-p-sm sw-m-0",children:e.buttonText}):(0,r.jsx)(r.Fragment,{})})]})]}):null})},t)},"slide "+t))})},"carousel-break")),i.push((0,r.jsx)(m.A,{variant:"srp",vehicle:e,photoURLs:s,index:t,isMobile:this.state.isMobile,selectedTab:this.state.selectedTab,shopByPaymentAvailable:this.state.shopByPaymentAvailable,webViews:this.state.webViews,recentlyViewedStockNumbers:this.state.recentlyViewedVehicles.map(e=>e.StockNumber),favoriteStockNumbers:this.state.favoriteVehicles,compareStockNumbers:this.state.compareVehicles,user:this.state.user,onToggleFavorite:e=>{this.setState({favoriteVehicles:this.state.favoriteVehicles.includes(e)?this.state.favoriteVehicles.filter(t=>t!==e):[...this.state.favoriteVehicles,e]},()=>{(0,T.u3)(this.state.favoriteVehicles)})},onToggleCompare:e=>{this.setState({compareVehicles:this.state.compareVehicles.includes(e)?this.state.compareVehicles.filter(t=>t!==e):[...this.state.compareVehicles,e]},()=>{(0,T.$6)(this.state.compareVehicles)})},onTrack:()=>{this.setState({priceAlertModal:!0,priceAlertVehicle:e})},onRequireAuth:()=>{this.setState({heartButtonSignInModal:!0})}},t)),i}{let t=[];return t.push((0,r.jsx)(x.Zp,{className:"sw-w-300px",style:{height:"404.75px"},id:e.VIN,children:(0,r.jsx)(g.A,{})},Math.floor(1e6*Math.random()))),t}}):(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"Don't worry, we have new inventory coming in daily."}),(0,r.jsx)("p",{style:{textAlign:"center"},children:"We will let you know once we have what you're looking for."}),(0,r.jsx)(v.A,{search:this.state.searchVehicles,filters:this.state.allFilters})]})})}),(0,r.jsxs)("div",{style:{marginBottom:"15px",position:"relative",marginLeft:"auto",marginRight:"auto",maxWidth:"1600px"},children:[(0,r.jsx)("h3",{className:"sw-m-l-md sw--size-lg-phone",children:"Limited Deals"}),(0,r.jsx)(w.p,{className:"sw-m-auto sw-w-90P sw-overflow",altButtons:!0,showArrows:!0,autoScroll:!0,centerActiveSlide:!1,children:this.state.limitedDeals.length>0?this.state.limitedDeals.map((e,t)=>{let s=e.PhotoURLs||[];return s[0]&&(s[0]="https://cdn.carumai.com/".concat(e.VIN,"/cover-photo-large.jpg")),(0,r.jsx)(w.q,{children:(0,r.jsx)(m.A,{variant:"carousel",vehicle:e,photoURLs:s,index:t,isMobile:this.state.isMobile,selectedTab:this.state.selectedTab},t)},t)}):[...Array(15)].map((e,t)=>(0,r.jsx)(w.q,{children:(0,r.jsx)(x.Zp,{style:{backgroundColor:"#fdfdfd",width:"150px",height:"150px"},children:(0,r.jsx)(g.A,{})})},t))})]}),this.state.recentlyViewedVehicles&&this.state.recentlyViewedVehicles.length>0?(0,r.jsxs)("div",{style:{marginBottom:"15px",position:"relative",marginLeft:"auto",marginRight:"auto",maxWidth:"1600px"},children:[(0,r.jsx)("h3",{className:"sw-m-l-md sw--size-lg-phone",children:"Recently Viewed Vehicles"}),(0,r.jsx)("div",{className:"sw-flex sw-flex-wrap-tablet sw-justify-center",children:(0,r.jsx)(w.p,{className:"sw-m-auto sw-w-90P",showArrows:!0,altButtons:!0,autoScroll:!1,centerActiveSlide:!1,autoScrollInterval:4500,children:this.state.recentlyViewedVehicles.map((e,t)=>{let s=e.PhotoURLs||[];return e.isPhotoed&&(s[0]="https://cdn.carumai.com/".concat(e.VIN,"/cover-photo-large.jpg")),(0,r.jsx)(w.q,{children:(0,r.jsx)(m.A,{variant:"carousel",vehicle:e,photoURLs:s,index:t,positionIndex:t,isMobile:this.state.isMobile,selectedTab:this.state.selectedTab},t)},t)})})})]}):null]})]}),(0,r.jsx)(k.A,{style:{width:"100%"},totalInventory:this.state.totalInventory,currPage:this.state.currPage,onPageChange:e=>{this.setState({currPage:e,loading:!0},()=>{this.loadInventory(),this.setURLParams(),window.scrollTo({top:0})})}}),(0,r.jsxs)("div",{className:"sw-justify-center sw-m-t-md sw-container sw-m-auto",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"New Truck Inventory at Stephen Wade Auto Center"}),(0,r.jsx)("p",{children:"If you're in St. George, Utah, or passing through from Las Vegas to Salt Lake City, thereâs only one name to trust when searching for rugged capability, advanced technology, and all-terrain dependability in a pickup â Stephen Wade Auto Center, Southern Utahâs Auto Mall. As the premier Saint George auto mall, we proudly serve both locals and travelers with a vast selection of the most in-demand new trucks on the market, including new Toyota trucks, the 2025 Nissan Frontier, new Chevy Silverado, new Toyota Tacoma, Toyota Tundra, and the 2025 Ram
11500. Explore our new truck inventory below and see why drivers across Northern Nevada and Southern Utah choose Stephen Wade for unbeatable service, selection, and pricing."})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"New Toyota Trucks in St. George"}),(0,r.jsx)("p",{children:"Our new truck inventory includes the 2025 Toyota Tacoma and Tundra, Chevy Silverado, Nissan Frontier, RAM 1500, and more. Learn more about each of these impressive models:"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"2025 Toyota Tacoma"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Powertrain: 2.4L turbocharged 4-cylinder with up to 278 hp"}),(0,r.jsx)("li",{children:"Available i-FORCE MAX hybrid: 326 hp and 465 lb-ft of torque"}),(0,r.jsx)("li",{children:"Towing Capacity: Up to 6,500 pounds"}),(0,r.jsx)("li",{children:"Fuel Economy: Up to 21 MPG city / 26 MPG highway (estimated)"}),(0,r.jsx)("li",{children:"Tech: 14-inch touchscreen, Toyota Safety Sense⢠3.0, wireless Apple CarPlay\xae"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"2025 Toyota Tundra"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Horsepower: Up to 437 hp with hybrid powertrain"}),(0,r.jsx)("li",{children:"Max Towing: Up to 12,000 pounds"}),(0,r.jsx)("li",{children:"Trims: SR, SR5, Limited, Platinum, 1794 Edition, TRD Pro, and Capstone"}),(0,r.jsx)("li",{children:"Interior Features: Heated/ventilated seats, panoramic moonroof, 14-inch touchscreen"}),(0,r.jsx)("li",{children:"Off-Road Options: Crawl Control, Multi-Terrain Select"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"New Chevy Silverado â Power & Performance in Every Trim"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Engines: Choice of 2.7L TurboMax, 5.3L V8, 6.2L V8, or 3.0L Duramax Diesel"}),(0,r.jsx)("li",{children:"Max Towing Capacity: Up to 13,300 pounds"}),(0,r.jsx)("li",{children:"Fuel Economy: Up to 23 MPG highway (diesel)"}),(0,r.jsx)("li",{children:"Trims: WT, Custom, LT, RST, LTZ, ZR2, and High Country"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"The 2025 Nissan Frontier â Mid-Size Truck, Big Personality"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Standard Engine: 3.8L V6 with 310 hp"}),(0,r.jsx)("li",{children:"Towing: Up to 6,720 pounds"}),(0,r.jsx)("li",{children:"Fuel Economy: 18 MPG city / 24 MPG highway"}),(0,r.jsx)("li",{children:"Trims: S, SV, PRO-X, PRO-4X, and the new Hardbody Edition"}),(0,r.jsx)("li",{children:"Features: Zero Gravity front seats, 9-inch touchscreen, Wi-Fi hotspot"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"2025 Ram 1500 â Where Luxury Meets Toughness"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Engine Options: 3.6L V6 eTorque, 5.7L HEMI V8, 6.2L Supercharged V8 (TRX)"}),(0,r.jsx)("li",{children:"Towing Capacity: Up to 12,750 pounds"}),(0,r.jsx)("li",{children:"MPG: Up to 26 MPG highway with EcoDiesel"}),(0,r.jsx)("li",{children:"Trims: Tradesman, Big Horn, Laramie, Rebel, Limited Longhorn, Limited, and TRX"}),(0,r.jsx)("li",{children:"Interior: Premium leather, 12-inch Uconnect\xae touchscreen, digital cluster"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"Why Buy From Stephen Wade Auto Center?"}),(0,r.jsx)("p",{children:"At Stephen Wade Auto Center, we are proud to be the largest, most trusted Saint George auto mall, with access to over a dozen new vehicle brands â all conveniently located in one place. As Southern Utahâs Auto Mall, our team makes it easy to compare different models, test drive trucks from multiple brands, and take advantage of transparent pricing, competitive financing, and local expertise."}),(0,r.jsx)("p",{children:"Whether you're a contractor in St. George, an adventurer headed to Zion National Park, or just driving through from Salt Lake City or Las Vegas, our team is ready to help you find your perfect truck."})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"Browse New Trucks Today"}),(0,r.jsx)("p",{children:"Start your journey toward a new truck that works as hard as you do. Browse our new truck inventory online or stop by the dealership to see what makes Stephen Wade Auto Center the go-to auto mall for Northern Nevada and Southern Utah."})]}),(0,r.jsx)("p",{children:"We make every effort to ensure all data regarding both new and pre-owned vehicles listed on our website is accurate and up-to-date. However there may be some instances where options, color, trim, and body style may vary. In addition, factory rebates and incentives may vary. Please make certain to confirm the details of each vehicle with the dealer prior to purchase to ensure accuracy. Dealer cannot be held liable for data listed incorrectly."}
1),(0,r.jsx)("p",{className:"",children:"Disclaimer: *We strive to ensure that all information regarding new and pre-owned vehicles on our website is accurate and up-to-date. However, discrepancies may occur. Vehicle availability, pricing, options, colors, trims, and body styles may vary. Manufacturer rebates, incentives, and special offers are subject to change without notice and may depend on qualification criteria. Please verify all vehicle details with the dealership to ensure accuracy before making a purchase decision. The dealership is not responsible for typographical, pricing, product information, advertising, or shipping errors."})]}),this.state.switchNew||this.state.switchUsed?(0,r.jsx)("div",{className:"sw-flex sw-justify-center",children:(0,r.jsx)("button",{className:"sw-w-500px sw-primary",onClick:()=>{this.setState({readMoreModal:!0})},children:"Read More"})}):null,(0,r.jsx)("button",{className:"sw-m-0 sw-none sw-flex-lap sw-justify-center",style:{position:"fixed",borderRadius:0,bottom:0,left:0,right:0,height:"65px",backgroundColor:"black",color:"white",alignItems:"center",zIndex:1e3,...a,background:"radial-gradient(circle at var(--x, 10%) var(--y, 10%), rgba(243,179,50,var(--glow)) 0 10%, transparent 45%), rgba(0,0,0,0.75)",fontWeight:"bold",textShadow:"1px 1px 2px black"},onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left,r=e.clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15");let i=e.currentTarget.previousElementSibling,a=e.currentTarget.nextElementSibling;i&&i.style.setProperty("--spill","0.2"),a&&a.style.setProperty("--spill","0.2")},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let t=e.currentTarget.previousElementSibling,s=e.currentTarget.nextElementSibling;t&&t.style.setProperty("--spill","0"),s&&s.style.setProperty("--spill","0")},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},onClick:()=>{let e=4!==this.state.botNavDisplay;e?(this.scrollY=window.scrollY,document.body.style.position="fixed",document.body.style.top="-".concat(this.scrollY,"px"),document.body.style.width="100%"):(document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,this.scrollY),window.scrollTo({top:0,behavior:"smooth"})),this.setState({botNavDisplay:4*!!e})},children:(0,r.jsx)("div",{className:"sw--center",children:4===this.state.botNavDisplay?(0,r.jsxs)("span",{children:[(0,r.jsx)(b(),{path:S.hE6,size:1,style:{color:"white"}}),(0,r.jsx)("div",{children:"Apply Filters"})]}):(0,r.jsxs)("span",{children:[(0,r.jsx)(b(),{path:S.M6T,size:1}),(0,r.jsx)("div",{children:"Filters"})]})})}),(0,r.jsx)("div",{className:" sw-transition-all sw-none sw-block-lap",style:{position:"fixed",top:4===this.state.botNavDisplay?"0px":"-2000px",left:"0px",right:"0px",height:"100vh",zIndex:"12",background:"#ffffff"},children:(0,r.jsx)("div",{children:(0,r.jsx)("div",{className:"sw--size-sm sw-w-100P sw-m-l-auto sw-m-r-auto yourFilterScrollContainer",style:{background:"white",width:"100%",height:"auto",display:"flex",justifyContent:"center",alignItems:"start",overscrollBehaviorY:"contain",WebkitOverflowScrolling:"touch"},children:(0,r.jsxs)("div",{style:{width:"100%",overflowY:"scroll",height:"calc(100vh - 65px)",paddingTop:"65px",paddingBottom:"65px",overflowX:"hidden",overscrollBehaviorY:"contain"},children:[(0,r.jsx)("div",{className:"sw-flex sw-justify-between sw-m-rl-md",children:(0,r.jsxs)("div",{className:"sw-flex",style:{overflow:"auto"},children:[this.state.allFilters.length>0?(0,r.jsx)("button",{className:"sw-black sw--white",style:{width:"fit-content",margin:"1px",borderRadius:"15p
1x"},onClick:()=>{this.setState({selectedLocations:[],selectedMakes:[],selectedModels:[],selectedYears:[],selectedTrims:[],selectedBodyStyles:[],selectedTrans:[],selectedFuelTypes:[],selectedFeatures:[],selectedColors:[],selectedEngineTypes:[],searchVehicles:"",loading:!0,currPage:0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1,priceSliderStart:0,priceSliderEnd:2e5,mileageSliderStart:0,mileageSliderEnd:2e5,mpgSliderStart:0,mpgSliderEnd:100,switchNew:!1,switchUsed:!1,switchCertfied:!1,switchSpecials:!1,switch25:!1,switchFuel:!1},()=>{this.loadInventory()})},children:"Clear All"}):null,this.state.allFilters.length>0?this.state.allFilters.map((e,t)=>(0,r.jsx)("button",{className:"sw-black sw--white",style:{width:"fit-content",margin:"1px",borderRadius:"15px"},"aria-label":"".concat(e," filter"),onClick:()=>{this.state.selectedLocations.includes(e)&&this.setState({selectedLocations:this.state.selectedLocations.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedMakes.includes(e)&&this.setState({selectedMakes:this.state.selectedMakes.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedModels.includes(e)&&this.setState({selectedModels:this.state.selectedModels.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedYears.includes(e)&&this.setState({selectedYears:this.state.selectedYears.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedTrims.includes(e)&&this.setState({selectedTrims:this.state.selectedTrims.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedBodyStyles.includes(e)&&this.setState({selectedBodyStyles:this.state.selectedBodyStyles.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedTrans.includes(e)&&this.setState({selectedTrans:this.state.selectedTrans.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedFuelTypes.includes(e)&&this.setState({selectedFuelTypes:this.state.selectedFuelTypes.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedFeatures.includes(e)&&this.setState({selectedFeatures:this.state.selectedFeatures.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedColors.includes(e)&&this.setState({selectedColors:this.state.selectedColors.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),this.state.selectedEngineTypes.includes(e)&&this.setState({selectedEngineTypes:this.state.selectedEngineTypes.filter(t=>t!==e),loading:!0,locationDropdownOpen:!1,modelDropdownOpen:!1,makeDropdownOpen:!1,yearDropdownOpen:!1,trimDropdownOpen:!1,bodyStyleDropdownOpen:!1,featureDropdownOpen:!1,transDropdownOpen:!1,fuelDropdownOpen:!1,colorDropdownOpen:!1,engineDropdownOpen:!1},()=>{this.loadInventory()}),e.includes("Min Price")&&this.setState({loading:!0,currPage:0,priceSliderStart:0},()=>{this.loadInventory()}),e.includes("Max Price")&&this.setState({loading:!0,currPage:0,priceSliderEnd:2e5,switch25:!1},()=>{this.loadInventory()}),e.includes("Min Mileage")&&this.setState({loading:!0,currPage:0,mileageSliderStart:0},()=>{this.loadInventory()}),e.includes("Max Mileage")&&this.setState({loading:!0,currPage:0,mileageSliderEnd:2e5},()=>{this.loadInventory()}),e.includes("Min MPG")&&this.setState({loading:!0,currPage:0,mpgSliderStart:0},()=>{this.loadInventory()}),e.includes("Max MPG")&&this.setState({loading:!0,currPage:0,mpgSliderEnd:100},()=>{this.loadInventory()}),e.includes("New Switch")&&this.setState({loading:!0,currPage:0,switchNew:!1},()=>{this.loadInventory()}),e.includes("Used Switch")&&this.setState({loading:!0,currPage:0,switchUsed:!1},()=>{this.loadInventory()}),e.includes("Certified Switch")&&this.setState({loading:!0,currPage:0,switchCertfied:!1},()=>{this.loadInventory()}),e.includes("Specials Switch")&&this.setState({loading:!0,currPage:0,switchSpecials:!1},()=>{this.loadInventory()}),e.includes("Fuel Efficient Switch")&&this.setState({loading:!0,currPage:0,switchFuel:!1},()=>{this.loadInventory()}),this.state.searchVehicles.includes(e)&&this.setState({searchVehicles:"",loading:!0},()=>{this.loadInventory()})},children:(0,r.jsxs)("span",{className:"sw-flex sw-justify-center",children:[(0,r.jsx)(b(),{path:S.rZW,
1size:.7,className:"sw-m-tb-0 sw-m-r-xsm sw-p-0"}),this.state.searchVehicles.includes(e)?"Search: ":null,e]})},t)):(0,r.jsx)("div",{})]})}),(0,r.jsxs)("div",{className:"sw--center sw--black sw--bold sw-m-tb-sm sw--size-md",children:["Showing"," ",this.state.displayStart,"-",this.state.displayEnd," ","out of"," ",this.state.totalInventory," ",1==this.state.totalInventory?"Vehicle":"Vehicles"]}),(0,r.jsxs)("div",{style:{paddingBottom:"16px"},className:"sw-w-95P sw-m-lr-auto sw-flex sw-justify-center sw-flex-wrap",children:[(0,r.jsxs)("div",{className:"sw-flex sw-flex-wrap sw-justify-around sw-w-95P",children:[(0,r.jsxs)("div",{className:"sw-flex-col sw-m-sm sw--center sw-w-70px",children:[(0,r.jsx)("div",{className:"sw--bold sw--size-md",children:"New"}),(0,r.jsx)(c.A,{activeByDefault:this.state.switchNew,activeColor:"sw-info",onChange:e=>{this.setState({switchNew:e,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsxs)("div",{className:"sw-flex-col sw-m-sm sw--center sw-w-70px",children:[(0,r.jsx)("div",{className:"sw--bold sw--size-md",children:"Used"}),(0,r.jsx)(c.A,{activeByDefault:this.state.switchUsed,activeColor:"sw-info",onChange:e=>{this.setState({switchUsed:e,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsxs)("div",{className:"sw-flex-col sw-m-sm sw--center sw-w-70px",children:[(0,r.jsxs)("span",{style:{position:"relative",display:"inline-block",marginLeft:"4px",cursor:"pointer"},onMouseEnter:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="visible",t.style.opacity="1"},onMouseLeave:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="hidden",t.style.opacity="0"},children:[(0,r.jsxs)("div",{className:"sw-p-b-sm sw--bold",children:["Certified Vehicles",(0,r.jsx)(b(),{path:S.nO4,style:{position:"absolute",top:"0px",right:"-10px"},size:.68})]}),(0,r.jsx)("span",{className:"tooltip-text",style:{visibility:"hidden",opacity:0,width:"180px",backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",textAlign:"center",borderRadius:"4px",padding:"4px 6px",position:"absolute",bottom:"125%",left:"0",transform:"translateX(-50%)",transition:"opacity 0.3s",zIndex:1e3,fontSize:"12px",pointerEvents:"none"},children:"Certified vehicles are inspected and come with a limited warranty."})]}),(0,r.jsx)(c.A,{activeByDefault:this.state.switchCertfied,activeColor:"sw-info",onChange:e=>{this.setState({switchCertfied:e,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsxs)("div",{className:"sw-flex-col sw-m-sm sw--center sw-w-70px",children:[(0,r.jsxs)("span",{style:{position:"relative",display:"inline-block",marginLeft:"4px",cursor:"pointer"},onMouseEnter:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="visible",t.style.opacity="1"},onMouseLeave:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="hidden",t.style.opacity="0"},children:[(0,r.jsxs)("div",{className:"sw-p-b-sm sw--bold",children:["Special Vehicles",(0,r.jsx)(b(),{path:S.nO4,style:{position:"absolute",top:"0px",right:"-10px"},size:.68})]}),(0,r.jsx)("span",{className:"tooltip-text",style:{visibility:"hidden",opacity:0,width:"180px",backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",textAlign:"center",borderRadius:"4px",padding:"4px 6px",position:"absolute",bottom:"125%",left:"100%",transform:"translateX(-50%)",transition:"opacity 0.3s",zIndex:1e3,fontSize:"12px",pointerEvents:"none"},children:"Special Vehicles are discounted vehicles and have been in stock for 50+ days."})]}),(0,r.jsx)(c.A,{activeByDefault:this.state.switchSpecials,activeColor:"sw-info",onChange:e=>{this.setState({switchSpecials:e,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsxs)("div",{className:"sw-flex-col sw-m-sm sw--center sw-w-70px",children:[(0,r.jsxs)("span",{style:{position:"relative",display:"inline-block",marginLeft:"4px",cursor:"pointer"},onMouseEnter:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="visible",t.style.opacity="1"},onMouseLeave:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="hidden",t.style.opacity="0"},children:[(0,r.jsx)("div",{className:"sw-p-b-sm sw--bold",children:"Fuel Efficient"}),(0,r.jsx)("span",{className:"tooltip-text",style:{visibility:"hidden",opacity:0,width:"180px",backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",textAlign:"center",borderRadius:"4px",padding:"4px 6px",position:"absolute",bottom:"125%",left:"50%",transform:"translateX(-50%)",transition:"opacity 0.3s",zIndex:1e3,fontSize:"12px",pointerEvents:"none"},children:"Only showing vehicles with fuel-efficient powertrains: Electric, EcoBoost, Flex Fuel, Hybrid, or vehicles with city MPG greater than 40."}),(0,r.jsx)(b(),{path:S.nO4,style:{position:"absolute",top:"0px",right:"0px"},size:.68})]}),(0,r.jsx)(c.A,{activeByDefault:this.state.switchFuel,activeColor:"sw-info",onChange:e=>{this.setState({switchFuel:e,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsxs)("div",{className:"sw-flex-col sw-m-sm sw--center sw-w-70px",children:[(0,r.jsxs)("span",{style:{position:"relative",display:"inline-block",marginLeft:"4px",cursor:"pointer"},onMouseEnter:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="visible",t.style.opacity="1"},onMouseLeave:e=>{let t=e.currentTarget.querySelector("span.tooltip-text");t.style.visibility="hidden",t.style.opacity="0"},children:[(0,r.jsxs)("div",{className:"sw-p-b-sm sw--bold",children:["$25k & Below ",(0,r.jsx)(b(),{path:S.nO4,style:{position:"absolute",top:"0px",right:"-8px"},size:.68})]}),(0,r.jsx)("span",{className:"tooltip-text",style:{visibility:"hidden",opacity:0,width:"180px",backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",textAlign:"center",borderRadius:"4px",padding:"4px 6px",position:"absolute",bottom:"125%",left:"0",transform:"translateX(-50%)",transition:"opacity 0.3s",zIndex:1e3,fontSize:"12px",pointerEvents:"none"},children:"Only show vehicles priced at $25,000 or less. This filter is applied to all vehicles, including new and used."})]}),(0,r.jsx)(c.A,{activeByDefault:this.state.switch25,activeColor:"sw-info",onChange:e=>{this.setState({switch25:e,loading:!0,currPage:0,filtering:!0,priceSliderEnd:e?25e3:2e5},()=>{this.loadInventory()})}})]})]}),(0,r.jsx)("div",{className:"sw-w-95P",children:(0,r.jsxs)("div",{className:"sw-m-rl-0",children:[(0,r.jsx)("hr",{}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.locationDropdownOpen;this.setState({locationDropdownOpen:e,loadingLocations:!!e,modelDropdownOpen:!1,loadingModels:!1,yearDropdownOpen:!1,loadingYears:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/locations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,trans:this.state.selectedTrans,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,engine:this.state.selectedEngineTypes,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterLocations:t,loadingLocations:!1,displayNoFilters:0===t.length})}catch(e){console.log(e),this.setState({loadingLocations:!1})}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Location"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info sw--size-md",children:this.state.selectedLocations.length>0?this.state.selectedLocations.length:null}),(0,r.jsx)("div",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.locationDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.locationDropdownOpen?"500px":"0px",overflow:"hidden",transition:"max-height 0.2s ease"}
1,children:[this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingLocations?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterLocations.filter(e=>""!==e.LocationName&&e.Location.toLowerCase().includes(this.state.searchLocations.toLowerCase())).map((t,i)=>(0,r.jsx)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedLocations.includes(t.Location)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedLocations.includes(t.Location)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedLocations.includes(t.Location)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...s,color:this.state.selectedLocations.includes(t.Location)?"white":"black",backgroundColor:this.state.selectedLocations.includes(t.Location)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedLocations.includes(t.Location)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm sw-h-50px sw--size-md"),onClick:()=>{if(this.state.selectedLocations.includes(t.Location)){let e=JSON.parse(JSON.stringify(this.state.selectedLocations));e=e.filter(e=>e!==t.Location),this.setState({selectedLocations:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedLocations:[...this.state.selectedLocations,t.Location],loading:!0,currPage:0},()=>{this.loadInventory()})},children:(0,r.jsx)("span",{children:t.LocationName})},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.makeDropdownOpen;this.setState({makeDropdownOpen:e,loadingMakes:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/makes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,trans:this.state.selectedTrans,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterMakes:t,loadingMakes:!1,displayNoFilters:0===t.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Make"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info sw--size-md",children:this.state.selectedMakes.length>0?this.state.selectedMakes.length:null}),(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.makeDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.makeDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Makes...",value:this.state.searchMakes,onChange:e=>{this.setState({searchMakes:e.target.value})}})}
1),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingMakes?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterMakes.filter(e=>""!==e.Make&&e.Make.toLowerCase().includes(this.state.searchMakes.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedMakes.includes(t.Make)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedMakes.includes(t.Make)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedMakes.includes(t.Make)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...s,color:this.state.selectedMakes.includes(t.Make)?"white":"black",backgroundColor:this.state.selectedMakes.includes(t.Make)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedMakes.includes(t.Make)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm sw-m-tb-xsm sw-h-50px sw--size-md"),onClick:()=>{if(this.state.selectedMakes.includes(t.Make)){let e=JSON.parse(JSON.stringify(this.state.selectedMakes));e=e.filter(e=>e!==t.Make),this.setState({selectedMakes:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedMakes:[...this.state.selectedMakes,t.Make],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Make}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.modelDropdownOpen;this.setState({modelDropdownOpen:e,loadingModels:!!e,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,year:this.state.selectedYears,trim:this.state.selectedTrims,trans:this.state.selectedTrans,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterModels:t,loadingModels:!1,displayNoFilters:0===t.length},()=>{})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Model"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("span",{className:"sw--info sw--size-md",children:this.state.selectedModels.length>0?this.state.selectedModels.length:null}),(0,r.jsx)("span",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.modelDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out",height:"0px",margin:"none"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.modelDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Models...",value:this.state.searchModels,onChange:e=>{this.setState({searchModels:e.target.value})}})}
1),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingModels?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterModels.filter(e=>""!==e.Model&&e.Model.toLowerCase().includes(this.state.searchModels.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow","0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedModels.includes(t.Model)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedModels.includes(t.Model)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...s,color:this.state.selectedModels.includes(t.Model)?"white":"black",backgroundColor:this.state.selectedModels.includes(t.Model)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedModels.includes(t.Model)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm sw-m-tb-xsm sw-h-50px sw--size-md"),onClick:()=>{if(this.state.selectedModels.includes(t.Model)){let e=JSON.parse(JSON.stringify(this.state.selectedModels));e=e.filter(e=>e!==t.Model),this.setState({selectedModels:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedModels:[...this.state.selectedModels,t.Model],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Model}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.trimDropdownOpen;this.setState({trimDropdownOpen:e,loadingTrims:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/trims",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trans:this.state.selectedTrans,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterTrims:t,loadingTrims:!1,displayNoFilters:0===t.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Trim"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info sw--size-md",children:this.state.selectedTrims.length>0?this.state.selectedTrims.length:null}),(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.trimDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.trimDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"}
1,className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Trims...",value:this.state.searchTrims,onChange:e=>{this.setState({searchTrims:e.target.value})}})}),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingTrims?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterTrims.filter(e=>""!==e.Trim&&e.Trim.toLowerCase().includes(this.state.searchTrims.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedTrims.includes(t.Trim)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedTrims.includes(t.Trim)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedTrims.includes(t.Trim)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...s,color:this.state.selectedTrims.includes(t.Trim)?"white":"black",backgroundColor:this.state.selectedTrims.includes(t.Trim)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedTrims.includes(t.Trim)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm sw-m-tb-xsm sw-h-50px sw--size-md"),onClick:()=>{if(this.state.selectedTrims.includes(t.Trim)){let e=JSON.parse(JSON.stringify(this.state.selectedTrims));e=e.filter(e=>e!==t.Trim),this.setState({selectedTrims:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedTrims:[...this.state.selectedTrims,t.Trim],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Trim}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.yearDropdownOpen;this.setState({yearDropdownOpen:e,loadingYears:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/years",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,trim:this.state.selectedTrims,trans:this.state.selectedTrans,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterYears:t,loadingYears:!1,displayNoFilters:0===t.length},()=>{})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Year"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info sw--size-md",children:this.state.selectedYears.length>0?this.state.selectedYears.length:null}),(0,r.jsx)("span",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.yearDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.yearDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Years...",value:this.state.searchYears,onChange:e=>{this.setState({searchYears:e.target.value})}})}
1),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingYears?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterYears.filter(e=>""!==e.Year&&e.Year.toLowerCase().includes(this.state.searchYears.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedYears.includes(t.Year)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedYears.includes(t.Year)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedYears.includes(t.Year)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...s,color:this.state.selectedYears.includes(t.Year)?"white":"black",backgroundColor:this.state.selectedYears.includes(t.Year)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedYears.includes(t.Year)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm sw-m-tb-xsm sw-h-50px sw--size-md"),onClick:()=>{if(this.state.selectedYears.includes(t.Year)){let e=JSON.parse(JSON.stringify(this.state.selectedYears));e=e.filter(e=>e!==t.Year),this.setState({selectedYears:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedYears:[...this.state.selectedYears,t.Year],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Year}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{try{let e=!this.state.transDropdownOpen;this.setState({transDropdownOpen:e,loadingTrans:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});let t=await fetch("/api/filters/trans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),s=await t.json();this.setState({filterTrans:s,loadingTrans:!1,displayNoFilters:0===s.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Transmission"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info sw--size-md",children:this.state.selectedTrans.length>0?this.state.selectedTrans.length:null}),(0,r.jsx)("div",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.transDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.transDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"}
1,children:[this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingTrans?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterTrans.filter(e=>""!==e.Trans&&e.Trans.toLowerCase().includes(this.state.searchTrans.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedTrans.includes(t.Trans)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedTrans.includes(t.Trans)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedTrans.includes(t.Trans)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...s,color:this.state.selectedTrans.includes(t.Trans)?"white":"black",backgroundColor:this.state.selectedTrans.includes(t.Trans)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedTrans.includes(t.Trans)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm sw-m-tb-xsm sw-h-50px sw--size-md"),onClick:()=>{if(this.state.selectedTrans.includes(t.Trans)){let e=JSON.parse(JSON.stringify(this.state.selectedTrans));e=e.filter(e=>e!==t.Trans),this.setState({selectedTrans:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedTrans:[...this.state.selectedTrans,t.Trans],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Trans}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.bodyStyleDropdownOpen;this.setState({bodyStyleDropdownOpen:e,loadingBodyStyles:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/bodyStyles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,trim:this.state.selectedTrims,year:this.state.selectedYears,trans:this.state.selectedTrans,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterBodyStyles:t,loadingBodyStyles:!1,displayNoFilters:0===t.length},()=>{})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Body Style"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info sw--size-md",children:this.state.selectedBodyStyles.length>0?this.state.selectedBodyStyles.length:null}),(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.bodyStyleDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.bodyStyleDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Body Styles...",value:this.state.searchBodyStyles,onChange:e=>{this.setState({searchBodyStyles:e.target.value})}})}
1),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingBodyStyles?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterBodyStyles.filter(e=>""!==e.BodyStyle&&e.BodyStyle.toLowerCase().includes(this.state.searchBodyStyles.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedBodyStyles.includes(t.BodyStyle)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedBodyStyles.includes(t.BodyStyle)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedBodyStyles.includes(t.BodyStyle)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},style:{...s,color:this.state.selectedBodyStyles.includes(t.BodyStyle)?"white":"black",backgroundColor:this.state.selectedBodyStyles.includes(t.BodyStyle)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedBodyStyles.includes(t.BodyStyle)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm sw-m-tb-xsm sw-h-50px sw--size-md"),onClick:()=>{if(this.state.selectedBodyStyles.includes(t.BodyStyle)){let e=JSON.parse(JSON.stringify(this.state.selectedBodyStyles));e=e.filter(e=>e!==t.BodyStyle),this.setState({selectedBodyStyles:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedBodyStyles:[...this.state.selectedBodyStyles,t.BodyStyle],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.BodyStyle}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{try{let e=!this.state.fuelDropdownOpen;this.setState({fuelDropdownOpen:e,loadingFuelTypes:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});let t=await fetch("/api/filters/fuelType",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,body:this.state.selectedBodyStyles,trans:this.state.selectedTrans,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),s=await t.json();this.setState({filterFuelTypes:s,loadingFuelTypes:!1,displayNoFilters:0===s.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Fuel Type"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info sw--size-md",children:this.state.selectedFuelTypes.length>0?this.state.selectedFuelTypes.length:null}),(0,r.jsx)("div",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.fuelDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.fuelDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"}
1,children:[this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingFuelTypes?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterFuelTypes.filter(e=>""!==e.FuelType&&e.FuelType.toLowerCase().includes(this.state.searchFuelTypes.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedFuelTypes.includes(t.FuelType)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedFuelTypes.includes(t.FuelType)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedFuelTypes.includes(t.FuelType)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...s,color:this.state.selectedFuelTypes.includes(t.FuelType)?"white":"black",backgroundColor:this.state.selectedFuelTypes.includes(t.FuelType)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedFuelTypes.includes(t.FuelType)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm sw-m-tb-xsm sw-h-50px sw--size-md"),onClick:()=>{if(this.state.selectedFuelTypes.includes(t.FuelType)){let e=JSON.parse(JSON.stringify(this.state.selectedFuelTypes));e=e.filter(e=>e!==t.FuelType),this.setState({selectedFuelTypes:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedFuelTypes:[...this.state.selectedFuelTypes,t.FuelType],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.FuelType}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{let e=!this.state.featureDropdownOpen;this.setState({featureDropdownOpen:e,loadingFeatures:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});try{let e=await fetch("/api/filters/features",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,trim:this.state.selectedTrims,year:this.state.selectedYears,trans:this.state.selectedTrans,fuel:this.state.selectedFuelTypes,body:this.state.selectedBodyStyles,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterFeatures:t,loadingFeatures:!1,displayNoFilters:0===t.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Feature"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info sw--size-md",children:this.state.selectedFeatures.length>0?this.state.selectedFeatures.length:null}),(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.featureDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.featureDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Features...",value:this.state.searchFeatures,onChange:e=>{this.setState({searchFeatures:e.target.value})}})}
1),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingFeatures?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterFeatures.filter(e=>""!==e.Feature&&e.Feature.toLowerCase().includes(this.state.searchFeatures.toLowerCase())).map((t,i)=>(0,r.jsx)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedFeatures.includes(t.Feature)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedFeatures.includes(t.Feature)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedFeatures.includes(t.Feature)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...s,color:this.state.selectedFeatures.includes(t.Feature)?"white":"black",backgroundColor:this.state.selectedFeatures.includes(t.Feature)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedFeatures.includes(t.Feature)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm sw-m-tb-xsm sw-h-50px sw--size-md"),onClick:()=>{if(this.state.selectedFeatures.includes(t.Feature)){let e=JSON.parse(JSON.stringify(this.state.selectedFeatures));e=e.filter(e=>e!==t.Feature),this.setState({selectedFeatures:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedFeatures:[...this.state.selectedFeatures,t.Feature],loading:!0,currPage:0},()=>{this.loadInventory()})},children:(0,r.jsx)("span",{children:t.Feature})},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{try{let e=!this.state.colorDropdownOpen;this.setState({colorDropdownOpen:e,loadingColors:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,engineDropdownOpen:!1,loadingEngineTypes:!1});let t=await fetch("/api/filters/colors",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,body:this.state.selectedBodyStyles,trans:this.state.selectedTrans,feature:this.state.selectedFeatures,fuel:this.state.selectedFuelTypes,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),s=await t.json();this.setState({filterColors:s,loadingColors:!1,displayNoFilters:0===s.length})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Color"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info sw--size-md",children:this.state.selectedColors.length>0?this.state.selectedColors.length:null}),(0,r.jsx)("div",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.colorDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.colorDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Colors...",value:this.state.searchColors,onChange:e=>{this.setState({searchColors:e.target.value})}})}
1),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingColors?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterColors.filter(e=>""!==e.Color&&e.Color.toLowerCase().includes(this.state.searchColors.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedColors.includes(t.Color)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedColors.includes(t.Color)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedColors.includes(t.Color)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...s,color:this.state.selectedColors.includes(t.Color)?"white":"black",backgroundColor:this.state.selectedColors.includes(t.Color)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedColors.includes(t.Color)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm sw-m-tb-xsm sw-h-50px sw--size-md"),onClick:()=>{if(this.state.selectedColors.includes(t.Color)){let e=JSON.parse(JSON.stringify(this.state.selectedColors));e=e.filter(e=>e!==t.Color),this.setState({selectedColors:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedColors:[...this.state.selectedColors,t.Color],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.Color}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm",onClick:async()=>{try{let e=!this.state.engineDropdownOpen;this.setState({engineDropdownOpen:e,loadingEngineTypes:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1});let t=await fetch("/api/filters/engines",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,body:this.state.selectedBodyStyles,trans:this.state.selectedTrans,feature:this.state.selectedFeatures,fuel:this.state.selectedFuelTypes,color:this.state.selectedColors,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),s=await t.json();this.setState({filterEngineTypes:s,loadingEngineTypes:!1,displayNoFilters:0===s.length},()=>{})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:[(0,r.jsx)("span",{className:"sw--size-md",children:"Engine Type"}),(0,r.jsxs)("span",{className:"sw-flex",children:[(0,r.jsx)("div",{className:"sw--info sw--size-md",children:this.state.selectedEngineTypes.length>0?this.state.selectedEngineTypes.length:null}),(0,r.jsx)("div",{children:(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.engineDropdownOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})})]})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.engineDropdownOpen?"500px":"0px",overflowY:"scroll",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("div",{className:"sw-m-sm",children:(0,r.jsx)("input",{type:"text",style:{fontSize:"16px"},className:"sw-m-t-0 sw-m-b-xsm",placeholder:"Search Engine Types...",value:this.state.searchEngineTypes,onChange:e=>{this.setState({searchEngineTypes:e.target.value})}})}
1),this.state.displayNoFilters&&(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw--bold",style:{textAlign:"center",padding:"10px"},children:"No filters are currently available based on your selected criteria. Try adjusting your filters to see more options."}),this.state.loadingEngineTypes?[void 0].map((e,t)=>(0,r.jsx)(g.A,{children:(0,r.jsx)("div",{style:{height:"32px",margin:"6px 0"}})},t)):this.state.filterEngineTypes.filter(e=>""!==e.EngineType&&e.EngineType.toLowerCase().includes(this.state.searchEngineTypes.toLowerCase())).map((t,i)=>(0,r.jsxs)("div",{onFocus:e=>e.currentTarget.style.borderColor="#f3b332",onBlur:e=>e.currentTarget.style.borderColor="rgba(255,255,255,0.1)",onMouseMove:e=>{let s=e.currentTarget.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top;e.currentTarget.style.setProperty("--x","".concat(r,"px")),e.currentTarget.style.setProperty("--y","".concat(i,"px")),e.currentTarget.style.setProperty("--glow",this.state.selectedEngineTypes.includes(t.EngineType)?"0.3":"0.1");let a=e.currentTarget.previousElementSibling,l=e.currentTarget.nextElementSibling;a&&a.style.setProperty("--spill","0.2"),l&&l.style.setProperty("--spill","0.2"),this.state.selectedEngineTypes.includes(t.EngineType)?e.currentTarget.style.color="white":e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let s=e.currentTarget.previousElementSibling,r=e.currentTarget.nextElementSibling;s&&s.style.setProperty("--spill","0"),r&&r.style.setProperty("--spill","0"),this.state.selectedEngineTypes.includes(t.EngineType)?e.currentTarget.style.color="white":e.currentTarget.style.color="black"},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...s,color:this.state.selectedEngineTypes.includes(t.EngineType)?"white":"black",backgroundColor:this.state.selectedEngineTypes.includes(t.EngineType)?"#007bff":"rgba(255,255,255,0.15)",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), ".concat(this.state.selectedEngineTypes.includes(t.EngineType)?"#007bff":"rgba(255,255,255,0.15)")},className:"".concat(e," sw-m-tb-xsm sw-m-tb-xsm sw-h-50px sw--size-md"),onClick:()=>{if(this.state.selectedEngineTypes.includes(t.EngineType)){let e=JSON.parse(JSON.stringify(this.state.selectedEngineTypes));e=e.filter(e=>e!==t.EngineType),this.setState({selectedEngineTypes:e,loading:!0,currPage:0},()=>{this.loadInventory()})}else this.setState({selectedEngineTypes:[...this.state.selectedEngineTypes,t.EngineType],loading:!0,currPage:0},()=>{this.loadInventory()})},children:[(0,r.jsx)("span",{children:t.EngineType}),(0,r.jsxs)("span",{children:["(",t.Count,")"]})]},i))]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm sw--size-md",onClick:async()=>{try{let e=!this.state.mileageDropdown;this.setState({mileageDropdown:e,loadingMileage:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,engineDropdownOpen:!1,loadingEngineTypes:!1})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:["Mileage Slider",(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.mileageDropdown?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.mileageDropdown?"500px":"0px",overflowX:"hidden",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("h3",{children:(0,r.jsxs)(r.Fragment,{children:[this.state.mileageSliderStart.toLocaleStr
1ing()," ",(0,r.jsx)("span",{style:{fontSize:"13px"},children:"Mi"})," - ",this.state.mileageSliderEnd.toLocaleString()," ",(0,r.jsx)("span",{style:{fontSize:"13px"},children:"Mi"})]})}),(0,r.jsx)("div",{className:"sw-flex sw-justify-around sw-m-t-sm sw--center",children:(0,r.jsxs)("div",{className:"sw-flex-col sw-w-85P",children:[(0,r.jsx)(d.A,{"aria-label":"slider",min:0,max:2e5,step:2500,color:"info",initialStart:this.state.mileageSliderStart,initialEnd:this.state.mileageSliderEnd,size:"md",onChange:(e,t)=>{this.setState({mileageSliderStart:e,mileageSliderEnd:t,currPage:0,filtering:!0})},onMouseUp:(e,t)=>{this.setState({loading:!0}),this.loadInventory()}}),(0,r.jsxs)("div",{className:"sw-flex sw-justify-between sw-flex-wrap",children:[(0,r.jsxs)("div",{className:"sw-m-t-xsm sw-w-45P",children:[(0,r.jsx)("span",{className:"sw--black sw--bold sw--size-md",children:"Start"}),(0,r.jsx)("input",{"aria-label":"start",className:"sw-m-t-0 sw--center",type:"text",style:{fontSize:"16px"},value:this.state.mileageSliderStart.toLocaleString(),onChange:e=>{let t=e.target.value.replace(/,/g,"");if(!/^\d*$/.test(t))return;let s=""===t?0:Number(t);s>2e5&&(s=2e5),this.setState({mileageSliderStart:s,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsx)("span",{className:"sw-w-5P",children:"-"}),(0,r.jsxs)("div",{className:"sw-m-t-xsm sw-w-45P",children:[(0,r.jsx)("span",{className:"sw--black sw--bold sw--size-md",children:"End"}),(0,r.jsx)("input",{"aria-label":"end",style:{fontSize:"16px"},className:"sw-m-t-0 sw--center",type:"text",value:this.state.mileageSliderEnd.toLocaleString(),onChange:e=>{let t=e.target.value.replace(/,/g,"");if(!/^\d*$/.test(t))return;let s=""===t?0:Number(t);s>2e5&&(s=2e5),this.setState({mileageSliderEnd:s,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]})]})]})})]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsxs)("div",{className:"sw-flex-col",children:[(0,r.jsxs)("div",{style:{cursor:"pointer"},className:"sw-flex sw-justify-between sw--bold sw-m-tb-sm sw--size-md",onClick:async()=>{try{let e=!this.state.mpgDropdown;this.setState({mpgDropdown:e,loadingMPG:!!e,modelDropdownOpen:!1,loadingModels:!1,locationDropdownOpen:!1,loadingLocations:!1,yearDropdownOpen:!1,loadingYears:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,engineDropdownOpen:!1,loadingEngineTypes:!1})}catch(e){console.log(e)}},onMouseEnter:e=>{e.currentTarget.style.color="#007bff"},onMouseLeave:e=>{e.currentTarget.style.color=""},children:["MPG Slider",(0,r.jsx)(b(),{path:S.W5x,size:1,style:{transform:this.state.mpgDropdown?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out"}})]}),(0,r.jsxs)("div",{style:{maxHeight:this.state.mpgDropdown?"500px":"0px",overflowX:"hidden",transition:"max-height 0.2s ease"},children:[(0,r.jsx)("h3",{children:(0,r.jsxs)(r.Fragment,{children:[this.state.mpgSliderStart.toLocaleString()," - ",this.state.mpgSliderEnd.toLocaleString()]})}),(0,r.jsx)("div",{className:"sw-flex sw-justify-around sw-m-t-sm sw--center",children:(0,r.jsxs)("div",{className:"sw-flex-col sw-w-85P",children:[(0,r.jsx)(d.A,{"aria-label":"slider",min:0,max:100,step:10,color:"info",initialStart:this.state.mpgSliderStart,initialEnd:this.state.mpgSliderEnd,size:"md",onChange:(e,t)=>
1{this.setState({mpgSliderStart:e,mpgSliderEnd:t,currPage:0,filtering:!0})},onMouseUp:(e,t)=>{this.setState({loading:!0}),this.loadInventory()}}),(0,r.jsxs)("div",{className:"sw-flex sw-justify-between sw-flex-wrap",children:[(0,r.jsxs)("div",{className:"sw-m-t-xsm sw-w-45P",children:[(0,r.jsxs)("span",{className:"sw--black sw--bold sw--size-md",children:["Start"," "]}),(0,r.jsx)("input",{"aria-label":"start",style:{fontSize:"16px"},className:"sw-m-t-0 sw--center",type:"text",value:this.state.mpgSliderStart,onChange:e=>{let t=Number(e.target.value);isNaN(t)&&(t=0),t>100&&(t=100),this.setState({mpgSliderStart:t,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]}),(0,r.jsx)("span",{className:"sw-w-5P",children:"-"}),(0,r.jsxs)("div",{className:"sw-m-t-xsm sw-w-45P",children:[(0,r.jsx)("span",{className:"sw--black sw--bold sw--size-md",children:"End"}),(0,r.jsx)("input",{"aria-label":"end",style:{fontSize:"16px"},className:"sw-m-t-0 sw--center",type:"text",value:this.state.mpgSliderEnd,onChange:e=>{let t=Number(e.target.value);isNaN(t)&&(t=0),t>100&&(t=100),this.setState({mpgSliderEnd:t,loading:!0,currPage:0,filtering:!0},()=>{this.loadInventory()})}})]})]})]})})]})]}),(0,r.jsx)("hr",{className:"sw-m-t-0"}),(0,r.jsx)(h.A,{style:{backgroundColor:"white",border:"1px solid #bebebe",borderRadius:"5px",marginTop:"10px"},className:"sw-m-t-0 sw-flex sw-justify-center sw-flex-wrap ",placeholder:"Sort By",options:[{display:"Default",value:"Default",defaultOption:"Default"===this.state.sortSelect},{display:"Lowest Price",value:"Lowest Price",defaultOption:"Lowest Price"===this.state.sortSelect},{display:"Highest Price",value:"Highest Price",defaultOption:"Highest Price"===this.state.sortSelect},{display:"Lowest Miles",value:"Lowest Miles",defaultOption:"Lowest Miles"===this.state.sortSelect},{display:"Highest Miles",value:"Highest Miles",defaultOption:"Highest Miles"===this.state.sortSelect},{display:"Newest Year",value:"Newest",defaultOption:"Newest"===this.state.sortSelect},{display:"Oldest Year",value:"Oldest",defaultOption:"Oldest"===this.state.sortSelect},{display:"Stock Number",value:"Stock Number",defaultOption:"Stock Number"===this.state.sortSelect}],onChange:e=>{this.setState({sortSelect:e.value,loading:!0,currPage:0},()=>{this.loadInventory(),this.setURLParams()})}})]})})]})]})})})}),(0,r.jsx)("button",{"aria-label":"scroll to top button",className:"\n sw-position-fixed sw-w-50px sw-w-60px-phone sw-h-50px sw-h-60px-phone sw-round-100P sw-transition-swing sw-primary-D sw-z-10 \n sw-flex sw-justify-center sw-align-center sw-p-0 sw-shadow-0 sw-shadow-0-hov sw-primary-hov \n ".concat(this.state.showScrollToTopButton?"sw-opacity-100P":"sw-opacity-0P","\n ").replace(/^\s+|\s+$/g,"").replace(/\s+/g," "),onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left,r=e.clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15");let i=e.currentTarget.previousElementSibling,a=e.currentTarget.nextElementSibling;i&&i.style.setProperty("--spill","0.2"),a&&a.style.setProperty("--spill","0.2")},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let t=e.currentTarget.previousElementSibling,s=e.currentTarget.nextElementSibling;t&&t.style.setProperty("--spill","0"),s&&s.style.setProperty("--spill","0")},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...a,background:"radial-gradient(circle at var(--x, 10%) var(--y, 10%), rgba(243,179,50,var(--glow)) 0 10%, transparent 45%), rgba(0,0,0,0.55)",bottom:120,right:20},children:(0,r.jsx)(b(),{style:{textAlign:"center",fontSize:"13px",lineHeight:"1.2",color:"white",fontWeight:"bold",textShadow:"2px 2px 2px black"},path:S.iDA,size:1.4})}),!this.state.hasReviewed&&this.state.feedbackVisible&&(this.state.reviewOpen?(0,r.jsxs)("div",{id:"sw-feedback",className:"sw-none-lap",style:{position:"fixed",bottom:"10px",right:"20px",backgroundColor:"white",border:"1px solid #bebebe",padding:"10px",borderRadius:"15p
1x",zIndex:1e3,alignItems:"center",width:"320px"},children:[(0,r.jsx)("button",{style:{position:"relative",border:"none",background:"transparent",fontSize:16,cursor:"pointer",color:"white",backgroundColor:"#1a2738"},onClick:()=>this.setState({reviewOpen:!1}),children:"Close"}),(0,r.jsx)("p",{className:"sw--center sw--bold",style:{color:this.state.reviewSubmitted?"green":"black"},children:this.state.reviewSubmitted?"Your feedback was saved! Tell us more?":"How would you rate your experience?"}),this.state.reviewSubmitted?(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:{position:"absolute",top:"0px",right:"0px"},onClick:()=>{this.setState({feedbackVisible:!1})},children:(0,r.jsx)(b(),{className:"sw-pointer sw--gray-L sw--gray-hov sw-transition-swing",path:S.hyP,size:1.33})}),(0,r.jsx)("textarea",{style:{width:"100%",height:"50px",borderRadius:"10px",border:"1px solid #ccc",padding:"5px",marginTop:"10px"},placeholder:"Tell us Why...",onChange:e=>this.setState({customerFeedback:e.target.value}),value:this.state.customerFeedback}),(0,r.jsx)("button",{style:{backgroundColor:"#007bff",color:"white",border:"none",padding:"5px 10px",borderRadius:"5px",cursor:"pointer"},onClick:()=>this.setState(()=>{if(0==this.state.customerFeedback.length)return void this.setState({customerFeedbackError:"Please fill out the input field"});this.postFeedBack()}),children:"Submit"}),(0,r.jsx)("div",{className:"sw--danger sw--center",style:{display:this.state.customerFeedbackError?"block":"none"},children:this.state.customerFeedbackError})]}):(0,r.jsxs)("div",{className:"sw-flex sw-justify-around",children:[(0,r.jsx)("button",{className:"sw-w-30P",style:{background:"transparent",border:"none",cursor:"pointer",boxShadow:"none",transform:"scale(1)"},onClick:()=>this.setState({customerReview:"Dislike"},()=>this.postReview()),onMouseEnter:e=>{var t;return null==(t=e.currentTarget.querySelector("svg"))?void 0:t.setAttribute("style","color: red; transform: scale(1.15); transition: transform 0.2s, color 0.2s;")},onMouseLeave:e=>{var t;return null==(t=e.currentTarget.querySelector("svg"))?void 0:t.setAttribute("style","color: red; transform: scale(1); transition: transform 0.2s, color 0.2s;")},children:(0,r.jsx)(b(),{path:S.rxG,style:{color:"red",transition:"transform 0.2s, color 0.2s"},size:2.5})}),(0,r.jsx)("button",{className:"sw-w-30P",style:{background:"transparent",border:"none",cursor:"pointer",boxShadow:"none"},onClick:()=>this.setState({customerReview:"Neutral"},()=>this.postReview()),onMouseEnter:e=>{var t;return null==(t=e.currentTarget.querySelector("svg"))?void 0:t.setAttribute("style","color: #b8b82a; transform: scale(1.15); transition: transform 0.2s, color 0.2s;")},onMouseLeave:e=>{var t;return null==(t=e.currentTarget.querySelector("svg"))?void 0:t.setAttribute("style","color: #b8b82a; transform: scale(1); transition: transform 0.2s, color 0.2s;")},children:(0,r.jsx)(b(),{path:S.o$Y,style:{color:"#b8b82a",transition:"transform 0.2s, color 0.2s"},size:2.5})}),(0,r.jsx)("button",{className:"sw-w-30P",style:{background:"transparent",border:"none",cursor:"pointer",boxShadow:"none"},onClick:()=>this.setState({customerReview:"Like"},()=>this.postReview()),onMouseEnter:e=>{var t;return null==(t=e.currentTarget.querySelector("svg"))?void 0:t.setAttribute("style","color: green; transform: scale(1.15); transition: transform 0.2s, color 0.2s;")},onMouseLeave:e=>{var t;return null==(t=e.currentTarget.querySelector("svg"))?void 0:t.setAttribute("style","color: green; transform: scale(1); transition: transform 0.2s, color 0.2s;")},children:(0,r.jsx)(b(),{path:S.$Mf,style:{color:"green",transition:"transform 0.2s, color 0.2s"},size:2.5})})]})]}):(0,r.jsx)("button",{id:"sw-feedback-collapsed",className:"sw-flex sw-none-lap",style:{position:"fixed",bottom:10,right:20,width:50,height:50,borderRadius:25,backgroundColor:"#1a2738",border:"1px solid #1a2738",boxShadow:"0 2px 6px rgba(0,0,0,0.2)",fontSize:12,fontWeight:"bold",alignItems:"center",justifyContent:"center",zIndex:1e3,cursor:"pointer"},onClick:()=>this.setState({reviewOpen:!0}),children:"Rate?"})),!this.state.hasReviewed&&this.state.feedbackVisible&&(this.state.reviewOpen?(0,r.jsxs)("div",{id:"sw-feedback-expanded",style:{position:"fixed",bottom:60,left:20,width:200,padding:8,backgroundColor:"white",border:"1px solid #ccc",borderRadius:12,boxShadow:"0 2px 6px rgba(0,0,0,0.2)",zIndex:1e3},className:"sw-none sw-block-lap",children:[(0,r.jsx)("button",{style:{position:"relative",border:"none",background:"transparent",fontSize:16,cursor:"pointer",color:"white",backgroundColor:"#1a2738"},onClick:()=>this.setState({reviewOpen:!1}),children:"Close"}),(0,r.jsx)("p",{style:{textAlign:"center",fontWeight:"bold",margin:"0px",color:this.state.reviewSubmitted?"green":"black"},children:this.state.reviewSubmitted?"Your feedback was saved! Tell us more?":"How would you rate your experience?"}),this.state.reviewSubmitted?(0,r.jsxs)("div",{children:[(0,r.jsx)("textarea",{style:{width:"100%",height:"50px",borderRadius:"10px",border:"1px solid #ccc",padding:"5px",marginTop:"10px",fontSize:"16px"},placeholder:"Tell us Why...",onChange:e=>this.setState({customerFeedback:e.target.value}),value:this.state.customerFeedback}),(0,r.jsx)("button",{style:{backgroundColor:"#007bff",color:"white",border:"none",padding:"5px 10px",borderRadius:"5px",cursor:"pointer"},onClick:()=>this.setState(()=>{if(0==this.state.customerFeedback.length)return void this.setState({customerFeedbackError:"Please fill out the input field"});this.postFeedBack()}),children:"Submit"}),(0,r.jsx)("div",{className:"sw--danger sw--center",style:{display:this.state.customerFeedbackError?"block":"none"},children:this.state.customerFeedbackError})]}):(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-around"},children:[(0,r.jsx)("button",{className:"sw-w-30P sw-m-t-0 sw-p-0",style:{background:"transparent",border:"none",cursor:"pointer",boxShadow:"none"},onClick:()=>this.setState({customerReview:"Dislike"},()=>this.postReview()),children:(0,r.jsx)(b(),{path:S.rxG,style:{color:"red",transition:"transform 0.2s, color 0.2s"},size:1.5})}),(0,r.jsx)("button",{className:"sw-w-30P sw-m-t-0 sw-p-0",style:{background:"transparent",border:"none",cursor:"pointer",boxShadow:"none"},onClick:()=>this.setState({customerReview:"Neutral"},()=>this.postReview()),children:(0,r.jsx)(b(),{path:S.o$Y,style:{color:"#b8b82a",transition:"transform 0.2s, color 0.2s"},size:1.5})}),(0,r.jsx)("button",{className:"sw-w-30P sw-m-t-0 sw-p-0",style:{background:"transparent",border:"none",cursor:"pointer",boxShadow:"none"},onClick:()=>this.setState({customerReview:"Like"},()=>this.postReview()),children:(0,r.jsx)(b(),{path:S.$Mf,style:{color:"green",transition:"transform 0.2s, color 0.2s"},size:1.5})})]})]}):(0,r.jsx)("button",{id:"sw-feedback-collapsed",className:"sw-none sw-flex-lap",style:{position:"fixed",bottom:60,left:20,width:50,height:50,borderRadius:25,backgroundColor:"#1a2738",border:"1px solid #1a2738",boxShadow:"0 2px 6px rgba(0,0,0,0.2)",fontSize:12,fontWeight:"bold",alignItems:"center",justifyContent:"center",zIndex:1e3,cursor:"pointer"},onClick:()=>this.setState({reviewOpen:!0}),children:"Rate?"})),this.state.favoriteVehicles.length>0?(0,r.jsx)("button",{"aria-label":"scroll to top button",className:"sw-position-fixed sw-w-60px sw-w-60px-phone sw-h-60px sw-h-60px-phone sw-round-100P sw-transition-swing sw-primary-D sw-z-10 sw-flex sw-justify-center sw-align-center sw-p-0 sw-shadow-0 sw-shadow-0-hov sw-primary-hov".replace(/^\s+|\s+$/g,"").replace(/\s+/g," "),onClick:()=>{window.location.href="/garage?tab=heart"},onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left,r=e.clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15");let i=e.currentTarget.previousElementSibling,a=e.currentTarget.nextElementSibling;i&&i.style.setProperty("--spill","0.2"),a&&a.style.setProperty("--spill","0.2")},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let t=e.currentTarget.previousElementSibling,s=e.currentTarget.nextElementSibling;t&&t.style.setProperty("--spill","0"),s&&s.style.setProperty("--spill","0")},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...a,background:"radial-gradient(circle at var(--x, 10%) var(--y, 10%), rgba(243,179,50,var(--glow)) 0 10%, transparent 45%), rgb(156, 1, 1, 0.8)",bottom:200,right:20},children:(0,r.jsxs)("span",{style:{textAlign:"center",lineHeight:"1.2",color:"white",fontWeight:"bold"},className:"sw--size-xsm",children:["View",(0,r.jsx)("div",{style:{color:"white"},children:"Hearted"})]})}):null,this.state.compareVehicles.length>0?(0,r.jsx)("button",{"aria-label":"scroll to top button",className:"sw-position-fixed sw-w-60px sw-h-60px sw-round-100P sw-transition-swing sw-primary-D sw-z-10 sw-flex sw-justify-center sw-align-center sw-p-0 sw-shadow-0 sw-shadow-0-hov sw-primary-hov".replace(/^\s+|\s+$/g,"").replace(/\s+/g," "),onClick:()=>{window.location.href="/garage?tab=compared"},onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left,r=e.clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15");let i=e.currentTarget.previousElementSibling,a=e.currentTarget.nextElementSibling;i&&i.style.setProperty("--spill","0.2"),a&&a.style.setProperty("--spill","0.2")},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let t=e.currentTarget.previousElementSibling,s=e.currentTarget.nextElementSibling;t&&t.style.setProperty("--spill","0"),s&&s.style.setProperty("--spill","0")},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},style:{...a,background:"radial-gradient(circle at var(--x, 10%) var(--y, 10%), rgba(243,179,50,var(--glow)) 0 10%, transparent 45%), rgb(224, 141, 32, 0.8)",bottom:130,right:20},children:(0,r.jsx)("span",{style:{textAlign:"center",lineHeight:"1.2",color:"white",fontWeight:"bold",textShadow:"1px 1px 2px black"},className:"sw--size-xsm",children:"View Compared"})}):null,(0,r.jsx)(p.A,{render:this.state.readMoreModal,callBack:e=>{this.setState({readMoreModal:e})},className:"sw-m-auto sw-container sw-p-0 sw-align-center",style:{maxWidth:"75vw"},children:(0,r.jsxs)("div",{className:"sw-p-md sw-p-sm-tablet sw-overflow sw--center",style:{maxHeight:"80vh"},children:[(0,r.jsx)("div",{className:"sw-flex sw-justify-between sw-w-100P",children:(0,r.jsx)("div",{onClick:()=>{this.setState({readMoreModal:!1})},children:(0,r.jsx)(b(),{className:"sw-pointer sw--gray-L sw--gray-hov sw-transition-swing",path:S.hyP,size:1.33})})}),(0,r.jsxs)("div",{className:"sw-flex sw-justify-around sw-flex-col",children:[this.state.switchUsed?(0,r.jsxs)("div",{className:"sw-justify-center sw-m-bt-md sw-container sw-m-auto ",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Used Vehicles: Discover Your Dream Car with Ease"}),(0,r.jsx)("p",{children:"Embarking on the journey of finding the best used cars has never been more straightforward. Our expertly curated selection is designed to meet every one of your requirements. We understand that purchasing a vehicle is a significant decision, which is why we offer comprehensive guides on what is good mileage for a used car and what to check when buying a used carâensuring you make an informed choice every step of the way."})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Our C
1ommitment to Quality and Satisfaction"}),(0,r.jsx)("p",{children:"At Stephen Wade, we believe in transparency and trust. Each vehicle in our inventory undergoes rigorous inspection and comes with detailed history reports, so you know exactly what you're getting. From luxurious sedans and rugged SUVs to efficient compacts, our collection is meticulously selected to ensure it meets our high standards of quality and reliability."})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Tailored Solutions for Every Shopper"}),(0,r.jsxs)("p",{children:["Understanding that each car buyer has unique needs, we offer flexible ",(0,r.jsx)("a",{href:"/finance",children:"financing options"})," and expert advice on navigating the intricacies of vehicle ownershipâwhether it's your first purchase or you're looking to add to your collection. Curious about leasing a used car? Our knowledgeable team is here to guide you through the process, offering solutions that best fit your lifestyle and budget."]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Comprehensive Auto Service Center at Stephen Wade"}),(0,r.jsx)("p",{children:"Regular maintenance is key to ensuring your vehicle remains in peak condition, and at Stephen Wade, our state-of-the-art Auto Service Center is equipped to handle all your car care needs. Our certified technicians are trained to the highest standards and stay up-to-date with the latest automotive technology. From routine oil changes and tire rotations to more complex repairs, we provide a full spectrum of services to keep your car running smoothly. Using only genuine parts and offering competitive pricing, we are committed to delivering top-notch service tailored to your vehicle's requirements. Plus, with convenient scheduling and a customer-focused approach, we ensure that maintaining your vehicle is hassle-free and efficient."})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Exceptional Used Car Buying Experience at Stephen Wade"}),(0,r.jsx)("p",{children:"Our commitment to a seamless and efficient buying experience begins the moment you step onto Stephen Wade's lot or visit our website. We streamline the process with user-friendly online search tools that allow you to filter through our extensive inventory based on your preferences â model, make, price, mileage, and more. In addition to our online resources, our sales professionals are dedicated to personalizing your journey, offering one-on-one consultations to answer your questions and match you with the right vehicle. Once you've selected your ideal car, we ensure a hassle-free and expedient purchase process. Our financing specialists work with you to secure the best loan terms and rates, while our transparent pricing means no unexpected costs. Documentation is handled swiftly, allowing you to drive off in your new car with confidence and ease. At Stephen Wade, we're all about making your used car buying experience as enjoyable and fast as possible so you can start making memories on the road in no time. "})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Step-by-Step Guide to Buying a Used Car at Stephen Wade "}),(0,r.jsx)("div",{className:"sw--bold",children:"Step 1: Assess Your Needs "}),"Start by determining what you need in a car. Consider size, performance, fuel efficiency, and specific features that are important to you.",(0,r.jsx)("div",{className:"sw--bold",children:"Step 2: Set Your Budget "}),"Decide how much you can afford to spend. Don't forget to account for insurance, maintenance, and other running costs when setting your budget.",(0,r.jsx)("div",{className:"sw--bold",children:"Step 3: Research "}),"Explore our vast inventory online or in person to learn about the models that fit your criteria. Use our comparison tools and read up on vehicle history reports and inspection results available for all our cars.",(0,r.jsx)("div",{className:"sw--bold",children:"Step 4: Test Drive "}),"Once you have a shortlist, contact us to schedule test drives. Pay attention to how each car handles, brakes, accelerates, and overall comfort and functionality.",(0,r.jsx)("div",{className:"sw--bold",children:"Step 5: Obtain Vehicle History Report "}),"Ask for the vehicle history report to check for any past accidents, service history, and previous ownership.",(0,r.jsx)("div",{className:"sw--bold",children:"Step 6: Inspection "}),"Consider getting an independent inspection to ensure there are no hidden problems.",(0,r.jsx)("div",{className:"sw--bold",children:"Step 7: Negotiation "}),"Negotiate the price with our sales professionals. We aim for transparency and fair pricing but are open to discu
1ssing any concerns you may have.",(0,r.jsx)("div",{className:"sw--bold",children:"Step 8: Finalize Financing "}),"If you require financing, our specialists will work with you to secure a loan with competitive terms that suit your financial situation.",(0,r.jsx)("div",{className:"sw--bold",children:"Step 9: Paperwork "}),"Review and sign all necessary documents. We make sure this process is as smooth as possible.",(0,r.jsx)("div",{className:"sw--bold",children:"Step 10: Take Delivery"}),"Once everything is finalized, you can take delivery of your vehicle. We'll ensure you fully understand all features and warranty details during the handover. Enjoy your new ride, and remember, we are here to assist you with any future car needs at Stephen Wade."]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Ready to Start Your Search?"}),(0,r.jsx)("p",{children:"Dive into our inventory today and discover why Stephen Wade is the go-to destination for discerning car buyers and vehicle shoppers. With an emphasis on quality, value, and customer satisfaction, we're here to turn your car shopping journey into a rewarding adventure. Visit us today and experience shopping with confidence and peace of mind. "})]})]}):null,this.state.switchNew?(0,r.jsxs)("div",{className:"sw-justify-center sw-m-bt-md sw-container sw-m-auto ",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Discover Your Dream Car at Stephen Wade's New Vehicle Inventory"}),(0,r.jsx)("p",{children:'Welcome to Stephen Wade\'s New Vehicle Inventory, where your car buying experience is transformed into a seamless, exciting journey. Nestled in the heart of St. George and conveniently located for our friends traveling from Las Vegas to Salt Lake City, our dealership offers an unparalleled selection of brand-new cars designed to cater to every driver\'s unique needs. Whether you\'re pondering "what kind of car should I get?" or strategizing on "when is the best time to buy a new car," our skilled team is here to guide you every step of the way.'})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Our Curated Selection"}),(0,r.jsx)("p",{children:'Our expansive inventory showcases a broad range of vehicles. From sleek, performance-driven sedans to spacious, family-friendly SUVs, and rugged, reliable trucks, we have something for everyone. We understand the importance of finding the right car that fits your lifestyle, budget, and aesthetic preferences. With our expertly curated selection, you\'ll discover that deciding "how to pick a new car" is a stress-free process at Stephen Wade.'})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"The Advantages of Buying New"}),(0,r.jsx)("p",{children:"When deciding between a new or used vehicle, several benefits make purchasing new an attractive option. Firstly, new cars come with the latest technologies and innovations, including advanced safety features, cutting-edge infotainment systems, and improved environmental performance with more fuel-efficient and electric options available. By selecting a new car, you'll enjoy the peace of mind with comprehensive manufacturer warranties, reducing the worry of unforeseen repairs that are more common with used vehicles. Additionally, new cars offer the capability to customize according to your specific tastes and needs, from paint colors to accessory packagesâyou can have your car tailored just for you from the start. Lastly, while used cars can be more affordable upfront, new cars are less likely to incur maintenance costs in the short term, potentially offering better value over time if kept for a number of years. At Stephen Wade's New Vehicle Inventory, our experts are on hand to help weigh these advantages and find a new car perfect for you."})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Embrace the Future with Electric Vehicles (EVs)"}),(0,r.jsx)("p",{children:"Our commitment to innovation and sustainability is evident through our impressive range of electric vehicles. As the world pivots towards environmentally responsible alternatives, Stephen Wade's New Vehicle Inventory proudly embraces this change. Our selection of EVs spans from dynamic sedans to versatile SUVs, each offering a silent, zero-emission drive without compromising on performance or comfort."})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Advantages of Driving Electric:"}),(0,r.jsxs)("ul",{className:"sw-p-0",children:[(0,r.jsx)("li",{children:"Zero Emissions: EVs contribute to a greener planet by eliminating exhaust pollutants, reducing your carbon footprint with every mile."}),(0,r.jsx)("li",{children:"Low Operating Costs: Electric cars are cheaper to run than gasoline, thanks to lower fueling costs and reduced maintenance requirements."}
1),(0,r.jsx)("li",{children:"Quiet and Smooth: Electric motors provide a serene driving experience that is both quiet and smooth, enhancing overall ride quality."}),(0,r.jsx)("li",{children:"Instant Torque: Enjoy immediate acceleration with the instant torque delivery unique to electric powertrains, ensuring a thrilling driving experience."}),(0,r.jsx)("li",{children:"Incentives and Rebates: Many regions offer financial incentives such as tax credits and rebates for electric vehicle owners, making them an economically smart choice."})]}),"Explore our electric vehicle inventory and join the revolution of clean, innovative transportation. Our experts will help you navigate the significant nuances of EV ownership, including charging options and battery life, to ensure you choose an electric vehicle that aligns with your lifestyle. Experience the future of driving at Stephen Wade's, where technology and sustainability meet."]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Embark on Your Car Buying Journey"}),(0,r.jsxs)("p",{children:["Embarking on your new car buying journey with Stephen Wade is a tailored experience designed to be as joyful and efficient as possible. We start by understanding your preferences and requirements through a personal consultation. From there, you'll be presented with a vehicle selection that matches your specifications. Test drives are encouraged to ensure your choice feels right in real-world conditions. Once you've found your perfect automotive match, our finance experts will assist you with an array of ",(0,r.jsx)("a",{href:"/finance",children:"financing options"}),", helping you secure a deal that aligns with your financial goals. We'll also guide you through any applicable incentives or discounts, ensuring you receive the best value on your new car purchase. After completing the necessary paperwork with transparency and care, you'll be ready to cruise the streets in your brand-new vehicle, backed by Stephen Wade's dedication to your lasting satisfaction."]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"sw--size-md-tablet",children:"Your Dream Car Awaits at Stephen Wade"}),(0,r.jsx)("p",{children:"Your search for the perfect new vehicle ends here. Visit us in St. George, UT, where your car-buying adventure begins. Connect with us today, and take the first step towards driving home in the car you've always wanted."})]})]}):null]}),(0,r.jsx)("button",{className:"sw-primary sw--center sw-m-auto sw-primary-D-hov sw-transition-swing sw-max-w-150px sw-p-sm",onClick:()=>{this.setState({readMoreModal:!1})},children:"Close"})]})}),(0,r.jsx)(p.A,{render:this.state.priceAlertModal,callBack:e=>{this.setState({priceAlertModal:e})},className:"sw-m-auto sw-container sw-p-0 sw-align-center",style:{maxWidth:"75vw"},BGClose:!1,children:(0,r.jsxs)("div",{className:"sw-p-md sw-p-sm-tablet sw-overflow sw--center",style:{maxHeight:"80vh"},children:[(0,r.jsx)("div",{className:"sw-flex sw-justify-between sw-w-100P",children:(0,r.jsx)("div",{onClick:()=>{this.setState({priceAlertModal:!1})},children:(0,r.jsx)(b(),{className:"sw-pointer sw--gray-L sw--gray-hov sw-transition-swing",path:S.hyP,size:1.33})})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"sw-flex sw-justify-center-lap sw-none-lap",children:[(0,r.jsxs)("h3",{className:"sw--size-lg",style:{color:"#B73A50"},children:["Get notified when the",this.state.priceAlertVehicle&&(0,r.jsxs)("span",{style:{color:"black"},children:[(0,r.jsxs)("span",{children:[" ",this.state.priceAlertVehicle.nu]}),(0,r.jsxs)("span",{children:[" ",this.state.priceAlertVehicle.make]}),(0,r.jsxs)("span",{children:[" ",this.state.priceAlertVehicle.model]}),(0,r.jsxs)("span",{children:[" ",this.state.priceAlertVehicle.Series]})]})," ","price drops?"]}),(0,r.jsx)("p",{className:"sw--size-sm sw-flex sw-align-end",style:{textDecoration:"underline",color:"#027bff",marginBottom:"3px",cursor:"pointer"},onClick:()=>{this.setState({leadDisclaimerModal:!0,leadDisclaimerTitle:"Price Alert",leadDisclaimerDescription:'\n <div style="sans-serif; max-width: 700px; margin: auto; line-height: 1.6;">\n <h2 style="color: #0A3161;" class="sw--size-lg-lap">Never Miss a Deal!</h2>\n <p class="sw--size-sm-lap">Have your eye on a vehicle but waiting for the perfect price? With our <strong>Price Alert</strong> feature, you\'ll be the first to know when your desired vehicle drops in price.</p>\n\n <h3 style="color: #0A3161;" class="sw--size-lg-lap">Here\'s How It Works:</h3>\n <ol>\n <li><strong>Fill our quick form</strong></li>\n <li><strong>We\'ll keep watch</strong></li>\n <li><strong>We\'ll reach out once we detect a price drop</strong></li>\n </ol>\n\n <p style="margin-top:20px;" class="sw--size-sm-lap">\n <strong style="color: #0A3161;">Don\'t miss your chance!</strong> Set your Price Alert today and let the deal come to you.\n </p>\n </div>\n '})}
1,children:"(More Details)"})]}),(0,r.jsxs)("div",{className:"sw--center sw-none sw-block-lap ",children:[this.state.priceAlertVehicle&&(0,r.jsx)("div",{style:{width:"100px",height:"70px",borderRadius:"8px",overflow:"hidden",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",backgroundColor:"#fff",justifyContent:"center",alignItems:"center",marginLeft:"auto",marginRight:"auto"},className:"sw-m-b-sm sw-m-tb-0 sw-flex",children:(0,r.jsx)(y(),{src:this.state.priceAlertVehicle.photoURLs?this.state.priceAlertVehicle.photoURLs[0]:"/images/NotAvailable.webp",alt:"".concat(this.state.priceAlertVehicle.year," ").concat(this.state.priceAlertVehicle.make," ").concat(this.state.priceAlertVehicle.model),width:100,height:70})}),(0,r.jsx)("h3",{className:"sw--size-md-lap",style:{color:"#B73A50"},children:"Get Notified When Price Drops?"}),(0,r.jsx)("p",{className:"sw--size-sm sw-m-t-0",style:{textDecoration:"underline",color:"#027bff",marginBottom:"3px",cursor:"pointer"},onClick:()=>{this.setState({leadDisclaimerModal:!0,leadDisclaimerTitle:"Price Alert",leadDisclaimerDescription:'\n <div style="sans-serif; max-width: 700px; margin: auto; line-height: 1.6;">\n <h2 style="color: #0A3161;" class="sw--size-lg-lap">Never Miss a Deal!</h2>\n <p class="sw--size-sm-lap">Have your eye on a vehicle but waiting for the perfect price? With our <strong>Price Alert</strong> feature, you\'ll be the first to know when your desired vehicle drops in price.</p>\n\n <h3 style="color: #0A3161;" class="sw--size-lg-lap">Here\'s How It Works:</h3>\n <ol>\n <li><strong>Fill our quick form</strong></li>\n <li><strong>We\'ll keep watch</strong></li>\n <li><strong>We\'ll reach out once we detect a price drop</strong></li>\n </ol>\n\n <p style="margin-top:20px;" class="sw--size-sm-lap">\n <strong style="color: #0A3161;">Don\'t miss your chance!</strong> Set your Price Alert today and let the deal come to you.\n </p>\n </div>\n '})},children:"(More Details)"})]}),(0,r.jsxs)("div",{className:"sw-flex sw-justify-between sw-block-lap sw-m-rl-md sw-align-center",children:[(0,r.jsxs)("span",{className:"sw-w-35P sw-w-45P-lap",children:[(0,r.jsx)("label",{htmlFor:"carInfo",style:{fontSize:"10pt",whiteSpace:"nowrap",display:"block"},children:"Name"}),(0,r.jsx)("input",{style:{fontSize:"16px"},className:"sw-m-tb-0",placeholder:"First & Last Name",value:this.state.priceAlertName,onChange:e=>{let t=e.target.value;E({firstName:t}),this.setState({priceAlertName:t})}})]}),(0,r.jsxs)("span",{className:"sw-w-35P sw-w-45P-lap",children:[(0,r.jsx)("label",{htmlFor:"carInfo",style:{fontSize:"10pt",whiteSpace:"nowrap",display:"block"},children:"Phone Number"}),(0,r.jsx)("input",{style:{fontSize:"16px"},className:"sw-m-tb-0",value:this.state.priceAlertPhone,placeholder:"(123) 456-7890",onChange:e=>{let t=e.target.value;E({phone:t}),this.setState({priceAlertPhone:t})}})]}),(0,r.jsxs)("div",{className:"sw-w-20P sw-m-t-sm sw-block sw-none-lap",children:[this.state.alertSubmitted?(0,r.jsx)("span",{className:"sw--success",children:"Price Alert Set!"}):(0,r.jsx)("button",{style:{backgroundColor:"#007bff"},id:"VDPPriceAlert",onClick:()=>{if(0==this.state.priceAlertName.length||0==this.state.priceAlertPhone.length)return void this.setState({AlertError:"Please fill out all fields"});this.setState({AlertError:"",priceAlertError:""}),this.postLeadPriceAlert()},children:"Price Alert"}),(0,r.jsx)("span",{className:"sw--danger",style:{display:this.state.AlertError?"block":"none"},children:this.state.AlertError})]})]}),(0,r.jsx)("div",{className:"sw-flex sw-justify-center",children:(0,r.jsxs)("div",{className:"sw-w-45P sw-m-t-xsm sw-none sw-block-lap",children:[this.state.alertSubmitted?(0,r.jsx)("span",{className:"sw--success",children:"Price Alert Set!"}):(0,r.jsx)("button",{style:{backgroundColor:"#007bff"},id:"VDPPriceAlertMobile",onClick:()=>{if(0==this.state.priceAlertName.length||0==this.state.priceAlertPhone.length)return void this.setState({AlertError:"Please fill out all fields"});this.setState({AlertError:"",priceAlertError:""}),this.postLeadPriceAlert()},children:"Price Alert"}),(0,r.jsx)("span",{className:"sw--danger",style:{display:this.state.AlertError?"block":"none"},children:this.state.AlertError})]})}),(0,r.jsx)("div",{className:"sw-flex sw-justify-center",children:(0,r.jsx)("span",{className:"sw--danger",style:{display:this.state.priceAlertError?"block":"none"},children:this.state.priceAlertError})}),(0,r.jsx)("div",{className:"sw--center",children:(0,r.jsxs)("details",{className:"sw--center",style:{textAlign:"center"},children:[(0,r.jsx)("summary",{style:{display:"inline-block",fontSize:"10pt",color:"#0A3161",cursor:"pointer"},children:"*By clicking submit you agree to these terms, click here for details:"}),(0,r.jsx)("p",{style:{fontSize:"10pt",color:"#5f5f5f",marginTop:"1px"},children:"The price displayed is for informational purposes only and may not reflect the final sale price. By providing your name, email, and ph
1one number, you consent to receive notifications and other relevant communications. While weâll make every effort to notify you when your selected vehicleâs price drops, notifications are not guaranteed; we may also reach out proactively when a drop is detected. Offers, incentives, and pricing are unique to each of our dealerships and cannot be combined, transferred, or shared between locations. Message frequency varies and message & data rates may apply. Subject to credit approval. See dealer for complete details."})]})})]}),this.state.priceAlertVehicle&&(0,r.jsx)("div",{style:{right:"15px",top:"15px",position:"absolute",width:"120px",height:"90px",borderRadius:"8px",overflow:"hidden",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",backgroundColor:"#fff",justifyContent:"center",alignItems:"center"},className:"sw-m-b-sm sw-m-tb-0 sw-flex sw-none-lap",children:(0,r.jsx)(y(),{src:this.state.priceAlertVehicle.photoURLs?this.state.priceAlertVehicle.photoURLs[0]:"/images/NotAvailable.webp",alt:"".concat(this.state.priceAlertVehicle.year," ").concat(this.state.priceAlertVehicle.make," ").concat(this.state.priceAlertVehicle.model),width:120,height:90})}),(0,r.jsx)("button",{className:"sw-primary sw--center sw-m-auto sw-primary-D-hov sw-transition-swing sw-max-w-150px sw-p-sm",onClick:()=>{this.setState({priceAlertModal:!1})},children:"Close"})]})}),(0,r.jsx)(p.A,{render:this.state.heartButtonSignInModal,callBack:e=>{this.setState({heartButtonSignInModal:e})},className:"sw-m-auto sw-container sw-p-0 sw-align-center",style:{maxWidth:"600px"},BGClose:!1,children:(0,r.jsxs)("div",{className:"sw-p-md sw-p-sm-tablet sw-overflow sw-max-h-400px sw--center",children:[(0,r.jsxs)("div",{className:"sw-flex sw-justify-between sw-w-100P",children:[(0,r.jsx)("h3",{className:"sw--primary sw--size-lg sw--size-md-tablet",children:"Do more with a Free Account"}),(0,r.jsx)("div",{onClick:()=>{this.setState({heartButtonSignInModal:!1})},children:(0,r.jsx)(b(),{className:"sw-pointer sw--gray-L sw--gray-hov sw-transition-swing",path:S.hyP,size:1.33})})]}),(0,r.jsx)("p",{className:"sw-flex sw-flex-start sw--size-sm sw--size-xsm-tablet sw-w-100P sw--gray sw--bold",style:{textAlign:"left"},children:"Create an account in seconds to save your favorite vehicles, compare vehicles, receive personalized recommendations, and unlock more convenient features."}),(0,r.jsx)("a",{href:"/signUp",className:"sw-m-auto sw-flex sw-justify-center sw-align-center sw-max-w-150px",style:{textDecoration:"none"},children:(0,r.jsx)("button",{className:"sw-primary sw-primary-D-hov sw-transition-swing sw-max-w-150px sw-p-sm",children:"Sign Up"})}),(0,r.jsxs)("p",{className:"sw-m-auto sw--size-sm sw-w-100P sw--gray sw--bold sw-m-t-sm",children:["Already have an account? ",(0,r.jsx)("a",{className:"sw-m-l-xsm",href:"/signIn",children:"Sign in"})]})]})}),(0,r.jsx)(p.A,{render:this.state.shopByPaymentDisclaimerModal,callBack:e=>{this.setState({shopByPaymentDisclaimerModal:e})},className:"sw-m-auto sw-container sw-p-0 sw-align-center",style:{maxWidth:"700px"},children:(0,r.jsxs)("div",{className:"sw-p-md sw-p-sm-tablet sw-overflow sw-max-h-400px sw--center",children:[(0,r.jsxs)("div",{className:"sw-flex sw-justify-between sw-w-100P",children:[(0,r.jsx)("h3",{className:"sw--primary sw--size-lg sw--size-md-tablet",children:"Shop By Payment Disclaimer"}),(0,r.jsx)("div",{onClick:()=>{this.setState({shopByPaymentDisclaimerModal:!1})},children:(0,r.jsx)(b(),{className:"sw-pointer sw--gray-L sw--gray-hov sw-transition-swing",path:S.hyP,size:1.33})})]}),(0,r.jsx)("p",{className:"sw-flex sw-flex-start sw--size-xsm-tablet sw-w-100P sw--black",style:{textAlign:"left"},children:"Shop By Payment is a tool to help you estimate payment scenarios. It is not an offer of credit and does not guarantee the exact terms of your loan. We advise understanding the loan terms that align best with your credit and income situation. We strive to provide a range of competitive options and are here to help you navigate through them."}),(0,r.jsx)("p",{className:"sw-flex sw-flex-start sw--size-xsm-tablet sw-w-100P sw--black",style:{textAlign:"left"},children:"The displayed payment is based off of the down payment, and months to pay off that you entered when setting up Shop By Payment. We use an 6.4% APR for the calculation; which may not reflect the actual APR you may receive."}),(0,r.jsx)("p",{className:"sw-flex sw-flex-start sw--size-xsm-tablet sw-w-100P sw--black",style:{textAlign:"left"},children:"See dealer for more details."}),(0,r.jsx)("a",{href:"https://finance.yahoo.com/news/average-car-loan-interest-rates-212521067.html",className:"sw-m-b-sm",children:"Source"}),(0,r.jsx)("button",{className:"sw-primary sw--center sw-m-auto sw-primary-D-hov sw-transition-swing sw-max-w-150px sw-max-w-100px-tablet sw-p-sm",onClick:()=>{this.setState({shopByPaymentDisclaimerModal:!1})},children:"Close"})]})}),(0,r.jsx)(p.A,{render:this.state.leadDisclaimerModal,callBack:e=>
1{this.setState({leadDisclaimerModal:e})},className:"sw-m-auto sw-container sw-p-0 sw-align-center",style:{maxWidth:"1000px"},children:(0,r.jsxs)("div",{className:"sw-p-md sw-p-sm-tablet sw-overflow sw-max-h-500px",children:[(0,r.jsxs)("div",{className:"sw-flex sw-justify-between sw-w-100P",children:[(0,r.jsx)("h3",{className:"sw--primary sw--size-lg sw--size-md-tablet",children:this.state.leadDisclaimerTitle}),(0,r.jsx)("div",{onClick:()=>{this.setState({leadDisclaimerModal:!1})},children:(0,r.jsx)(b(),{className:"sw-pointer sw--gray-L sw--gray-hov sw-transition-swing",path:S.hyP,size:1.33})})]}),(0,r.jsx)("div",{className:"sw-flex sw-flex-wrap sw-justify-around",children:(0,r.jsx)("div",{className:"sw-container",dangerouslySetInnerHTML:{__html:this.state.leadDisclaimerDescription}})}),(0,r.jsx)("button",{className:"sw-primary sw--center sw-m-auto sw-primary-D-hov sw-transition-swing sw-max-w-150px sw-max-w-100px-tablet sw-p-sm",onClick:()=>{this.setState({leadDisclaimerModal:!1})},children:"Close"})]})}),this.state.showCreateProfile&&(0,r.jsxs)("div",{id:"sw-feedback",style:{position:"fixed",bottom:this.state.isMobile?"65px":"10px",left:"10px",backdropFilter:"blur(5px)",...a,background:"radial-gradient(circle at var(--x, 10%) var(--y, 10%), rgba(243,179,50,var(--glow)) 0 10%, transparent 45%), rgba(0,0,0,0.55)",border:"1px solid #bebebe",padding:"10px",borderRadius:"15px",zIndex:1e3,alignItems:"center"},className:"sw-w-350px sw-w-200px-lap",children:[(0,r.jsx)("div",{style:{position:"absolute",top:"3px",right:"5px"},onClick:()=>{this.setState({showCreateProfile:!1})},children:(0,r.jsx)(b(),{className:"sw-pointer sw--white sw--gray-L-hov sw-transition-swing",path:S.hyP,size:1})}),(0,r.jsx)("p",{className:"sw--center sw--bold sw--size-md sw--size-sm-lap",style:{color:"white"},children:"Create an account for a better experience"}),(0,r.jsxs)("div",{className:"sw--center",style:{textAlign:"center"},children:[(0,r.jsx)("button",{className:"sw-w-50P w-h-35px-lap sw-white sw--black sw--size-sm-lap sw--info-hov",style:{margin:"0 auto",display:"block"},onClick:()=>{window.location.href="/signUp"},children:"Sign Up"}),(0,r.jsxs)("a",{href:"/signIn",style:{display:"block"},className:"sw--white sw--info-hov sw-m-t-sm sw--size-sm-lap",children:["Already have an account? "," ",(0,r.jsx)("span",{className:"sw-w-50P w-h-35px-lap sw--center sw--bold sw--size-sm-lap",style:{cursor:"pointer",margin:"0 auto"},children:"Sign In"})]})]})]}),this.state.showIncompleteProfile&&(0,r.jsxs)("div",{id:"sw-feedback",style:{position:"fixed",bottom:"70px",left:"10px",backdropFilter:"blur(5px)",...a,background:"radial-gradient(circle at var(--x, 10%) var(--y, 10%), rgba(243,179,50,var(--glow)) 0 10%, transparent 45%), #00000045",border:"1px solid #bebebe",padding:"10px",borderRadius:"15px",zIndex:1e3,alignItems:"center"},className:"sw-w-350px sw-w-200px-lap",children:[(0,r.jsx)("div",{style:{position:"absolute",top:"3px",right:"5px"},onClick:()=>{this.setState({showIncompleteProfile:!1})},children:(0,r.jsx)(b(),{className:"sw-pointer sw--white sw--gray-L-hov sw-transition-swing",path:S.hyP,size:1.33})}),(0,r.jsxs)("p",{className:"sw--center sw--white sw--bold sw--size-md sw--size-xsm-lap",children:[(0,r.jsx)("span",{className:"sw--size-md sw--size-sm-lap",style:{color:"#ffe702"},children:"Looks like your profile is incomplete."})," Please complete your profile to view personalized recommendations."]}),(0,r.jsx)("div",{className:"sw-flex sw-justify-around",children:(0,r.jsx)("a",{href:"/garage?tab=preferences",style:{textDecoration:"none"},children:(0,r.jsx)("button",{style:{...a,borderRadius:"0px",color:"white",background:"radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243,179,50,var(--glow)) 0 30%, transparent 60%), #007bff"},className:"sw-w-100px",onBlur:e=>{e.currentTarget.style.borderColor="rgba(255,255,255,0.1)"},onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left,r=e.clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.3");let i=e.currentTarget.previousElementSibling,a=e.currentTarget.nextElementSibling;i&&i.style.setProperty("--spill","0.2"),a&&a.style.setProperty("--spill","0.2")},onMouseLeave:e=>{e.currentTarget.style.removeProperty("--x"),e.currentTarget.style.removeProperty("--y"),e.currentTarget.style.setProperty("--glow","0");let t=e.currentTarget.previousElementSibling,s=e.currentTarget.nextElementSibling;t&&t.style.setProperty("--spill","0"),s&&s.style.setProperty("--spill","0")},onTouchStart:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.touches[0].clientX-t.left,r=e.touches[0].clientY-t.top;e.currentTarget.style.setProperty("--x","".concat(s,"px")),e.currentTarget.style.setProperty("--y","".concat(r,"px")),e.currentTarget.style.setProperty("--glow","0.15"),setTimeout(()=>{e.currentTarget.style.removeProperty("--glow")},1e3)},onTouchEnd:e=>{e.currentTarget.style.setProperty("--glow","0")},onTouchCancel:e=>{e.currentTarget.style.setProperty("--glow","0")},children:"Garage"})})})]}),this.state.youtubeVideoCode?(0,r.jsxs)("div",{className:"sw-black sw-z-10 sw-translate-y--75px-phone sw-w-500px sw-h-300px sw-w-250px-phone sw-h-150px-phone",style:{position:"fixed",bottom:"0",left:"0"},children:[(0,r.jsx)("div",{className:"sw-flex sw-justify-end",children:(0,r.jsx)("button",{style:{to
1p:"-30px",right:"-30px",zIndex:"100"},onClick:()=>{this.setState({youtubeVideoCode:""})},className:" sw-m-sm sw-m-0 sw-p-0 sw-position-absolute sw--black sw-round-100P sw-white-T sw-w-40px sw-h-40px sw-flex sw-flex-center",children:(0,r.jsx)(b(),{path:S.hyP,size:1.33})})}),(0,r.jsx)(j.A,{videoId:this.state.youtubeVideoCode})]}):(0,r.jsx)(r.Fragment,{})]})}async getViewsForEachVehicle(){let e=await fetch("https://dms.carumai.io/api/vehicles/statistics/vehicle/views/"),t=await e.json();if(!e.ok)return Promise.reject(t&&t.message||e.statusText);this.setState({webViews:t})}componentDidUpdate(e,t){if(this.props.queryParams!==e.queryParams){let e={};Object.entries({new:["switchNew",!1],used:["switchUsed",!1],certified:["switchCertfied",!1],specials:["switchSpecials",!1],efficient:["switchFuel",!1],minPrice:["priceSliderStart",0],maxPrice:["priceSliderEnd",2e5],minMileage:["mileageSliderStart",0],maxMileage:["mileageSliderEnd",2e5],minMPG:["mpgSliderStart",0],maxMPG:["mpgSliderEnd",100],sortBy:["sortSelect","Default"],page:["currPage",0],SearchQuery:["searchVehicles",""],LocationNum:["selectedLocations",[]],Make:["selectedMakes",[]],Model:["selectedModels",[]],Years:["selectedYears",[]],BodyStyles:["selectedBodyStyles",[]],Features:["selectedFeatures",[]],Trims:["selectedTrims",[]],Trans:["selectedTrans",[]],FuelType:["selectedFuelTypes",[]],Color:["selectedColors",[]],EngineType:["selectedEngineTypes",[]]}).forEach(t=>{let[s,r]=t,[i,a]=r;this.props.queryParams[s]?"currPage"===i?e[i]=parseInt(this.props.queryParams[s]):e[i]=this.props.queryParams[s]:e[i]=a}),this.setState({...e,loading:!0,currPage:0},()=>{this.loadInventory()})}}async updateInterrupters(){this.setState({interrupters:[]});let e=[],t=this.state.selectedMakes.map(e=>e.toLowerCase()),s=this.state.selectedModels.map(e=>e.toLowerCase()),r=this.state.selectedTrims.map(e=>e.toLowerCase()),i=this.state.selectedYears.map(e=>e.toLowerCase()),a=this.state.selectedTrans.map(e=>e.toLowerCase()),l=this.state.selectedBodyStyles.map(e=>e.toLowerCase()),o=this.state.selectedLocations.map(e=>e.toLowerCase()),n=this.state.allIncentiveVideos||[],c=n.filter(e=>"T"===e.storeCode),d=n.filter(e=>"N"===e.storeCode),p=n.filter(e=>"MB"===e.storeCode),h=n.filter(e=>"H"===e.storeCode),u=n.filter(e=>"C"===e.storeCode),y=n.filter(e=>"F"===e.storeCode),g=this.state.searchVehicles,w=[];0===t.length&&0===s.length&&0===r.length&&0===i.length&&0===a.length&&0===l.length&&0===g.length?(0===c.length&&w.push({title:"",subtitle:"Come Visit Us at Stephen Wade Toyota on Auto Mall Drive!",imageUrl:"",linkURl:"https://www.stephenwadetoyota.com/",youtubeVideoCode:"YFtD9OExM4g",buttonText:"",location:"T"}),0===d.length&&w.push({title:"",subtitle:"Come Visit Us At Stephen Wade Nissan on Auto Mall Drive!",imageUrl:"",linkURl:"https://www.stephenwadenissan.com/",youtubeVideoCode:"Ho6w07reIas",buttonText:"",location:"N"}),0===p.length&&w.push({title:"",subtitle:"Explore the Mercedes-Benz of St. George dealership",imageUrl:"",linkURl:"https://www.mbstgeorge.com/",youtubeVideoCode:"rUC5nPHu204",buttonText:"",location:"MB"}),0===h.length&&w.push({title:"",subtitle:"Come Visit Us at Stephen Wade Honda Mazda on Auto Mall Drive!",imageUrl:"",linkURl:"https://www.stephenwadehonda.com/",youtubeVideoCode:"wXH1OOpjGZo",buttonText:"",location:"H"}),0===u.length&&w.push({title:"",subtitle:" Take a Walk Thought the Stephen Wade Chevrolet Cadillac Dealership!",imageUrl:"",linkURl:"https://www.stephenwadechevrolet.com/",youtubeVideoCode:"cn5yGZqjH0Q",buttonText:"",location:"C"}),0===y.length&&w.push({title:"",subtitle:" Take a trip through the Stephen Wade Chrysler Jeep Dodge Ram dealership!",imageUrl:"",linkURl:"https://www.stephenwadechryslerdodgejeep.com/",youtubeVideoCode:"9Wi6xIeRgn4",buttonText:"",location:"F"}
1),n.forEach(t=>{e.push({title:"",subtitle:t.videoText,imageUrl:"",linkURl:t.link,youtubeVideoCode:t.link.split("v=")[1],buttonText:"",location:t.storeCode})})):n.forEach(i=>{(t.includes(i.make[0])||s.includes(i.model[0])||r.includes(i.trim[0])||o.includes(i.storeCode))&&e.push({title:"",subtitle:i.videoText,imageUrl:"",linkURl:i.link,youtubeVideoCode:i.link.split("v=")[1],buttonText:"",location:i.storeCode})}),this.setState({interrupters:[...w,...e]})}async componentDidMount(){await this.updateInterrupters();let e="true"===window.localStorage.getItem("reviewSubmitted");this.setState({hasReviewed:e}),e||setTimeout(()=>{this.setState({feedbackVisible:!0}),setTimeout(()=>{this.setState({feedbackVisible:!1})},6e4)},1e3);let t=n().get(null).token;this.setState({isClient:!0}),this.setState({isMobile:window.innerWidth<=768});try{window.addEventListener("scroll",this.handleScroll);let e=await fetch("/api/filters/features",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,trim:this.state.selectedTrims,year:this.state.selectedYears,trans:this.state.selectedTrans,fuel:this.state.selectedFuelTypes,body:this.state.selectedBodyStyles,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),r=await e.json();this.setState({filterFeatures:r});let i=[],a=[];if(this.state.user){let[e,r]=await Promise.all([this.state.user?fetch("/api/users/userPreferences",{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t}}):null,this.state.user?fetch("/api/users/recommendedVehicles",{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t}}):null]);if(r&&r.ok&&(a=(a=(a=await r.json()).exactMatches).map(e=>({...e,PhotoURLs:e.PhotoURLs.split(",")}))),e&&e.ok){var s;let t=await e.json(),r=await (s=t.monthlyPayment,new Promise(e=>{try{let t=JSON.parse(s);if(!Array.isArray(t))return void e([]);for(let s of t)if("string"!=typeof s)return void e([]);e(t)}catch(t){e([])}}));if(2===r.length){let[e,s]=r;this.setState({shopByPaymentAvailable:!0,shopByPaymentRangeMax:parseInt(s),shopByPaymentRangeMin:parseInt(e),shopByPaymentDownPayment:"Not Specified"===t.downPayment?0:t.downPayment,shopByPaymentMonthsToPayoff:"Not Specified"===t.monthsToPayOff?0:t.monthsToPayOff})}}"favoriteVehicles"in this.state.user&&this.setState({favoriteVehicles:JSON.parse(this.state.user.favoriteVehicles),showGarageButton:!0}),"comparedVehicles"in this.state.user&&this.setState({compareVehicles:JSON.parse(this.state.user.comparedVehicles),showGarageButton:!0}),a.forEach(M)}let l=await fetch("/api/users/recentlyViewedVehicleUniversal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({stockNumbers:(0,P.e)()})});(i=await l.json()).sort((e,t)=>{let s=(0,P.e)().indexOf(e.StockNumber),r=(0,P.e)().indexOf(t.StockNumber);return s-r}),i.forEach(e=>{e.PhotoURLs=e.PhotoURLs.split(","),e.PhotoURLs.forEach((t,s)=>{t.includes("640x480")&&(e.PhotoURLs[s]=t.replace("640x480","1280x720"))})}),this.getViewsForEachVehicle(),i.forEach(M),this.state.user?0==a.length&&setTimeout(()=>{this.setState({showIncompleteProfile:!0}),setTimeout(()=>{this.setState({showIncompleteProfile:!1})},6e4)},1e4):setTimeout(()=>{this.setState({showCreateProfile:!0}),setTimeout(()=>{this.setState({showCreateProfile:!1})},6e4)},3e4),this.setState({recentlyViewedVehicles:i,recommendedVehicles:a,displayIncompleteProfile:0==a.length,showRmlDivBlock:!0})}catch(e){console.log(e)}}setURLParams(){this.setState({allFilters:[]},()=>{let e=[],t="?";""!==this.state.searchVehicles&&(t+="SearchQuery="+this.state.searchVehicles+"&",e.push(this.state.searchVehicles),this.setState({filtering:!0})),this.state.currPage>0&&(t+="page="+this.state.currPage+"&"),this.state.selectedLocations.length>0&&(this.state.selectedLocations.forEach(t=>{this.state.allFilters.includes(t)||e.push(t)}),t+="Location="+encodeURIComponent(JSON.stringify(this.state.selectedLocations))+"&"),this.state.selectedMakes.length>
10&&(this.state.selectedMakes.forEach(t=>{this.state.allFilters.includes(t)||e.push(t)}),t+="Make="+encodeURIComponent(JSON.stringify(this.state.selectedMakes))+"&"),this.state.selectedModels.length>0&&(this.state.selectedModels.forEach(t=>{this.state.allFilters.includes(t)||e.push(t)}),t+="Model="+encodeURIComponent(JSON.stringify(this.state.selectedModels))+"&"),this.state.selectedYears.length>0&&(this.state.selectedYears.forEach(t=>{this.state.allFilters.includes(t)||e.push(t)}),t+="Years="+encodeURIComponent(JSON.stringify(this.state.selectedYears))+"&"),this.state.selectedTrims.length>0&&(this.state.selectedTrims.forEach(t=>{this.state.allFilters.includes(t)||e.push(t)}),t+="Trims="+encodeURIComponent(JSON.stringify(this.state.selectedTrims))+"&"),this.state.selectedBodyStyles.length>0&&(this.state.selectedBodyStyles.forEach(t=>{this.state.allFilters.includes(t)||e.push(t)}),t+="BodyStyles="+encodeURIComponent(JSON.stringify(this.state.selectedBodyStyles))+"&"),this.state.selectedTrans.length>0&&(this.state.selectedTrans.forEach(t=>{this.state.allFilters.includes(t)||e.push(t)}),t+="Trans="+encodeURIComponent(JSON.stringify(this.state.selectedTrans))+"&"),this.state.selectedFeatures.length>0&&(this.state.selectedFeatures.forEach(t=>{this.state.allFilters.includes(t)||e.push(t)}),t+="Features="+encodeURIComponent(JSON.stringify(this.state.selectedFeatures))+"&"),this.state.selectedFuelTypes.length>0&&(this.state.selectedFuelTypes.forEach(t=>{this.state.allFilters.includes(t)||e.push(t)}),t+="FuelType="+encodeURIComponent(JSON.stringify(this.state.selectedFuelTypes))+"&"),this.state.selectedColors.length>0&&(this.state.selectedColors.forEach(t=>{this.state.allFilters.includes(t)||e.push(t)}),t+="Color="+encodeURIComponent(JSON.stringify(this.state.selectedColors))+"&"),this.state.selectedEngineTypes.length>0&&(this.state.selectedEngineTypes.forEach(t=>{this.state.allFilters.includes(t)||e.push(t)}),t+="EngineType="+encodeURIComponent(JSON.stringify(this.state.selectedEngineTypes))+"&"),this.state.priceSliderStart>0&&(e.push("Min Price: $"+this.state.priceSliderStart.toLocaleString()),t+="minPrice="+encodeURIComponent(this.state.priceSliderStart)+"&"),this.state.priceSliderEnd<2e5&&(e.push("Max Price: $"+this.state.priceSliderEnd.toLocaleString()),t+="maxPrice="+encodeURIComponent(this.state.priceSliderEnd)+"&"),this.state.mileageSliderStart>0&&(e.push("Min Mileage: "+this.state.mileageSliderStart.toLocaleString()+" miles"),t+="minMileage="+encodeURIComponent(this.state.mileageSliderStart)+"&"),this.state.mileageSliderEnd<2e5&&(e.push("Max Mileage: "+this.state.mileageSliderEnd.toLocaleString()+" miles"),t+="maxMileage="+encodeURIComponent(this.state.mileageSliderEnd)+"&"),this.state.mpgSliderStart>0&&(e.push("Min MPG: "+this.state.mpgSliderStart.toLocaleString()),t+="minMPG="+encodeURIComponent(this.state.mpgSliderStart)+"&"),this.state.mpgSliderEnd<100&&(e.push("Max MPG: "+this.state.mpgSliderEnd.toLocaleString()),t+="maxMPG="+encodeURIComponent(this.state.mpgSliderEnd)+"&"),this.state.switchCertfied&&(e.push("Certified Switch"),t+="certified=true&"),"Default"!=this.state.sortSelect&&(t+="sortBy="+encodeURIComponent(this.state.sortSelect)+"&"),this.state.switchNew&&(e.push("New Switch"),t+="new=true&"),this.state.switchUsed&&(e.push("Used Switch"),t+="used=true&"),this.state.switchFuel&&(e.push("Fuel Efficient Switch"),t+="efficient=true&"),this.state.switchSpecials&&(e.push("Specials Switch"),t+="specials=true&"),"?"!=t?this.setState({filtering:!0}):this.setState({filtering:!1}),this.setState({allFilters:e}),window.history.replaceState(null,null,t)})}async postLeadPriceAlert(){let e=await fetch("/api/leads/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({leadBucketId:"7684fe01-9589-45de-9cbb-7ec02e615923",FirstName:this.state.priceAlertName,LastName:"None",PhoneNumber:this.state.priceAlertPhone,Email:"[email protected]",VehicleNu:this.state.priceAlertVehicle.nu,VehicleYear:this.state.priceAlertVehicle.year,VehicleMake:this.state.priceAlertVehicle.make,VehicleModel:this.state.priceAlertVehicle.model,VehicleVIN:this.state.priceAlertVehicle.VIN,VehicleStockNum:this.state.priceAlertVehicle.StockNumber,OriginalPrice
1:this.state.priceAlertVehicle.AskingPrice.toLocaleString(),OfferPrice:this.state.priceAlertVehicle.AskingPrice.toLocaleString(),StoreCode:this.state.priceAlertStoreCode})});(await e.json()).error?console.error("Post lead error"):((0,N.c)("srp_price_alert"),this.postCRMLeadPriceAlert(),this.confirmationTextPriceAlert(),this.setState({thankYouPriceAlert:!0,alertSubmitted:!0,AlertError:""}))}sendText(e){fetch("https://crm.carumai.io/api/swacRoutes/sendSMS",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phoneNumbers:["+1".concat(this.state.priceAlertPhone)],message:e})}).then(e=>{console.log(e)}).catch(e=>{console.log(e)})}async postReview(){let e=await fetch("/api/leads/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({leadBucketId:"5b28f366-b0fc-4f41-911f-6cc60162b3ad",FirstName:"None",LastName:"None",PhoneNumber:"0000000000",Email:"[email protected]",VehicleNu:null,VehicleYear:null,VehicleMake:null,VehicleModel:null,VehicleVIN:null,VehicleStockNum:null,OriginalPrice:null,StoreCode:null})});(await e.json()).error?console.error("Post lead error"):(this.sendEmail(" [email protected], [email protected]",'A User has given the SRP a "'.concat(this.state.customerReview,'" review.'),"SRP Review"),this.setState({reviewSubmitted:!0}),window.localStorage.setItem("reviewSubmitted","true"))}async postFeedBack(){let e=await fetch("/api/leads/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({leadBucketId:"5b28f366-b0fc-4f41-911f-6cc60162b3ad",FirstName:"None",LastName:"None",PhoneNumber:"0000000000",Email:"[email protected]",VehicleNu:null,VehicleYear:null,VehicleMake:null,VehicleModel:null,VehicleVIN:null,VehicleStockNum:null,OriginalPrice:null,StoreCode:null})});(await e.json()).error?console.error("Post lead error"):(this.sendEmail(" [email protected], [email protected]",'A User has given the SRP a "'.concat(this.state.customerFeedback,'" review.'),"SRP Feedback"),this.setState({feedbackVisible:!1,hasReviewed:!0}),window.localStorage.setItem("reviewSubmitted","true"),alert("Thank you for your feedback!"))}constructor(e){super(e),this.scrollY=0,this.handleHoverMove=e=>{let t=e.currentTarget,{left:s,top:r}=t.getBoundingClientRect(),i=e.clientX-s,a=e.clientY-r;t.style.setProperty("--x","".concat(i,"px")),t.style.setProperty("--y","".concat(a,"px")),t.style.setProperty("--glow","0.15"),[t.previousElementSibling,t.nextElementSibling].forEach(e=>{e instanceof HTMLElement&&e.style.setProperty("--spill","0.2")})},this.handleHoverLeave=e=>{let t=e.currentTarget;t.style.removeProperty("--x"),t.style.removeProperty("--y"),t.style.setProperty("--glow","0"),[t.previousElementSibling,t.nextElementSibling].forEach(e=>{e instanceof HTMLElement&&e.style.setProperty("--spill","0")})},this.handleScroll=()=>{window.scrollY>0&&!this.state.showScrollToTopButton?this.setState({showScrollToTopButton:!0}):0===window.scrollY&&this.state.showScrollToTopButton&&this.setState({showScrollToTopButton:!1})},this.loadInventory=async()=>{await this.updateInterrupters(),this.setURLParams();try{let e=await fetch("/api/srp/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({newVehicle:this.state.switchNew,used:this.state.switchUsed,location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,year:this.state.selectedYears,trim:this.state.selectedTrims,trans:this.state.selectedTrans,body:this.state.selectedBodyStyles,fuel:this.state.selectedFuelTypes,feature:this.state.selectedFeatures,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:!!this.state.switchCertfied,special:!!this.state.switchSpecials,minPrice:this.state.priceSliderStart?this.state.priceSliderStart:0,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,search:this.state.searchVehicles,start:20*this.state.currPage,end:20*this.state.currPage+20,fuelEfficient:!!this.state.switchFuel,priceMode:this.state.selectedTab})}),t=await e.json();t.inventory=t.inventory.map(e=>
1(""!==e.photoURLs.trim()||0!==e.photoURLs.length?(e.photoURLs=e.photoURLs.split(","),e.isPhotoed&&(e.photoURLs[0]="https://cdn.carumai.com/".concat(e.VIN,"/cover-photo-large.jpg"))):e.photoURLs=e.photoURLs.split(","),e)),t.inventory=t.inventory.map(e=>({...e,Link:"/vehicle?sid=".concat(e.stockNumber)})),t.inventory.forEach(F),await this.loadFeatures(),this.setState({inventory:t.inventory,loading:!1,totalInventory:t.inventoryCount,displayStart:20*this.state.currPage+1,displayEnd:20*this.state.currPage+20>t.inventoryCount?t.inventoryCount:20*this.state.currPage+20},()=>{this.state.selectedTab})}catch(e){console.error(e)}},this.loadFeatures=async()=>{try{let e=await fetch("/api/filters/features",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:this.state.selectedLocations,make:this.state.selectedMakes,model:this.state.selectedModels,trim:this.state.selectedTrims,year:this.state.selectedYears,trans:this.state.selectedTrans,fuel:this.state.selectedFuelTypes,body:this.state.selectedBodyStyles,color:this.state.selectedColors,engine:this.state.selectedEngineTypes,orderBy:this.state.sortSelect,certified:this.state.switchCertfied,special:this.state.switchSpecials,minPrice:this.state.priceSliderStart,maxPrice:this.state.priceSliderEnd,minMileage:this.state.mileageSliderStart,maxMileage:this.state.mileageSliderEnd,minMPG:this.state.mpgSliderStart,maxMPG:this.state.mpgSliderEnd,newVehicle:this.state.switchNew,used:this.state.switchUsed,search:this.state.searchVehicles,fuelEfficient:!!this.state.switchFuel})}),t=await e.json();this.setState({filterFeatures:t})}catch(e){console.log(e)}},this.postCRMLeadPriceAlert=()=>{"H"==this.state.priceAlertStoreCode||"M"==this.state.priceAlertStoreCode||"N"==this.state.priceAlertStoreCode||"C"==this.state.priceAlertStoreCode||"T"==this.state.priceAlertStoreCode||"MB"==this.state.priceAlertStoreCode||"BB"==this.state.priceAlertStoreCode||this.state.priceAlertStoreCode,this.sendEmail("[email protected], [email protected]","".concat(this.state.priceAlertName," has an alert for $").concat(Number(this.state.priceAlertVehicle.AskingPrice).toLocaleString()," on the ").concat(this.state.priceAlertVehicle.year," ").concat(this.state.priceAlertVehicle.make," ").concat(this.state.priceAlertVehicle.model," listed at $").concat(Number(this.state.priceAlertVehicle.AskingPrice).toLocaleString(),". Stock number is ").concat(this.state.priceAlertVehicle.StockNumber,". Their phone number is ").concat(this.state.priceAlertPhone,"."),"SRP - Price Alert on the ".concat(this.state.priceAlertVehicle.year," ").concat(this.state.priceAlertVehicle.make," ").concat(this.state.priceAlertVehicle.model))},this.confirmationTextPriceAlert=()=>{let e="";"H"==this.state.priceAlertStoreCode||"M"==this.state.priceAlertStoreCode?e="Stephen Wade Honda":"C"==this.state.priceAlertStoreCode?e="Stephen Wade Chevrolet Cadillac":"N"==this.state.priceAlertStoreCode?e="Stephen Wade Nissan":"MB"==this.state.priceAlertStoreCode?e="Mercedes-Benz of St. George":"F"==this.state.priceAlertStoreCode?e="Stephen Wade CJDR":"T"==this.state.priceAlertStoreCode&&(e="Stephen Wade Toyota");let t="Hello from ".concat(e,"! \uD83C\uDF89 Your price alert for the ").concat(this.state.priceAlertVehicle.year," ").concat(this.state.priceAlertVehicle.make," ").concat(this.state.priceAlertVehicle.model," is now active. Weâll text you when it drops in price. Reply STOP to cancel. Msg&data rates may apply.");this.sendText(t)},this.sendEmail=(e,t,s)=>fetch("https://crm.carumai.io/api/swacRoutes/sendEmail",{method:"POST",body:JSON.stringify({to:[e],cc:[],bcc:[],subject:s,content:t,useHTML:"true"}),headers:{"Content-Type":"application/json"}}),this.mLazyLoadingTrigger=i.createRef(),this.state={inventory:e.inventory?e.inventory:[],totalInventory:e.totalInventory?e.totalInventory:0,displayStart:e.displayStart?e.displayStart:0,displayEnd:e.displayEnd?e.displayEnd:0,loading:!1,currPage:this.props.queryParams.page?parseInt(this.props.queryParams.page):0,filtering:!!this.props.filtering&&this.props.filtering,user:this.props.user,webViews:[],shopByPaymentAvailable:!1,shopByPaymentRangeMin:0,shopByPaymentRangeMax:0,shopByPaymentDownPayment:0,shopByPaymentMonthsToPayoff:0,favoriteVehicles:[],compareVehicles:[],limitedDeals:this.props.limitedDeals?this.props.limitedDeals:[],recentlyViewedVehicles:[],recommendedVehicles:[],isMobile:!1,hoveringCarousel:!1,hoveringIndex:0,youtubeVideoCode:"",showScrollToTopButton:!1,showGarageButton:!1,loadingNextPage:!1,botNavDisplay:0,displayIncompleteProfile:!1,showRmlDivBlock:!1,isClient:!1,locationDropdownOpen:!1,loadingLocations:!1,modelDropdownOpen:!1,loadingModels:!1,yearDropdownOpen:!1,loadingYears:!1,bodyStyleDropdownOpen:!1,loadingBodyStyles:!1,featureDropdownOpen:!1,loadingFeatures:!1,makeDropdownOpen:!1,loadingMakes:!1,trimDropdownOpen:!1,loadingTrims:!1,transDropdownOpen:!1,loadingTrans:!1,fuelDropdownOpen:!1,loadingFuelTypes:!1,colorDropdownOpen:!1,loadingColors:!1,engineDropdownOpen:!1,loadingEngineTypes:!1,mileageDropdown:!0,loadingMileage:!1,mpgDropdown:!0,loadingMPG:!1,selectedTab:"cash",showCreateProfile:!1,filterLocations:[],filterMakes:[{Make:"",Count:0}],filterModels:[{Model:"",Count:0}],filterYears:[{Year:"",Count:0}],filterTrims:[{Trim:"",Count:0}],filterTrans:[{Trans:"",Count:0}],filterBodyStyles:[{BodyStyle:"",Count:0}],filterFuelTypes:[{FuelType:"",Count:0}],filterEngineTypes:[{EngineType:"",Count:0}],filterFeatures:[{Feature:"",Count:0}],filterColors:[{Color:"",Count:0}],priceSliderStart:this.props.queryParams.minPrice?this.props.queryParams.minPrice:0,priceSliderEnd:this.props.queryParams.maxPrice?this.props.queryParams.maxPrice:2e5,mileageSliderStart:this.props.queryParams.minMileage?this.props.queryParams.minMileage:0,mileageSliderEnd:this.props.queryParams.maxMileage?this.props.queryParams.maxMileage:2e5,mpgSliderStart:this.props.queryParams.minMPG?this.props.queryParams.minMPG:0,mpgSliderEnd:this.props.queryParams.maxMPG?this.props.queryParams.maxMPG:100,sortSelect:this.props.queryParams.sortBy?this.props.queryParams.sortBy:"Default",switchNew:!!this.props.queryParams.new,switchUsed:!!this.props.queryParams.used,switchCertfied:!!this.props.queryParams.certified,switchSpecials:!!this.props.queryParams.specials,switchFuel:!!this.props.queryParams.efficient,switch25:"25000"===this.props.queryParams.maxPrice,allFilters:this.props.filterList?this.props.filterList:[],selectedLocations:this.props.queryParams.Location?this.props.queryParams.Location:[],selectedMakes:this.props.queryParams.Make?this.props.queryParams.Make:[],selectedModels:this.props.queryParams.Model?this.props.queryParams.Model:[],selectedYears:this.props.queryParams.Year?this.props.queryParams.Year:[],selectedTrims:this.props.queryParams.Trims?this.props.queryParams.Trims:[],selectedTrans:this.props.queryParams.Trans?this.props.queryParams.Trans:[],selectedBodyStyles:this.props.queryParams.BodyStyles?this.props.queryParams.BodyStyles:[],selectedFuelTypes:this.props.queryParams.FuelType?this.props.queryParams.FuelType:[],selectedFeatures:this.props.queryParams.Features?this.props.queryParams.Features:[],selectedColors:this.props.queryParams.Color?this.props.queryParams.Color:[],selectedEngineTypes:this.props.queryParams.EngineType?this.props.queryParams.EngineType:[],priceRangeModal:!1,mileageModal:!1,mpgModal:!1,locationModal:!1,makeModal:!1,modelModal:!1,yearModal:!1,bodyStyleModal:!1,featureModal:!1,trimModal:!1,transmissionModal:!1,fuelTypeModal:!1,colorMod
1al:!1,engineModal:!1,heartButtonSignInModal:!1,shopByPaymentDisclaimerModal:!1,readMoreModal:!1,priceAlertModal:!1,leadDisclaimerModal:!1,leadDisclaimerTitle:"",leadDisclaimerDisclaimer:"",leadDisclaimerDescription:"",searchLocations:"",searchMakes:"",searchModels:"",searchYears:"",searchTrims:"",searchTrans:"",searchBodyStyles:"",searchFuelTypes:"",searchEngineTypes:"",searchFeatures:"",searchColors:"",searchVehicles:this.props.queryParams.SearchQuery?this.props.queryParams.SearchQuery:"",priceAlertNum:"",priceAlertPhone:"",AlertError:"",thankYouPriceAlert:!1,alertSubmitted:!1,priceAlertError:"",priceAlertName:"",priceAlertStoreCode:"",priceAlertVehicle:null,allIncentiveVideos:this.props.allIncentiveVideos?this.props.allIncentiveVideos:[],interrupters:[],showIncompleteProfile:!1,displayNoFilters:!1,customerReview:"",customerFeedback:"",hasReviewed:!1,feedbackVisible:!1,reviewOpen:!1,reviewSubmitted:!1,customerFeedbackError:""}}}function M(e){let t;switch(e.Location){case"C":t="Cadillac"===e.make&&"New"===e.nu?"https://www.stephenwadecadillac.com/inventory/":"New"===e.nu?"https://www.stephenwadechevrolet.com/inventory/":"/vehicle?sid=";break;case"N":t="New"===e.nu?"https://www.stephenwadenissan.com/inventory/":"/vehicle?sid=";break;case"F":t="New"===e.nu?"https://www.stephenwadechryslerdodgejeep.com/inventory/":"/vehicle?sid=";break;default:t="/vehicle?sid="}e.Link=t+(t.startsWith("/")?e.stockNumber||e.StockNumber:e.VIN+"/")}function E(e){let t={...function(){try{return JSON.parse(localStorage.getItem("userInfo")||"{}")}catch(e){return{}}}(),...e};localStorage.setItem("userInfo",JSON.stringify(t))}function F(e){let t;switch(e.Location){case"C":t="Cadillac"===e.make&&"New"===e.nu?"https://www.stephenwadecadillac.com/inventory/":"New"===e.nu?"https://www.stephenwadechevrolet.com/inventory/":"/vehicle?sid=";break;case"N":t="New"===e.nu?"https://www.stephenwadenissan.com/inventory/":"/vehicle?sid=";break;case"F":t="New"===e.nu?"https://www.stephenwadechryslerdodgejeep.com/inventory/":"/vehicle?sid=";break;default:t="/vehicle?sid="}e.Link=t+(t.startsWith("/")?e.stockNumber+"&vehicle="+e.nu+"-"+e.year+"-"+e.make+"-"+e.model+"-"+e.Series+"-for-sale-st-george":e.VIN)}var L=!0;let B=D},99606:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var r=s(37876),i=s(14232),a=s(10284),l=s.n(a),o=s(72193);class n extends i.Component{render(){let{totalInventory:e,currPage:t,itemsPerPage:s,onPageChange:i,className:a}=this.props,n=Math.ceil(e/s),c=t>0,d=t+1<n;return(0,r.jsx)("div",{className:"sw-flex sw-justify-center sw-align-center sw-m-t-md ".concat(a),children:(0,r.jsxs)("div",{className:"sw-flex sw-rounded",children:[(0,r.jsxs)("button",{"aria-label":"First page",className:"sw-p-sm sw-p-xsm-tablet sw-flex sw-justify-center sw-align-center sw-border-r sw-border-gray-300 sw-transition-all ".concat(c?"sw-primary":"sw-primary sw-opacity-80P sw-cursor-none"),disabled:!c,onClick:()=>i(0),children:[(0,r.jsx)(l(),{path:o.wGg,size:.8,className:"sw-mr-sm"})," ",(0,r.jsx)("span",{className:"sw-none-tablet",children:"First"})]}),(0,r.jsxs)("button",{"aria-label":"Previous page",className:"sw-p-sm sw-p-xsm-tablet sw-flex sw-justify-center sw-align-center sw-border-r sw-border-gray-300 sw-transition-all ".concat(c?"sw-primary":"sw-primary sw-opacity-80P sw-cursor-none"),disabled:!c,onClick:()=>i(t-1),children:[(0,r.jsx)(l(),{path:o.LyG,size:.8,className:"sw-mr-sm"})," ",(0,r.jsx)("span",{className:"sw-none-tablet",children:"Prev"})]}),this.getPageNumbers().map(e=>(0,r.jsx)("button",{"aria-label":"Page ".concat(e+1),className:"sw-p-sm sw-p-xsm-tablet sw-min-w-40px sw-flex sw-justify-center sw-align-center sw-border-r sw-border-gray-300 ".concat(e===t?"sw-accent":"sw-primary"),onClick:()=>i(e),children:e+1},e)),(0,r.jsxs)("button",{"aria-label":"next page",className:"sw-p-sm sw-p-xsm-tablet sw-flex sw-justify-center sw-align-center sw-border-r sw-border-gray-300 sw-transition-all ".concat(d?"sw-primary":"sw-primary sw-opacity-80P sw-cursor-none"),disabled:!d,onClick:()=>i(t+1),children:[(0,r.jsx)("span",{className:"sw-none-tablet",children:"Next "}),(0,r.jsx)(l(),{path:o.mI8,size:.8,className:"sw-ml-sm"})]}),(0,r.jsxs)("button",{"aria-label":"last page",className:"sw-p-sm sw-p-xsm-tablet sw-flex sw-justify-center sw-align-center sw-transition-all ".concat(d?"sw-primary":"sw-primary sw-opacity-80P sw-cursor-none"),disabled:!d,onClick:()=>i(n-1),children:[(0,r.jsx)("span",{className:"sw-none-tablet",children:"Last "}),(0,r.jsx)(l(),{path:o.wfX,size:.8,className:"sw-ml-sm"})]})]})})}constructor(...e){super(...e),this.getPageNumbers=()=>{let{totalInventory:e,currPage:t,itemsPerPage:s}=this.props,r=[],i=Math.max(0,t-2),a=Math.min(i+4,Math.ceil(e/s)-1);a-i<4&&(i=Math.max(0,a-4));for(let e=i;e<=a;e++)r.push(e);return r}}}n.defaultProps={itemsPerPage:20,className:"",style:{}};let c=n}},e=>{e.O(0,[147,4829,636,6593,8792],()=>e(e.s=42548)),_N_E=e.O()}]);
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.