"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[58800],{13932:(e,t,a)=>{a.d(t,{Gs:()=>S,p0:()=>I});var l=a(29747),r=a(14e3),n=a(14232),i=a(87115),o=a(26779),c=a(79478),s=a(82562),u=a(36307),E=a(91066);let d=(0,u.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,E.f5)(t)),[c,u]=(0,n.useState)(!1),[d,S]=(0,n.useState)(""),[I,T]=(0,n.useState)(""),[h,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 T(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&&T("Brand"),u(!0),S(e.target)}:void 0,[]),O=(0,n.useCallback)(()=>{T(e=>""!==e?"":e),S(e=>""!==e?"":e)},[]),b=(0,n.useCallback)(()=>{S(e=>""!==e?"":e)},[]),m=(0,n.useCallback)(()=>{u(!1)},[]);return{activeCategory:I,activeLink:d,createSelectCategoryHandler:_,createSelectLinkHandler:y,handleClearCategory:O,handleClearLink:b,handleCloseSubNav:m,isSubNavOpen:c,isVisible:a,navigateToStep:N,setActiveLink:S,setIsVisible:l,setNavTheme:(0,n.useCallback)(e=>{C(t=>t!==e?e:t)},[]),theme:h,toggleSubNav:(0,n.useCallback)(()=>{u(e=>!e)},[])}}();return(0,l.Y)(d.Provider,{value:a,"data-element":"unknown","data-component":"NavContextProvider",children:t})}let I=(e,t)=>(0,u.i7)(d,e,t)},15616:(e,t,a)=>{a.d(t,{c:()=>o,f:()=>c});var l=a(29747),r=a(14232),n=a(36307);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)},58800:(e,t,a)=>{a.d(t,{A:()=>v});var l=a(29747),r=a(735),n=a.n(r),i=a(14232),o=a(44032),c=a(14579),s=a(51263),u=a(2236),E=a(10983),d=a(20735),p=a(87115),S=a(72219),I=a(8441),T=a(23204),h=a(15616),C=a(13932),N=a(88772),_=a(25838),y=a(79478),O=a(70266),b=a(63748),m=a(57532),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(63276),f=a(44364),B=a(63381),R=a(36384);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,i.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}),o=(0,i.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:o,role:"button",tabIndex:0,"aria-label":(0,m.ui)("links.location"),children:[(0,l.Y)(E.default,{css:g.locationIcon,name:d.Ze.LOCATION}),n&&(0,l.FD)("p",{children:[(0,l.FD)("span",{children:[(0,m.ui)("searchByBoard.zipSectionLabel")," "]}),(0,l.FD)("span",{css:g.zipLabel,children:[" ",n]})]})]})]})}),k=(0,i.memo)(e=>{let{brandName:t,ctaList:a,searchParams:r,filterPills:n,promotionId:c,vehicleName:s}=e,{lockSearchStateToBrand:d,lockSearchStateToTireSize:p,lockSearchStateToVehicle:C,lockSearchStateToTireType:N,setFilterPills:m,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,T.Z)(e=>({setIsSearchOpen:e.setIsSearchOpen,setCurrentInputQuery:e.setCurrentInputQuery})),R=(0,h.f)(e=>e.setIsTireSnapOpen),P=(0,i.useMemo)(()=>({[A.SIMPLE_SNAP]:(0,l.Y)(E.default,{name:L.ICON_SIMPLE_SNAP}),[A.BRAND]:(0,l.Y)(E.default,{name:L.ICON_BRANDS_CIRCULAR}),[A.TIRE_SIZE]:(0,l.Y)(E.default,{name:L.ICON_TIRE_SIZE}),[A.VEHICLE]:(0,l.Y)(o.A,{carId:L.ICON_VEHICLE}),[A.TYPE]:(0,l.Y)(E.default,{name:L.ICON_TYPE})}),[]),k=(0,i.useCallback)(e=>{(0,O.X)(_.g.SEARCH_BY_BOARD,{searchItem:e}),e===A.SIMPLE_SNAP&&(0,O.X)(_.g.SIMPLESNAP,{searchByBoardClick:!0})},[]),v=(0,i.useCallback)(e=>{e===A.BRAND?d():e===A.TIRE_SIZE?p():e===A.VEHICLE?C(s):e===A.TYPE&&N()},[d,p,C,N,s]),w=(0,i.useCallback)((e,t)=>{B({queryText:e===A.VEHICLE&&s||t.queryText,queryType:t.queryType})},[B,s]),H=(0,i.useCallback)(()=>{if(!(0,b.Bd)()||!c)return;let e=null!=r?r:{promotion:c};M({routes:[y.ph[y.bw.VEHICLE_CATALOG],y.ph[y.bw.TIRE_SIZE_CATALOG_OR_CATEGORY]],params:e}),n&&m(n)},[n,c,r,m,M]),Y=(0,i.useCallback)(()=>{if(!(0,b.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}),m([{type:I.BH.BRAND,label:"".concat(t," deals")}]),n&&m(n)},[n,t,r,m,M]),Z=(0,i.useCallback)(e=>{e===A.SIMPLE_SNAP?R(!0):f(!0)},[R,f]),D=(0,i.useCallback)((e,t)=>()=>{e!==A.SIMPLE_SNAP&&(w(e,t),v(e),H(),Y()),Z(e),k(e)},[Z,k,w,v,H,Y]);return(0,l.Y)(u.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)=>n()(e,t)),v=function(e){let{hasBrand:t=!0,hasTireSize:a=!0,hasVehicle:r=!0,hasTireType:n=!0,isHomepage:o,params:u,filterPills:E,promotionId:d,brandName:p,title:S=(0,m.ui)("searchByBoard.title"),vehicleName:I}=e,T=(0,i.useMemo)(()=>[{action:{queryText:"",queryType:"vehicle",type:"SiteSearchResultActionQuery"},isShow:r,label:(0,m.ui)("searchByBoard.vehicle"),type:A.VEHICLE},{action:{queryText:"",queryType:"tireSize",type:"SiteSearchResultActionQuery"},isShow:a,label:(0,m.ui)("searchByBoard.tireSize"),type:A.TIRE_SIZE},{action:{queryText:"",queryType:"brand",type:"SiteSearchResultActionQuery"},isShow:t,label:(0,m.ui)("searchByBoard.brand"),type:A.BRAND},{action:{queryText:"",queryType:"tireType",type:"SiteSearchResultActionQuery"},isShow:n,label:(0,m.ui)("searchByBoard.tireType"),type:A.TYPE}],[t,a,n,r]);return(0,l.Y)("div",{css:[g.container,o&&g.homepageContainer],"data-component":x.COMPONENT_NAME,children:o?(0,l.FD)("div",{children:[(0,l.Y)(P,{title:S}),(0,l.Y)(k,{ctaList:T,searchParams:u,filterPills:E,promotionId:d,vehicleName:I})]}):(0,l.Y)(c.default,{children:(0,l.FD)(s.default,{gridColumn:"2/6",gridColumnM:"2/8",gridColumnL:"3/13",gridColumnXL:"5/11",children:[(0,l.Y)(P,{title:S}),(0,l.Y)(k,{ctaList:T,searchParams:u,filterPills:E,promotionId:d,brandName:p,vehicleName:I})]})})})}},87115:(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}({})}}]);