1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="789c7f1c-9bcd-5a59-ef92-83254ac14ba1")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,562675,e=>{"use strict";let t=(0,e.i(456420).default)("hammer",[["path",{d:"m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9",key:"1hayfq"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"15ts47"}]]);e.s(["default",0,t])},290135,e=>{"use strict";let t=(0,e.i(456420).default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);e.s(["default",0,t])},16239,e=>{"use strict";let t=(0,e.i(456420).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["default",0,t])},866447,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"catchError",{enumerable:!0,get:function(){return h}});let i=e.r(190809),n=e.r(843476),s=i._(e.r(271645)),a=e.r(590373),o=e.r(265713);e.r(178377);let l=e.r(912354),c=e.r(82604),u=e.r(8372),d=e.r(65856),f="u">typeof window&&(0,c.isBot)(window.navigator.userAgent);class m extends s.default.Component{static #e=this.contextType=u.AppRouterContext;static #t=this.displayName="catchError(Next.CatchError)";constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.retry=()=>{if(this.props.isPagesRouter)throw Object.defineProperty(Error("`retry()` can only be used in the App Router. Use `reset()` in the Pages Router."),"__NEXT_ERROR_CODE",{value:"E1360",enumerable:!1,configurable:!0});(0,s.startTransition)(()=>{this.context?.refresh(),this.reset()})},this.state={error:null,previousPathname:this.props.pathname}}static getDerivedStateFromError(e){if((0,o.isNextRouterError)(e))throw e;return{error:{thrownValue:e}}}static getDerivedStateFromProps(e,t){let{error:r}=t;return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){if(this.state.error&&!f){let e=this.state.error.thrownValue;return(0,l.handleISRError)({error:e}),(0,n.jsx)(this.props.fallback,{props:this.props.props,errorInfo:{error:e,reset:this.reset,retry:this.retry}})}return this.props.children}}function h(e){let t=t=>{let{props:r,errorInfo:i}=t;return e(r,i)};return t.displayName=e.name||"CatchErrorFallback",e=>{let{children:r,...i}=e,o=(0,a.useUntrackedPathname)(),l=null!==(0,s.useContext)(d.RouterContext);return(0,n.jsx)(m,{pathname:o,isPagesRouter:l,fallback:t,props:i,children:r})}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},378438,(e,t,r)=>{t.exports=e.r(650691),Object.defineProperty(t.exports,"catchError",{enumerable:!0,get:()=>e.r(866447).catchError})},722973,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={NEXT_REQUEST_META:function(){return s},addRequestMeta:function(){return l},getRequestMeta:function(){return a},removeRequestMeta:function(){return c},setRequestMeta:function(){return o}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let s=Symbol.for("NextInternalRequestMeta");
2function a(e,t){let r=e[s]||{};return"string"==typeof t?r[t]:r}function o(e,t){return e[s]=t,t}function l(e,t,r){let i=a(e);return i[t]=r,o(e,i)}function c(e,t){let r=a(e);return delete r[t],o(e,r)}},650691,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return h}});let i=e.r(555682),n=e.r(843476),s=i._(e.r(271645)),a=i._(e.r(325633)),o={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function l(t){let r,{req:i,res:n,err:s}=t,a=n&&n.statusCode?n.statusCode:s?s.statusCode:404;if("u">typeof window)r=window.location.hostname;else if(i){let{getRequestMeta:t}=e.r(722973),n=t(i,"initURL");n&&(r=new URL(n).hostname)}return{statusCode:a,hostname:r}}let c={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},u={lineHeight:"48px"},d={display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},f={fontSize:14,fontWeight:400,lineHeight:"28px"},m={display:"inline-block"};class h extends s.default.Component{static #e=this.displayName="ErrorPage";static #t=this.getInitialProps=l;static #r=this.origGetInitialProps=l;render(){let{statusCode:e,withDarkMode:t=!0}=this.props,r=this.props.title||o[e]||"An unexpected error has occurred";return(0,n.jsxs)("div",{style:c,children:[(0,n.jsx)(a.default,{children:(0,n.jsx)("title",{children:e?`${e}: ${r}`:"Application error: a client-side exception has occurred"})}),(0,n.jsxs)("div",{style:u,children:[(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:`body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}${t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":""}`}}),e?(0,n.jsx)("h1",{className:"next-error-h1",style:d,children:e}):null,(0,n.jsx)("div",{style:m,children:(0,n.jsxs)("h2",{style:f,children:[this.props.title||e?r:(0,n.jsxs)(n.Fragment,{children:["Application error: a client-side exception has occurred"," ",!!this.props.hostname&&(0,n.jsxs)(n.Fragment,{children:["while loading ",this.props.hostname]})," ","(see the browser console for more information)"]}),"."]})})]})]})}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},360377,e=>{"use strict";var t=e.i(843476),r=e.i(500932),i=e.i(378438),n=e.i(271645);function s(e){let t,i,s=(0,r.c)(3),{error:a}=e;return s[0]!==a?(t=()=>{console.error(a)},i=[a],s[0]=a,s[1]=t,s[2]=i):(t=s[1],i=s[2]),(0,n.useEffect)(t,i),null}let a=(0,i.catchError)((e,r)=>{let{error:i}=r;return(0,t.jsx)(s,{error:i})});e.s(["default",0,a])},805008,e=>{"use strict";var t=e.i(500932),r=e.i(271645),i=e.i(434390);e.i(793411);var n=e.i(622723);function s(){window.scrollTo(0,0),window.scroll(0,0)}function a(e){e.preventDefault()}function o(e){let t=e.target;for(;t&&t!==document.body;){let{overflow:e,overflowY:r}=window.getComputedStyle(t);if("auto"===e||"scroll"===e||"auto"===r||"scroll"===r)return;t=t.parentElement}e.preventDefault()}e.s(["default",0,function(e){let l,c,u,d=(0,t.c)(5),{lockScroll:f}=e,m=void 0===f||f;(0,i.useDocumentScrollLock)(m),d[0]!==m?(l=()=>{let e=document.body.style.overflow,t=document.body.style.overscrollBehavior,r=document.documentElement.style.overscrollBehavior;m&&(document.body.style.overflow="hidden"),document.body.style.overscrollBehavior="none",document.documentElement.style.overscrollBehavior="none",document.addEventListener("gesturechange",a),document.addEventListener("gesturestart",a),m&&document.addEventListener("touchmove",o,{passive:!1});let i=document.createElement("style");return i.innerHTML="\n input[type=text], input[type=password], input[type=email], input[type=number], input[type=time], input[type=date], textarea {\n -webkit-touch-callout: auto;\n -webkit-user-select: auto;\n }\n * {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n }\n ",document.head.appendChild(i),()=>{m&&(document.body.style.overflow=e),document.body.style.overscrollBehavior=t,document.documentElement.style.overscrollBehavior=r,m&&document.removeEventListener("touchmove",o),document.removeEventListener("gesturechange",a),document.removeEventListener("gesturestart",a),document.head.removeChild(i)}},c=[m],d[0]=m,d[1]=l,d[2]=c):(l=d[1],c=d[2]),(0,r.useEffect)(l,c);let h=(0,n.usePathname)();return d[3]!==h?(u=[h],d[3]=h,d[4]=u):u=d[4],(0,r.useEffect)(s,u),null}])},706115,e=>{"use strict";var t=e.i(500932),r=e.i(271645);e.i(793411);var i=e.i(622723);function n(){let e=document.getElementById("mobile-header");if(!e)return;let t=s,r=t(),i=0,n=0,a=()=>{e.style.opacity="1"},o=()=>{e.style.opacity="0"},l=()=>{let e=t(),s=e-r;if(r=e,!(1>Math.abs(s))){if(e<=12){n=0,i&&cancelAnimationFrame(i),i=requestAnimationFrame(a);return}if(s>0){n=0,i&&cancelAnimationFrame(i),i=requestAnimationFrame(o);return}(n+=-s)>=50&&(n=0,i&&cancelAnimationFrame(i),i=requestAnimationFrame(a))}};return a(),window.addEventListener("scroll",l,{passive:!0}),()=>{window.removeEventListener("scroll",l),i&&cancelAnimationFrame(i),e.style.opacity="1"}}function s(){return window.scrollY||document.scrollingElement?.scrollTop||document.documentElement.scrollTop||0}e.s(["default",0,function(){let e,s=(0,t.c)(2),a=(0,i.usePathname)();return s[0]!==a?(e=[a],s[0]=a,s[1]=e):e=s[1],(0,r.useEffect)(n,e),null}])},536696,e=>{"use strict";var t=e.i(843476),r=e.i(500932),i=e.i(948148),n=e.i(271645);e.i(793411);var s=e.i(622723),a=e.i(527847);e.s(["default",0,function(e){let o,l,c,u,d,f,m,h,p,b,g=(0,r.c)(29),{standaloneGameId:v}=e,y=(0,s.usePathname)(),x=(0,a.useRouter)(),w=(0,i.useTranslations)("MobileHeader"),j=(0,i.useTranslations)("Navigation"),_=(0,i.useTranslations)("Common"),[N,E]=(0,n.use
2State)(!1);g[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{let e=()=>{E(window.history.length>1)};return e(),window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},g[0]=o):o=g[0],g[1]!==y?(l=[y],g[1]=y,g[2]=l):l=g[2],(0,n.useEffect)(o,l),g[3]===Symbol.for("react.memo_cache_sentinel")?(c=["/mobile/account/friends","/mobile/battlepass/quests","/mobile/battlepass/leaderboard"],g[3]=c):c=g[3];let k=c;g[4]!==y?(u=y.split("/").filter(Boolean),g[4]=y,g[5]=u):u=g[5];let S=u,I=v?`/mobile/games/${v}`:null;g[6]!==y||g[7]!==I?(d=I&&(y===I||y.startsWith(`${I}/`)&&!y.startsWith(`${I}/suggestions`)),g[6]=y,g[7]=I,g[8]=d):d=g[8];let C=!!d;g[9]!==N||g[10]!==C||g[11]!==S||g[12]!==y?(f=N&&(S.length>2&&"mobile"===S[0]||y.startsWith("/games/"))&&!k.includes(y)&&!C,g[9]=N,g[10]=C,g[11]=S,g[12]=y,g[13]=f):f=g[13];let A=f,L="allOut";y.startsWith("/mobile/create")?L="create":y.startsWith("/mobile/shop")?L="store":y.startsWith("/mobile/account/messages")?L="dms":y.startsWith("/mobile/account/transactions")?L="transactions":y.startsWith("/mobile/account/delete")?L="deleteAccount":y.startsWith("/mobile/account/friends")?L="friends":y.startsWith("/mobile/account")?L="account":y.startsWith("/mobile/avatar")?L="avatar":y.startsWith("/mobile/users")?L="profile":y.startsWith("/mobile/battlepass")?L="battlePass":("/"===y||y.startsWith("/games/")||y.startsWith("/mobile"))&&(L="games"),g[14]!==C||g[15]!==j||g[16]!==L||g[17]!==w?(m=C?j("play"):w(L),g[14]=C,g[15]=j,g[16]=L,g[17]=w,g[18]=m):m=g[18];let P=m,T=P.length>9;g[19]!==_||g[20]!==x||g[21]!==A?(h=A&&(0,t.jsx)("button",{onClick:()=>x.back(),className:"flex items-center justify-center","aria-label":_("goBack"),children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"m12 19-7-7 7-7"}),(0,t.jsx)("path",{d:"M19 12H5"})]})}),g[19]=_,g[20]=x,g[21]=A,g[22]=h):h=g[22];let R=`${T?"text-3xl":"text-2xl"} text-stroke-effect-2 font-thin`;return g[23]!==R||g[24]!==P?(p=(0,t.jsx)("p",{className:R,children:P}),g[23]=R,g[24]=P,g[25]=p):p=g[25],g[26]!==p||g[27]!==h?(b=(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[h,p]})}),g[26]=p,g[27]=h,g[28]=b):b=g[28],b}])},718646,e=>{"use strict";var t=e.i(843476),r=e.i(500932),i=e.i(562675),i=i,n=e.i(290135),n=n,s=e.i(271977),s=s,a=e.i(16239),a=a;let o=(0,e.i(456420).default)("store",[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]]);var l=e.i(672050),l=l,c=e.i(522016),u=e.i(948148),d=e.i(416610);e.i(793411);var f=e.i(527847),m=e.i(622723),h=e.i(557101);function p(e){let i,n=(0,r.c)(4),{Icon:s,isActive:a,size:o}=e,l=void 0===o?26:o,{pending:u}=(0,c.useLinkStatus)(),d=`${a?"text-yellow-400":""} ${u?"animate-pulse":""} transition-opacity duration-200`;return n[0]!==s||n[1]!==l||n[2]!==d?(i=(0,t.jsx)(s,{size:l,className:d}),n[0]=s,n[1]=l,n[2]=d,n[3]=i):i=n[3],i}function b(e){let i,n=(0,r.c)(3),{children:s}=e,{pending:a}=(0,c.useLinkStatus)(),o=`${a?"animate-pulse":""} transition-opacity duration-200`;return n[0]!==s||n[1]!==o?(i=(0,t.jsx)("div",{className:o,children:s}),n[0]=s,n[1]=o,n[2]=i):i=n[2],i}function g(e){e.stopPropagation()}e.s(["default",0,function(e){let c,v,y,x,w,j,_,N,E,k,S,I,C,A,L,P,T,R,$,q,M,W,O,F,D,z,B=(0,r.c)(84),{avatarSlot:U,cloudBuildDiscountPercent:G,messagesCountBubble:H,shopUnseenBubble:V,standaloneGameId:K,userErrorSlot:X}=e,{triggerHaptic:J}=(0,d.useHaptics)(),Q=(0,m.usePathname)(),Y=(0,u.useTranslations)("Navigation"),Z=K?`/mobile/games/${K}`:"/mobile";B[0]!==Z||B[1]!==Q||B[2]!==K?(c=K?Q===Z||Q.startsWith(`${Z}/`):"/"===Q||"/mobile"===Q||Q.startsWith("/games/")||Q.startsWith("/mobile/games/"),B[0]=Z,B[1]=Q,B[2]=K,B[3]=c):c=B[3];let ee=c,et="/mobile/shop"===Q;B[4]!==Q?(v=Q.startsWith("/mobile/account/friends"),B[4]=Q,B[5]=v):v=B[5];let er=v;B[6]!==Q?(y=Q.startsWith("/mobile/account/messages"),B[6]=Q,B[7]=y):y=B[7];let ei=y,en="/mobile/avatar"===Q;B[8]!==Q?(x=Q.startsWith("/mobile/create"),B[8]=Q,B[9]=x):x=B[9];let es=x,ea="/mobile/account"===Q;B[10]!==G||B[11]!==Y?(w=null===G?null:Y("cloudBuildDiscount",{discountPercent:Number.isInteger(G)?String(G):G.toFixed(2).replace(/\.?0+$/,"")}),B[10]=G,B[11]=Y,B[12]=w):w=B[12];let eo=w;if(/^\/mobile\/create\/[^/]+\/map-editor(?:\/|$)/.test(Q))return null;B[13]!==J?(j=()=>J("light"),B[13]=J,B[14]=j):j=B[14],B[15]!==es?(_=(0,t.jsx)(p,{Icon:i.default,isActive:es}),B[15]=es,B[16]=_):_=B[16];let el=`text-xs font-thin ${es?"text-yellow-400":"text-gray-500"}`;B[17]!==Y?(N=Y("create"),B[17]=Y,B[18]=N):N=B[18],B[19]!==el||B[20]!==N?(E=(0,t.jsx)("p",{className:el,children:N}),B[19]=el,B[20]=N,B[21]=E):E=B[21],B[22]!==E||B[23]!==j||B[24]!==_?(k=(0,t.jsxs)(f.Link,{prefetch:!0,href:"/mobile/create",onClick:j,className:"flex h-full w-full flex-col items-center justify-center gap-1 transition-transform duration-100 ease-out active:scale-95",children:[_,E]}),B[22]=E,B[23]=j,B[24]=_,B[25]=k):k=B[25];let ec=k;B[26]!==J?(S=()=>J("light"),B[26]=J,B[27]=S):S=B[27],B[28]!==ee?(I=(0,t.jsx)(p,{Icon:s.default,isActive:ee}),B[28]=ee,B[29]=I):I=B[29];let eu=`text-xs font-thin ${ee?"text-yellow-400":"text-gray-500"}`;B[30]!==Y||B[31]!==K?(C=Y(K?"play":"games"),B[30]=Y,B[31]=K,B[32]=C):C=B[32],B[33]!==eu||B[34]!==C?(A=(0,t.jsx)("p",{className:eu,children:C}),B[33]=eu,B[34]=C,B[35]=A):A=B[35],B[36]!==Z||B[37]!==S||B[38]!==I||B[39]!==A?(L=(0,t.jsxs)(f.Link,{prefetch:!0,href:Z,onClick:S,className:"flex flex-col items-center justify-center gap-1 w-24 h-14 transition-transform duration-100 ease-out active:scale-90",children:[I,A]}),B[36]=Z,B[37]=S,B[38]=I,B[39]=A,B[40]=L):L=B[40],B[41]!==er||B[42]!==ei||B[43]!==H||B[44]!==Y||B[45]!==K||B[46]!==J?(P=K?(0,t.jsxs)(f.Link,{prefetch:!1,href:"/mobile/account/friends",onClick:()=>J("light"),className:"relative flex flex-col items-center justify-center gap-1 w-24 h-14 transition-transform duration-100 ease-out active:scale-90",children:[(0,t.jsx)(p,{Icon:l.default,isActive:er}),(0,t.jsx)("p",{className:`text-xs font-thin ${er?"text-yellow-400":"text-gray-500"}`,children:Y("friends")})]}):(0,t.jsxs)(f.Link,{prefetch:!0,href:"/mobile/account/messages",onClick:()=>J("light"),className:"relative flex flex-col items-center justify-center gap-1 w-24 h-14 transition-transform duration-100 ease-out active:scale-90",children:[(0,t.jsx)("div",{className:"absolute left-1/2 top-0 [&>span]:!left-1 [&>span]:!right-auto [&>span]:!top-0 [&>span]:!translate-x-0 [&>span]:!-translate-y-1",children:H}),(0,t.jsx)(p,{Icon:n.default,isActive:ei}),(0,t.jsx)("p",{className:`text-xs font-thin ${ei?"text-yellow-400":"text-gray-500"}`,children:Y("messages")})]}),B[41]=er,B[42]=ei,B[43]=H,B[44]=Y,B[45]=K,B[46]=J,B[47]=P):P=B[47],B[48]!==J?(T=()=>J("light"),B[48]=J,B[49]=T):T=B[49];let ed=`absolute -bottom-[1rem] left-1/2 -translate-x-1/2 w-12 h-10 scale-x-125 scale-y-50 rounded-full ${en?"bg-white/15":"bg-white/5"}`;
2B[50]!==ed?(R=(0,t.jsx)("div",{"aria-hidden":!0,className:ed}),B[50]=ed,B[51]=R):R=B[51];let ef=`absolute -bottom-[1.2rem] left-1/2 -translate-x-1/2 w-12 h-12 scale-x-100 scale-y-[30%] rounded-full ${en?"bg-yellow-400/70":"bg-white/[3%]"}`;return B[52]!==ef?($=(0,t.jsx)("div",{"aria-hidden":!0,className:ef}),B[52]=ef,B[53]=$):$=B[53],B[54]!==U||B[55]!==R||B[56]!==$?(q=(0,t.jsxs)("div",{className:"relative mb-4 flex h-12 w-12 scale-150 items-center justify-center",children:[R,$,U]}),B[54]=U,B[55]=R,B[56]=$,B[57]=q):q=B[57],B[58]!==en||B[59]!==q?(M=(0,t.jsx)(b,{isActive:en,children:q}),B[58]=en,B[59]=q,B[60]=M):M=B[60],B[61]!==T||B[62]!==M?(W=(0,t.jsx)(f.Link,{prefetch:!0,href:"/mobile/avatar",onClick:T,className:"flex flex-col items-center justify-center rounded-2xl -mt-2 mb-1 w-32 h-14 transition-transform duration-100 ease-out active:scale-90",children:M}),B[61]=T,B[62]=M,B[63]=W):W=B[63],B[64]!==eo||B[65]!==ec||B[66]!==K?(O=!K&&(0,t.jsx)("div",{className:"flex h-14 w-24 items-center justify-center",children:null===eo?ec:(0,t.jsx)(h.default,{alwaysShow:!0,dismissKey:"dismissed_create_cloud_build_discount_tooltip_v5",text:eo,id:"create-cloud-build-discount-tooltip",children:ec})}),B[64]=eo,B[65]=ec,B[66]=K,B[67]=O):O=B[67],B[68]!==ea||B[69]!==et||B[70]!==Y||B[71]!==V||B[72]!==K||B[73]!==J?(F=K?(0,t.jsxs)(f.Link,{prefetch:!0,href:"/mobile/account",onClick:()=>J("light"),className:"flex flex-col items-center justify-center gap-1 w-24 h-14 transition-transform duration-100 ease-out active:scale-95",children:[(0,t.jsx)(p,{Icon:a.default,isActive:ea}),(0,t.jsx)("p",{className:`text-xs font-thin ${ea?"text-yellow-400":"text-gray-500"}`,children:Y("settings")})]}):(0,t.jsxs)(f.Link,{prefetch:!0,href:"/mobile/shop",onClick:()=>J("light"),className:"relative flex flex-col items-center justify-center gap-1 w-24 h-14 transition-transform duration-100 ease-out active:scale-90",children:[(0,t.jsx)("div",{className:"absolute top-0",children:V}),(0,t.jsx)(p,{Icon:o,isActive:et}),(0,t.jsx)("p",{className:`text-xs font-thin ${et?"text-yellow-400":"text-gray-500"}`,children:Y("shop")})]}),B[68]=ea,B[69]=et,B[70]=Y,B[71]=V,B[72]=K,B[73]=J,B[74]=F):F=B[74],B[75]!==L||B[76]!==P||B[77]!==W||B[78]!==O||B[79]!==F?(D=(0,t.jsxs)("div",{className:"flex justify-around items-center",children:[L,P,W,O,F]}),B[75]=L,B[76]=P,B[77]=W,B[78]=O,B[79]=F,B[80]=D):D=B[80],B[81]!==D||B[82]!==X?(z=(0,t.jsxs)("nav",{className:"fixed inset-x-0 bottom-0 z-50 bg-[rgb(7,7,10)] p-2 pb-[calc(2rem+env(safe-area-inset-bottom))] overflow-hidden border-t border-t-1 border-t-gray-700 rounded-t-xl touch-none",onTouchMove:g,children:[X,D]}),B[81]=D,B[82]=X,B[83]=z):z=B[83],z}],718646)},127524,e=>{"use strict";var t=e.i(843476),r=e.i(630299),r=r,i=e.i(770703),n=e.i(948148),s=e.i(271645),a=e.i(378537),o=e.i(627499);let l=(0,i.default)(()=>e.A(146419),{loadableGenerated:{modules:[140535]},ssr:!1});e.s(["default",0,function(i){let{initialGames:c=[],gameSearchScope:u="public",usersOnly:d=!1}=i,f=(0,n.useTranslations)("Common"),[m,h]=(0,s.useState)(!1),[p,b]=(0,s.useState)(!1),[g,v]=(0,s.useState)(c),[y,x]=(0,s.useState)(d||c.length>0),w=(0,o.useCampfireSession)(),j=(0,s.useMemo)(()=>({data:w.data,update:w.update,status:w.status}),[w.data,w.status,w.update]);return(0,s.useEffect)(()=>{let t=null;function r(){"requestIdleCallback"in window&&(t=window.requestIdleCallback(()=>{t=null,e.A(882037)}))}return"complete"===document.readyState?r():window.addEventListener("load",r,{once:!0}),()=>{window.removeEventListener("load",r),null!==t&&window.cancelIdleCallback(t)}},[]),(0,s.useEffect)(()=>{if(d){v([]),x(!0);return}if(!m||y)return;let e=!0,t=new AbortController;return(0,a.fetchGamesList)(j,u,25,t.signal).then(t=>{e&&v(t)}).catch(t=>{!e||t instanceof Error&&"AbortError"===t.name||v([])}).finally(()=>{e&&x(!0)}),()=>{e=!1,t.abort()}},[u,y,m,j,d]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>{b(!0),h(!0)},className:"flex items-center justify-center rounded-full bg-gray-800 px-2 h-[2rem]","aria-label":f("search"),title:f("search"),children:(0,t.jsx)(r.default,{size:18})}),p&&(0,t.jsx)(l,{open:m,onClose:()=>h(!1),games:d?[]:g,isMobile:!0,gameSearchScope:u,forceTab:d?"users":void 0})]})}],127524)},946643,e=>{"use strict";var t=e.i(843476),r=e.i(500932),i=e.i(526732),n=e.i(271645),s=e.i(3515),a=e.i(288223);function o(){let e,i=(0,r.c)(1);return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("span",{className:"flex h-screen justify-center items-center w-full",children:(0,t.jsx)(a.default,{})}),i[0]=e):e=i[0],e}async function l(){await (0,i.signOut)({redirect:!1}),(0,s.clearLogoutLocalData)(),window.localStorage.removeItem("hasAccount"),window.postMessage("sign-out",{}),window.location.replace("/mobile/onboard")}e.s(["default",0,function(){let e,i,s,a=(0,r.c)(3),c=(0,n.useRef)(!1);return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{c.current||(c.current=!0,l())},i=[],a[0]=e,a[1]=i):(e=a[0],i=a[1]),(0,n.useEffect)(e,i),a[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(o,{}),a[2]=s):s=a[2],s}],946643)},90312,e=>{"use strict";var t=e.i(500932),r=e.i(861745),i=e.i(271645),n=e.i(107870),s=e.i(815450),a=e.i(627499),o=e.i(595423),l=e.i(895627);e.s(["default",0,function(e){let c,u,d,f,m=(0,t.c)(16),{userId:h,username:p,fcmToken:b}=e,g=(0,a.useCampfireSession)(),{sendNativeMessage:v}=(0,l.useNativeMessage)(),y=g?.data?.bonfireTokens.access_token,x=(0,r.useLocale)(),w=g.data?.user.id===h&&!!y;return m[0]!==w||m[1]!==x||m[2]!==h?(c=()=>
2{if(!(0,o.hasNativeMobileBridge)()||!w)return;let e=new AbortController,t=setTimeout(()=>e.abort(),15e3);return(0,n.nativeNotificationRequest)(h,"/users/current/notification-locale","PUT",{locale:x},e.signal).catch(t=>{e.signal.aborted||console.warn("Notification locale synchronization failed",t)}).finally(()=>clearTimeout(t)),()=>{clearTimeout(t),e.abort()}},u=[w,x,h],m[0]=w,m[1]=x,m[2]=h,m[3]=c,m[4]=u):(c=m[3],u=m[4]),(0,i.useEffect)(c,u),m[5]!==y||m[6]!==b||m[7]!==v||m[8]!==h||m[9]!==p?(d=()=>{if((0,o.hasNativeMobileBridge)()){y&&(0,s.advanceAppInstallFunnel)(3,y);try{localStorage.setItem("hasAccount","true")}catch(e){console.error("Error setting local storage for hasAccount",e)}v("set-user-info",{userId:h,username:p,fcmToken:b,accessToken:y})}},m[5]=y,m[6]=b,m[7]=v,m[8]=h,m[9]=p,m[10]=d):d=m[10],m[11]!==y||m[12]!==b||m[13]!==h||m[14]!==p?(f=[y,b,h,p],m[11]=y,m[12]=b,m[13]=h,m[14]=p,m[15]=f):f=m[15],(0,i.useEffect)(d,f),null}])},582400,e=>{e.v({bounceGentle:"ClickMeTooltip-module__3Ca6qW__bounceGentle","cmtt-bounce-gentle":"ClickMeTooltip-module__3Ca6qW__cmtt-bounce-gentle","cmtt-fade-in":"ClickMeTooltip-module__3Ca6qW__cmtt-fade-in",fadeIn:"ClickMeTooltip-module__3Ca6qW__fadeIn"})},557101,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(174080);e.i(793411);var n=e.i(622723),s=e.i(582400);e.s(["default",0,function(e){let{text:a,unmanaged:o,alwaysShow:l,dismissKey:c,id:u,placement:d="top",className:f="inline-block",children:m}=e,h=(0,r.useRef)(null),[p,b]=(0,r.useState)({top:0,left:0}),[g,v]=(0,r.useState)(!1),[y,x]=(0,r.useState)(!0),w=(0,n.usePathname)();return(0,r.useEffect)(()=>{if(c)try{if("true"===localStorage.getItem(c))return void x(!1)}catch(e){console.error("Error checking local storage for dismissed tooltip",e)}if(l)return void x(!0);try{let e=localStorage.getItem("has_visited_battlepass_12");o&&!e&&x(!1),!o&&e&&x(!1),o||e||x(!0),o&&e&&x(!0)}catch(e){console.error("Error checking local storage for hasVisitedBattlepass",e)}},[l,c,o]),(0,r.useEffect)(()=>{if(!l&&(w.startsWith("/mobile/battlepass")||w.startsWith("/battlepass"))&&!o)try{localStorage.setItem("has_visited_battlepass_12","true"),x(!1)}catch(e){console.error("Error setting local storage for hasVisitedBattlepass",e)}},[l,w,o]),(0,r.useEffect)(()=>{let e=h.current;if(!e)throw Error("Tooltip anchor is unavailable");v(!0);let t=()=>{let t=e.getBoundingClientRect();b({top:"bottom"===d?t.bottom+8:t.top-40,left:t.left+t.width/2})};t();let r=new ResizeObserver(t);return r.observe(e),window.addEventListener("scroll",t),window.addEventListener("resize",t),()=>{r.disconnect(),window.removeEventListener("scroll",t),window.removeEventListener("resize",t)}},[d]),(0,t.jsxs)("div",{ref:h,className:`relative ${f}`,onClickCapture:()=>{if(c){try{localStorage.setItem(c,"true")}catch(e){console.error("Error setting local storage for dismissed tooltip",e)}x(!1)}},children:[(0,t.jsx)("div",{children:m}),g&&y&&(0,i.createPortal)((0,t.jsxs)("div",{id:u,style:{position:"fixed",top:`${p.top}px`,left:`${p.left}px`,transform:"translate(-50%, 0)",zIndex:60},className:`${s.default.fadeIn} ${s.default.bounceGentle} px-2 py-1 text-sm text-black bg-yellow-500/100 rounded-md whitespace-nowrap pointer-events-none 3 shadow-[0_0_15px_rgba(234,179,8,0.5)] transition-all duration-300 ease-in-out`,children:[a,(0,t.jsx)("div",{className:`absolute left-1/2 h-2 w-2 -translate-x-1/2 rotate-45 bg-yellow-500/100 animate-pulse ${"bottom"===d?"-top-1":"-bottom-1"}`})]}),document.body)]})}])},289311,e=>{"use strict";var t=e.i(843476),r=e.i(500932),i=e.i(770703),n=e.i(948148),s=e.i(271645),a=e.i(288223),o=e.i(95201),l=e.i(627499);let c=(0,i.default)(()=>e.A(694313),{loadableGenerated:{modules:[385485]},ssr:!1});e.s(["default",0,function(e){let i,u,d,f,m,h,p=(0,r.c)(19),{isMobileApp:b,hasEmail:g}=e,v=void 0===g||g,y=(0,l.useCampfireSession)(),x=(0,n.useTranslations)("Auth"),[w,j]=(0,s.useState)(!1),[_,N]=(0,s.useState)(!1);return y.data?.user.standaloneGameId?null:(p[0]!==v||p[1]!==b||p[2]!==y?(i=()=>{v?(j(!0),(0,o.default)({isMobile:b,session:y})):N(!0)},p[0]=v,p[1]=b,p[2]=y,p[3]=i):i=p[3],p[4]!==x||p[5]!==w?(u=w?(0,t.jsx)(a.default,{}):x("logout"),p[4]=x,p[5]=w,p[6]=u):u=p[6],p[7]!==w||p[8]!==u?(d=(0,t.jsx)("button",{disabled:w,className:"btn-red w-full my-4 flex justify-center items-center",children:u}),p[7]=w,p[8]=u,p[9]=d):d=p[9],p[10]!==i||p[11]!==d?(f=(0,t.jsx)("form",{className:"w-full",action:i,children:d}),p[10]=i,p[11]=d,p[12]=f):f=p[12],p[13]!==b||p[14]!==_?(m=_&&(0,t.jsx)(c,{dialogOpen:_,setDialogOpen:N,isMobileApp:b}),p[13]=b,p[14]=_,p[15]=m):m=p[15],p[16]!==f||p[17]!==m?(h=(0,t.jsxs)(t.Fragment,{children:[f,m]}),p[16]=f,p[17]=m,p[18]=h):h=p[18],h)}])},453746,e=>{e.v({banner:"ForegroundPushNotification-module__O8b_GW__banner",countdown:"ForegroundPushNotification-module__O8b_GW__countdown","countdown-fade":"ForegroundPushNotification-module__O8b_GW__countdown-fade",enter:"ForegroundPushNotification-module__O8b_GW__enter",exit:"ForegroundPushNotification-module__O8b_GW__exit"})},751763,e=>{"use strict";
3var t=e.i(843476),r=e.i(500932),i=e.i(263676),n=e.i(657688),s=e.i(948148),a=e.i(271645),o=e.i(705766),l=e.i(47137),c=e.i(627499),u=e.i(595423);e.i(793411);var d=e.i(527847),f=e.i(622723),m=e.i(744705),h=e.i(453746);let p="foreground-push-notification";function b(e){let s,c,u,f,m,b,v,y,x,w,j,_,N,E,k,S,I,C,A=(0,r.c)(45),{notification:L,href:P,title:T,isMessage:R,visible:$,dismissLabel:q}=e,[M,W]=(0,a.useState)(!1),[O,F]=(0,a.useState)();A[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{let e=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>W(!0))});return()=>cancelAnimationFrame(e)},c=[],A[0]=s,A[1]=c):(s=A[0],c=A[1]),(0,a.useEffect)(s,c);let D=`${h.default.banner} ${M&&$?h.default.enter:h.default.exit} ${$?"pointer-events-auto":"pointer-events-none"} relative mt-24 flex w-[calc(100vw-2rem)] max-w-sm items-start overflow-hidden rounded-2xl border border-gray-600 bg-gray-900 text-white shadow-xl`,z=!$,B=!$;A[2]===Symbol.for("react.memo_cache_sentinel")?(u=e=>{let t=e.target;F(t instanceof Element&&t.closest("a")?"content":t instanceof Element&&t.closest("button")?"dismiss":"banner")},f=()=>F(void 0),m=()=>F(void 0),b=()=>F(void 0),A[2]=u,A[3]=f,A[4]=m,A[5]=b):(u=A[2],f=A[3],m=A[4],b=A[5]),A[6]!==$?(v=()=>$&&o.default.dismiss(p),A[6]=$,A[7]=v):v=A[7],A[8]!==L.id||A[9]!==v?
3(y=(0,t.jsx)("span",{className:"pointer-events-none absolute inset-x-4 top-0 h-0.5 overflow-hidden rounded-full bg-yellow-400/20","aria-hidden":"true",children:(0,t.jsx)("span",{className:`${h.default.countdown} block h-full w-full origin-left bg-yellow-400`,onAnimationEnd:v},L.id)}),A[8]=L.id,A[9]=v,A[10]=y):y=A[10];let U=$?void 0:-1;A[11]!==P?(x=()=>{(0,l.rememberNativeGameEntry)(P),o.default.remove(p)},A[11]=P,A[12]=x):x=A[12],A[13]!==R||A[14]!==L.data.imageURL?(w=L.data.imageURL&&(0,t.jsx)(n.default,{src:L.data.imageURL,alt:"",width:R?48:80,height:R?48:50,className:R?"size-12 shrink-0 rounded-xl object-contain":"h-[50px] w-20 shrink-0 rounded-lg object-cover",unoptimized:!0,priority:!0}),A[13]=R,A[14]=L.data.imageURL,A[15]=w):w=A[15],A[16]!==R||A[17]!==L.data.gameName?(j=!R&&L.data.gameName&&(0,t.jsx)("span",{className:"mb-0.5 block truncate text-xs text-gray-400",dir:"auto",children:L.data.gameName}),A[16]=R,A[17]=L.data.gameName,A[18]=j):j=A[18],A[19]!==T?(_=(0,t.jsx)("span",{className:"block truncate text-sm font-bold",dir:"auto",children:T}),A[19]=T,A[20]=_):_=A[20],A[21]!==L.body?(N=(0,t.jsx)("span",{className:"mt-0.5 line-clamp-2 break-words text-sm leading-5 text-gray-200",dir:"auto",children:L.body}),A[21]=L.body,A[22]=N):N=A[22],A[23]!==j||A[24]!==_||A[25]!==N?(E=(0,t.jsxs)("span",{className:"min-w-0 self-center",children:[j,_,N]}),A[23]=j,A[24]=_,A[25]=N,A[26]=E):E=A[26],A[27]!==P||A[28]!==U||A[29]!==x||A[30]!==w||A[31]!==E?(k=(0,t.jsxs)(d.Link,{href:P,prefetch:!1,tabIndex:U,onClick:x,className:"flex min-w-0 flex-1 gap-3 rounded-2xl p-3.5 outline-none transition-transform duration-150 ease-[
3cubic-bezier(0.25,0.46,0.45,0.94)] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-yellow-400",children:[w,E]}),A[27]=P,A[28]=U,A[29]=x,A[30]=w,A[31]=E,A[32]=k):k=A[32];let G=$?void 0:-1;return A[33]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsx)(i.X,{size:18,"aria-hidden":"true"}),A[33]=S):S=A[33],A[34]!==q||A[35]!==G?(I=(0,t.jsx)("button",{type:"button","aria-label":q,tabIndex:G,onClick:g,className:"mt-1 flex size-11 shrink-0 items-center justify-center rounded-xl text-gray-300 outline-none transition-transform duration-150 ease-[cubic-bezier(0.25,0.46,0.45,0.94)] hover:text-white focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-yellow-400",children:S}),A[34]=q,A[35]=G,A[36]=I):I=A[36],A[37]!==O||A[38]!==y||A[39]!==k||A[40]!==I||A[41]!==D||A[42]!==z||A[43]!==B?(C=(0,t.jsxs)("div",{className:D,role:"status","aria-live":"polite","aria-atomic":"true","aria-hidden":z,inert:B,"data-pressed":O,onPointerDown:u,onPointerUp:f,onPointerCancel:m,onPointerLeave:b,children:[y,k,I]}),A[37]=O,A[38]=y,A[39]=k,A[40]=I,A[41]=D,A[42]=z,A[43]=B,A[44]=C):C=A[44],C}function g(){return o.default.dismiss(p)}e.s(["default",0,function(e){let i,n,l,d=(0,r.c)(7),{messagingEnabled:h}=e,g=(0,c.useCampfireSession)().data?.user.id,v=(0,f.usePathname)(),y=(0,s.useTranslations)("Common");d[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],d[0]=i):i=d[0];let x=(0,a.useRef)(i);return d[1]!==y||d[2]!==h||d[3]!==v||d[4]!==g?(n=()=>{if(!g||!(0,u.hasNativeMobileBridge)())return;let e=function(e){function t(t){if(!(t instanceof CustomEvent))return;let r=t.detail;!r||"object"!=typeof r||"string"!=typeof r.id||!r.id||"string"!=typeof r.title||"string"!=typeof r.body||!(!r.data||"object"!=typeof r.data||Array.isArray(r.data))&&Object.values(r.data).every(e=>"string"==typeof e)&&e({id:r.id,title:r.title,body:r.body,data:r.data})}return window.addEventListener("allout:push-received",t),()=>window.removeEventListener("allout:push-received",t)}(e=>{let r,i,{data:n}=e;if("visible"!==document.visibilityState||n.recipientID!==g||!e.body.trim())return;let s="direct-message"===n.notificationType;if(s){if(!h||n.senderID===g||!/^[a-f0-9]{24}$/.test(n.senderID)||!/^[a-f0-9]{24}$/.test(n.conversationID)||!n.senderUsername)return;r=`/mobile/account/messages/conversations/${n.conversationID}`,i=n.senderUsername}else if("game-push"===n.notificationType){if(!/^[a-f0-9]{24}$/.test(n.gameID)||!n.gameName||!e.title.trim())return;r=`/mobile/games/${n.gameID}`,i=e.title}else if("publishing-review"===n.notificationType){if(!/^[a-f0-9]{24}$/.test(n.gameID)||n.url!==`https://allout.game/create/${n.gameID}/publish`||!e.title.trim())return;r=`/mobile/create/${n.gameID}/publish`,i=e.title}else{let t;if("campaign"!==n.notificationType)return;if(!/^[a-f0-9]{24}$/.test(n.campaignId)||!e.title.trim())return;try{t=new URL(n.url)}catch{return}if("https://allout.game"!==t.origin||t.username||t.password)return;let s=t.pathname.split("/");m.routing.locales.some(e=>e===s[1])&&s.splice(1,1),"mobile"!==s[1]&&s.splice(1,0,"mobile"),r=s.join("/")+t.search+t.hash,i=e.title}n.imageURL&&!/^https:\/\/(avatars\.allout\.game|thumbnails\.r2\.allout\.game)\//.test(n.imageURL)||x.current.includes(e.id)||(x.current=[...x.current.slice(-63),e.id],v===r||v.startsWith(`${r}/`)||o.default.custom(n=>(0,t.jsx)(b,{notification:e,href:r,title:i,isMessage:s,visible:n.visible,dismissLabel:y("dismiss")}),{id:p,position:"top-center",duration:1/0,removeDelay:180}))}),r=function(){"visible"!==document.visibilityState&&o.default.remove(p)};return document.addEventListener("visibilitychange",r),()=>{e(),document.removeEventListener("visibilitychange",r),o.default.remove(p)}},l=[y,h,v,g],d[1]=y,d[2]=h,d[3]=v,d[4]=g,d[5]=n,d[6]=l):(n=d[5],l=d[6]),(0,a.useEffect)(n,l),null}],751763)},107870,e=>{"use strict";var t=e.i(693103),r=e.i(975157);class i extends Error{status;retryAfterMs;constructor(e,t){super(`Notification consent request failed (${e})`),this.status=e,this.retryAfterMs=t}}async function n(e,n,s,a,o){async function l(){let r=await (0,t.refreshSession)();if(r?.user.id!==e)throw new i(401,3e4);return r}let c=(0,t.getCampfireSession)()??await l();if(c.user.id!==e)throw new i(401,3e4);let u=await (0,r.clientFetchWithAuth)({data:c,status:"authenticated",update:l},`https://api.allout.game${n}`,{method:s,headers:{"Content-Type":"application/json"},body:JSON.stringify(a),signal:o});if(!u.ok){let e=u.headers.get("retry-after"),t=null===e?NaN:Number(e),r=Number.isFinite(t)?1e3*t:e?Date.parse(e)-Date.now():3e4;throw new i(u.status,Number.isFinite(r)?Math.max(1e3,r):3e4)}return u}e.s(["createNotificationConsentClient",0,function(e,t){let r,s={phase:"idle",ready:!1},a=!1,o=!1,l=0,c=null,u=null,d=null,f=0,m=!1,h=null;function p(){o||t({state:s,pending:a})}async function b(t,r,i){let s=new AbortController;h=s;let a=setTimeout(()=>s.abort(),15e3);try{return await n(e,t,r,i,s.signal)}finally{clearTimeout(a),h=null}}function g(e){o||(f=Date.now()+(e instanceof i?e.retryAfterMs:3e4),console.warn("Notification consent synchronization paused",e))}async function v(e){let{platform:t,status:r,canRequest:i,requestId:n}=e,a=await b("/users/current/push-authorization","PUT",{platform:t,status:r,canRequest:i,requestId:n}),l=await a.json();if(!o){if(n||"not_determined"!==r&&"denied"!==r){s={phase:"done",ready:!0,platform:t};return}if("pre_prompt"!==s.phase&&"native"!==s.phase){if(!d&&m&&l.prompt){let e=await b("/users/current/notification-consent/events","POST",{platform:t,prompt:l.prompt,event:"offer"}),r=await e.json();if(o)return;if(r.claimed){s={phase:r.requestId?"native":"pre_prompt",ready:!0,platform:t,prompt:l.prompt,requestId:r.requestId??void 0,recipientName:r.recipientName,settingsRequired:r.settingsRequired,allowSettings:r.allowSettings};return}}s={phase:"idle",ready:!0,platform:t}}}}async function y(){if(!(a||o||Date.now()<f)){a=!0,p();try{for(;d&&!o;){let e=d;d=null,e.key!==c&&(u=e.key,await v(e.report),r===e.report.requestId&&(r=void 0),c=e.key)}}catch(e){g(e),s={phase:"idle",ready:!0}}finally{u=null,a=!1,p()}}}return{report(t){if(o||t.userId!==e)return;r=t.requestId??r,m=(t={...t,requestId:r}).visible;let i=JSON.stringify([l,t.platform,t.status,t.canRequest,t.visible,t.requestId]);if(i===u){d=null;return}(a||i!==c)&&(d={report:t,key:i},y())},recheck(){l++},hide(){m=!1},async decide(e){if(o||a||Date.now()<f)throw Error("Notification consent is busy");let t=e.get("event"),r=e.get("platform"),i=e.get("prompt");if("accept"!==t&&"decline"!==t||r!==s.platform||i!==s.prompt||"pre_prompt"!==s.phase)throw Error("Invalid notification consent decision");a=!0,p();try{let e=await b("/users/current/notification-consent/events","POST",{platform:r,prompt:i,event:t}),n=await e.json();o||(s={...s,phase:n.requestId?"native":"done",requestId:n.requestId??void 0})}catch(e){throw g(e),e}finally{a=!1,p(),y()}},fail(){h?.abort(),g(Error("Native notification authorization request failed")),s={phase:"idle",ready:!0},p()},dispose(){o=!0,d=null,h?.abort()}}},"isNativeAuthorization",0,function(e,t){return"object"==typeof e&&null!==e&&"userId"in e&&e.userId===t&&"platform"in e&&("android"===e.platform||"ios"===e.platform)&&"status"in e&&"string"==typeof e.status&&["not_determined","denied","authorized","provisional","ephemeral"].includes(e.status)&&"canRequest"in e&&"boolean"==typeof e.canRequest&&"visible"in e&&"boolean"==typeof e.visible&&(!("requestId"in e)||"string"==typeof e.requestId)},"nativeNotificationRequest",0,n])}]); 4 5//# debugId=789c7f1c-9bcd-5a59-ef92-83254ac14ba1
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.