1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4424],{29308:(e,n,a)=>{a.d(n,{A:()=>t});var i=a(37876);a(14232);var l=a(77328),o=a.n(l);let t=e=>{let{title:n}=e;return(0,i.jsx)(o(),{children:(0,i.jsx)("title",{children:n})})}},39347:(e,n,a)=>{a.d(n,{N:()=>o});var i=a(14232),l=a(25660);let o=()=>{let[e,n]=(0,i.useState)(null),[a,o]=(0,i.useState)(!0),[t,r]=(0,i.useState)(null);return(0,i.useEffect)(()=>{(async()=>{try{var e;o(!0);let a=await fetch("".concat(l.configuration.APP_URL_PRODUCTS,"model-configurator/stock-management"),{method:"GET",headers:{accept:"*/*"}});if(!a.ok)throw Error("HTTP error! status: ".concat(a.status));let i=await a.json();n((null==i||null==(e=i.data)?void 0:e.stock_data)||null)}catch(e){r(e.message||"Something went wrong")}finally{o(!1)}})()},[]),{stockLevels:e,loading:a,error:t}}},64424:(e,n,a)=>{a.r(n),a.d(n,{default:()=>H});var i=a(37876),l=a(6148),o=a(14232),t=a(74695),r=a(95648),s=a(14e3),c=a(68638),d=a(59204),u=a(98477);function v(e){let{isOpen:n,setIsOpen:a,modalTitle:l,children:t,modalClassName:r,backDrop:s}=e,{lockScroll:v,unlockScroll:f}={lockScroll:o.useCallback(()=>{document.querySelector("html").style.overflow="hidden"},[]),unlockScroll:o.useCallback(()=>{document.querySelector("html").style.overflow="auto"},[])},g=(0,o.useRef)(null),m=(0,o.useRef)(null),[C,h]=(0,o.useState)(!1);return((0,o.useEffect)(()=>{h(!0)},[]),(0,o.useEffect)(()=>{if(!n||!g.current)return;m.current=document.activeElement;let e=g.current.querySelectorAll('a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])');e.length>0&&e[0].focus();let i=e=>{let n=g.current.querySelector(".nested-dialog");if(!(n&&n.contains(document.activeElement))){if("Tab"===e.key){let n=Array.from(g.current.querySelectorAll('a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])')),a=n[0],i=n[n.length-1];e.shiftKey||document.activeElement!==i||(e.preventDefault(),a.focus()),e.shiftKey&&document.activeElement===a&&(e.preventDefault(),i.focus())}"Escape"===e.key&&a(!1)}};return document.addEventListener("keydown",i),()=>{var e;document.removeEventListener("keydown",i),null==(e=m.current)||e.focus()}},[n]),C&&n)?u.createPortal((0,i.jsx)(c.e,{appear:!0,show:n,as:o.Fragment,children:(0,i.jsxs)(d.lG,{as:"div",className:"z-10",onClose:function(){a(!1),v()},children:[s?(0,i.jsx)(c.e.Child,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,i.jsx)("div",{className:"fixed z-[8] inset-0 bg-opacity-25 bg-defaut-color"})}):"",(0,i.jsx)("div",{className:r?r+" inset-0 overflow-y-auto":" inset-0 overflow-y-auto",children:(0,i.jsx)("div",{className:"flex items-center justify-center min-h-full p-4 text-center",children:(0,i.jsx)(c.e.Child,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,i.jsxs)(d.lG.Panel,{className:"w-full max-w-md p-6 overflow-hidden text-left align-middle transition-all transform shadow-xl bg-inverted rounded-[4px]",children:[(0,i.jsx)(d.lG.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:l}),(0,i.jsx)("div",{className:"",ref:g,children:t})]})})})})]})}),document.body):null}var f=a(83539),g=a(35643),m=a(99421),C=a(47664),h=a(25660),_=a(29399),x=a(54587),R=a.n(x);let A={primary:"px-3 py-2 font-suzukiBold text-inverted primary-grad-button",secondary:"px-3 py-2 font-suzukiBold secondary-grad-button"},E=e=>{let{children:n,variant:a="primary",className:l,...o}=e;return(0,i.jsx)("button",{className:A[a]+" ".concat(l),...o,children:n})};var p=a(9280),D=a(78876),N=a(39347);let S=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],U=e=>{let{lat:n,long:a}=e,l="https://www.google.com/maps/place/".concat(n,",").concat(a);return(0,i.jsx)("a",{href:l,target:"_blank",rel:"noreferrer","aria-label":"Go to Maps",children:(0,i.jsx)(R(),{src:"/assets/images/dealer-locator/navigation-icon.svg",width:24,height:24,alt:"location"})})};function O(e){var n,a,l,c,d,u,x;let{wheel:A,openDialogue:O,dealerName:L,dealerImages:T,websiteUrl:y,telephone:j,alternatePhoneNumber:I,serviceTelephone:b,serviceAlternatePhoneNumber:w,primaryEmail:k,servicePrimaryEmail:F,address1:Y,address2:P,serviceAddressLine1:M,serviceAddressLine2:B,address3:K,distance:G,timings:W,indexValue:V,openDealerIndex:Z,setOpenDealerIndex:z,updateMap:H,selectedLat:Q,selectedLong:q,serviceLat:X,serviceLong:J,dealerData:$,data:ee,dealerType:en,markerSource:ea,setMarkerSource:ei,serviceAddressLine3:el,onDealerSelect:eo,locatorContainer:et}=e,er=(0,s.usePathname)(),es=null==er?void 0:er.includes("/configurator"),ec=(0,t.d4)(e=>{var n;return null==e||null==(n=e.app)?void 0:n.dealerVehicleStock}),{stockLevels:ed,loading:eu,error:ev}=(0,N.N)(),[ef,eg]=(0,o.useState)(!1),em=(0,f.A)();(0,o.useRef)(!0);let[eC,eh]=(0,o.useState)(0),[e_,ex]=(0,o.useState)(!0),eR=(0,p.A)(),[eA,eE]=(0,o.useState)(""),ep=Z===V,eD=()=>{Z===V?z(null):(z(V),H(),ex(!1))};O(()=>({openModal:eD,indexValue:V,setOpenDealerIndex:z,updateMap:H}));let eN=(0,t.wA)();(0,o.useEffect)(()=>()=>{eN({type:r.pm,payload:!1}),eN({type:r.m_,payload:null})},[]);let[eS,eU]=(0,o.useState)(!1);(0,o.useEffect)(()=>{eE(S[new Date().getDay()])},[]);let eO=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"numeric",hour12:!0}).replace(/\b(am|pm)\b/gi,e=>e.toUpperCase()),eL=e=>W.find(n=>{var a;return(a=n.day).charAt(0).toUpperCase()+a.slice(1).toLowerCase()===e})||{isOpen:!1},eT=e=>e.isOpen?"".concat(eO(e.openingTime)," - ").concat(eO(e.closingTime)):"Closed",ey=S.slice(S.indexOf(eA)).concat(S.slice(0,S.indexOf(eA)));function ej(e){let n=null==e?void 0:e.replace(/\D/g,"");return(null==n?void 0:n.startsWith("1"))?"+36 1 ".concat(null==n?void 0:n.slice(1,4)," ").concat(null==n?void 0:n.slice(4)):"+36 ".concat(null==n?void 0:n.slice(0,2)," ").concat(null==n?void 0:n.slice(2,5)," ").concat(null==n?void 0:n.slice(5))}function eI(e){return e?!function(e){let n=null==e?void 0:e.split("://");if((null==n?void 0:n.indexOf("http"))==0||(null==n?void 0:n.indexOf("https"))==0)return!0;let a=null==e?void 0:e.split(".");return(null==a?void 0:a.indexOf("www"))==0}(e)?"https://".concat(e):e.startsWith("http://")||e.startsWith("https://")?e:"https://".concat(e):""}let eb=o.useMemo(()=>{let e={};
1return Array.isArray(ec)&&(null==ee?void 0:ee.code)&&ec.forEach(n=>{var a;n.dealerCode===ee.code&&(null==(a=n.variants)||a.forEach(a=>{var i;null==(i=a.colors)||i.forEach(a=>{e[n.dealerCode]=(e[n.dealerCode]||0)+(a.count||0)})}))}),e},[ec,ee]);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"locationCard",children:[(0,i.jsx)("h5",{className:"locationCard--dealerName flex capitalize",id:"dealerLocationCard",style:ep?{color:"#DF003A"}:{color:"#001151"},children:L.toUpperCase()}),(0,i.jsx)("button",{onClick:()=>{eD("locationCard"),ei("locationCard")},style:{position:"absolute"},className:"locationCard--modalToggleBtn",id:"locationBtn","aria-label":"View Details"}),y&&(0,i.jsx)("div",{className:"locationCard--websiteUrl my-3",id:"locationCardWebsite",children:(0,i.jsx)("a",{href:eI(y),target:"blank",children:y})}),(Y||P)&&2!=en&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"locationCard--section mt-2",children:[(0,i.jsx)("div",{className:"text-medium font-SuzukiPROBold mb-1",children:(0,i.jsxs)("span",{id:"dealerType",children:[null===_.Constants||void 0===_.Constants||null==(n=_.Constants.locationCard)?void 0:n.SALES,":"]})}),(0,i.jsxs)("div",{className:"dealer--Icon flex my-[5px] text-default",id:"dealerIcon",children:[(0,i.jsx)(R(),{src:"".concat(h.configuration.IMG_URL,"icon-library/Car/directions_car-black.svg"),alt:"Sales_Image",width:12,height:12,style:{maxWidth:"100%",height:"auto",marginRight:"6px"}}),Y&&(0,i.jsxs)(i.Fragment,{children:[Y,(null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)=="true"?" ":", ","CZ"===h.configuration.COUNTRY_CODE&&(0,i.jsx)("br",{})]}),P&&(0,i.jsxs)(i.Fragment,{children:[P,"CZ"!==h.configuration.COUNTRY_CODE&&(0,i.jsx)("br",{})]}),K,eo&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"flex-1"}),(0,i.jsx)("span",{className:"flexgap-3 items-center",children:(0,i.jsx)(U,{lat:Q,long:q})})]})]}),(j||I)&&("HUN"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[j&&(0,i.jsx)("a",{href:"tel:+36".concat(j),children:ej(j)}),I&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+36".concat(I),children:ej(I)})]})]}):"SLA"===h.configuration.COUNTRY_CODE||"CRA"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[j&&(0,i.jsx)("a",{href:"tel:+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(j),children:"+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385"," ").concat(j)}),I&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(I),children:"+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(I)})]})]}):"SK"===h.configuration.COUNTRY_CODE||"CZ"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[j&&(0,i.jsx)("a",{href:"tel:+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420").concat(j),children:"+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420"," ").concat(j)}),I&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420").concat(I),children:"+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420"," ").concat(I)})]})]}):(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[j&&(0,i.jsx)("a",{href:"tel:".concat(j),children:j}),I&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:".concat(I),children:I})]})]}))]}),(0,i.jsx)("div",{className:"locationCard--distance locationCard--openCloseDetails",id:"dealerOpenCloseInfo",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"openClose-status",children:_.Constants.locationCard.DISTANCE}),G," ",(null==$?void 0:$.dealerRadiusUnit)?null==$?void 0:$.dealerRadiusUnit:h.configuration.DEFAULT_DISTANCE_UNIT]})})]}),(M||B)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"locationCard--section mt-3",children:[(0,i.jsx)("div",{className:"text-medium font-SuzukiPROBold mb-1",children:(0,i.jsxs)("span",{id:"dealerType",children:[null===_.Constants||void 0===_.Constants||null==(a=_.Constants.locationCard)?void 0:a.SERVICE,":"]})}),(0,i.jsxs)("div",{className:"dealer--Icon flex my-[5px] text-default",id:"dealerIcon",children:[(0,i.jsx)(R(),{src:"".concat(h.configuration.IMG_STATIC_URL,"Sales_and_ Service.svg"),alt:"Service_Image",width:15,height:15,style:{maxWidth:"100%",height:"auto",marginRight:"6px"}}),M&&(0,i.jsxs)(i.Fragment,{children:[M,(null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)=="true"?" ":", ","CZ"===h.configuration.COUNTRY_CODE&&(0,i.jsx)("br",{})]}),B&&(0,i.jsxs)(i.Fragment,{children:[B,"CZ"!==h.configuration.COUNTRY_CODE&&(0,i.jsx)("br",{})]}),el||K&&(0,i.jsx)(i.Fragment,{children:K}),eo&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"flex-1"}),(0,i.jsx)("span",{className:"flexgap-3 items-center",children:(0,i.jsx)(U,{lat:X,long:J})})]})]}),(b||w)&&("HUN"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[b&&(0,i.jsx)("a",{href:"tel:+36".concat(b),children:ej(b)}),w&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+36".concat(w),children:ej(w)})]})]}):"SLA"===h.configuration.COUNTRY_CODE||"CRA"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[b&&(0,i.jsx)("a",{href:"tel:+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(b),children:"+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385"," ").concat(b)}),w&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(w),children:"+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(w)})]})]}):"SK"===h.configuration.COUNTRY_CODE||"CZ"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[b&&(0,i.jsx)("a",{href:"tel:+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420").concat(b),children:"+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420"," ").concat(b)}),w&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420").concat(w),children:"+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420"," ").concat(w)})]})]}):(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[b&&(0,i.jsx)("a",{href:"tel:".concat(b),children:b}),w&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:".concat(w),children:w})]})]}))]}),(0,i.jsx)("div",{className:"locationCard--distance locationCard--openCloseDetails",id:"dealerOpenCloseInfo",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"openClose-status",children:_.Constants.locationCard.DISTANCE}),G," ",(null==$?void 0:$.dealerRadiusUnit)?null==$?void 0:$.dealerRadiusUnit:h.configuration.DEFAULT_DISTANCE_UNIT]})})]}),W&&(0,i.jsx)("div",{className:"locationCard--openCloseDetails",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"openClose-status",children:"Closed"===eT(eL(eA))?_.Constants.locationCard.CLOSED:_.Constants.locationCard.OPEN}),"Closed"===eT(eL(eA))?null:eT(eL(eA))]})}),(0,i.jsxs)("div",{className:"flex ".concat(eR?"gap-3 flex-col items-stretch":"gap-5 items-center space-between"),children:[eo&&(0,i.jsx)("div",{className:eR?"self-start max-w-full":"w-[100%]",style:eR?{width:"70%"}:void 0,children:(0,i.jsx)(D.A,{count:eb[null==ee?void 0:ee.code]||0,visibility:(null==ed?void 0:ed.dealer_level)||null,source:"dealer",mobileWrap:eR})}),eo&&(0,i.jsx)(E,{className:"w-full",onClick:eo,children:null==(l=(null===_.Constants||void 0===_.Constants||null==(c=_.Constants.CAR_CONFIGURATOR)?void 0:c.REQUEST_OFFER)||"REQUEST OFFER")?void 0:l.toUpperCase()})]}),(0,i.jsx)(v,{isOpen:ep,setIsOpen:z,modalTitle:"",backDrop:em.width<768,modalClassName:es?"locatorModalConfig pt-[4rem] z-[98] ".concat((null==et?void 0:et.cls)||""):"locatorModal pt-[4rem] z-[98] ".concat((null==et?void 0:et.cls)||""),containerId:null==et?void 0:et.id,scrollable:es,children:(0,i.jsxs)("div",{className:"modal_data",children:[(0,i.jsx)("button",{type:"button",className:"modal-close",style:{to
1p:"0.35rem"},onClick:function(){z(!1)},children:(0,i.jsx)("img",{src:"".concat(h.configuration.IMG_STATIC_URL,"assets/images/modal-close.svg"),tabIndex:0,alt:"modal-close"})}),(0,i.jsxs)("div",{className:"locationCard",children:[(0,i.jsx)("h5",{className:"locationCard--dealerName capitalize",children:L.toUpperCase()}),(0,i.jsx)("div",{className:"max-w-[190px] text-default"}),(null==T||null==(d=T[0])?void 0:d.imageUrl)&&(0,i.jsx)("div",{className:"locationCard--dealerShowroomImages",children:(0,i.jsx)(R(),{src:T[0].imageUrl,alt:"Dealer_Image",width:320,height:186,style:{maxWidth:"100%",height:"auto"}})}),y&&(0,i.jsx)("div",{className:"locationCard--websiteUrl my-3",children:(0,i.jsx)("a",{href:eI(y),target:"blank",children:y})}),(Y||P)&&2!=en&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"locationCard--section mt-2",children:[(0,i.jsx)("div",{className:"text-medium font-SuzukiPROBold mb-1",children:(0,i.jsxs)("span",{id:"dealerType",children:[null===_.Constants||void 0===_.Constants||null==(u=_.Constants.locationCard)?void 0:u.SALES,":"]})}),(0,i.jsxs)("div",{className:"dealer--Icon flex my-[5px] text-default",id:"dealerIcon",children:[(0,i.jsx)(R(),{src:"".concat(h.configuration.IMG_URL,"icon-library/Car/directions_car-black.svg"),alt:"Sales_Image",width:12,height:12,style:{maxWidth:"100%",height:"auto",marginRight:"6px"}}),Y&&(0,i.jsxs)(i.Fragment,{children:[Y,(null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)=="true"?" ":", ","CZ"===h.configuration.COUNTRY_CODE&&(0,i.jsx)("br",{})]}),P&&(0,i.jsxs)(i.Fragment,{children:[P,"CZ"!==h.configuration.COUNTRY_CODE&&(0,i.jsx)("br",{})]}),K,(0,i.jsx)("div",{className:"flex-1 ml-1",children:Number.isFinite(Q)&&Number.isFinite(q)&&(0,i.jsx)("a",{href:"https://www.google.com/maps/place/".concat(Q,",").concat(q),target:"_blank",rel:"noreferrer",className:"navigationLink","aria-label":"Go to Maps"})})]}),(j||I)&&("HUN"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[j&&(0,i.jsx)("a",{href:"tel:+36".concat(j),children:ej(j)}),I&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+36".concat(I),children:ej(I)})]})]}):"SLA"===h.configuration.COUNTRY_CODE||"CRA"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[j&&(0,i.jsx)("a",{href:"tel:+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(j),children:"+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385"," ").concat(j)}),I&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(I),children:"+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(I)})]})]}):"SK"===h.configuration.COUNTRY_CODE||"CZ"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[j&&(0,i.jsx)("a",{href:"tel:+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420").concat(j),children:"+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420"," ").concat(j)}),I&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420").concat(I),children:"+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420"," ").concat(I)})]})]}):(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[j&&(0,i.jsx)("a",{href:"tel:".concat(j),children:j}),I&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:".concat(I),children:I})]})]}))]}),(0,i.jsx)("div",{className:"locationCard--email",children:k&&(0,i.jsx)("a",{href:"mailto:".concat(k),children:k})}),(0,i.jsx)("div",{className:"locationCard--distance locationCard--openCloseDetails",id:"dealerOpenCloseInfo",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"openClose-status",children:_.Constants.locationCard.DISTANCE}),G," ",(null==$?void 0:$.dealerRadiusUnit)?null==$?void 0:$.dealerRadiusUnit:h.configuration.DEFAULT_DISTANCE_UNIT]})})]}),(M||B)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"locationCard--section mt-3",children:[(0,i.jsx)("div",{className:"text-medium font-SuzukiPROBold mb-1",children:(0,i.jsxs)("span",{id:"dealerType",children:[null===_.Constants||void 0===_.Constants||null==(x=_.Constants.locationCard)?void 0:x.SERVICE,":"]})}),(0,i.jsxs)("div",{className:"dealer--Icon flex my-[5px] text-default",id:"dealerIcon",children:[(0,i.jsx)(R(),{src:"".concat(h.configuration.IMG_STATIC_URL,"Sales_and_ Service.svg"),alt:"Service_Image",width:14,height:14,style:{maxWidth:"100%",height:"auto",marginRight:"6px"}}),M&&(0,i.jsxs)(i.Fragment,{children:[M,(null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)=="true"?" ":", ","CZ"===h.configuration.COUNTRY_CODE&&(0,i.jsx)("br",{})]}),B&&(0,i.jsxs)(i.Fragment,{children:[B,"CZ"!==h.configuration.COUNTRY_CODE&&(0,i.jsx)("br",{})]}),el||K&&(0,i.jsx)(i.Fragment,{children:K}),(0,i.jsx)("div",{className:"flex-1 ml-1",children:Number.isFinite(X)&&Number.isFinite(J)&&(0,i.jsx)("a",{href:"https://www.google.com/maps/place/".concat(X,",").concat(J),target:"_blank",rel:"noreferrer",className:"navigationLink","aria-label":"Go to Maps"})})]}),(b||w)&&("HUN"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[b&&(0,i.jsx)("a",{href:"tel:+36".concat(b),children:ej(b)}),w&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+36".concat(w),children:ej(w)})]})]}):"SLA"===h.configuration.COUNTRY_CODE||"CRA"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[b&&(0,i.jsx)("a",{href:"tel:+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(b),children:"+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385"," ").concat(b)}),w&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(w),children:"+".concat("SLA"===h.configuration.COUNTRY_CODE?"386":"385").concat(w)})]})]}):"SK"===h.configuration.COUNTRY_CODE||"CZ"===h.configuration.COUNTRY_CODE?(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[b&&(0,i.jsx)("a",{href:"tel:+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420").concat(b),children:"+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420"," ").concat(b)}),w&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420").concat(w),children:"+".concat("SK"===h.configuration.COUNTRY_CODE?"421":"420"," ").concat(w)})]})]}):(0,i.jsxs)("div",{className:"locationCard--callDetail",children:[b&&(0,i.jsx)("a",{href:"tel:".concat(b),children:b}),w&&(0,i.jsxs)(i.Fragment,{children:[" ; ",(0,i.jsx)("a",{href:"tel:".concat(w),children:w})]})]})),(0,i.jsx)("div",{className:"locationCard--email",children:F&&(0,i.jsx)("a",{href:"mailto:".concat(F),children:F})})]}),(0,i.jsx)("div",{className:"locationCard--distance locationCard--openCloseDetails",id:"dealerOpenCloseInfo",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"openClose-status",children:_.Constants.locationCard.DISTANCE}),G," ",(null==$?void 0:$.dealerRadiusUnit)?null==$?void 0:$.dealerRadiusUnit:h.configuration.DEFAULT_DISTANCE_UNIT]})})]}),W&&(0,i.jsx)("div",{className:"bg-base-200",children:(0,i.jsxs)("div",{className:"collapse-title text-xl font-medium",children:[(0,i.jsx)("div",{className:"locationCard--openCloseDetails flex",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"openClose-status",children:"Closed"===eT(eL(eA))?_.Constants.locationCard.CLOSED:_.Constants.locationCard.OPEN}),"Closed"===eT(eL(eA))?null:eT(eL(eA)),(0,i.jsx)("img",{src:eS?"".concat(h.configuration.IMG_STATIC_URL,"assets/images/accordionUp.svg"):"".concat(h.configuration.IMG_STATIC_URL,"assets/images/cl-dropicon.svg"),alt:"",className:"ml-10 w-3 cursor-pointer",onClick:()=>{eU(e=>!e)}})]})}),(0,i.jsx)("div",{className:"collapse-content",style:{maxHeight:eS?"1000px":"0",transition:"max-height 0.2s ease-in-out",overflow:"hidden"},children:(0,i.jsx)("div",{className:"locationCard--cpanel-timings",children:(0,i.jsx)("ul",{id:"timingList",children:ey.map((e,n)=>(0,i.jsx)("li",{children:(0,i.jsx)("p",{children:(0,i.jsxs)("span",{style:{fontWeight:e===eA?"bold":"normal"},children:[e," ",eT(eL(e))]})})},n))})})})]})}),(0,i.jsx)("div",{className:"locationCard__CTAs",children:"SLA"
1==h.configuration.COUNTRY_CODE||(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)=="RO"||(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)=="CRA"||(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)=="CZ"||(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)=="SK"?(0,i.jsxs)(i.Fragment,{children:["find-dealer"===A&&(null==ee?void 0:ee.type)!==2&&(null==$?void 0:$.bookACallBack)&&(0,i.jsx)(g.A,{type:"button_dark_arrow_button",buttontext:_.Constants.layout.Floatbar_Title.Get_a_Quote,classname:"button_dark_arrow fullBorder__btn",onClick:()=>{eN((0,m.fi)(C.Pb.GET_QUOTE)),eN({type:r.pm,payload:!0}),eN({type:r.m_,payload:{...ee,index:V}}),z(!1)},noMinWidth:!0}),"find-dealer-2w"===A&&2!==ee.type&&(null==$?void 0:$.bookACallBack)&&(0,i.jsx)(g.A,{type:"button_dark_arrow_button",buttontext:_.Constants.layout.Floatbar_Title.Get_a_Quote,classname:"button_dark_arrow fullBorder__btn",onClick:()=>{eN((0,m.fi)(C.Pb.GET_QUOTE_2W)),eN({type:r.pm,payload:!0}),eN({type:r.m_,payload:{...ee,index:V}}),z(!1)},noMinWidth:!0}),"find-dealer"===A&&(null==ee?void 0:ee.type)!==2&&(null==$?void 0:$.bookATestDrive)&&(0,i.jsx)(g.A,{type:"button_dark_arrow_button",buttontext:_.Constants.locationCard.BOOK_A_TEST_DRIVE,onClick:()=>{eN((0,m.fi)(C.Pb.TEST_DRIVE)),eN({type:r.pm,payload:!0}),eN({type:r.m_,payload:{...ee,index:V}}),z(!1)},noMinWidth:!0}),"find-dealer"===A&&(null==$?void 0:$.bookAService)&&L&&("CRA"!==h.configuration.COUNTRY_CODE||"HUA251106"!==ee.code)&&("RO"!==h.configuration.COUNTRY_CODE||"HUA253738"!==ee.code)&&(0,i.jsx)(g.A,{type:"button_dark_arrow_button",buttontext:_.Constants.locationCard.BOOK_A_SERVICE,classname:"button_dark_arrow fullBorder__btn",onClick:()=>{eN((0,m.fi)(C.Pb.SERVICE)),eN({type:r.pm,payload:!0}),eN({type:r.m_,payload:{...ee,index:V}}),z(!1)},noMinWidth:!0})]}):(0,i.jsxs)(i.Fragment,{children:["find-dealer"===A&&(null==$?void 0:$.bookATestDrive)&&(0,i.jsx)(g.A,{type:"button_dark_arrow_button",buttontext:_.Constants.locationCard.BOOK_A_TEST_DRIVE,onClick:()=>{eN((0,m.fi)(C.Pb.TEST_DRIVE)),eN({type:r.pm,payload:!0}),eN({type:r.m_,payload:{...ee,index:V}}),z(!1)},noMinWidth:!0}),"find-dealer"===A&&(null==$?void 0:$.bookAService)&&L&&("CRA"!==h.configuration.COUNTRY_CODE||"HUA251106"!==ee.code)&&("RO"!==h.configuration.COUNTRY_CODE||"HUA253738"!==ee.code)&&(0,i.jsx)(g.A,{type:"button_dark_arrow_button",buttontext:_.Constants.locationCard.BOOK_A_SERVICE,classname:"button_dark_arrow fullBorder__btn",onClick:()=>{eN((0,m.fi)(C.Pb.SERVICE)),eN({type:r.pm,payload:!0}),eN({type:r.m_,payload:{...ee,index:V}}),z(!1)},noMinWidth:!0}),"find-dealer"===A&&(null==$?void 0:$.bookACallBack)&&(0,i.jsx)(g.A,{type:"button_dark_arrow_button",buttontext:_.Constants.locationCard.BOOK_A_CALLBACK,classname:"button_dark_arrow fullBorder__btn",onClick:()=>{eN((0,m.fi)(C.Pb.ENQUIRY)),eN({type:r.pm,payload:!0}),eN({type:r.m_,payload:{...ee,index:V}}),z(!1)},noMinWidth:!0}),"find-dealer-2w"===A&&(null==$?void 0:$.bookACallBack)&&(0,i.jsx)(g.A,{type:"button_dark_arrow_button",buttontext:_.Constants.locationCard.BOOK_A_CALLBACK,classname:"button_dark_arrow fullBorder__btn",onClick:()=>{eN((0,m.fi)(C.Pb.ENQUIRY_2W)),eN({type:r.pm,payload:!0}),eN({type:r.m_,payload:{...ee,index:V}}),z(!1)},noMinWidth:!0})]})})]})]})})]})})}var L=a(34831),T=a(12420),y=a(91040),j=a(88062),I=a(58149),b=a(21505),w=a(60551);let k=e=>y.A.get(e,h.configuration.HEADER_DEALER_LOCATOR).then(e=>e.data);function F(e){var n,a,l,s,c,d,u,v,g,m,C,x,R,A,E,p,D,S;let{wheel:U,currentLat:y,currentLng:F,mapRadius:Y,dealerData:P,isLocationPermissionAllowed:M,isSearchBoxUsed:B,onDealerSelect:K,locatorContainer:G}=e;"Mile"===P.dealerRadiusUnit&&(Y=1.60934*Number(Y));let W=F||h.configuration.COUNTRY_DEFAULT_LONG,V=y||h.configuration.COUNTRY_DEFAULT_LAT,Z="find-dealer"==U?h.configuration.COMMON_MASTER_LOB:"find-dealer-2w"==U?h.configuration.COMMON_MASTER_LOB_2W:"find-dealer-marine"==U?h.configuration.COMMON_MASTER_LOB_MARINE:null,z=(null==P?void 0:P.dealerRadiusUnit)?Y:h.configuration.DEFAULT_DISTANCE_UNIT?1.60934*Y:Y,H=(0,f.A)(),[Q,q]=(0,o.useState)([]),[X,J]=(0,o.useState)([]),[$,ee]=(0,o.useState)([]),en=H.width<768,[ea,ei]=(0,o.useState)(!1),[el,eo]=(0,o.useState)("singleDealer--card"),[et,er]=(0,o.useState)(!1),[es,ec]=(0,o.useState)(null),[ed,eu]=(0,o.useState)(null),[ev,ef]=(0,o.useState)(null),eg=(0,o.useRef)(null),{stockLevels:em,loading:eC}=(0,N.N)(),eh=e=>{var n;let a=null==(n=eg.current)?void 0:n.scrollTop;ec(e),setTimeout(()=>{eg.current&&(eg.current.scrollTop=a)},0)},{data:e_,error:ex}=(0,I.Ay)("".concat(h.configuration.DEALER_URL,"?longitude=").concat(W,"&latitude=").concat(V,"&radius=").concat(z,"&lob=").concat(Z,"&status=true").concat((null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)!="HUN"&&(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)!="RO"||"false"!=M&&M||"false"!=B&&B?"":"&sort=name"),k),[eR,eA]=(0,o.useState)(!1),{enrichedDealers:eE}=(0,b.J)(null==e_?void 0:e_.data,V,W,eR),ep=(0,w.hQ)(),eD=ep&&(null==e_?void 0:e_.data)&&!eE;console.log("isDriveDistanceFeatureEnabled",ep);let eN=(0,t.wA)();(0,o.useEffect)(()=>
1{if(null==e_?void 0:e_.data){var e;null==e_||null==(e=e_.data)||e.map(e=>e.name),eN({type:r.YR,payload:null==e_?void 0:e_.data})}},[null==e_?void 0:e_.data]),(0,t.d4)(e=>e.app.dealers);let eS=eE||(null==e_?void 0:e_.data),eU=(null==eS?void 0:eS.map(e=>({lat:null==e?void 0:e.latitude,lng:null==e?void 0:e.longitude})))||[],eO=o.useMemo(()=>Array.isArray(eS)?[...eS]:[],[eS]),eL=(0,o.useRef)([]),eT=(0,o.useRef)(null),[ey,ej]=(0,o.useState)([]),[eI,eb]=(0,o.useState)(null),ew=(e,n,a,i,l,o)=>{let t=Array.isArray(n)&&n.length?n:eL.current,r=i||eT.current,s=a||eU;if(!t||!r)return;let c=o||ed,d={url:"".concat(h.configuration.IMG_STATIC_URL,"assets/images/RedIcon.png")},u={url:"".concat(h.configuration.IMG_STATIC_URL,"assets/images/BlueIcon.png")},v=null==l?void 0:l.code;if(v&&"locationCard"===c)for(let e=0;e<t.length;e++){var f;let n=t[e],a=null==n||null==(f=n.dataIndexValue)?void 0:f.code;if(v&&a===v){n.setIcon(d);try{let e=n.getPosition();e&&r.setCenter(e)}catch(e){}}else n.setIcon(u)}if("number"==typeof e&&s&&s[e])try{"locationCard"===c&&r.setCenter(s[e])}catch(e){}},ek=[],eF=e=>{ek.push(e)},eY=(0,o.useRef)(null);(0,o.useEffect)(()=>{new T.aH({apiKey:h.configuration.MAPS_API_KEY,version:"weekly",libraries:["places"]}).load().then(()=>{eA(!0),(()=>{let e;if(!eY.current)return;let n=[];e=new google.maps.Map(eY.current,{center:{lat:V,lng:W},zoom:0!=eO.length?(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)=="SLA"?8:7:8,mapTypeControl:!0,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DEFAULT,position:google.maps.ControlPosition.TOP_LEFT}}),new google.maps.InfoWindow({content:"",disableAutoPan:!0});let a=e=>e&&!isNaN(e),i=[];if(eO.forEach((n,l)=>{let o=a(n.latitude)&&a(n.longitude),t=a(n.serviceLatitude)&&a(n.serviceLongitude);if(!o&&!t)return;let r="".concat(h.configuration.IMG_STATIC_URL,"assets/images/BlueIcon.png"),s="".concat(h.configuration.IMG_STATIC_URL,"assets/images/RedIcon.png");if(o&&(null==n?void 0:n.type)!==2){let a={lat:n.latitude,lng:n.longitude},o=new google.maps.Marker({position:a,icon:r});o.isService=!1,o.dataIndexValue=eO[l],google.maps.event.addListener(o,"click",function(){i.forEach(e=>e.setIcon(r)),this.setIcon(s);for(let e=0;e<i.length;e++)this===i[e]&&er(e);if(en)ei(this.dataIndexValue),eo("activesingleDealer--card");else{var n;ef(null==(n=this.dataIndexValue)?void 0:n.code),ec(0),e.setCenter(a)}}),i.push(o)}if(t&&(null==n?void 0:n.type)!==1&&(!o||n.latitude!==n.serviceLatitude||n.longitude!==n.serviceLongitude)){let a={lat:n.serviceLatitude,lng:n.serviceLongitude},o=new google.maps.Marker({position:a,icon:r});o.isService=!0,o.dataIndexValue=eO[l],google.maps.event.addListener(o,"click",function(){i.forEach(e=>e.setIcon(r)),this.setIcon(s);for(let e=0;e<i.length;e++)this===i[e]&&er(e);if(en)ei(this.dataIndexValue),eo("activesingleDealer--card");else{var n;ef(null==(n=this.dataIndexValue)?void 0:n.code),ec(0),e.setCenter(a)}}),i.push(o)}}),n=i,(!0===B||"true"===B)&&i.length>0&&eO.length>0){var l;let n=0,a=1/0;eO.forEach((e,i)=>{let l=parseFloat(e.distance);!isNaN(l)&&l<a&&(a=l,n=i)});let o=null==(l=eO[n])?void 0:l.code,t=null,r=i.filter(e=>{var n;return(null==(n=e.dataIndexValue)?void 0:n.code)===o});if(t=r.find(e=>!e.isService)||r.find(e=>e.isService)||null){t.setIcon("".concat(h.configuration.IMG_STATIC_URL,"assets/images/RedIcon.png"));try{let n=t.getPosition();n&&e.setCenter(n)}catch(e){console.error("Failed to center map on nearest dealer:",e)}}if(t)try{let n=t.getPosition(),a=n.lat(),l=n.lng(),o=[n];if(i.forEach(e=>{if(e===t)return;let n=e.getPosition();n&&30>=((e,n,a,i)=>{let l=e=>e*Math.PI/180,o=l(a-e),t=l(i-n),r=Math.sin(o/2)*Math.sin(o/2)+Math.cos(l(e))*Math.cos(l(a))*Math.sin(t/2)*Math.sin(t/2);return 12742*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))})(a,l,n.lat(),n.lng())&&o.push(n)}),o.length>1){let a=new google.maps.LatLngBounds;o.forEach(e=>a.extend(e)),e.fitBounds(a),google.maps.event.addListenerOnce(e,"idle",()=>{let a=e.getZoom();a>15?e.setZoom(15):a<12&&e.setZoom(12),e.setCenter(n)})}}catch(e){}}new L.w1({markers:n,map:e,renderer:{render:e=>{let{count:n,position:a}=e;return new google.maps.Marker({label:{text:String(n),color:"#FFFFFF",fontSize:"14px",fontWeight:"600"},icon:{url:"".concat(h.configuration.IMG_STATIC_URL,"assets/images/dealer-cluster.png"),scaledSize:new google.maps.Size(45,45)},position:a,zIndex:Number(google.maps.Marker.MAX_ZINDEX)+n})}}}).onClusterClick=function(e,a,i){let l=Object.assign({},a).markers,o=[];for(let e in l)o.push(l[e].dataIndexValue);ej(n),eb(i),J(o),i.fitBounds(a.bounds),en||(document.getElementById("listing-scroller").style.display="block")},eL.current=Array.isArray(n)&&n.flat?n.flat():n,eT.current=e})()})},[eO,V,W]),(0,o.useEffect)(()=>
1{if((!0===B||"true"===B)&&eO.length>0){var e;let n=0,a=1/0;eO.forEach((e,i)=>{let l=parseFloat(e.distance);!isNaN(l)&&l<a&&(a=l,n=i)});let i=null==(e=eO[n])?void 0:e.code;i&&(ef(i),ec(0))}},[B,eO,V,W]);let eP=o.useMemo(()=>{let e=[...eO];if(M)eE&&e.sort((e,n)=>(parseFloat(e.distance)||0)-(parseFloat(n.distance)||0));else switch(null==P?void 0:P.sort_by){case"asc":e.sort((e,n)=>e.name.localeCompare(n.name));break;case"desc":e.sort((e,n)=>n.name.localeCompare(e.name));break;case"distance":e.sort((e,n)=>(parseFloat(e.distance)||0)-(parseFloat(n.distance)||0))}if(ev){let n=e.findIndex(e=>(null==e?void 0:e.code)===ev);if(n>0){let[a]=e.splice(n,1);e.unshift(a)}}return e},[eO,null==P?void 0:P.sort_by,M,eE,ev]);return(0,i.jsxs)("div",{className:"relative container-fluid locatorContainer",children:[(0,i.jsx)("div",{id:"listing-scroller",ref:eg,className:en&&Q?"hidden locatorContainer--listing":"locatorContainer--listing",children:(0,i.jsxs)("div",{className:"",children:[(0,i.jsx)("ul",{className:"px-4",children:eD?(0,i.jsx)("h3",{className:"text-center text-light-gray",children:_.Constants.findDealer.LOADING+"..."}):eO.length<=0?(0,i.jsx)("h3",{className:"text-center text-light-gray",children:e_?_.Constants.findDealer.NO_DEALERS_FOUND:_.Constants.findDealer.LOADING+"..."}):null==eP?void 0:eP.map((e,n)=>{var a,l,o,t,r,s,c,d,u,v,f,g,m,C,_,x,R;return(0,i.jsx)("li",{children:(0,i.jsx)(O,{wheel:U,openDialogue:eF,data:e,timings:e.timings,dealerImages:null==e?void 0:e.dealerImages,openDealerIndex:es,setOpenDealerIndex:eh,dealerName:null==e?void 0:e.name,telephone:null==e?void 0:e.primaryPhoneNumber,serviceTelephone:null==e?void 0:e.servicePrimaryPhoneNumber,alternatePhoneNumber:null==e?void 0:e.alternatePhoneNumber,serviceAlternatePhoneNumber:null==e?void 0:e.serviceAlternatePhoneNumber,primaryEmail:null==e?void 0:e.primaryEmail,servicePrimaryEmail:null==e?void 0:e.servicePrimaryEmail,websiteUrl:null==e?void 0:e.websiteUrl,address1:"".concat((null==e?void 0:e.addressLine1)?null==e?void 0:e.addressLine1:""),address2:"CZ"===h.configuration.COUNTRY_CODE?"".concat((null==(a=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel5:null==e?void 0:e.addressLevel5)?void 0:a.name)||"").concat((null==(l=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel5:null==e?void 0:e.addressLevel5)?void 0:l.name)?(null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)=="true"?" ":",":""):(null==e?void 0:e.addressLine2)||"",serviceAddressLine1:"".concat((null==e?void 0:e.serviceAddressLine1)?null==e?void 0:e.serviceAddressLine1:""),serviceAddressLine2:"CZ"===h.configuration.COUNTRY_CODE?"".concat((null==(o=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel5:null==e?void 0:e.addressLevel5)?void 0:o.name)||"").concat((null==(t=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel5:null==e?void 0:e.addressLevel5)?void 0:t.name)?(null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)=="true"?" ":",":""):(null==e?void 0:e.serviceAddressLine2)||"",serviceAddressLine3:"CZ"===h.configuration.COUNTRY_CODE&&(null==e?void 0:e.serviceAddressLine2),address3:"".concat((null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="CZ"?(null==e?void 0:e.addressLine2)?(null==e?void 0:e.addressLine2)+((null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)==="true"?" ":","):"":(null==(r=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel5:null==e?void 0:e.addressLevel5)?void 0:r.name)?(null==(s=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel5:null==e?void 0:e.addressLevel5)?void 0:s.name)+",":"","\n ").concat((null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="SK"?"":(null==(c=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel4:null==e?void 0:e.addressLevel4)?void 0:c.name)?(null==(d=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel4:null==e?void 0:e.addressLevel4)?void 0:d.name)+",":"","\n ").concat((null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="SK"?"":(null==(u=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel3:null==e?void 0:e.addressLevel3)?void 0:u.name)?(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="CZ"?"":(null==(v=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel3:null==e?void 0:e.addressLevel3)?void 0:v.name)+((null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)==="true"?" ":","):"").concat((null==(f=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel2:null==e?void 0:e.addressLevel2)?void 0:f.name)?(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="SK"||(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="CZ"?"":(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="SLA"?null==(g=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel2:null==e?void 0:e.addressLevel2)?void 0:g.name:(null==(m=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel2:null==e?void 0:e.addressLevel2)?void 0:m.name)+",":"").concat((null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="SLA"||(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="CZ"?"":(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)!=="VNM"&&(null==(C=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel1:null==e?void 0:e.addressLevel1)?void 0:C.name)?null==(_=(null==e?void 0:e.type)===2?null==e?void 0:e.serviceAddressLevel1:null==e?void 0:e.addressLevel1)?void 0:_.name:(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="VNM"&&(null==e||null==(x=e.country)?void 0:x.name)?null==e||null==(R=e.country)?void 0:R.name:""),distance:parseFloat(null==e?void 0:e.distance).toFixed(2),indexValue:n,updateMap:()=>ew(n,ey,eU,eI,e),mWidth:en,selectedLat:null==e?void 0:e.latitude,serviceLat:null==e?void 0:e.serviceLatitude,selectedLong:null==e?void 0:e.longitude,serviceLong:null==e?void 0:e.serviceLongitude,dealerData:P,dealerType:null==e?void 0:e.type,markerSource:ed,setMarkerSource:eu,onDealerSelect:K?()=>null==K?void 0:K(e):null,locatorContainer:G,stockLevels:em},n+1+"abc")},n)})}),(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)=="VNM"?(0,i.jsx)("p",{className:"text-center text-light-gray",children:null===_.Constants||void 0===_.Constants||null==(n=_.Constants.findDealerPage)?void 0:n.DISCLAIMER}):""]})}),(0,i.jsx)("div",{className:en&&!Q?"hidden locatorContainer--map":" locatorContainer--map",id:"map",ref:eY}),en&&ea?(0,i.jsxs)("div",{className:el,children:[(0,i.jsx)(O,{wheel:U,data:ea,dealerData:P,openDealerIndex:es,setOpenDealerIndex:eh,openDialogue:eF,dealerName:null==ea?void 0:ea.name,telephone:null==ea?void 0:ea.primaryPhoneNumber,address1:"".concat((null==ea?void 0:ea.addressLine1)?null==ea?void 0:ea.addressLine1:""),address2:"CZ"===h.configuration.COUNTRY_CODE?"".concat((null==(a=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel5:null==ea?void 0:ea.addressLevel5)?void 0:a.name)||"").concat((null==(l=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel5:null==ea?void 0:ea.addressLevel5)?void 0:l.name)?(null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)=="true"?" ":",":""):(null==ea?void 0:ea.addressLine2)||"",servicePrimaryEmail:null==ea?void 0:ea.servicePrimaryEmail,websiteUrl:null==ea?void 0:ea.websiteUrl,serviceTelephone:null==ea?void 0:ea.servicePrimaryPhoneNumber,serviceAddressLine1:"".concat((null==ea?void 0:ea.serviceAddressLine1)?null==ea?void 0:ea.serviceAddressLine1:""),serviceAddressLine2:"CZ"===h.configuration.COUNTRY_CODE?"".concat((null==(s=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel5:null==ea?void 0:ea.addressLevel5)?void 0:s.name)||"").concat((null==(c=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel5:null==ea?void 0:ea.addressLevel5)?void 0:c.name)?(null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)=="true"?" ":",":""):(null==ea?void 0:ea.serviceAddressLine2)||"",address3:"".concat((null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="CZ"?(null==ea?void 0:ea.addressLine2)?(null==ea?void 0:ea.addressLine2)+((null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)==="true"?" ":","):"":(null==(d=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel5:null==ea?void 0:ea.addressLevel5)?void 0:d.name)?(null==(u=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel5:null==ea?void 0:ea.addressLevel5)?void 0:u.name)+",":"").concat((null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="SK"?"":(null==(v=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel4:null==ea?void 0:ea.addressLevel4)?void 0:v.name)?(null==(g=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel4:null==ea?void 0:ea.addressLevel4)?void 0:g.name)+",":"").concat((null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="SK"?"":(null==(m=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel3:null==ea?void 0:ea.addressLevel3)?void 0:m.name)?(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="CZ"?"":(null==(C=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel3:null==ea?void 0:ea.addressLevel3)?void 0:C.name)+((null===h.configuration||void 0===h.configuration?void 0:h.configuration.SPACE_SEPERATOR)==="true"?" ":","):"").concat((null==(x=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel2:null==ea?void 0:ea.addressLevel2)?void 0:x.name)?(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="SK"||(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="CZ"?"":(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="SLA"?null==(R=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel2:null==ea?void 0:ea.addressLevel2)?void 0:R.name:(null==(A=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel2:null==ea?void 0:ea.addressLevel2)?void 0:A.name)+",":"").concat((null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="SLA"||(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="CZ"?"":(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)!=="VNM"&&(null==(E=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel1:null==ea?void 0:ea.addressLevel1)?void 0:E.name)?null==(p=(null==ea?void 0:ea.type)===2?null==ea?void 0:ea.serviceAddressLevel1:null==ea?void 0:ea.addressLevel1)?void 0:p.name:(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)==="VNM"&&(null==ea||null==(D=ea.country)?void 0:D.name)?null==ea||null==(S=ea.country)?void 0:S.name:""),dealerType:null==ea?void 0:ea.type,distance:parseFloat(null==ea?void 0:ea.distance).toFixed(2),updateMap:()=>ew(et,ey,eU,eI),mWidth:en,selectedLat:null==ea?void 0:ea.latitude,selectedLong:null==ea?void 0:ea.longitude,locatorContainer:G,stockLevels:em}),(0,i.jsx)("div",{className:"dealer-cross absolute top-[12px] right-[12px]",children:(0,i.jsx)(j.A,{className:"block w-6 h-6","aria-hidden":"true",onClick:()=>{ei(!1)}})})]}):null,en?(0,i.jsx)("div",{className:"locatorlistMapToggler",children:(0,i.jsx)("div",{className:"findDealer__options--optionList",id:"dealerOptionsList",children:(0,i.jsxs)("ul",{style:{whiteSpace:"break-spaces"},className:"px-4",children:[(0,i.jsxs)("li",{style:{maxWidth:"80%",marginRight:"10px"},children:[(0,i.jsx)("input",{id:"LocatorMap",className:"hidden fradio",type:"radio",name:"LocatorRadio",onClick:()=>{q(!0)},checked:!!en&&!!Q}),(0,i.jsx)("label",{htmlFor:"LocatorMap",className:"fradio",children:_.Constants.findDealer.MAP})]}),(0,i.jsxs)("li",{children:[(0,i.jsx)("input",{id:"LocatorList",className:"hidden fradio",type:"radio",name:"LocatorRadio",onClick:()=>{q(!1)}}),(0,i.jsx)("label",{htmlFor:"LocatorList",className:"fradio h-full",children:_.Constants.findDealer.LIST})]})]})})}):null]})}var Y=a(63596),P=a(29308),M=a(77328),B=a.n(M);function K(e){var n,a,l;let{wheel:t,lob:r,header:s,onDealerSelect:c,locatorContainer:d}=e,[u,v]=(0,o.useState)(!1),[f,g]=(0,o.useState)(!0),[m,C]=(0,o.useState)(""),[x,R]=(0,o.useState)(""),[A,E]=(0,o.useState)(h.configuration.DEFAULT_MAP_RADIUS),[p,D]=(0,o.useState)({}),[N,S]=(0,o.useState)({isReady:!1,isLocationPermissionGranted:!1,isSearchBoxUsed:!1}),[U,O]=(0,o.useState)({longitude:"",latitude:"",dealerRadius:"",dealerRadiusUnit:"",bookACallBack:"",bookAService:"",bookATestDrive:"",published:""}),L=e=>{g(!0),E(e.target.value),g(!1)};function y(){let e=document.getElementById("locationSearch");if(!e||!window.google||!window.google.maps||!window.google.maps.places)return;let n={fields:["formatted_address","geometry","icon","name"],componentRestrictions:{componentRestrictions:{country:"GER"===h.configuration.COUNTRY_CODE?"DE":"CRA"===h.configuration.COUNTRY_CODE?"HR":"SLA"===h.configuration.COUNTRY_CODE?"SI":h.configuration.COUNTRY_CODE}},strictBounds:!1,types:[]},a=new window.google.maps.places.Autocomplete(e,n);a.addListener("place_changed",function(){var e=a.getPlace();void 0!=e.geometry?(g(!0),C(e.geometry.location.lat()),R(e.geometry.location.lng()),g(!1),S({...N,isReady:!0,isSearchBoxUsed:!0})):S({...N,isReady:!0,isSearchBoxUsed:!1})})}function j(e){g(!0);let n=e.coords;C(Number(n.latitude)),R(Number(n.longitude)),S({...N,isReady:!0,isLocationPermissionGranted:!0}),g(!1)}return(0,o.useEffect)(()=>
1{if(window.google&&window.google.maps&&window.google.maps.places)y();else{let e=setInterval(()=>{window.google&&window.google.maps&&window.google.maps.places&&(y(),clearInterval(e))},100);return()=>clearInterval(e)}},[]),(0,o.useEffect)(()=>{g(!0),v(!1),(async()=>{var e,n,a,i,l;let o=await (0,Y.c)(r);E((null==o||null==(e=o.data)?void 0:e.dealerRadius)?null==o||null==(n=o.data)?void 0:n.dealerRadius:h.configuration.DEFAULT_MAP_RADIUS),C(null==o||null==(a=o.data)?void 0:a.latitude),R(null==o||null==(i=o.data)?void 0:i.longitude),O(null==o?void 0:o.data),D(null==o||null==(l=o.data)?void 0:l.seo_settings),new T.aH({apiKey:h.configuration.MAPS_API_KEY,version:"weekly",libraries:["places"]}).load().then(()=>{y()}),navigator.geolocation&&navigator.geolocation.getCurrentPosition(j,e=>{!function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(S({...N,isReady:!0,isLocationPermissionGranted:!1}),e.code){case e.PERMISSION_DENIED:case e.POSITION_UNAVAILABLE:case e.TIMEOUT:case e.UNKNOWN_ERROR:g(!0),C(Number(null==n?void 0:n.latitude)||h.configuration.COUNTRY_DEFAULT_LAT),R(Number(null==n?void 0:n.longitude)||h.configuration.COUNTRY_DEFAULT_LONG),g(!1)}}(e,o.data)})})(),g(!1),v(!0)},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(B(),{children:[(null==p?void 0:p.meta_desc)&&(0,i.jsx)("meta",{name:"description",content:null==p?void 0:p.meta_desc}),(null==p?void 0:p.keywords)&&(0,i.jsx)("meta",{name:"keywords",content:null==p?void 0:p.keywords})]}),(0,i.jsx)(P.A,{title:null==p?void 0:p.meta_title}),(0,i.jsxs)("div",{className:"container-fluid findDealer",children:[(0,i.jsxs)("div",{className:"container",style:{marginBottom:"5px"},children:[s||(0,i.jsx)("h1",{className:"findDealer__heading",children:_.Constants.findDealerPage.FIND_A_DEALER}),(0,i.jsxs)("div",{className:"findDealer__options",id:"dealerOptions",children:[(0,i.jsx)("div",{className:"findDealer__options--optionList",id:"dealerOptionsList",children:(0,i.jsxs)("ul",{role:"radiogroup",children:["true"==h.configuration.SHOW_DEALER_RADIUS.RADIUS_1&&(0,i.jsxs)("li",{children:[(0,i.jsx)("input",{id:"new-car-sales",className:"hidden fradio",type:"radio",name:"new-car-sales",value:h.configuration.DEALER_RADIUS.RADIUS_1,onChange:L,checked:h.configuration.DEALER_RADIUS.RADIUS_1==A,"aria-labelledby":"new-car-sales-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_1==A}),(0,i.jsxs)("label",{htmlFor:"new-car-sales",className:"fradio",role:"radio",tabIndex:0,id:"new-car-sales-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_1==A,"aria-label":"".concat(h.configuration.DEALER_RADIUS.RADIUS_1," ").concat((null==U?void 0:U.dealerRadiusUnit)||h.configuration.DEFAULT_DISTANCE_UNIT).concat(h.configuration.DEALER_RADIUS.RADIUS_1==A?" checked":""),onKeyDown:e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();let n=document.getElementById("new-car-sales");n&&!n.checked&&n.click()}},children:[h.configuration.DEALER_RADIUS.RADIUS_1," ",(null==U?void 0:U.dealerRadiusUnit)?null==U?void 0:U.dealerRadiusUnit:h.configuration.DEFAULT_DISTANCE_UNIT]})]}),"true"==h.configuration.SHOW_DEALER_RADIUS.RADIUS_2&&(0,i.jsxs)("li",{children:[(0,i.jsx)("input",{id:"new-car-sales1",className:"hidden fradio",type:"radio",name:"new-car-sales",value:h.configuration.DEALER_RADIUS.RADIUS_2,onChange:L,checked:h.configuration.DEALER_RADIUS.RADIUS_2==A,"aria-labelledby":"new-car-sales1-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_2==A}),(0,i.jsxs)("label",{htmlFor:"new-car-sales1",className:"fradio",role:"radio",tabIndex:0,id:"new-car-sales1-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_2==A,"aria-label":"".concat(h.configuration.DEALER_RADIUS.RADIUS_2," ").concat((null==U?void 0:U.dealerRadiusUnit)||h.configuration.DEFAULT_DISTANCE_UNIT).concat(h.configuration.DEALER_RADIUS.RADIUS_2==A?" checked":""),onKeyDown:e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();let n=document.getElementById("new-car-sales1");n&&!n.checked&&n.click()}},children:[h.configuration.DEALER_RADIUS.RADIUS_2," ",(null==U?void 0:U.dealerRadiusUnit)?null==U?void 0:U.dealerRadiusUnit:h.configuration.DEFAULT_DISTANCE_UNIT]})]}),"true"==h.configuration.SHOW_DEALER_RADIUS.RADIUS_3&&(0,i.jsxs)("li",{children:[(0,i.jsx)("input",{id:"new-car-sales2",className:"hidden fradio",type:"radio",name:"new-car-sales",value:h.configuration.DEALER_RADIUS.RADIUS_3,onChange:L,checked:h.configuration.DEALER_RADIUS.RADIUS_3==A,"aria-labelledby":"new-car-sales2-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_3==A}),(0,i.jsxs)("label",{htmlFor:"new-car-sales2",className:"fradio",role:"radio",tabIndex:0,id:"new-car-sales2-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_3==A,"aria-label":"".concat(h.configuration.DEALER_RADIUS.RADIUS_3," ").concat((null==U?void 0:U.dealerRadiusUnit)||h.configuration.DEFAULT_DISTANCE_UNIT).concat(h.configuration.DEALER_RADIUS.RADIUS_3==A?" checked":""),onKeyDown:e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();let n=document.getElementById("new-car-sales2");n&&!n.checked&&n.click()}},children:[h.configuration.DEALER_RADIUS.RADIUS_3," ",(null==U?void 0:U.dealerRadiusUnit)?null==U?void 0:U.dealerRadiusUnit:h.configuration.DEFAULT_DISTANCE_UNIT]})]}),"true"==h.configuration.SHOW_DEALER_RADIUS.RADIUS_4&&(0,i.jsxs)("li",{children:[(0,i.jsx)("input",{id:"new-car-sales3",className:"hidden fradio",type:"radio",name:"new-car-sales",value:h.configuration.DEALER_RADIUS.RADIUS_4,onCh
1ange:L,checked:h.configuration.DEALER_RADIUS.RADIUS_4==A,"aria-labelledby":"new-car-sales3-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_4==A}),(0,i.jsxs)("label",{htmlFor:"new-car-sales3",className:"fradio",role:"radio",tabIndex:0,id:"new-car-sales3-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_4==A,"aria-label":"".concat(h.configuration.DEALER_RADIUS.RADIUS_4," ").concat((null==U?void 0:U.dealerRadiusUnit)||h.configuration.DEFAULT_DISTANCE_UNIT).concat(h.configuration.DEALER_RADIUS.RADIUS_4==A?" checked":""),onKeyDown:e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();let n=document.getElementById("new-car-sales3");n&&!n.checked&&n.click()}},children:[h.configuration.DEALER_RADIUS.RADIUS_4," ",(null==U?void 0:U.dealerRadiusUnit)?null==U?void 0:U.dealerRadiusUnit:h.configuration.DEFAULT_DISTANCE_UNIT]})]}),"true"==h.configuration.SHOW_DEALER_RADIUS.RADIUS_5&&(0,i.jsxs)("li",{children:[(0,i.jsx)("input",{id:"new-car-sales4",className:"hidden fradio",type:"radio",name:"new-car-sales",value:h.configuration.DEALER_RADIUS.RADIUS_5,onChange:L,checked:h.configuration.DEALER_RADIUS.RADIUS_5==A,"aria-labelledby":"new-car-sales4-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_5==A}),(0,i.jsxs)("label",{htmlFor:"new-car-sales4",className:"fradio",role:"radio",tabIndex:0,id:"new-car-sales4-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_5==A,"aria-label":"".concat(h.configuration.DEALER_RADIUS.RADIUS_5," ").concat((null==U?void 0:U.dealerRadiusUnit)||h.configuration.DEFAULT_DISTANCE_UNIT).concat(h.configuration.DEALER_RADIUS.RADIUS_5==A?" checked":""),onKeyDown:e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();let n=document.getElementById("new-car-sales4");n&&!n.checked&&n.click()}},children:[h.configuration.DEALER_RADIUS.RADIUS_5," ",(null==U?void 0:U.dealerRadiusUnit)?null==U?void 0:U.dealerRadiusUnit:h.configuration.DEFAULT_DISTANCE_UNIT]})]}),"true"==h.configuration.SHOW_DEALER_RADIUS.RADIUS_6&&(0,i.jsxs)("li",{children:[(0,i.jsx)("input",{id:"new-car-sales5",className:"hidden",type:"radio",name:"new-car-sales",value:h.configuration.DEALER_RADIUS.RADIUS_6,onChange:L,checked:h.configuration.DEALER_RADIUS.RADIUS_6==A,"aria-labelledby":"new-car-sales5-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_6==A}),(0,i.jsxs)("label",{htmlFor:"new-car-sales5",className:"fradio",role:"radio",tabIndex:0,id:"new-car-sales5-label","aria-checked":h.configuration.DEALER_RADIUS.RADIUS_6==A,"aria-label":"".concat(h.configuration.DEALER_RADIUS.RADIUS_6," ").concat((null==U?void 0:U.dealerRadiusUnit)||h.configuration.DEFAULT_DISTANCE_UNIT).concat(h.configuration.DEALER_RADIUS.RADIUS_6==A?" checked":""),onKeyDown:e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();let n=document.getElementById("new-car-sales5");n&&!n.checked&&n.click()}},children:[_.Constants.findDealerPage.ALL," "]})]})]})}),(0,i.jsx)("div",{className:"findDealer__options--search group",children:(0,i.jsxs)("div",{className:"input-group",children:[(0,i.jsx)("input",{type:"text",placeholder:null==(n=_.Constants.findDealerPage)?void 0:n.Location,id:"locationSearch",name:"locationSearch"}),(0,i.jsx)("button",{type:"button",className:"group-hover:bg-primary-blue group-hover:text-inverted",children:(0,i.jsx)("img",{src:"".concat(h.configuration.IMG_STATIC_URL,"assets/images/blue-search.svg"),className:"group-hover:invert",alt:"Search-Icon",style:{height:"15px",width:"15px"}})})]})})]})]}),f&&(0,i.jsx)("div",{className:"absolute top-1/2 left-1/2 ",children:(0,i.jsx)("span",{className:"loader"})}),!f&&u&&""!=m&&""!=x&&(null==N?void 0:N.isReady)&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(F,{wheel:"find-dealer-2w"===t||"find-dealer-marine"===t?t:"find-dealer",currentLat:m,currentLng:x,mapRadius:A,dealerData:U,isLocationPermissionAllowed:null==N?void 0:N.isLocationPermissionGranted,isSearchBoxUsed:null==N?void 0:N.isSearchBoxUsed,onDealerSelect:c,locatorContainer:d})}),(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)=="VNM"&&(0,i.jsx)("div",{className:" m-2",children:(0,i.jsx)("h2",{className:"locationCard--dealerName flex capitalize font-suzukiRegular ml-[46px]",id:"dealerLocationCard",children:(null===h.configuration||void 0===h.configuration?void 0:h.configuration.COUNTRY_CODE)=="VNM"?(null===_.Constants||void 0===_.Constants||null==(a=_.Constants.findDealerPage)?void 0:a.DISCLAIMER_BOTTOM)?"* "+(null===_.Constants||void 0===_.Constants||null==(l=_.Constants.findDealerPage)?void 0:l.DISCLAIMER_BOTTOM):"* Dá»ch vụ: CÆ¡ sá» Bảo h\xe0nh bảo dưỡng ":""})})]})]})}var G=a(89099),W=a(87530),V=a(90078),Z=a(80476);let z="send_to_dealer",H=e=>{let{open:n,onClose:a}=e,s=(0,t.wA)(),[c,d]=(0,o.useState)(!1),u=(0,p.A)(),v=(0,V.A)();(0,G.useRouter)().pathname.includes("/configurator");let{form:f,lob:g}=(0,t.d4)(e=>{var n;let{app:a}=e;return{form:null==(n=a.forms)?void 0:n.find(e=>e.form_name===W.F3),lob:a.LobValue}}),m=(0,o.useCallback)(e=>{s({type:r.x2,payload:{dealer:e}}),d(!0)},[s]);return(0,o.useEffect)(()=>{let e=e=>{"locationBtn"===e.target.id&&setTimeout(()=>e.target.scrollIntoView({block:"center"}),10)};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},[]),(0,i.jsx)(l.Modal,{open:n,onClose:a,classNames:{modal:"form-modal__container ".concat(c?"":"lg:max-w-[80vw!important]")},children:c?(0,i.jsx)(Z.A,{data:f,onClose:()=>d(!1),disabledKeys:{model_code:!0,variant_code:!0,color_code:!0,p_dealership:!0}}):(0,i.jsxs)("div",{id:z,className:"flex flex-col gap-4 [&_.container]:m-0 [&_.container]:w-full",children:[(0,i.jsx)(K,{lob:g,locatorContainer:{id:z,cls:"md:!fi
1xed ".concat(v?"md:!left-[19rem]":"md:!left-[37rem]"," md:!top-[8rem] z-[9999]")},header:(0,i.jsx)("div",{className:"text-primary-blue font-SuzukiPROBold text-[18px] leading-[37px] tracking-[0.02em] mb-3",children:_.Constants.CAR_CONFIGURATOR.SELECT_DEALER}),onDealerSelect:m}),(0,i.jsx)("div",{className:"w-full flex justify-end",children:(0,i.jsx)(E,{className:u?"w-full":"",onClick:()=>d(!0),children:_.Constants.brandCard.NEXT})})]})})}},78876:(e,n,a)=>{a.d(n,{A:()=>t});var i=a(37876);a(14232);var l=a(29399);let o=null===l.Constants||void 0===l.Constants?void 0:l.Constants.CAR_CONFIGURATOR;function t(e){let{count:n,visibility:a,source:l,mobileWrap:t}=e,r="config-header"===l,s="dealer"===l;return 1===a||null===a||null===n?null:(0,i.jsx)("div",{className:" flex items-center justify-center text-center py-2 ".concat(r||s?"":"px-5"," ").concat(s?"px-3 ".concat(t?"w-full max-w-full break-words":"whitespace-nowrap"):""),style:{backgroundColor:"#000000",fontSize:r?"12px":s?"14px":"16px",fontFamily:"SuzukiPRORegular",color:"#FFFFFF"},children:2===a?"".concat(n," ").concat((null==o?void 0:o.VEHICLE_FOUND)||"Vehicles Found"):3===a?n>0?"".concat((null==o?void 0:o.STOCK_AVAILABLE)||"Stock Available"):"".concat((null==o?void 0:o.STOCK_UNAVAILABLE)||"Stock Unavailable"):null})}},90078:(e,n,a)=>{a.d(n,{A:()=>l});var i=a(14232);function l(){let[e,n]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=()=>n(window.innerWidth>=768&&window.innerWidth<1024);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}}}]);
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.