try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`4dc541f2-e3db-4c35-a687-932160e8a9d3`,e._sentryDebugIdIdentifier=`sentry-dbid-4dc541f2-e3db-4c35-a687-932160e8a9d3`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{$d as t,Ag as n,Fg as r,Ig as i,ch as a,dn as o,sh as s,th as c,wg as l}from"./entry.client-dr7r6s9a.js";import{t as u}from"./stream-gate-hooks-fa9kj8pw.js";import{t as d}from"./GameTile-kxn1jxuq.js";var f=r(),p=e(i(),1),m=n(),h=(0,p.createContext)({}),g=e=>{let t=(0,f.c)(5),{children:n,productId:r}=e,i=u(r,`RecentsTile`),a;t[0]===i?a=t[1]:(a={launchStream:i},t[0]=i,t[1]=a);let o=a,s;return t[2]!==o||t[3]!==n?(s=(0,m.jsx)(h.Provider,{value:o,children:n}),t[2]=o,t[3]=n,t[4]=s):s=t[4],s},_=e=>{let t=(0,f.c)(13),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({productId:r,onPress:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=d.useComponent(),{launchStream:o}=(0,p.useContext)(h),s;t[4]!==o||t[5]!==n||t[6]!==r?(s=o?()=>n(r,o):void 0,t[4]=o,t[5]=n,t[6]=r,t[7]=s):s=t[7];let c=s,l;return t[8]!==a||t[9]!==c||t[10]!==r||t[11]!==i?(l=(0,m.jsx)(a,{onPress:c,productId:r,...i}),t[8]=a,t[9]=c,t[10]=r,t[11]=i,t[12]=l):l=t[12],l},v=o(e=>{let t=(0,f.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({onPress:n,launchContainer:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]!==n||t[5]!==r?(a=(0,m.jsx)(_,{onPress:n,...r}),t[4]=n,t[5]=r,t[6]=a):a=t[6];let o=a;if(i){let e;return t[7]!==i||t[8]!==o?(e=(0,p.cloneElement)(i,{},o),t[7]=i,t[8]=o,t[9]=e):e=t[9],e}return o},({...e})=>{let t=e.productId,n=t?(0,m.jsx)(g,{productId:t}):null;return{...e,productId:t,launchContainer:n}}),y=e=>{let t=(0,f.c)(5),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r=v.useComponent(),i;return t[2]!==r||t[3]!==n?(i=(0,m.jsx)(r,{...n}),t[2]=r,t[3]=n,t[4]=i):i=t[4],i},b=()=>{let e=(0,f.c)(11),n=c(),r;e[0]===n?r=e[1]:(r=n.getLogger(`RecentsList`),e[0]=n,e[1]=r);let i=r,{dialog:o}=s(),{trackUserAction:u}=a(),d;e[2]===o.mutations.goBack?d=e[3]:(d=o.mutations.goBack.getOptions(),e[2]=o.mutations.goBack,e[3]=d);let{mutateAsync:p}=l(d),m;e[4]!==p||e[5]!==u||e[6]!==o.keys.guide.fullPath||e[7]!==i?(m=(e,n)=>{p().then(()=>{u(`CloseModal`,{modalType:o.keys.guide.fullPath,dismissMethod:`sideEffect`},`Press`);let r=t.stream.byProductId.$buildPath({params:{productId:e}});n(),u(`NavigateInApp`,{source:location.pathname,destination:r},`Press`)}).catch(e=>{i.error(`Failed to go back from GuideDialog`,{error:e})})},e[4]=p,e[5]=u,e[6]=o.keys.guide.fullPath,e[7]=i,e[8]=m):m=e[8];let h=m,g;return e[9]===h?g=e[10]:(g={handlePress:h},e[9]=h,e[10]=g),g};export{y as n,b as t};