!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4bb1683a-be0d-4833-8dcf-bd3846ce3c5e",e._sentryDebugIdIdentifier="sentry-dbid-4bb1683a-be0d-4833-8dcf-bd3846ce3c5e")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2613],{91365:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return F},default:function(){return R}});var n=r(95235),a=r(2784),o=r(88627),s=r(41937),i=r(79447),l=r(57724),c=r(92102),u=r(82091),d=r(2002),p=r(70933),f=r(402),g=r(51312),m=r(76116),b=r(52322);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t{let{page:t,analytics:r}=e;const{pageHeader:n,pageSections:a,refurbishedStoryModule:h}=t.content,O=a.map((e=>({label:e.deepLink,url:`#${(0,d.GL)(e.deepLink,{removeSpecialChars:!0})}`}))),{text:j}=(0,u.useLocalizer)(),P={label:`${j("Shop all deals")}`,url:`/store/games/#p=1&sort=df&f=topLevelFilters&topLevelFilters=${j("Deals")}`};return(0,b.jsxs)(f.Kq,{children:[(0,b.jsx)(i.F,{heading:n.heading,subtitle:(0,b.jsx)(m.Z,{data:n.description}),image:{desktop:{assetPath:n.asset?.primary?.assetPath},mobile:{assetPath:n.asset?.secondary?.assetPath}},pillFarm:[...O,P]}),(0,b.jsxs)(l.H.NewLevel,{children:[(0,b.jsx)(p.Tx,{children:a.map(((e,t)=>(0,b.jsxs)("div",{id:(0,d.GL)(e.deepLink,{removeSpecialChars:!0}),children:[(0,b.jsx)(s.Z,{content:{deepLink:e.deepLink,background:e.background,lightScrim:e.modifiers.includes("lightScrimVariant"),storyModuleContentReverse:e.modifiers.includes("contentReverse"),storyModuleOrCuratedProductList:e.storyModuleOrCuratedProductList,legal:e.legal},analytics:y(y({},r),{},{listDetailsId:"sales-and-deals-classic"})}),(0,b.jsx)(g.Z,{icon:c.Z})]},e.deepLink+t)))}),!!h.CONTENT_TYPE&&(0,b.jsx)(o.tm,{content:{assetPath:h.asset.primary.assetPath,assetPathAlt:h.asset.alt,background:h.background,cta:h.cta,description:h.description,heading:h.heading,modifiers:h.modifiers}}),(0,b.jsx)(o.y4,{})]})]})},j=r(64897),P=r(94922),v=r(46420),x=r(99140),S=r(15188),w=r(95395),C=r(50802),D=r(36734),_=r(31911);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t{let{analytics:t,page:r}=e;const{marketingPage:n={},pageHeader:s,pageLinkFarm:i}=r.content,{text:l}=(0,u.useLocalizer)(),c=(0,j.Z)(),f=(0,w.Hf)(),g=(0,u.useAccounts)(),m=(0,a.useMemo)((()=>(0,d.vS)(c.locale)),[c.locale]),h=l("Deals"),y=(0,a.useMemo)((()=>[h]),[h]),{0:O,1:E}=(0,a.useState)(!0),I=Boolean(c.query[x.Tx.CAMPAIGN_CODE]),N=(0,a.useCallback)((()=>{E(!1)}),[]),M=r.content.merchandisedGrid,A=(0,a.useMemo)((()=>m?null:(0,b.jsx)(o.my,{filterBySlug:D.Pp.ON_SALE,onClosePrompt:N,analytics:{listDetails:{id:`plp-${(0,d.GL)(t.pageName)}-recommendations`,name:`${t.pageName} - Recommendations`},featureFlag:x.rI.SALES_AND_DEALS_REDUX},content:r.content})),[N,m,t,r.content]),F=P.e.GAMES,R=(0,C.XD)({category:F,filter:`topLevelFilters:${h}`,merchandisedGrid:M,router:c}),T=(0,a.useMemo)((()=>{const e=new URL(c.asPath,x.$e).pathname;return{list:[f,...i].map((t=>k(k({},t),{},{label:l(t.label),isSelected:e===t.url})))}}),[l,f,i,c.asPath]),H=(0,a.useMemo)((()=>k(k({templateName:"peon"},n),{},{modules:[(0,_.MR)(k(k({},s),{},{description:(0,b.jsx)(p.Hb,{data:s.description})}),T.list),...n?.modules||[]].filter(Boolean)})),[s,n,T]);return(0,a.useEffect)((()=>{g.isLoggedIn||O||E(!0)}),[g.isLoggedIn,O]),(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(v.X$,{router:c,categoryConfig:R,sortByCategories:L,defaultCategory:F,searchParamWhitelist:D.uy,preserveQueryParamKeys:D.aq,hiddenFilters:y,children:(0,b.jsx)(S.Z,{page:k(k({},r.content),{},{pageHeader:null,marketingPage:H,merchandisedGrid:M,merchandisedGridHeader:A,merchandisedGridRemainingProductsLabel:"Shop all deals",ctaCollection:T}),showRating:I,gridHeaderIsOpen:O,cachePrefix:"sales_and_deal_v2",filterSections:P.G,analytics:{eventPrefix:t.eventPrefix,pageName:t.pageName,featureFlag:t?.featureFlag},fullBleedHero:!0,cmsProductPageSize:40,seeAllCtaLabel:"Load more results",enableStickyCollectionNav:!0,hiddenFilters:y,disableDefaultMarketingPageHeading:!0})})})};function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;tM(M({},e.analytics),{},{eventPrefix:A})),[e.analytics]);return t?(0,b.jsx)(I,M(M({},e),{},{analytics:r})):(0,b.jsx)(O,M(M({},e),{},{analytics:r}))}},70933:function(e,t,r){"use strict";r.d(t,{Hb:function(){return p},Kc:function(){return d},RR:function(){return u},Tx:function(){return s},he:function(){return c},lU:function(){return i},n5:function(){return l}});var n=r(7307),a=r(90374),o=r(88627);const s=n.default.div.withConfig({componentId:"sc-rxe36q-0"})(["width:100%;position:relative;"]),i=(0,n.default)(o.tm).withConfig({componentId:"sc-rxe36q-1"})(["padding-top:",";padding-bottom:",";","{padding-top:",";padding-bottom:",";}"],(e=>{let{theme:t}=e;return t.spacing[40]}),(e=>{let{theme:t}=e;return t.spacing[40]}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return t.spacing[64]}),(e=>{let{theme:t}=e;return t.spacing[64]})),l=((0,n.default)(a.B).withConfig({componentId:"sc-rxe36q-2"})(["grid-column:span 2;","{height:",";font-size:",";padding:",";grid-column:span 1;}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return t.spacing[64]}),(e=>{let{theme:t}=e;return t.font.size.h2Desktop}),(e=>{let{theme:t}=e;return`0 ${t.spacing[24]}`})),n.default.div.withConfig({componentId:"sc-rxe36q-3"})(["margin:"," ",";","{margin-top:",";margin-bottom:",";}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return t.spacing[64]}),(e=>{let{theme:t}=e;return t.spacing[96]}))),c=(0,n.default)(o.en).withConfig({componentId:"sc-rxe36q-4"})(["padding-left:0;"]),u=n.default.div.withConfig({componentId:"sc-rxe36q-5"})(["background-color:",";border-radius:",";padding:",";margin-bottom:0;*{font-size:",";}","{margin-bottom:",";*{font-size:",";}}"],(e=>{let{theme:t}=e;return t.color.white}),(e=>{let{theme:t}=e;return t.borderRadius}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.font.size.legalMobile}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.font.size.legalDesktop})),d=n.default.div.withConfig({componentId:"sc-rxe36q-6"})(["display:inline-flex;text{color:",";}"],(e=>{let{$textColor:t}=e;return t})),p=(0,n.default)(o.Ho).withConfig({componentId:"sc-rxe36q-7"})(["margin-bottom:0;"])},41937:function(e,t,r){"use strict";r.d(t,{Z:function(){return P}});var n=r(95235),a=r(2784),o=r(46420),s=r(51505),i=r(82732),l=r(57724),c=r(89214),u=r(82091),d=r(90862),p=r(88627),f=r(36734);var g=function(e){if(e&&7===e?.length&&"#"===e?.[0]){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}}return null};const m=e=>e<=.03928?e/12.92:[(e+.055)/1.055]**2.4;var b=r(7307),h=r(70933),y=r(52322);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t{let{content:t,analytics:r}=e;const n=(0,a.useContext)(b.ThemeContext),{deepLink:O,background:P,lightScrim:v,storyModuleContentReverse:x,storyModuleOrCuratedProductList:S,legal:w}=t,{text:C}=(0,u.useLocalizer)(),{0:D,1:_}=(0,a.useState)((()=>f.Op[0].value)),{selectedSortByOption:E,handleSortByChange:k}=(0,o.sI)({sortBy:D,sortByOptions:f.Op,applySortBy:e=>_((()=>e))}),L=(0,a.useMemo)((()=>f.Op.map((e=>{let{value:t,label:r}=e;return{value:t,label:C(r)}}))),[C]),I=(0,a.useMemo)((()=>({value:E.value,label:C(E.label)})),[E,C]),N=(0,a.useMemo)((()=>S[1]||[]),[S]),M=(0,a.useMemo)((()=>D?[...N].sort(D):N),[N,D]),A=(0,a.useMemo)((()=>{const e=r?.listDetailsId&&r?.pageName?{analytics:{listDetails:{id:r.listDetailsId,name:r.pageName}}}:{};return(0,y.jsx)(h.he,{children:M.map((t=>(0,y.jsx)(d.I8,j(j({},t),{},{featureFlag:r?.featureFlag},e),t.sku)))})}),[r,M]);return(0,y.jsxs)(p.Aq,{background:P,id:O,children:[(0,y.jsx)(h.lU,{lightScrim:v,content:{assetPath:S[0]?.asset.primary.assetPath,assetPathAlt:S[0]?.alt,background:S[0]?.background,cta:S[0]?.ctaList[0],description:S[0]?.description,heading:S[0]?.heading,modifiers:S[0]?.modifiers},reverseContent:x}),(0,y.jsxs)(l.H.NewLevel,{children:[M.length>0&&(0,y.jsxs)(h.n5,{children:[(0,y.jsx)(s.S,{children:(0,y.jsx)(i.S,{label:(0,y.jsx)(h.Kc,{$textColor:(e=>{const t=n.color.darkGray2,r=function(e,t,r){const n=g(e);if(!n||!t||!r)return null;const a=n?.r/255,o=n?.g/255,s=n?.b/255;return.2126*m(a)+.7152*m(o)+.0722*m(s)>.179?r:t}(e,n.color.white,t);return r||t})(P.color),children:(0,y.jsx)("text",{children:C("Sort by")})}),onSelect:k,options:L,dropdownValue:I})}),(0,y.jsx)(c.S,{size:24}),A]}),w?(0,y.jsx)(p.$0,{constrained:!0,small:!0,marginTop:0,children:(0,y.jsx)(h.RR,{children:(0,y.jsx)(p.Ho,{data:w})})}):null]})]})}},31911:function(e,t,r){"use strict";r.d(t,{MR:function(){return a}});var n=r(91159);r(2002);const a=(e,t)=>e&&{sectionType:"HeaderFullBleed",background:{},modules:[{__contentType:n.OB.PEON_PROMO,body:{content:[{content:[{value:e.heading}]},{content:[{value:e.description}]}]},asset:{primary:{assetPath:e.asset?.primary?.assetPath},secondary:{assetPath:e.asset?.secondary?.assetPath},alt:"sale"},ctas:t}]}},37135:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/store/sales-and-deals",function(){return r(91365)}])}},function(e){e.O(0,[8286,4511,402,5806,5188,9774,2888,179],(function(){return t=37135,e(e.s=t);var t}));var t=e.O();_N_E=t}]); //# sourceMappingURL=sales-and-deals-79c5bb165eaa7bdc.js.map