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]=`d958a46d-4620-444d-86e5-aa247b556311`,e._sentryDebugIdIdentifier=`sentry-dbid-d958a46d-4620-444d-86e5-aa247b556311`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{T as t}from"./vendor-misc-dys7qi6h.js";import{$m as n,Ag as r,Cr as i,Gu as a,L as o,Lm as s,Ms as c,Oi as l,Qm as u,Y as d,Zm as f,_r as p,bh as m,gg as h,jg as g,ng as _,sn as v,xr as y}from"./entry.client-mpghtlrl.js";import{t as b}from"./auth-hooks-dkb6uyrd.js";import{n as x,o as S}from"./accelerators-mediz1dj.js";import{t as C}from"./useSettledRoutePrefetch-h1qjph6s.js";var w=r(),T=e(g(),1),E=_(),D=()=>{},O={entries:[],defaultEntry:{size:{width:354,height:354},imageType:`jpg`}},k=p(l(({titleText:e,signInText:t,gamertag:n,gamertagSuffix:r,gamerpic:a,gamerpicPrefetchHandlers:s,onGamerpicPress:c,onSignIn:l})=>((0,T.useEffect)(()=>{m.setInputMode(`gamepad`)},[]),(0,E.jsx)(`div`,{className:`flex h-screen w-full flex-col items-center justify-center color-scheme-dark:bg-black color-scheme-light:bg-white`,style:{backgroundImage:`var(--V2VJ),
                        radial-gradient(67.86% 51.98% at 48.02% 0%, rgba(86, 106, 87, 0.70) 0%, rgba(61, 115, 64, 0.00) 100%),
                        radial-gradient(59.9% 48.52% at 50% 48.52%, rgba(89, 139, 113, 0.30) 0%, rgba(0, 0, 0, 0.00) 100%)`},children:(0,E.jsxs)(`div`,{className:`flex flex-col items-center gap-layout-vertical-related-content-in-a-section-loose`,children:[(0,E.jsx)(`h1`,{className:`text-center text-noninteractive-content-primary-content type-display1`,children:e}),(0,E.jsx)(i,{as:`button`,onFocusChange:e=>{e?s.startPrefetchTimer():s.stopPrefetchTimer()},onPressStart:s.prefetch,onPress:c,focusRadius:`pill`,"aria-label":n,className:`relative aspect-square size-[354px]`,"data-auto-focus":!0,"data-testid":`account-picker-gamerpic-cta`,children:(0,E.jsx)(d,{gamerpicImageComponent:(0,E.jsx)(o,{gamerpicImageConstraints:O,gamerpicUrl:a,isGroupImage:!1,alt:n,trackPageRender:!0}),imageAlt:n})}),(0,E.jsxs)(`p`,{className:`text-center`,children:[(0,E.jsx)(`span`,{className:`text-noninteractive-content-primary-content type-display1`,children:n}),r?(0,E.jsx)(`span`,{className:`text-noninteractive-content-secondary-content type-display1`,children:r}):null]}),(0,E.jsx)(y,{as:`button`,onPress:l,"data-testid":`account-picker-sign-in-cta`,children:t})]})})),`AccountPickerPage`),()=>{let{t:e}=n(`AccountPickerPage`),r=e(`Let's jump in`,{shortKey:`account_picker_title`}),i=e(`Not you? Sign in`,{shortKey:`account_picker_sign_in`});S({trigger:{type:`gamepad`,button:`a`},sound:`invoke`,label:e(`Select`,{shortKey:`account_picker_select`}),action:D});let[o]=t(a.accountPicker),s=c(o.redirectUri,a.home.$path()),l=v(),d=C(s),p=()=>{l(s,{replace:!0})},{signOut:m}=b({returnUrl:a.auth.deviceCode.$buildPath({searchParams:{returnUrl:s}})}),{trackUserAction:g}=u(),_=()=>{g(`SignOut`,{source:`AccountPicker`},`Press`),m()},{profile:y}=f(),{data:x}=h(y.queries.person.getActiveUserQuery().getOptions());return{titleText:r,signInText:i,gamertag:x?.gamertag.base??``,gamertagSuffix:x?.gamertag.suffix?`#${x.gamertag.suffix}`:void 0,gamerpic:x?.gamerpicUrl,gamerpicPrefetchHandlers:d,onGamerpicPress:p,onSignIn:_}}),A=s(()=>{let e=(0,w.c)(7),t=k.useComponent(),n=x.useComponent(),r;e[0]===t?r=e[1]:(r=(0,E.jsx)(t,{}),e[0]=t,e[1]=r);let i;e[2]===n?i=e[3]:(i=(0,E.jsx)(`div`,{className:`z-shell-bottom pointer-events-none fixed inset-0 flex flex-col justify-end`,children:(0,E.jsx)(n,{})}),e[2]=n,e[3]=i);let a;return e[4]!==r||e[5]!==i?(a=(0,E.jsxs)(E.Fragment,{children:[r,i]}),e[4]=r,e[5]=i,e[6]=a):a=e[6],a});export{A as default};