PageSourceSearch

https://www.suzuki.ro/_next/static/chunks/47.62269839dfaad805.js

js suzuki.ro collected 2026-10-02 06:08:05 UTC 18,065 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[47],{31703:(e,l,t)=>{"use strict";t.d(l,{A:()=>g});var o=t(37876),a=t(14232),i=t(33283),n=t.n(i),r=t(90671),u=t.n(r),d=t(54587),s=t.n(d),c=t(14e3),m=t(25660),v=t(76717);let g=(0,a.forwardRef)((e,l)=>{let{error:t,label:a,required:i,name:r,mandatory:d,items:g,value:_,placeholder:x,handleChange:p,tooltipContent:f,showTooltip:I,descript:h,nameKey:E,iconSource:b,placeholderOptionHidden:S,imageVar:w,isPlaceholderDisabled:D,disabled:k,selectedModelCode:j,modelCodePage:y,...A}=e;(0,c.useRouter)();let C=(0,c.useSearchParams)();C.get("modelname");let T=C.get("modelcode");return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:n().select__container,children:[(0,o.jsxs)("div",{className:"flex items-center justify-between w-full h-[28px]",children:[(0,o.jsxs)("div",{className:"flex starstyle",children:[a&&(0,o.jsx)("label",{className:n().label,htmlFor:r,dangerouslySetInnerHTML:{__html:a}}),i&&(0,o.jsx)("span",{children:"*"})]}),I&&(0,o.jsxs)("div",{className:"flex items-center",role:"button",tabIndex:0,"aria-label":"Show More Information with Description: ".concat(h),"data-tooltip-id":r,onClick:()=>document.querySelector("[data-tooltip-id='".concat(r,"']")).dispatchEvent(new MouseEvent("mouseenter",{bubbles:!0})),children:[(0,o.jsx)(s(),{"data-tooltip-id":r,src:"".concat(m.configuration.IMG_STATIC_URL,"assets/images/Tool-tip/infoToolTip.svg"),height:"15",width:"15",alt:"Additional Information",style:{maxWidth:"100%",height:"auto"}}),(0,o.jsx)(v.m_,{id:r,src:w,variant:"light",className:"shadow-lg z-10",children:(0,o.jsxs)("div",{className:"tool-tip-wrap flex items-center justify-between",children:[(0,o.jsx)("div",{className:"w-[20px] flex items-center mr-1",children:(0,o.jsx)(s(),{src:b,width:15,height:15,style:{maxWidth:"100%",height:"auto"}})}),(0,o.jsx)("p",{className:u().toolTip_desc,children:h})]})})]})]}),(0,o.jsxs)("select",{className:t?"".concat(n().inputError," border-error-color"):"".concat(n().input," border-grey-color"),required:d,disabled:k,name:r,onChange:p,...A,ref:l,children:[(0,o.jsx)("option",{value:"",disabled:D,hidden:S,children:x}),(null==g?void 0:g.length)>0&&g.map((e,l)=>{var t,a,i,n,r,u,d;return(0,o.jsx)("option",{value:JSON.stringify(e),disabled:e.disabled,selected:"finance-page"===A.page?(null==e||null==(t=e.model_name)?void 0:t.toLowerCase())===(null==A||null==(a=A.selectedValue)?void 0:a.toLowerCase()):(null==e?void 0:e.model_code)!==void 0&&(null==e?void 0:e.model_code)==y||e.selected||(null==e?void 0:e.model_code)!==void 0&&(null==e?void 0:e.model_code)==j||(null==e?void 0:e.model_code)!==void 0&&(null==e||null==(i=e.model_code)?void 0:i.toLowerCase())==(null==T?void 0:T.toLowerCase()),children:["HUN","RO","IDN","SLA","SK","CZ","PH"].includes("RO")&&((null==e?void 0:e.model_name)=="eVITARA"||(null==e?void 0:e.model_name)=="eVITARA"||(null==e?void 0:e.model_name)=="EVITARA"||(null==e?void 0:e.model_code)=="X"||(null==e?void 0:e.model_code)=="x"||(null==e?void 0:e.model_code)=="EVITARA"||(null==e?void 0:e.model_code)=="EVITARA")?(null==e?void 0:e.name)||(null==e?void 0:e.model_name)||e[E]||(null==e?void 0:e.variant_name)||(null==e?void 0:e.methodName):(null==e?void 0:e.name)||(null==e||null==(n=e.model_name)?void 0:n.toUpperCase())||(null==(r=e[E])?void 0:r.toUpperCase())||(null==e||null==(u=e.variant_name)?void 0:u.toUpperCase())||(null==e||null==(d=e.methodName)?void 0:d.toUpperCase())},l)})]}),(0,o.jsx)("p",{className:"text-error-red",children:t})]})})})},33283:e=>{e.exports={input:"Forms_input__HTmSv",remarksInput:"Forms_remarksInput__hdP8f",remarksInputError:"Forms_remarksInputError__2a4fn",dateinput:"Forms_dateinput__ZUz4q",inputError:"Forms_inputError__Vel0q",textarea:"Forms_textarea__lH8pW",textareaError:"Forms_textareaError__y_0Qc",label:"Forms_label__4IAOI",submit:"Forms_submit__u5oXc",select__container:"Forms_select__container__7pJ6r",title:"Forms_title__YxdlT",error:"Forms_error__n9Q1D"}},50047:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>m});var o=t(37876),a=t(14232),i=t(74695),n=t(25660),r=t(66082),u=t(9280),d=t(31703),s=t(14629);let c=t(29399),m=e=>{var l,t,m,v,g,_,x,p,f,I,h,E,b,S,w,D,k,j,y,A;console.log("props",e);let C=(0,u.A)(),T=(0,a.useRef)(null),{height:N,colorsArr:R}=e,[M,L]=(0,a.useState)(),[O,U]=(0,a.useState)(),[F,V]=(0,a.useState)(!0),[z,H]=(0,a.useState)([]),[G,$]=(0,a.useState)({name:R[0].name,color_code:R[0].color_code,index:0,imgArr:(null==(l=
1R[0])?void 0:l.extStaticImage)?C?null==(t=R[0])?void 0:t.staticExtImageMobile:null==(m=R[0])?void 0:m.staticExtImageDesktop:null==(v=R[0])?void 0:v.exteriorImages,extStaticImage:null==(g=R[0])?void 0:g.extStaticImage,staticExtImageDesktop:null==(_=R[0])?void 0:_.staticExtImageDesktop[0],staticExtImageMobile:null==(x=R[0])?void 0:x.staticExtImageMobile[0]}),q=(0,u.A)(),P=(0,i.d4)(e=>{var l;return null==e||null==(l=e.app)?void 0:l.disclaimerSetting}),[X,J]=(0,a.useState)(null),[W,B]=(0,a.useState)(""),[K,Q]=(0,a.useState)([]),Z=l=>{Q(l.map(l=>{var t,o,a,i,r;return{name:(null==l?void 0:l.color_name)||"",value1:(null==l?void 0:l.hex_code)||"",value2:(null==l?void 0:l.hex_code2)||"",exteriorImages:(null==l||null==(t=l.exterior_images)?void 0:t.map(e=>"".concat(n.configuration.IMG_URL).concat(null==e?void 0:e.value)))||[],extStaticImage:(null==l?void 0:l.ExtStaticImageToggle)?l.ExtStaticImageToggle:null==e||null==(a=e.data)||null==(o=a.configuratorData)?void 0:o.ExtStaticImageToggle,staticExtImageDesktop:(null==l||null==(i=l.static_image_exterior)?void 0:i.desktop)?["".concat(n.configuration.IMG_URL).concat(null==l?void 0:l.static_image_exterior.desktop)]:[],staticExtImageMobile:(null==l||null==(r=l.static_image_exterior)?void 0:r.mobile)?["".concat(n.configuration.IMG_URL).concat(null==l?void 0:l.static_image_exterior.mobile)]:[],color_code:(null==l?void 0:l.color_code)||"",is_default:null==l?void 0:l.is_default}}))};return(0,a.useEffect)(()=>{(()=>{var l,t,o,a,i,n,r,u,d;if((null==e||null==(t=e.configuratorData)||null==(l=t.variants)?void 0:l.length)>0){let l=(null==e||null==(a=e.configuratorData)||null==(o=a.variants)?void 0:o.find(e=>!0===e.is_default))||e.configuratorData.variants[0];L(null==e||null==(n=e.configuratorData)||null==(i=n.variants)?void 0:i.findIndex(e=>!0===e.is_default)),J((null==l?void 0:l.variant_code)||""),H((null==l?void 0:l.disclaimers)||[]);let t=[],s=null==(t=l?null==l?void 0:l.colors:null==e||null==(d=e.configuratorData)||null==(u=d.variants[0])?void 0:u.colors)?void 0:t.findIndex(e=>!0===e.is_default);if(U(-1===s?0:s),(null==l||null==(r=l.colors)?void 0:r.length)>0){let e=l.colors[0];$((null==e?void 0:e.color_code)||""),Z(l.colors)}}})()},[null==e?void 0:e.configuratorData]),(0,a.useEffect)(()=>{var e,l,t,o,a,i,n,r,u;let d=null==K?void 0:K.findIndex(e=>!0===e.is_default),s=-1===d?0:d;$({name:null==(e=K[s])?void 0:e.name,index:s,imgArr:(null==(l=K[s])?void 0:l.extStaticImage)?C?null==(t=K[s])?void 0:t.staticExtImageMobile:null==(o=K[s])?void 0:o.staticExtImageDesktop:(null==(a=K[s])?void 0:a.exteriorImages)||[],extStaticImage:null==(i=K[s])?void 0:i.extStaticImage,staticExtImageDesktop:null==(n=K[s])?void 0:n.staticExtImageDesktop[0],staticExtImageMobile:null==(r=K[s])?void 0:r.staticExtImageMobile[0],is_default:null==(u=K[s])?void 0:u.is_default})},[K]),(0,a.useEffect)(()=>{B((()=>{var l,t,o,a;let i=(null==e||null==(t=e.configuratorData)||null==(l=t.staticImgDefault)?void 0:l.exterior)||{},n=(null==e||null==(a=e.configuratorData)||null==(o=a.variants)?void 0:o.flatMap(l=>{var t;let o=null==l?void 0:l.variant_code;return null==l||null==(t=l.colors)?void 0:t.map(l=>{var t,a,n,r,u,d,s,c,m,v,g,_,x,p,f,I,h;let E=null==l?void 0:l.color_code,b="";return(null==e||null==(t=e.configuratorData)?void 0:t.ExtStaticImageToggle)==!1&&(null==e||null==(a=e.configuratorData)?void 0:a.Ext_show_configurator)==!0&&(b=(null==i||null==(c=i[o])||null==(s=c[E])?void 0:s.alt_text_desktop_config_ext)||(null==e||null==(m=e.configuratorData)?void 0:m.model_name)),(null==e||null==(n=e.configuratorData)?void 0:n.ExtStaticImageToggle)==!0&&(null==e||null==(r=e.configuratorData)?void 0:r.Ext_show_configurator)==!0&&(b=q?(null==i||null==(g=i[o])||null==(v=g[E])?void 0:v.alt_text_mobile1)||(null==G?void 0:G.staticExtImageMobile)&&"Suzuki_".concat(null==G||null==(x=G.staticExtImageMobile)||null==(_=x.split("/").pop())?void 0:_.split(".")[0])||"Turntable Image":(null==i||null==(f=i[o])||null==(p=f[E])?void 0:p.alt_text_desktop1)||(null==G?void 0:G.staticExtImageDesktop)&&"Suzuki_".concat(null==G||null==(h=G.staticExtImageDesktop)||null==(I=h.split("/").pop())?void 0:I.split(".")[0])||"Turntable Image"),console.log("XX1",[o],[E],null==i||null==(d=i[o])||null==(u=d[E])?void 0:u.alt_text_desktop_config_ext),{variantCode:o,colorCode:E,altText:b}})})).find(e=>e.variantCode===X&&e.colorCode===(null==G?void 0:G.color_code));return null==n?void 0:n.altText})())},[X,G,null==e?void 0:e.configuratorData,K]),console.log("altText",W),(0,a.useEffect)(()=>
1{T.current&&T.current.querySelectorAll("img").forEach(e=>{e.setAttribute("alt",W||"Exterior image")})},[W,K,G,X,(()=>{var l;let t=K.find(e=>e.color_code===(null==G?void 0:G.color_code));return t?(null==e||null==(l=e.configuratorData)?void 0:l.ExtStaticImageToggle)?q?null==t?void 0:t.staticExtImageMobile:null==t?void 0:t.staticExtImageDesktop:(null==t?void 0:t.exteriorImages)||[]:[]})()]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"grid grid-cols-12",children:[(0,o.jsx)("div",{className:"lg:col-span-8 col-span-12",onMouseDown:()=>V(!1),onMouseUp:()=>void setTimeout(()=>{V(!0)},3e3),children:(0,o.jsxs)("div",{className:"relative",ref:T,children:[(0,o.jsx)("div",{ref:T,children:(0,o.jsx)(r.kw,{autoRotate:{disabled:!0},style:{minHeight:"50vh",height:"100%",touchAction:"auto"},images:(null==e||null==(p=e.configuratorData)?void 0:p.ExtStaticImageToggle)?[q?null==G?void 0:G.staticExtImageMobile:null==G?void 0:G.staticExtImageDesktop]:null==G?void 0:G.imgArr})}),F&&!(null==G?void 0:G.extStaticImage)&&!(null==e||null==(f=e.configuratorData)?void 0:f.ExtStaticImageToggle)&&(0,o.jsx)("img",{className:"absolute left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] h-[6rem] lg:h-[10rem] w-[6rem] lg:w-[10rem]",src:"".concat(n.configuration.IMG_STATIC_URL,"assets/images/360-overlay.svg"),alt:""})]})}),(0,o.jsx)("div",{className:"lg:col-span-4 lg:mt-0 mt-8 col-span-12 justify-center flex items-center",children:(0,o.jsxs)("div",{className:"w-[65%]",children:[(0,o.jsx)("div",{className:"font-suzukiBold text-sub-heading uppercase text-[#001151] my-3",children:null==c||null==(h=c.Constants)||null==(I=h.carConfigurator)?void 0:I.CHOOSE_VARIANT}),(0,o.jsx)(d.A,{onChange:l=>(l=>{try{var t,o,a,i,r,u,d,s;let c=JSON.parse(l.target.value);if((null==e||null==(t=e.configuratorData)?void 0:t.ExtStaticImageToggle)==!0&&(null==e||null==(o=e.configuratorData)?void 0:o.Ext_show_configurator)==!0){let l=null==e||null==(r=e.configuratorData)?void 0:r.variants.find(e=>e.variant_code===(null==c?void 0:c.variant_code));l&&(J(null==l?void 0:l.variant_code),(null==l||null==(u=l.colors)?void 0:u.length)>0&&($(l.colors[0]),H(null==l?void 0:l.disclaimers),Z(l.colors)))}if((null==e||null==(a=e.configuratorData)?void 0:a.ExtStaticImageToggle)==!1&&(null==e||null==(i=e.configuratorData)?void 0:i.Ext_show_configurator)==!0){let l=null==e||null==(d=e.configuratorData)?void 0:d.variants.find(e=>e.variant_code===(null==c?void 0:c.variant_code));if(l&&(console.log("variant",l),J(null==l?void 0:l.variant_code),(null==l||null==(s=l.colors)?void 0:s.length)>0)){Z(l.colors);let t=colors.map(l=>{var t,o,a,i,r;return{name:(null==l?void 0:l.color_name)||"",color_code:(null==l?void 0:l.color_code)||"",value1:(null==l?void 0:l.hex_code)||"",value2:(null==l?void 0:l.hex_code2)||"",exteriorImages:(null==l||null==(t=l.exterior_images)?void 0:t.map(e=>"".concat(n.configuration.IMG_URL).concat(null==e?void 0:e.value)))||[],extStaticImage:(null==l?void 0:l.ExtStaticImageToggle)?l.ExtStaticImageToggle:null==e||null==(a=e.data)||null==(o=a.configuratorData)?void 0:o.ExtStaticImageToggle,staticExtImageDesktop:(null==l||null==(i=l.static_image_exterior)?void 0:i.desktop)?["".concat(n.configuration.IMG_URL).concat(l.static_image_exterior.desktop)]:[],staticExtImageMobile:(null==l||null==(r=l.static_image_exterior)?void 0:r.mobile)?["".concat(n.configuration.IMG_URL).concat(l.static_image_exterior.mobile)]:[],is_default:null==l?void 0:l.is_default}});Q(t)}}}catch(e){console.error("Error handling select change:",e)}})(l),items:Array.isArray(null==(E=e.configuratorData)?void 0:E.variants)&&(null==(S=e.configuratorData)||null==(b=S.variants)?void 0:b.map((e,l)=>l===M?{...e,selected:!0}:e)),placeholder:null==c||null==(D=c.Constants)||null==(w=D.carConfigurator)?void 0:w.CHOOSE_VARIANT,isPlaceholderDisabled:!0,"aria-label":"Choose Car Variant"}),(0,o.jsx)("div",{className:"font-suzukiBold text-sub-heading uppercase text-[#001151] mt-8 mb-3",children:null==c||null==(j=c.Constants)||null==(k=j.carConfigurator)?void 0:k.CHOOSE_COLOR}),(0,o.jsx)("div",{className:"flex w-full justify-center",children:(0,o.jsxs)("div",{className:"flex gap-y-5 gap-x-4 flex-wrap",role:"radiogroup","aria-label":"Choose Color Options",style:{width:"".concat((null==K?void 0:K.length)>4?"100%":({4:"100%",3:"75%",2:"50%",1:"25%"})[null==K?void 0:K.length]),gridTemplateColumns:"repeat(auto-fill, minmax(calc(".concat((null==K?void 0:K.length)>4?"25%":({4:"25%",3:"33%",2:"50%",1:"100%"})[null==K?void 0:K.length]," - 10px), 1fr))")},children:[console.log("colorArray",K),null==K?void 0:K.map((e,l)=>(0,o.jsx)("div",{className:"rounded-full w-fit p-1 border-2 ".concat(G.index===l?"border-primary-blue":"border-transparent"),children:(0,o.jsx)("div",{className:"w-9 md:w-10 lg:w-11 h-9 md:h-10 lg:h-11 rounded-full cursor-pointer",role:"radio","aria-checked":G.index===l,tabIndex:0,"aria-label":"Color: ".concat(e.name),onClick:()=>{$({name:e.name,index:l,color_code:null==e?void 0:e.color_code,imgArr:(null==e?void 0:e.extStaticImage)?C?null==e?void 0:e.staticExtImageMobile:null==e?void 0:e.staticExtImageDesktop:e.exteriorImages,extStaticImage:null==e?void 0:e.extStaticImage,staticExtImageDesktop:null==e?void 0:e.staticExtImageDesktop[0],staticExtImageMobile:null==e?void 0:e.staticExtImageMobile[0]})},onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),$({name:e.name,index:l,color_code:null==e?void 0:e.color_code,imgArr:(null==e?void 0:e.extStaticImage)?C?null==e?void 0:e.staticExtImageMobile:null==e?void 0:e.staticExtImageDesktop:e.exteriorImages,extStaticImage:null==e?void 0:e.extStaticImage,staticExtImageDesktop:null==e?void 0:e.staticExtImageDesktop[0],staticExtImageMobile:null==e?void 0:e.staticExtImageMobile[0]}))},style:{background:"linear-gradient(to right, ".concat(e.value1?e.value1:e.value2," 50%, ").
1concat(e.value2?e.value2:e.value1," 50%)"),boxShadow:"rgba(100, 100, 111, 0.2) 0px 7px 29px 0px"}})},l))]})}),(0,o.jsx)("div",{className:"flex mt-5 w-full justify-center",children:(0,o.jsx)("div",{className:"font-suzukiBold text-default",children:G.name})}),(0,o.jsx)("p",{className:"font-SuzukiPRORegular text-medium mt-8",children:null==c||null==(A=c.Constants)||null==(y=A.carConfigurator)?void 0:y.COLOR_VARIANT_DISCLAIMER})]})})]}),P&&(null==P?void 0:P.publishedValue)&&(0,o.jsx)(s.A,{disclaimerData:z})]})}},66082:(e,l,t)=>{"use strict";t.d(l,{kw:()=>s});var o=t(14232),a=t(37876),i="__react-image-turntable-img",n=`${i}--primary`,r=`${i}--secondary`,u={maxWidth:"100%"},d=e=>{e.preventDefault()},s=({images:e,initialImageIndex:l=0,style:t,tabIndex:s=0,movementSensitivity:c=20,onIndexChange:m,autoRotate:v={disabled:!1},...g})=>{let{ref:_,activeImageIndex:x}=(({initialImageIndex:e,imagesCount:l,movementSensitivity:t,autoRotate:a})=>{let[i,n]=(0,o.useState)(e),r=(0,o.useRef)(null),u=(0,o.useRef)(null);(0,o.useEffect)(()=>{n(e)},[e]);let d=()=>{r.current&&(clearInterval(r.current),r.current=null)};return(0,o.useEffect)(()=>(a.disabled||r.current||(r.current=setInterval(()=>{n(e=>{let t=e+1;return t>l?0:t})},a.interval||200)),a.disabled&&d(),()=>d()),[a,l]),(0,o.useEffect)(()=>{let e=u.current,o=0,a=()=>{n(e=>e+1>l?0:e+1)},i=()=>{n(e=>e-1<0?l:e-1)},r=e=>{"ArrowLeft"===e.key?i():"ArrowRight"===e.key&&a()},d=e=>{let l=o-e.clientX;l<=-t&&(o+=t,a()),l>=t&&(o-=t,i())},s=()=>{window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",s)},c=e=>{2!=e.button&&(o=e.clientX,window.addEventListener("pointermove",d,{passive:!0}),window.addEventListener("pointerup",s,{passive:!0}))};return e.addEventListener("keydown",r,{capture:!0}),e.addEventListener("pointerdown",c,{capture:!0}),()=>{e.removeEventListener("keydown",r,{capture:!0}),e.removeEventListener("pointerdown",c,{capture:!0}),window.removeEventListener("pointerup",s),window.removeEventListener("pointermove",d)}},[l,t]),{ref:u,activeImageIndex:i}})({initialImageIndex:l,imagesCount:e.length-1,movementSensitivity:c,autoRotate:v}),p={position:"relative",touchAction:"none",userSelect:"none",...t};return(0,o.useEffect)(()=>{m&&m(x)},[x,m]),(0,a.jsx)("div",{"aria-label":"Image turntable",...g,ref:_,role:"slider","aria-valuemin":1,"aria-valuemax":e.length,"aria-valuenow":x+1,"aria-valuetext":`${x+1} of ${e.length}`,style:p,tabIndex:s,children:e.map((e,l)=>(0,a.jsx)("img",{className:`${i} ${0===l?n:r}`,src:e,alt:`Turntable image ${l+1}`,draggable:!1,onDragStart:d,style:{...u,position:0===l?void 0:"absolute",opacity:+(l===x),left:0,top:0,right:0,bottom:0,width:"100%",height:"100%",objectFit:"cover"}},e))})}},90671:e=>{e.exports={"!container":"tool-tip___container__jRylf",container:"tool-tip_container__ddiU9","container-fluid":"tool-tip_container-fluid__CM9_7",row:"tool-tip_row__qpnmQ",col:"tool-tip_col__EyLpA",col_12:"tool-tip_col_12__PNA0p",toolTip_class:"tool-tip_toolTip_class__y4zLU",toolTip_desc:"tool-tip_toolTip_desc__H__NN","sm:col_12":"tool-tip_sm__col_12__vZJKd","md:container":"tool-tip_md__container__zDBb3","md:row":"tool-tip_md__row__27Y1D","md:col_4":"tool-tip_md__col_4__ORO3f","md:col_6":"tool-tip_md__col_6__fNeIj","md:col_8":"tool-tip_md__col_8__yAWAJ"}}}]);

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.