"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[79432],{55571:(e,t,a)=>{a.d(t,{c:()=>o,f:()=>c});var l=a(41364),r=a(12115),n=a(54880);let i=(0,n.q6)();function o(e){let{children:t}=e,a=function(){let[e,t]=(0,r.useState)(!1);(0,r.useEffect)(()=>(window.onpopstate=()=>{t(!1)},()=>{window.onpopstate=null}),[t]);let a=(0,r.useCallback)(a=>{e||history.pushState(null,"",""),t(!e),a&&"function"==typeof a&&a()},[e]);return{isTireSnapOpen:e,setIsTireSnapOpen:t,toggleIsTireSnapOpen:a}}();return(0,l.Y)(i.Provider,{value:a,"data-element":"unknown","data-component":"TireSnapModalContextProvider",children:t})}let c=(e,t)=>(0,n.i7)(i,e,t)},73512:(e,t,a)=>{a.d(t,{T:()=>r,o:()=>l});var l=function(e){return e.ALTERNATE="alternate",e.DEFAULT="default",e}({}),r=function(e){return e.ACCOUNT="ACCOUNT",e.BROWSE_TIRES="BROWSE TIRES",e.LEARN="LEARN",e.LOCATION="LOCATION",e}({})},79432:(e,t,a)=>{a.r(t),a.d(t,{default:()=>Y});var l=a(41364),r=a(20903),n=a(50965),i=a(51616),o=a.n(i),c=a(12115),s=a(60275),d=a(52836),u=a(33400),E=a(82462),p=a(73512),S=a(85090),I=a(77446),h=a(89503),T=a(55571),C=a(85623),N=a(73423),_=a(93411),y=a(69513),O=a(38107),m=a(71157),b=a(68852),A=function(e){return e.BRAND="brand",e.SIMPLE_SNAP="simpleSnap",e.TIRE_SIZE="tireSize",e.TYPE="type",e.VEHICLE="vehicle",e}({}),L=function(e){return e.ICON_BRANDS_CIRCULAR="brands-circular",e.ICON_SIMPLE_SNAP="camera",e.ICON_TIRE_SIZE="wheel",e.ICON_TYPE="tire-types-search",e.ICON_VEHICLE="car--chrysler-300",e}({}),M=a(25289),f=a(40539),B=a(68536),R=a(44787);let g={container:{backgroundColor:f.l.GLOBAL.ORANGE,padding:"".concat(B.E.SIZE_20,"px 0px"),[M.MQ.M]:{display:"flex",flexFlow:"column",padding:"".concat(B.E.SIZE_20,"px ").concat(B.E.SIZE_40,"px")},[M.MQ.L]:{padding:"".concat(B.E.SIZE_20,"px 0px")}},ctaMenu:{"> li":{":first-of-type":{marginLeft:B.E.SIZE_15},marginRight:B.E.SIZE_10,width:"auto",[M.MQ.M]:{marginRight:B.E.SIZE_30}},display:"flex",[M.MQ.M]:{flex:1}},ctaMenuIcon:{"&:hover":{backgroundColor:f.l.ORANGE.SHADE_30},'&[data-icon-type="brand"]':{svg:{width:"120px",[M.MQ.M]:{width:"160px"}}},'&[data-icon-type="simpleSnap"]':{path:{fill:f.l.GLOBAL.WHITE}},".SVGInline-svg":{[M.MQ.M]:{left:"-66px",position:"absolute",top:"32px",width:"160px"},width:"70px","[class$=body-car]":{path:{stroke:f.l.LIGHT.OFF_WHITE_40}},"[class$=front-wheel], [class$=back-wheel]":{path:{stroke:f.l.GLOBAL.WHITE,fill:f.l.GLOBAL.WHITE}}},alignItems:"center",backgroundColor:f.l.LIGHT.GRAY_20,borderRadius:"100%",boxSizing:"border-box",color:f.l.GLOBAL.WHITE,display:"flex",height:"90px",justifyContent:"center",marginBottom:B.E.SIZE_20,overflow:"hidden",position:"relative",svg:{path:{fillOpacity:1}},width:"90px",[M.MQ.M]:{height:"120px",width:"120px"}},ctaMenuItem:{alignItems:"center",cursor:"pointer",display:"flex",flexFlow:"column",whiteSpace:"nowrap"},ctaMenuLabel:[R.Il.eyebrow,{color:f.l.GLOBAL.WHITE,textTransform:"uppercase"}],headerSection:{display:"flex",marginBottom:B.E.SIZE_10,padding:"0 ".concat(B.E.SIZE_20,"px"),[M.MQ.M]:{marginBottom:0,padding:0}},homepageContainer:{padding:"".concat(B.E.SIZE_20,"px 0"),[M.MQ.M]:{display:"flex",padding:"".concat(B.E.SIZE_20,"px ").concat(B.E.SIZE_40,"px")},[M.MQ.L]:{padding:"".concat(B.E.SIZE_20,"px ").concat(B.E.SIZE_60,"px")}},locationIcon:{height:"16px",marginRight:"10px",width:"12px"},title:[R.Il.eyebrow,{flex:1,marginBottom:B.E.SIZE_20,textTransform:"uppercase",[M.MQ.M]:[R.Il.primarySubhead,{padding:"0 ".concat(B.E.SIZE_60,"px"),[M.MQ.M]:{padding:0}}],[M.MQ.L]:[R.gI.tertiaryHeadline]}],zipLabel:{borderBottom:"2px dotted"},zipSection:[R.Il.labelCopyTight,{color:f.l.ORANGE.SHADE_85,cursor:"pointer",display:"flex"}]},x={COMPONENT_HEADER_SECTION:"searchByBoard-header-section",COMPONENT_ICON_SECTION:"searchByBoard-icon-section",COMPONENT_MENU:"searchByBoard-menu",COMPONENT_MENU_ITEM:"searchByBoard-menu-item",COMPONENT_NAME:"searchByBoard",COMPONENT_TITLE:"searchByBoard-title"},P=(0,c.memo)(e=>{let{title:t}=e,{createSelectLinkHandler:a,toggleSubNav:r}=(0,C.p0)(e=>({createSelectLinkHandler:e.createSelectLinkHandler,toggleSubNav:e.toggleSubNav})),n=(0,N.J)(e=>{var t,a;return null===(a=e.userPersonalizationData)||void 0===a?void 0:null===(t=a.userLocation)||void 0===t?void 0:t.zip}),i=(0,c.useCallback)(()=>{let e=a({target:p.T.LOCATION});e&&(e(),r())},[a,r]);return(0,l.FD)("div",{css:g.headerSection,"data-component-class":x.COMPONENT_HEADER_SECTION,children:[t&&(0,l.Y)("p",{css:g.title,"data-component-class":x.COMPONENT_TITLE,children:t}),(0,l.FD)("div",{css:g.zipSection,onClick:i,role:"button",tabIndex:0,"aria-label":(0,b.ui)("links.location"),children:[(0,l.Y)(u.default,{css:g.locationIcon,name:E.Ze.LOCATION}),n&&(0,l.FD)("p",{children:[(0,l.FD)("span",{children:[(0,b.ui)("searchByBoard.zipSectionLabel")," "]}),(0,l.FD)("span",{css:g.zipLabel,children:[" ",n]})]})]})]})}),k=(0,c.memo)(e=>{let{brandName:t,ctaList:a,searchParams:r,filterPills:n,promotionId:i,vehicleName:o}=e,{lockSearchStateToBrand:E,lockSearchStateToTireSize:p,lockSearchStateToVehicle:C,lockSearchStateToTireType:N,setFilterPills:b,setRouteQueryParamOptions:M}=(0,S.a)(e=>({lockSearchStateToBrand:e.lockSearchStateToBrand,lockSearchStateToTireSize:e.lockSearchStateToTireSize,lockSearchStateToTireType:e.lockSearchStateToTireType,lockSearchStateToVehicle:e.lockSearchStateToVehicle,setFilterPills:e.setFilterPills,setRouteQueryParamOptions:e.setRouteQueryParamOptions})),{setIsSearchOpen:f,setCurrentInputQuery:B}=(0,h.Z)(e=>({setIsSearchOpen:e.setIsSearchOpen,setCurrentInputQuery:e.setCurrentInputQuery})),R=(0,T.f)(e=>e.setIsTireSnapOpen),P=(0,c.useMemo)(()=>({[A.SIMPLE_SNAP]:(0,l.Y)(u.default,{name:L.ICON_SIMPLE_SNAP}),[A.BRAND]:(0,l.Y)(u.default,{name:L.ICON_BRANDS_CIRCULAR}),[A.TIRE_SIZE]:(0,l.Y)(u.default,{name:L.ICON_TIRE_SIZE}),[A.VEHICLE]:(0,l.Y)(s.A,{carId:L.ICON_VEHICLE}),[A.TYPE]:(0,l.Y)(u.default,{name:L.ICON_TYPE})}),[]),k=(0,c.useCallback)(e=>{(0,O.X)(_.g.SEARCH_BY_BOARD,{searchItem:e}),e===A.SIMPLE_SNAP&&(0,O.X)(_.g.SIMPLESNAP,{searchByBoardClick:!0})},[]),v=(0,c.useCallback)(e=>{e===A.BRAND?E():e===A.TIRE_SIZE?p():e===A.VEHICLE?C(o):e===A.TYPE&&N()},[E,p,C,N,o]),w=(0,c.useCallback)((e,t)=>{B({queryText:e===A.VEHICLE&&o||t.queryText,queryType:t.queryType})},[B,o]),Y=(0,c.useCallback)(()=>{if(!(0,m.Bd)()||!i)return;let e=null!=r?r:{promotion:i};M({routes:[y.ph[y.bw.VEHICLE_CATALOG],y.ph[y.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:e}),n&&b(n)},[n,i,r,b,M]),H=(0,c.useCallback)(()=>{if(!(0,m.Bd)()||!t)return;let e=null!=r?r:{brandName:t};M({routes:[y.ph[y.bw.VEHICLE_CATALOG],y.ph[y.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:e}),b([{type:I.BH.BRAND,label:"".concat(t," deals")}]),n&&b(n)},[n,t,r,b,M]),Z=(0,c.useCallback)(e=>{e===A.SIMPLE_SNAP?R(!0):f(!0)},[R,f]),D=(0,c.useCallback)((e,t)=>()=>{e!==A.SIMPLE_SNAP&&(w(e,t),v(e),Y(),H()),Z(e),k(e)},[Z,k,w,v,Y,H]);return(0,l.Y)(d.A,{customContainerStyles:g.ctaMenu,as:"ul","data-component-class":x.COMPONENT_MENU,children:a.filter(e=>e.isShow).map(e=>(0,l.Y)("li",{children:(0,l.FD)("div",{css:g.ctaMenuItem,"data-component-class":x.COMPONENT_MENU_ITEM,children:[(0,l.Y)("div",{css:g.ctaMenuIcon,"data-icon-type":e.type,"data-component-class":x.COMPONENT_ICON_SECTION,onClick:D(e.type,e.action),role:"button","aria-label":e.label,tabIndex:0,children:P[e.type]}),(0,l.Y)("p",{css:g.ctaMenuLabel,children:e.label})]})},e.type))})},(e,t)=>o()(e,t)),v=function(e){let{hasBrand:t=!0,hasTireSize:a=!0,hasVehicle:i=!0,hasTireType:o=!0,isHomepage:s,params:d,filterPills:u,promotionId:E,brandName:p,title:S=(0,b.ui)("searchByBoard.title"),vehicleName:I}=e,h=(0,c.useMemo)(()=>[{action:{queryText:"",queryType:"vehicle",type:"SiteSearchResultActionQuery"},isShow:i,label:(0,b.ui)("searchByBoard.vehicle"),type:A.VEHICLE},{action:{queryText:"",queryType:"tireSize",type:"SiteSearchResultActionQuery"},isShow:a,label:(0,b.ui)("searchByBoard.tireSize"),type:A.TIRE_SIZE},{action:{queryText:"",queryType:"brand",type:"SiteSearchResultActionQuery"},isShow:t,label:(0,b.ui)("searchByBoard.brand"),type:A.BRAND},{action:{queryText:"",queryType:"tireType",type:"SiteSearchResultActionQuery"},isShow:o,label:(0,b.ui)("searchByBoard.tireType"),type:A.TYPE}],[t,a,o,i]);return(0,l.Y)("div",{css:[g.container,s&&g.homepageContainer],"data-component":x.COMPONENT_NAME,children:s?(0,l.FD)("div",{children:[(0,l.Y)(P,{title:S}),(0,l.Y)(k,{ctaList:h,searchParams:d,filterPills:u,promotionId:E,vehicleName:I})]}):(0,l.Y)(r.A,{children:(0,l.FD)(n.A,{gridColumn:"2/6",gridColumnM:"2/8",gridColumnL:"3/13",gridColumnXL:"5/11",children:[(0,l.Y)(P,{title:S}),(0,l.Y)(k,{ctaList:h,searchParams:d,filterPills:u,promotionId:E,brandName:p,vehicleName:I})]})})})};var w=a(50299);let Y=function(e){let{...t}=e;return(0,l.Y)("div",{"data-component":"module-searchbyboard",children:(0,l.Y)(r.A,{css:w.R.spacingTopS60XL80,"data-element":"Grid",children:(0,l.Y)(n.A,{fullbleed:!0,"data-element":"GridItem",children:(0,l.Y)(v,{...t,"data-element":"SearchByBoard"})})})})}},85623:(e,t,a)=>{a.d(t,{Gs:()=>S,p0:()=>I});var l=a(41364),r=a(35695),n=a(12115),i=a(73512),o=a(44450),c=a(69513),s=a(67914),d=a(54880),u=a(80005);let E=(0,d.q6)(),p=[c.ph[c.bw.CHECKOUT_SHIPPING],c.ph[c.bw.CHECKOUT_SERVICES],c.ph[c.bw.CHECKOUT_PAYMENT]];function S(e){let{children:t}=e,a=function(){let e=(0,o.A)(),t=(0,r.usePathname)(),[a,l]=(0,n.useState)(!(0,u.f5)(t)),[c,d]=(0,n.useState)(!1),[E,S]=(0,n.useState)(""),[I,h]=(0,n.useState)(""),[T,C]=(0,n.useState)(i.o.DEFAULT);(0,n.useEffect)(()=>{let e=e=>{let{isVisible:t}=e;(0,n.startTransition)(()=>{l(t)})};return s.o.setNavVisibility.on(e),()=>{s.o.setNavVisibility.off(e)}},[]);let N=(0,n.useCallback)(a=>{t!==p[a]&&e.push(p[a])},[e,t]),_=(0,n.useCallback)(e=>()=>{S(t=>{let a=t;t||(a=i.T.BROWSE_TIRES);let l=t===i.T.LEARN;return h(l?i.T.LEARN:e),l&&(a=i.T.LEARN),a})},[]),y=(0,n.useCallback)(e=>"target"in e?()=>{e&&(null==e?void 0:e.target)===i.T.BROWSE_TIRES&&h("Brand"),d(!0),S(e.target)}:void 0,[]),O=(0,n.useCallback)(()=>{h(e=>""!==e?"":e),S(e=>""!==e?"":e)},[]),m=(0,n.useCallback)(()=>{S(e=>""!==e?"":e)},[]),b=(0,n.useCallback)(()=>{d(!1)},[]);return{activeCategory:I,activeLink:E,createSelectCategoryHandler:_,createSelectLinkHandler:y,handleClearCategory:O,handleClearLink:m,handleCloseSubNav:b,isSubNavOpen:c,isVisible:a,navigateToStep:N,setActiveLink:S,setIsVisible:l,setNavTheme:(0,n.useCallback)(e=>{C(t=>t!==e?e:t)},[]),theme:T,toggleSubNav:(0,n.useCallback)(()=>{d(e=>!e)},[])}}();return(0,l.Y)(E.Provider,{value:a,"data-element":"unknown","data-component":"NavContextProvider",children:t})}let I=(e,t)=>(0,d.i7)(E,e,t)}}]);