PageSourceSearch

https://xtremeclutch.eu/_nuxt/B-UPAK8k.js

js xtremeclutch.eu collected 2026-10-04 04:58:22 UTC 47,747 bytes, 1 lines download raw bytes

1import{f as ue,c as i,a as t,q as Q,o,r as _,g as D,v as X,s as Se,b as N,d as Ne,i as ge,T as te,w as le,j as P,u as e,F as I,h as K,n as ie,t as O,x as se,y as Fe,E as De,_ as be,H as fe,p as Ee,D as ce,K as ee,L as Ce,M as we,l as xe,N as $e,J as Te,O as Le,m as Ae,P as Pe,Q as qe,R as Z,S as de,U as he,V as me,W as Me,X as Oe,Y as je}from"./DQJLCiGf.js";const Ue={class:"mb-6"},Ie={class:"flex justify-center pb-1 border-b border-gray-200"},Xl=ue({__name:"SearchModeToggle",props:{modelValue:{}},emits:["update:modelValue"],setup(q){return(L,$)=>(o(),i("div",Ue,[t("div",Ie,[t("button",{onClick:$[0]||($[0]=r=>L.$emit("update:modelValue","vehicle")),class:Q(["px-4 py-3 text-sm sm:text-base sm:px-6 font-bold font-commercial transition-colors duration-200 relative",L.modelValue==="vehicle"?"text-primary-600 border-b-2 border-primary-600":"text-gray-500 hover:text-gray-700"])}," VEHICLE ",2),t("button",{onClick:$[1]||($[1]=r=>L.$emit("update:modelValue","number")),class:Q(["px-4 py-3 text-sm sm:text-base sm:px-6 font-bold font-commercial transition-colors duration-200 relative ml-4 sm:ml-6",L.modelValue==="number"?"text-primary-600 border-b-2 border-primary-600":"text-gray-500 hover:text-gray-700"])}," PART NO ",2)])]))}}),Ve={class:"flex items-center gap-2"},Be={key:0,class:"fixed inset-0 z-50 overflow-y-auto bg-white"},Ge={class:"sticky top-0 z-10 flex items-center justify-between px-4 py-4 bg-white border-b border-gray-200"},He={class:"p-4 pb-24"},Ke={class:"mb-4"},Ye={key:0,class:"ml-3 overflow-hidden"},ze=["onClick"],We={class:"flex my-1.5 items-start gap-2"},Je={class:"flex-1"},Qe={key:0,class:"mb-4"},Xe={key:0,class:"mt-3 ml-3 overflow-hidden"},Ze={class:"flex items-center justify-between mb-2"},et={class:"text-sm font-semibold text-gray-900 font-commercial"},tt=["min","max","value"],lt={class:"flex justify-between mt-1 text-xs text-gray-500 font-commercial"},at={key:0,class:"flex items-center gap-2 mt-3 text-sm text-gray-700 transition-colors cursor-pointer hover:text-gray-900 font-commercial"},ot={key:1,class:"mb-4"},st={key:0,class:"ml-3 overflow-hidden"},rt=["onClick"],nt={class:"flex my-1.5 items-start gap-2"},it={class:"flex-1"},ct={key:2,class:"mb-4"},ut={key:0,class:"ml-3 overflow-hidden"},dt=["onClick"],mt={class:"flex my-1.5 items-start gap-2"},vt={class:"flex-1"},yt=ue({__name:"MobileFilterSection",props:{availableGroups:{},availableTorques:{},availableDrivingStyles:{},availableFlywheels:{},selectedFilter:{},selectedTorque:{},selectedDrivingStyles:{},selectedFlywheel:{},includeOe:{type:Boolean}},emits:["category-change","torque-change","driving-style-change","flywheel-change","include-oe-change","filters-applied"],setup(q,{expose:L,emit:$}){const r=q,d=$,f=_(!1),l=_(null),m=_(!0),w=_(!1),b=_(!1),F=_(!1),C=_(r.selectedFilter),T=_(r.selectedTorque),A=_([...r.selectedDrivingStyles]),M=_(r.selectedFlywheel),V=_(r.includeOe),H=D(()=>r.availableTorques.filter(h=>h&&!isNaN(parseFloat(h))).sort((h,n)=>{const p=parseFloat(h),u=parseFloat(n);return p-u})),J=D(()=>H.value.length===0?0:Math.floor(parseFloat(H.value[0])/50)*50),Y=D(()=>H.value.length===0?1e3:Math.ceil(parseFloat(H.value[H.value.length-1])/50)*50),y=h=>{const n=parseInt(h.target.value);T.value=n},v=()=>{T.value=0},j=h=>{const n=A.value.indexOf(h);n>-1?A.value.splice(n,1):A.value.push(h)},k=()=>{C.value!==r.selectedFilter&&d("category-change",C.value===r.selectedFilter?"":C.value),T.value!==r.selectedTorque&&d("torque-change",T.value);const h=new Set(r.selectedDrivingStyles),n=new Set(A.value);r.selectedDrivingStyles.forEach(p=>{n.has(p)||d("driving-style-change",p)}),A.value.forEach(p=>{h.has(p)||d("driving-style-change",p)}),M.value!==r.selectedFlywheel&&d("flywheel-change",M.value===r.selectedFlywheel?"":M.value),V.value!==r.includeOe&&d("include-oe-change",V.value),f.value=!1,d("filters-applied")},z=()=>{C.value="",T.value=0,A.value=[],M.value="",V.value=!0};return X(()=>r.selectedFilter,h=>{C.value=h}),X(()=>r.selectedTorque,h=>{T.value=h}),X(()=>r.selectedDrivingStyles,h=>{A.value=[...h]},{deep:!0}),X(()=>r.selectedFlywheel,h=>{M.value=h}),X(()=>r.includeOe,h=>{V.value=h}),X(f,h=>{h?document.body.style.overflow="hidden":document.body.style.overflow=""}),Se(()=>{document.body.style.overflow=""}),L({getBoundingClientRect:()=>{var h;return((h=l.value)==null?void 0:h.getBoundingClientRect())||null}
1,openModal:()=>{f.value=!0}}),(h,n)=>{const p=ge;return o(),i("div",{ref_key:"rootElement",ref:l,class:"mb-6 lg:hidden"},[t("button",{onClick:n[0]||(n[0]=u=>f.value=!0),class:"flex items-center justify-between w-full px-4 py-3 text-base font-medium text-gray-900 transition-colors bg-white border border-gray-200 rounded-lg hover:bg-gray-50 font-commercial"},[t("span",Ve,[N(p,{name:"heroicons:funnel",class:"w-5 h-5 text-primary-600"}),n[7]||(n[7]=Ne(" Filter Options "))]),N(p,{name:"heroicons:chevron-right",class:"w-5 h-5 text-gray-500"})]),N(te,{"enter-active-class":"transition-opacity duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-200","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:le(()=>[e(f)?(o(),i("div",Be,[t("div",Ge,[n[8]||(n[8]=t("h2",{class:"text-xl font-bold text-gray-900 font-oswald"},"Filters",-1)),t("button",{onClick:n[1]||(n[1]=u=>f.value=!1),class:"p-2 text-gray-500 transition-colors rounded-lg hover:bg-gray-100"},[N(p,{name:"heroicons:x-mark",class:"w-6 h-6"})])]),t("div",He,[t("div",Ke,[t("button",{onClick:n[2]||(n[2]=u=>m.value=!e(m)),class:"flex items-center justify-between w-full text-left transition-colors hover:text-primary-600"},[n[9]||(n[9]=t("span",{class:"text-lg font-semibold text-gray-900 font-oswald"},"Category",-1)),N(p,{name:e(m)?"heroicons:chevron-up":"heroicons:chevron-down",class:"w-4 h-4 text-gray-400"},null,8,["name"])]),N(te,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"max-h-[400px] opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"max-h-[400px] opacity-100","leave-to-class":"opacity-0 max-h-0"},{default:le(()=>[e(m)?(o(),i("div",Ye,[(o(!0),i(I,null,K(h.availableGroups,u=>(o(),i("button",{key:u,onClick:U=>C.value=e(C)===u?"":u,class:Q(["w-full text-left font-commercial text-sm",e(C)===u?"text-black":"text-gray-700 hover:bg-gray-50 hover:text-gray-900"])},[t("span",We,[t("span",{class:Q(["w-4 h-4 flex-shrink-0 border-2 rounded flex items-center justify-center mt-0.5",e(C)===u?"border-primary-600 bg-primary-600":"border-gray-300"])},[e(C)===u?(o(),ie(p,{key:0,name:"heroicons:check",class:"w-3 h-3 text-white"})):P("",!0)],2),t("span",Je,O(u),1)])],10,ze))),128))])):P("",!0)]),_:1})]),h.availableTorques.length>1?(o(),i("div",Qe,[t("button",{onClick:n[3]||(n[3]=u=>w.value=!e(w)),class:"flex items-center justify-between w-full text-left transition-colors hover:text-primary-600"},[n[10]||(n[10]=t("span",{class:"text-lg font-semibold text-gray-900 font-oswald"},"Torque (Nm)",-1)),N(p,{name:e(w)?"heroicons:chevron-up":"heroicons:chevron-down",class:"w-4 h-4 text-gray-400"},null,8,["name"])]),N(te,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"max-h-[200px] opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"max-h-[200px] opacity-100","leave-to-class":"opacity-0 max-h-0"},{default:le(()=>[e(w)?(o(),i("div",Xe,[t("div",Ze,[t("span",et,O(e(T)>0?`≥ ${e(T)} Nm`:"All torque values"),1),e(T)>0?(o(),i("button",{key:0,onClick:v,class:"text-xs transition-colors text-primary-600 hover:text-primary-700 font-commercial"}," Reset ")):P("",!0)]),t("input",{type:"range",min:e(J),max:e(Y),step:50,value:e(T),onInput:y,class:"w-full torque-slider"},null,40,tt),t("div",lt,[t("span",null,O(e(J))+" Nm",1),t("span",null,O(e(Y))+" Nm",1)]),e(T)>0?(o(),i("label",at,[se(t("input",{type:"checkbox","onUpdate:modelValue":n[4]||(n[4]=u=>Fe(V)?V.value=u:null),class:"oe-checkbox"},null,512),[[De,e(V)]]),n[11]||(n[11]=t("span",{class:"text-xs"},"Show products without torque value",-1))])):P("",!0)])):P("",!0)]),_:1})])):P("",!0),h.availableDrivingStyles.length>1?(o(),i("div",ot,[t("button",{onClick:n[5]||(n[5]=u=>b.value=!e(b)),class:"flex items-center justify-between w-full text-left transition-colors hover:text-primary-600"},[n[12]||(n[12]=t("span",{class:"text-lg font-semibold text-gray-900 font-oswald"},"Driving style",-1)),N(p,{name:e(b)?"heroicons:chevron-up":"heroicons:chevron-down",class:"w-4 h-4 text-gray-400"},null,8,["name"])]),N(te,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"max-h-[300px] opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"max-h-[300px] opacity-100","leave-to-class":"opacity-0 max-h-0"},{default:le(()=>[e(b)?(o(),i("div",st,[(o(!0),i(I,null,K(h.availableDrivingStyles.filter(u=>u),u=>(o(),i("button",{key:u,onClick:U=>j(u),class:Q(["w-full text-left font-commercial text-sm",e(A).includes(u)?"text-black":"text-gray-700 hover:bg-gray-50 hover:text-gray-900"])},[t("span",nt,[t("span",{class:Q(["w-4 h-4 flex-shrink-0 border-2 rounded flex items-center justify-center mt-0.5",e(A).includes(u)?"border-primary-600 bg-primary-600":"border-gray-300"])},[e(A).includes(u)?(o(),ie(p,{key:0,name:"heroicons:check",class:"w-3 h-3 text-white"})):P("",!0)],2),t("span",it,O(u),1)])],10,rt))),128))])):P("",!0)]),_:1})])):P("",!0),h.availableFlywheels.length>1?(o(),i("div",ct,[t("button",{onClick:n[6]||(n[6]=u=>F.value=!e(F)),class:"flex items-center justify-between w-full text-left transition-colors hover:text-primary-600"},[n[13]||(n[13]=t("span",{class:"text-lg font-semibold text-gray-900 font-oswald"},"Flywheel",-1)),N(p,{name:e(F)?"heroicons:chevron-up":"heroicons:chevron-down",class:"w-4 h-4 text-gray-400"},null,8,["name"])]),N(te,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"max-h-[300px] opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"max-h-[300px] opacity-100","leave-to-class":"opacity-0 max-h-0"},{default:le(()=>[e(F)?(o(),i("div",ut,[(o(!0),i(I,null,K(h.availableFlywheels.filter(u=>u),u=>(o(),i("button",{key:u,onClick:U=>M.value=e(M)===u?"":u,class:Q(["w-full text-left font-commercial text-sm",e(M)===u?"text-black":"text-gray-700 hover:bg-gray-50 hover:text-gray-900"])},[t("span",mt,[t("span",{class:Q(["w-4 h-4 flex-shrink-0 border-2 rounded flex items-center justify-center mt-0.5",e(M
1)===u?"border-primary-600 bg-primary-600":"border-gray-300"])},[e(M)===u?(o(),ie(p,{key:0,name:"heroicons:check",class:"w-3 h-3 text-white"})):P("",!0)],2),t("span",vt,O(u),1)])],10,dt))),128))])):P("",!0)]),_:1})])):P("",!0)]),t("div",{class:"sticky bottom-0 left-0 right-0 p-4 bg-white border-t border-gray-200"},[t("div",{class:"flex gap-3"},[t("button",{onClick:z,class:"flex-1 px-4 py-3 text-base font-medium text-gray-700 transition-colors bg-white border-2 border-gray-300 rounded-lg hover:bg-gray-50 font-commercial"}," Clear All "),t("button",{onClick:k,class:"flex-1 px-4 py-3 text-base font-medium text-white transition-colors rounded-lg bg-primary-600 hover:bg-primary-700 font-commercial"}," Apply Filters ")])])])):P("",!0)]),_:1})],512)}}}),pt=be(yt,[["__scopeId","data-v-568728fa"]]),gt={class:"flex-shrink-0 hidden w-80 lg:block"},ft={class:"p-4 pb-3 border-b border-gray-200"},ht={class:"flex items-center justify-between"},bt=["disabled"],xt={class:"p-4 pt-3 overflow-y-auto max-h-[calc(100vh-25rem)]"},wt={class:"mb-4"},kt={key:0,class:"ml-3 overflow-hidden"},_t=["onClick"],St={class:"flex my-1.5 items-start gap-2"},Ft=["checked"],Ct={class:"flex-1"},$t={key:0,class:"mb-4"},Tt={key:0,class:"mt-3 ml-3 overflow-hidden"},Pt={class:"flex items-center justify-between mb-2"},qt={class:"text-sm font-semibold text-gray-900 font-commercial"},Rt=["min","max","value"],Nt={class:"flex justify-between mt-1 text-xs text-gray-500 font-commercial"},Dt={key:0,class:"flex items-center gap-2 mt-3 text-xs text-gray-700 transition-colors cursor-pointer hover:text-gray-900 font-commercial"},Et=["checked"],Lt={key:1,class:"mb-4"},At={key:0,class:"ml-3 overflow-hidden"},Mt=["onClick"],Ot={class:"flex my-1.5 items-start gap-2"},jt=["checked"],Ut={class:"flex-1"},It={key:2,class:"mb-4"},Vt={key:0,class:"ml-3 overflow-hidden"},Bt=["onClick"],Gt={class:"flex my-1.5 items-start gap-2"},Ht=["checked"],Kt={class:"flex-1"},Yt=ue({__name:"DesktopFilterSidebar",props:{availableGroups:{},availableTorques:{},availableDrivingStyles:{},availableFlywheels:{},selectedFilter:{},selectedTorque:{},selectedDrivingStyles:{},selectedFlywheel:{},includeOe:{type:Boolean}},emits:["category-change","torque-change","driving-style-change","flywheel-change","include-oe-change","clear-all"],setup(q,{emit:L}){const $=q,r=L,d=D(()=>{{const y=window.innerWidth;if(y>=1280)return fe.xl;if(y>=1024)return fe.lg}return fe.lg}),f=_(!0),l=_(!1),m=_(!1),w=_(!1),b=D(()=>$.availableTorques.filter(y=>y&&!isNaN(parseFloat(y))).sort((y,v)=>{const j=parseFloat(y),k=parseFloat(v);return j-k})),F=D(()=>b.value.length===0?0:Math.floor(parseFloat(b.value[0])/50)*50),C=D(()=>b.value.length===0?1e3:Math.ceil(parseFloat(b.value[b.value.length-1])/50)*50),T=_($.selectedTorque),A=y=>{r("category-change",y)},M=y=>{const v=parseInt(y.target.value);T.value=v,r("torque-change",v)},V=()=>{T.value=0,r("torque-change",0)},H=y=>{r("driving-style-change",y)},J=y=>{r("flywheel-change",y)},Y=D(()=>!!($.selectedFilter||$.selectedTorque>0||$.selectedDrivingStyles.length>0||$.selectedFlywheel));return X(()=>$.selectedTorque,y=>{T.value=y}),(y,v)=>{const j=ge;return o(),i("div",gt,[t("div",{class:"sticky bg-white border border-gray-200 rounded-lg",style:Ee({top:`${e(d)}px`})},[t("div",ft,[t("div",ht,[v[9]||(v[9]=t("h3",{class:"text-2xl font-bold text-gray-900 font-oswald"},"Filters",-1)),t("button",{onClick:v[0]||(v[0]=k=>y.$emit("clear-all")),disabled:!e(Y),class:Q(["text-sm font-commercial transition-colors",e(Y)?"text-primary-600 hover:text-primary-700 cursor-pointer":"text-gray-400 cursor-not-allowed"])}," Clear all ",10,bt)])]),t("div",xt,[t("div",wt,[t("button",{onClick:v[1]||(v[1]=k=>f.value=!e(f)),class:"flex items-center justify-between w-full text-left transition-colors hover:text-primary-600"},[v[10]||(v[10]=t("span",{class:"text-lg font-semibold text-gray-900 font-oswald"},"Category",-1)),N(j,{name:e(f)?"heroicons:chevron-up":"heroicons:chevron-down",class:"w-4 h-4 text-gray-400"},null,8,["name"])]),N(te,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"max-h-[400px] opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"max-h-[400px] opacity-100","leave-to-class":"opacity-0 max-h-0"},{default:le(()=>[e(f)?(o(),i("div",kt,[(o(!0),i(I,null,K(y.availableGroups,k=>(o(),i("button",{key:k,onClick:z=>A(k),class:Q(["w-full text-left font-commercial text-sm",y.selectedFilter===k?"  text-black font-bold":"text-gray-700 hover:bg-gray-50 hover:text-gray-900"])},[t("span",St,[t("input",{type:"checkbox",checked:y.selectedFilter===k,onClick:v[2]||(v[2]=ce(()=>{},["stop"])),class:"oe-checkbox mt-0.5",readonly:""},null,8,Ft),t("span",Ct,O(k),1)])],10,_t))),128))])):P("",!0)]),_:1})]),y.availableTorques.length>1?(o(),i("div",$t,[t("button",{onClick:v[3]||(v[3]=k=>l.value=!e(l)),class:"flex items-center justify-between w-full text-left transition-colors hover:text-primary-600"},[v[11]||(v[11]=t("span",{class:"text-lg font-semibold text-gray-900 font-oswald"},"Torque (Nm)",-1)),N(j,{name:e(l)?"heroicons:chevron-up":"heroicons:chevron-down",class:"w-4 h-4 text-gray-400"},null,8,["name"])]),N(te,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"max-h-[200px] opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"max-h-[200px] opacity-100","leave-to-class":"opacity-0 max-h-0"},{default:le(()=>[e(l)?(o(),i("div",Tt,[t("div",Pt,[t("span",qt,O(e(T)>0?`≥ ${e(T)} Nm`:"All torque values"),1),e(T)>0?(o(),i("button",{key:0,onClick:V,class:"text-xs transition-colors text-primary-600 hover:text-primary-700 font-commercial"}," Reset ")):P("",!0)]),t("input",{type:"range",min:e(F),max:e(C),step:50,value:e(T),onInput:M,class:"w-full torque-slider"},null,40,Rt),t("div",Nt,[t("span",null,O(e(F))+" Nm",1),t("span",null,O(e(C))+" Nm",1)]),e(T)>0?(o(),i("label",Dt,[t("input",{type:"checkbox",checked:y.includeOe,onChange:v[4]||(v[4]=k=>y.$emit("include-oe-change",k.target.checked)),class:"oe-checkbox"},null,40,Et),v[12]||(v[12]=t("span",null,"Show products without torque value",-1))])):P("",!0)])):P("",!0)]),_:1})])):P("",!0),y.availableDrivingStyles.length>1?(o(),i("div",Lt,[t("button",{onClick:v[5]||(v[5]=k=>m.value=!e(m)),class:"flex items-center justify-between w-full text-left transition-colors hover:text-primary-600"},[v[13]||(v[13]=t("span",{class:"text-lg font-semibold text-gray-900 font-oswald"},"Driving style",-1)),N(j,{name:e(m)?"heroicons:chevron-up":"heroicons:chevron-down",class:"w-4 h-4 text-gray-400"},null,8,["name"])]),N(te,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"max-h-[300px] opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"max-h-[300px] opacity-100","leave-to-class":"opacity-0 max-h-0"},{default:le(()=>[e(m)?(o(),i("div",At,[(o(!0),i(I,null,K(y.availableDrivingStyles.filter(k=>k),k=>(o(),i("button",{key:k,onClick:z=>H(k),class:Q(["w-full text-left font-commercial text-sm",y.selectedDrivingStyles.includes(k)?"text-black font-bold":"text-gray-700 hover:bg-gray-50 hover:text-gray-900"])},[t("span",Ot,[t("input",{type:"checkbox",checked:y.selectedDrivingStyles.includes(k),onClick:v[6]||(v[6]=ce(()=>{},["stop"])),class:"oe-checkbox mt-0.5",readonly:""},null,8,jt),t("span",Ut,O(k),1)])],10,Mt))),128))])):P("",!0)]),_:1})])):P("",!0),y.availableFlywheels.length>1?(o(),i("div",It,[t("button",{onClick:v[7]||(v[7]=k=>w.value=!e(w)),class:"flex items-center justify-between w-full text-left transition-colors hover:text-primary-600"},[v[14]||(v[14]=t("span",{class:"text-lg font-semibold text-gray-900 font-oswald"},"Flywheel",-1)),N(j,{name:e(w)?"heroicons:chevron-up":"heroicons:chevron-down",class:"w-4 h-4 text-gray-400"},null,8,["name"])]),N(te,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"max-h-[300px] opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"max-h-[300px] opacity-100","leave-to-class":"opacity-0 max-h-0"},{default:le(()=>[e(w)?(o(),i("div",Vt,[(o(!0),i(I,null,K(y.availableFlywheels.filter(k=>k),k=>(o(),i("button",{key:k,onClick:z=>J(k),class:Q(["w-full text-left font-commercial text-sm",y.selectedFlywheel===k?"text-black font-bold":"text-gray-700 hover:bg-gray-50 hover:text-gray-900"])},[t("span",Gt,[t("input",{type:"checkbox",checked:y.selectedFlywheel===k,onClick:v[8]||(v[8]=ce(()=>{},["stop"])),class:"oe-checkbox mt-0.5",readonly:""},null,8,Ht),t("span",Kt,O(k),1)])],10,Bt))),128))])):P("",!0)]),_:1})])):P("",!0)])],4)])}}}),zt=be(Yt,[["__scopeId","data-v-66b3c100"]]),Wt=()=>{const q=_(""),L=_(0),$=_([]),r=_(""),d=_(!1);return{selectedFilter:q,selectedTorque:L,selectedDrivingStyles:$,selectedFlywheel:r,includeOE:d,applyFilter:m=>{q.value=m},clearFilter:()=>{q.value="",L.value=0,$.value=[],r.value="",d.value=!0}}},Re=()=>{const q=r=>{if(!r)return;const d=Ce(),f=r.getBoundingClientRect().top+window.pageYOffset-d;window.scrollTo({top:f,behavior:"smooth"})};return{scrollToElement:q,scrollToCategory:r=>{r&&ee(()=>{setTimeout(()=>{const d=document.querySelector(`[data-group="${r}"]`);d&&q(d)},100)})},scrollToFirstResult:(r,d)=>{ee(()=>{setTimeout(()=>{const f=window.innerWidth<1024;f&&r?q(r):!f&&d&&q(d)},100)})}}},ke=["Standard clutch","Standard clutch - to fit dual mass flywheel","Standard clutch - 5 Speed Gearbox","Standard clutch - 6 Speed Gearbox","Standard clutch - Conversion Kit to Solid Flywheel","Standard clutch - Hi-Torq Diaphragm","Standard clutch - suitable to dual mass flywheel","Standard clutch - Suits 2 Dowel Pins","Standard clutch - Suits 2 or 4 Dowel Pins","Standard clutch - to fit conversion kit with solid flywheel","Single Plate","Single Plate - 235mm Upgrade","Single Plate - 240mm Plate","Single Plate - 240mm upgrade kit","Single Plate - 250mm clutch","Single Plate - 260mm","Single Plate - 275mm","Single Plate - 5 Speed Gearbox","Single Plate - 5 Speed Gearbox - Upgrade kit","Single Plate - 6 Speed Gearbox","Single Plate - Conversion Kit to Solid Flywheel","Single Plate - Conversion Kit to Solid Flywheel - 250mm clutch","Single Plate - Conversion kit to Solid flywheel - 275mm clutch","Single Plate - Conversion kit to solid flywheel - Until 07/2004","Single Plate - Conversion kit to Solid flywheel - Until 07/2008","Single Plate - Conversion kit to solid flywheel - From 01/2009","Single Plate - Conversion kit to solid flywheel - From 07/2004","Single Plate - Conversion kit to solid flywheel - Upgrade Kit","Single Plate - conversion kit to solid flywheel 08/2004 ->","Single Plate - dual-mass flywheel - From 08/2004","Single Plate - dual-mass flywheel - Until 07/2004","Single Plate - European Release","Single Plate - Extra Heavy Duty Upgrade","Single Plate - From 03/2003","Single Plate - From 09/1987","Single Plate - Heavy Duty Upgrade","Single Plate - Hi-Torq Diaphragm","Single Plate - Performance Upgrade Clutch Kit","Single Plate - Pull Type","Single Plate - Push Type","Single Plate - Suit Cast Iron Fork","Single Plate - Suit Pressed Metal Fork","Single Plate - suitable for dual mass flywheel","Single Plate - Suits 2 Dowel Pins","Single Plate - suits 2 or 4 Dowel Pins","Single Plate - to fit dual mass flywheel","Single Plate - up to 08/1987","Single Plate - Upgrade Clutch Kit","Single Plate to fit OET dual-mass Flywheel","Single Plate Upgrade","Upgrade Clutch Kit","Flywheel","Flywheel - 5 & 6 Speed Gearbox","Flywheel - suit 6 Speed Gearbox","Flywheel - suitable for KM2463F","Flywheel - suits 5 Speed Gearbox","Flywheel - suits 6 speed","Counterweight for SMZ04C flywheel","270mm Twin Plate","270mm triple plate","250mm Twin Plate","230mm Twin Plate","230mm Twin Plate - 6 Speed Gearbox","230mm Twin Plate - From 01/2009","230mm Twin Plate - requires larger capacity clutch master cylinder","230mm twin plate - Suit Pressed Metal Fork","230mm Twin Plate - Until 12/2008","Twin plate","280mm Triple Plate","280mm single plate","200mm Single Plate","200mm Triple plate","200mm twin plate","200mm Twin Plate - 5 Speed Gearbox","200mm Twin Plate - 6 Speed Gearbox","200mm Twin Plate - From 01/2009","200mm Twin Plate - Until 02/2003","184mm Triple Plate","184mm quatro plate","184mm Single Plate","184mm Triple Plate","184mm Twin Plate","184mm Twin Plate - 5 Speed Gearbox","184mm Twin Plate - 6 Speed Gearbox","Service kit","Bolts","Clutch Alignment Tool","Clutch Booster","Clutch Fork","Clutch Master Cylinder","Clutch Pivot Fork Kit","Concentric Slave Cyl
1inder","Concentric Slave"],Jt=q=>{const L=d=>d.available>0?1:d.intransit>0?2:d.manufacturerstock>0?3:d.dropship?4:5,$=D(()=>{var l;if(!((l=q.value)!=null&&l.length))return[];const f=q.value.filter((m,w,b)=>b.findIndex(F=>F.item.id===m.item.id)===w).reduce((m,w)=>{const b=w.item.groupdescription||"Other Products";return m[b]||(m[b]=[]),m[b].push(w),m},{});return Object.entries(f).map(([m,w])=>({groupName:m,items:w.sort((b,F)=>L(b.item)-L(F.item))})).sort((m,w)=>{const b=ke.indexOf(m.groupName),F=ke.indexOf(w.groupName);return b!==-1&&F!==-1?b-F:b!==-1?-1:F!==-1?1:m.groupName.localeCompare(w.groupName)})}),r=D(()=>$.value.map(d=>d.groupName));return{groupedApplications:$,availableGroups:r}},Qt=q=>{const L=D(()=>{var f;if(!((f=q.value)!=null&&f.length))return[];const d=q.value.map(l=>l.parameter).filter(l=>l&&l.trim()!=="");return["",...Array.from(new Set(d)).sort()]}),$=D(()=>{var f;if(!((f=q.value)!=null&&f.length))return[];const d=q.value.map(l=>l.parameter2).filter(l=>l&&l.trim()!=="");return["",...Array.from(new Set(d)).sort()]}),r=D(()=>{var f;if(!((f=q.value)!=null&&f.length))return[];const d=q.value.map(l=>l.parameter3).filter(l=>l&&l.trim()!=="");return["",...Array.from(new Set(d)).sort()]});return{availableTorques:L,availableDrivingStyles:$,availableFlywheels:r}},Xt={class:"pt-8 pb-28 bg-gray-50"},Zt={class:"mx-auto max-w-content"},el={key:0,class:"py-12 text-center"},tl={key:1,class:"py-12 text-center"},ll={class:"lg:flex lg:gap-8"},al={class:"flex-1"},ol=["data-group"],sl={class:"pb-4 mb-8 border-b border-primary-200"},rl={class:"text-2xl font-bold text-primary-700 font-oswald"},nl={class:"grid grid-cols-2 gap-2 sm:gap-4 md:gap-6 lg:grid-cols-2 xl:grid-cols-3"},il=ue({__name:"ProductList",props:{applications:{},loading:{type:Boolean},itemListName:{}},setup(q,{expose:L}){const $=q,{selectedFilter:r,selectedTorque:d,selectedDrivingStyles:f,selectedFlywheel:l,includeOE:m,applyFilter:w,clearFilter:b}=Wt(),{scrollToCategory:F,scrollToFirstResult:C}=Re(),{groupedApplications:T,availableGroups:A}=Jt(we($,"applications")),{availableTorques:M,availableDrivingStyles:V,availableFlywheels:H}=Qt(we($,"applications")),J=_(!1),Y=_(null),y=_(null),v=_(null),j=D(()=>{let x=T.value;return r.value&&(x=x.filter(S=>S.groupName===r.value)),(d.value>0||f.value.length>0||l.value)&&(x=x.map(S=>({...S,items:S.items.filter(G=>{const oe=G.parameter==="OE"||!G.parameter||G.parameter.trim()==="",re=d.value===0||m.value&&oe||G.parameter&&parseFloat(G.parameter)>=d.value,ne=f.value.length===0||f.value.includes(G.parameter2),W=!l.value||G.parameter3===l.value;return re&&ne&&W})})).filter(S=>S.items.length>0)),x}),k=x=>{w(x),ee(()=>{x?F(x):C(y.value,y.value)})},z=x=>{k(r.value===x?"":x)},ae=x=>{d.value=x,ee(()=>{const S=y.value||v.value;C(S,S)})},h=x=>{const S=f.value.indexOf(x);S>-1?f.value.splice(S,1):f.value.push(x),ee(()=>{const G=y.value||v.value;C(G,G)})},n=x=>{l.value=l.value===x?"":x,ee(()=>{const S=y.value||v.value;C(S,S)})},p=()=>{b()},u=()=>{r.value="",d.value=0,f.value=[],l.value="",b()},U=()=>{ee(()=>{const x=y.value||v.value;C(x,x)})},B=()=>{var x;(x=Y.value)==null||x.openModal()};return xe(()=>{const x=()=>{if(window.innerWidth>=1024||!Y.value){J.value=!1;return}const S=Y.value.getBoundingClientRect();S&&(J.value=S.bottom<0)};window.addEventListener("scroll",x),x(),Se(()=>{window.removeEventListener("scroll",x)})}),L({clearCategoryFilter:p,resultsRef:y,noResultsRef:v}),(x,S)=>{const G=pt,oe=zt,re=$e,ne=ge;return o(),i("section",Xt,[t("div",Zt,[x.loading?(o(),i("div",el,S[2]||(S[2]=[t("div",{class:"inline-block w-8 h-8 border-4 rounded-full border-primary-600 border-t-transparent animate-spin"},null,-1),t("p",{class:"mt-4 text-gray-600 font-commercial"},"Loading products...",-1)]))):x.applications.length?(o(),i(I,{key:2},[N(G,{ref_key:"mobileFilterRef",ref:Y,"available-groups":e(A),"available-torques":e(M),"available-driving-styles":e(V),"available-flywheels":e(H),"selected-filter":e(r),"selected-torque":e(d),"selected-driving-styles":e(f),"selected-flywheel":e(l),"include-oe":e(m),"grouped-applications":e(T),onCategoryChange:z,onTorqueChange:ae,onDrivingStyleChange:h,onFlywheelChange:n,onIncludeOeChange:S[0]||(S[0]=W=>m.value=W),onFiltersApplied:U},null,8,["available-groups","available-torques","available-driving-styles","available-flywheels","selected-filter","selected-torque","selected-driving-styles","selected-flywheel","include-oe","grouped-applications"]),t("div",ll,[N(oe,{"available-groups":e(A),"available-torques":e(M),"available-driving-styles":e(V),"available-flywheels":e(H),"selected-filter":e(r),"selected-torque":e(d),"selected-driving-styles":e(f),"selected-flywheel":e(l),"include-oe":e(m),onCategoryChange:z,onTorqueChange:ae,onDrivingStyleChange:h,onFlywheelChange:n,onIncludeOeChange:S[1]||(S[1]=W=>m.value=W),onClearAll:u},null,8,["available-groups","available-torques","available-driving-styles","available-flywheels","selected-filter","selected-torque","selected-driving-styles","selected-flywheel","include-oe"]),t("div",al,[e(j).length>0?(o(),i("div",{key:0,ref_key:"resultsRef",ref:y,class:"space-y-12"},[(o(!0),i(I,null,K(e(j),W=>(o(),i("div",{key:W.groupName,"data-group":W.groupName,class:"group-section"},[t("div",sl,[t("h3",rl,O(W.groupName),1)]),t("div",nl,[(o(!0),i(I,null,K(W.items,(a,c)=>(o(),ie(re,{key:a.item.id||Math.random(),item:a.item,note:a.note,description:a.description,"item-list-name":x.itemListName,index:c},null,8,["item","note","description","item-list-name","index"]))),128))])],8,ol))),128))],512)):(o(),i("div",{key:1,ref_key:"noResultsRef",ref:v,class:"py-12 text-center"},S[4]||(S[4]=[t("div",{class:"p-8 bg-white border border-gray-200 rounded-lg"},[t("p",{class:"text-lg text-gray-600 font-commercial"}," No products match your filters ")],-1)]),512))])]),N(te,{"enter-active-class":"transition duration-300","enter-from-class":"translate-y-8 opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"transition duration-200","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"translate-y-8 opacity-0"},{default:le(()=>[e(J)?(o(),i("button",{key:0,onClick:B,class:"fixed z-40 flex items-center justify-center text-white rounded-full shadow-lg bottom-6 right-6 w-14 h-14 bg-primary-600 hover:bg-primary-700 lg:hidden filter-button-mobile"},[N(ne,{name:"heroicons:funnel",class:"w-6 h-6"})])):P("",!0)]),_:1})],64)):(o(),i("div",tl,S[3]||(S[3]=[t("div",{class:"p-8 bg-white border rounded-lg"},[t("p",{class:"text-lg text-gray-600 font-commercial"},"No products found"),t("p",{class:"mt-2 text-sm text-gray-500 font-commercial"}," Try adjusting your filters or search terms ")],-1)])))])])}}}),cl=be(il,[["__scopeId","data-v-c16ab326"]]),ul={class:"pt-4 pb-8 md:pt-8 bg-gray-50"},dl={class:"mx-auto max-w-content"},ml={class:"p-6 bg-white rounded-lg shadow-sm"},vl={class:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3"},yl=["title"],pl=["value","title"],gl=["disabled","title"],fl=["value","title"],hl=["disabled","title"],bl=["value","title"],xl=["disabled","title"],wl=["value","title"],kl=["disabled","title"],_l=["value","title"],Sl={class:"flex gap-3 mt-6"},Fl=["disabled"],Cl={key:0},$l={key:1,class:"flex items-center justify-center space-x-2"},Zl=ue({__name:"VehicleSearch",setup(q,{expose:L}){const $=Te(),{country:r}=Le(),{source:d}=Ae(),f=Pe(),l=_({make:"",peryear:"",model:"",variant:"",engine:""}),m=_({makes:[""],peryears:[""],models:[""],variants:[""],engines:[""]}),w=_([]),b=_(!1),F=_(!1),C=_(!1),T=_(),A=D(()=>!l.value.make),M=D(()=>!l.value.make||!l.value.peryear),V=D(()=>!l.value.make||!l.value.peryear||!l.value.model),H=D(()=>!l.value.make||!l.value.peryear||!l.value.model||!l.value.variant),J=D(()=>!l.value.make||!l.value.peryear||!l.value.model||!l.value.variant||!l.value.engine||b.value||F.value),Y=D(()=>[l.value.make,l.value.model,l.value.peryear,l.value.variant,l.value.engine].filter(
1Boolean).join(" -> ")),y=D(()=>A.value?"Select Make First":"Select Year"),v=D(()=>M.value?"Select Year First":"Select Model"),j=D(()=>V.value?"Select Model First":"Select Variant"),k=D(()=>H.value?"Select Variant First":"Select Engine"),z=a=>a.sort((c,g)=>parseInt(g)-parseInt(c)),ae=a=>a.sort(),h=(a,c)=>{const g=a==="peryears"?z([...c]):ae([...c]);m.value[a]=["",...g]},n=()=>{const a={};return Object.entries(l.value).forEach(([c,g])=>{g&&(a[c]=g)}),a},p=async()=>{await ee(),setTimeout(()=>{var E,R;const a=((E=T.value)==null?void 0:E.resultsRef)||((R=T.value)==null?void 0:R.noResultsRef);if(!a)return;const c=Ce(),s=a.getBoundingClientRect().top+window.pageYOffset-c;window.scrollTo({top:s,behavior:"smooth"})},200)},u=(a,c)=>{let g;return(...s)=>{clearTimeout(g),g=setTimeout(()=>a.apply(null,s),c)}},U=()=>{if(C.value)return;const a=n();me({query:a},{replace:!0})},B=async()=>{var c,g,s,E;const a=$.query;if(!(!a.make&&!a.peryear&&!a.model&&!a.variant&&!a.engine)){C.value=!0;try{if(a.make&&a.peryear&&a.model&&a.variant&&a.engine){const{data:R}=await Z({country:r.value,make:a.make,peryear:a.peryear,model:a.model,variant:a.variant,engine:a.engine,show:!0});R!=null&&R.results&&(w.value=R.results,await p())}if(a.make){const{data:R}=await Z({country:r.value,make:a.make});if((c=R==null?void 0:R.options)!=null&&c.peryear&&h("peryears",R.options.peryear),a.peryear){const{data:ve}=await Z({country:r.value,make:a.make,peryear:a.peryear});if((g=ve==null?void 0:ve.options)!=null&&g.model&&h("models",ve.options.model),a.model){const{data:ye}=await Z({country:r.value,make:a.make,peryear:a.peryear,model:a.model});if((s=ye==null?void 0:ye.options)!=null&&s.variant&&h("variants",ye.options.variant),a.variant){const{data:pe}=await Z({country:r.value,make:a.make,peryear:a.peryear,model:a.model,variant:a.variant});(E=pe==null?void 0:pe.options)!=null&&E.engine&&h("engines",pe.options.engine)}}}}Object.assign(l.value,{make:a.make||"",peryear:a.peryear||"",model:a.model||"",variant:a.variant||"",engine:a.engine||""}),w.value.length>0&&re()}catch(R){console.error("Error loading URL filters:",R)}finally{await ee(),C.value=!1}}},x=u(async a=>{var c;if(a){b.value=!0;try{const{data:g}=await Z({country:r.value,make:a});(c=g==null?void 0:g.options)!=null&&c.peryear&&h("peryears",g.options.peryear)}catch(g){console.error("Error loading peryears:",g),m.value.peryears=[""]}finally{b.value=!1}}},300),S=u(async(a,c)=>{var g;if(!(!a||!c)){b.value=!0;try{const{data:s}=await Z({country:r.value,make:a,peryear:c});(g=s==null?void 0:s.options)!=null&&g.model&&h("models",s.options.model)}catch(s){console.error("Error loading models:",s),m.value.models=[""]}finally{b.value=!1}}},300),G=u(async(a,c,g)=>{var s;if(!(!a||!c||!g)){b.value=!0;try{const{data:E}=await Z({country:r.value,make:a,peryear:c,model:g});(s=E==null?void 0:E.options)!=null&&s.variant&&h("variants",E.options.variant)}catch(E){console.error("Error loading variants:",E),m.value.variants=[""]}finally{b.value=!1}}},300),oe=u(async(a,c,g,s)=>{var E;if(!(!a||!c||!g||!s)){b.value=!0;try{const{data:R}=await Z({country:r.value,make:a,peryear:c,model:g,variant:s});(E=R==null?void 0:R.options)!=null&&E.engine&&h("engines",R.options.engine)}catch(R){console.error("Error loading engines:",R),m.value.engines=[""]}finally{b.value=!1}}},300),re=()=>{var a;if(w.value.length>0){window.dataLayer=window.dataLayer||[],window.dataLayer.push({ecommerce:null});const c=()=>{var E,R;const s=(E=w.value[0])==null?void 0:E.item;return(R=s==null?void 0:s.price)!=null&&R.currency?s.price.currency:d.value==="UK"?"GBP":"EUR"},g=()=>[l.value.make,l.value.model,l.value.peryear,l.value.variant,l.value.engine].filter(Boolean).join(" -> ");window.dataLayer.push({event:"view_item_list",ecommerce:{currency:((a=w.value[0])==null?void 0:a.item.price.currency)||c(),item_list_name:g(),items:w.value.map((s,E)=>{var R;return{item_id:s.item.id,item_name:s.item.name,item_brand:"AUSTRALIAN CLUTCH SERVICES PTY LTD",item_category:s.item.groupdescription||"",index:Number(E),price:parseFloat((Number((R=s.item.price)==null?void 0:R.price)||0).toFixed(2)),quantity:1}})}})}},ne=()=>{l.value={make:"",peryear:"",model:"",variant:"",engine:""},m.value={makes:m.value.makes,peryears:[""],models:[""],variants:[""],engines:[""]},w.value=[],U()},W=async()=>{var c;if($.path==="/"){try{const g=n();await me({path:"/catalogue",query:g})}catch(g){console.error("VehicleSearch: Navigation error:",g)}return}(c=T.value)!=null&&c.clearCategoryFilter&&T.value.clearCategoryFilter();const a=n();await me({query:a},{replace:!0}),F.value=!0;try{const{data:g}=await Z({country:r.value,make:l.value.make,peryear:l.value.peryear,model:l.value.model,variant:l.value.variant,engine:l.value.engine,show:!0}),s=g==null?void 0:g.results;w.value=s||[],re(),await p()}catch(g){console.error("Search error:",g)}finally{F.value=!1}};return X(()=>l.value.make,(a,c)=>{C.value||a===c||(f.clearSourceListName(),l.value.peryear="",l.value.model="",l.value.variant="",l.value.engine="",m.value.peryears=[""],m.value.models=[""],m.value.variants=[""],m.value.engines=[""],w.value=[],a&&x(a),U())}),X(()=>l.value.peryear,(a,c)=>{C.value||a===c||(l.value.model="",l.value.variant="",l.value.engine="",m.value.models=[""],m.value.variants=[""],m.value.engines=[""],w.value=[],a&&l.value.make&&S(l.value.make,a),U())}),X(()=>l.value.model,(a,c)=>{C.value||a===c||(l.value.variant="",l.value.engine="",m.value.variants=[""],m.value.engines=[""],w.value=[],a&&l.value.make&&l.value.peryear&&G(l.value.make,l.value.peryear,a),U())}),X(()=>l.value.variant,(a,c)=>{C.value||a===c||(l.value.engine="",m.value.engines=[""],w.value=[],a&&l.value.make&&l.value.peryear&&l.value.model&&oe(l.value.make,l.value.peryear,l.value.model,a),U())}),X(()=>l.value.engine,()=>{C.value||(w.value=[],U())}),xe(async()=>{var c;b.value=!0;const a=qe("backend-down-alert",()=>!1);try{await B();const{data:g,error:s}=await Z({country:r.value});s||!g?(a.value=!0,console.error("Backend is down or unavailable:",s)):(c=g.options)!=null&&c.make&&h("makes",g.options.make);const E=$.query;E.make&&E.peryear&&E.model&&E.variant&&E.engine&&w.value.length===0&&await W()}catch(g){console.error("Error loading makes:",g)}finally{b.value=!1}}),L({clearResults:ne}),(a,c)=>{const g=cl;return o(),i(I,null,[t("section",ul,[t("div",dl,[t("div",ml,[t("div",vl,[t("div",null,[c[5]||(c[5]=t("label",{for:"make",class:"block mb-2 text-sm font-medium text-gray-700 font-commercial"}," Make ",-1)),se(t("select",{id:"make","onUpdate:modelValue":c[0]||(c[0]=s=>e(l).make=s),class:"w-full px-3 py-2 truncate bg-white border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 font-commercial",title:e(l).make||"Select Make"},[(o(!0),i(I,null,K(e(m).makes,s=>(o(),i("option",{key:s,value:s,title:s||"Select Make"},O(s||"Select Make"),9,pl))),128))],8,yl),[[de,e(l).make]])]),t("div",null,[c[6]||(c[6]=t("label",{for:"peryear",class:"block mb-2 text-sm font-medium text-gray-700 font-commercial"}," Year ",-1)),se(t("select",{id:"peryear","onUpdate:modelValue":c[1]||(c[1]=s=>e(l).peryear=s),disabled:e(A),class:"w-full px-3 py-2 truncate bg-white border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 font-commercial disabled:bg-gray-100 disabled:cursor-not-allowed",title:e(l).peryear||e(y)},[(o(!0),i(I,null,K(e(m).peryears,s=>(o(),i("option",{key:s,value:s,title:s||e(y)},O(s||e(y)),9,fl))),128))],8,gl),[[de,e(l).peryear]])]),t("div",null,[c[7]||(c[7]=t("label",{for:"model",class:"block mb-2 text-sm font-medium text-gray-700 font-commercial"}," Model ",-1)),se(t("select",{id:"model","onUpdate:modelValue":c[2]||(c[2]=s=>e(l).model=s),disabled:e(M),class:"w-full px-3 py-2 truncate bg-white border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 font-commercial disabled:bg-gray-100 disabled:cursor-not-allowed",title:e(l).model||e(v)},[(o(!0),i(I,null,K(e(m).models,s=>(o(),i("option",{key:s,value:s,title:s||e(v)},O(s||e(v)),9,bl))),128))],8,hl),[[de,e(l).model]])]),t("div",null,[c[8]||(c[8]=t("label",{for:"variant",class:"block mb-2 text-sm font-medium text-gray-700 font-commercial"}," Variant ",-1)),se(t("select",{id:"variant","onUpdate:modelValue":c[3]||(c[3]=s=>e(l).variant=s),disabled:e(V),class:"w-full px-3 py-2 truncate bg-white border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 font-commercial disabled:bg-gray-100 disabled:cursor-not-allowed",title:e(l).variant||e(j)},[(o(!0),i(I,null,K(e(m).variants,s=>(o(),i("option",{key:s,value:s,title:s||e(j)},O(s||e(j)),9,wl))),128))],8,xl),[[de,e(l).variant]])]),t("div",null,[c[9]||(c[9]=t("label",{for:"engine",class:"block mb-2 text-sm font-medium text-gray-700 font-commercial"}," Engine ",-1)),se(t("select",{id:"engine","onUpdate:modelValue":c[4]||(c[4]=s=>e(l).engine=s),disabled:e(H),class:"w-full px-3 py-2 truncate bg-white border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 font-commercial disabled:bg-gray-100 disabled:cursor-not-allowed",title:e(l).engine||e(k)},[(o(!0),i(I,null,K(e(m).engines,s=>(o(),i("option",{key:s,value:s,title:s||e(k)},O(s||e(k)),9,_l))),128))],8,kl),[[de,e(l).engine]])])]),t("div",Sl,[t("button",{type:"button",onClick:W,disabled:e(J),class:"w-24 px-6 py-2 text-white transition-colors duration-200 rounded-md bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 font-commercial disabled:opacity-50 disabled:cursor-not-allowed"},[!e(b)&&!e(F)?(o(),i("span",Cl,"Search")):(o(),i("span",$l,c[10]||(c[10]=[t("div",{class:"w-4 h-4 border-b-2 border-white rounded-full animate-spin"},null,-1)])))],8,Fl),t("button",{type:"button",onClick:ne,class:"px-6 py-2 text-gray-700 transition-colors duration-200 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 font-commercial"}," Clear All ")])])])]),(a._.provides[he]||a.$route).path!=="/"?(o(),ie(g,{key:0,ref_key:"productListRef",ref:T,applications:e(w),loading:e(F),"item-list-name":e(Y)},null,8,["applications","loading","item-list-name"])):P("",!0)],64)}}}),Tl={class:"py-8 bg-gray-50"},Pl={class:"p-6 bg-white rounded-lg shadow-sm"},ql={class:"flex flex-col gap-3 sm:flex-row"},Rl={class:"relative flex-1"},Nl=["aria-invalid"],Dl={key:0,id:"partNumberHint","aria-live":"polite",class:"mt-1 text-xs text-red-600 font-commercial"},El={key:1,class:"absolute left-0 right-0 top-full z-20 mt-2 bg-white border border-gray-200 rounded-md shadow-lg"},Ll={class:"flex items-center justify-between px-3 pt-2.5 pb-1.5"},Al={class:"pb-1"},Ml=["onMousedown"],Ol={class:"text-sm text-gray-700 truncate font-commercial"},jl=["onMousedown"],Ul=["disabled"],Il={key:0},Vl={key:1,class:"flex items-center justify-center"},Bl={class:"px-4 mx-auto max-w-content sm:px-6 lg:px-8"},Gl={class:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"},Hl={key:1,class:"pt-8 pb-28 bg-gray-50"},Kl={class:"px-4 mx-auto max-w-content sm:px-6 lg:px-8"},Yl={class:"text-center"},zl={class:"p-8 bg-white rounded-lg shadow-sm"},Wl={class:"mb-4 text-gray-600 font-commercial"},_e="recent-searches-xtreme-clutch",Jl=8,ea=ue({__name:"NumberSearch",setup(q,{expose:L}){const $=Pe(),r=qe("number-search-results",()=>({})),d=_(""),f=_(!1),l=_([]),m=_(!1),w=_(""),b=_(),F=_([]),C=_(!1),T=()=>{try{const n=localStorage.getItem(_e);F.value=n?JSON.parse(n):[]}catch{F.value=[]}},A=()=>{localStorage.setItem(_e,JSON.stringify(F.value))},M=n=>{const p=n.trim();p&&(F.value=[p,...F.value.filter(u=>u.toLowerCase()!==p.toLowerCase())].slice(0,Jl),A())},V=n=>{F.value=F.value.filter(p=>p!==n),A()},H=()=>{F.value=[],A()},J=n=>{d.value=n,C.value=!1,z()},Y=()=>{setTimeout(()=>{C.value=!1},150)},{scrollToElement:y}=Re(),v=D(()=>l.value.filter(n=>{var u;return(Number((u=n.price)==null?void 0:u.price)||0)>0}
1)),j=D(()=>d.value.trim().length===1),k=D(()=>d.value.trim().length>=2),z=async()=>{if(!k.value)return;if($.clearSourceListName(),Te().path==="/"){try{await me({path:"/catalogue",query:{q:d.value.trim()}})}catch(p){console.error("NumberSearch: Navigation error:",p)}return}await ae(d.value.trim())},ae=async n=>{const p=n.trim();if(p.length<2){d.value=n,l.value=[],m.value=!1;return}const u=p.toLowerCase();if(d.value=n,f.value=!0,w.value=p,m.value=!0,M(p),me({query:{q:p}},{replace:!0}),r.value[u]){l.value=r.value[u]||[],f.value=!1,await ee(),v.value.length>0&&b.value&&y(b.value);return}try{const{data:U,error:B}=await je({keyword:n.trim()});if(B){console.error("NumberSearch: API error:",B),l.value=[],r.value[u]=[];return}const x=Array.isArray(U)?U:[];l.value=x,r.value[u]=x,window.dataLayer=window.dataLayer||[],window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"search",search_term:w.value}),l.value.length>0&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"view_item_list",ecommerce:{item_list_name:"Search Results",items:l.value.map((S,G)=>{var oe;return{item_id:S.id||S._id,item_name:S.name||S.urlcomponent,item_brand:"AUSTRALIAN CLUTCH SERVICES PTY LTD",item_category:S.groupdescription||"",index:Number(G),price:parseFloat((Number((oe=S.price)==null?void 0:oe.price)||0).toFixed(2)),quantity:1}})}})),await ee(),v.value.length>0&&b.value&&y(b.value)}catch(U){console.error("NumberSearch: performSearch error:",U),l.value=[],r.value[u]=[]}finally{f.value=!1}},h=()=>{l.value=[],d.value="",f.value=!1,m.value=!1,w.value=""};return xe(()=>{T()}),L({clearResults:h,performSearch:ae}),(n,p)=>{const u=ge,U=$e;return o(),i(I,null,[t("section",Tl,[t("div",Pl,[t("div",ql,[t("div",Rl,[se(t("input",{id:"partNumber","onUpdate:modelValue":p[0]||(p[0]=B=>Fe(d)?d.value=B:null),type:"text",autocomplete:"off",placeholder:"Part no.","aria-describedby":"partNumberHint","aria-invalid":e(j),class:"w-full px-4 py-3 text-sm bg-white border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 font-commercial",onKeyup:Me(z,["enter"]),onFocus:p[1]||(p[1]=B=>C.value=!0),onBlur:Y},null,40,Nl),[[Oe,e(d)]]),e(j)?(o(),i("p",Dl," Please enter at least 2 characters. ")):P("",!0),e(C)&&!e(d).trim()&&e(F).length>0?(o(),i("div",El,[t("div",Ll,[p[2]||(p[2]=t("p",{class:"text-xs font-bold tracking-wider text-gray-500 uppercase font-oswald"}," Recent Searches ",-1)),t("button",{type:"button",onMousedown:ce(H,["prevent"]),class:"text-xs text-gray-400 transition-colors hover:text-primary-500 font-commercial"}," Clear ",32)]),t("ul",Al,[(o(!0),i(I,null,K(e(F),B=>(o(),i("li",{key:B,class:"flex items-center justify-between group hover:bg-gray-50"},[t("button",{type:"button",onMousedown:ce(x=>J(B),["prevent"]),class:"flex items-center flex-1 gap-3 py-2 pl-3 text-left min-w-0"},[N(u,{name:"heroicons:clock",class:"flex-shrink-0 w-4 h-4 text-gray-400"}),t("span",Ol,O(B),1)],40,Ml),t("button",{type:"button",onMousedown:ce(x=>V(B),["prevent"]),"aria-label":"Remove search term",class:"flex items-center justify-center flex-shrink-0 w-8 h-8 mr-1 text-gray-300 transition-colors rounded-lg opacity-0 hover:text-gray-500 hover:bg-gray-100 group-hover:opacity-100"},[N(u,{name:"heroicons:x-mark",class:"w-4 h-4"})],40,jl)]))),128))])])):P("",!0)]),t("button",{type:"button",onClick:z,disabled:!e(k)||e(f),class:"px-8 py-3 text-sm font-bold tracking-wider text-white transition-colors duration-200 rounded-md bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap"},[e(f)?(o(),i("span",Vl,p[3]||(p[3]=[t("div",{class:"w-4 h-4 border-b-2 border-white rounded-full animate-spin"},null,-1)]))):(o(),i("span",Il,"SEARCH"))],8,Ul)])])]),e(v).length>0&&(n._.provides[he]||n.$route).path!=="/"?(o(),i("section",{key:0,class:"pt-8 pb-28 bg-gray-50",ref_key:"resultsSection",ref:b},[t("div",Bl,[t("div",Gl,[(o(!0),i(I,null,K(e(v),(B,x)=>(o(),ie(U,{key:B.id||Math.random(),item:B,"item-list-name":"Search Results",index:x},null,8,["item","index"]))),128))])])],512)):P("",!0),e(m)&&e(v).length===0&&!e(f)&&(n._.provides[he]||n.$route).path!=="/"?(o(),i("section",Hl,[t("div",Kl,[t("div",Yl,[t("div",zl,[N(u,{name:"heroicons:magnifying-glass",class:"w-16 h-16 mx-auto mb-4 text-gray-400"}),p[4]||(p[4]=t("h3",{class:"mb-2 text-xl font-bold text-gray-900 font-oswald"}," No Results Found ",-1)),t("p",Wl,` Sorry, we couldn't find any products matching "`+O(e(w))+'". ',1)])])])])):P("",!0)],64)}}});
1export{Xl as _,Zl as a,ea as b};

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.