1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1634],{71634:(e,t,r)=>{"use strict";r.d(t,{default:()=>_});var a=r(43520),s=r(29699),o=r.n(s),l=r(95212),n=r(81277),i=r(79412),c=r(52896),d=r(12986);r(80793);let p={pc:"PC",ps5:"PS5",ps4:"PS4",xbox:"XBOX",switch:"SWITCH",switch2:"SWITCH 2"},u={pc:"M30 600 C40 520 90 470 150 420 C210 370 220 250 300 170 C360 110 420 115 460 140 C500 165 520 150 545 110 C590 35 690 20 730 110 C765 190 745 330 805 420 C850 490 1000 505 1000 525 L1000 600 Z",playstation:"M30 600 C60 520 110 450 170 390 C230 330 260 220 330 160 C400 100 460 90 500 100 C540 110 570 95 600 80 C660 50 720 60 750 140 C780 220 770 340 830 420 C880 480 1000 500 1000 520 L1000 600 Z",xbox:"M30 600 C50 530 100 480 160 430 C220 380 240 290 310 220 C370 160 430 170 470 190 C510 210 530 170 560 120 C600 40 700 0 745 90 C780 170 760 320 815 410 C860 485 1000 500 1000 530 L1000 600 Z",nintendo:"M30 600 C40 510 80 460 140 410 C200 360 200 220 290 150 C350 100 430 110 470 160 C500 195 530 170 555 120 C600 40 700 30 735 120 C770 200 750 340 810 425 C855 490 1000 505 1000 525 L1000 600 Z"},m=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",h=(e,t)=>e.querySelector(t)?.textContent?.trim()??"";function f(e){let t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle="#fff",t.fillStyle=e,t.fillRect(0,0,1,1),Array.from(t.getImageData(0,0,1,1).data)):[255,255,255,255]}function g(e,t){e.style.viewTransitionName=t?"pdp3-card":"";let r=e.querySelector(".gc__cover .rynko-case, .gc__cover img");r&&(r.style.viewTransitionName=t?"pdp3-media":"")}function _(){let e=(0,l.useRef)(null),t=(0,l.useRef)(null),r=(0,l.useRef)(null),s=(0,l.useRef)(null),_=(0,l.useRef)(null),b=(0,l.useRef)(null),[x,y]=(0,l.useState)(null),[v,C]=(0,l.useState)(0),[j,N]=(0,l.useState)(0),[k,S]=(0,l.useState)(!1),[w,A]=(0,l.useState)("pc"),[T,q]=(0,l.useState)(null),[$,M]=(0,l.useState)(!0),[P,E]=(0,l.useState)(!1),[L,R]=(0,l.useState)(null),z=(0,l.useRef)({src:null,fuoco:null,busy:!1,openTr:null,pendingClose:!1,gen:0,guscio:"pc",gusci:!1,dealTimer:0,barraPosata:!1,ghostPrima:""}),I=e=>{t.current&&(t.current.style.viewTransitionName=e?"pdp3-card":""),r.current&&(r.current.style.viewTransitionName=e?"pdp3-media":"")},B=()=>{let e=r.current?.querySelector(".rynko-case");e&&(e.style.transform="")},O=(0,l.useCallback)(t=>{let r=z.current,a=e.current;if(!a)return;if(r.busy){a.open&&(r.pendingClose=!0),r.openTr?.skipTransition();return}if(!a.open)return;let s=r.src,o=document.documentElement,l=()=>{I(!1),a.close(),s&&(s.classList.remove("is-morph-src"),t||g(s,!0))},i=()=>{s&&(g(s,!1),r.fuoco?.isConnected&&r.fuoco.focus({preventScroll:!0})),M(!0),E(!1),B(),r.src=null,r.fuoco=null};if(t||matchMedia("(prefers-reduced-motion: reduce)").matches||"function"!=typeof document.startViewTransition||!s||!s.isConnected){l(),i();return}r.busy=!0,(0,n.flushSync)(()=>{M(!0),E(!1)}),I(!0),o.setAttribute("data-morph","close"),o.setAttribute("data-morph-game",""),document.startViewTransition(l).finished.catch(()=>{}).then(()=>{o.removeAttribute("data-morph"),o.removeAttribute("data-morph-game"),r.busy=!1,r.pendingClose=!1,i()})},[]),F=(0,l.useCallback)((t,r,a)=>{let s,o,l,d,u,m,_=z.current,x=e.current;if(!x||_.busy||x.open)return;let v=(s=t.matches("a[href]")?t:t.querySelector("a[href]"),o=t.querySelector(".rynko-case__stampa, .gc__cover img"),l=Array.from(t.querySelectorAll(".gc__plat")).map(e=>{let t,r=(e.dataset.platformKey||e.textContent||"").trim().toLowerCase(),a=(0,c.U3)(r)??"pc";return{guscio:a,label:p[a]??(e.textContent||"").trim(),now:e.dataset.now??"",was:e.dataset.was??"",off:e.dataset.off??"",store:e.dataset.store??"",kind:e.dataset.kind??"",valore:Number.isNaN(t=parseFloat(String(e.dataset.now||"").replace(/[^0-9,]/g,"").replace(",",".")))?null:t,attiva:e.classList.contains("is-active")}}),d=t.querySelector(".gc__spark .gc__spark-fill")?.getAttribute("d"),u=t.querySelector(".gc__spark path:not(.gc__spark-fill)")?.getAttribute("d"),{titolo:t.dataset.title||h(t,".gc__title"),href:s?.getAttribute("href")??null,cover:t.dataset.cover||o?.currentSrc||o?.src||null,tag:h(t,".gc__tag"),righe:l,spark:d&&u?{area:d,linea:u}:null,campanella:!!t.querySelector(".gc__radar button, .gc__bell")}),j=function(e){let t=function(e){for(let t=e;t&&t!==document.documentElement;t=t.parentElement){let e=getComputedStyle(t).backgroundColor;
1if(f(e)[3]>200)return e}return getComputedStyle(document.body).backgroundColor}(e.querySelector(".gc__panel")??e),r=getComputedStyle(e.querySelector(".gc__title")??e).color,a=e.querySelector(".gc__now"),[s,o,l]=f(t);return{scuro:.2126*s+.7152*o+.0722*l<128,stile:{"--sc-canvas":t,"--sc-ink":r,"--sc-ink-soft":`color-mix(in oklab, ${r} 62%, transparent)`,...a?{"--m-price":getComputedStyle(a).color}:{}}}}(t),k=Math.max(0,v.righe.findIndex(e=>e.attiva)),w=v.righe[k]?.guscio??"pc";_.src=t,_.fuoco=a??(t.matches("a[href], button")?t:t.querySelector("a[href], button"))??t,_.gen++,_.guscio=w,_.barraPosata=!1,_.ghostPrima="";let T=r||matchMedia("(prefers-reduced-motion: reduce)").matches||"function"!=typeof document.startViewTransition||!((m=t.getBoundingClientRect()).width>0&&m.bottom>0&&m.top<innerHeight);z.current.gusci||(z.current.gusci=!0,Object.keys(c.Xc).forEach(e=>{let t=new Image;t.decoding="async",t.src=`/assets/custodie/${e}-guscio.webp?v=${i.REVISIONE_GUSCI}`}));let $=()=>{(0,n.flushSync)(()=>{y(v),R(j),C(k),N(k),S(!1),A(w),q(null),M(T),E(!1)}),B(),t.classList.add("is-morph-src"),x.showModal(),b.current?.focus({preventScroll:!0})};if(T){$(),E(!0);return}_.busy=!0;let P=document.documentElement;g(t,!0),P.setAttribute("data-morph","open"),P.setAttribute("data-morph-game","");let L=document.startViewTransition(()=>{$(),g(t,!1),I(!0)});_.openTr=L,L.updateCallbackDone.then(()=>{setTimeout(()=>{x.open&&_.src===t&&E(!0)},140)}).catch(()=>{}),L.finished.catch(()=>{}).then(()=>{_.openTr=null,I(!1),P.removeAttribute("data-morph"),P.removeAttribute("data-morph-game"),_.busy=!1,_.pendingClose&&(_.pendingClose=!1,O(!0))})},[O]);(0,l.useEffect)(()=>{let t=t=>{if(t.defaultPrevented||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let r=t.target,a=r?.closest?.('[data-morph="game"]'),s=e.current;if(!a||!s||s.contains(a))return;let o=s.parentElement?.closest(".skin-root, .vtr");if(!o||a.closest(".skin-root, .vtr")!==o)return;let l=r.closest("button, input, select, textarea, .gc__plat, .gc__save, .gc__radar, .gc__go");if(l&&l!==a)return;t.preventDefault(),t.stopPropagation();let n=r.closest("a[href], button")??null;F(a,0===t.detail,n)};return document.addEventListener("click",t,!0),()=>document.removeEventListener("click",t,!0)},[F]),(0,l.useEffect)(()=>()=>{z.current.src?.classList.remove("is-morph-src")},[]),(0,l.useLayoutEffect)(()=>{let e=_.current;if(!e)return;let t=t=>{let r=e.querySelector(`[data-i="${v}"]`),a=e.querySelector(".pdp3-ladder__bar");r&&a&&(t&&(a.style.transition="none"),e.style.setProperty("--row-y",`${r.offsetTop}px`),e.style.setProperty("--row-h",`${r.offsetHeight}px`),t&&(a.offsetWidth,a.style.transition=""))};t(!z.current.barraPosata||$),z.current.barraPosata=!0;let r=new ResizeObserver(()=>t(!0));return r.observe(e),()=>r.disconnect()},[v,x,$]);let K=x?.righe[v],U=x?.righe[j],V=K?p[K.guscio]??K.label.toUpperCase():"";(0,l.useEffect)(()=>{let e=s.current,t=z.current.ghostPrima;if(z.current.ghostPrima=V,!e||!t||t===V||$||matchMedia("(prefers-reduced-motion: reduce)").matches||!e.animate)return;let r=getComputedStyle(e).opacity;e.animate([{opacity:0,transform:"translateY(14px)"},{opacity:r,transform:"none"}],{duration:240,easing:"cubic-bezier(0.23, 1, 0.32, 1)"})},[V,$]);let W=x?.righe.filter(e=>null!==e.valore)??[],Y=W.length>=2,D=Y?Math.min(...W.map(e=>e.valore)):null,H=(0,d.YO)(K?.guscio??"pc"),X=U?[m(U.kind),U.label?`per ${U.label}`:""].filter(Boolean).join(", "):"";return(0,a.jsx)("dialog",{ref:e,className:"pdp3-morph","aria-labelledby":"pdp3-morph-title",onCancel:e=>{e.preventDefault(),O(!0)},onClick:e=>{e.target===e.currentTarget&&O(!1)},children:(0,a.jsxs)("div",{ref:t,className:`pdp3-morph__panel${P?" is-live":""}${$?" is-instant":""}`,"data-kind":"game","data-fam":H.famiglia,"data-tono":L?.scuro?"scuro":"chiaro",style:L?.stile,children:[(0,a.jsx)("button",{ref:b,type:"button",className:"pdp3-morph__close","aria-label":"Chiudi",onClick:e=>O(0===e.detail),children:(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M18 6 6 18"}),(0,a.jsx)("path",{d:"m6 6 12 12"})]})}),(0,a.jsxs)("div",{className:"pdp3-morph__media",onPointerMove:e=>{if(!P||matchMedia("(prefers-reduced-motion: reduce)").matches||!matchMedia("(hover: hover) and (pointer: fine)").matches)return;let t=r.current?.querySelector(".rynko-case");if(!t)return;let a=e.currentTarget.getBoundingClientRect(),s=((e.clientX-a.left)/a.width-.5)*9,o=((e.clientY-a.top)/a.height-.5)*9;t.style.transform=`translate3d(${s.toFixed(2)}px, ${o.toFixed(2)}
1px, 0)`},onPointerLeave:B,children:[(0,a.jsxs)("div",{className:"pdp3-morph__stage","aria-hidden":"true",children:[(0,a.jsx)("b",{ref:s,className:"pdp3-morph__ghost",style:{"--n":String(Math.max(V.length,2))},children:V}),(0,a.jsxs)("svg",{className:"pdp3-morph__blob",viewBox:"0 0 1000 600",preserveAspectRatio:"none",focusable:"false",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"pdp3-blob-g",x1:"0.15",y1:"0",x2:"0.85",y2:"1",children:[(0,a.jsx)("stop",{offset:"0",className:"pdp3-morph__stop-hi"}),(0,a.jsx)("stop",{offset:"0.55",className:"pdp3-morph__stop-mid"}),(0,a.jsx)("stop",{offset:"1",className:"pdp3-morph__stop-lo"})]})}),(0,a.jsx)("path",{className:"pdp3-morph__blob-glow",d:u.pc}),Object.entries(u).map(([e,t])=>(0,a.jsx)("path",{className:`pdp3-morph__sagoma pdp3-morph__sagoma--${e}`,fill:"url(#pdp3-blob-g)",d:t},e))]})]}),(0,a.jsx)("div",{ref:r,className:`pdp3-morph__case${"out"===T?" is-out":""}${"in"===T?" is-in":""}`,children:x&&(0,a.jsx)(i.default,{title:x.titolo,coverUrl:x.cover,platform:w,size:"hero"})})]}),(0,a.jsxs)("div",{className:"pdp3-morph__body",children:[(0,a.jsxs)("div",{className:"pdp3-morph__head",children:[x?.tag&&(0,a.jsx)("p",{className:"pdp3-morph__kind",children:x.tag}),(0,a.jsx)("h2",{className:"pdp3-morph__title",id:"pdp3-morph-title",children:x?.titolo})]}),U&&U.now&&(0,a.jsxs)("div",{className:`pdp3-morph__deal${k?" is-updating":""}`,children:[(0,a.jsxs)("p",{className:"pdp3-morph__price",children:[(0,a.jsx)("span",{className:"pdp3-morph__now",children:U.now}),U.was&&U.was!==U.now&&(0,a.jsx)("span",{className:"pdp3-morph__was",children:U.was}),U.off&&(0,a.jsx)("span",{className:"pdp3-morph__off",children:U.off})]}),(0,a.jsxs)("p",{className:"pdp3-morph__seller",children:[U.store&&(0,a.jsx)("span",{className:"pdp3-morph__store",children:U.store}),X&&(0,a.jsx)("span",{className:"pdp3-morph__seller-kind",children:X})]})]}),x&&Y&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"pdp3-ladder__cap",children:"Stesso gioco, prezzo diverso per piattaforma."}),(0,a.jsxs)("ol",{ref:_,className:"pdp3-ladder","aria-label":"Prezzo per piattaforma",style:{"--brand":H.accento},children:[(0,a.jsx)("span",{className:"pdp3-ladder__bar","aria-hidden":"true"}),x.righe.map((e,t)=>null===e.valore?null:(0,a.jsx)("li",{className:"pdp3-ladder__row","data-i":t,children:(0,a.jsxs)("button",{type:"button",className:"pdp3-ladder__btn","aria-pressed":t===v,onClick:e=>((e,t)=>{let r=z.current;if(!x||e===v)return;let a=x.righe[e],s=t||matchMedia("(prefers-reduced-motion: reduce)").matches;t&&!$&&(M(!0),requestAnimationFrame(()=>requestAnimationFrame(()=>M(!1)))),C(e),clearTimeout(r.dealTimer),s?(S(!1),N(e)):(S(!0),r.dealTimer=setTimeout(()=>{N(e),S(!1)},150));let o=++r.gen;if(a.guscio!==r.guscio){if(r.guscio=a.guscio,s){q(null),A(a.guscio);return}q("out"),setTimeout(()=>{o===r.gen&&(A(a.guscio),requestAnimationFrame(()=>{o===r.gen&&q("in")}))},160)}})(t,0===e.detail),children:[(0,a.jsx)("span",{className:"pdp3-ladder__plat",children:(0,a.jsx)("img",{src:(0,d.YO)(e.guscio).logo,alt:e.label})}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"pdp3-ladder__store",children:e.store}),(0,a.jsx)("span",{className:"pdp3-ladder__sub",children:m(e.kind)})]}),(0,a.jsxs)("span",{className:"pdp3-ladder__price",children:[e.now,e.valore===D&&(0,a.jsx)("span",{className:"pdp3-ladder__low",children:"Il pi\xf9 basso"})]})]})},`${e.guscio}-${t}`))]})]}),x&&!Y&&x.righe.length>0&&(0,a.jsx)("div",{className:"pdp3-ladder pdp3-ladder--logos",children:x.righe.map((e,t)=>(0,a.jsx)("span",{className:"pdp3-ladder__plat",children:(0,a.jsx)("img",{src:(0,d.YO)(e.guscio).logo,alt:e.label})},`${e.guscio}-${t}`))}),x?.spark&&(0,a.jsxs)("figure",{className:"pdp3-morph__trend",children:[(0,a.jsxs)("svg",{viewBox:"0 0 120 40",preserveAspectRatio:"none","aria-hidden":"true",children:[(0,a.jsx)("path",{className:"gc__spark-fill",d:x.spark.area}),(0,a.jsx)("path",{d:x.spark.linea})]}),(0,a.jsxs)("figcaption",{children:["Andamento recente del prezzo",K?` su ${K.label}`:"","."]})]}),(0,a.jsxs)("div",{className:"pdp3-morph__actions",children:[x?.href&&"#"!==x.href&&(0,a.jsx)(o(),{className:"pdp3-morph__cta",href:x.href,children:"Apri la scheda"}),x?.campanella&&(0,a.jsxs)("button",{type:"button",className:"pdp3-morph__alert",onClick:()=>{let e=z.current.src;O(!0),e?.querySelector(".gc__radar button, .gc__bell")?.click()},children:[(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M10.268 21a2 2 0 0 0 3.464 0"}),(0,a.jsx)("path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"})]}),"Avvisami",(0,a.jsx)("span",{className:"pdp3-morph__alert-more",children:"quando scende"})]})]})]})]})})}},80793:()=>{}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.