"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2548],{85941:function(e,t,r){r.d(t,{$T:function(){return s},$w:function(){return a}});var n=r(82091),o=r(72354);const a=e=>new Intl.Locale(n.Locale.from(e||o.ZW).replace("_","-")).language,s=e=>new Intl.Locale(n.Locale.from(e||o.ZW).replace("_","-")).region;t.ZP=e=>new Intl.Locale(n.Locale.from(e||o.ZW).replace("_","-")).baseName},92072:function(e,t,r){r.d(t,{R6:function(){return b},hG:function(){return A},iJ:function(){return C},jb:function(){return o},v5:function(){return E},WB:function(){return Z},$w:function(){return a.$w},FF:function(){return a.ZP},$T:function(){return a.$T},pm:function(){return z},XD:function(){return N},k$:function(){return w},ms:function(){return _},A0:function(){return I},EE:function(){return T},xs:function(){return D},iN:function(){return d},Km:function(){return i},gM:function(){return s},TV:function(){return k},b6:function(){return c},V9:function(){return p.V9},cC:function(){return p.cC},zf:function(){return u}});var n=r(19193);function o(e){let t;if(null!=e)if(e1?r-1:0),o=1;o{Array.isArray(e?.surrogateKeys)&&e.surrogateKeys.forEach((e=>t.add(e)))}));const a=Array.from(t).join(" ");e.setHeader("Surrogate-Key",a),t.size>1?e.setHeader("Surrogate-Control","max-age=900, stale-while-revalidate=31536000, stale-if-error=86400"):e.setHeader("Surrogate-Control","max-age=60")}const c=(e,t)=>{const r=e.dlcType.toLowerCase(),n=t.dlcType.toLowerCase();return rn?1:0};function u(e){return e[0].toUpperCase()+e.substring(1)}var l=r(18301),f=r(72354);function d(e,t,r){if(e.startsWith("webviewplus"))return e;const n="https://www.nintendo.com";if(e===n)return`/${(0,l.mt)(t)}/`;if(new RegExp(f.Bh.join("|"),"gi").test(e))return e;const o=new RegExp(n,"g");if(o.test(e)){const r=new RegExp(`/(${[...Array.from(f.En),f.LM].join("|")})/`,"g");return e.replace(r,"/").replace(o,((e,r,o)=>{if("/games/detail/"===o.substr(r+e.length,14)||"/products/detail/"===o.substr(r+e.length,17)){const[e,r]=t?.split("-")??[],o="us"===r?"":`/${e}_${r?.toUpperCase()}`;return""+(t?`${n}${o}`:"")}return`/${(0,l.mt)(t)}`}))}return!e.startsWith("http")&&r?`${e}?${f.Tx.HIDE_NAV_FOOT}=true`:e}var p=r(15569);r(34406).env.NCOM_ORIGIN;r(21447);var h=r(28546),m=r(81440),g=r(53447);function b(e){let{publicId:t,variant:r,dimensions:n,sizes:o,responsive:a=!1,quality:s="auto:best",format:i="auto"}=e;const c=l.S_&&window.devicePixelRatio&&window.devicePixelRatio<2?window.devicePixelRatio:2;switch(r){case"OG_IMAGE":return g.C.image(t).resize((0,m.hl)(1200)).quality(s).format("auto").delivery((0,h.uN)(c)).toURL();case"SIZED":return g.C.image(t).quality(s).format("auto").resize(n.width&&n.height?(0,m.hl)().width(n.width).height(n.height):n.width?(0,m.hl)().width(n.width):(0,m.hl)().height(n.height)).delivery((0,h.uN)(c)).toURL();case"BACKGROUND":return a&&o?function(e,t){return t.map((t=>g.C.image(e).resize((0,m.hl)().width(t)).quality("auto:best").format("auto").delivery((0,h.uN)(1)).toURL()))}(t,o):g.C.image(t).quality("auto:good").format(i).delivery((0,h.uN)(c)).toURL();default:return g.C.image(t).quality(s).format(i).delivery((0,h.uN)(c)).toURL()}}var v=r(49074);var w=(e,t)=>{const{sort:r=v.p[v.f.DEFAULT]}=t||{},n=(e||[]).flatMap((e=>Array.isArray(e)?e.map((e=>e.sku)):e?.sku?[e?.sku]:[]));return r===v.p[v.f.DEFAULT]&&n.map((e=>`NOT objectID:${e}`)).join(" AND ")},y=r(95235),O=r(13852);function x(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{const n=new Map;return t.forEach((t=>{n.set(t.label,j(j({},t),{},{value:{value:t.value,cmsValue:`${e}${O.HA}${t.label}`}}))})),r.forEach((e=>{const t=n.get(e.label)||{label:e.label,count:0,value:{}};t.count+=e.count,t.isRefined=t.isRefined||e.isRefined,t.value={cmsValue:e.value,value:e.value},n.set(e.label,t)})),Array.from(n.values())},A=(e,t)=>{const r=new Map;return e.forEach((e=>{r.set(e.label,j(j({},e),{},{value:{value:e.value}}))})),t.forEach((e=>{const t=r.get(e.label)||{label:e.label,value:{}};t.value=j(j({},t.value),{},{cmsValue:e.value}),r.set(e.label,t)})),Array.from(r.values())};function E(e){let{products:t,rating:r}=e;return t?.filter((e=>e?.contentRating?.order<=r?.order))}var P=r(82091);function M(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 S(e){for(var t=1;t{const{category:t=v.e.ALL_PRODUCTS,productsCategoryUid:r,merchandisedGrid:n,filter:o,router:a}=e||{},s=(0,P.deserializeHash)(a?.asPath),i=w(n,s),c=[o&&`(${o})`,i&&`(${i})`,r&&`(categoryIds:"${r}")`].filter(Boolean).join(" AND "),u=c?S(S({},v.o),{},{filters:c}):v.o;return{[t]:S(S({},v.d[t]),{},{resultsConfig:u})}};const{CAMPAIGN_CODE:$,UTM_CODE:R}=f.Tx;var D=function(e,t){if(!e)return!0;const r=new Date-new Date(e);return new Date(r).getUTCFullYear()-19700&&void 0!==arguments[0]?arguments[0]:[];const t=[...e];for(let r=t.length-1;r>0;r--){const e=Math.floor(Math.random()*(r+1));[t[r],t[e]]=[t[e],t[r]]}return t},L=r(7307);function z(e){let{primaryAsset:t,primarySizes:r=[1600,1400,1200,900],secondaryAsset:n,secondarySizes:o=[767,600,400,300]}=e;var a=b({publicId:t,variant:"BACKGROUND",responsive:!0,sizes:r}),s=b({publicId:n??t,variant:"BACKGROUND",responsive:!0,sizes:o});const i=a.shift();return r.shift(),(0,L.css)(["background-image:url('","');"," ",""],i,r.map(((e,t)=>(0,L.css)(["@media (max-width:","px){background-image:url('","');}"],e,a[t]))),o.map(((e,t)=>(0,L.css)(["@media (max-width:","px){background-image:url('","');}"],e,s[t]))))}var Z=(e,t)=>e.label.toUpperCase()/.*(SKU[\s]*[\d]+).*/.exec(e)?.[1]?.replace("SKU","").trim()||null},13852:function(e,t,r){r.d(t,{HA:function(){return h},fP:function(){return m},x3:function(){return w},Rb:function(){return i.Z},O_:function(){return a},D9:function(){return j.Z},Sv:function(){return x},r:function(){return s.Z},Hf:function(){return u}});var n=r(2784),o=r(18301);var a=()=>{const{0:e,1:t}=(0,n.useState)(!1);return(0,o.nw)((()=>t(!0))),e},s=r(89364),i=r(36613),c=(r(80963),r(82091));var u=()=>{const{text:e}=(0,c.useLocalizer)();return{label:`${e("All deals")}`,url:"/store/sales-and-deals/"}},l=r(95235),f=r(46420);function d(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 p(e){for(var t=1;tnew Set((0,f.Aw)(e[t]).flatMap((t=>(0,f.Aw)(e[t]).map((e=>`${t}${h}${e}`)))));var w=(e,t,r)=>{const{generateFiltersFromFilteredProducts:o=!0,operator:a=m.OR,queryParam:s=g,queryToInitializeFilters:i=b,hidden:c=[]}=r||{},{0:u,1:l}=(0,n.useState)(v(i,s)),f=(0,n.useCallback)((e=>{const t=new Set(Array.from(u));u.has(e)?t.delete(e):t.add(e),l(t)}),[u]),d=(0,n.useCallback)((e=>{l(v(e,s))}),[s]),w=(0,n.useCallback)((()=>{l(new Set)}),[]),y=(0,n.useMemo)((()=>{if(!u.size)return[...e];return(e||[]).filter((e=>{for(let t of u.values()){const[r,n]=t.split(h),o=Array.isArray(e[r])?Boolean(e[r].find((e=>e==n))):e[r]===n;if(a===m.OR){if(o)return!0}else if(!o)return!1}return a!==m.OR}))}),[e,u,a]),O=(0,n.useMemo)((()=>(o?y:e).reduce(((e,r)=>((t||[]).forEach((t=>{const n=r[t];if(!n)return;const o=e.get(t)||new Map;if(Array.isArray(n))n.forEach((e=>{const t=o.get(e);o.set(e,t?t+1:1)}));else{const e=o.get(n);o.set(n,e?e+1:1)}e.set(t,o)})),e)),new Map)),[e,y,o,t]),x=(0,n.useMemo)((()=>new Set(c)),[c]),j=(0,n.useMemo)((()=>{const e={};return O.forEach(((t,r)=>{e[r]={items:Array.from(t).reduce(((e,t)=>{let[n,o]=t;return x.has(n)?e:[...e,{value:`${r}${h}${n}`,label:n,count:o,isRefined:u.has(`${r}${h}${n}`)}]}),[])}})),e}),[O,u,x]),C=(0,n.useMemo)((()=>{const{filters:e,attributes:t}=Array.from(u).reduce(((e,t)=>{let{filters:r,attributes:n}=e;const[o,a]=t.split(h);return n.add(o),{filters:p(p({},r),{},{[o]:[...r[o]||[],a]}),attributes:n}}),{filters:{},attributes:new Set});return t.size>0?p(p({},e),{},{[s]:Array.from(t)}):{}}),[u,s]);return(0,n.useMemo)((()=>({appliedFilters:Array.from(u),appliedFiltersQuery:C,filteredState:j,filteredProducts:y,refine:f,refineByQuery:d,clearFilters:w})),[u,C,j,y,f,d,w])},y=r(98087),O=r(15820);var x=e=>{const{customer:t,accounts:r,locale:o,limit:a=12,skip:s}=e||{},{loading:i,data:c}=(0,y.aM)(O.o$.ui,{locale:o,limit:a},{authenticated:!0,skip:!r.isLoggedIn||s});return(0,n.useMemo)((()=>({loading:r?.loading||t?.loading||i,devices:c?.customer?.devices||[],recommendations:c?.customer?.recommendations||[]})),[r,t,i,c])},j=r(99005)},36613:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(2784),o=r(20360);var a=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{ref:r,inView:a}=(0,o.YD)({triggerOnce:t});return(0,n.useEffect)((()=>{a&&e()}),[a,e]),{ref:r,inView:a}},s=a},80963:function(e,t,r){r.d(t,{o:function(){return s}});var n=r(2784),o=r(7307),a=r(82091);const s={DESKTOP:"desktop",DESKTOP_LARGE:"desktopLarge",TABLET:"tablet",TABLET_SMALL:"tabletSmall"};t.Z=e=>{const t=(0,n.useContext)(o.ThemeContext).mediaQuery[e].replace("@media ","");return(0,a.useMatchMedia)(t)}},99005:function(e,t,r){var n=r(2784);t.Z=e=>{const t=(0,n.useRef)();return(0,n.useEffect)((()=>{t.current=e})),t.current}},89364:function(e,t,r){var n=r(2784),o=r(10569);t.Z=()=>{const{0:e,1:t}=(0,n.useState)(!0),{state:{scrollKey:r},actions:{restoreScroll:a}}=(0,o.p2)(),s=(0,n.useCallback)((e=>{e&&t(!1)}),[]);(0,n.useEffect)((()=>{r&&!e&&a()}),[r,e,a]);return(0,n.useMemo)((()=>({waitForElementRef:s})),[s])}},59124:function(e,t,r){r.d(t,{Z:function(){return s}});r(2784);var n=r(13980),o=r.n(n),a=r(52322);const s=e=>(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"MinusIcon",...e,children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",fill:e.color,d:"M0 12h32v8H0z"})});s.propTypes={className:o().string,color:o().string,size:o().oneOfType([o().number,o().string])},s.defaultProps={color:"currentColor",size:24}},4431:function(e,t,r){r.d(t,{Z:function(){return s}});r(2784);var n=r(13980),o=r.n(n),a=r(52322);const s=e=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"NotificationIcon",...e,children:[(0,a.jsx)("circle",{cx:16.084,cy:16,r:16,fill:e.color}),(0,a.jsx)("path",{fill:"#fff",d:"M14.497 18.749l.061.429h3.051l.062-.43q.183-1.285.3-2.43a23.08 23.08 0 0 0 .12-2.372V6.01h-4.015v7.936a23.26 23.26 0 0 0 .119 2.371q.119 1.147.302 2.432zm3.866 3.826a2.418 2.418 0 0 0-.533-.785 2.58 2.58 0 0 0-.783-.518 2.501 2.501 0 0 0-1.94.001 2.566 2.566 0 0 0-.783.518 2.353 2.353 0 0 0-.53.792 2.518 2.518 0 0 0-.186.957 2.491 2.491 0 0 0 .188.966 2.34 2.34 0 0 0 .528.782 2.458 2.458 0 0 0 .792.516 2.576 2.576 0 0 0 1.924 0 2.457 2.457 0 0 0 .79-.515 2.46 2.46 0 0 0 .533-2.714z"})]});s.propTypes={className:o().string,color:o().string,size:o().oneOfType([o().number,o().string])},s.defaultProps={color:"currentColor",size:24}},1505:function(e,t,r){r.d(t,{Z:function(){return s}});r(2784);var n=r(13980),o=r.n(n),a=r(52322);const s=e=>(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"PlusIcon",...e,children:(0,a.jsx)("path",{fill:e.color,fillRule:"evenodd",d:"M32.04 12h-12V0h-8v12h-12v8h12v12h8V20h12v-8z"})});s.propTypes={className:o().string,color:o().string,size:o().oneOfType([o().number,o().string])},s.defaultProps={color:"currentColor",size:24}},65866:function(e,t,r){r.d(t,{R:function(){return D}});var n=r(2784),o=r(13980),a=r.n(o),s=r(43499),i=r(51855),c=r(117),u=r(11775),l=r(40489),f=r(6040),d=r.n(f),p=r(264),h=r.n(p),m=r(52322),g="mBL2V",b="JIHaX",v="_5pwsY",w="-fzAB",y="GmaaA",O="SUqIq",x="d0-f7",j="GRmY-",C="_1vq-b",A="shpXD",E="IydHV",P="y8-wO",M="_9Nqbd",S="vKXLa",N="TcDZK",$="il0J-";const R=(0,n.forwardRef)((function(e,t){const{children:r,contained:o,widthMax:a,widthMin:f,endCtaUrl:p,endCtaText:R,focusable:D,lang:T,noLoop:k,className:L,centered:z,locale:Z,...I}=e,[_,U]=(0,n.useState)(0),[B,G]=(0,n.useState)(0),[K,q]=(0,n.useState)(!1),[F,V]=(0,n.useState)(!1),[H,W]=(0,n.useState)(!1),[Y,X]=(0,n.useState)(!1),{text:J}=(0,c.u)({locale:T}),Q=J("Next page"),ee=J("Previous page"),te=J("See all");(0,n.useEffect)((()=>{X(window.matchMedia("(hover: hover)").matches)}),[]);const re=(0,n.useRef)(),ne=(0,n.useRef)(),oe=(0,n.useRef)(),ae=(0,n.useRef)();(0,n.useImperativeHandle)(t,(()=>({setActive:U,adjustPosition:fe})));const se=(0,n.useCallback)((()=>{ae.current?.scrollWidth>ae.current?.offsetWidth?V(!0):V(!1)}),[]),ie=(0,n.useCallback)((()=>{const e=oe.current?.offsetWidth;let t=16;if("undefined"!==typeof window&&e){const e=window.getComputedStyle(oe.current);t=2*parseFloat(e.marginRight)}return e+t}),[]),ce=(0,n.useCallback)((()=>Math.floor(re.current?.offsetWidth/ie())),[ie]),ue=(0,n.useCallback)((()=>{let e=n.Children.count(r);return p&&(e+=1),e}),[r,p]),le=(0,n.useCallback)((e=>{const t=ne.current.scrollLeft+ie(),r=ne.current.scrollLeft+ie()*(ce()-1),n=ie()*e;return h()(n,t,r)}),[ce,ie]),fe=(0,n.useCallback)((e=>{if(e>_){if(!le(e)){const t=e-1;U(Math.max(0,t)),W(t+ce()>=ue())}}else if(e<_&&!le(e)){const t=ce(),r=e-(t-1);U(Math.max(0,r)),W(r+t>=ue())}}),[_,le,ce,ue]),de=(0,n.useCallback)((()=>{ne.current.scrollTo(ie()*_,0)}),[_,ie]),pe=(0,n.useCallback)((()=>{const e=re.current?.offsetWidth;se(),F&&ne.current&&e!=B&&(de(),G(e),_+ce()>=ue()?W(!0):W(!1))}),[se,de,F,B,_,ce,ue]);(0,n.useEffect)((()=>{pe()}),[pe]),(0,n.useEffect)((()=>{const e=re.current;G(e.offsetWidth);const t=d()(pe,500,{leading:!0,trailing:!0}),r=new ResizeObserver((()=>{t()}));return r.observe(e),()=>r.unobserve(e)}),[pe,500]),(0,n.useEffect)((()=>{de()}),[_,de]);return(0,m.jsx)("div",{className:(0,l.Z)(g,L),ref:re,onKeyDown:e=>{"Tab"===e.key&&D&&q(!0)},"data-testid":"rail",...I,children:(0,m.jsxs)("div",{className:b,children:[(0,m.jsx)("div",{className:v,ref:ne,"data-testid":L?`${L}-rail-frame`:"rail-frame",children:(0,m.jsxs)("div",{className:(0,l.Z)(w,z&&y,F&&O),ref:ae,children:[n.Children.map(r,((e,t)=>(0,m.jsx)("div",{className:x,ref:0==t?oe:null,"data-testid":"card",style:{"--min-width":`${f}px`,"--max-width":`${a}px`},children:e},e?.key??t))),p&&(0,m.jsx)("div",{className:(0,l.Z)(x,j),style:{"--min-width":`${f}px`,"--max-width":`${a}px`},children:(0,m.jsx)(u.B,{className:$,href:p,locale:Z,children:R||te})})]})}),(0,m.jsxs)("div",{className:(0,l.Z)(C,Y&&E,K&&A),children:[(0,m.jsx)("button",{className:(0,l.Z)(S,P,o&&M,F&&O),"aria-label":ee,onClick:()=>{const e=ce();if(_-e<0)U(0),W(!1);else{const t=_-e;U(t),W(t+e>=ue())}},tabIndex:D?"0":"-1",disabled:0===_,children:(0,m.jsx)(s.Z,{size:36})}),(0,m.jsx)("button",{className:(0,l.Z)(N,P,o&&M,F&&O),"aria-label":Q,onClick:()=>{const e=ce(),t=ue();if(_+e>=t)U(0),W(!1);else{const r=_+e;U(r),W(r+e>=t)}},tabIndex:D?"0":"-1",disabled:k&&H,children:(0,m.jsx)(i.Z,{size:36})})]})]})})}));R.propTypes={className:a().string,children:a().node.isRequired,contained:a().bool,centered:a().bool,endCtaUrl:a().string,endCtaText:a().string,focusable:a().bool,widthMax:a().number,widthMin:a().number,lang:a().oneOf(["en","es","fr","pt"]),locale:a().string,noLoop:a().bool},R.defaultProps={contained:!1,widthMax:268,widthMin:208,lang:"en",noLoop:!0,focusable:!0};var D=R}}]);