(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8735],{71570:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rebates",function(){return l(49711)}])},49711:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSG:function(){return P},default:function(){return Z}});var a=l(85893),n=l(67294),r=l(45697),i=l.n(r),s=l(1822),o=l.n(s),d=l(41664),u=l.n(d),p=l(29323),c=l(11163),m=l(94382),x={backgroundWrapper:"background-wrapper absolute top-105px lg:top-95 w-full",backArrowIcon:"arrowIcon rewardsListingHeader relative md:absolute block flex items-center top-10 md:top-17 lg:top-30 left-5 md:left-10 w-20 lg:left-10 lg:right-0 lg:px-20",content:{wrapper:"container mx-auto md:px-20 relative bg -bgcolor",pageTitle:"page-title relative text-center text-white pb-13 pt-18 lg:pt-30 lg:pb-20 xl:min-h-104 lg:leading-headerline font-montserratSemiBold font-semibold text-30 lg:text-50 leading-wider ",bannerSection:"banner-section container bg-rewardsBg md:px-40 lg:px-20 mx-auto relative top-0 pb-35 md:pb-40 xl:pb-60",mainBannerSection:"banner-section w-full mx-auto relative container top-0 md:rounded-rewards flex flex-wrap md:px-20 pt-27",textDescription:"font-montserratlight textDescription break-words font-light text-center w-11/12 xl:w-9/12 xxl:w-8/12 mx-auto px-02 md:px-0 pt-20 md:pt-20 xl:pt-30 text-16 xl:text-18 leading-lightmedium xl:leading-widest",anchorText:"font-montserratSemiBold font-semibold underline block md:inline"},rebates:{title:"w-full text-center pb-05 px-10 font-montserratSemiBold font-semibold text-14 leading-lightmedium",iFramewrapper:"relative w-full flex flex-wrap justify-center md:justify-start xl:w-10/12 pl-20 pr-20 mx-auto pb-20",iFrameMainWrapper:"absolute h-full flex items-center justify-center inset-x-0",noRebateswrapper:"relative w-full xl:w-10/12 pt-35 pb-45 md:py-85 xl:py-75 mx-auto pb-20 bg-white flex flex-wrap justify-center",selectWrapper:"w-full md:w-6/12 xl:w-5/12 xxl:w-4/12 mx-auto px-20 mb-17 md:mb-25"},rebatesModal:{wrapper:"wrapperdefault rewardsModalIE top-0 fixed flex flex-wrap pt-05 pr-14 md:pt-15 bg-hambergerbg items-center justify-center md:inset-0 xl:pb-197 xl:pt-205 xl:itemscenter lg:itemscenter h-full md:overflow-y-auto w-full z-20",modalWrapper:" font-montserratlight font-light fixed rewardsModalWrapper pt-60 xl:pt-93 w-10/12 h-427 md:hauto md:w-394 xl:w-660 px-10 pb-50 xl:pb-160 mx-auto mb-3 bg-white shadow-cardshadow text-center mx-auto lg:h-455 ",cancel:"flex justify-end pt-20 pr-23 focus:outline-none",modalText:"redeem-success pb-20 w-11/12 md:w-10/12 xl:w-7/12 xl:px-10 mx-auto font-montserratlight font-light lg:text-18 leading-lightmedium lg:leading-widest",modalSignUpBtn:""},noRebates:{textWrapper:"noRebates-Header w-11/12 md:w-9/12 xl:w-8/12 px-25 md:px-10 font-montserratlight font-light xl:text-18 leading-lightmedium xl:leading-widest pb-18 xl:pb-30 text-center mx-auto"},rewardsEarnCards:{rewardTileWrapper:"startearningTileWrapper relative shadow-none mb-17px mx-10px md:shadow-articalmd bg-white md:w-280 lg:w-260 block xl:w-283 xxl:w-330"}},g=l(63404),b=l(89459),f=l(45029),h=l(33555),w=l(71191),v=l(35941),j=l(565);let y=new String(".noRebates-Header h2{font-weight:600;line-height:42px;font-size:1.875rem;padding-bottom:10px}.textDescription p{padding-bottom:5px}.textDescription p span{font-size:14px;padding-top:10px;display:block}.textDescription h2{font-size:1.5rem;line-height:29px;padding-bottom:20px;font-weight:600}@media screen and (max-width:600px){.rebatesHeight{min-height:4500px}}@media screen and (max-width:1023px){.noRebates-Header h2{font-weight:600;line-height:29px;font-size:1.5rem;padding-bottom:15px}.rebatesHeight{min-height:2750px}}@media screen and (min-width:1024px){.textDescription h2{font-size:32px;line-height:42px;width:91%;margin:0 auto}}");y.__hash="19ec23c21de53842";var k=l(36232),N=l(50298),S=l.n(N),R=l(3868),T=l(25411),_=l(86661),L=l(8848),C=(0,c.withRouter)((0,p.Pi)(e=>{let{selectedContent:t,rebatesLoggedOutContentCollection:l,contextualLoginText:r}=e,i=(0,n.useRef)(null),s=(0,n.useRef)(null),[o,d]=(0,n.useState)(!1);(0,n.useEffect)(()=>{var e,t;m.default.rewardStatus?null==i||null===(e=i.current)||void 0===e||e.setAttribute("style","display:none"):null==i||null===(t=i.current)||void 0===t||t.setAttribute("style","display:flex")},[m.default.rewardStatus]);let u=t?null==t?void 0:t.rebatesUrl:null==t?void 0:t.rebatesUrlNonProd;return(0,a.jsxs)(a.Fragment,{children:[o&&!m.default.userLoggedIn&&(0,a.jsx)("div",{className:x.rebatesModal.wrapper,children:(0,a.jsx)("div",{className:x.rebatesModal.modalWrapper,children:l&&l.items&&l.items.map(e=>{switch(e.__typename){case"ContentTypeRichText":return(0,a.jsx)("div",{className:x.rebatesModal.modalText,children:(0,n.createElement)(h.Z,{...e,key:e&&e.sys&&e.sys.id})});case"LinkButton":return(0,a.jsx)("div",{className:"pb-20 pt-05",children:(0,a.jsx)(w.Z,{...e,pageSource:g.rebates,className:x.rebatesModal.modalSignUpBtn,link:"SIGN UP"===e.linkText?null:e.link,handler:()=>{let t=S().rebates;if("LOG IN"===e.linkText){var l,a;d(!1),m.default.context=r,(0,R.gu)(T.oktaLogin,null===(a=window)||void 0===a?void 0:null===(l=a.location)||void 0===l?void 0:l.href),m.default.redirectionUrlAfterSimplifiedSignup=t}else"SIGN UP"===e.linkText&&(m.default.simplifiedSignupFlow=!0,localStorage.setItem("redirectionUrlAfterSimplifiedSignup",t),(0,R.Ki)())}})})}return null})})}),(0,a.jsx)("button",{onClick:()=>{o||d(!0)},"aria-label":"rebate form",ref:i,disabled:m.default.userLoggedIn,"aria-disabled":m.default.userLoggedIn,className:x.rebates.iFrameMainWrapper,tabIndex:m.default.userLoggedIn?-1:0,type:"button"}),(0,a.jsx)("iframe",{ref:s,src:u,title:"rebates",width:"100%",className:"rebatesHeight",tabIndex:-1,"aria-hidden":"true",height:t&&t.rebatesHeight||3900,onLoad:()=>{(0,_.BB)(L.dOk),window.scrollTo({top:0}),m.default.rewardStatus?i.current.setAttribute("style","display:none"):i.current.setAttribute("style","display:flex")},onError:()=>{(0,_.BB)(L.mz0,u)}},t?null==t?void 0:t.rebatesUrl:null==t?void 0:t.rebatesUrlNonProd)]})})),O=l(85218),I=l(13633),E=l(19567);let B=e=>{var t,l,r;let{pageTitle:i,pageBackground:s,description:d,router:p,allRebatesCollection:c,rebatesTileCollection:N,didYouKnowCallout:S,noRebatesAvailableContentCollection:R,rebatesLoggedOutContentCollection:T,contextualLoginText:_}=e,L=(0,n.useRef)(null),B=c&&c.items&&c.items[0],[W,q]=(0,n.useState)(B),[A,U]=(0,n.useState)(!1),[P,Z]=(0,n.useState)(!0);(0,n.useEffect)(()=>{var e;if(null===(0,k.ak)("rebate_name")&&Z(!0),(null==N?void 0:null===(e=N.items)||void 0===e?void 0:e.length)===1&&p.push(N.items[0].link),(0,E.oZ)("sessionStorage")&&"undefined"!=typeof sessionStorage&&null!==sessionStorage.getItem("selectedRebate")&&q(JSON.parse(sessionStorage.getItem("selectedRebate"))),null!==(0,k.ak)("rebate_name")){let e=null==c?void 0:c.items.filter(e=>(null==e?void 0:e.rebatesHashedUrl)===(0,k.ak)("rebate_name"));e.length>0&&q(e[0])}if(null!==(0,k.ak)("rebate_name")){let e=null==c?void 0:c.items.filter(e=>(null==e?void 0:e.rebatesUtmUrl)===(0,k.ak)("rebate_name"));e.length>0?q(e[0]):p.push("/rebates/"),Z(!1)}m.default.userLoggedIn&&U(!0)},[p.asPath]),(0,n.useEffect)(()=>{var e,t;m.default.rewardStatus?null==L||null===(e=L.current)||void 0===e||e.setAttribute("style","display:none"):null==L||null===(t=L.current)||void 0===t||t.setAttribute("style","display:flex")},[m.default.rewardStatus]);let D=e=>{var t,l;if("scrollTop"===(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.type)){let e=(null===(l=document.querySelector("img"))||void 0===l?void 0:l.height)||300;window.scrollTo({top:e+300,behavior:"smooth"})}};(0,n.useEffect)(()=>(m.default.userLoggedIn&&window.addEventListener("message",D,!1),()=>window.removeEventListener("message",D,!1)),[m.default.userLoggedIn]);let H=()=>{A||U(!0)};return(0,a.jsxs)("div",{"data-nosnippet":!0,className:"bg-bgcolor",children:[(0,a.jsx)("div",{className:x.backgroundWrapper||"",children:s&&(0,a.jsx)(b.Z,{priority:m.default.priority,className:"w-full",...s,altText:"page background"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"bg-secondary",children:(0,a.jsx)("h1",{className:x.content.pageTitle||"",children:i})}),(0,a.jsx)("div",{className:x.content.wrapper||"",children:(0,a.jsxs)("div",{className:x.content.bannerSection||"",children:[!P&&(0,a.jsx)("div",{className:"",children:(null==N?void 0:null===(t=N.items)||void 0===t?void 0:t.length)>1?(0,a.jsxs)(I.Z,{"aria-label":"arrow left",handler:()=>p.push((0,k.Mi)(p.asPath)),className:x.backArrowIcon,children:[(0,a.jsx)(v.default,{className:"w-13",name:"arrowLeftGray"}),(0,a.jsx)("span",{className:"underline font-semibold md:block pl-05 pt-02",children:"Back"})]}):""}),(0,a.jsx)("div",{className:x.content.textDescription||"",children:(0,a.jsx)(j.Z,{markdown:d,renderers:{link:e=>{let{href:t,children:l}=e;return(0,a.jsx)(u(),{href:t,passHref:!0,type:"button","aria-label":"Rebates",className:"font-semibold pl-05 text-darkBlue underline break-all",style:{textDecorationLine:"underline",fontWeight:"600"},children:l})}}})}),P&&(0,a.jsx)("div",{onClick:H,onKeyDown:H,role:"none",className:(c&&c.items&&c.items.length>0?x.rebates.iFramewrapper:x.rebates.noRebateswrapper)||"",children:(null==N?void 0:null===(l=N.items)||void 0===l?void 0:l.length)===1?(0,a.jsx)(C,{router:p,contextualLoginText:_,selectedContent:W,rebatesLoggedOutContentCollection:T,rebatesTileCollection:N}):(null==N?void 0:null===(r=N.items)||void 0===r?void 0:r.length)>1?(0,a.jsx)(a.Fragment,{children:N.items.map(e=>(0,a.jsx)("div",{className:x.rewardsEarnCards.rewardTileWrapper||"",children:(0,a.jsx)(O.Z,{pageSource:g.rebates,styles:"rebates-feature-promotions",...e,textIconName:"arrowHome"})}))}):R&&R.items&&R.items.map(e=>{switch(e.__typename){case"ContentTypeRichText":return(0,a.jsx)("div",{className:x.noRebates.textWrapper||"",children:(0,n.createElement)(h.Z,{...e,key:e&&e.sys&&e.sys.id})});case"LinkButton":return(0,a.jsx)("div",{className:"w-full flex justify-center",children:(0,a.jsx)(w.Z,{pageSource:g.rebates,...e})})}return null})}),!P&&(0,a.jsx)(C,{router:p,contextualLoginText:_,selectedContent:W,rebatesLoggedOutContentCollection:T,rebatesTileCollection:N})]})}),(0,a.jsx)("div",{children:S&&(0,a.jsx)(f.Z,{iconName:S.iconName,image:S.image,title:S.title,styles:"coupons-earnPoints",subTitle:S.subTitle,callToActionsCollection:S.callToActionsCollection,pageSource:g.coupons},S.sys&&S.sys.id)})]}),(0,a.jsx)(o(),{id:y.__hash,children:y})]})};B.propTypes={rebatesLink:i().string.isRequired,pageBackground:i().oneOfType([i().object]).isRequired,pageTitle:i().string.isRequired,didYouKnowCallout:i().instanceOf(Object).isRequired,allRebatesCollection:i().instanceOf(Object),description:i().string.isRequired,availableRebatesLabel:i().string,noRebatesAvailableContentCollection:i().instanceOf(Object).isRequired,rebatesLoggedOutContentCollection:i().instanceOf(Object).isRequired,rebatesNumber:i().string.isRequired,contextualLoginText:i().string.isRequired,pageSource:i().string.isRequired,href:i().string,children:i().string},B.defaultProps={availableRebatesLabel:"",allRebatesCollection:null,href:null,children:null};var W=(0,c.withRouter)((0,p.Pi)(B)),q=l(87364),A=l(13466);let U=e=>{let{layoutData:t,page:l}=e;return(0,a.jsxs)(q.Z,{...t,children:[(0,a.jsx)(A.Z,{...l.pageMetaData}),(0,a.jsx)(W,{...l,pageSource:"rebates"})]})};U.propTypes={layoutData:i().instanceOf(Object).isRequired,page:i().instanceOf(Object).isRequired};var P=!0,Z=U}},function(e){e.O(0,[3662,724,1216,5814,1055,3495,1191,6839,6716,8743,7364,7573,5218,5029,2888,9774,179],function(){return e(e.s=71570)}),_N_E=e.O()}]);