const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/KeepPlayingUpsellPage-gkf5g2ph.js","assets/rolldown-runtime-eb2nym32.js","assets/entry.client-dr7r6s9a.js","assets/TrialsEndedDialog.types-n8gsn59q.js","assets/useAutoFocusOnNavigation-gd2bn98v.js","assets/useLocation-fu2554ly.js","assets/routes-ewiustbc.js","assets/PostStreamUpsell-bhkh2447.js","assets/DialogShell-k2jpaw9r.js","assets/gamepad-nav-virtual-cvbizm2x.js","assets/xds-react-components-lks62tbl.js","assets/workspace-leaf-files-mc5sghv7.js","assets/xds-icons-d7khcnpi.js","assets/AcceleratorCanvas-11vakef6.js","assets/stream-gate-hooks-fa9kj8pw.js","assets/useCommonAccelerator-gnlmbc7n.js","assets/useAButtonHandler-ftqyzpyw.js","assets/useYButtonHandler-fu1lospy.js","assets/navigation-stack-m5o0zkpw.js","assets/responsive-toolkit-nc72eouk.js","assets/UpsellBackgroundImage-l50isgz6.js","assets/usePlanPickerProps-kd3toy2t.js","assets/determineUpsells-kizqoxq1.js","assets/UpgradeAccountUpsellPage-d15odcp6.js","assets/auth-hooks-karaxdb8.js"])))=>i.map(i=>d[i]);
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]=`854aa121-a77e-418f-9a0e-ea6e326900c5`,e._sentryDebugIdIdentifier=`sentry-dbid-854aa121-a77e-418f-9a0e-ea6e326900c5`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Fg as n,Gp as r,Ig as i,Jh as a,Jl as o,U as s,Up as c,ch as l,dr as u,er as d,or as f,rr as p,sh as m,wg as h,wr as g,zp as _}from"./entry.client-dr7r6s9a.js";import{n as v}from"./DialogShell-k2jpaw9r.js";import{t as y}from"./routes-ewiustbc.js";import{t as b}from"./TrialsEndedDialog.types-n8gsn59q.js";var x=e(i(),1),S=n(),C=e(f(),1),w=!1;function T(){if(w)return;w=!0;let e=_.dialog.trialsEnded;e.keepPlaying.update({component:g(()=>a(()=>import(`./KeepPlayingUpsellPage-gkf5g2ph.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),`KeepPlayingUpsellPage`)}),e.upgradeAccount.update({component:g(()=>a(()=>import(`./UpgradeAccountUpsellPage-d15odcp6.js`),__vite__mapDeps([23,1,2,8,9,10,11,12,13,14,15,16,17,18,19,3,4,5,20,24])),`UpgradeAccountUpsellPage`)})}var E=t(),D=()=>{let e=(0,S.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,E.jsx)(c,{}),e[0]=t):t=e[0],t};T();var O=(0,C.default)(`bg-container-backgrounds-elevation-background-level-2`),k=s(O,`w-component-upsell-modal-modal-width-hd`,`modal-generic`,`modal-floating`),A=s(O,`h-full`,`w-full`),j=e=>{let t=(0,S.c)(33),{productId:n,initialPage:i,onClose:a}=e,{dialog:s}=m(),{trackUserAction:c}=l(),f;t[0]===s.mutations.goBack?f=t[1]:(f=s.mutations.goBack.getOptions(),t[0]=s.mutations.goBack,t[1]=f);let{mutate:g}=h(f),_=r(),C=i===`upgradeAccount`?y.upgradeAccount:y.keepPlaying,w=s.keys.trialsEnded.fullPath,T,O;t[2]!==_||t[3]!==C||t[4]!==n||t[5]!==i?(T=()=>{_({to:C,replace:!0,search:{productId:n,initialPage:i}})},O=[_,C,n,i],t[2]=_,t[3]=C,t[4]=n,t[5]=i,t[6]=T,t[7]=O):(T=t[6],O=t[7]),(0,x.useEffect)(T,O);let j;t[8]!==c||t[9]!==n||t[10]!==w||t[11]!==g||t[12]!==a?(j=e=>{c(`TrialsEndedDialogCompleted`,{completionReason:e,productId:n},`Press`,{location:`TrialsEndedDialog`}),c(`CloseModal`,{modalType:w,dismissMethod:`sideEffect`},`Press`,{location:`TrialsEndedDialog`}),g(),a?.(e)},t[8]=c,t[9]=n,t[10]=w,t[11]=g,t[12]=a,t[13]=j):j=t[13];let M=j,N;t[14]!==c||t[15]!==n||t[16]!==a?(N=()=>{c(`TrialsEndedDialogCompleted`,{completionReason:o.Dismissed,productId:n},`Press`,{location:`TrialsEndedDialog`}),a?.(o.Dismissed)},t[14]=c,t[15]=n,t[16]=a,t[17]=N):N=t[17];let P=N,F,I;t[18]!==M||t[19]!==n||t[20]!==i?(I={complete:M,productId:n,initialPage:i},t[18]=M,t[19]=n,t[20]=i,t[21]=I):I=t[21],F=I;let L=F,R=v.useComponent(),z=u()===`high`,B=z?k:A,V,H;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(V={opacity:0,transform:`scale(0.75)`},H={opacity:1,transform:`scale(1)`},t[22]=V,t[23]=H):(V=t[22],H=t[23]);let U;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,E.jsx)(p,{initial:V,animate:H,transition:d,className:`h-full w-full bg-container-backgrounds-elevation-background-level-2`,children:(0,E.jsx)(D,{})}),t[24]=U):U=t[24];let W;t[25]!==R||t[26]!==B||t[27]!==z||t[28]!==P?(W=(0,E.jsx)(R,{className:B,dismissable:!0,dimBackground:!0,autoHeight:z,onWillClose:P,children:U}),t[25]=R,t[26]=B,t[27]=z,t[28]=P,t[29]=W):W=t[29];let G;return t[30]!==L||t[31]!==W?(G=(0,E.jsx)(b.Provider,{value:L,children:W}),t[30]=L,t[31]=W,t[32]=G):G=t[32],G};export{j as TrialsEndedDialog,j as default};