PageSourceSearch

https://www.canadiantire.ca/etc.clientlibs/ctcweb-core/clientlibs/…/productListingPanel.vUqq2WN8.chunk.js

js canadiantire.ca collected 2026-10-01 08:40:27 UTC 20,805 bytes, 2 lines download raw bytes

1import{r as i,j as L,i as ss}from"./vendors.BAJps33Q.chunk.js";import{g as as,e as ze,f as Nt,h as os,j as ue,k as ve,L as Ke,T as la,m as rs,l as ua,n as we,o as g,p as et,q as da,t as fa,d as ee,v as pa,P as T,I as ga,w as ma,x as Vt,y as Wt,z as xt,s as Ye,C as $t,E as te,F as Fe,M as Gt,G as ha,H as is,J as ba,K as Sa,N as jt,O as Ut,Q as Ca,S as La,U as Pa,V as ya,W as Ta,X as ns,Y as Aa,Z as Ra,_ as Da,$ as Ia,a0 as Ea,a1 as Fa,a2 as va,a3 as wa,a4 as ka,a5 as Oa,a6 as Ma,a7 as cs,a8 as Xe,a9 as _a,aa as Na,ab as Va,a as ls,ac as Wa,ad as xa,ae as $a,af as Ga,ag as ja,ah as Ua,ai as Ba,aj as Bt,ak as qa,al as le,am as Ha,an as za,ao as Ka,ap as $,aq as qt,ar as Qa,as as Ja,at as Ya,au as Xa,av as Za,aw as De,ax as eo,ay as Ht,az as zt,aA as to,aB as so,aC as ao,aD as oo,aE as ro,aF as io,aG as no,aH as co,aI as lo,aJ as uo,aK as fo,aL as Kt,aM as po,aN as Z,aO as go,aP as mo,aQ as ho,aR as bo,aS as So,aT as Co,aU as Lo,aV as Po,aW as yo,aX as Qt,aY as To,aZ as Ao,a_ as Jt,a$ as Qe,b0 as Ro,b1 as Je,b2 as Do,b3 as Io,b4 as Eo,b5 as Fo,b6 as vo,b7 as wo,b8 as ko,b9 as Yt,ba as G,bb as Xt,bc as Oo,bd as Mo,be as _o,bf as No,bg as Zt,bh as Vo,bi as Wo,bj as xo,bk as $o,bl as Go,bm as jo}from"./main.BhSogTmc.js";import{u as Uo,a as Bo,S as qo,P as Ho}from"./ProductCard.ft20sXot.chunk.js";import{g as zo,R as Ko,a as es}from"./getCircleColor.Lmzb5wkv.chunk.js";import{i as Qo}from"./isTireFinderRecommendationComparisonPage.LyHjGJMX.chunk.js";import"./sortSubCategoryDataByName.O1WnMIHg.chunk.js";import"./useSuggestions.hook.BauGzXpk.chunk.js";import"./NoAutomotiveProducts.B-pV0Yda.chunk.js";import"./ProgressBanner.helper.C1WlG_jN.chunk.js";import"./useMyGarageController.CKDdDrym.chunk.js";import"./calculateDropdownOpenState._CScJU1-.chunk.js";import"./useCurrentPath.CQKpT6LB.chunk.js";import"./vehicleIgnoredFields.selectors.D1t5ObXI.chunk.js";import"./useCheckIsAOAETiresFlow.9byilNOw.chunk.js";import"./SignInLabel.hooks.BupR7kxw.chunk.js";import"./filterHelpers.Co4wvQuA.chunk.js";import"./SearchModal.DZJhj5wS.chunk.js";import"./UseIsRewardsHub.hook.CU6xg3KG.chunk.js";import"./useHandleMissingDetailsFlyout.hook.DV2o9saq.chunk.js";const Ze=(t,e)=>{const r=typeof t=="string"&&!t.trim();return t===void 0||r?e:t.toString()},Jo=(t,e,r)=>{if(e===ue.TIRE_ROAD_RATINGS&&os.RATING_ID in t)return String(t.ratingId);if(e===ue.SPECIFICATIONS&&ve.CODE in t)return r===ve.CODE?t.code:t.label},tt=(t,e,r,s="",a=!1)=>t?.reduce((o,n,d)=>{const m=n[e];if(!m)return o;if(n?.colors&&a){const l=n?.colors.display,c=as(n?.colors.values);o[l]||(o[l]=ze(t.length,s)),o[l][d]=c}if(n?.sizes&&a){const l=n?.sizes.display,c=n?.sizes.values.map(p=>p.value).join(",");o[l]||(o[l]=ze(t.length,s)),o[l][d]=c}return m.forEach(l=>{const c=Jo(l,e,r);if(!c)return;o[c]||(o[c]=ze(t.length,s));const p=Ze(l.value,s);o[c][d]=p}),o},{}),Yo=(t,e="",r=!1)=>tt(t,ue.SPECIFICATIONS,ve.LABEL,e,r),Xo=(t,e="")=>tt(t,ue.SPECIFICATIONS,ve.CODE,e),Zo=(t,e="")=>tt(t,ue.TIRE_ROAD_RATINGS,os.RATING_ID,e),Ie=(t,e,r,s,a,o,n=!1)=>(r&&(t[r]||(t[r]=Array(e.length).fill({value:s,hasDifference:n})),t[r][a]={value:o,hasDifference:n}),t),er=(t,e="",r=!1)=>t.reduce((s,a,o)=>{if(a?.specifications&&a.specifications.forEach(n=>{if(Array.isArray(n)){const d=n?.at(0)?.label||n?.at(1)?.label,m=n.map(c=>Ze(c?.value,e)),l=n?.at(0)?.hasDifference||n?.at(1)?.hasDifference;s=Ie(s,t,d,e,o,m,l)}else{const d=n?.label,m=Ze(n?.value,e),l=n?.hasDifference;s=Ie(s,t,d,e,o,m,l)}}),r&&a?.colors){const n=a?.colors.display,d=a?.colors.values,m=Nt(d)?as(a?.colors.values):e;s=Ie(s,t,n,e,o,m,!1)}if(r&&a?.sizes){const n=a?.sizes.display,d=a?.sizes.values,m=Nt(d)?d.map(l=>l.value).join(","):e;s=Ie(s,t,n,e,o,m,!1)}return s},{}),tr=(t,e,r,s)=>{const a={},o={[Ke.position]:e,[Ke.usage]:r,[Ke.fitmentNotes]:s};return Object.keys(o).forEach(d=>{t.some(l=>{const c=l.skus?.[0]?.fitment?.[d];return Array.isArray(c)&&c.length>0})&&(a[d]={data:Array.from({length:t.length},()=>null),title:o[d]},t.forEach((l,c)=>{const p=l.skus[0]?.fitment?.[d];Array.isArray(p)&&p.length>0&&(a[d].data[c]=p.map(f=>"title"in f&&f.title?`${f.title}:${la} ${f.note}`:f.note))}))}),a},sr=(t,e,r)=>{const s=e.find(a=>a.code===t);return s&&s.skus.length===rs.TWO&&r?s:null},ar=(t,e)=>{const r=t.specifications.map(o=>o.label||""),s=e.specifications.map(o=>o.label||""),a=[...r,...s];
1return Array.from(new Set(a)).filter(Boolean).sort((o,n)=>o.localeCompare(n))},or=(t,e)=>(r,s)=>{const a=t.specifications.find(n=>n.label===s),o=e.specifications.find(n=>n.label===s);return!a&&!o?r:a?o?ua(a,o)?[...r,a]:[...r,[a,o]]:[...r,[a,{}]]:[...r,[{},o]]},rr=(t,e)=>{const[r,s]=t.skus,a=e.find(n=>n.code===r.code),o=e.find(n=>n.code===s.code);return ar(a,o).reduce(or(a,o),[])},ir=(t,e,r,s)=>{const a=sr(t,r,s);return a?rr(a,e):e.flatMap(o=>o.specifications)},nr=(t,e)=>{Array.isArray(e)&&e.at(0)?.label&&e.at(0)?.label===e.at(1)?.label&&t.add(e.at(0).label),!Array.isArray(e)&&"label"in e&&t.add(e.label)},ts=(t,e,r,s,a="",o=!1)=>{const n=new Set,d=[],m=[],l=e.map(c=>{o&&c?.colors?.display&&n.add(c.colors.display),c?.sizes?.display&&o&&n.add(c.sizes.display);const p=c.specifications||[],f=c.variantOptions?ir(c.code,c.variantOptions||[],r,s):[],C=[...p,...f];return d.push(...p),m.push(...f),{...c,specifications:C}});return d.forEach(c=>c?.label?n.add(c.label):null),m.forEach(c=>nr(n,c)),{SpecsOrder:Array.from(n),ToggleStatus:!t,SpecificationDataFilterationValue:er(l,a,o)}},Ee=(t,e)=>{const r=t.map(s=>typeof s=="string"||typeof s=="number"?String(s):"").filter(s=>s!==""&&s!==e);return r.some(s=>s!==r[0])},cr=({tireCustomerUseCategoryLabel:t,defaultValue:e})=>{const r=we(),{roadRating:s}=g(zo),{compareProductsSpecificationList:a}=g(et),{roadRatedLabel:o}=g(da),n=g(fa),d=`${T}-category-icon`,m=`${d}__label`,l=i.useMemo(()=>{const f=Zo(a,e);return ee(f)?f:null},[a,e]);i.useEffect(()=>{!s.tireRoadRatings?.length&&l&&r(pa())},[r,s,l]);const c=i.useCallback((f,C)=>L.jsxs("span",{className:ss(`${T}-sm-flex`,`${T}-sm-row`,`${T}-sm-align-items-center`,d),children:[L.jsx(Ko,{value:rs.HUNDRED,color:C}),L.jsx("span",{className:m,children:f})]}),[d,m]),p=i.useCallback((f,C)=>{const{specification:y,label:z,image:D}=C,b=l?.[y];b?.length&&(f[y]={values:b,label:L.jsxs("span",{className:d,children:[L.jsx(ga,{type:D,size:"sm"}),L.jsx("span",{className:m,children:z})]}),hasDifference:Ee(b,e)})},[l,d,m,e]);return i.useMemo(()=>{if(!s.tireRoadRatings?.length||!l)return null;const f={},C=Xo(a,e)[ma]??[];t&&C.length&&(f[t]={values:C,label:t,hasDifference:Ee(C,e)});const y=l[Vt.ROAD_RATED_AGGREGATE]??[];if(y.length){const b=es(Vt.ROAD_RATED_AGGREGATE);f[o]={values:y,label:c(o,b),hasDifference:Ee(y,e)}}s.tireRoadRatings.filter(b=>!Wt.includes(b.specification)).forEach(b=>{p(f,b)});const D=l[xt.ROAD_RATED_OFF_ROAD_AGGREGATE]??[];if(D.length){const b=es(xt.ROAD_RATED_OFF_ROAD_AGGREGATE);f[n]={values:D,label:c(n,b),hasDifference:Ee(D,e)},s.tireRoadRatings.filter(O=>Wt.includes(O.specification)).forEach(O=>{p(f,O)})}return f},[s.tireRoadRatings,l,a,e,t,o,c,p,n])},lr=(t,e)=>e?[]:(t.skus??[]).map(r=>r.code),ur=(t,e)=>t.map(r=>({code:r.code,skusCodes:lr(r,e)})),dr=(t,e=!1)=>({q:ur(t,e),compare:!0,extended:!0}),fr=({isWestBanner:t,passKey:e,setCompareBtnSpinner:r})=>{const s=we(),a=Qo(),o=i.useRef(!1),n=i.useCallback(()=>{if(o.current)return;const l=a?Ye.getItem($t):te.getItem(Fe),c=l?JSON.parse(l):[];o.current=!0,(a?c.length:c.length>=Gt)?(a&&(s(ha()),s(is(c))),s(ba(dr(c,t),r)),s(Sa(c,e))):a?r(!1):(te.setItem(jt,"true"),window.open(te.getItem(Ut)??"","_self"))},[s,a,t,e,r]),d=i.useCallback((l,c,p)=>{if(a)Ye.setItem($t,JSON.stringify(c.filter(f=>f.code!==l.code)));else{const C=Ca(l,p);La(!1,c,C,!0)}s(Pa(l)),s(ya(l.code)),!a&&c.length===Gt&&(te.setItem(jt,"true"),window.open(te.getItem(Ut)??"","_self"))},[s,a]),m=i.useCallback(()=>{a||Ta()},[a]);return{isRecommendationsSource:a,loadData:n,removeProduct:d,openProductPicker:m}},pr=(t,e,r,s)=>i.useMemo(()=>tr(t,e??"",r??"",s??""),[t,s,e,r]),us=t=>{const{showComponent:e,title:r,tireRecommendationsTitle:s,featuresLabel:a,notApplicableL:o,specificationsTableLabel:n,highlightDifferences:d,addItemstoCompareL:m,productTileImageSize:l,enableMiniPdpFlyoutSupport:c,isWestBanner:p,enableAddToCartOptions:f,showOptimizedAddOptionsBtn:C,outOfStock:y,inStockOnline:z,inStockAisle:D,fitMessageOnCard:b,partialFitMessageOnCard:K,tireCustomerUseCategoryLabel:O,roadRatedTableLabel:de,inStorePurchase:fe,checkOtherStores:pe,checkAvailability:ke,confirmFitMessageUniversalOnCard:Oe,fitMessageUniversalOnCard:Q,roadRatedLinkLabel:se,roadRatedDescription:st,roadRatedLink:Me,AISummaryHeading:I,AISummarySubHeading:ge,showLessLabel:_e,showMoreLabel:ae,passKey:M,fitmentDetailsTitle:oe,fitmentPositionLabel:me,fitmentUsageLabel:Ne,fitmentNotesLabel:Ve,rotatePhoneMsg:he}=t,[be,We]=i.useState(!0),[J,j]=i.useState([]),{compareProductsList:P,compareProductsSpecificationList:_=[],aiSummaryList:xe=[]}=g(et),$e=g(ns),{isFlyoutVisible:re,isFetchingData:ie,hasApiError:Se}=g(Aa),{addToCartErrorData:E,cartSummary:N}=g(Ra),F=g(Da),U=g(Ia),B=g(Ea),S=g(Fa),{wishlistRemoveSuccess:A}=g(va),Y=g(wa),Ce=g(ka),Le=g(Oa),Pe=g(Ma),ne=g(cs),{successErrorData:v}=g(h=>h.wishlist.status),V=Xe(),u=we(),Ge=g(_a),je=Xe()===Na.searchPage,ye=Va(Pe,Y),[at,ot]=i.useState(Yo(_,o,p)),[rt,it]=i.useState(!1),[w,ds]=i.useState(!1),[fs,nt]=i.useState(null),[Ue,ce]=i.useState(!1),[Be,ps]=i.useState(!1),{addProductItemToWishlist:gs,showWishlistBtnSpinner:ms,clickedWishlistIdx:hs,wishlistItemsSku:ct,productPrice:lt}=Uo({isWishlistClickedFromComparisonTool:!0}),ut=i.useRef(0),dt=ls.getLanguage(),{isAuthenticated:Te}=Wa(),ft=Ge?.getCartInfo,qe=xa(Ce),{product:bs={},badges:Ss={},featureFlag:Cs={},general:W={},globalLinks:x={},cart:pt={},wishlist:Ls={},automotive:Ps={},accessibility:ys={}}=$e,{a11yCloseIconLabel:Ts}=ys,{enableATCForSingleSkuMiniPdp:As,enableWishlistOnPlpsrp:gt,enableComparisonToolMobile:Rs}=Cs,{wishlistItemAddedMessage:mt,addToWishlistMessageGuest:ht,itemCannotBeAddedtoWishlistMsg:bt,itemRemovedFromWishlistMsg:St,closeLabel:q,viewWishlistLabel:X,maxLimitExceededWishlistMsg:Ct,a11yWishlistIcon:Ds}=Ls,{attributeFrontLabel:Lt,attributeRearLabel:Pt,roadRatedLabel:Is,partLabel:Es,productCardSpecifications:Fs,attributePositionLabel:vs,suggestedQuantityLabel:ws,attributeUsageLabel:ks}=Ps,{nowFromLabel:Os,saveFromLabel:Ms,wasFromLabel:_s,fromLabel:Ns,promotionalPriceLabel:Vs,unitPrice
1Label:Ws,clearancePriceLabel:xs,addToCartLabel:yt,quickLookLabel:Tt,inStockLabel:$s,remainingQtyLabel:Gs,setOf4Label:js,perTireLabel:Us,perWheelsLabel:Bs,eachLabel:qs}=bs,Hs=dt?.toUpperCase()===$a.frenchLangLabel?`${T}-product-card-large-height`:"",zs=p?"":`${T}-compare-fullpage__container`,H=`${T}-compare-fullpage`,Ks=Gs?.split("-")[0],He=!!Ga(P),{staggeredState:Qs,isTireProduct:Js}=ja(!!ye,P,Ua),At=He?`${H}__automotive-products`:"",Ys=Qs?`${H}__staggered`:"",Xs=Ba(He,Js)?`${At}__tires`:"",{isRecommendationsSource:Ae,loadData:Rt,removeProduct:Zs,openProductPicker:ea}=fr({isWestBanner:p,passKey:M,setCompareBtnSpinner:We});i.useEffect(()=>{Rt()},[Rt]),i.useEffect(()=>{ps(qe&&Bt(Le))},[Le,Be,qe]),i.useEffect(()=>{const{ToggleStatus:h,SpecificationDataFilterationValue:k,SpecsOrder:R}=ts(!0,_,P,ye,o,p);it(h),ot(k),j(R)},[P,_,o,p,ye]),i.useEffect(()=>{if(S.active&&ee(B)){const h=B?.products.map(R=>{const Re=ct?.find(ca=>ca.code===R.code);return Re?{...R,currentPrice:Re?.currentPrice}:null}).filter(R=>R!==null),k={...B,products:h};ee(h)&&qa(k,!!Te,lt,le.eventParameters.location.plpSrp,void 0,!0,{isFullPageComparisonTool:!0,isWestBanner:p})}},[S.active,Te,lt,B,ct,p]),i.useEffect(()=>{ce(!!(ie&&!re))},[re,ie,Se]),i.useEffect(()=>{if(Ae)return;const h=JSON.parse(te.getItem(Fe));Bt(h)&&h.length!==P?.length&&ut.current===0&&(u(is(h)),ut.current=1)},[P?.length,u,Ae]);const ta=()=>{const{ToggleStatus:h,SpecificationDataFilterationValue:k,SpecsOrder:R}=ts(rt,_,P,!1,o,p);it(h),ot(k),j(R)};i.useEffect(()=>{nt(null)},[E,F]);const Dt=i.useCallback(()=>ee(E)&&E.status!==Ha,[E]),sa=cr({tireCustomerUseCategoryLabel:O,defaultValue:o}),aa=pr(P,me,Ne,Ve);i.useEffect(()=>{ft===za.done&&ce(!1)},[ft]);const It=i.useMemo(()=>({options:{toastErrorMessage:U[Qa],toastCloseLabel:W?.closeLabel,toastErrorIcon:"ct-toast-error"},resetPageVariables(){u(Ka()),$(!1,{},qt.NONE,u)},success:!1,hideCTA:!1,failed:!0}),[u,U,W]),Et=i.useMemo(()=>({options:{toastSuccessMessage:Ya(N,U[Za],U[Xa]),toastSuccessIcon:"ct-notification-success-green",toastATCLabel:pt?.viewCartLabel,toastATCLabelUrl:x?.cartPageLink,toastUndoLabel:W?.closeLabel},resetPageVariables(){u(Ja()),$(!1,{},qt.NONE,u)},success:!0,hideCTA:!1}),[u,U,W,N,pt?.viewCartLabel,x?.cartPageLink]),Ft=i.useCallback(()=>{Dt()?$(!0,It,"",u):$(!0,Et,"",u)},[It,Et,u,Dt]);i.useEffect(()=>{(ee(F)||ee(E))&&!Ue&&Ft()},[E,Ue,F,Ft,N]);const vt=i.useCallback(()=>Te?mt:ht,[Te,mt,ht]),wt=i.useMemo(()=>({options:{toastSuccessMessage:vt(),toastSuccessIcon:De.successIcon,toastUndoLabel:q,toastWishListLabel:X,toastWishListLabelURL:x?.wishlistPageLink},resetPageVariables(){u(eo())},success:!0,hideCTA:!1}),[q,X,x?.wishlistPageLink,u,vt]),kt=i.useMemo(()=>({options:{toastErrorMessage:bt,toastWishListLabel:X,toastWishListLabelURL:x?.wishlistPageLink,toastErrorIcon:De.failureIcon},resetPageVariables(){u(Ht(zt))},success:!1,hideCTA:!1,failed:!0}),[X,x?.wishlistPageLink,bt,u]),Ot=i.useMemo(()=>({options:{toastSuccessMessage:St,toastUndoLabel:q,toastSuccessIcon:De.successIcon},resetPageVariables(){u(to())},success:!0}),[q,St,u]),Mt=i.useMemo(()=>({options:{toastErrorMessage:Ct,toastCloseLabel:q,toastWishListLabel:X,toastWishListLabelURL:x?.wishlistPageLink,toastErrorIcon:De.cautionIcon},resetPageVariables(){u(Ht(zt))},success:!1}),[q,X,x?.wishlistPageLink,Ct,u]),_t=i.useCallback(()=>{v.type===so.maxLimit?$(!0,Mt,V,u):A?$(!0,Ot,V,u):S.active?$(!0,wt,V,u):v.success||$(!0,kt,V,u)},[wt,kt,u,S.active,v.success,A,Ot,Mt,v.type,V]);i.useEffect(()=>{(S.active||!v.success||A)&&_t()},[S.active,v.success,A,_t]);const oa=i.useCallback(h=>ao(h.fitmentTypeCode),[]),{addToCartBtnHandler:ra}=oo({addProductToCartGuestArgs:ro,setShowAtcBtnSpinner:ce,setClickedATCCardIdx:nt,isWestBanner:p,shouldDisptachMiniPDPFlyout:c,shouldIncludeVehicleInfoForProduct:oa,isAtcStatusDispatchRequired:!0,componentSource:Fe,addToCardCallback(){},isComparisonPage:!0});io(Fe,P,le?.eventParameters?.location?.compareWindow,le.eventParameters?.labels?.compareAddToCart,!0);const ia=(h,k)=>{h.stopPropagation(),h.preventDefault();const R=k,{url:Re}=R;window.location.href=Re},na=(h,k)=>{h.preventDefault(),h.stopPropagation(),Zs(k,P,!!ne)};return no()&&!Rs?null:be?co():e&&_.length>0?L.jsxs("div",{className:ss(H,zs,Hs,Ys,At,Xs,{[`${H}--tire-recommendations`]:Ae}),children:[lo(w,H,Ae?s:r,P),at&&L.jsx("div",{className:`${H}__product-card-row ${T}-full-width-container`,children:L.jsx("div",{className:`${H}__product-card-row-data`,children:L.jsx(uo,{compareProductList:P,returnPolicy:go(l),removeCompareProductCard:na,productCardClick:ia,language:dt,badgePriority:Ss,emptyCardCl
1ick:ea,addToCartBtnClick:ra,compareProductsSpecificationList:at,showAtcBtnSpinner:Ue,clickedATCCardIdx:fs,showDifferencesData:ta,isShowDifferenceToggled:rt,addItemstoCompareL:m,showDiffL:d,specificationLabel:n,compareBtnSpinner:be,addToCartLabel:yt,quickLookLabel:Tt,notApplicableL:o,promotionalPriceLabel:Vs,isSticky:w,setIsSticky:ds,enableSaveStory:!w,nowFromLabel:Z(Os,w),saveFromLabel:Z(Ms,w),wasFromLabel:Z(_s,w),fromLabel:Z(Ns,w),clearancePriceLabel:Z(xs,w),unitPriceLabel:Z(Ws,w),comparisonInfo:_,isFullModalOpen:!0,isFullPageComparisonTool:!0,enableMiniPdpFlyoutSupport:c,enableATCForSingleSkuMiniPdp:As,specificationsOrder:J,featuresLabel:a,plusMinusSymbol:W.plusMinusSymbol,addButton:p?yt:W.addCTA,optionsButton:p?Tt:W.optionsCTA,isWestBanner:p,enableAddToCartOptions:f,enableWishlistOnPlpsrp:gt,addProductItemToWishlist:gs,clickedWishlistIdx:hs,showWishlistBtnSpinner:ms,wishlistItems:B,showOptimizedAddOptionsBtn:C,a11yWishlistIcon:Ds,closeLabel:q,compareFullPageLinkSection:le?.eventParameters?.location?.compareWindow,roadRatedLabel:Is,isSRPPage:je,vehicleInformationPresent:ye,outOfStockLabel:y,inStockLabel:$s,inStockOnlineLabel:z,inStockAisleLabel:D,isUrgentLowStockLabel:Ks,isTireDataExist:Be,fitMessageOnCard:b,partialFitMessageOnCard:K,attributeUsageLabel:ks,vehicleFrontLabel:Lt,vehicleRearLabel:Pt,partNumberLabel:Es,productCardSpecifications:Fs,attributePositionLabel:vs,suggestedQuantityLabel:ws,isWheelOrTirePDP:Kt(Ce),isWheelOrTireFunc:Kt,rebateIcon:"ct-offer",tireInformationPresent:Be,setOfFourLabel:js,perTireLabel:po(qe,Ce,Us,Bs),eachLabel:qs,roadRatingsData:sa,roadRatedTableLabel:de,inStorePurchaseLabel:fe,checkAvailabilityLabel:ke,checkOtherStoresLabel:pe,confirmFitMessageUniversalOnCard:Oe,fitMessageUniversalOnCard:Q,saleEndLabel:W?.endsMessage,isFitmentRequired:ne,roadRatedLinkLabel:se,roadRatedDescription:st,roadRatedLink:Me,isAutomotivePlp:!0,isAutoPartPlp:!0,isWishlistToShow:gt,aiSummaryList:xe,AISummaryHeading:I,AISummarySubHeading:ge,showLessLabel:_e,showMoreLabel:ae,closeIconLabel:Ts,rendersTooltipComp:fo,comparePage:le.eventParameters.location.comparePage,fitmentDetailsTitle:oe,fitmentDetailsData:aa,rotatePhoneMsg:he,attributeFrontLabel:Lt,attributeRearLabel:Pt,isAutomotiveProduct:He})})})]}):null};us.displayName="CompareProducts";const gr=({...t})=>{const{clearAllLabel:e,sortLabel:r,isSortedAlphabetically:s}=t,a=g(mo),o=ho(),n=g(et),d=o?bo:n.selectedFacetType,m=n.productCardLoading,{general:l={},accessibility:c={},featureFlag:p={}}=g(ns),f=So(l.enableRangeToggle),C=g(Co),y=g(cs),z=g(Lo),D=Po(n?.productDisplayCount,y),[b,K]=i.useState({}),[O,de]=i.useState(!1),[fe,pe]=i.useState(!1),[ke,Oe]=i.useState(""),[Q,se]=i.useState(!1),Me=g(yo).categoryLoading,I=we(),{facets:ge=[]}=f,_e=ls.getLanguage(),ae=document.querySelector(`button[${Qt}]`),M=To(Ao.tabletMaxWidth),oe=i.useRef(""),me=i.useRef(M),{searchInputPlaceholderText:Ne,noSearchResults:Ve,shopAllLabel:he}=l,{a11yCloseIconLabel:be="",a11ySuggestionResultAvailable:We=""}=c,{enableVerticalFilterToggle:J}=p,j=Eo(J,M);i.useEffect(()=>{ae&&(oe.current=ae.innerText)},[ae]),i.useEffect(()=>{O&&f.facets?(K({}),pe(!0)):f.facets&&K(f)},[f,O,I]),i.useEffect(()=>{fe&&(K(f),pe(!1))},[f,fe]),i.useEffect(()=>{d&&!j&&se(!0)},[j,d]);const P=()=>{if(oe.current){const S=Array.from(document.querySelectorAll("button")).filter(A=>A.textContent===oe.current)[0];S&&S.focus(),S&&S.removeAttribute(Qt)}},_=()=>{se(!1),I(Qe("")),P()};i.useEffect(()=>{Q&&!o?document.body.classList.add(Jt):document.body.classList.remove(Jt)},[Q,o]),i.useEffect(()=>{me.current!==M&&J&&(se(!1),I(Qe(""))),me.current=M},[I,J,M]);const xe=S=>{de(!0);const A=b.sortBy.find(Y=>Y.title===S.target.value);I(xo(A)),$o(r,S.target.value,Go),sessionStorage.setItem(Je,S.currentTarget.id)},$e=Ro(),re=(S,A,Y,Ce,Le,Pe,ne,v,V)=>{de(!0);let u=window.location.search;Le?(ne?u=Yt(u||v||"",G.priceUpperBound,G.divider,`${ne}`):u=Xt(u,G.priceUpperBound,G.divider),Pe?u=Yt(u||v||"",G.priceLowerBound,G.divider,`${Pe}`):u=Xt(u,G.priceLowerBound,G.divider)):u=S,Ye.setItem(Oo,window.location.href),Mo(u);const Ge=ge?.find(je=>je.id===_o.CATEGORY_ID);
1I(No(Y===Ge?.label)),Zt.completeSearchEventGA.set({userInput:null,redirect:"false",searchType:null,suggestionType:null,suggestionValue:null,numberSearchResults:null,isTypeaheadUsed:null,pathwaysWidgetId:null,searchLocation:null,isFiltersChanged:!0}),$e(u,C,y,D,void 0,a?.searchPathwayId,z,void 0,void 0,a?.searchSuppressFacets,a?.searchWidgetType,a?.searchCategoryLevel,a?.searchCategoryId,a?.searchPassQParameter,a?.searchQParameter,a?.searchExperience),A===e&&Vo(),V&&sessionStorage.setItem(Je,V),I(Qe(Y)),Zt.filterSource.set(Wo.flyoutFilter)};i.useEffect(()=>()=>{sessionStorage.removeItem(Je)},[]);const ie=Xe(),Se=jo.categoryPages.includes(ie),E=Bo(s,ge,he),N=document.getElementById("product-listing-panel"),F=N&&Do(N)[0];i.useEffect(()=>{N&&F&&(F.id||F?.setAttribute("id",Io),Oe(F.id))},[N,F]);const U=()=>!M&&J?null:B(),B=()=>Q||j?Fo(Me,m)&&j?L.jsx(vo,{skeletonClass:`${T}-flyout-modal-component__skeleton`,dataTestId:"flyoutModalSkeleton"}):L.jsxs(L.Fragment,{children:[L.jsx(wo,{label:t.skipFilterListLabel,skipTo:ke,customClass:`${T}-button ${T}-button--tertiary`}),L.jsx(ko,{isOpen:Q,isPrerender:o,closeFlyout:_,closeBtnLabel:be,resultCount:b.resultCount,sortings:b.sortBy,facets:b.facets,categoryData:E.categoryData,showCategoryDropdown:E.shouldShowCategoryDropdown,isCategoryPage:Se,onSortChange:xe,selectedFacetType:d,onFilterChange:re,clearAllLink:b.clearUrl,currentLocale:_e,isClientSideFilter:!1,enableFilterFacetsEnhancement:p?.enableFilterFacetsEnhancement,searchInputPlaceholderText:Ne,noSearchResults:Ve,resultAvailable:We,shopAllLabel:he,...t})]}):null;return U()},Nr={FacetPanel:gr,ProductListPanel:Ho,SearchTitle:qo,ComparedProductsList:us};export{Nr as default};
2//# sourceMappingURL=productListingPanel.vUqq2WN8.chunk.js.map

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.