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]=`da85b4ac-d776-49db-a640-bc1c9069907e`,e._sentryDebugIdIdentifier=`sentry-dbid-da85b4ac-d776-49db-a640-bc1c9069907e`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{$d as t,Ag as n,Dg as r,Fg as i,Ig as a,Ym as o,dn as s,eh as c,hn as l,lh as u,mr as d,pn as f,sh as p,st as m,th as h}from"./entry.client-dr7r6s9a.js";import{t as g}from"./XenonSpinner-hionx0on.js";var _=e(a(),1),v=i(),y=n(),b=e=>`/migration/clear?${new URLSearchParams({returnUrl:e}).toString()}`,x=s(e=>{let t=(0,v.c)(7),{returnURL:n}=e,{locReturn:r}=c(),i;t[0]===n?i=t[1]:(i=b(n),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r(),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,y.jsx)(l,{as:`a`,size:`large`,className:`flex min-w-component-action-text-standard-min-width flex-1 content-center items-center gap-8 px-internal-container-padding-regular py-component-action-text-standard-container-padding-top-and-bottom`,kind:`brand`,href:i,children:a}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o},()=>{let{systems:{insiderPreviewGate:e}}=h(),{data:t}=r(e.queries.returnURL.getOptions());return{returnURL:t??`https://www.xbox.com/play`}}),S=()=>{let e=(0,v.c)(2),t=x.useComponent(),n;return e[0]===t?n=e[1]:(n=(0,y.jsx)(t,{}),e[0]=t,e[1]=n),n},C=s(e=>{let t=(0,v.c)(15),{isAllowed:n,isPending:r,isEnabled:i}=e,{t:a}=u(`PreviewWelcomeDialog`),o;t[0]===a?o=t[1]:(o=()=>a(`You're early`,{shortKey:`non_insider_title`}),t[0]=a,t[1]=o);let s=o,c;t[2]===a?c=t[3]:(c=()=>a(`The new experience isn't available for you just yet.  Let's get you back to familiar ground`,{shortKey:`non_insider_body`}),t[2]=a,t[3]=c);let l=c;if(r||!i||n){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsx)(`div`,{className:`h-screen w-screen`,children:(0,y.jsx)(g,{className:`h-1/2 w-1/2`})}),t[4]=e):e=t[4],e}let d;t[5]===s?d=t[6]:(d=s(),t[5]=s,t[6]=d);let p;t[7]===l?p=t[8]:(p=l(),t[7]=l,t[8]=p);let m;t[9]!==d||t[10]!==p?(m=(0,y.jsx)(f,{title:d,illustration:`errorAccess`,subtitle:p}),t[9]=d,t[10]=p,t[11]=m):m=t[11];let h;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,y.jsx)(S,{}),t[12]=h):h=t[12];let _;return t[13]===m?_=t[14]:(_=(0,y.jsx)(`div`,{className:`flex h-screen w-screen items-center justify-center`,children:(0,y.jsxs)(`div`,{className:`gap-layout-vertical-gutter flex flex-col items-center`,children:[m,h]})}),t[13]=m,t[14]=_),_},()=>{let{insiderPreviewGate:e}=p(),n=m(),{data:i,isPending:a}=r(e.queries.isPreviewGateEnabled.getOptions()),{data:o,isPending:s}=r(e.queries.isPreviewAccessAllowed.getOptions()),c=a||s,l=o??!1,u=i??!0;return(0,_.useEffect)(()=>{!c&&(l||!u)&&n(t.home.$path())},[c,l,u,n]),{isAllowed:l,isPending:c,isEnabled:u}}),w=o(d(()=>(0,y.jsx)(C.useComponent(),{}),`InsiderPreviewGatePage`));export{w as default};