(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7264,1586],{57511:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/search/[...slug]",function(){return a(42913)}])},9730:function(e,t,a){"use strict";var n=a(85893),i=a(67294),r=a(69018),s=a(5135),l=a(44464),o=a(26834),c=a(82280),d=a(65080),u=a(69267),m=a(73747),h=a(49649),x=a(33481),p=a.n(x);t.Z=e=>{let{defaultValue:t,car:a}=e,[x,v]=(0,i.useState)({amount:t>0?t:3e4,term:"Angle"===r.default.finance_provider||h.Zkx||h.E6n?5:h.SL0?5:6,interest:o.Z.finance.financeCalculatorDefaultInterestRate}),[f,b]=(0,i.useState)({name:(r.default.finance_provider,"week"),value:(r.default.finance_provider,52)}),[g,w]=(0,i.useState)(!1),y=()=>{g||(w(!0),(0,c._c)({eventId:26}))},j=e=>{v({...x,[e.target.name]:e.target.value}),y()};return(0,n.jsxs)("div",{className:"py-0 px-1 px-md-2",children:[(0,n.jsxs)("div",{className:(0,m.cn)(p().StyledSlider," mt-0 mt-md-2",h.$NU&&"text-dark"),color:"#black",children:[(0,n.jsxs)("div",{className:p().Value,children:[(0,n.jsx)("span",{children:"Loan Amount: "}),(0,n.jsx)("span",{children:(0,d.j3)(parseInt(x.amount))})]}),(0,n.jsx)("input",{type:"range",name:"amount",min:"Angle"===r.default.finance_provider?5e3:1e3,max:h.Bu&&a.price>1e5?1.05*a.price:1e5,step:500,value:x.amount,className:p().FinanceCalcSlider,onChange:j})]}),(0,n.jsxs)("div",{className:(0,m.cn)(p().StyledSlider,h.$NU&&"text-dark"),color:"#black",children:[(0,n.jsxs)("div",{className:p().Value,children:[(0,n.jsx)("span",{children:"Loan Term: "}),(0,n.jsxs)("span",{children:[x.term," years"]})]}),(0,n.jsx)("input",{type:"range",name:"term",min:1,max:h.SL0?5:7,step:.5,value:x.term,className:p().FinanceCalcSlider,onChange:j})]}),(0,n.jsxs)("div",{className:(0,m.cn)(p().StyledSlider,h.$NU&&"text-dark"),color:"#black",children:[(0,n.jsxs)("div",{className:p().Value,children:[(0,n.jsx)("span",{children:"Loan Interest: "}),(0,n.jsxs)("span",{children:[x.interest,"%"]})]}),(0,n.jsx)("input",{type:"range",name:"interest",min:"Angle"===r.default.finance_provider?h.Zkx?1:7.5:h.SL0?9.95:.5,max:"Angle"===r.default.finance_provider?14.5:h.SL0?19.95:15,step:.5,value:x.interest,className:p().FinanceCalcSlider,onChange:j})]}),(0,n.jsx)("div",{className:(0,m.cn)(p().SelectWrapper,"Angle"===r.default.finance_provider?"d-none":"d-block"),children:(0,n.jsxs)("select",{className:p().CustomSelect,onChange:e=>{let t=e.target.value;b({name:e.target.options[e.target.selectedIndex].dataset.frequencyName,value:t}),y()},children:[(0,n.jsx)("option",{"data-frequency-name":"week",value:"52",children:"Weekly"}),(0,n.jsx)("option",{"data-frequency-name":"fortnight",value:"26",children:"Fortnightly"}),(0,n.jsx)("option",{"data-frequency-name":"month",value:"12",children:"Monthly"})]})}),(0,n.jsx)("div",{children:(0,n.jsxs)("div",{style:{color:h.$NU?"text-dark":"var(--finance-calc-text-color)"},className:"h4 text-center",children:[(()=>{let e=x.amount,t=x.interest/100/f.value,a=Math.pow(1+t,x.term*f.value);return(0,d.j3)(e*a*t/(a-1))})(),o.Z.finance.calculatorPerWeekString?o.Z.finance.calculatorPerWeekString:" per"," ",f.name,"*"]})}),(0,n.jsx)(u.Z,{href:a?(0,s.Bq)(a):"/finance",className:"btn btn-primary btn-lg btn-block my-3",children:"Apply for Finance"}),h.YPY?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h5",{children:"Calculator Disclaimer"}),(0,n.jsx)("p",{className:"small text-muted m-0",children:l.wQ})]}):(0,n.jsx)("p",{className:"small text-muted text-center m-0",children:l.CC})]})}},89302:function(e,t,a){"use strict";a.d(t,{$s:function(){return v},P8:function(){return w},QC:function(){return f},YJ:function(){return b},ij:function(){return g},q4:function(){return p}});var n=a(85893),i=a(67294),r=a(69018),s=a(95495),l=a(31109),o=a(26834),c=a(38766),d=a(82280),u=a(56573),m=a(49649),h=a(5135);let x=r.default.slug+"-ViewCar";(0,s.O4)(x,[]);let p=async e=>{if(e){let t=await fetch("".concat(l.baseAPI,"/cars/").concat(e.slug,"/view.json?photos_count=").concat(e.images.length,"&updated_at=").concat(e.updated_at,"&website_id=").concat(r.default.id));if(!t.ok)return c.Z.notify(Error("Failed to get car view data on ".concat(e.slug,". Status ").concat(t.status))),null;let a=await t.json();return{views:a.views,...a.car_fields}}},v=()=>"Car"===o.Z.primaryVehicle?"Car":"Vehicle",f=e=>{try{let a=[],n={id:e.id,stocknum:e.stocknum,make:e.make,model:e.model,body:e.body,simple_body:e.simple_body},i=localStorage.getItem(x);if(null!==i){var t;a=JSON.parse(i),(null!==(t=null==a?void 0:a.map(e=>"".concat(e.id)))&&void 0!==t?t:[]).includes("".concat(e.id))||(a.push(n),localStorage.setItem(x,JSON.stringify(a)))}else localStorage.setItem(x,JSON.stringify([n]))}catch(e){console.log("Error storing viewed car: ",e)}},b=e=>{let{car:t,enableOptionB:a}=e;return(0,i.useEffect)(()=>{if((null==t?void 0:t.car_type)==="used"){let e={eventId:4,vehicleModel:t.model,vehicleType:"Used",vehicleFranchise:t.make,vehicleGrade:(0,h._r)(t),vin:t.vin};m.idm&&(e.event="usedVehicleDetailView"),u.QD&&(e.usingImpel=a?"Yes":"No"),(0,d._c)(e)}},[t,a]),(0,n.jsx)("div",{className:"d-none"})},g=e=>{window.fbq&&window.fbq("track","ViewContent",{content_type:"vehicle",content_ids:[e.stocknum],country:"Australia",make:e.make,model:e.model,year:e.year,state_of_vehicle:e.car_type,exterior_color:e.colour,transmission:e.simple_transmission,body_style:e.body,fuel_type:e.fuel,price:e.price,currency:"AUD"})},w=()=>((0,i.useEffect)(()=>{m.idm&&(0,d._c)({eventId:49})},[]),(0,n.jsx)("div",{className:"d-none"}))},42913:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSG:function(){return ez},default:function(){return eQ}});var n=a(85893),i=a(69018),r=a(89827),s=a(70895),l=a(8193),o=a(47516),c=a(2585),d=a(51649),u=a(96225),m=a(68933),h=a(19576),x=a(67294),p=a(10781),v=a(15103),f=a(48583),b=a(26834),g=a(62712),w=a(82155),y=a(73747),j=a(49649),_=a(19944),S=a(67152),k=a(66490),N=a(21804),C=a(37875),Z=a.n(C);let T=_.Z,R=e=>{let{isRefined:t,refine:a,label:i,value:r,count:s,disabled:l=!1}=e,o=(0,S.r)(),c=function(e){let t;let a=T.filter(t=>"GWM HAVAL"===e?"gwm"===t.slug:"ŠKODA"===e?"skoda"===t.slug:t.slug===(0,N.XB)(e))[0];return a&&(t=a.logo.url),"Chery"===e&&(t="https://res.cloudinary.com/total-dealer/image/upload/v1706587322/td_next/chery/Chery_Vertical_Logo_n6ubbt"),"Ford"===e&&(t="https://res.cloudinary.com/total-dealer/image/upload/v1723063330/td_next/ford/ford-signature-logo-search_hlfqhm"),"Isuzu UTE"===e&&(t="https://cricksapi.s3.ap-southeast-2.amazonaws.com/uploads/manufacturer/logo/23/isuzu.svg"),"Fiat"===e&&j.ZId&&(t="https://cricksapi.s3.ap-southeast-2.amazonaws.com/uploads/image/image/40155/fiat-professional.webp"),"Iveco"===e&&(t="https://res.cloudinary.com/total-dealer/image/upload/v1723687879/td_next/iveco/iveco_logo_qslrlo"),"SsangYong"===e&&(t="https://res.cloudinary.com/total-dealer/image/upload/v1728532232/td_next/ssangyong/kgm-logo-update-transparent_lmi6yg.png"),t}(i.trim());return(0,n.jsx)(k.Zb,{className:(0,y.cn)(Z().cardButton,o&&Z().colored,t&&Z().refinedItem),onClick:e=>{e.preventDefault(),l||a(r)},role:"checkbox","aria-disabled":l,children:(0,n.jsxs)(k.aY,{className:Z().content,children:[(0,n.jsxs)("span",{suppressHydrationWarning:!0,children:["GWM HAVAL"===i&&j.RDo?"GWM":i," ",s>0?"(".concat(s,")"):null]}),c&&(0,n.jsx)("img",{style:{height:"30px",width:"auto",maxWidth:"48px"},src:c,alt:i+" logo",suppressHydrationWarning:!0,loading:"lazy"})]})})},F=(0,v.cn)({}),L=(0,v.cn)(!1),I=j.vFG,P=![j.EY6,j.dci].some(e=>e),H=e=>{let{isRefined:t,label:a}=e,[i,r]=(0,f.KO)(F),s=!j.dci&&b.Z.darkMode,l=(0,x.useCallback)(e=>e.map(e=>{var t;return(null===(t=e.label)||void 0===t?void 0:t.includes(a))?{...e,label:e.label.replace(a,"").replace(": ","")}:null}).filter(e=>e),[a]);if(!t)return null;let o=I||i[a],c=()=>{r(e=>({...e,[a]:!o}))};return(0,n.jsxs)("div",{className:"mb-4",children:[!I&&(0,n.jsx)("div",{className:Z().selectModels,children:o?(0,n.jsx)("button",{className:(0,y.cn)(s&&"text-light","btn"),onClick:c,children:"Hide"}):(0,n.jsxs)("button",{className:(0,y.cn)(s&&"text-light","btn"),onClick:c,children:["Select models"," ",(0,n.jsx)("img",{src:"/icons/chevron-right.svg",alt:"Arrow Right",className:(0,y.cn)(s&&Z().iconDark)})]})}),(0,n.jsx)("div",{className:(0,y.cn)(!o&&"d-none"),children:(0,n.jsx)(h.Z,{attribute:"make_model",limit:200,sortBy:j.dci?["name:asc"]:void 0,transformItems:l})})]})};var O=e=>{let{allMakes:t=[]}=e,[a,i]=(0,f.KO)(L),{removeMake:r}=(0,g.Yw)(),s=j.dci||j.FH,{items:l,refine:o}=(0,p.c)({attribute:"make",limit:100,sortBy:s?["name:asc"]:void 0}),c=j.dci?20:7,{makes:d,totalOptions:u}=(0,x.useMemo)(()=>{let e=new Map;l.forEach(t=>{e.set(t.value,t)}),t.forEach(t=>{e.get(t)||P||e.set(t,{label:t,value:t,count:0,isRefined:!1})});let n=Array.from(e.values());return(j.dci&&(n=(0,w.Z)(n)),a)?{makes:n,totalOptions:n.length}:{makes:n.slice(0,c),totalOptions:n.length}},[t,l,c,a]);return(0,n.jsxs)("div",{className:"row no-gutters",children:[d.map((e,t)=>(0,n.jsxs)("div",{className:(0,y.cn)("w-100",!a&&t>c&&"d-none"),children:[j.dci&&0===t&&(0,n.jsx)("h3",{children:"Popular Makes"}),j.dci&&t===c&&(0,n.jsx)("h3",{children:"All Makes"}),(0,n.jsx)(R,{...e,refine:()=>{e.isRefined?r(e.value):o(e.value)}}),(0,n.jsx)(H,{isRefined:e.isRefined,label:e.label})]},e.value)),u>c&&(0,n.jsx)("div",{className:"d-flex justify-content-center w-100 mt-2",children:(0,n.jsx)("button",{className:"btn btn-outline-primary",onClick:()=>i(!a),children:a?"Hide extra makes":"Show all makes"})})]})},M=a(29244),A=a(48257),B=a.n(A);let U=(0,v.cn)({});var W=e=>{let{header:t,children:a,Icon:i,defaultIsOpen:r=!1,persist:s=!1}=e,l=(0,S.r)(),o=(0,y.o$)(l),[c,d]=(0,x.useState)(r),[u,m]=(0,f.KO)(U);!s||t in u||m(e=>({...e,[t]:r}));let h=s?u[t]:c,p=b.Z.darkMode;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{className:(0,y.cn)(B().DropdownToggle,h&&"active",j.pL8?"py-2":""," d-flex align-items-center justify-content-between unstyled"),"aria-expanded":h,"aria-controls":t,onClick:()=>{s?m(e=>({...e,[t]:!h})):d(!c)},children:[(0,n.jsxs)("div",{className:B().text,children:[i&&(0,n.jsx)(i,{size:30,className:"mr-2"}),(0,n.jsx)("p",{className:"m-0",children:t})]}),(0,n.jsx)("div",{className:(0,y.cn)(h&&B().active),children:(0,n.jsx)("img",{src:"/icons/chevron-down.svg",alt:"Chevron down arrow",className:(0,y.cn)(p&&B().arrow,o)})})]}),(0,n.jsx)(M.Z,{id:t,duration:300,height:h?"auto":0,easing:"ease-out",children:(0,n.jsx)("div",{className:"py-3 border-bottom",children:a})})]})},D=a(58160),V=a(9730),E=a(89302),q=a(56573),Y=a(61350),G=a(38017),J=a(81635),K=a(65080),$=a(55880),z=a.n($),Q=e=>{let{attribute:t="price"}=e,a=(0,S.r)(),i=(0,y.ur)(a),{range:r,canRefine:s,start:l,refine:o}=(0,G.C)({attribute:t}),{userMin:c,userMax:d,rangeMin:u,rangeMax:m,step:h}=(0,x.useMemo)(()=>{let e=l[0],t=l[1],a="number"==typeof(null==r?void 0:r.min)?r.min:0,n="number"==typeof(null==r?void 0:r.max)&&r.max>0?r.max:1e5;return{userMin:s&&isFinite(e)?e:a,userMax:s&&isFinite(t)?t:n,rangeMin:a,rangeMax:n,step:Math.round((n-a)/100)}},[s,r.max,r.min,l]),p=(0,x.useCallback)(e=>{let{min:t,max:a}=e;try{o([t<=u?u:t,a>=m?m:a])}catch(e){console.log("Error with slider refinement: ",e)}},[m,u,o]),v=(0,x.useCallback)((e,t)=>{let a=parseInt(e);"min"===t?a<u?console.log("Cannot refine below the range minimum"):p({min:a>=d?d:a,max:d}):a>m?console.log("Cannot refine above the range maximum"):p({min:c,max:a<=c?c:a})},[m,u,p,d,c]);return(0,x.useEffect)(()=>{c<u&&(console.log("TOO SMALL: ",u),p({min:u,max:d})),d>m&&(console.log("TOO LARGE: ",m),p({min:c,max:m}))},[m,u,o,p,d,c]),(0,n.jsx)("div",{className:"ais-RefinementList",children:(0,n.jsxs)("ul",{className:"ais-RefinementList-list",children:[(0,n.jsx)("div",{className:"d-flex px-2 mt-2",children:(0,n.jsxs)("div",{className:z().Container,children:[(0,n.jsx)("input",{type:"range",value:c,min:u,max:m,step:h,onChange:e=>{v(e.target.value,"min")},className:z().Thumb+" "+z().Thumb_Left}),(0,n.jsx)("input",{type:"range",value:d,min:u,max:m,step:h,onChange:e=>{v(e.target.value,"max")},className:z().Thumb+" "+z().Thumb_Right}),(0,n.jsxs)("div",{className:z().Slider,children:[(0,n.jsx)("div",{className:z().Slider_Track,style:{left:"".concat((c-u)/(m-u)*100,"%"),width:"".concat((d-c)/(m-u)*100,"%")},suppressHydrationWarning:!0}),(0,n.jsx)("div",{className:z().Slider_Range})]})]})}),(0,n.jsx)("div",{className:"px-0 col-12 text-center",children:"price"===t||"subscription_price"===t?(0,n.jsxs)("span",{className:"".concat(z().LabelColour," ").concat(i),suppressHydrationWarning:!0,children:[(0,K.j3)(c)," - ",(0,K.j3)(d),"subscription_price"===t?" / week":""]}):"year"===t?(0,n.jsxs)("span",{className:"".concat(z().LabelColour," ").concat(i),suppressHydrationWarning:!0,children:[c," - ",d]}):(0,n.jsxs)("span",{className:"".concat(z().LabelColour," ").concat(i),suppressHydrationWarning:!0,children:[(0,K.oC)(c)," kms - ",(0,K.oC)(d)," kms"]})}),j.dci&&(0,n.jsx)("div",{className:"px-0 col-12 d-flex justify-content-center mt-2",children:(0,n.jsx)(J.L,{attribute:t,classNames:{label:"mb-0"},translations:{separatorElementText:"-",submitButtonText:"Apply"}})})]})})},X=a(81152),ee=a.n(X);let et={Sidebar:e=>{var t,a,r,s,x,p,v,f,g,w,_,S,k,N,C,Z,T,R,F,L,I,P,H,M,A,B,U,G,J,K,$,z,X,et,ea;let{allMakes:en}=e;return(0,n.jsx)("div",{className:"h-100",children:(0,n.jsxs)("div",{className:(0,y.cn)(b.Z.cars.stickyCarFilter&&"sticky-top pt-3",b.Z.cars.stickyCarFilter&&ee().StickySidebar),children:[(0,n.jsx)("div",{className:"d-none d-md-flex flex-row justify-content-between align-items-center",children:(0,n.jsx)("h5",{className:"mb-0",children:"Filters"})}),(0,n.jsx)("hr",{className:"mb-0"}),j.Ocg&&(0,n.jsxs)("div",{className:"text-center mt-5",children:[(0,n.jsx)("h5",{children:"Have a trade-in?"}),(0,n.jsx)("a",{href:b.Z.links.tradeIn.url,className:"btn btn-primary",children:"Get your valuation now"}),(0,n.jsx)("hr",{})]}),(null===(t=b.Z.search)||void 0===t?void 0:t.CustomSearchPanel)?(0,n.jsx)(b.Z.search.CustomSearchPanel,{}):(0,n.jsx)(W,{header:"Search",className:"mb-2",Icon:l.RB5,persist:!0,children:(0,n.jsx)(m.R,{placeholder:"Keyword search eg. EV, SUV, Toyota"})}),(0,n.jsxs)("div",{className:(0,y.cn)((null===b.Z||void 0===b.Z?void 0:null===(r=b.Z.algolia)||void 0===r?void 0:null===(a=r.searchFilterSwitches)||void 0===a?void 0:a.car_type)&&Object.keys(i.default.stock.car_types).length>1?"d-block":"d-none"),children:[j.Utj&&(0,n.jsx)(W,{header:"Location",Icon:o.Y4r,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"location_name",limit:80,showMore:!0,sortBy:["label:asc"]})}),(j.hrd||j.VDr)&&(0,n.jsx)(W,{header:"Location",Icon:o.Y4r,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"city",limit:20,showMore:!0})}),j.gsT&&(0,n.jsx)(W,{header:"State",Icon:o.Y4r,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"state",limit:10,showMore:!0})}),(0,n.jsx)(W,{header:"".concat((0,E.$s)()," Type"),Icon:l.s8$,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"car_type"})})]}),(0,n.jsx)(W,{header:"Make",Icon:"motorcycle"===b.Z.primaryVehicle.toLowerCase()?u.AVw:l.$mT,persist:!0,children:(0,n.jsx)(O,{allMakes:en})}),q.$N?(0,n.jsx)("div",{className:"d-none",children:(0,n.jsx)(h.Z,{attribute:"make_model",limit:30})}):(0,n.jsx)(W,{header:"Model",Icon:"motorcycle"===b.Z.primaryVehicle.toLowerCase()?u.AVw:l.$mT,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"make_model",limit:200})}),(0,n.jsx)("div",{className:"d-none",children:(0,n.jsx)(h.Z,{attribute:"model",limit:200})}),j.t4$&&(0,n.jsx)(W,{header:b.Z.algolia.cityInputHeading,Icon:o.Y4r,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"city",limit:20,showMore:!0})}),(null===b.Z||void 0===b.Z?void 0:null===(x=b.Z.algolia)||void 0===x?void 0:null===(s=x.searchFilterSwitches)||void 0===s?void 0:s.badge)&&(0,n.jsx)(W,{header:"Badge",Icon:l.$mT,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"badge",limit:30})}),(null===b.Z||void 0===b.Z?void 0:null===(v=b.Z.algolia)||void 0===v?void 0:null===(p=v.searchFilterSwitches)||void 0===p?void 0:p.colour)&&(0,n.jsx)(W,{header:"Colour",Icon:l.R8K,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"colour",limit:30})}),(null===b.Z||void 0===b.Z?void 0:null===(g=b.Z.algolia)||void 0===g?void 0:null===(f=g.searchFilterSwitches)||void 0===f?void 0:f.body)&&(0,n.jsx)(W,{header:"Body",Icon:"motorcycle"===b.Z.primaryVehicle.toLowerCase()?u.cbW:l.q2x,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"simple_body",limit:30})}),(null===b.Z||void 0===b.Z?void 0:null===(_=b.Z.algolia)||void 0===_?void 0:null===(w=_.searchFilterSwitches)||void 0===w?void 0:w.Kilometers)&&(0,n.jsx)(W,{header:"Kilometers",Icon:d.CSW,persist:!0,children:(0,n.jsx)(Q,{attribute:"km",limit:30})}),(null===b.Z||void 0===b.Z?void 0:null===(k=b.Z.algolia)||void 0===k?void 0:null===(S=k.searchFilterSwitches)||void 0===S?void 0:S.price)&&(0,n.jsx)(W,{header:"Price",Icon:l.LkX,persist:!0,children:(0,n.jsx)(Q,{attribute:"price",limit:30})}),(null===b.Z||void 0===b.Z?void 0:null===(C=b.Z.algolia)||void 0===C?void 0:null===(N=C.searchFilterSwitches)||void 0===N?void 0:N.subscription_price)&&(0,n.jsx)(W,{header:"Price",Icon:l.LkX,persist:!0,children:(0,n.jsx)(Q,{attribute:"subscription_price",limit:30})}),(0,n.jsx)("div",{className:(0,y.cn)((null===b.Z||void 0===b.Z?void 0:null===(T=b.Z.algolia)||void 0===T?void 0:null===(Z=T.searchFilterSwitches)||void 0===Z?void 0:Z.year)?"d-block":"d-none"),children:(0,n.jsx)(W,{header:"Year",Icon:l.xHR,persist:!0,children:(0,n.jsx)(Q,{attribute:"year",step:1,limit:30})})}),(0,n.jsx)("div",{className:(0,y.cn)((null===b.Z||void 0===b.Z?void 0:null===(F=b.Z.algolia)||void 0===F?void 0:null===(R=F.searchFilterSwitches)||void 0===R?void 0:R.transmission)?"d-block":"d-none"),children:(0,n.jsx)(W,{header:"Transmission",Icon:o.MBj,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"simple_transmission",limit:30})})}),(0,n.jsx)("div",{className:(0,y.cn)((null===b.Z||void 0===b.Z?void 0:null===(I=b.Z.algolia)||void 0===I?void 0:null===(L=I.searchFilterSwitches)||void 0===L?void 0:L.drive)?"d-block":"d-none"),children:(0,n.jsx)(W,{header:"Drive",Icon:c.mK2,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"simple_drive",limit:30})})}),(null===b.Z||void 0===b.Z?void 0:null===(H=b.Z.algolia)||void 0===H?void 0:null===(P=H.searchFilterSwitches)||void 0===P?void 0:P.weeklyRepayments)&&(0,n.jsx)(W,{header:"Weekly Repayments",Icon:l.pp5,persist:!0,children:(0,n.jsx)(Y.ZP,{attribute:"weekly_price_range",limit:30})}),i.default.redbook&&!j.vvE&&(0,n.jsx)(W,{header:"Features",Icon:l.w8$,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"filtered_features",limit:30})}),i.default.search_categories.length>0&&(0,n.jsx)(W,{header:"Category",Icon:l.s8$,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"categories",limit:30})}),(null===b.Z||void 0===b.Z?void 0:null===(A=b.Z.algolia)||void 0===A?void 0:null===(M=A.searchFilterSwitches)||void 0===M?void 0:M.fuelType)&&(0,n.jsx)(W,{header:"Fuel Type",Icon:o.Zq5,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"simple_fuel",limit:30})}),(0,n.jsx)("div",{className:(0,y.cn)((null===b.Z||void 0===b.Z?void 0:null===(U=b.Z.algolia)||void 0===U?void 0:null===(B=U.searchFilterSwitches)||void 0===B?void 0:B.tag)?"d-block":"d-none"),children:(0,n.jsx)(W,{header:j.Qcu?"Tags":"Specials",Icon:l.s8$,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"tag",limit:10})})}),(0,n.jsx)("div",{className:(0,y.cn)(i.default.dealerships.length>1&&(null===b.Z||void 0===b.Z?void 0:null===(J=b.Z.algolia)||void 0===J?void 0:null===(G=J.searchFilterSwitches)||void 0===G?void 0:G.location)?"d-block":"d-none"),children:(0,n.jsx)(W,{header:b.Z.algolia.dealershipInputHeading,Icon:o.Y4r,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"dealership_name",limit:30})})}),(0,n.jsx)("div",{className:(0,y.cn)((null===($=b.Z.algolia)||void 0===$?void 0:null===(K=$.searchFilterSwitches)||void 0===K?void 0:K.city)?"d-block":"d-none"),children:(0,n.jsx)(W,{header:b.Z.algolia.cityInputHeading,Icon:o.Y4r,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"city",limit:40,showMore:!0})})}),(0,n.jsx)("div",{className:(0,y.cn)((null===(X=b.Z.algolia)||void 0===X?void 0:null===(z=X.searchFilterSwitches)||void 0===z?void 0:z.locationName)?"d-block":"d-none"),children:(0,n.jsx)(W,{header:"Location",Icon:o.Y4r,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"location_name",limit:80,showMore:!0})})}),(0,n.jsx)("div",{className:(0,y.cn)((null===(ea=b.Z.algolia)||void 0===ea?void 0:null===(et=ea.searchFilterSwitches)||void 0===et?void 0:et.state)?"d-block":"d-none"),children:(0,n.jsx)(W,{header:"State",Icon:o.Y4r,persist:!0,children:(0,n.jsx)(h.Z,{attribute:"state",limit:10,showMore:!0})})}),j.Cq3&&(0,n.jsx)("div",{className:"d-none d-lg-block mt-3",style:{position:"sticky",top:16},children:(0,n.jsx)(D.Z,{children:(0,n.jsx)("div",{className:"p-3",children:(0,n.jsx)(V.Z,{defaultValue:4e4})})})}),j.YN3&&(0,n.jsxs)("div",{className:"text-center mt-5",children:[(0,n.jsx)("h5",{children:"Have a trade-in?"}),(0,n.jsx)("a",{href:"/sell-your-car",className:"btn btn-primary",children:"Get your valuation now"})]})]})})},CustomHits:s.Z},ea={suv:"SUVs",ute:"Utes",sedan:"Sedans",scooter:"Scooters",van:"Vans",wagon:"Wagons",hatch:"Hatches",bus:"Buses","light truck":"Light trucks","people mover":"People Movers","golf cart":"Golf Carts"},en=e=>(0,N.zx)(Object.keys(e).map(e=>e.toLowerCase()).map(e=>ea[e]||e).slice(0,5)),ei=e=>{var t,a,n,r,s;let l,o,{page:c,hits:d,results:u}=e,m="in ".concat(b.Z.address.city," ").concat(b.Z.address.state," at ").concat(i.default.name),h=b.Z.primaryVehicle.toLowerCase(),x=(null==c?void 0:null===(a=c.filters_hash)||void 0===a?void 0:null===(t=a.location_name)||void 0===t?void 0:t.length)?"at ".concat(c.filters_hash.location_name[0]):m,p="New, Used or Demo";return(c.filters_hash&&(p=Object.keys(c.filters_hash).filter(e=>["car_type","make","body","simple_drive"].includes(e)).map(e=>c.filters_hash[e]).join(",")),d>0&&((null==u?void 0:null===(n=u.facets)||void 0===n?void 0:n.simple_body)&&(l=en(u.facets.simple_body)),(null==u?void 0:null===(r=u.facets)||void 0===r?void 0:r.make)&&(o=(0,N.zx)(Object.keys(null==u?void 0:null===(s=u.facets)||void 0===s?void 0:s.make).slice(0,10)))),j.RuW&&(null==c?void 0:c.car_type)==="used")?"Discover top quality used cars for sale in Coffs Harbour at unbeatable prices. Your dream vehicle is waiting at Coffs Harbour Toyota.":j.EY6&&(null==c?void 0:c.car_type)==="demo"?"John Hughes is Perth's trusted source for demo cars from top brands. Enjoy excellent value with comprehensive inspections for peace of mind.":j.Qcu?"Looking for a ".concat(p," ").concat(h,"? Browse ").concat(d," ").concat(p," ").concat(h," for subscription ").concat(x,". We have a great range of ").concat(l," available from ").concat(o,"."):"Looking for a ".concat(p," ").concat(h,"? Browse ").concat(d," ").concat(p," ").concat(h," for sale ").concat(x,". We have a great range of ").concat(l," available from ").concat(o,". ").concat(i.default.name," makes buying new and second-hand ").concat(h," for sale online easier than ever before.")};var er=a(54942),es=a(5152),el=a.n(es),eo=a(5434),ec=a(91586),ed=()=>{let{canRefine:e,refine:t}=(0,ec.n)();return(0,n.jsx)("div",{className:"ais-ClearRefinements",children:(0,n.jsx)("button",{className:"btn btn-sm btn-primary",style:{whiteSpace:"nowrap",border:"1px solid var(--primary)"},onClick:()=>t(),disabled:!e,children:"Reset Filters"})})},eu=a(92168),em=a.n(eu),eh=a(17969),ex=()=>{let e=(0,S.r)(),t=(0,y.ur)(e),{refinements:a,refineItem:i}=(0,g.Go)(),{removeMake:r}=(0,g.Yw)(),{show:s}=(0,eh.o)();return s&&a.length?(0,n.jsx)("div",{className:em().StickyBanner+t+" d-flex align-items-center py-2",children:(0,n.jsxs)("div",{className:em().RefinementRow+" d-flex flex-row flex-md-wrap py-2 py-md-0",children:[(0,n.jsx)("div",{className:"mr-1 my-1",children:(0,n.jsx)(ed,{})}),null==a?void 0:a.map((e,t)=>(0,n.jsxs)("div",{className:"btn btn-sm btn-outline-primary mr-1 my-1",onClick:()=>{"make"===e.attribute?r(e.value):i(e)},children:[(0,n.jsx)("span",{className:em().RefinementText+" mr-1",children:e.label}),(0,n.jsx)(eo.lTq,{})]},"".concat(e.attribute," ").concat(t)))]})}):null},ep=a(16817),ev=a.n(ep),ef=a(49665),eb=a(40428),eg=a(70235),ew=a.n(eg),ey=e=>{let{isOpen:t,setIsOpen:a,children:i}=e,r=(0,S.r)(),s=(0,y.ur)(r),{nbHits:l}=(0,eb.V)(),{canRefine:o,refine:c}=(0,ec.n)();return(0,n.jsxs)(ef.VY,{className:ew().CollapsibleContent,forceMount:!0,children:[(0,n.jsx)("div",{className:(0,y.cn)(ew().SearchSidebarDrawer,s),children:(0,n.jsx)("div",{className:"h-100",children:(0,n.jsxs)("div",{className:"p-4",children:[(0,n.jsxs)("div",{className:"d-flex justify-content-between align-items-center mt-2",children:[(0,n.jsx)("h5",{className:"mb-0",children:"Filters"}),(0,n.jsx)(ef.xz,{className:"btn order-2 p-0",children:(0,n.jsx)(eo.lTq,{size:35,color:j.Utj?"var(--light)":"var(--search-listings-color)"})})]}),(0,n.jsxs)("div",{className:ew().ScrollableFilters,children:[i,(0,n.jsxs)("div",{className:"row mt-3 mb-5 pb-4 d-flex d-md-none",children:[(0,n.jsx)("div",{className:(0,y.cn)("col-12 col-sm-6 mb-2 mb-sm-0"),children:(0,n.jsx)(ef.xz,{className:"btn btn-outline-primary btn-block",onClick:()=>c(),disabled:!o,children:"Reset Filters"})}),(0,n.jsx)("div",{className:"col-12 col-sm-6",children:(0,n.jsxs)(ef.xz,{className:"btn btn-primary btn-block d-block d-md-none",children:["View ",l," Results"]})})]})]})]})})}),(0,n.jsx)("div",{className:"".concat(ew().SearchSidebarDrawerVoid," position-fixed ").concat(t?"d-block":"d-none"," d-lg-none"),onClick:()=>{a(!1),document.body.classList.remove("modal-open")}})]})};let ej=(0,v.cn)(!1);var e_=e=>{let{children:t}=e,[a,i]=(0,f.KO)(ej),r=()=>{a?document.body.classList.remove("modal-open"):document.body.classList.add("modal-open"),i(!a)};return(0,n.jsxs)(ef.fC,{open:a,onOpenChange:()=>r(),className:"ml-auto order-2 order-md-3 d-block d-lg-none",children:[(0,n.jsx)(ef.xz,{className:"btn btn-outline-primary btn-block mb-2",children:(0,n.jsx)("span",{className:"mb-0",children:"Refine Search"})}),(0,n.jsx)(ey,{isOpen:a,setIsOpen:i,children:t})]})},eS=a(17857),ek=a(7140),eN=e=>{var t;let{filters:a}=e,{processingTimeMS:i}=(0,eb.V)(),{uiState:r}=(0,er.b)(),s=(0,ek.V)(),l=r[q.kH]?r[q.kH].refinementList:null,o=(null==a?void 0:null===(t=a.location_name)||void 0===t?void 0:t.length)?a.location_name[0]:b.Z.address.city,c=(0,x.useMemo)(()=>{var e,t;let a=null==l?void 0:null===(e=l.make)||void 0===e?void 0:e.join(", "),n=null==l?void 0:null===(t=l.model)||void 0===t?void 0:t.join(", "),i="".concat((0,E.$s)().toLowerCase()).concat(1===s?"":"s"," found ");return"".concat(a?"".concat(a," "):"").concat(n?"".concat(n," "):"").concat(i)},[s,l]),d=(0,x.useMemo)(()=>{var e;return"".concat(null!==(e=b.Z.algolia.carsFoundPreposition)&&void 0!==e?e:""," ").concat(b.Z.showSearchCityStats?o:""," \n    ").concat(!j.h0t&&b.Z.showAddressState?b.Z.address.state:"","\n    ").concat(b.Z.algolia.hideSearchMS?"":"in ".concat(i,"ms"))},[o,i]);return(0,n.jsxs)("div",{className:"small",suppressHydrationWarning:!0,children:[(0,n.jsx)(()=>{var e;return(null==l?void 0:null===(e=l.car_type)||void 0===e?void 0:e.length)>0&&s>1999?(0,n.jsx)("span",{suppressHydrationWarning:!0,children:"Over 2,000"}):(0,n.jsx)(eS.ZP,{duration:1,end:s})},{}),"\xa0",c,(0,n.jsx)("span",{className:"d-none d-md-inline",suppressHydrationWarning:!0,children:d})]})};let eC=()=>{let e="scrollPosition";(0,x.useEffect)(()=>{let t=()=>{let t=window.scrollY;sessionStorage.setItem(e,t.toString())};window.addEventListener("scroll",t);let a=sessionStorage.getItem(e);return a&&window.scrollTo(0,parseInt(a,10)),()=>{window.removeEventListener("scroll",t)}},[e])};var eZ=a(19801);a(69267);let eT=i.default.slug+"-SearchData",eR=e=>{let{id:t,menu:a,refinementList:i}=e,[r,s]=(0,x.useState)(),l=(0,eZ.i)();return(0,x.useEffect)(()=>{s(t)},[]),(0,x.useEffect)(()=>{try{let e=[],t=i?{...i}:{};if(a&&""!==a.make&&(t={...t,make:[a.make]}),a&&""!==a.model&&(t={...t,model:[a.model]}),Object.keys(t).forEach(e=>void 0==t[e]&&delete t[e]),Object.keys(t).forEach(e=>""==t[e]&&delete t[e]),0!==Object.keys(t).length){t={id:r,path:l.asPath?l.asPath:void 0,...t};let a=localStorage.getItem(eT);null!==a?((e=JSON.parse(a)).filter(e=>e.id===t.id).length>0?e=[t,...e.filter(e=>e.id!==t.id)]:e.push(t),e.length>4&&e.shift(),localStorage.setItem(eT,JSON.stringify(e))):localStorage.setItem(eT,JSON.stringify([t]))}}catch(e){console.log(e)}},[a,i]),(0,n.jsx)(n.Fragment,{})};var eF=a(85734),eL=()=>{let{currentRefinement:e}=(0,eF.h)();return(0,x.useEffect)(()=>{window&&e&&window.scrollTo(0,0)},[e]),(0,n.jsx)("div",{className:"d-none"})},eI=a(40653),eP=a(73185),eH=a.n(eP),eO=()=>{var e;let[t,a]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{let e=()=>{window.scrollY>=500?a(!0):a(!1)};return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),(0,n.jsxs)("div",{className:(0,y.cn)(b.Z.cars.stickyCarFilter?"d-none":"d-flex d-xl-none",eH().StyledNavbar,"navbar navbar-expand-lg navbar-light",(0,y.ur)(j.Utj),t?eH().NavUp:eH().NavDown),children:[(0,n.jsx)(eL,{}),(null===(e=b.Z.search)||void 0===e?void 0:e.CustomSearchPanel)?(0,n.jsx)(b.Z.search.CustomSearchPanel,{}):(0,n.jsx)(m.R,{className:"w-100",placeholder:"Keyword search eg. EV, SUV, Toyota"})]})};a(71226);let eM=el()(()=>a.e(3314).then(a.bind(a,93314)),{loadableGenerated:{webpack:()=>[93314]},ssr:!1}),eA=el()(()=>Promise.all([a.e(2876),a.e(8121)]).then(a.bind(a,8121)),{loadableGenerated:{webpack:()=>[8121]},ssr:!0}),eB=el()(()=>Promise.all([a.e(456),a.e(4886)]).then(a.bind(a,90456)).then(e=>e.Pagination),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),eU=el()(()=>Promise.all([a.e(456),a.e(4886)]).then(a.bind(a,90456)).then(e=>e.RangeInput),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),eW=el()(()=>Promise.all([a.e(456),a.e(4886)]).then(a.bind(a,90456)).then(e=>e.SortBy),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),eD=(e,t)=>{var a,n,i;let r=null!==(n=b.Z.search.CustomTitle)&&void 0!==n?n:null==e?void 0:e.title,s=Object.keys(null!==(i=null===(a=t.disjunctiveFacets.find(e=>{let{name:t}=e;return"model"===t}))||void 0===a?void 0:a.data)&&void 0!==i?i:{});return 1!==s.length?r:r.replace(RegExp("(?<=Used\\s)(\\w+)(?=\\sfor)","gim"),(0,y._6)((0,N.Qs)(s[0])))};var eV=e=>{var t,a,i;let{page:r,Components:s=et,wrapperClassName:l="text-dark",allMakes:o,hasTopBlocks:c=!1}=e;eC();let d=(0,S.r)(),u=(0,y.ur)(d),{uiState:m,results:x}=(0,er.b)(),p=null;(null==r?void 0:r.car_type)&&"all"!==r.car_type&&(p=[r.car_type]);let v=b.Z.search.Footer;return(0,n.jsxs)("div",{className:(0,y.cn)(ev().SearchStyle,l,u,q.SA&&!b.Z.cars.showFeaturesBanner&&"pt-5"),suppressHydrationWarning:!0,children:[(0,n.jsx)(eL,{}),j.Utj&&(0,n.jsx)(eO,{}),b.Z.cars.showFeaturesBanner&&(0,n.jsx)(eA,{}),(0,n.jsxs)("div",{className:(0,y.cn)("container-fluid pb-5 ".concat(u),!c&&"pt-4",q.SA&&!b.Z.cars.showFeaturesBanner?"pt-5":""),style:{color:"var(--search-listings-color)"},children:[(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsx)("h1",{className:"".concat(ev().Title," ").concat(u),children:eD(r,x)}),(null==r?void 0:r.subtitle)&&(0,n.jsx)("h5",{className:(null==r?void 0:r.subtitleStyles)?null==r?void 0:r.subtitleStyles:" text-secondary",children:r.subtitle}),(null==r?void 0:r.description)&&(0,n.jsx)("p",{className:"text-secondary",children:r.description})]}),(0,n.jsx)("hr",{className:(0,y.cn)(c&&"mt-0")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{className:"col d-md-none",children:[(0,n.jsx)(e_,{children:(0,n.jsx)(s.Sidebar,{car_type:p,isMobile:!0,allMakes:o})}),(0,n.jsx)("hr",{})]}),(0,n.jsxs)("div",{className:(0,y.cn)("d-none d-md-inline search_listings_refinements",u,b.Z.cars.carSearchColSizes[0],b.Z.cars.stickySortBy&&" mr-n2"),children:[(0,n.jsx)(s.Sidebar,{car_type:p,allMakes:o}),(0,n.jsx)(eU,{attribute:"price",className:"d-none"}),(0,n.jsx)(eU,{attribute:"km",className:"d-none"}),(0,n.jsx)(Y.ZP,{attribute:"weekly_price_range",className:"d-none"}),(0,n.jsx)(Y.ZP,{attribute:"price_range",className:"d-none"}),(0,n.jsx)(h.Z,{attribute:"make_model",className:"d-none"}),(0,n.jsx)(h.Z,{attribute:"status",className:"d-none"})]}),(0,n.jsxs)("div",{className:b.Z.cars.carSearchColSizes[1],children:[b.Z.search.CustomSecondarySortToggle&&(0,n.jsx)("div",{className:"pl-2 pt-2 d-flex align-items-center d-xl-none",children:(0,n.jsx)(eN,{filters:null==r?void 0:r.filters_hash})}),(0,n.jsxs)("div",{className:(0,y.cn)("p-2 d-flex align-items-center mb-3",b.Z.cars.stickySortBy&&ev().StickySortBy),children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:(0,y.cn)(b.Z.search.CustomSecondarySortToggle&&"d-none d-xl-block"),children:(0,n.jsx)(eN,{filters:null==r?void 0:r.filters_hash})}),b.Z.search.CustomSecondarySortToggle&&(0,n.jsx)("div",{className:"d-block d-xl-none",children:(0,n.jsx)(b.Z.search.CustomSecondarySortToggle,{})})]}),(0,n.jsx)("div",{className:"ml-auto d-xl-none",children:(0,n.jsx)(eW,{items:q.Hy})}),(0,n.jsxs)("div",{className:"ml-auto d-none d-xl-block",children:[(0,n.jsx)(eM,{items:q.Hy}),b.Z.search.CustomSecondarySortToggle&&(0,n.jsx)("div",{className:"d-none d-md-block",children:(0,n.jsx)(b.Z.search.CustomSecondarySortToggle,{})})]})]}),(0,n.jsx)("hr",{className:"mb-0"}),(0,n.jsx)(ex,{}),(0,n.jsx)(s.CustomHits,{}),(0,n.jsx)("div",{className:"mt-2",children:(0,j.oQU)()?(0,n.jsx)(eI.Z,{}):(0,n.jsx)(eB,{})}),(0,j.oQU)()&&(0,n.jsx)(eB,{className:"d-none"}),v&&(0,n.jsx)(v,{carType:null==r?void 0:r.car_type}),(null===(t=b.Z.storage)||void 0===t?void 0:t.storeSearchHistory)&&(0,n.jsx)(eR,{id:Math.floor(1e3*Math.random()),menu:m&&(null===(a=m[Object.keys(m)[0]])||void 0===a?void 0:a.menu),refinementList:m&&(null===(i=m[Object.keys(m)[0]])||void 0===i?void 0:i.refinementList)})]})]})]})]})},eE=a(42501),eq=a(49544),eY=a(25519);let eG=e=>{let{block:t,isTopBlocks:a=!1}=e;switch(t.type){case"buttonsTool":case"buttons":return(0,n.jsx)(eE.ZP,{block:t,isContainerFluid:a});case"imageBanner":return(0,n.jsx)(eY.Z,{block:t});default:let i=eq.Ol[t.type];if(!i)return null;return(0,n.jsx)(i,{block:t,isContainerFluid:a})}};var eJ=e=>{let{blocks:t,isTopBlocks:a=!1}=e;return(0,n.jsx)("section",{children:t.map((e,t)=>(0,n.jsx)(eG,{block:{...e,index:t},isTopBlocks:a},e.id))})},eK=a(60762),e$=a(81371),ez=!0,eQ=e=>{var t,a,s,l,o,c,d,u;let{page:m,serverState:h,router:x=!0,searchPages:p,search_filters:v,initialUiState:f,allMakes:g,fullStockCount:w,hasMultipleCarTypes:_}=e,S=(null==h?void 0:h.initialResults)&&(null===(t=h.initialResults[q.kH])||void 0===t?void 0:t.results)?h.initialResults[q.kH].results[0]:null,k=null!==(o=null==S?void 0:S.nbHits)&&void 0!==o?o:0,C=k;"number"==typeof k&&k>1999&&(C=w);let Z=!C||C<=1,T="".concat(Z?"":"".concat(C," ")," ").concat(Z?null==m?void 0:m.title.replace("Cars","Car"):null==m?void 0:m.title," | ").concat(i.default.name),R=m?ei({page:m,hits:C,results:S}):void 0;return(0,n.jsxs)(r.Z,{title:null!==(d=null!==(c=(()=>{switch(!0){case j.EY6&&(null==m?void 0:m.car_type)=="demo":return"Demo Cars for Sales in Perth | John Hughes Group";case j.qvG:return"Toyota For Sale Perth WA | Used Cars For Sale Perth | Galleria Toyota";case j.ooc:return"Toyota For Sale Perth WA | Used Cars For Sale Perth | Scarboro Toyota";case j.aOo:return"".concat((0,N.kC)(m.car_type)," Ford Victoria Park | John Hughes Ford");case j.lxc:return"".concat(m.slug.map(e=>{var t;return(0,N.kC)(null===(t=e.split("-"))||void 0===t?void 0:t.map(N.kC).join(" "))}).join(" ")," For Sale - ").concat(i.default.name);default:return}})())&&void 0!==c?c:null==m?void 0:m.meta_title)&&void 0!==d?d:T,metaDescription:null!==(u=(()=>{switch(!0){case j.aOo:switch(m.car_type){case"new":return"We’re proud to stock the best range of new Ford vehicles in Victoria Park. Browse our great range online today!";case"used":return"Looking for a quality used Ford in Victoria Park? Then you can’t go past John Hughes Ford for range and price!"}case j.qvG:switch(m.car_type){case"all":return"Looking for a New, Used or Demo car? Browse ".concat(C," New, Used or Demo car for sale in Morley, Perth WA at Galleria Toyota. We have a great range of coupe, Hatches, Sedans, SUVs and Utes available from Audi, BMW, CUPRA, Ford, Holden, Honda, Hyundai, Jeep, Kia and Land Rover. Galleria Toyota makes buying new and second-hand car for sale online easier than ever before.");case"used":return"Looking for a used car? Browse ".concat(C," used car for sale in Morley, Perth WA at Galleria Toyota. We have a great range of coupe, Hatches, Sedans, SUVs and Utes available from Audi, BMW, CUPRA, Ford, Holden, Honda, Hyundai, Jeep, Kia and Land Rover. Galleria Toyota makes buying new and second-hand car for sale online easier than ever before.")}case j.ooc:switch(m.car_type){case"all":return"Looking for a New, Used or Demo car? Browse ".concat(C," New, Used or Demo car for sale in Osborne Park, Perth WA at Scarboro Toyota. We have a great range of coupe, Hatches, Sedans, SUVs and Utes available from Audi, BMW, CUPRA, Ford, Holden, Honda, Hyundai, Jeep, Kia and Land Rover. Scarboro Toyota makes buying new and second-hand car for sale online easier than ever before.");case"used":return"Looking for a used car? Browse ".concat(C," used car for sale in Osborne Park, Perth WA at Scarboro Toyota. We have a great range of coupe, Hatches, Sedans, SUVs and Utes available from Audi, BMW, CUPRA, Ford, Holden, Honda, Hyundai, Jeep, Kia and Land Rover. Scarboro Toyota makes buying new and second-hand car for sale online easier than ever before.")}}})())&&void 0!==u?u:(null==m?void 0:m.meta_description)?m.meta_description:R,autobotMessage:"Can I help you find a ".concat(b.Z.primaryVehicle,"?"),metaImage:(null==S?void 0:null===(a=S.hits)||void 0===a?void 0:a.length)?null===(s=S.hits[0])||void 0===s?void 0:s.primary_image_url:void 0,pageId:2,outerClassName:"defaultPage searchListings",canonical:(0,y.Jj)("search/".concat(m.slug.join("/"))),children:[(0,n.jsx)(E.P8,{}),b.Z.search.searchListingsImage&&(0,n.jsx)(e$.Z,{image:b.Z.search.searchListingsImage,buttons:[]}),(0,n.jsxs)("div",{style:{background:"var(--search-listings-background)"},children:[(null==m?void 0:m.topBlocks)&&(0,n.jsx)(eJ,{blocks:m.topBlocks,isTopBlocks:!0}),(0,n.jsx)(eK.tJ,{serverState:h,router:(null==m||!m.noRouting)&&x,searchPages:p,search_filters:v,initialUiState:f,hasMultipleCarTypes:_,children:(0,n.jsx)(eV,{page:m,Components:et,allMakes:g,wrapperClassName:"text-dark",hasTopBlocks:!!(null==m?void 0:m.topBlocks)&&(null==m?void 0:null===(l=m.topBlocks)||void 0===l?void 0:l.length)>0})}),(null==m?void 0:m.bottomBlocks)&&(0,n.jsx)(eJ,{blocks:m.bottomBlocks})]})]})}},92168:function(e){e.exports={xs:"min-width: 400px",sm:"min-width: 576px","sm-down":"max-width: 576px",md:"min-width: 768px","md-down":"max-width: 768px",lg:"min-width: 992px","lg-down":"max-width: 992px",xl:"min-width: 1200px","xl-down":"max-width: 1200px",xxl:"min-width: 1400px",StickyBanner:"CurrentRefinementsBanner_StickyBanner__flA6W",RefinementRow:"CurrentRefinementsBanner_RefinementRow__juJqq",RefinementText:"CurrentRefinementsBanner_RefinementText___hNx2"}},55880:function(e){e.exports={xs:"min-width: 400px",sm:"min-width: 576px","sm-down":"max-width: 576px",md:"min-width: 768px","md-down":"max-width: 768px",lg:"min-width: 992px","lg-down":"max-width: 992px",xl:"min-width: 1200px","xl-down":"max-width: 1200px",xxl:"min-width: 1400px",Container:"CustomSlider_Container__xBzER",Slider:"CustomSlider_Slider__zQRVe",Slider_Track:"CustomSlider_Slider_Track__q0U_v",Slider_Range:"CustomSlider_Slider_Range__kJOnp",Thumb:"CustomSlider_Thumb__e0N6I",Thumb_Left:"CustomSlider_Thumb_Left__odznb",Thumb_Right:"CustomSlider_Thumb_Right__p8UUX",LabelColour:"CustomSlider_LabelColour__99_uq"}},37875:function(e){e.exports={xs:"min-width: 400px",sm:"min-width: 576px","sm-down":"max-width: 576px",md:"min-width: 768px","md-down":"max-width: 768px",lg:"min-width: 992px","lg-down":"max-width: 992px",xl:"min-width: 1200px","xl-down":"max-width: 1200px",xxl:"min-width: 1400px",colored:"MakeModelRefinementList_colored__6iAlZ",cardButton:"MakeModelRefinementList_cardButton__jwfya",content:"MakeModelRefinementList_content__Md637",refinedItem:"MakeModelRefinementList_refinedItem__mUBpj",selectModels:"MakeModelRefinementList_selectModels__LJB_K",iconDark:"MakeModelRefinementList_iconDark__3npY3"}},16817:function(e){e.exports={xs:"min-width: 400px",sm:"min-width: 576px","sm-down":"max-width: 576px",md:"min-width: 768px","md-down":"max-width: 768px",lg:"min-width: 992px","lg-down":"max-width: 992px",xl:"min-width: 1200px","xl-down":"max-width: 1200px",xxl:"min-width: 1400px",SearchStyle:"SearchListings_SearchStyle__KMw3O",Title:"SearchListings_Title__63mLN",ScrollBar:"SearchListings_ScrollBar__YAWVV",ScrollContainer:"SearchListings_ScrollContainer__7WjT6",StickySortBy:"SearchListings_StickySortBy__C3UqX"}},48257:function(e){e.exports={xs:"min-width: 400px",sm:"min-width: 576px","sm-down":"max-width: 576px",md:"min-width: 768px","md-down":"max-width: 768px",lg:"min-width: 992px","lg-down":"max-width: 992px",xl:"min-width: 1200px","xl-down":"max-width: 1200px",xxl:"min-width: 1400px",DropdownToggle:"SearchPanel_DropdownToggle__qcNR3",text:"SearchPanel_text__frC8h",active:"SearchPanel_active__okdMb",arrow:"SearchPanel_arrow__auV9p"}},81152:function(e){e.exports={xs:"min-width: 400px",sm:"min-width: 576px","sm-down":"max-width: 576px",md:"min-width: 768px","md-down":"max-width: 768px",lg:"min-width: 992px","lg-down":"max-width: 992px",xl:"min-width: 1200px","xl-down":"max-width: 1200px",xxl:"min-width: 1400px",StickySidebar:"SearchSidebar_StickySidebar__WZ_2I"}},70235:function(e){e.exports={xs:"min-width: 400px",sm:"min-width: 576px","sm-down":"max-width: 576px",md:"min-width: 768px","md-down":"max-width: 768px",lg:"min-width: 992px","lg-down":"max-width: 992px",xl:"min-width: 1200px","xl-down":"max-width: 1200px",xxl:"min-width: 1400px",SearchSidebarDrawer:"SearchSidebarDrawer_SearchSidebarDrawer__B2DyC",CollapsibleContent:"SearchSidebarDrawer_CollapsibleContent__7NNYU",slideUp:"SearchSidebarDrawer_slideUp__yVqHP",slideDown:"SearchSidebarDrawer_slideDown__wf5cN",SearchSidebarDrawerVoid:"SearchSidebarDrawer_SearchSidebarDrawerVoid__v_PnK"}},73185:function(e){e.exports={xs:"min-width: 400px",sm:"min-width: 576px","sm-down":"max-width: 576px",md:"min-width: 768px","md-down":"max-width: 768px",lg:"min-width: 992px","lg-down":"max-width: 992px",xl:"min-width: 1200px","xl-down":"max-width: 1200px",xxl:"min-width: 1400px",StyledNavbar:"StickyHeader_StyledNavbar__nXMaH",NavDown:"StickyHeader_NavDown__m8TD1",NavUp:"StickyHeader_NavUp__WyC_h",CarDetails:"StickyHeader_CarDetails__v4P_P",HeaderImage:"StickyHeader_HeaderImage__PJKdJ",CarPrice:"StickyHeader_CarPrice__JvwWF",priceType:"StickyHeader_priceType__w_OEq",FinanceEstimate:"StickyHeader_FinanceEstimate__q2nzu"}},33481:function(e){e.exports={xs:"min-width: 400px",sm:"min-width: 576px","sm-down":"max-width: 576px",md:"min-width: 768px","md-down":"max-width: 768px",lg:"min-width: 992px","lg-down":"max-width: 992px",xl:"min-width: 1200px","xl-down":"max-width: 1200px",xxl:"min-width: 1400px",SelectWrapper:"FinanceCalculator_SelectWrapper__BCy5L",CustomSelect:"FinanceCalculator_CustomSelect__Al0Y5",StyledSlider:"FinanceCalculator_StyledSlider__WpTNE",Value:"FinanceCalculator_Value__rBuIe",FinanceCalcSlider:"FinanceCalculator_FinanceCalcSlider__rkWrU"}},91586:function(e,t,a){"use strict";a.d(t,{n:function(){return f}});var n=a(87456),i=a(11490),r=a(28537);function s(e){var t=e.helper,a=e.attributesToClear,n=void 0===a?[]:a,i=t.state.setPage(0);return i=n.reduce(function(e,t){return i.isNumericRefined(t)?e.removeNumericRefinement(t):i.isHierarchicalFacet(t)?e.removeHierarchicalFacetRefinement(t):i.isDisjunctiveFacet(t)?e.removeDisjunctiveFacetRefinement(t):i.isConjunctiveFacet(t)?e.removeFacetRefinement(t):e},i),-1!==n.indexOf("query")&&(i=i.setQuery("")),i}var l=a(12299),o=a(47250),c=a(24504);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a<t;a++)n[a]=e[a];return n}function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,n)}return a}function h(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?m(Object(a),!0).forEach(function(t){var n,i;n=t,i=a[t],(n=function(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!==d(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===d(t)?t:String(t)}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):m(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var x=(0,n.K)({name:"clear-refinements",connector:!0}),p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Z;return(0,r._)(e,x()),function(a){var n=a||{},r=n.includedAttributes,d=void 0===r?[]:r,m=n.excludedAttributes,p=void 0===m?["query"]:m,v=n.transformItems,f=void 0===v?function(e){return e}:v;if(a&&a.includedAttributes&&a.excludedAttributes)throw Error(x("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var b={refine:i.Z,createURL:function(){return""},attributesToClear:[]},g=function(){return b.refine()},w=function(){return b.createURL()};return{$$type:"ais.clearRefinements",init:function(t){var a=t.instantSearchInstance;e(h(h({},this.getWidgetRenderState(t)),{},{instantSearchInstance:a}),!0)},render:function(t){var a=t.instantSearchInstance;e(h(h({},this.getWidgetRenderState(t)),{},{instantSearchInstance:a}),!1)},dispose:function(){t()},getRenderState:function(e,t){return h(h({},e),{},{clearRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.createURL,n=e.scopedResults,i=e.results;b.attributesToClear=n.reduce(function(e,t){var a,n,r,s,l,u,m;return e.concat((n=(a={scopedResult:t,includedAttributes:d,excludedAttributes:p,transformItems:f,results:i}).scopedResult,r=a.includedAttributes,s=a.excludedAttributes,l=a.transformItems,u=a.results,m=-1!==r.indexOf("query")||-1===s.indexOf("query"),{helper:n.helper,items:l((0,o.j)((0,c.F)(n.results,n.helper.state,m).map(function(e){return e.attribute}).filter(function(e){return 0===r.length||-1!==r.indexOf(e)}).filter(function(e){return"query"===e&&m||-1===s.indexOf(e)})),{results:u})}))},[]),b.refine=function(){b.attributesToClear.forEach(function(e){var t=e.helper,a=e.items;t.setState(s({helper:t,attributesToClear:a})).search()})},b.createURL=function(){var e;return t(l.Z.apply(void 0,function(e){if(Array.isArray(e))return u(e)}(e=b.attributesToClear.map(function(e){return s({helper:e.helper,attributesToClear:e.items})}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if("Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return u(e,t)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))};var r=b.attributesToClear.some(function(e){return e.items.length>0});return{canRefine:r,hasRefinements:r,refine:g,createURL:w,widgetParams:a}}}}},v=a(53874);function f(e,t){return(0,v.B)(p,e,t)}}},function(e){e.O(0,[5937,9401,6955,652,7627,5048,3938,9944,5362,9388,2716,2888,9774,179],function(){return e(e.s=57511)}),_N_E=e.O()}]);