@dcl-regenesislabs/bevy-explorer-web 0.1.0-28815551474.commit-e310eaf → 0.1.0-28859484780.commit-52ad0d6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{Showcase-BIj6ento.js → Showcase-BQ4R0vaS.js} +1 -1
- package/assets/{design-CGp5u6Od.js → design-BGSiWgQK.js} +1 -1
- package/assets/{index-CYTDt8OE.css → index-BcQyxDJp.css} +1 -1
- package/assets/{index-BueaPS_g.js → index-CtzFLcj6.js} +3 -3
- package/assets/{menus-z_Df5vKs.js → menus-BnwId4RT.js} +2 -2
- package/assets/{vendor-DpvaGG_Q.js → vendor-BTKIRHbK.js} +1 -1
- package/assets/{vendor-HqMhM7Wz.css → vendor-CKpDrzxM.css} +1 -1
- package/bridge-scene/static/BevyExplorerUI/about +1 -1
- package/bridge-scene/static/{bafkreiaqm5b6tnhxfbtftjk4vhfpt3fo5qpmekrpw3hdznfnl67twxsmvi → bafkreihn3mz4ps6rs3ircynizz5qngdjq3fi6j7niqfbj35467pf5btd3y} +1 -1
- package/engine/pkg/manifest.json +1 -1
- package/engine/pkg/webgpu_build_bg.wasm +0 -0
- package/index.html +17 -17
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Showcase-
|
|
2
|
-
import{C as e,S as t,_ as n,b as r,c as i,d as a,g as o,h as s,l as c,m as l,p as u,x as d}from"./design-CGp5u6Od.js";import{t as f}from"./vendor-DpvaGG_Q.js";import{_ as p,a as m,c as h,d as g,f as _,g as v,h as y,i as b,l as x,m as S,n as ee,o as te,p as C,r as w,s as ne,t as re,u as ie,v as T,y as E}from"./menus-z_Df5vKs.js";import{a as ae,i as D,n as O,o as oe,r as se,t as k}from"./emoji-DrfHOLaz.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var A=e(),ce=f(),le=`bevy-ui-bridge`,ue=class{ch;pending=new Map;listeners=new Set;constructor(e=le){this.ch=new BroadcastChannel(e),this.ch.onmessage=e=>{let t=e.data;t?.to===`page`&&this.handle(t.msg)}}getPreviousLogin(){return this.rpc(`getPreviousLogin`)}loginPrevious(){return this.rpc(`loginPrevious`)}loginGuest(){return this.rpc(`loginGuest`)}loginCancel(){return this.rpc(`loginCancel`)}logout(){return this.rpc(`logout`)}loginWithIdentity(e){return this.rpc(`loginIdentity`)}async jumpIn(){let e=await this.rpc(`loginPrevious`);if(e&&e.success===!1)throw Error(e.error||`Could not reuse your login`)}send(e){this.ch.postMessage({to:`scene`,msg:e})}on(e){return this.listeners.add(e),()=>this.listeners.delete(e)}dispose(){this.ch.close(),this.pending.clear(),this.listeners.clear()}rpc(e){let t=crypto.randomUUID();return new Promise((n,r)=>{this.pending.set(t,{resolve:n,reject:r}),this.send({kind:`rpc:req`,id:t,method:e})})}handle(e){if(e.kind===`rpc:res`){let t=this.pending.get(e.id);if(!t)return;this.pending.delete(e.id),e.ok?t.resolve(e.value):t.reject(Error(e.error??`bridge rpc failed`));return}this.listeners.forEach(t=>t(e))}};function de(e){return btoa(JSON.stringify(e))}var fe=class{rpc;ch;listeners=new Set;playerReadyFired=!1;readyFallbackTimer=null;constructor(e){this.rpc=e,this.ch=new BroadcastChannel(le),this.ch.onmessage=e=>{let t=e.data;t?.to===`page`&&(t.msg.kind===`event`&&t.msg.name===`playerReady`&&(this.playerReadyFired=!0),this.emit(t.msg))}}async getPreviousLogin(){let e=T();return{userId:e?E(e.identity):null}}async loginPrevious(){let e=await this.rpc.command(`/login_previous`);return this.scheduleReadyFallback(),e}async loginGuest(){await this.rpc.command(`/login_guest`),this.scheduleReadyFallback()}async loginCancel(){}async logout(){await this.rpc.command(`/logout`)}async loginWithIdentity(e){await this.rpc.command(`/login_identity ${de(e)}`),this.scheduleReadyFallback()}async jumpIn(){let e=T();e?await this.loginWithIdentity(e.identity):await this.loginPrevious()}send(e){this.ch.postMessage({to:`scene`,msg:e})}on(e){return this.listeners.add(e),()=>this.listeners.delete(e)}dispose(){this.readyFallbackTimer!=null&&clearTimeout(this.readyFallbackTimer),this.ch.close(),this.listeners.clear()}renderBusy(){return this.rpc.renderBusy()}engineReady(){return this.rpc.readyToLaunch()}loadProgress(){return this.rpc.loadProgress()}loadStep(){return this.rpc.loadStep()}enginePanic(){return this.rpc.enginePanic()}clearEnginePanic(){this.rpc.clearEnginePanic()}rearmCrashWatchdog(){this.rpc.rearmCrashWatchdog()}launch(e,t){this.rpc.launch(e,t)}emit(e){this.listeners.forEach(t=>t(e))}scheduleReadyFallback(){this.readyFallbackTimer!=null&&clearTimeout(this.readyFallbackTimer),this.readyFallbackTimer=setTimeout(()=>{this.readyFallbackTimer=null,this.playerReadyFired||(this.playerReadyFired=!0,this.emit({kind:`event`,name:`playerReady`}))},6e3)}},pe=class{win=null;setWindow(e){this.win=e}readyToLaunch(){return this.win?.__bevyReadyToLaunch===!0}loadProgress(){return this.win?.__bevyLoadProgress??0}loadStep(){return this.win?.__bevyLoadStep??null}enginePanic(){return this.win?.__bevyPanic??null}clearEnginePanic(){this.win&&(this.win.__bevyPanic=void 0)}rearmCrashWatchdog(){this.win?.__rearmCrashWatchdog?.()}launch(e,t){this.win?.__bevyLaunch?.(e,t)}ready(){return typeof this.win?.engine_console_command==`function`}async waitReady(e=9e4){let t=performance.now();for(;!this.ready();){if(performance.now()-t>e)throw Error(`engine RPC did not become ready in time`);await new Promise(e=>setTimeout(e,150))}}async command(e){return await this.waitReady(),this.win.engine_console_command(e)}renderBusy(){try{let e=this.win,t=e?.document.getElementById(`shader-compiling`);return t!=null&&e.getComputedStyle(t).display!==`none`}catch{return!1}}};function me(e,t,n){return{address:e,name:t,picture:`https://profile-images.decentraland.org/entities/bafkreid5btlh76opew65hxu6dtkdo6ybqhymdof6vrrmjy2p5a74oy4huq/face.png`,bodyImage:`https://picsum.photos/seed/${encodeURIComponent(e)}/360/760`,hasClaimedName:!t.includes(`#`),isGuest:n,description:`Exploring Decentraland one plaza at a time. 🌅 DCL citizen since 2022.`,links:[{title:`Twitter`,url:`https://twitter.com`},{title:`Discord`,url:`https://discord.com`}],mutuals:30,badges:Array.from({length:8},(e,t)=>({id:`b${t}`,name:`Badge ${t+1}`,tier:[`bronze`,`silver`,`gold`][t%3],image:`https://picsum.photos/seed/badge${t}/96/96`})),photos:Array.from({length:6},(e,t)=>`https://picsum.photos/seed/photo${t}/300/300`),info:{gender:`Male`,birthdate:`26/11/1991`,pronouns:`He / Him`,relationship:`Single`,language:`Persian`,profession:`IT`,employment:`Chilling`,hobby:`games.movie.party`,realName:`mohammad`}}}var he=[{address:`0x5854cce95d5e25817b41f4c41f06b695a83bc495`,name:`Mojito`,picture:`https://profile-images.decentraland.org/entities/bafkreid5btlh76opew65hxu6dtkdo6ybqhymdof6vrrmjy2p5a74oy4huq/face.png`},{address:`0x6723dcb07f3ca735223cd1c0acfa62dd994a1bb4`,name:`Sharknado`,picture:`https://profile-images.decentraland.org/entities/bafkreie5bpho47gnh3jrfxoezwc4pxffup4cmmhmdxsmpf3oslopxb4enm/face.png`},{address:`0x1e105bb213754519903788022b962fe2b9c4b263`,name:`Pravus`,picture:`https://profile-images.decentraland.org/entities/bafkreig4xay5oxgbf75hwkjefx5hgdcdvm6a4tnpiisltslxf4jtajkbyq/face.png`},{address:`0x9f8c2a1b4d6e7f0a3b5c8d9e1f2a4b6c8d0e1f23`,name:`Johnny`},{address:`0x3a1b2c4d5e6f7081920a3b4c5d6e7f8091a2b3c4`,name:`Clara`},{address:`0x77a0b1c2d3e4f5061728394a5b6c7d8e9f001122`,name:`SpottyGoat`},{address:`0xc0ffee254729296a45a3885639ac7e10f9d54979`,name:``}],j=[{id:`c1`,name:`Decentraland Foundation`,description:`The official Decentraland Foundation community. Stay up to date with events, releases and everything happening across the metaverse.`,thumbnail:`https://picsum.photos/seed/dcl/540/360`,membersCount:1242,role:`member`,ownerName:`DCLOfficial`,privacy:`public`},{id:`c2`,name:`Chiri Storytelling`,description:`This space brings to life Chiri's adventures. Gathering cozy Social Gamers, Creators, Digi Fashion lovers, Virtual Citizens & more!`,thumbnail:``,membersCount:374,role:`none`,ownerName:`Chiri`,privacy:`private`},{id:`c3`,name:`VTATV`,description:`Virtual television and live shows broadcast from inside Decentraland.`,thumbnail:``,membersCount:186,role:`none`,ownerName:`VTATV`},{id:`c4`,name:`ABC Decentraland`,description:`Adventures and education for newcomers to the metaverse.`,thumbnail:``,membersCount:436,role:`none`,ownerName:`BillyTeacoin`},{id:`c5`,name:`Toxic Events`,description:`The wildest parties and events in DCL.`,thumbnail:``,membersCount:601,role:`member`,ownerName:`ToxicWaifu`},{id:`c6`,name:`Last Slice Creators`,description:`A community of pizza-loving 3D creators.`,thumbnail:``,membersCount:164,role:`none`,ownerName:`Lastraum`},{id:`c7`,name:`SheFi`,description:`Empowering women in web3 and DeFi.`,thumbnail:``,membersCount:310,role:`none`,ownerName:`msjoedor`},{id:`c8`,name:`Community Building DCL`,description:`Helping communities grow in Decentraland.`,thumbnail:``,membersCount:639,role:`owner`,ownerName:`TheCryptKeeper`}],ge=[`base`,`common`,`uncommon`,`rare`,`epic`,`legendary`,`mythic`,`unique`,`exotic`],_e=e=>`https://peer.decentraland.org/lambdas/collections/contents/${e}/thumbnail`,M=[{name:`casual_hair_01`,category:`hair`,label:`Casual Hair`},{name:`cornrows`,category:`hair`,label:`Cornrows`},{name:`hair_anime_01`,category:`hair`,label:`Anime Hair`},{name:`eyebrows_00`,category:`eyebrows`,label:`Eyebrows`},{name:`mouth_00`,category:`mouth`,label:`Mouth`},{name:`beard`,category:`facial_hair`,label:`Beard`},{name:`granpa_beard`,category:`facial_hair`,label:`Grandpa Beard`},{name:`f_sweater`,category:`upper_body`,label:`Sweater`},{name:`m_greenhoodie`,category:`upper_body`,label:`Green Hoodie`},{name:`blue_tshirt`,category:`upper_body`,label:`Blue T-Shirt`},{name:`sport_jacket`,category:`upper_body`,label:`Sport Jacket`},{name:`f_jeans`,category:`lower_body`,label:`Jeans`},{name:`f_brown_trousers`,category:`lower_body`,label:`Brown Trousers`},{name:`basketball_shorts`,category:`lower_body`,label:`Basketball Shorts`},{name:`sneakers`,category:`feet`,label:`Sneakers`},{name:`bun_shoes`,category:`feet`,label:`Bun Shoes`},{name:`m_greenflipflops`,category:`feet`,label:`Flip Flops`},{name:`hat`,category:`hat`,label:`Hat`},{name:`bandana`,category:`hat`,label:`Bandana`},{name:`black_sun_glasses`,category:`eyewear`,label:`Sunglasses`},{name:`piratepatch`,category:`eyewear`,label:`Pirate Patch`},{name:`blue_bandana`,category:`mask`,label:`Blue Bandana`},{name:`pink_gem_earring`,category:`earring`,label:`Pink Gem Earring`},{name:`Thunder_earring`,category:`earring`,label:`Thunder Earring`}].map((e,t)=>{let n=`urn:decentraland:off-chain:base-avatars:${e.name}`;return{urn:n,name:e.label,rarity:ge[t%ge.length],category:e.category,thumbnail:_e(n),equipped:t%6==0}}),N=e=>({name:e,description:``}),ve=[{name:`fullscreen`,category:`general`,description:`Run in fullscreen mode.`,minValue:0,maxValue:1,namedVariants:[N(`Off`),N(`On`)],value:1,default:1,stepSize:1},{name:`resolution`,category:`general`,description:``,minValue:0,maxValue:2,namedVariants:[N(`1280 × 720`),N(`1920 × 1080`),N(`2560 × 1440`)],value:1,default:1,stepSize:1},{name:`graphics_quality`,category:`graphics`,description:`Overall visual quality.`,minValue:0,maxValue:3,namedVariants:[N(`Low`),N(`Medium`),N(`High`),N(`Ultra`)],value:2,default:1,stepSize:1},{name:`fps_limit`,category:`graphics`,description:`Cap the frame rate.`,minValue:30,maxValue:144,namedVariants:[],value:60,default:60,stepSize:1},{name:`master_volume`,category:`audio`,description:``,minValue:0,maxValue:100,namedVariants:[],value:80,default:100,stepSize:1},{name:`voice_chat`,category:`audio`,description:`Enable voice chat.`,minValue:0,maxValue:1,namedVariants:[N(`Off`),N(`On`)],value:1,default:1,stepSize:1}],ye={hasPreviousLogin:new URLSearchParams(location.search).get(`previousLogin`)===`1`,userId:`0xmock00000000000000000000000000000000beef`,latency:600};function be(e){let t=`single-sign-on-${e.userId}`;e.hasPreviousLogin?localStorage.getItem(t)||localStorage.setItem(t,JSON.stringify({ephemeralIdentity:{address:`0xeeee000000000000000000000000000000000001`,publicKey:`0x04`,privateKey:`0x`+`11`.repeat(32)},expiration:new Date(Date.now()+720*3600*1e3).toISOString(),authChain:[{type:`SIGNER`,payload:e.userId,signature:``},{type:`ECDSA_EPHEMERAL`,payload:`Decentraland Login
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Showcase-BQ4R0vaS.js","assets/design-BGSiWgQK.js","assets/rolldown-runtime-D9-fqq9M.js","assets/design-L3QBQE4k.css","assets/menus-BnwId4RT.js","assets/menus-CMe1P37D.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{C as e,S as t,_ as n,b as r,c as i,d as a,g as o,h as s,l as c,m as l,p as u,x as d}from"./design-BGSiWgQK.js";import{t as f}from"./vendor-BTKIRHbK.js";import{_ as p,a as m,c as h,d as g,f as _,g as v,h as y,i as b,l as x,m as S,n as ee,o as te,p as C,r as w,s as ne,t as re,u as ie,v as T,y as E}from"./menus-BnwId4RT.js";import{a as ae,i as D,n as O,o as oe,r as se,t as k}from"./emoji-DrfHOLaz.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var A=e(),ce=f(),le=`bevy-ui-bridge`,ue=class{ch;pending=new Map;listeners=new Set;constructor(e=le){this.ch=new BroadcastChannel(e),this.ch.onmessage=e=>{let t=e.data;t?.to===`page`&&this.handle(t.msg)}}getPreviousLogin(){return this.rpc(`getPreviousLogin`)}loginPrevious(){return this.rpc(`loginPrevious`)}loginGuest(){return this.rpc(`loginGuest`)}loginCancel(){return this.rpc(`loginCancel`)}logout(){return this.rpc(`logout`)}loginWithIdentity(e){return this.rpc(`loginIdentity`)}async jumpIn(){let e=await this.rpc(`loginPrevious`);if(e&&e.success===!1)throw Error(e.error||`Could not reuse your login`)}send(e){this.ch.postMessage({to:`scene`,msg:e})}on(e){return this.listeners.add(e),()=>this.listeners.delete(e)}dispose(){this.ch.close(),this.pending.clear(),this.listeners.clear()}rpc(e){let t=crypto.randomUUID();return new Promise((n,r)=>{this.pending.set(t,{resolve:n,reject:r}),this.send({kind:`rpc:req`,id:t,method:e})})}handle(e){if(e.kind===`rpc:res`){let t=this.pending.get(e.id);if(!t)return;this.pending.delete(e.id),e.ok?t.resolve(e.value):t.reject(Error(e.error??`bridge rpc failed`));return}this.listeners.forEach(t=>t(e))}};function de(e){return btoa(JSON.stringify(e))}var fe=class{rpc;ch;listeners=new Set;playerReadyFired=!1;readyFallbackTimer=null;constructor(e){this.rpc=e,this.ch=new BroadcastChannel(le),this.ch.onmessage=e=>{let t=e.data;t?.to===`page`&&(t.msg.kind===`event`&&t.msg.name===`playerReady`&&(this.playerReadyFired=!0),this.emit(t.msg))}}async getPreviousLogin(){let e=T();return{userId:e?E(e.identity):null}}async loginPrevious(){let e=await this.rpc.command(`/login_previous`);return this.scheduleReadyFallback(),e}async loginGuest(){await this.rpc.command(`/login_guest`),this.scheduleReadyFallback()}async loginCancel(){}async logout(){await this.rpc.command(`/logout`)}async loginWithIdentity(e){await this.rpc.command(`/login_identity ${de(e)}`),this.scheduleReadyFallback()}async jumpIn(){let e=T();e?await this.loginWithIdentity(e.identity):await this.loginPrevious()}send(e){this.ch.postMessage({to:`scene`,msg:e})}on(e){return this.listeners.add(e),()=>this.listeners.delete(e)}dispose(){this.readyFallbackTimer!=null&&clearTimeout(this.readyFallbackTimer),this.ch.close(),this.listeners.clear()}renderBusy(){return this.rpc.renderBusy()}engineReady(){return this.rpc.readyToLaunch()}loadProgress(){return this.rpc.loadProgress()}loadStep(){return this.rpc.loadStep()}enginePanic(){return this.rpc.enginePanic()}clearEnginePanic(){this.rpc.clearEnginePanic()}rearmCrashWatchdog(){this.rpc.rearmCrashWatchdog()}launch(e,t){this.rpc.launch(e,t)}emit(e){this.listeners.forEach(t=>t(e))}scheduleReadyFallback(){this.readyFallbackTimer!=null&&clearTimeout(this.readyFallbackTimer),this.readyFallbackTimer=setTimeout(()=>{this.readyFallbackTimer=null,this.playerReadyFired||(this.playerReadyFired=!0,this.emit({kind:`event`,name:`playerReady`}))},6e3)}},pe=class{win=null;setWindow(e){this.win=e}readyToLaunch(){return this.win?.__bevyReadyToLaunch===!0}loadProgress(){return this.win?.__bevyLoadProgress??0}loadStep(){return this.win?.__bevyLoadStep??null}enginePanic(){return this.win?.__bevyPanic??null}clearEnginePanic(){this.win&&(this.win.__bevyPanic=void 0)}rearmCrashWatchdog(){this.win?.__rearmCrashWatchdog?.()}launch(e,t){this.win?.__bevyLaunch?.(e,t)}ready(){return typeof this.win?.engine_console_command==`function`}async waitReady(e=9e4){let t=performance.now();for(;!this.ready();){if(performance.now()-t>e)throw Error(`engine RPC did not become ready in time`);await new Promise(e=>setTimeout(e,150))}}async command(e){return await this.waitReady(),this.win.engine_console_command(e)}renderBusy(){try{let e=this.win,t=e?.document.getElementById(`shader-compiling`);return t!=null&&e.getComputedStyle(t).display!==`none`}catch{return!1}}};function me(e,t,n){return{address:e,name:t,picture:`https://profile-images.decentraland.org/entities/bafkreid5btlh76opew65hxu6dtkdo6ybqhymdof6vrrmjy2p5a74oy4huq/face.png`,bodyImage:`https://picsum.photos/seed/${encodeURIComponent(e)}/360/760`,hasClaimedName:!t.includes(`#`),isGuest:n,description:`Exploring Decentraland one plaza at a time. 🌅 DCL citizen since 2022.`,links:[{title:`Twitter`,url:`https://twitter.com`},{title:`Discord`,url:`https://discord.com`}],mutuals:30,badges:Array.from({length:8},(e,t)=>({id:`b${t}`,name:`Badge ${t+1}`,tier:[`bronze`,`silver`,`gold`][t%3],image:`https://picsum.photos/seed/badge${t}/96/96`})),photos:Array.from({length:6},(e,t)=>`https://picsum.photos/seed/photo${t}/300/300`),info:{gender:`Male`,birthdate:`26/11/1991`,pronouns:`He / Him`,relationship:`Single`,language:`Persian`,profession:`IT`,employment:`Chilling`,hobby:`games.movie.party`,realName:`mohammad`}}}var he=[{address:`0x5854cce95d5e25817b41f4c41f06b695a83bc495`,name:`Mojito`,picture:`https://profile-images.decentraland.org/entities/bafkreid5btlh76opew65hxu6dtkdo6ybqhymdof6vrrmjy2p5a74oy4huq/face.png`},{address:`0x6723dcb07f3ca735223cd1c0acfa62dd994a1bb4`,name:`Sharknado`,picture:`https://profile-images.decentraland.org/entities/bafkreie5bpho47gnh3jrfxoezwc4pxffup4cmmhmdxsmpf3oslopxb4enm/face.png`},{address:`0x1e105bb213754519903788022b962fe2b9c4b263`,name:`Pravus`,picture:`https://profile-images.decentraland.org/entities/bafkreig4xay5oxgbf75hwkjefx5hgdcdvm6a4tnpiisltslxf4jtajkbyq/face.png`},{address:`0x9f8c2a1b4d6e7f0a3b5c8d9e1f2a4b6c8d0e1f23`,name:`Johnny`},{address:`0x3a1b2c4d5e6f7081920a3b4c5d6e7f8091a2b3c4`,name:`Clara`},{address:`0x77a0b1c2d3e4f5061728394a5b6c7d8e9f001122`,name:`SpottyGoat`},{address:`0xc0ffee254729296a45a3885639ac7e10f9d54979`,name:``}],j=[{id:`c1`,name:`Decentraland Foundation`,description:`The official Decentraland Foundation community. Stay up to date with events, releases and everything happening across the metaverse.`,thumbnail:`https://picsum.photos/seed/dcl/540/360`,membersCount:1242,role:`member`,ownerName:`DCLOfficial`,privacy:`public`},{id:`c2`,name:`Chiri Storytelling`,description:`This space brings to life Chiri's adventures. Gathering cozy Social Gamers, Creators, Digi Fashion lovers, Virtual Citizens & more!`,thumbnail:``,membersCount:374,role:`none`,ownerName:`Chiri`,privacy:`private`},{id:`c3`,name:`VTATV`,description:`Virtual television and live shows broadcast from inside Decentraland.`,thumbnail:``,membersCount:186,role:`none`,ownerName:`VTATV`},{id:`c4`,name:`ABC Decentraland`,description:`Adventures and education for newcomers to the metaverse.`,thumbnail:``,membersCount:436,role:`none`,ownerName:`BillyTeacoin`},{id:`c5`,name:`Toxic Events`,description:`The wildest parties and events in DCL.`,thumbnail:``,membersCount:601,role:`member`,ownerName:`ToxicWaifu`},{id:`c6`,name:`Last Slice Creators`,description:`A community of pizza-loving 3D creators.`,thumbnail:``,membersCount:164,role:`none`,ownerName:`Lastraum`},{id:`c7`,name:`SheFi`,description:`Empowering women in web3 and DeFi.`,thumbnail:``,membersCount:310,role:`none`,ownerName:`msjoedor`},{id:`c8`,name:`Community Building DCL`,description:`Helping communities grow in Decentraland.`,thumbnail:``,membersCount:639,role:`owner`,ownerName:`TheCryptKeeper`}],ge=[`base`,`common`,`uncommon`,`rare`,`epic`,`legendary`,`mythic`,`unique`,`exotic`],_e=e=>`https://peer.decentraland.org/lambdas/collections/contents/${e}/thumbnail`,M=[{name:`casual_hair_01`,category:`hair`,label:`Casual Hair`},{name:`cornrows`,category:`hair`,label:`Cornrows`},{name:`hair_anime_01`,category:`hair`,label:`Anime Hair`},{name:`eyebrows_00`,category:`eyebrows`,label:`Eyebrows`},{name:`mouth_00`,category:`mouth`,label:`Mouth`},{name:`beard`,category:`facial_hair`,label:`Beard`},{name:`granpa_beard`,category:`facial_hair`,label:`Grandpa Beard`},{name:`f_sweater`,category:`upper_body`,label:`Sweater`},{name:`m_greenhoodie`,category:`upper_body`,label:`Green Hoodie`},{name:`blue_tshirt`,category:`upper_body`,label:`Blue T-Shirt`},{name:`sport_jacket`,category:`upper_body`,label:`Sport Jacket`},{name:`f_jeans`,category:`lower_body`,label:`Jeans`},{name:`f_brown_trousers`,category:`lower_body`,label:`Brown Trousers`},{name:`basketball_shorts`,category:`lower_body`,label:`Basketball Shorts`},{name:`sneakers`,category:`feet`,label:`Sneakers`},{name:`bun_shoes`,category:`feet`,label:`Bun Shoes`},{name:`m_greenflipflops`,category:`feet`,label:`Flip Flops`},{name:`hat`,category:`hat`,label:`Hat`},{name:`bandana`,category:`hat`,label:`Bandana`},{name:`black_sun_glasses`,category:`eyewear`,label:`Sunglasses`},{name:`piratepatch`,category:`eyewear`,label:`Pirate Patch`},{name:`blue_bandana`,category:`mask`,label:`Blue Bandana`},{name:`pink_gem_earring`,category:`earring`,label:`Pink Gem Earring`},{name:`Thunder_earring`,category:`earring`,label:`Thunder Earring`}].map((e,t)=>{let n=`urn:decentraland:off-chain:base-avatars:${e.name}`;return{urn:n,name:e.label,rarity:ge[t%ge.length],category:e.category,thumbnail:_e(n),equipped:t%6==0}}),N=e=>({name:e,description:``}),ve=[{name:`fullscreen`,category:`general`,description:`Run in fullscreen mode.`,minValue:0,maxValue:1,namedVariants:[N(`Off`),N(`On`)],value:1,default:1,stepSize:1},{name:`resolution`,category:`general`,description:``,minValue:0,maxValue:2,namedVariants:[N(`1280 × 720`),N(`1920 × 1080`),N(`2560 × 1440`)],value:1,default:1,stepSize:1},{name:`graphics_quality`,category:`graphics`,description:`Overall visual quality.`,minValue:0,maxValue:3,namedVariants:[N(`Low`),N(`Medium`),N(`High`),N(`Ultra`)],value:2,default:1,stepSize:1},{name:`fps_limit`,category:`graphics`,description:`Cap the frame rate.`,minValue:30,maxValue:144,namedVariants:[],value:60,default:60,stepSize:1},{name:`master_volume`,category:`audio`,description:``,minValue:0,maxValue:100,namedVariants:[],value:80,default:100,stepSize:1},{name:`voice_chat`,category:`audio`,description:`Enable voice chat.`,minValue:0,maxValue:1,namedVariants:[N(`Off`),N(`On`)],value:1,default:1,stepSize:1}],ye={hasPreviousLogin:new URLSearchParams(location.search).get(`previousLogin`)===`1`,userId:`0xmock00000000000000000000000000000000beef`,latency:600};function be(e){let t=`single-sign-on-${e.userId}`;e.hasPreviousLogin?localStorage.getItem(t)||localStorage.setItem(t,JSON.stringify({ephemeralIdentity:{address:`0xeeee000000000000000000000000000000000001`,publicKey:`0x04`,privateKey:`0x`+`11`.repeat(32)},expiration:new Date(Date.now()+720*3600*1e3).toISOString(),authChain:[{type:`SIGNER`,payload:e.userId,signature:``},{type:`ECDSA_EPHEMERAL`,payload:`Decentraland Login
|
|
3
3
|
Ephemeral address: 0xeeee
|
|
4
4
|
Expiration: `,signature:`0xabc`}]})):localStorage.removeItem(t)}function xe(e={}){let t={...ye,...e};be(t);let n=17e11,r=[{id:`n1`,type:`social_service_friendship_accepted`,read:!1,timestamp:new Date(n).toISOString(),metadata:{sender:{address:`0x5854cce95d5e25817b41f4c41f06b695a83bc495`,name:`Mojito`,profileImageUrl:`https://profile-images.decentraland.org/entities/bafkreid5btlh76opew65hxu6dtkdo6ybqhymdof6vrrmjy2p5a74oy4huq/face.png`}}},{id:`n2`,type:`social_service_friendship_request`,read:!1,timestamp:new Date(n-18e5).toISOString(),metadata:{sender:{address:`0x6723dcb07f3ca735223cd1c0acfa62dd994a1bb4`,name:`Sharknado`,profileImageUrl:`https://profile-images.decentraland.org/entities/bafkreie5bpho47gnh3jrfxoezwc4pxffup4cmmhmdxsmpf3oslopxb4enm/face.png`}}},{id:`n3`,type:`item_sold`,read:!1,timestamp:new Date(n-36e5).toISOString(),metadata:{title:`Item sold`,description:`Your “Sunset Hoodie” sold for 120 MANA.`,image:`https://profile-images.decentraland.org/entities/bafkreie5bpho47gnh3jrfxoezwc4pxffup4cmmhmdxsmpf3oslopxb4enm/face.png`}},{id:`n4`,type:`event_started`,read:!0,timestamp:new Date(n-864e5).toISOString(),metadata:{title:`Event live`,description:`Music Festival is happening now in Genesis Plaza.`}},{id:`n5`,type:`community_post_added`,read:!1,timestamp:new Date(n-24e5).toISOString(),metadata:{communityName:`Toxic Events`,communityId:`c5`,thumbnailUrl:`https://picsum.photos/seed/dcl/80/80`}},{id:`n6`,type:`credits_reminder_claim_credits`,read:!1,timestamp:new Date(n-54e5).toISOString(),metadata:{}}],i=Array.from({length:14},(e,t)=>({id:`g${t}`,url:`https://picsum.photos/seed/reel${t}/1200/800`,thumbnailUrl:`https://picsum.photos/seed/reel${t}/400/300`,isPublic:t%2==0,dateTime:String(Math.floor((n-t*3*864e5)/1e3))})),a=new BroadcastChannel(le),o=e=>new Promise(t=>setTimeout(t,e)),s=e=>{a.postMessage({to:`page`,msg:e})},c=()=>{setTimeout(()=>{s({kind:`event`,name:`playerReady`}),s({kind:`chatVisibility`,open:!0});let e=[564,60,0],t=n=>{let r=e[n];s({kind:`sceneLoading`,state:{visible:r>0,realmConnected:!0,title:`Genesis Plaza`,pendingAssets:r>0?r:null}}),r>0&&setTimeout(()=>t(n+1),250)};t(0)},500),setTimeout(()=>s({kind:`members`,members:he}),1400),setTimeout(()=>s({kind:`friends`,available:!0,friends:[{address:`0x5854cce95d5e25817b41f4c41f06b695a83bc495`,name:`Mojito`,status:`online`,picture:`https://profile-images.decentraland.org/entities/bafkreid5btlh76opew65hxu6dtkdo6ybqhymdof6vrrmjy2p5a74oy4huq/face.png`},{address:`0x6723dcb07f3ca735223cd1c0acfa62dd994a1bb4`,name:`Sharknado`,status:`online`},{address:`0x1e105bb213754519903788022b962fe2b9c4b263`,name:`Pravus`,status:`away`},{address:`0x3a1b2c4d5e6f7081920a3b4c5d6e7f8091a2b3c4`,name:`Clara#1l0u`,status:`offline`}],received:[{id:`r1`,address:`0x77a0b1c2d3e4f5061728394a5b6c7d8e9f001122`,name:`SpottyGoat`,message:`Met you at the plaza!`}],sent:[{id:`s1`,address:`0x9f8c2a1b4d6e7f0a3b5c8d9e1f2a4b6c8d0e1f23`,name:`Johnny`}],blocked:[]}),1600),setTimeout(()=>s({kind:`settings`,settings:ve}),1700),[[`0x5854cce95d5e25817b41f4c41f06b695a83bc495`,`gm everyone 👋`],[`0x6723dcb07f3ca735223cd1c0acfa62dd994a1bb4`,`anyone going to the event?`],[`0x1e105bb213754519903788022b962fe2b9c4b263`,`this plaza looks great`]].forEach(([e,t],n)=>setTimeout(()=>s({kind:`chat`,chat:{sender:e,message:t,channel:`Nearby`}}),2500+n*2200)),new URLSearchParams(location.search).get(`perm`)===`1`&&setTimeout(()=>s({kind:`permissionRequest`,id:1,ty:`ChangeRealm`,sceneName:`Genesis Plaza`,scene:`bafkreigenesisplazahash`,realm:`https://realm-provider.decentraland.org/main`,additional:`Jump to DCL Kickoff Challenge?`}),3e3)};return a.onmessage=async e=>{let n=e.data;if(n?.to!==`scene`)return;let a=n.msg;if(await o(t.latency),a.kind===`sendChat`){s({kind:`chat`,chat:{sender:`You`,message:a.message,channel:a.channel}});return}if(a.kind!==`navAction`&&a.kind!==`friendAction`){if(a.kind===`getSettings`){s({kind:`settings`,settings:ve});return}if(a.kind===`setSetting`){let e=ve.find(e=>e.name===a.name);e&&(e.value=a.value),s({kind:`settings`,settings:ve});return}if(a.kind===`getEmotes`){s({kind:`emotes`,emotes:[`Hands Air`,`Wave`,`Fist Pump`,`Dance`,`Raise Hand`,`Clap`,`Money`,`Kiss`,`Head Explode`,`Shrug`].map((e,t)=>({slot:t,urn:`urn:decentraland:off-chain:base-emotes:${e.toLowerCase().replace(/ /g,``)}`,name:e,rarity:`base`}))});return}if(a.kind!==`triggerEmote`&&a.kind!==`equipEmote`){if(a.kind===`getWearables`){s({kind:`wearables`,wearables:M});return}if(a.kind===`equip`){let e=new Set(a.urns);for(let t of M)t.equipped=e.has(t.urn);s({kind:`wearables`,wearables:M});return}if(a.kind===`setMic`){s({kind:`mic`,enabled:a.enabled,available:!0});return}if(a.kind===`getMap`){s({kind:`mapState`,x:0,y:0});return}if(a.kind!==`engineViewport`&&a.kind!==`previewAvatar`){if(a.kind===`teleport`){s({kind:`mapState`,x:a.x,y:a.y});return}if(a.kind!==`changeRealm`&&a.kind!==`permissionResolve`){if(a.kind===`getCommunities`){s({kind:`communities`,communities:j});return}if(a.kind===`createCommunity`){j.unshift({id:`new-${j.length}`,name:a.name,description:a.description,thumbnail:``,membersCount:1,role:`owner`,ownerName:`You`,privacy:a.privacy}),s({kind:`communities`,communities:j});return}if(a.kind===`joinCommunity`){let e=j.find(e=>e.id===a.id);e&&(e.role=`member`,e.membersCount+=1),s({kind:`communities`,communities:j});return}if(a.kind===`leaveCommunity`){let e=j.find(e=>e.id===a.id);e&&(e.role=`none`,e.membersCount=Math.max(0,e.membersCount-1)),s({kind:`communities`,communities:j});return}if(a.kind===`getCommunityDetail`){let e=[`DCLOfficial`,`KazeNoKai`,`METAWOLF`,`laurenmae`,`Eax`,`Thund`,`aixa`,`Kimbo`,`BayBackner`,`Rochyou`,`Soultasium`,`franfranfran`,`olavra`,`Meshroom`],t=e=>`0x${(e+1).toString(16).padStart(40,`0`)}`,n=1440*60*1e3;s({kind:`communityDetail`,id:a.id,members:e.map((e,n)=>({address:t(n),name:e,role:n===0?`owner`:n<3?`moderator`:`member`,picture:`https://i.pravatar.cc/80?u=${e}`,hasClaimedName:!0,isFriend:n%5==0})),posts:[{id:`p1`,author:`Kimbo`,authorAddress:t(7),authorPicture:`https://i.pravatar.cc/80?u=Kimbo`,text:`It was TIME for an update. See you all in the new Plaza. Enjoy!`,timestamp:Date.now()-2*n,likes:10},{id:`p2`,author:`Kimbo`,authorAddress:t(7),authorPicture:`https://i.pravatar.cc/80?u=Kimbo`,text:`EPIC Launch Party happening now in the theatre!`,timestamp:Date.now()-16*n,likes:4},{id:`p3`,author:`Kimbo`,authorAddress:t(7),authorPicture:`https://i.pravatar.cc/80?u=Kimbo`,text:`Hey everyone! Happy Epic and Mobile Launch Day!!! Please help us spread the word and get ready to celebrate together on April 2nd! It will be EPIC.`,timestamp:Date.now()-18*n,likes:1}],places:[{id:`pl1`,title:`Music Festival Main Stage`,thumbnail:`https://picsum.photos/seed/mfest/420/260`,positions:`-66,56`,likeRate:1}],photos:Array.from({length:9},(e,t)=>({id:`ph${t}`,url:`https://picsum.photos/seed/dclph${t}/600/600`,thumbnail:`https://picsum.photos/seed/dclph${t}/300/300`})),events:[{id:`e1`,name:`Watch scary movies with Cult Horror Club`,thumbnail:`https://picsum.photos/seed/horror1/200/120`,startsAt:Date.now()+1*n},{id:`e2`,name:`Pride Sound Set with Artist X`,thumbnail:`https://picsum.photos/seed/pride/200/120`,startsAt:Date.now()+1*n+360*60*1e3},{id:`e3`,name:`Join DEEJAY FAMILY at Takeover Tuesdays`,thumbnail:`https://picsum.photos/seed/takeover/200/120`,startsAt:Date.now()+4*n},{id:`e4`,name:`PRIDE: Join Watch Party Wednesdays`,thumbnail:`https://picsum.photos/seed/watch/200/120`,startsAt:Date.now()+5*n}]});return}if(a.kind===`getNotifications`){s({kind:`notifications`,notifications:r});return}if(a.kind===`markNotificationsRead`){for(let e of r)a.ids.includes(e.id)&&(e.read=!0);return}if(a.kind===`getGallery`){s({kind:`gallery`,photos:i,current:i.length,max:500});return}if(a.kind===`getGalleryPhoto`){s({kind:`galleryPhoto`,id:a.id,meta:{userName:t.hasPreviousLogin?`Mojito`:`Guest`,userAddress:t.userId,sceneName:`Genesis Plaza`,x:-9,y:14,realm:`main`,people:he.slice(0,3).map(e=>({address:e.address,name:e.name||`Guest`,isGuest:!1}))}});return}if(a.kind===`deleteGalleryPhoto`){let e=i.findIndex(e=>e.id===a.id);e>=0&&i.splice(e,1),s({kind:`gallery`,photos:i,current:i.length,max:500});return}if(a.kind===`getProfile`){s({kind:`profile`,profile:me(t.userId,t.hasPreviousLogin?`Mojito`:`Guest#beef`,!t.hasPreviousLogin)});return}if(a.kind===`getUserProfile`){let e=he.find(e=>e.address.toLowerCase()===a.address.toLowerCase())?.name||`${a.address.slice(0,6)}…${a.address.slice(-4)}`;s({kind:`userProfile`,address:a.address,profile:me(a.address,e,!1)});return}switch(a.method){case`getPreviousLogin`:s({kind:`rpc:res`,id:a.id,ok:!0,value:{userId:t.hasPreviousLogin?t.userId:null}});return;case`loginPrevious`:s({kind:`rpc:res`,id:a.id,ok:!0,value:{success:!0,error:``}}),c();return;case`loginGuest`:s({kind:`rpc:res`,id:a.id,ok:!0}),c();return;case`loginIdentity`:s({kind:`rpc:res`,id:a.id,ok:!0}),c();return;case`loginCancel`:case`logout`:s({kind:`rpc:res`,id:a.id,ok:!0});return}}}}}},()=>{a.close()}}var P=d(),F={root:`_root_byo9o_2`,tabs:`_tabs_byo9o_14`,tab:`_tab_byo9o_14`,tabActive:`_tabActive_byo9o_43`,close:`_close_byo9o_47`,searchRow:`_searchRow_byo9o_63`,searchIcon:`_searchIcon_byo9o_70`,search:`_search_byo9o_63`,body:`_body_byo9o_97`,sectionHeader:`_sectionHeader_byo9o_111`,grid:`_grid_byo9o_123`,emoji:`_emoji_byo9o_128`,noResults:`_noResults_byo9o_145`};function Se({emojis:e,onPick:t}){return(0,P.jsx)(`div`,{className:F.grid,children:e.map(e=>(0,P.jsx)(`button`,{type:`button`,className:F.emoji,title:e.expression,onClick:()=>t(e),children:e.emoji},e.code))})}function Ce({onPick:e,onClose:t}){let[n,r]=(0,A.useState)(0),[i,a]=(0,A.useState)(``),[o,s]=(0,A.useState)(()=>D()),c=t=>{e(t.emoji),s(ae(t.code))},l=i.trim(),u=(0,A.useMemo)(()=>l?oe(l,80):[],[l]),d=(0,A.useMemo)(()=>o.map(e=>k.get(e)).filter(e=>e!=null),[o]),f=O[n];return(0,P.jsxs)(`div`,{className:F.root,role:`dialog`,"aria-label":`Emoji picker`,children:[(0,P.jsxs)(`div`,{className:F.tabs,children:[O.map((e,t)=>(0,P.jsx)(`button`,{type:`button`,className:`${F.tab} ${t===n&&!l?F.tabActive:``}`.trim(),title:e.name,onClick:()=>{r(t),a(``)},children:e.icon},e.name)),(0,P.jsx)(`button`,{type:`button`,className:F.close,title:`Close`,onClick:t,children:`×`})]}),(0,P.jsxs)(`div`,{className:F.searchRow,children:[(0,P.jsx)(`span`,{className:F.searchIcon,"aria-hidden":`true`,children:`🔍`}),(0,P.jsx)(`input`,{className:F.search,value:i,onChange:e=>a(e.target.value),placeholder:`Search emoji`,onKeyDown:e=>e.stopPropagation()})]}),(0,P.jsx)(`div`,{className:F.body,children:l?u.length>0?(0,P.jsx)(Se,{emojis:u,onPick:c}):(0,P.jsx)(`div`,{className:F.noResults,children:`No results`}):(0,P.jsxs)(P.Fragment,{children:[d.length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{className:F.sectionHeader,children:`Frequently used`}),(0,P.jsx)(Se,{emojis:d,onPick:c})]}),(0,P.jsx)(`div`,{className:F.sectionHeader,children:f.name}),(0,P.jsx)(Se,{emojis:f.emojis,onPick:c})]})})]})}var we=/(?<url>https?:\/\/[^\s<>"']+)|(?<world>[a-z0-9][\w-]*\.(?:dcl\.)?eth\b)|(?<loc>-?\d{1,3}\s*,\s*-?\d{1,3})|(?<mention>@[\w-]+(?:#[\w]+)?)/gi;function Te(e){let t=[],n=0;for(let r of e.matchAll(we)){let i=r.index??0;i>n&&t.push({type:`text`,value:e.slice(n,i)});let a=r.groups??{};if(a.url)t.push({type:`url`,value:a.url});else if(a.world)t.push({type:`world`,value:a.world});else if(a.loc){let[e,n]=a.loc.split(`,`).map(e=>parseInt(e.trim(),10));t.push({type:`location`,value:a.loc,x:e,y:n})}else if(a.mention){let[e,n]=a.mention.slice(1).split(`#`);t.push({type:`mention`,value:a.mention,name:e,tag:n})}n=i+r[0].length}return n<e.length&&t.push({type:`text`,value:e.slice(n)}),t}function Ee(e){let t=new Map;for(let n of e)n.name.trim()&&(t.set(n.name.toLowerCase(),n.address),t.set(n.name.split(`#`)[0].toLowerCase(),n.address));return t}function De(e,t){return t.get(`${e.name}#${e.tag}`.toLowerCase())??t.get(e.name.toLowerCase())}function Oe(e,t,n){if(!t)return!1;let r=t.name?.split(`#`)[0].toLowerCase();return Te(e).some(e=>{if(e.type!==`mention`)return!1;let i=De(e,n);return i&&t.address&&i.toLowerCase()===t.address.toLowerCase()||!!r&&e.name.toLowerCase()===r})}function ke({text:e,members:t,styles:n,onMention:r,onLocation:i,onWorld:a}){let o=Ee(t);return(0,P.jsx)(P.Fragment,{children:Te(e).map((e,t)=>{if(e.type===`url`)return(0,P.jsx)(`a`,{className:n.url,href:e.value,target:`_blank`,rel:`noreferrer noopener`,children:e.value},t);if(e.type===`world`)return a?(0,P.jsx)(`button`,{type:`button`,className:n.world,onClick:()=>a(e.value),children:e.value},t):(0,P.jsx)(`span`,{children:e.value},t);if(e.type===`location`)return(0,P.jsx)(`button`,{type:`button`,className:n.location,onClick:()=>i(e.x,e.y),children:e.value},t);if(e.type===`mention`){let i=De(e,o);return i?(0,P.jsxs)(`button`,{type:`button`,className:n.mention,onClick:t=>r(i,e.name,t),onContextMenu:t=>r(i,e.name,t),children:[`@`,e.name]},t):(0,P.jsx)(`span`,{children:e.value},t)}return(0,P.jsx)(`span`,{children:e.value},t)})})}var Ae=t(),I={scrim:`_scrim_18d95_1`,card:`_card_18d95_7`,header:`_header_18d95_26`,copyRow:`_copyRow_18d95_35`,name:`_name_18d95_50`,tag:`_tag_18d95_54`,addr:`_addr_18d95_58`,copied:`_copied_18d95_62`,cta:`_cta_18d95_68`,ctaSent:`_ctaSent_18d95_88`,menu:`_menu_18d95_98`,row:`_row_18d95_104`,danger:`_danger_18d95_125`,divider:`_divider_18d95_129`,verified:`_verified_18d95_135`};function je(){return(0,P.jsxs)(`svg`,{className:I.verified,viewBox:`0 0 16 16`,"aria-label":`verified`,children:[(0,P.jsx)(`defs`,{children:(0,P.jsxs)(`linearGradient`,{id:`pmv`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,P.jsx)(`stop`,{offset:`0`,stopColor:`#ff2d55`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#c640cd`})]})}),(0,P.jsx)(`path`,{d:`M8 1l1.7 1.2 2.1-.2 1 1.8 1.9.9-.5 2 .9 1.9-1.6 1.4.1 2.1-2 .6-1.1 1.8-2-.7-2 .7-1.1-1.8-2-.6.1-2.1L1.6 8.6l.9-1.9-.5-2 1.9-.9 1-1.8 2.1.2z`,fill:`url(#pmv)`}),(0,P.jsx)(`path`,{d:`M5.5 8l1.7 1.7L10.8 6`,stroke:`#fff`,strokeWidth:`1.4`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Me(){return(0,P.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsx)(`rect`,{x:`9`,y:`9`,width:`11`,height:`11`,rx:`2`,stroke:`currentColor`,strokeWidth:`1.7`}),(0,P.jsx)(`path`,{d:`M5 15V5a2 2 0 0 1 2-2h8`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`})]})}function Ne(){return(0,P.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`18`,height:`18`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsx)(`circle`,{cx:`9`,cy:`8`,r:`3.4`,stroke:`currentColor`,strokeWidth:`1.9`}),(0,P.jsx)(`path`,{d:`M3.5 19c0-3.1 2.5-4.8 5.5-4.8`,stroke:`currentColor`,strokeWidth:`1.9`,strokeLinecap:`round`}),(0,P.jsx)(`path`,{d:`M18 8v6M15 11h6`,stroke:`currentColor`,strokeWidth:`1.9`,strokeLinecap:`round`})]})}function Pe(){return(0,P.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`20`,height:`20`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`14`,rx:`2.5`,stroke:`currentColor`,strokeWidth:`1.8`}),(0,P.jsx)(`circle`,{cx:`8.5`,cy:`12`,r:`2.2`,stroke:`currentColor`,strokeWidth:`1.7`}),(0,P.jsx)(`path`,{d:`M13.5 10.5h4M13.5 14h2.5`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`})]})}function Fe(){return(0,P.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`20`,height:`20`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`,stroke:`currentColor`,strokeWidth:`1.8`}),(0,P.jsx)(`path`,{d:`M16 8.5V13a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-3.6 7.2`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`})]})}function Ie(){return(0,P.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`20`,height:`20`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsx)(`circle`,{cx:`10`,cy:`8`,r:`3.4`,stroke:`currentColor`,strokeWidth:`1.8`}),(0,P.jsx)(`path`,{d:`M4 19c0-3.2 2.7-5 6-5 1 0 2 .2 2.8.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`}),(0,P.jsx)(`circle`,{cx:`17.5`,cy:`16.5`,r:`4.2`,stroke:`currentColor`,strokeWidth:`1.8`}),(0,P.jsx)(`path`,{d:`M14.7 13.7l5.6 5.6`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`})]})}function Le(e){return!!e&&!e.includes(`#`)&&!/^0x[0-9a-f]+$/i.test(e)}function Re({user:e,x:t,y:n,me:r,relationship:i=`none`,onAddFriend:o,onMention:s,onViewProfile:c,onBlock:l,onClose:u}){let[d,f]=(0,A.useState)(null),[p,m]=(0,A.useState)(!1);(0,A.useEffect)(()=>{if(!p)return;let e=setTimeout(u,1100);return()=>clearTimeout(e)},[p,u]),(0,A.useEffect)(()=>{if(!d)return;let e=setTimeout(()=>f(null),1200);return()=>clearTimeout(e)},[d]);let h=(0,A.useRef)(null),[g,v]=(0,A.useState)({left:t,top:n});(0,A.useLayoutEffect)(()=>{let e=h.current;if(!e)return;let r=e.getBoundingClientRect();v({left:Math.max(8,Math.min(t,window.innerWidth-r.width-8)),top:Math.max(8,Math.min(n,window.innerHeight-r.height-8))})},[t,n]);let y=!!r?.address&&!!e.address&&r.address.toLowerCase()===e.address.toLowerCase(),{base:b,tag:x}=S(e.name),ee=_(e.address||e.name),te=(e,t)=>{navigator.clipboard?.writeText(e).then(()=>f(t),()=>{})};return(0,Ae.createPortal)((0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{className:I.scrim,onClick:u}),(0,P.jsxs)(`div`,{ref:h,className:I.card,style:{left:g.left,top:g.top},onClick:e=>e.stopPropagation(),role:`dialog`,"aria-label":`Profile`,children:[(0,P.jsxs)(`div`,{className:I.header,children:[(0,P.jsx)(a,{src:e.picture,name:b,color:ee,size:72,status:`online`}),(0,P.jsxs)(`button`,{type:`button`,className:I.copyRow,title:`Copy name`,onClick:()=>te(e.name,`name`),children:[(0,P.jsxs)(`span`,{className:I.name,style:{color:ee},children:[b,x&&(0,P.jsx)(`span`,{className:I.tag,children:x})]}),Le(e.name)&&(0,P.jsx)(je,{}),(0,P.jsx)(Me,{})]}),e.address&&(0,P.jsxs)(`button`,{type:`button`,className:`${I.copyRow} ${I.addrRow}`,title:`Copy address`,onClick:()=>te(e.address,`address`),children:[(0,P.jsx)(`span`,{className:I.addr,children:C(e.address)}),(0,P.jsx)(Me,{})]}),d&&(0,P.jsxs)(`span`,{className:I.copied,children:[`Copied `,d]})]}),!y&&e.address&&o&&i!==`friend`&&(p||i===`requested`?(0,P.jsx)(`div`,{className:`${I.cta} ${I.ctaSent}`,children:`✓ REQUEST SENT`}):(0,P.jsxs)(`button`,{type:`button`,className:I.cta,onClick:()=>{o(e.address),m(!0)},children:[(0,P.jsx)(Ne,{}),` ADD FRIEND`]})),!y&&(s||c||l)&&(0,P.jsxs)(`div`,{className:I.menu,children:[s&&(0,P.jsxs)(`button`,{type:`button`,className:I.row,onClick:()=>{s(b),u()},children:[(0,P.jsx)(Fe,{}),(0,P.jsx)(`span`,{children:`Mention`})]}),c&&(0,P.jsxs)(`button`,{type:`button`,className:I.row,onClick:()=>{c(e),u()},children:[(0,P.jsx)(Pe,{}),(0,P.jsx)(`span`,{children:`View Profile`})]}),l&&e.address&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{className:I.divider}),(0,P.jsxs)(`button`,{type:`button`,className:`${I.row} ${I.danger}`,onClick:()=>{l(e.address),u()},children:[(0,P.jsx)(Ie,{}),(0,P.jsx)(`span`,{children:`Block`})]})]})]})]})]}),document.body)}var L={root:`_root_1cj0w_4`,open:`_open_1cj0w_24`,active:`_active_1cj0w_31`,messages:`_messages_1cj0w_40`,nav:`_nav_1cj0w_45`,navLeft:`_navLeft_1cj0w_57`,channelIcon:`_channelIcon_1cj0w_64`,navTitle:`_navTitle_1cj0w_69`,navRight:`_navRight_1cj0w_76`,glyph:`_glyph_1cj0w_83`,glyphLg:`_glyphLg_1cj0w_86`,empty:`_empty_1cj0w_114`,dayRow:`_dayRow_1cj0w_121`,dayPill:`_dayPill_1cj0w_126`,entry:`_entry_1cj0w_137`,bubble:`_bubble_1cj0w_142`,name:`_name_1cj0w_152`,tag:`_tag_1cj0w_157`,text:`_text_1cj0w_161`,time:`_time_1cj0w_169`,pickerWrap:`_pickerWrap_1cj0w_176`,suggest:`_suggest_1cj0w_177`,suggestList:`_suggestList_1cj0w_191`,suggestItem:`_suggestItem_1cj0w_199`,suggestActive:`_suggestActive_1cj0w_215`,suggestGlyph:`_suggestGlyph_1cj0w_219`,suggestName:`_suggestName_1cj0w_223`,noResults:`_noResults_1cj0w_226`,inputRow:`_inputRow_1cj0w_235`,input:`_input_1cj0w_235`,inputBare:`_inputBare_1cj0w_264`,ring:`_ring_1cj0w_268`,emojiBtn:`_emojiBtn_1cj0w_277`,membersPanel:`_membersPanel_1cj0w_285`,membersHeader:`_membersHeader_1cj0w_293`,back:`_back_1cj0w_302`,membersTitle:`_membersTitle_1cj0w_319`,membersCount:`_membersCount_1cj0w_324`,personIcon:`_personIcon_1cj0w_333`,membersList:`_membersList_1cj0w_337`,memberRow:`_memberRow_1cj0w_350`,memberInfo:`_memberInfo_1cj0w_360`,memberName:`_memberName_1cj0w_366`,memberStatus:`_memberStatus_1cj0w_375`,avatarBtn:`_avatarBtn_1cj0w_395`,url:`_url_1cj0w_406`,location:`_location_1cj0w_414`,mention:`_mention_1cj0w_415`,world:`_world_1cj0w_416`,mentionMe:`_mentionMe_1cj0w_432`},ze=500,Be=/^0x[0-9a-fA-F]{6,}$/,Ve=[`#73d3d3`,`#acf8f8`,`#ff8362`,`#ff4bed`,`#caff73`,`#a14bf3`,`#e8b9ff`,`#fea217`,`#81e1ff`,`#ff7439`,`#ffa25a`,`#ffc95b`,`#a0abff`,`#c640cd`],He=`#61d04f`;function Ue(e){return!e||e.toLowerCase()===`system`}function We(e){return Be.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function Ge(e){return Ue(e)?`DCL System`:We(e)}function Ke(e){return e.name.trim()?e.name:We(e.address)}function qe(e){let t=e.indexOf(`#`);return t>=0?{base:e.slice(0,t),tag:e.slice(t)}:{base:e,tag:``}}function Je(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return t}function Ye(e){return Ue(e)?He:Ve[Je(e)%Ve.length]}function Xe(e){return new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function Ze(e){let t=new Date(e);return`${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`}function Qe(e){return Ze(e)===Ze(Date.now())?`Today`:new Date(e).toLocaleDateString([],{weekday:`short`,day:`numeric`,month:`short`})}function $e(){return(0,P.jsxs)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsx)(`circle`,{cx:`8`,cy:`5`,r:`2.6`,stroke:`currentColor`,strokeWidth:`1.4`}),(0,P.jsx)(`path`,{d:`M3.2 13c0-2.4 2.1-3.8 4.8-3.8s4.8 1.4 4.8 3.8`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`})]})}function et(){return(0,P.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 22 22`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsx)(`circle`,{cx:`11`,cy:`11`,r:`10`,stroke:`currentColor`,strokeWidth:`2`}),(0,P.jsx)(`circle`,{cx:`7.6`,cy:`9`,r:`1.15`,fill:`currentColor`}),(0,P.jsx)(`circle`,{cx:`14.4`,cy:`9`,r:`1.15`,fill:`currentColor`}),(0,P.jsx)(`path`,{d:`M7 13.4c1 1.6 2.5 2.4 4 2.4s3-.8 4-2.4`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`})]})}function tt({len:e}){let t=Math.min(1,e/ze),n=2*Math.PI*8,r=t>=.9?`var(--brand)`:t>=.7?`var(--gold)`:`var(--green)`;return(0,P.jsxs)(`svg`,{className:L.ring,width:`20`,height:`20`,viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,P.jsx)(`circle`,{cx:`10`,cy:`10`,r:8,fill:`none`,stroke:`rgba(255,255,255,0.25)`,strokeWidth:`2`}),(0,P.jsx)(`circle`,{cx:`10`,cy:`10`,r:8,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeDasharray:n,strokeDashoffset:n*(1-t),transform:`rotate(-90 10 10)`})]})}function nt({ts:e}){return(0,P.jsx)(`div`,{className:L.dayRow,children:(0,P.jsx)(`span`,{className:L.dayPill,children:Qe(e)})})}var rt={url:L.url,mention:L.mention,location:L.location,world:L.world};function it({line:e,name:t,picture:n,members:r=[],me:i,onOpenProfile:o,onLocation:s,onVisitWorld:c}){let l=Ye(e.sender),{base:u,tag:d}=qe(t),f={address:e.sender,name:t,picture:n},p=Oe(e.message,i??null,Ee(r)),m=e=>{e.type===`contextmenu`&&e.preventDefault(),o?.(f,e)};return(0,P.jsxs)(`div`,{className:`${L.entry} ${p?L.mentionMe:``}`.trim(),children:[(0,P.jsx)(`button`,{type:`button`,className:L.avatarBtn,"aria-label":`View ${u}`,onClick:m,onContextMenu:m,children:(0,P.jsx)(a,{src:n,name:t,color:l,size:28})}),(0,P.jsxs)(`div`,{className:L.bubble,children:[(0,P.jsxs)(`button`,{type:`button`,className:L.name,style:{color:l},onClick:m,onContextMenu:m,children:[u,d&&(0,P.jsx)(`span`,{className:L.tag,children:d})]}),(0,P.jsx)(`span`,{className:L.text,children:(0,P.jsx)(ke,{text:e.message,members:r,styles:rt,onMention:(e,t,n)=>{n.type===`contextmenu`&&n.preventDefault();let i=r.find(t=>t.address.toLowerCase()===e.toLowerCase());o?.({address:e,name:i?.name??`@${t}`,picture:i?.picture},n)},onLocation:(e,t)=>s?.(e,t),onWorld:c})}),(0,P.jsx)(`span`,{className:L.time,children:Xe(e.ts)})]})]})}function at({member:e}){let{base:t,tag:n}=qe(Ke(e)),r=Ye(e.address);return(0,P.jsxs)(`div`,{className:L.memberRow,children:[(0,P.jsx)(a,{src:e.picture,name:t,color:r,size:40,status:`online`}),(0,P.jsxs)(`div`,{className:L.memberInfo,children:[(0,P.jsxs)(`span`,{className:L.memberName,style:{color:r},children:[t,n&&(0,P.jsx)(`span`,{className:L.tag,children:n})]}),(0,P.jsx)(`span`,{className:L.memberStatus,children:`Online`})]})]})}function ot({members:e,onBack:t,onClose:n}){return(0,P.jsxs)(`div`,{className:L.membersPanel,children:[(0,P.jsxs)(`header`,{className:L.membersHeader,children:[(0,P.jsx)(o,{variant:`ghost`,className:L.glyphLg,"aria-label":`Back`,onClick:t,children:`‹`}),(0,P.jsx)(`span`,{className:L.membersTitle,children:`Nearby`}),(0,P.jsxs)(`span`,{className:L.membersCount,children:[(0,P.jsx)(`span`,{className:L.personIcon,"aria-hidden":`true`,children:`●`}),e.length,` Online`]}),(0,P.jsx)(o,{variant:`solid`,className:L.glyph,"aria-label":`Close chat`,onClick:n,children:`×`})]}),(0,P.jsx)(`div`,{className:L.membersList,children:e.length===0?(0,P.jsx)(`div`,{className:L.empty,children:`No one nearby`}):e.map(e=>(0,P.jsx)(at,{member:e},e.address))})]})}function st({chat:e,hidden:t=!1,me:n,onAddFriend:r,onBlock:i,onViewProfile:s,onTeleport:l,onVisitWorld:u,relationshipOf:d}){let[f,p]=(0,A.useState)(``),[m,h]=(0,A.useState)(!1),[g,_]=(0,A.useState)(!1),[v,y]=(0,A.useState)([]),[b,x]=(0,A.useState)(null),[S,ee]=(0,A.useState)(!1),[te,C]=(0,A.useState)(!1),[w,ne]=(0,A.useState)(null),[re,ie]=(0,A.useState)(null),[T,E]=(0,A.useState)([]),ae=(0,A.useRef)(null),D=(0,A.useRef)(null),O=e.open,k=O&&(S||te||m),ce=!k,le=(0,A.useMemo)(()=>{let t=new Map;for(let n of e.members)n.name.trim()&&t.set(n.address.toLowerCase(),n.name);return t},[e.members]),ue=(0,A.useMemo)(()=>{let t=new Map;for(let n of e.members)n.picture&&t.set(n.address.toLowerCase(),n.picture);return t},[e.members]),de=e=>le.get(e.toLowerCase())??Ge(e),fe=(0,A.useMemo)(()=>{let t=[],n=``;for(let r of e.messages){let e=Ze(r.ts);e!==n&&(t.push({kind:`day`,ts:r.ts,id:`day-${e}`}),n=e),t.push({kind:`msg`,line:r})}return t},[e.messages]);(0,A.useEffect)(()=>{if(!O)return;let e=ae.current;e&&(e.scrollTop=e.scrollHeight)},[e.messages,O,k]),(0,A.useEffect)(()=>{O&&D.current?.focus()},[O]),(0,A.useEffect)(()=>{k||_(!1)},[k]);let pe=()=>{e.open||e.toggle()},me=(e,t)=>{ne({user:e,x:t.clientX,y:t.clientY})},he=e=>{p(t=>`${t.replace(/\s*$/,``)} @${e} `.trimStart()),pe(),D.current?.focus()},j=/@([\w-]*)$/,ge=t=>{p(t);let n=t.match(se);x(n?n[1]:null),y(n?oe(n[1]):[]);let r=t.match(j);ie(r?r[1]:null);let i=(r?.[1]??``).toLowerCase();E(r?e.members.filter(e=>(e.name||e.address).toLowerCase().includes(i)).slice(0,6):[])},_e=e=>{let t=e.name.trim()?e.name.split(`#`)[0]:e.address;p(e=>e.replace(j,`@${t} `)),E([]),ie(null),D.current?.focus()},M=e=>{p(t=>{let n=t.match(se);return(n?t.slice(0,n.index):t)+e}),y([]),x(null),D.current?.focus()},N=()=>{f.trim()&&(e.send(f),p(``),y([]),x(null),E([]),ie(null))};return t?null:(0,P.jsxs)(`div`,{className:`${L.root} ${O?L.open:``} ${k?L.active:``}`.trim(),onMouseEnter:()=>ee(!0),onMouseLeave:()=>ee(!1),children:[O&&k&&(0,P.jsxs)(`header`,{className:L.nav,children:[(0,P.jsxs)(`div`,{className:L.navLeft,children:[(0,P.jsx)(c,{size:26,className:L.channelIcon}),(0,P.jsx)(`span`,{className:L.navTitle,children:`Nearby`})]}),(0,P.jsxs)(`div`,{className:L.navRight,children:[e.members.length>0&&(0,P.jsxs)(o,{variant:`ghost`,shape:`pill`,active:g,"aria-label":`${e.members.length} nearby`,onClick:()=>_(e=>!e),children:[(0,P.jsx)($e,{}),e.members.length]}),(0,P.jsx)(o,{variant:`solid`,className:L.glyph,"aria-label":`Close chat`,onClick:e.toggle,children:`×`})]})]}),O&&(0,P.jsx)(`div`,{ref:ae,className:L.messages,children:fe.length===0?(0,P.jsx)(`div`,{className:L.empty,children:`No messages yet`}):fe.map(t=>t.kind===`day`?(0,P.jsx)(nt,{ts:t.ts},t.id):(0,P.jsx)(it,{line:t.line,name:de(t.line.sender),picture:ue.get(t.line.sender.toLowerCase()),members:e.members,me:n,onOpenProfile:me,onLocation:(e,t)=>l?.(e,t),onVisitWorld:u},t.line.id))}),k&&m&&(0,P.jsx)(`div`,{className:L.pickerWrap,children:(0,P.jsx)(Ce,{onPick:M,onClose:()=>h(!1)})}),k&&re!=null&&T.length>0&&(0,P.jsx)(`div`,{className:L.suggest,children:(0,P.jsx)(`ul`,{className:L.suggestList,children:T.map((e,t)=>(0,P.jsx)(`li`,{children:(0,P.jsxs)(`button`,{type:`button`,className:`${L.suggestItem} ${t===0?L.suggestActive:``}`.trim(),onClick:()=>_e(e),children:[(0,P.jsx)(a,{src:e.picture,name:e.name,color:Ye(e.address),size:20}),(0,P.jsx)(`span`,{className:L.suggestName,children:e.name||We(e.address)})]})},e.address))})}),k&&b!=null&&(0,P.jsx)(`div`,{className:L.suggest,children:v.length===0?(0,P.jsx)(`div`,{className:L.noResults,children:`No results`}):(0,P.jsx)(`ul`,{className:L.suggestList,children:v.map((e,t)=>(0,P.jsx)(`li`,{children:(0,P.jsxs)(`button`,{type:`button`,className:`${L.suggestItem} ${t===0?L.suggestActive:``}`.trim(),onClick:()=>M(e.emoji),children:[(0,P.jsx)(`span`,{className:L.suggestGlyph,children:e.emoji}),(0,P.jsx)(`span`,{className:L.suggestName,children:e.expression})]})},e.code))})}),(0,P.jsxs)(`form`,{className:L.inputRow,onSubmit:e=>{e.preventDefault(),N()},children:[(0,P.jsx)(`input`,{ref:D,className:`${L.input} ${ce?L.inputBare:``}`.trim(),value:f,onChange:e=>ge(e.target.value),onFocus:()=>{C(!0),pe()},onBlur:()=>C(!1),placeholder:te?`Message Nearby`:`Press Enter to chat`,maxLength:ze,onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`?(e.preventDefault(),T.length>0?_e(T[0]):v.length>0?M(v[0].emoji):N()):e.key===`Escape`&&(re==null?b==null?m&&h(!1):(x(null),y([])):(ie(null),E([])))}}),!ce&&f.length>0&&(0,P.jsx)(tt,{len:f.length}),!ce&&(0,P.jsx)(o,{variant:`ghost`,size:`sm`,active:m,className:L.emojiBtn,"aria-label":`Emoji`,onClick:()=>{pe(),h(e=>!e)},children:(0,P.jsx)(et,{})})]}),O&&k&&g&&(0,P.jsx)(ot,{members:e.members,onBack:()=>_(!1),onClose:()=>{_(!1),e.toggle()}}),w&&(0,P.jsx)(Re,{user:w.user,x:w.x,y:w.y,me:n,relationship:w.user.address?d?.(w.user.address):void 0,onAddFriend:r,onBlock:i,onViewProfile:s,onMention:he,onClose:()=>ne(null)})]})}var R={root:`_root_hrk0u_5`,tabs:`_tabs_hrk0u_25`,tab:`_tab_hrk0u_25`,tabActive:`_tabActive_hrk0u_55`,tabBadge:`_tabBadge_hrk0u_59`,closeGlyph:`_closeGlyph_hrk0u_72`,body:`_body_hrk0u_77`,sectionHead:`_sectionHead_hrk0u_92`,chev:`_chev_hrk0u_108`,chevOpen:`_chevOpen_hrk0u_113`,row:`_row_hrk0u_117`,info:`_info_hrk0u_127`,name:`_name_hrk0u_134`,verified:`_verified_hrk0u_146`,tag:`_tag_hrk0u_151`,status:`_status_hrk0u_155`,online:`_online_hrk0u_160`,sub:`_sub_hrk0u_163`,date:`_date_hrk0u_173`,actions:`_actions_hrk0u_178`,empty:`_empty_hrk0u_190`,placeholder:`_placeholder_hrk0u_197`,phIcon:`_phIcon_hrk0u_205`,phTitle:`_phTitle_hrk0u_216`,phText:`_phText_hrk0u_221`,rowBtn:`_rowBtn_hrk0u_229`};function ct(e,t){return e.trim()?e:C(t)}function lt(e){return e.trim().length>0&&!e.includes(`#`)&&!/^0x[0-9a-f]+$/i.test(e)}function ut(){return(0,P.jsxs)(`svg`,{className:R.verified,viewBox:`0 0 16 16`,"aria-label":`verified`,children:[(0,P.jsx)(`defs`,{children:(0,P.jsxs)(`linearGradient`,{id:`vrf`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,P.jsx)(`stop`,{offset:`0`,stopColor:`#ff2d55`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#c640cd`})]})}),(0,P.jsx)(`path`,{d:`M8 1l1.7 1.2 2.1-.2 1 1.8 1.9.9-.5 2 .9 1.9-1.6 1.4.1 2.1-2 .6-1.1 1.8-2-.7-2 .7-1.1-1.8-2-.6.1-2.1L1.6 8.6l.9-1.9-.5-2 1.9-.9 1-1.8 2.1.2z`,fill:`url(#vrf)`}),(0,P.jsx)(`path`,{d:`M5.5 8l1.7 1.7L10.8 6`,stroke:`#fff`,strokeWidth:`1.4`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function dt({name:e,address:t}){let{base:n,tag:r}=S(ct(e,t));return(0,P.jsxs)(`span`,{className:R.name,style:{color:_(t)},children:[n,lt(e)&&(0,P.jsx)(ut,{}),r&&(0,P.jsx)(`span`,{className:R.tag,children:r})]})}function ft({open:e}){return(0,P.jsx)(`svg`,{className:`${R.chev} ${e?R.chevOpen:``}`.trim(),viewBox:`0 0 12 12`,"aria-hidden":`true`,children:(0,P.jsx)(`path`,{d:`M2.5 7.5L6 4l3.5 3.5`,stroke:`currentColor`,strokeWidth:`1.6`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function pt({title:e,count:t,children:n}){let[r,i]=(0,A.useState)(!0);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`button`,{type:`button`,className:R.sectionHead,onClick:()=>i(e=>!e),children:[(0,P.jsx)(ft,{open:r}),e,` (`,t,`)`]}),r&&n]})}var mt={online:`Online`,away:`Away`,offline:`Offline`};function ht({friend:e,onOpen:t}){let n={address:e.address,name:e.name,picture:e.picture},r=e=>{e.type===`contextmenu`&&e.preventDefault(),t?.(n,e)};return(0,P.jsxs)(`button`,{type:`button`,className:`${R.row} ${R.rowBtn}`,onClick:r,onContextMenu:r,children:[(0,P.jsx)(a,{src:e.picture,name:ct(e.name,e.address),color:_(e.address),size:40,status:e.status}),(0,P.jsxs)(`div`,{className:R.info,children:[(0,P.jsx)(dt,{name:e.name,address:e.address}),(0,P.jsx)(`span`,{className:`${R.status} ${R[e.status]}`,children:mt[e.status]})]})]})}function gt(e){return e?new Date(e).toLocaleDateString([],{month:`short`,day:`numeric`}).toUpperCase():``}function _t({req:e,onAccept:t,onReject:n}){return(0,P.jsxs)(`div`,{className:R.row,children:[(0,P.jsx)(a,{src:e.picture,name:ct(e.name,e.address),color:_(e.address),size:40}),(0,P.jsxs)(`div`,{className:R.info,children:[(0,P.jsx)(dt,{name:e.name,address:e.address}),e.message&&(0,P.jsx)(`span`,{className:R.sub,children:e.message})]}),(0,P.jsx)(`span`,{className:R.date,children:gt(e.createdAt)}),(0,P.jsxs)(`div`,{className:R.actions,children:[(0,P.jsx)(r,{variant:`secondary`,size:`sm`,onClick:n,children:`Delete`}),(0,P.jsx)(r,{variant:`primary`,size:`sm`,onClick:t,children:`Accept`})]})]})}function vt({req:e,onCancel:t}){return(0,P.jsxs)(`div`,{className:R.row,children:[(0,P.jsx)(a,{src:e.picture,name:ct(e.name,e.address),color:_(e.address),size:40}),(0,P.jsxs)(`div`,{className:R.info,children:[(0,P.jsx)(dt,{name:e.name,address:e.address}),(0,P.jsx)(`span`,{className:R.sub,children:`Request sent`})]}),(0,P.jsx)(`span`,{className:R.date,children:gt(e.createdAt)}),(0,P.jsx)(`div`,{className:R.actions,children:(0,P.jsx)(r,{variant:`secondary`,size:`sm`,onClick:t,children:`Cancel`})})]})}function yt({friends:e,me:t,relationshipOf:n,onAddFriend:i,onViewProfile:s,onBlock:c}){let[l,u]=(0,A.useState)(`friends`),[d,f]=(0,A.useState)(null),p=(e,t)=>f({user:e,x:t.clientX,y:t.clientY}),{online:m,offline:h}=(0,A.useMemo)(()=>{let t=[],n=[];for(let r of[...e.list].sort((e,t)=>e.name.localeCompare(t.name)))(r.status===`offline`?n:t).push(r);return{online:t,offline:n}},[e.list]);if(!e.open)return null;let g=[{id:`friends`,label:`Friends`},{id:`requests`,label:`Requests`,badge:e.received.length},{id:`blocked`,label:`Blocked`}];return(0,P.jsxs)(`div`,{className:R.root,children:[(0,P.jsxs)(`header`,{className:R.tabs,children:[g.map(e=>(0,P.jsxs)(`button`,{type:`button`,className:`${R.tab} ${l===e.id?R.tabActive:``}`.trim(),onClick:()=>u(e.id),children:[e.label,e.badge?(0,P.jsx)(`span`,{className:R.tabBadge,children:e.badge}):null]},e.id)),(0,P.jsx)(o,{variant:`solid`,className:R.closeGlyph,"aria-label":`Close friends`,onClick:e.toggle,children:`×`})]}),(0,P.jsx)(`div`,{className:R.body,children:e.available?l===`friends`?e.list.length===0?(0,P.jsx)(`div`,{className:R.empty,children:`No friends yet.`}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(pt,{title:`Online`,count:m.length,children:m.map(e=>(0,P.jsx)(ht,{friend:e,onOpen:p},e.address))}),(0,P.jsx)(pt,{title:`Offline`,count:h.length,children:h.map(e=>(0,P.jsx)(ht,{friend:e,onOpen:p},e.address))})]}):l===`requests`?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(pt,{title:`Received`,count:e.received.length,children:e.received.length===0?(0,P.jsx)(`div`,{className:R.empty,children:`No Requests`}):e.received.map(t=>(0,P.jsx)(_t,{req:t,onAccept:()=>e.act(`accept`,t.address),onReject:()=>e.act(`reject`,t.address)},t.id))}),(0,P.jsx)(pt,{title:`Sent`,count:e.sent.length,children:e.sent.length===0?(0,P.jsx)(`div`,{className:R.empty,children:`No Requests`}):e.sent.map(t=>(0,P.jsx)(vt,{req:t,onCancel:()=>e.act(`cancel`,t.address)},t.id))})]}):e.blocked.length===0?(0,P.jsxs)(`div`,{className:R.placeholder,children:[(0,P.jsx)(`div`,{className:R.phIcon,"aria-hidden":`true`,children:`⊘`}),(0,P.jsx)(`div`,{className:R.phTitle,children:`No Blocked Accounts`}),(0,P.jsx)(`div`,{className:R.phText,children:`If you block someone, you won’t see each other in-world or exchange messages, and their name and messages are hidden in public chats.`})]}):e.blocked.map(t=>(0,P.jsxs)(`div`,{className:R.row,children:[(0,P.jsx)(a,{name:C(t),color:_(t),size:40}),(0,P.jsx)(`div`,{className:R.info,children:(0,P.jsx)(`span`,{className:R.name,children:C(t)})}),(0,P.jsx)(`div`,{className:R.actions,children:(0,P.jsx)(r,{variant:`secondary`,size:`sm`,onClick:()=>e.act(`unblock`,t),children:`Unblock`})})]},t)):(0,P.jsxs)(`div`,{className:R.placeholder,children:[(0,P.jsx)(`div`,{className:R.phTitle,children:`Friends aren’t available`}),(0,P.jsx)(`div`,{className:R.phText,children:`Sign in with a wallet to add and manage friends.`})]})}),d&&(0,P.jsx)(Re,{user:d.user,x:d.x,y:d.y,me:t,relationship:n?.(d.user.address)??`friend`,onAddFriend:i,onViewProfile:s,onBlock:c,onClose:()=>f(null)})]})}var z={head:`_head_1bdpk_2`,title:`_title_1bdpk_8`,tabs:`_tabs_1bdpk_14`,tab:`_tab_1bdpk_14`,tabActive:`_tabActive_1bdpk_34`,reset:`_reset_1bdpk_41`,card:`_card_1bdpk_61`,grid:`_grid_1bdpk_68`,field:`_field_1bdpk_75`,fieldHead:`_fieldHead_1bdpk_80`,label:`_label_1bdpk_86`,value:`_value_1bdpk_91`,empty:`_empty_1bdpk_97`};function bt(e){return e.replace(/[_-]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function xt(e){return e.namedVariants.length===2||e.namedVariants.length===0&&e.maxValue-e.minValue<=1&&e.stepSize>=1}function St(e){return!xt(e)&&e.namedVariants.length<=2}function Ct({s:e,onSet:t}){return xt(e)?(0,P.jsx)(s,{checked:e.value>=1,onChange:n=>t(e.name,+!!n),"aria-label":e.name}):e.namedVariants.length>2?(0,P.jsx)(u,{variant:`light`,value:String(e.value),options:e.namedVariants.map((e,t)=>({value:String(t),label:e.name})),onChange:n=>t(e.name,Number(n)),"aria-label":e.name}):(0,P.jsx)(l,{arrows:!0,value:e.value,min:e.minValue,max:e.maxValue,step:e.stepSize||1,onChange:n=>t(e.name,n),"aria-label":e.name})}var wt=(0,A.memo)(function({s:e,onSet:t}){return(0,P.jsxs)(`div`,{className:z.field,children:[(0,P.jsxs)(`div`,{className:z.fieldHead,children:[(0,P.jsx)(`span`,{className:z.label,children:bt(e.name)}),St(e)&&(0,P.jsx)(`span`,{className:z.value,children:e.value})]}),(0,P.jsx)(Ct,{s:e,onSet:t})]})},(e,t)=>e.s.name===t.s.name&&e.s.value===t.s.value&&e.onSet===t.onSet);function Tt({settings:e,profile:t,onNavigate:n}){let r=(0,A.useMemo)(()=>[...new Set(e.list.map(e=>e.category))],[e.list]),[i,a]=(0,A.useState)(null);if(!e.open)return null;let o=i&&r.includes(i)?i:r[0],s=e.list.filter(e=>e.category===o),c=()=>s.forEach(t=>e.set(t.name,t.default)),l=t.data;return(0,P.jsxs)(ie,{active:`settings`,profileName:l?.name,profilePicture:l?.picture,profileAddress:l?.address,profileClaimed:l?.hasClaimedName,onNavigate:n,onClose:e.toggle,children:[(0,P.jsxs)(`div`,{className:z.head,children:[(0,P.jsx)(`h1`,{className:z.title,children:`Settings`}),(0,P.jsx)(`div`,{className:z.tabs,children:r.map(e=>(0,P.jsx)(`button`,{type:`button`,className:`${z.tab} ${e===o?z.tabActive:``}`.trim(),onClick:()=>a(e),children:bt(e)},e))}),(0,P.jsx)(`button`,{type:`button`,className:z.reset,onClick:c,children:`↺ Reset all defaults`})]}),(0,P.jsx)(`div`,{className:z.card,children:s.length===0?(0,P.jsx)(`div`,{className:z.empty,children:`No settings available.`}):(0,P.jsx)(`div`,{className:z.grid,children:s.map(t=>(0,P.jsx)(wt,{s:t,onSet:e.set},t.name))})})]})}var B={root:`_root_fhnuh_2`,head:`_head_fhnuh_21`,title:`_title_fhnuh_30`,closeGlyph:`_closeGlyph_fhnuh_35`,body:`_body_fhnuh_39`,name:`_name_fhnuh_48`,tag:`_tag_fhnuh_58`,addr:`_addr_fhnuh_62`,guest:`_guest_fhnuh_67`,desc:`_desc_fhnuh_75`,links:`_links_fhnuh_81`,link:`_link_fhnuh_81`,empty:`_empty_fhnuh_101`};function Et({profile:e}){if(!e.open)return null;let t=e.data,{base:n,tag:r}=S(t?t.name.trim()?t.name:C(t.address):``),i=t?_(t.address):`var(--fill-4)`;return(0,P.jsxs)(`div`,{className:B.root,children:[(0,P.jsxs)(`header`,{className:B.head,children:[(0,P.jsx)(`span`,{className:B.title,children:`Profile`}),(0,P.jsx)(o,{variant:`solid`,className:B.closeGlyph,"aria-label":`Close profile`,onClick:e.toggle,children:`×`})]}),t?(0,P.jsxs)(`div`,{className:B.body,children:[(0,P.jsx)(a,{src:t.picture,name:n,color:i,size:88,status:`online`}),(0,P.jsxs)(`div`,{className:B.name,style:{color:i},children:[n,r&&(0,P.jsx)(`span`,{className:B.tag,children:r})]}),(0,P.jsx)(`div`,{className:B.addr,children:C(t.address)}),t.isGuest&&(0,P.jsx)(`span`,{className:B.guest,children:`Guest`}),t.description&&(0,P.jsx)(`p`,{className:B.desc,children:t.description}),t.links&&t.links.length>0&&(0,P.jsx)(`div`,{className:B.links,children:t.links.map(e=>(0,P.jsx)(`a`,{className:B.link,href:e.url,target:`_blank`,rel:`noreferrer`,children:e.title},e.url))})]}):(0,P.jsx)(`div`,{className:B.empty,children:`Profile unavailable.`})]})}var V={root:`_root_8hwrw_2`,head:`_head_8hwrw_21`,heading:`_heading_8hwrw_30`,markRead:`_markRead_8hwrw_36`,closeGlyph:`_closeGlyph_8hwrw_48`,body:`_body_8hwrw_52`,row:`_row_8hwrw_66`,unread:`_unread_8hwrw_77`,thumb:`_thumb_8hwrw_81`,img:`_img_8hwrw_92`,dot:`_dot_8hwrw_97`,info:`_info_8hwrw_104`,title:`_title_8hwrw_111`,bodyText:`_bodyText_8hwrw_120`,time:`_time_8hwrw_130`,unreadDot:`_unreadDot_8hwrw_136`,empty:`_empty_8hwrw_146`};function Dt(e){return e.replace(/[_-]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function H(e,...t){for(let n of t){let t=e[n];if(typeof t==`string`&&t)return t}}function Ot(e,t,...n){let r=e[t];if(r&&typeof r==`object`)return H(r,...n)}function kt(e){let t=new Date(e).getTime();if(Number.isNaN(t))return``;let n=Math.floor((Date.now()-t)/6e4);if(n<1)return`now`;if(n<60)return`${n}m`;let r=Math.floor(n/60);if(r<24)return`${r}h`;let i=Math.floor(r/24);return i<7?`${i}d`:new Date(t).toLocaleDateString([],{month:`short`,day:`numeric`})}function At(e){return H(e,`image`,`thumbnail`,`thumbnailUrl`,`tokenImage`,`profileImageUrl`)??Ot(e,`sender`,`profileImageUrl`,`image`)}var jt={social_service_friendship_request:`wants to be your friend!`,social_service_friendship_accepted:`accepted your friend request.`},U=e=>H(e,`communityName`)??`a community`,Mt={community_post_added:e=>({title:`New Community Announcement`,body:`A new announcement was posted in ${U(e)}.`}),community_invite_received:e=>({title:`Community Invite Received`,body:`You've been invited to join ${U(e)}.`}),community_voice_chat_started:e=>({title:`Community Voice Stream Started`,body:`${U(e)} is streaming — click to join.`}),community_renamed:e=>({title:`Community Renamed`,body:`${H(e,`oldName`)??`A community`} was renamed to ${H(e,`newName`)??U(e)}.`}),community_request_to_join_received:e=>({title:`Membership Request Received`,body:`${H(e,`userName`,`memberName`)??`Someone`} wants to join ${U(e)}.`}),community_request_to_join_accepted:e=>({title:`Membership Request Accepted`,body:`You're now a member of ${U(e)}.`}),community_deleted:e=>({title:`Community Deleted`,body:`${U(e)} has been deleted.`}),community_deleted_content_violation:e=>({title:`Community Deleted`,body:`${U(e)} was deleted for a content violation.`}),community_member_banned:e=>({title:`Banned from Community`,body:`You've been banned from ${U(e)}.`}),community_member_removed:e=>({title:`Removed from Community`,body:`You've been removed from ${U(e)}.`}),community_ownership_transferred:e=>({title:`Community Ownership Transferred`,body:`You're now the owner of ${U(e)}.`}),credits_reminder_claim_credits:()=>({title:`Marketplace Credits`,body:`You have Credits waiting to be claimed.`}),credits_reminder_complete_goals:()=>({title:`Marketplace Credits`,body:`Complete your goals to earn Credits.`}),credits_reminder_usage:()=>({title:`Marketplace Credits`,body:`Don't forget to use your Credits.`}),credits_reminder_usage_24_hours:()=>({title:`Marketplace Credits`,body:`Your Credits expire soon — use them now.`}),credits_reminder_do_not_miss_out:()=>({title:`Marketplace Credits`,body:`Don't miss out on your Credits.`}),credits_new_season_reminder:()=>({title:`New Credits Season`,body:`A new Marketplace Credits season has started.`})};function Nt(e){let t=e.metadata,n=At(t);if(jt[e.type])return{title:Ot(t,`sender`,`name`)??H(t,`title`)??`Someone`,body:jt[e.type],image:n};let r=H(t,`title`);if(r!=null)return{title:r,body:H(t,`description`,`message`),image:n};let i=Mt[e.type];return i?{...i(t),image:n}:{title:Dt(e.type),body:H(t,`description`,`message`,`name`),image:n}}function Pt({n:e}){let{title:t,body:n,image:r}=Nt(e);return(0,P.jsxs)(`div`,{className:`${V.row} ${e.read?``:V.unread}`.trim(),children:[(0,P.jsx)(`div`,{className:V.thumb,children:r?(0,P.jsx)(`img`,{className:V.img,src:r,alt:``}):(0,P.jsx)(`span`,{className:V.dot})}),(0,P.jsxs)(`div`,{className:V.info,children:[(0,P.jsx)(`span`,{className:V.title,children:t}),n&&(0,P.jsx)(`span`,{className:V.bodyText,children:n})]}),(0,P.jsx)(`span`,{className:V.time,children:kt(e.timestamp)}),!e.read&&(0,P.jsx)(`span`,{className:V.unreadDot,"aria-label":`unread`})]})}function Ft({notifications:e}){return e.open?(0,P.jsxs)(`div`,{className:V.root,children:[(0,P.jsxs)(`header`,{className:V.head,children:[(0,P.jsx)(`span`,{className:V.heading,children:`Notifications`}),e.unread>0&&(0,P.jsx)(`button`,{type:`button`,className:V.markRead,onClick:e.markAllRead,children:`Mark all read`}),(0,P.jsx)(o,{variant:`solid`,className:V.closeGlyph,"aria-label":`Close notifications`,onClick:e.toggle,children:`×`})]}),(0,P.jsx)(`div`,{className:V.body,children:e.list.length===0?(0,P.jsx)(`div`,{className:V.empty,children:`You’re all caught up.`}):e.list.map(e=>(0,P.jsx)(Pt,{n:e},e.id))})]}):null}var It={slot:`_slot_10ky5_2`,bg:`_bg_10ky5_6`,num:`_num_10ky5_15`},Lt=182,Rt=168,zt=92,Bt=74,Vt={base:{flap:`#A09BA8`,glows:[{c:`#CFCDD4`,cx:156.62,cy:134.02,r:123.28,b:53.79},{c:`#FCFCFC`,cx:33.93,cy:.93,r:121.93,b:53.79,o:.8}]},common:{flap:`#73D3D3`,glows:[{c:`#73D3D3`,cx:137,cy:115,r:119,b:89.96},{c:`#B5FFF6`,cx:44,cy:32,r:68,b:50}]},uncommon:{flap:`#FF8362`,glows:[{c:`#FF8362`,cx:137,cy:115,r:119,b:81.65},{c:`#FFE0B2`,cx:29.47,cy:18.47,r:77.47,b:50}]},rare:{flap:`#34CE76`,glows:[{c:`#34CE76`,cx:137,cy:115,r:106,b:53.79},{c:`#73FFAF`,cx:32.48,cy:19.06,r:77.47,b:50}]},epic:{flap:`#438FFF`,glows:[{c:`#5C9EFF`,cx:136,cy:102,r:102,b:53.79},{c:`#4DEAFF`,cx:12.47,cy:21.47,r:77.47,b:50}]},legendary:{flap:`#A14BF3`,glows:[{c:`#B66CFF`,cx:121,cy:112,r:83,b:41.72},{c:`#E579FB`,cx:12.47,cy:21.47,r:77.47,b:50}]},mythic:{flap:`#FF4BED`,glows:[{c:`#FF4BED`,cx:121,cy:112,r:83,b:53.79},{c:`#FFA6C1`,cx:12.47,cy:21.47,r:77.47,b:53.79}]},exotic:{flap:`#9CD71E`,glows:[{c:`#CAFF73`,cx:121,cy:112,r:116,b:74.89},{c:`#CAFF73`,cx:12.47,cy:21.47,r:77.47,b:58.66}]},unique:{flap:`#FEA217`,glows:[{c:`#FFDD2C`,cx:70,cy:157,r:91,b:53.79},{c:`#FFAB2C`,cx:132.9,cy:39.9,r:53.9,b:53.79}]}},Ht=`M14.8164 12.709C64.4508 -0.703243 116.612 -1.5304 166.64 10.3027C176.559 12.6489 182.063 22.9775 179.27 32.6738L145.125 151.212C142.308 160.99 132.238 166.37 122.526 164.608C103.049 161.075 83.0735 161.392 63.7158 165.54C54.0636 167.609 43.8302 162.551 40.71 152.865L2.89062 35.4668C-0.202676 25.8636 4.97707 15.368 14.8164 12.709Z`,Ut=`M4.79456 34.854C2.02502 26.2568 6.68143 16.9787 15.3385 14.6393C64.652 1.31383 116.475 0.492713 166.179 12.2493C174.905 14.3132 179.848 23.4393 177.348 32.12L143.203 150.658C140.703 159.339 131.704 164.24 122.883 162.64C103.149 159.061 82.9097 159.381 63.2967 163.584C54.53 165.463 45.3831 160.849 42.6136 152.252L4.79456 34.854Z`,Wt=`M47.9447 7.70117C43.9328 8.34457 40.4114 10.7359 38.638 14.3936L17.1322 58.75C15.343 62.4402 15.0466 66.6786 16.304 70.582L4.79428 34.8545C2.02478 26.2574 6.68134 16.9791 15.3382 14.6396C26.1034 11.7307 36.9885 9.41758 47.9447 7.70117Z`,Gt=`M17.1325 58.7501C15.3433 62.4403 15.047 66.6787 16.3044 70.5822L13.1836 60.8956L33.8238 24.3209L17.1325 58.7501Z`,Kt=`M11.0036 21.9181C10.6762 22.1695 10.615 22.639 10.867 22.9659L15.3604 26.5831L17.129 28.6697L15.533 31.4881L15.1114 35.3803C15.162 35.8414 15.6155 36.1457 16.0614 36.0179C16.4192 35.9153 16.6472 35.5652 16.5963 35.1964L17.0108 31.9443L19.1989 28.861L20.0563 33.9719C20.1331 34.4298 20.5915 34.7189 21.0379 34.5909C21.4127 34.4834 21.65 34.1151 21.5929 33.7294L20.6933 27.6476L19.6397 25.3561L21.2475 20.6279C21.4369 20.0711 20.9223 19.5309 20.357 19.6931C20.1239 19.7599 19.9394 19.9382 19.8647 20.1689L19.0229 22.5681C18.7079 23.4659 17.9771 24.1553 17.0625 24.4176C16.1661 24.6746 15.2008 24.4903 14.4621 23.921L12.0623 22.0715C11.8154 21.7316 11.3368 21.6622 11.0036 21.9181Z`;function qt({thumbnail:e,rarity:t=`base`,number:n,width:r=174,rotate:i=0}){let a=(0,A.useId)().replace(/:/g,``),o=e,s=Vt[t]??Vt.base,c=i?`rotate(${-i} ${zt} ${Bt})`:void 0,l={fontSize:Math.round(r*.19),transform:`translateX(-50%)${i?` rotate(${-i}deg)`:``}`};return(0,P.jsxs)(`div`,{className:It.slot,style:{width:r,height:r*Rt/Lt,transform:i?`rotate(${i}deg)`:void 0},children:[(0,P.jsxs)(`svg`,{className:It.bg,viewBox:`0 0 ${Lt} ${Rt}`,preserveAspectRatio:`none`,children:[(0,P.jsxs)(`defs`,{children:[s.glows.map((e,t)=>(0,P.jsx)(`filter`,{id:`blur-${a}-${t}`,x:`-120`,y:`-120`,width:`420`,height:`420`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:(0,P.jsx)(`feGaussianBlur`,{stdDeviation:e.b})},t)),(0,P.jsx)(`clipPath`,{id:`clip-${a}`,children:(0,P.jsx)(`path`,{d:Ut})})]}),(0,P.jsx)(`path`,{d:Ut,fill:`#691FA9`}),(0,P.jsxs)(`g`,{clipPath:`url(#clip-${a})`,children:[s.glows.map((e,t)=>(0,P.jsx)(`circle`,{cx:e.cx,cy:e.cy,r:e.r,fill:e.c,opacity:e.o??1,filter:`url(#blur-${a}-${t})`},t)),o&&(0,P.jsx)(`g`,{transform:c,children:(0,P.jsx)(`image`,{href:o,x:`37.9961`,y:`20`,width:`108`,height:`108`,preserveAspectRatio:`none`})}),(0,P.jsx)(`path`,{d:Wt,fill:s.flap}),(0,P.jsx)(`path`,{d:Gt,fill:`black`,fillOpacity:`0.1`}),(0,P.jsx)(`path`,{d:Kt,fill:`#FCFCFC`}),(0,P.jsx)(`circle`,{cx:`16.2543`,cy:`21.5305`,r:`1.87704`,transform:`rotate(-16 16.2543 21.5305)`,fill:`#FCFCFC`})]}),(0,P.jsx)(`path`,{d:Ht,fill:`none`,stroke:`#f1eff5`,strokeWidth:`4`})]}),n!=null&&(0,P.jsx)(`span`,{className:It.num,style:l,children:n})]})}var W={backdrop:`_backdrop_okd42_2`,wheel:`_wheel_okd42_12`,slotPos:`_slotPos_okd42_21`,slotHover:`_slotHover_okd42_27`,slotEmpty:`_slotEmpty_okd42_32`,center:`_center_okd42_38`,hoverName:`_hoverName_okd42_49`,title:`_title_okd42_55`,customise:`_customise_okd42_60`,hint:`_hint_okd42_77`,close:`_close_okd42_83`},Jt=215,Yt=152,Xt=112;function Zt({emotes:e,onCustomise:t}){let[n,r]=(0,A.useState)(null);if((0,A.useEffect)(()=>{if(!e.open||t==null)return;let n=e=>{(e.key===`e`||e.key===`E`)&&(e.preventDefault(),t())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e.open,t]),!e.open)return null;let i=Array.from({length:10},(t,n)=>{let r=(n+1)%10;return{k:n,num:r,deg:-90+n*36,emote:e.list.find(e=>e.slot===r)??null}}),a=n==null?null:e.list.find(e=>e.slot===n);return(0,P.jsx)(`div`,{className:W.backdrop,onClick:e.toggle,children:(0,P.jsxs)(`div`,{className:W.wheel,onClick:e=>e.stopPropagation(),children:[(0,P.jsx)(`button`,{type:`button`,className:W.close,"aria-label":`Close emotes`,onClick:e.toggle,children:`×`}),i.map(({num:t,deg:i,emote:a})=>{let o=i*Math.PI/180,s=Jt+Yt*Math.cos(o),c=Jt+Yt*Math.sin(o);return(0,P.jsx)(`div`,{role:`button`,"aria-label":`Emote slot ${t}${a?`: ${a.name}`:``}`,className:`${W.slotPos} ${n===t?W.slotHover:``} ${a?``:W.slotEmpty}`.trim(),style:{left:`${s}px`,top:`${c}px`},onMouseEnter:()=>a&&r(t),onMouseLeave:()=>r(e=>e===t?null:e),onClick:()=>a&&e.play(a.urn),children:(0,P.jsx)(qt,{thumbnail:a?g(a.urn):void 0,rarity:a?.rarity??`base`,number:t,rotate:i+90,width:Xt})},t)}),(0,P.jsxs)(`div`,{className:W.center,children:[(0,P.jsx)(`div`,{className:W.hoverName,children:a?.name??` `}),(0,P.jsx)(`div`,{className:W.title,children:`EMOTES`}),(0,P.jsx)(`button`,{type:`button`,className:W.customise,onClick:t,children:`Customise [E]`}),(0,P.jsxs)(`div`,{className:W.hint,children:[`Hold [B+num] to run an emote`,(0,P.jsx)(`br`,{}),`while the wheel is closed`]})]})]})})}var Qt={root:`_root_z20ll_5`,group:`_group_z20ll_27`,divider:`_divider_z20ll_35`},$t=[{kind:`profile`,icon:`profile`,label:`Profile`},{kind:`notifications`,icon:`notifications`,label:`Notifications`},{kind:`map`,icon:`map`,label:`Map`,shortcut:`M`},{kind:`places`,icon:`places`,label:`Places`,shortcut:`Z`},{kind:`communities`,icon:`communities`,label:`Communities`,shortcut:`O`},{kind:`backpack`,icon:`backpack`,label:`Backpack`,shortcut:`I`},{kind:`gallery`,icon:`gallery`,label:`Gallery`,shortcut:`G`},{kind:`settings`,icon:`settings`,label:`Settings`,shortcut:`P`},{kind:`divider`},{kind:`help`,icon:`help`,label:`Help & Support`}],en=[{kind:`mic`,icon:`mic`,label:`Voice chat`},{kind:`emotes`,icon:`emotes`,label:`Emotes`,shortcut:`B`},{kind:`divider`},{kind:`friends`,icon:`friends`,label:`Friends`,shortcut:`L`},{kind:`chat`,icon:`chat`,label:`Chat`,shortcut:`T`}];function tn(e,t,r,i){return e.kind===`divider`?(0,P.jsx)(`div`,{className:Qt.divider},`d${t}`):e.kind===`chat`?(0,P.jsx)(n,{icon:e.icon,label:e.label,shortcut:e.shortcut,active:r.chat.open,onClick:r.chat.toggle},`chat`):e.kind===`friends`?(0,P.jsx)(n,{icon:e.icon,label:e.label,shortcut:e.shortcut,badge:r.friends.received.length,active:r.friends.open,onClick:r.friends.toggle},`friends`):e.kind===`settings`?(0,P.jsx)(n,{icon:e.icon,label:e.label,shortcut:e.shortcut,active:r.settings.open,onClick:r.settings.toggle},`settings`):e.kind===`profile`?(0,P.jsx)(n,{icon:e.icon,label:e.label,active:r.profile.open,onClick:i??r.profile.toggle},`profile`):e.kind===`backpack`?(0,P.jsx)(n,{icon:e.icon,label:e.label,shortcut:e.shortcut,active:r.backpack.open,onClick:r.backpack.toggle},`backpack`):e.kind===`communities`?(0,P.jsx)(n,{icon:e.icon,label:e.label,shortcut:e.shortcut,active:r.communities.open,onClick:r.communities.toggle},`communities`):e.kind===`map`?(0,P.jsx)(n,{icon:e.icon,label:e.label,shortcut:e.shortcut,active:r.map.open,onClick:r.map.toggle},`map`):e.kind===`places`?(0,P.jsx)(n,{icon:e.icon,label:e.label,shortcut:e.shortcut,active:r.places.open,onClick:r.places.toggle},`places`):e.kind===`gallery`?(0,P.jsx)(n,{icon:e.icon,label:e.label,shortcut:e.shortcut,active:r.gallery.open,onClick:r.gallery.toggle},`gallery`):e.kind===`notifications`?(0,P.jsx)(n,{icon:e.icon,label:e.label,badge:r.notifications.unread,active:r.notifications.open,onClick:r.notifications.toggle},`notifications`):e.kind===`emotes`?(0,P.jsx)(n,{icon:e.icon,label:e.label,shortcut:e.shortcut,active:r.emotes.open,onClick:r.emotes.toggle},`emotes`):e.kind===`mic`?(0,P.jsx)(n,{icon:e.icon,label:e.label,active:r.mic.enabled,onClick:r.mic.toggle},`mic`):e.kind===`help`?(0,P.jsx)(n,{icon:e.icon,label:e.label,onClick:()=>window.open(`https://decentraland.org/help/`,`_blank`,`noopener`)},`help`):(0,P.jsx)(n,{icon:e.icon,label:e.label,shortcut:e.shortcut,onClick:()=>r.nav(e.action)},e.action)}function nn({session:e,onViewProfile:t}){return(0,P.jsxs)(`nav`,{className:Qt.root,"aria-label":`Main navigation`,children:[(0,P.jsx)(`div`,{className:Qt.group,children:$t.map((n,r)=>tn(n,r,e,t))}),(0,P.jsx)(`div`,{className:Qt.group,children:en.map((n,r)=>tn(n,r,e,t))})]})}var G={root:`_root_1g9ux_1`,reticle:`_reticle_1g9ux_13`,reticleActive:`_reticleActive_1g9ux_38`,hints:`_hints_1g9ux_45`,hint:`_hint_1g9ux_45`,hintDisabled:`_hintDisabled_1g9ux_71`,hintText:`_hintText_1g9ux_74`,mouse:`_mouse_1g9ux_77`,cap:`_cap_1g9ux_81`,proxTip:`_proxTip_1g9ux_97`},rn=0,an={1:`E`,2:`F`,4:`W`,5:`S`,6:`D`,7:`A`,8:`Space`,9:`Shift`,10:`1`,11:`2`,12:`3`,13:`4`};function on(){return(0,P.jsxs)(`svg`,{className:G.mouse,width:`22`,height:`22`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.6746 11.8961V2.99524C11.6746 2.99524 4.33789 2.98667 4.33789 11.8961H11.6746Z`,fill:`#FF7439`}),(0,P.jsx)(`rect`,{x:`4.50781`,y:`2.99524`,width:`15`,height:`20`,rx:`7.5`,stroke:`#ECEBED`,strokeWidth:`2`}),(0,P.jsx)(`path`,{d:`M4.33789 11.9952H18.9999`,stroke:`#ECEBED`}),(0,P.jsx)(`path`,{d:`M7.20715 0.590018C4.26466 1.54992 2.11196 4.23323 1.19016 6.9471`,stroke:`#ECEBED`,strokeLinecap:`round`})]})}function sn({button:e}){return e===rn?(0,P.jsx)(on,{}):(0,P.jsx)(`span`,{className:G.cap,children:an[e]??`?`})}function cn({hover:e,locked:t,proximity:n}){let[r,i]=(0,A.useState)(!1);(0,A.useEffect)(()=>{let e=()=>i(document.pointerLockElement!=null);return e(),document.addEventListener(`pointerlockchange`,e),()=>document.removeEventListener(`pointerlockchange`,e)},[]);let a=t||r,o=e.length>0;return!a&&!o&&n.length===0?null:(0,P.jsxs)(`div`,{className:G.root,"aria-hidden":`true`,children:[a&&(0,P.jsx)(`div`,{"data-testid":`reticle`,className:`${G.reticle}${o?` ${G.reticleActive}`:``}`}),o&&(0,P.jsx)(`div`,{className:G.hints,children:e.map((e,t)=>(0,P.jsxs)(`div`,{className:`${G.hint}${e.enabled?``:` ${G.hintDisabled}`}`,children:[(0,P.jsx)(sn,{button:e.button}),(0,P.jsx)(`span`,{className:G.hintText,children:e.enabled?e.text:`Too far, get closer`})]},t))}),n.map(e=>(0,P.jsx)(`div`,{"data-testid":`proxtip-${e.id}`,className:G.proxTip,style:{left:`${e.x}px`,top:`${e.y}px`},children:e.actions.map((e,t)=>(0,P.jsxs)(`div`,{className:G.hint,children:[(0,P.jsx)(sn,{button:e.button}),(0,P.jsx)(`span`,{className:G.hintText,children:e.text})]},t))},e.id))]})}var K={overlay:`_overlay_r95k9_3`,panel:`_panel_r95k9_19`,head:`_head_r95k9_33`,nameRow:`_nameRow_r95k9_39`,name:`_name_r95k9_39`,tag:`_tag_r95k9_49`,addrRow:`_addrRow_r95k9_53`,addr:`_addr_r95k9_53`,copy:`_copy_r95k9_64`,mutual:`_mutual_r95k9_75`,headActions:`_headActions_r95k9_81`,friendBtn:`_friendBtn_r95k9_86`,isFriend:`_isFriend_r95k9_99`,close:`_close_r95k9_105`,tabs:`_tabs_r95k9_120`,tab:`_tab_r95k9_120`,tabActive:`_tabActive_r95k9_137`,body:`_body_r95k9_143`,avatarCol:`_avatarCol_r95k9_148`,content:`_content_r95k9_165`,card:`_card_r95k9_174`,cardTitle:`_cardTitle_r95k9_180`,badgeRow:`_badgeRow_r95k9_191`,badgeGrid:`_badgeGrid_r95k9_192`,badge:`_badge_r95k9_191`,badgePlaceholder:`_badgePlaceholder_r95k9_212`,about:`_about_r95k9_219`,fields:`_fields_r95k9_226`,field:`_field_r95k9_226`,fieldLabel:`_fieldLabel_r95k9_237`,fieldValue:`_fieldValue_r95k9_243`,links:`_links_r95k9_248`,link:`_link_r95k9_248`,photoGrid:`_photoGrid_r95k9_266`,empty:`_empty_r95k9_278`},ln=[{key:`gender`,label:`Gender`},{key:`birthdate`,label:`Birth Date`},{key:`pronouns`,label:`Pronouns`},{key:`relationship`,label:`Relationship Status`},{key:`language`,label:`Language`},{key:`profession`,label:`Profession`},{key:`employment`,label:`Employment Status`},{key:`hobby`,label:`Favorite Hobby`},{key:`realName`,label:`Real Name`}];function un({value:e,label:t}){return(0,P.jsx)(`button`,{type:`button`,className:K.copy,title:`Copy ${t}`,onClick:()=>navigator.clipboard?.writeText(e).catch(()=>{}),children:(0,P.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`15`,height:`15`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsx)(`rect`,{x:`9`,y:`9`,width:`11`,height:`11`,rx:`2`,stroke:`currentColor`,strokeWidth:`1.7`}),(0,P.jsx)(`path`,{d:`M5 15V5a2 2 0 0 1 2-2h8`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`})]})})}function dn(){return(0,P.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,"aria-label":`verified`,children:[(0,P.jsx)(`defs`,{children:(0,P.jsxs)(`linearGradient`,{id:`ppv`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,P.jsx)(`stop`,{offset:`0`,stopColor:`#ff2d55`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#c640cd`})]})}),(0,P.jsx)(`path`,{d:`M8 1l1.7 1.2 2.1-.2 1 1.8 1.9.9-.5 2 .9 1.9-1.6 1.4.1 2.1-2 .6-1.1 1.8-2-.7-2 .7-1.1-1.8-2-.6.1-2.1L1.6 8.6l.9-1.9-.5-2 1.9-.9 1-1.8 2.1.2z`,fill:`url(#ppv)`}),(0,P.jsx)(`path`,{d:`M5.5 8l1.7 1.7L10.8 6`,stroke:`#fff`,strokeWidth:`1.4`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function fn({badge:e}){return(0,P.jsx)(`div`,{className:K.badge,title:e.name,children:e.image?(0,P.jsx)(`img`,{src:e.image,alt:e.name}):(0,P.jsx)(`span`,{className:K.badgePlaceholder})})}function pn({profile:e,isFriend:t=!1,requested:n=!1,isSelf:r=!1,onAddFriend:i,onClose:o}){let[s,c]=(0,A.useState)(`overview`),[l,u]=(0,A.useState)(!1),d=n||l;(0,A.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(e.preventDefault(),o())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o]);let{base:f,tag:p}=S(e.name),m=e.hasClaimedName,h=ln.filter(({key:t})=>e.info?.[t]),g=(e.badges?.length??0)>0,v=!!e.description||h.length>0||(e.links?.length??0)>0,y=g||v;return(0,P.jsx)(`div`,{className:K.overlay,children:(0,P.jsxs)(`div`,{className:K.panel,children:[(0,P.jsxs)(`header`,{className:K.head,children:[(0,P.jsxs)(`div`,{className:K.idblock,children:[(0,P.jsxs)(`div`,{className:K.nameRow,children:[(0,P.jsx)(`span`,{className:K.name,children:f}),m&&(0,P.jsx)(dn,{}),p&&(0,P.jsx)(`span`,{className:K.tag,children:p}),(0,P.jsx)(un,{value:e.name,label:`name`})]}),(0,P.jsxs)(`div`,{className:K.addrRow,children:[(0,P.jsx)(`span`,{className:K.addr,children:C(e.address)}),(0,P.jsx)(un,{value:e.address,label:`address`})]}),e.mutuals!=null&&e.mutuals>0&&(0,P.jsxs)(`div`,{className:K.mutual,children:[e.mutuals,` Mutual`]})]}),(0,P.jsxs)(`div`,{className:K.headActions,children:[!r&&(t?(0,P.jsx)(`button`,{type:`button`,className:`${K.friendBtn} ${K.isFriend}`,disabled:!0,children:`FRIEND`}):d?(0,P.jsx)(`button`,{type:`button`,className:`${K.friendBtn} ${K.isFriend}`,disabled:!0,children:`REQUESTED`}):(0,P.jsx)(`button`,{type:`button`,className:K.friendBtn,onClick:()=>{i?.(e.address),u(!0)},children:`ADD FRIEND`})),(0,P.jsx)(`button`,{type:`button`,className:K.close,"aria-label":`Close`,onClick:o,children:`×`})]})]}),(0,P.jsx)(`nav`,{className:K.tabs,children:[`overview`,`badges`,`photos`].map(e=>(0,P.jsx)(`button`,{type:`button`,className:`${K.tab} ${s===e?K.tabActive:``}`.trim(),onClick:()=>c(e),children:e.toUpperCase()},e))}),(0,P.jsxs)(`div`,{className:K.body,children:[(0,P.jsx)(`div`,{className:K.avatarCol,children:e.bodyImage?(0,P.jsx)(`img`,{className:K.body,src:e.bodyImage,alt:f}):(0,P.jsx)(a,{src:e.picture,name:f,color:_(e.address||e.name),size:180,status:`online`})}),(0,P.jsxs)(`div`,{className:K.content,children:[s===`overview`&&!y&&(0,P.jsx)(`div`,{className:K.empty,children:`This profile has no details to show yet.`}),s===`overview`&&y&&(0,P.jsxs)(P.Fragment,{children:[e.badges&&e.badges.length>0&&(0,P.jsxs)(`section`,{className:K.card,children:[(0,P.jsx)(`h2`,{className:K.cardTitle,children:`Badges`}),(0,P.jsx)(`div`,{className:K.badgeRow,children:e.badges.map(e=>(0,P.jsx)(fn,{badge:e},e.id))})]}),v&&(0,P.jsxs)(`section`,{className:K.card,children:[e.description&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`h2`,{className:K.cardTitle,children:`About Me`}),(0,P.jsx)(`p`,{className:K.about,children:e.description})]}),h.length>0&&(0,P.jsx)(`div`,{className:K.fields,children:h.map(({key:t,label:n})=>(0,P.jsxs)(`div`,{className:K.field,children:[(0,P.jsx)(`span`,{className:K.fieldLabel,children:n}),(0,P.jsx)(`span`,{className:K.fieldValue,children:e.info?.[t]})]},t))}),e.links&&e.links.length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`h2`,{className:K.cardTitle,children:`Links`}),(0,P.jsx)(`div`,{className:K.links,children:e.links.map(e=>(0,P.jsxs)(`a`,{className:K.link,href:e.url,target:`_blank`,rel:`noreferrer`,children:[`🔗 `,e.title]},e.url))})]})]})]}),s===`badges`&&(0,P.jsx)(`section`,{className:K.card,children:e.badges&&e.badges.length>0?(0,P.jsx)(`div`,{className:K.badgeGrid,children:e.badges.map(e=>(0,P.jsx)(fn,{badge:e},e.id))}):(0,P.jsx)(`div`,{className:K.empty,children:`No badges yet.`})}),s===`photos`&&(0,P.jsx)(`section`,{className:K.card,children:e.photos&&e.photos.length>0?(0,P.jsx)(`div`,{className:K.photoGrid,children:e.photos.map((e,t)=>(0,P.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,children:(0,P.jsx)(`img`,{src:e,alt:``})},t))}):(0,P.jsx)(`div`,{className:K.empty,children:`No photos shared yet.`})})]})]})]})})}var q={scrim:`_scrim_1ixs8_3`,modal:`_modal_1ixs8_14`,icon:`_icon_1ixs8_28`,prompt:`_prompt_1ixs8_38`,scene:`_scene_1ixs8_44`,additional:`_additional_1ixs8_47`,options:`_options_1ixs8_52`,option:`_option_1ixs8_52`,radio:`_radio_1ixs8_74`,radioOn:`_radioOn_1ixs8_87`,radioDot:`_radioDot_1ixs8_90`,input:`_input_1ixs8_97`,actions:`_actions_1ixs8_103`,deny:`_deny_1ixs8_109`},mn={MovePlayer:`move your avatar within the scene bounds`,ForceCamera:`temporarily change the camera view`,PlayEmote:`make your avatar perform an emote`,SetLocomotion:`temporarily modify your avatar's locomotion settings`,HideAvatarsNametags:`temporarily hide player avatars and/or nametags, and/or disables passports`,DisableVoice:`temporarily disable voice chat`,Teleport:`teleport you to a new location`,ChangeRealm:`move you to a new realm`,SpawnPortable:`spawn a portable experience`,KillPortables:`manage your active portable experiences`,Web3:`initiate a web3 transaction with your wallet`,CopyToClipboard:`copy text into the clipboard`,Fetch:`fetch data from a remote server`,Websocket:`open a web socket to communicate with a remote server`,OpenUrl:`open a url in your browser`},hn=[{value:`once`,label:`Once`},{value:`scene`,label:`Always for Scene`},{value:`realm`,label:`Always for Realm`},{value:`global`,label:`Always for Global`}];function gn(){return(0,P.jsxs)(`svg`,{width:`26`,height:`26`,viewBox:`0 0 24 24`,"aria-hidden":`true`,fill:`none`,children:[(0,P.jsx)(`rect`,{x:`4`,y:`10`,width:`16`,height:`11`,rx:`2`,fill:`currentColor`}),(0,P.jsx)(`path`,{d:`M8 10V7a4 4 0 0 1 8 0v3`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function _n({request:e,onResolve:t}){let[n,i]=(0,A.useState)(`once`),a=mn[e.ty]??`perform a restricted action`;return(0,A.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(e.preventDefault(),t(!1,`once`))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,Ae.createPortal)((0,P.jsx)(`div`,{className:q.scrim,onClick:()=>t(!1,`once`),children:(0,P.jsxs)(`div`,{className:q.modal,role:`alertdialog`,"aria-modal":`true`,"aria-label":`Scene permission request`,onClick:e=>e.stopPropagation(),children:[(0,P.jsx)(`span`,{className:q.icon,children:(0,P.jsx)(gn,{})}),(0,P.jsxs)(`div`,{className:q.prompt,children:[`The scene `,(0,P.jsx)(`span`,{className:q.scene,children:e.sceneName||`A scene`}),` wants permission to `,a]}),e.additional?(0,P.jsx)(`div`,{className:q.additional,children:e.additional}):null,(0,P.jsx)(`div`,{className:q.options,role:`radiogroup`,"aria-label":`Apply this decision`,children:hn.map(e=>(0,P.jsxs)(`label`,{className:q.option,children:[(0,P.jsx)(`input`,{className:q.input,type:`radio`,name:`permission-level`,checked:n===e.value,onChange:()=>i(e.value)}),(0,P.jsx)(`span`,{className:`${q.radio} ${n===e.value?q.radioOn:``}`.trim(),children:n===e.value?(0,P.jsx)(`span`,{className:q.radioDot}):null}),e.label]},e.value))}),(0,P.jsxs)(`div`,{className:q.actions,children:[(0,P.jsx)(r,{variant:`primary`,onClick:()=>t(!0,n),children:`Allow`}),(0,P.jsx)(r,{variant:`ghost`,className:q.deny,onClick:()=>t(!1,n),children:`Deny`})]})]})}),document.body)}function vn(e){let[t,n]=(0,A.useState)({page:0,engine:null,ms:0});return(0,A.useEffect)(()=>{if(!e)return;let t=0,r=0,i=0,a=null,o,s=performance.now(),c=s,l=0,u=()=>{let e=window;e===a||typeof e.__engineHeartbeat!=`function`||(o=e.__engineHeartbeat,e.__engineHeartbeat=function(...e){return i++,o?.apply(this,e)},a=e)},d=e=>{if(r++,l+=e-c,c=e,u(),e-s>=500){let t=(e-s)/1e3;n({page:Math.round(r/t),engine:a?Math.round(i/t):null,ms:Number((l/r).toFixed(1))}),r=0,i=0,l=0,s=e}t=requestAnimationFrame(d)};return t=requestAnimationFrame(d),()=>{cancelAnimationFrame(t),a&&o&&(a.__engineHeartbeat=o)}},[e]),t}var J={meter:`_meter_77eb9_1`,fps:`_fps_77eb9_21`,unit:`_unit_77eb9_25`,dim:`_dim_77eb9_31`,engine:`_engine_77eb9_34`,good:`_good_77eb9_39`,warn:`_warn_77eb9_42`,bad:`_bad_77eb9_45`};function yn(){let{page:e,engine:t,ms:n}=vn(!0),r=e>=55?J.good:e>=30?J.warn:J.bad;return(0,P.jsxs)(`div`,{className:J.meter,"aria-hidden":`true`,children:[(0,P.jsxs)(`span`,{className:`${J.fps} ${r}`,children:[e,(0,P.jsx)(`span`,{className:J.unit,children:`fps`})]}),(0,P.jsxs)(`span`,{className:J.dim,children:[n,`ms`]}),t!=null&&(0,P.jsxs)(`span`,{className:J.dim,children:[`engine `,(0,P.jsx)(`b`,{className:J.engine,children:t})]})]})}var Y={root:`_root_k9pme_1`,"fade-in":`_fade-in_k9pme_1`,leaving:`_leaving_k9pme_13`,"fade-out":`_fade-out_k9pme_1`,watermark:`_watermark_k9pme_18`,loading:`_loading_k9pme_38`,spinnerLogo:`_spinnerLogo_k9pme_44`,pulse:`_pulse_k9pme_1`,panel:`_panel_k9pme_52`,logo:`_logo_k9pme_60`,title:`_title_k9pme_66`,subtitle:`_subtitle_k9pme_75`,account:`_account_k9pme_83`,error:`_error_k9pme_90`,buttons:`_buttons_k9pme_96`,cta:`_cta_k9pme_105`,ctaSecondary:`_ctaSecondary_k9pme_106`,label:`_label_k9pme_134`,arrow:`_arrow_k9pme_142`,bootBar:`_bootBar_k9pme_149`,bootLabel:`_bootLabel_k9pme_159`,bootTrack:`_bootTrack_k9pme_166`,bootFill:`_bootFill_k9pme_173`,avatarWrap:`_avatarWrap_k9pme_181`,disc:`_disc_k9pme_194`,glow:`_glow_k9pme_210`,"glow-pulse":`_glow-pulse_k9pme_1`,avatar:`_avatar_k9pme_181`,"avatar-in":`_avatar-in_k9pme_1`,"avatar-float":`_avatar-float_k9pme_1`},bn={download:`Downloading engine`,compile:`Compiling`,init:`Initializing`,workers:`Starting workers`,gpu:`Preparing graphics`};function xn({flow:e}){if(e.engineReady)return null;let t=(e.loadStep==null?void 0:bn[e.loadStep])??`Starting…`,n=Math.round(e.loadProgress);return(0,P.jsxs)(`div`,{className:Y.bootBar,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":t,children:[(0,P.jsxs)(`div`,{className:Y.bootLabel,children:[t,` · `,n,`%`]}),(0,P.jsx)(`div`,{className:Y.bootTrack,children:(0,P.jsx)(`div`,{className:Y.bootFill,style:{width:`${n}%`}})})]})}function Sn(e){return e.loadStep===`download`?`DOWNLOADING… ${Math.round(e.loadProgress)}%`:`STARTING…`}function Cn(){return(0,P.jsx)(`span`,{className:Y.arrow,"aria-hidden":`true`,children:(0,P.jsxs)(`svg`,{viewBox:`0 0 28 28`,width:`22`,height:`22`,children:[(0,P.jsx)(`circle`,{cx:`14`,cy:`14`,r:`14`,fill:`#fff`}),(0,P.jsx)(`path`,{d:`M12.5 9l5 5-5 5M9 14h8`,stroke:`var(--brand)`,strokeWidth:`2.4`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})]})})}function wn(e){let[t,n]=(0,A.useState)({});return(0,A.useEffect)(()=>{if(e==null||e===``){n({});return}let t=!1;return fetch(`https://peer.decentraland.org/lambdas/profiles/${e}`).then(e=>e.json()).then(e=>{let r=e.avatars?.[0];t||n({name:r?.name,body:r?.avatar?.snapshots?.body})}).catch(()=>void 0),()=>{t=!0}},[e]),t}function Tn({body:e}){let[t,n]=(0,A.useState)(!1);return t?null:(0,P.jsxs)(`div`,{className:Y.avatarWrap,children:[(0,P.jsx)(`div`,{className:Y.disc}),(0,P.jsx)(`div`,{className:Y.glow}),(0,P.jsx)(`img`,{className:Y.avatar,src:e,alt:``,draggable:!1,onError:()=>n(!0)})]})}var En={"sign-in-or-guest":{title:`Discover a virtual social world`,subtitle:`shaped by its community of
|
|
5
|
-
creators & explorers.`},"reuse-login-or-new":{title:`Welcome back!`,subtitle:`Ready to explore?`}};function Dn({flow:e}){(0,A.useEffect)(()=>{m()},[]);let t=e.status===`reuse-login-or-new`,n=wn(t&&e.account!=null?e.account:void 0);return(0,P.jsx)(`div`,{className:Y.root,children:e.status===`loading`?(0,P.jsx)(`div`,{className:Y.loading,children:(0,P.jsx)(`div`,{className:Y.spinnerLogo})}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{className:Y.watermark}),(0,P.jsx)(On,{flow:e,name:n.name}),t&&n.body!=null&&(0,P.jsx)(Tn,{body:n.body}),(0,P.jsx)(xn,{flow:e})]})})}function On({flow:e,name:t}){let n=e.status,i=En[n],a=n===`reuse-login-or-new`&&t!=null&&t!==``?`Welcome back ${t}`:i.title,o=!e.engineReady;return(0,P.jsxs)(`div`,{className:Y.panel,children:[(0,P.jsx)(`div`,{className:Y.logo}),(0,P.jsx)(`h1`,{className:Y.title,children:a}),i.subtitle&&(0,P.jsx)(`p`,{className:Y.subtitle,children:i.subtitle}),e.error&&(0,P.jsx)(`p`,{className:Y.error,children:e.error}),(0,P.jsxs)(`div`,{className:Y.buttons,children:[n===`sign-in-or-guest`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(r,{variant:`primary`,size:`lg`,className:Y.cta,onClick:e.startWithAccount,disabled:e.busy,children:[(0,P.jsx)(`span`,{className:Y.label,children:`START WITH ACCOUNT`}),(0,P.jsx)(Cn,{})]}),(0,P.jsx)(r,{variant:`secondary`,size:`lg`,className:Y.ctaSecondary,onClick:e.exploreAsGuest,disabled:e.busy||o,children:(0,P.jsx)(`span`,{className:Y.label,children:o?Sn(e):`EXPLORE AS GUEST`})})]}),n===`reuse-login-or-new`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(r,{variant:`primary`,size:`lg`,className:Y.cta,onClick:e.jumpIn,disabled:e.busy||o,children:[(0,P.jsx)(`span`,{className:Y.label,children:o?Sn(e):`JUMP INTO DECENTRALAND`}),!o&&(0,P.jsx)(Cn,{})]}),(0,P.jsx)(r,{variant:`secondary`,size:`lg`,className:Y.ctaSecondary,onClick:e.useDifferentAccount,disabled:e.busy,children:(0,P.jsx)(`span`,{className:Y.label,children:`USE A DIFFERENT ACCOUNT`})})]})]})]})}var X={root:`_root_1vhw7_1`,"fade-in":`_fade-in_1vhw7_1`,logo:`_logo_1vhw7_24`,title:`_title_1vhw7_30`,subtitle:`_subtitle_1vhw7_36`,track:`_track_1vhw7_44`,fill:`_fill_1vhw7_52`,indeterminate:`_indeterminate_1vhw7_59`,slide:`_slide_1vhw7_1`};function kn({scene:e}){let t=(0,A.useRef)(0),n=e?.pendingAssets??null;n!=null&&n>t.current&&(t.current=n);let r=e!=null&&!e.realmConnected,i=n!=null&&t.current>0,a=i?1-n/t.current:0,o=r?`Reconnecting…`:e?.title?e.title:`Entering Decentraland`,s=r?`Reconnecting to the realm`:n!=null&&n>0?`Loading scene assets · ${n} remaining`:`Preparing your surroundings`;return(0,P.jsxs)(`div`,{className:X.root,children:[(0,P.jsx)(`div`,{className:X.logo}),(0,P.jsx)(`h2`,{className:X.title,children:o}),(0,P.jsx)(`p`,{className:X.subtitle,children:s}),(0,P.jsx)(`div`,{className:X.track,children:(0,P.jsx)(`div`,{className:`${X.fill}${i?``:` `+X.indeterminate}`,style:i?{width:`${Math.round(a*100)}%`}:void 0})})]})}function An({onStay:e,onLeave:t}){return(0,P.jsx)(i,{title:`Leave Decentraland?`,onClose:e,closeButton:!1,dismissOnScrim:!1,width:420,actions:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(r,{variant:`ghost`,onClick:e,children:`Stay`}),(0,P.jsx)(r,{variant:`primary`,onClick:t,children:`Leave`})]}),actionsEqual:!0,children:`You're about to exit the world and go back. You'll have to reconnect to return.`})}function jn(e){let[t,n]=(0,A.useState)(!1),r=(0,A.useRef)(!1);return(0,A.useEffect)(()=>{if(!e)return;r.current=!1;let t=e=>{r.current||(e.preventDefault(),e.returnValue=``)},i=()=>{r.current||(window.history.pushState(null,``,window.location.href),n(!0))};return window.history.pushState(null,``,window.location.href),window.addEventListener(`beforeunload`,t),window.addEventListener(`popstate`,i),()=>{window.removeEventListener(`beforeunload`,t),window.removeEventListener(`popstate`,i)}},[e]),{confirming:t,stay:()=>n(!1),leave:()=>{n(!1),r.current=!0,window.history.go(-2)}}}var Mn=1080,Nn=.6,Pn=1.3;function Fn(){(0,A.useEffect)(()=>{let e=()=>{let e=Math.min(Pn,Math.max(Nn,window.innerHeight/Mn));document.documentElement.style.setProperty(`--ui-scale`,e.toFixed(3))};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[])}function In(e,t){let n=(0,A.useRef)(e),r=(0,A.useRef)(t);n.current=e,r.current=t,(0,A.useEffect)(()=>{let e=e=>{n.current(e)&&(e.preventDefault(),r.current())},t=new Set,i=n=>{if(!(!n||t.has(n)))try{n.addEventListener(`keydown`,e,!0),t.add(n)}catch{}};i(window);let a=window.setInterval(()=>{let e=document.querySelector(`iframe[title="Decentraland engine"]`);i(e?.contentWindow)},500);return()=>{window.clearInterval(a),t.forEach(t=>{try{t.removeEventListener(`keydown`,e,!0)}catch{}})}},[])}var Ln={m:e=>e.map.toggle,z:e=>e.places.toggle,o:e=>e.communities.toggle,i:e=>e.backpack.toggle,g:e=>e.gallery.toggle,p:e=>e.settings.toggle,b:e=>e.emotes.toggle,l:e=>e.friends.toggle,t:e=>e.chat.toggle};function Rn(e){let t=(0,A.useRef)(e);t.current=e,(0,A.useEffect)(()=>{let e=e=>{if(e.ctrlKey||e.metaKey||e.altKey||e.repeat)return;let n=e.target,r=n?.tagName;if(r===`INPUT`||r===`TEXTAREA`||n?.isContentEditable)return;let i=t.current;if(i.phase!==`world`)return;let a=Ln[e.key.toLowerCase()];a&&(e.preventDefault(),e.stopPropagation(),a(i)())};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[])}var zn=/Android|iPhone|iPad|iPod|webOS|BlackBerry|Opera Mini|IEMobile|Windows Phone/i;function Bn(){return/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1}function Vn(){return typeof navigator>`u`?!1:zn.test(navigator.userAgent)||Bn()}function Hn(){return typeof navigator>`u`?!0:/Chrome\//.test(navigator.userAgent)}function Un(){return typeof document>`u`?!1:document.cookie.split(`;`).some(e=>e.trim().startsWith(`bypass_browser_check=`))}function Wn(){let e=navigator.userAgent;return/iPad|iPhone|iPod/.test(e)||Bn()?`ios`:/Android/i.test(e)?`android`:`other`}var Z={root:`_root_5au7o_1`,card:`_card_5au7o_13`,logo:`_logo_5au7o_21`,title:`_title_5au7o_26`,subtitle:`_subtitle_5au7o_32`,buttons:`_buttons_5au7o_38`,store:`_store_5au7o_45`,tryAnyway:`_tryAnyway_5au7o_66`},Gn=`https://testflight.apple.com/join/KF4r3jlU`,Kn=`https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer`,qn=`https://www.google.com/chrome/`;function Jn(){return(0,P.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,P.jsx)(`path`,{d:`M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z`})})}function Yn(){return(0,P.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,P.jsx)(`path`,{d:`M3,20.5V3.5C3,2.91 3.34,2.39 3.84,2.15L13.69,12L3.84,21.85C3.34,21.6 3,21.09 3,20.5M16.81,15.12L6.05,21.34L14.54,12.85L16.81,15.12M20.16,10.81C20.5,11.08 20.75,11.5 20.75,12C20.75,12.5 20.53,12.9 20.18,13.18L17.89,14.5L15.39,12L17.89,9.5L20.16,10.81M6.05,2.66L16.81,8.88L14.54,11.15L6.05,2.66Z`})})}function Xn(){return(0,P.jsxs)(`svg`,{viewBox:`0 0 48 48`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsxs)(`defs`,{children:[(0,P.jsxs)(`linearGradient`,{id:`cg-a`,x1:`3.2173`,y1:`15`,x2:`44.7812`,y2:`15`,gradientUnits:`userSpaceOnUse`,children:[(0,P.jsx)(`stop`,{offset:`0`,stopColor:`#d93025`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#ea4335`})]}),(0,P.jsxs)(`linearGradient`,{id:`cg-b`,x1:`20.7219`,y1:`47.6791`,x2:`41.5039`,y2:`11.6837`,gradientUnits:`userSpaceOnUse`,children:[(0,P.jsx)(`stop`,{offset:`0`,stopColor:`#fcc934`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#fbbc04`})]}),(0,P.jsxs)(`linearGradient`,{id:`cg-c`,x1:`26.5981`,y1:`46.5015`,x2:`5.8161`,y2:`10.506`,gradientUnits:`userSpaceOnUse`,children:[(0,P.jsx)(`stop`,{offset:`0`,stopColor:`#1e8e3e`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#34a853`})]})]}),(0,P.jsx)(`circle`,{cx:`24`,cy:`23.9947`,r:`12`,fill:`#fff`}),(0,P.jsx)(`path`,{d:`M24,12H44.7812a23.9939,23.9939,0,0,0-41.5639.0029L13.6079,30l.0093-.0024A11.9852,11.9852,0,0,1,24,12Z`,fill:`url(#cg-a)`}),(0,P.jsx)(`circle`,{cx:`24`,cy:`24`,r:`9.5`,fill:`#1a73e8`}),(0,P.jsx)(`path`,{d:`M34.3913,30.0029,24.0007,48A23.994,23.994,0,0,0,44.78,12.0031H23.9989l-.0025.0093A11.985,11.985,0,0,1,34.3913,30.0029Z`,fill:`url(#cg-b)`}),(0,P.jsx)(`path`,{d:`M13.6086,30.0031,3.218,12.006A23.994,23.994,0,0,0,24.0025,48L34.3931,30.0029l-.0067-.0068a11.9852,11.9852,0,0,1-20.7778.007Z`,fill:`url(#cg-c)`})]})}function Zn(){document.cookie=`bypass_browser_check=1;path=/;max-age=2592000`,location.reload()}function Qn({reason:e=`mobile`}){if(e===`browser`)return(0,P.jsx)(`div`,{className:Z.root,children:(0,P.jsxs)(`div`,{className:Z.card,children:[(0,P.jsx)(`img`,{className:Z.logo,src:p(`assets/logo.png`),alt:``,draggable:!1}),(0,P.jsx)(`h1`,{className:Z.title,children:`Browser Not Supported`}),(0,P.jsxs)(`p`,{className:Z.subtitle,children:[`Decentraland Web requires `,(0,P.jsx)(`strong`,{children:`Google Chrome`}),` on desktop to run.`]}),(0,P.jsx)(`div`,{className:Z.buttons,children:(0,P.jsxs)(r,{variant:`secondary`,href:qn,target:`_blank`,rel:`noopener`,className:Z.store,children:[(0,P.jsx)(Xn,{}),(0,P.jsx)(`span`,{children:`Download Chrome`})]})}),(0,P.jsx)(`button`,{type:`button`,className:Z.tryAnyway,onClick:Zn,children:`try anyway…`})]})});let t=Wn(),n=t===`ios`||t===`other`,i=t===`android`||t===`other`;return(0,P.jsx)(`div`,{className:Z.root,children:(0,P.jsxs)(`div`,{className:Z.card,children:[(0,P.jsx)(`img`,{className:Z.logo,src:p(`assets/logo.png`),alt:``,draggable:!1}),(0,P.jsx)(`h1`,{className:Z.title,children:`Decentraland`}),(0,P.jsx)(`p`,{className:Z.subtitle,children:`This experience isn’t available on mobile browsers. Download the app to explore:`}),(0,P.jsxs)(`div`,{className:Z.buttons,children:[n&&(0,P.jsxs)(r,{variant:`secondary`,href:Gn,target:`_blank`,rel:`noopener`,className:Z.store,children:[(0,P.jsx)(Jn,{}),(0,P.jsx)(`span`,{children:`Install from App Store`})]}),i&&(0,P.jsxs)(r,{variant:`secondary`,href:Kn,target:`_blank`,rel:`noopener`,className:Z.store,children:[(0,P.jsx)(Yn,{}),(0,P.jsx)(`span`,{children:`Install from Google Play`})]})]})]})})}var Q={fatalLayer:`_fatalLayer_1q3co_5`,head:`_head_1q3co_10`,title:`_title_1q3co_14`,subtitle:`_subtitle_1q3co_20`,btn:`_btn_1q3co_27`,detail:`_detail_1q3co_32`},$n={launch:{title:`Something went wrong`,subtitle:`The 3D engine couldn't start. Reloading often fixes it.`},runtime:{title:`The world crashed`,subtitle:`The 3D engine stopped unexpectedly.`},react:{title:`Something went wrong`,subtitle:`The app hit an unexpected error.`},realm:{title:`World not found`,subtitle:``}};function er({error:e,onReload:t,onDismiss:n}){let{title:a,subtitle:o}=$n[e.source],s=e.source===`realm`;return(0,P.jsx)(i,{header:(0,P.jsxs)(`div`,{className:Q.head,children:[(0,P.jsx)(`h2`,{className:Q.title,children:a}),(0,P.jsx)(`p`,{className:Q.subtitle,children:s?e.message:o})]}),role:`alertdialog`,ariaLabel:a,onClose:n,dismissOnScrim:!!n,closeButton:!1,backdropClassName:Q.fatalLayer,actionsAlign:`center`,actions:s?(0,P.jsx)(r,{variant:`primary`,className:Q.btn,onClick:n,children:`OK`}):(0,P.jsxs)(P.Fragment,{children:[n&&(0,P.jsx)(r,{variant:`ghost`,className:Q.btn,onClick:n,children:`Dismiss`}),(0,P.jsx)(r,{variant:`primary`,className:Q.btn,onClick:t,children:`Reload`})]}),children:!s&&(0,P.jsx)(`pre`,{className:Q.detail,children:e.message})})}var tr=class extends A.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){console.error(`[react error boundary]`,e)}render(){let{error:e}=this.state;return e?(0,P.jsx)(er,{error:{message:e.stack??e.message,source:`react`},onReload:()=>location.reload()}):this.props.children}},nr=`modulepreload`,rr=function(e){return`https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-28815551474.commit-e310eaf/`+e},ir={},ar=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=rr(t,n),t=s(t),t in ir)return;ir[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:nr,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},or=(0,A.lazy)(()=>ar(()=>import(`./Showcase-BIj6ento.js`).then(e=>({default:e.Showcase})),__vite__mapDeps([0,1,2,3,4,5]))),$=new URLSearchParams(location.search),sr=$.get(`mock`)===`1`?`mock`:`engine`,cr=$.get(`showcase`)===`1`;function lr(){return $.get(`nogate`)===`1`?null:Vn()||$.get(`gate`)===`1`?`mobile`:$.get(`gate`)===`browser`||!Hn()&&!Un()?`browser`:null}var ur=lr();function dr(){Fn();let e=fr();return ur?(0,P.jsx)(Qn,{reason:ur}):(0,P.jsxs)(tr,{children:[cr?(0,P.jsx)(A.Suspense,{fallback:null,children:(0,P.jsx)(or,{})}):(0,P.jsx)(pr,{}),e&&(0,P.jsx)(yn,{})]})}function fr(){let[e,t]=(0,A.useState)($.get(`fps`)===`1`);return In(e=>(e.ctrlKey||e.metaKey)&&e.shiftKey&&(e.key===`F`||e.key===`f`),()=>t(e=>!e)),e}function pr(){let{rpc:e,createDriver:t}=(0,A.useMemo)(()=>{if(sr===`mock`)return xe(),{rpc:null,createDriver:()=>new ue};let e=new pe;return{rpc:e,createDriver:()=>new fe(e)}},[]),n=ee(t);Rn(n);let r=jn(n.phase===`entering`||n.phase===`world`),[i,a]=(0,A.useState)(null),[o,s]=(0,A.useState)(null),[c,l]=(0,A.useState)(`wearables`);(0,A.useEffect)(()=>{n.backpack.open||l(`wearables`)},[n.backpack.open]);let u=!!i&&!!n.profile.data&&n.profile.data.address.toLowerCase()===i.address.toLowerCase(),d=e=>{a(e),e.address&&n.requestUserProfile(e.address)},f=e=>{let t=e.toLowerCase();return n.friends.list.some(e=>e.address.toLowerCase()===t)?`friend`:n.friends.sent.some(e=>e.address.toLowerCase()===t)?`requested`:`none`},p=()=>{let e=n.profile.data;e&&d({address:e.address,name:e.name,picture:e.picture})},m=i?n.userProfiles[i.address.toLowerCase()]??(u?n.profile.data:{address:i.address,name:i.name,picture:i.picture,hasClaimedName:!i.name.includes(`#`)&&!/^0x[0-9a-f]+$/i.test(i.name),isGuest:!1}):null,g=e=>{e===`settings`?n.settings.toggle():e===`backpack`?n.backpack.toggle():e===`communities`?n.communities.toggle():e===`map`?n.map.toggle():e===`places`?n.places.toggle():e===`gallery`?n.gallery.toggle():e===`profile`?p():e===`signout`&&n.logout()},_=n.settings.open||n.backpack.open||n.communities.open||n.map.open||n.places.open||n.gallery.open;return(0,P.jsxs)(P.Fragment,{children:[e&&(0,P.jsx)(y,{rpc:e}),n.phase===`login`&&(0,P.jsx)(Dn,{flow:n.login}),n.phase===`picking`&&(0,P.jsx)(w,{onPick:n.pickDestination}),n.phase===`entering`&&(0,P.jsx)(kn,{scene:n.scene}),n.phase===`world`&&!n.menuOpen&&(0,P.jsxs)(P.Fragment,{children:[!_&&(0,P.jsx)(nn,{session:n,onViewProfile:p}),!_&&(0,P.jsx)(cn,{hover:n.hover,locked:n.cursorLocked,proximity:n.proximity}),(0,P.jsx)(st,{chat:n.chat,hidden:n.friends.open||_,me:n.profile.data,onAddFriend:e=>n.friends.act(`request`,e),onBlock:e=>n.friends.act(`block`,e),onViewProfile:d,onTeleport:(e,t)=>n.map.teleport(e,t),onVisitWorld:e=>s(e),relationshipOf:f}),(0,P.jsx)(yt,{friends:n.friends,me:n.profile.data,relationshipOf:f,onAddFriend:e=>n.friends.act(`request`,e),onViewProfile:d,onBlock:e=>n.friends.act(`block`,e)}),(0,P.jsx)(Tt,{settings:n.settings,profile:n.profile,onNavigate:g}),(0,P.jsx)(Et,{profile:n.profile}),(0,P.jsx)(Ft,{notifications:n.notifications}),(0,P.jsx)(Zt,{emotes:n.emotes,onCustomise:()=>{l(`emotes`),n.backpack.toggle()}}),(0,P.jsx)(x,{backpack:n.backpack,emotes:n.emotes,profile:n.profile,onNavigate:g,setEngineViewport:n.setEngineViewport,initialTab:c}),(0,P.jsx)(h,{communities:n.communities,profile:n.profile,onNavigate:g,onAddFriend:e=>n.friends.act(`request`,e),onOpenChat:()=>n.chat.toggle()}),(0,P.jsx)(te,{map:n.map,profile:n.profile,onNavigate:g}),(0,P.jsx)(b,{places:n.places,profile:n.profile,onNavigate:g,onTeleport:(e,t)=>n.map.teleport(e,t),onVisitWorld:e=>n.map.changeRealm(e)}),(0,P.jsx)(re,{gallery:n.gallery,profile:n.profile,onNavigate:g,onTeleport:(e,t)=>n.map.teleport(e,t),onViewProfile:d}),i&&m&&(0,P.jsx)(pn,{profile:m,isSelf:u,isFriend:n.friends.list.some(e=>e.address.toLowerCase()===i.address.toLowerCase()),requested:n.friends.sent.some(e=>e.address.toLowerCase()===i.address.toLowerCase()),onAddFriend:e=>n.friends.act(`request`,e),onClose:()=>a(null)},i.address),o&&(0,P.jsx)(ne,{worldName:o,onCancel:()=>s(null),onConfirm:()=>{n.map.changeRealm(o),s(null)}})]}),n.phase===`world`&&n.permissions.pending.length>0&&(0,P.jsx)(_n,{request:n.permissions.pending[0],onResolve:(e,t)=>n.permissions.resolve(n.permissions.pending[0].id,e,t)},n.permissions.pending[0].id),r.confirming&&(0,P.jsx)(An,{onStay:r.stay,onLeave:r.leave}),n.fatalError&&(0,P.jsx)(er,{error:n.fatalError,onReload:n.reload,onDismiss:n.fatalError.source===`runtime`||n.fatalError.source===`realm`?n.dismissFatal:void 0})]})}var mr=`coi_sw_reloaded`;function hr(){`serviceWorker`in navigator&&(location.pathname.endsWith(`/`)||history.replaceState(history.state,``,`${location.pathname}/${location.search}${location.hash}`),navigator.serviceWorker.register(new URL(`service_worker.js`,v)).then(e=>{if(navigator.serviceWorker.controller){sessionStorage.removeItem(mr);return}let t=()=>{sessionStorage.getItem(mr)?(sessionStorage.removeItem(mr),console.error(`[coi] service worker failed to take control after reload`)):(sessionStorage.setItem(mr,`true`),window.location.reload())};if(e.active){t();return}let n=e.installing??e.waiting;n?.addEventListener(`statechange`,()=>{n.state===`activated`&&t()})}).catch(e=>console.log(`[coi] service worker registration failed:`,e)))}hr(),(0,ce.createRoot)(document.getElementById(`root`)).render((0,P.jsx)(A.StrictMode,{children:(0,P.jsx)(dr,{})}));export{at as i,it as n,nt as r,qt as t};
|
|
5
|
+
creators & explorers.`},"reuse-login-or-new":{title:`Welcome back!`,subtitle:`Ready to explore?`}};function Dn({flow:e}){(0,A.useEffect)(()=>{m()},[]);let t=e.status===`reuse-login-or-new`,n=wn(t&&e.account!=null?e.account:void 0);return(0,P.jsx)(`div`,{className:Y.root,children:e.status===`loading`?(0,P.jsx)(`div`,{className:Y.loading,children:(0,P.jsx)(`div`,{className:Y.spinnerLogo})}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{className:Y.watermark}),(0,P.jsx)(On,{flow:e,name:n.name}),t&&n.body!=null&&(0,P.jsx)(Tn,{body:n.body}),(0,P.jsx)(xn,{flow:e})]})})}function On({flow:e,name:t}){let n=e.status,i=En[n],a=n===`reuse-login-or-new`&&t!=null&&t!==``?`Welcome back ${t}`:i.title,o=!e.engineReady;return(0,P.jsxs)(`div`,{className:Y.panel,children:[(0,P.jsx)(`div`,{className:Y.logo}),(0,P.jsx)(`h1`,{className:Y.title,children:a}),i.subtitle&&(0,P.jsx)(`p`,{className:Y.subtitle,children:i.subtitle}),e.error&&(0,P.jsx)(`p`,{className:Y.error,children:e.error}),(0,P.jsxs)(`div`,{className:Y.buttons,children:[n===`sign-in-or-guest`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(r,{variant:`primary`,size:`lg`,className:Y.cta,onClick:e.startWithAccount,disabled:e.busy,children:[(0,P.jsx)(`span`,{className:Y.label,children:`START WITH ACCOUNT`}),(0,P.jsx)(Cn,{})]}),(0,P.jsx)(r,{variant:`secondary`,size:`lg`,className:Y.ctaSecondary,onClick:e.exploreAsGuest,disabled:e.busy||o,children:(0,P.jsx)(`span`,{className:Y.label,children:o?Sn(e):`EXPLORE AS GUEST`})})]}),n===`reuse-login-or-new`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(r,{variant:`primary`,size:`lg`,className:Y.cta,onClick:e.jumpIn,disabled:e.busy||o,children:[(0,P.jsx)(`span`,{className:Y.label,children:o?Sn(e):`JUMP INTO DECENTRALAND`}),!o&&(0,P.jsx)(Cn,{})]}),(0,P.jsx)(r,{variant:`secondary`,size:`lg`,className:Y.ctaSecondary,onClick:e.useDifferentAccount,disabled:e.busy,children:(0,P.jsx)(`span`,{className:Y.label,children:`USE A DIFFERENT ACCOUNT`})})]})]})]})}var X={root:`_root_1vhw7_1`,"fade-in":`_fade-in_1vhw7_1`,logo:`_logo_1vhw7_24`,title:`_title_1vhw7_30`,subtitle:`_subtitle_1vhw7_36`,track:`_track_1vhw7_44`,fill:`_fill_1vhw7_52`,indeterminate:`_indeterminate_1vhw7_59`,slide:`_slide_1vhw7_1`};function kn({scene:e}){let t=(0,A.useRef)(0),n=e?.pendingAssets??null;n!=null&&n>t.current&&(t.current=n);let r=e!=null&&!e.realmConnected,i=n!=null&&t.current>0,a=i?1-n/t.current:0,o=r?`Reconnecting…`:e?.title?e.title:`Entering Decentraland`,s=r?`Reconnecting to the realm`:n!=null&&n>0?`Loading scene assets · ${n} remaining`:`Preparing your surroundings`;return(0,P.jsxs)(`div`,{className:X.root,children:[(0,P.jsx)(`div`,{className:X.logo}),(0,P.jsx)(`h2`,{className:X.title,children:o}),(0,P.jsx)(`p`,{className:X.subtitle,children:s}),(0,P.jsx)(`div`,{className:X.track,children:(0,P.jsx)(`div`,{className:`${X.fill}${i?``:` `+X.indeterminate}`,style:i?{width:`${Math.round(a*100)}%`}:void 0})})]})}function An({onStay:e,onLeave:t}){return(0,P.jsx)(i,{title:`Leave Decentraland?`,onClose:e,closeButton:!1,dismissOnScrim:!1,width:420,actions:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(r,{variant:`ghost`,onClick:e,children:`Stay`}),(0,P.jsx)(r,{variant:`primary`,onClick:t,children:`Leave`})]}),actionsEqual:!0,children:`You're about to exit the world and go back. You'll have to reconnect to return.`})}function jn(e){let[t,n]=(0,A.useState)(!1),r=(0,A.useRef)(!1);return(0,A.useEffect)(()=>{if(!e)return;r.current=!1;let t=e=>{r.current||(e.preventDefault(),e.returnValue=``)},i=()=>{r.current||(window.history.pushState(null,``,window.location.href),n(!0))};return window.history.pushState(null,``,window.location.href),window.addEventListener(`beforeunload`,t),window.addEventListener(`popstate`,i),()=>{window.removeEventListener(`beforeunload`,t),window.removeEventListener(`popstate`,i)}},[e]),{confirming:t,stay:()=>n(!1),leave:()=>{n(!1),r.current=!0,window.history.go(-2)}}}var Mn=1080,Nn=.6,Pn=1.3;function Fn(){(0,A.useEffect)(()=>{let e=()=>{let e=Math.min(Pn,Math.max(Nn,window.innerHeight/Mn));document.documentElement.style.setProperty(`--ui-scale`,e.toFixed(3))};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[])}function In(e,t){let n=(0,A.useRef)(e),r=(0,A.useRef)(t);n.current=e,r.current=t,(0,A.useEffect)(()=>{let e=e=>{n.current(e)&&(e.preventDefault(),r.current())},t=new Set,i=n=>{if(!(!n||t.has(n)))try{n.addEventListener(`keydown`,e,!0),t.add(n)}catch{}};i(window);let a=window.setInterval(()=>{let e=document.querySelector(`iframe[title="Decentraland engine"]`);i(e?.contentWindow)},500);return()=>{window.clearInterval(a),t.forEach(t=>{try{t.removeEventListener(`keydown`,e,!0)}catch{}})}},[])}var Ln={m:e=>e.map.toggle,z:e=>e.places.toggle,o:e=>e.communities.toggle,i:e=>e.backpack.toggle,g:e=>e.gallery.toggle,p:e=>e.settings.toggle,b:e=>e.emotes.toggle,l:e=>e.friends.toggle,t:e=>e.chat.toggle};function Rn(e){let t=(0,A.useRef)(e);t.current=e,(0,A.useEffect)(()=>{let e=e=>{if(e.ctrlKey||e.metaKey||e.altKey||e.repeat)return;let n=e.target,r=n?.tagName;if(r===`INPUT`||r===`TEXTAREA`||n?.isContentEditable)return;let i=t.current;if(i.phase!==`world`)return;let a=Ln[e.key.toLowerCase()];a&&(e.preventDefault(),e.stopPropagation(),a(i)())};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[])}var zn=/Android|iPhone|iPad|iPod|webOS|BlackBerry|Opera Mini|IEMobile|Windows Phone/i;function Bn(){return/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1}function Vn(){return typeof navigator>`u`?!1:zn.test(navigator.userAgent)||Bn()}function Hn(){return typeof navigator>`u`?!0:/Chrome\//.test(navigator.userAgent)}function Un(){return typeof document>`u`?!1:document.cookie.split(`;`).some(e=>e.trim().startsWith(`bypass_browser_check=`))}function Wn(){let e=navigator.userAgent;return/iPad|iPhone|iPod/.test(e)||Bn()?`ios`:/Android/i.test(e)?`android`:`other`}var Z={root:`_root_5au7o_1`,card:`_card_5au7o_13`,logo:`_logo_5au7o_21`,title:`_title_5au7o_26`,subtitle:`_subtitle_5au7o_32`,buttons:`_buttons_5au7o_38`,store:`_store_5au7o_45`,tryAnyway:`_tryAnyway_5au7o_66`},Gn=`https://testflight.apple.com/join/KF4r3jlU`,Kn=`https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer`,qn=`https://www.google.com/chrome/`;function Jn(){return(0,P.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,P.jsx)(`path`,{d:`M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z`})})}function Yn(){return(0,P.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,P.jsx)(`path`,{d:`M3,20.5V3.5C3,2.91 3.34,2.39 3.84,2.15L13.69,12L3.84,21.85C3.34,21.6 3,21.09 3,20.5M16.81,15.12L6.05,21.34L14.54,12.85L16.81,15.12M20.16,10.81C20.5,11.08 20.75,11.5 20.75,12C20.75,12.5 20.53,12.9 20.18,13.18L17.89,14.5L15.39,12L17.89,9.5L20.16,10.81M6.05,2.66L16.81,8.88L14.54,11.15L6.05,2.66Z`})})}function Xn(){return(0,P.jsxs)(`svg`,{viewBox:`0 0 48 48`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsxs)(`defs`,{children:[(0,P.jsxs)(`linearGradient`,{id:`cg-a`,x1:`3.2173`,y1:`15`,x2:`44.7812`,y2:`15`,gradientUnits:`userSpaceOnUse`,children:[(0,P.jsx)(`stop`,{offset:`0`,stopColor:`#d93025`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#ea4335`})]}),(0,P.jsxs)(`linearGradient`,{id:`cg-b`,x1:`20.7219`,y1:`47.6791`,x2:`41.5039`,y2:`11.6837`,gradientUnits:`userSpaceOnUse`,children:[(0,P.jsx)(`stop`,{offset:`0`,stopColor:`#fcc934`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#fbbc04`})]}),(0,P.jsxs)(`linearGradient`,{id:`cg-c`,x1:`26.5981`,y1:`46.5015`,x2:`5.8161`,y2:`10.506`,gradientUnits:`userSpaceOnUse`,children:[(0,P.jsx)(`stop`,{offset:`0`,stopColor:`#1e8e3e`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#34a853`})]})]}),(0,P.jsx)(`circle`,{cx:`24`,cy:`23.9947`,r:`12`,fill:`#fff`}),(0,P.jsx)(`path`,{d:`M24,12H44.7812a23.9939,23.9939,0,0,0-41.5639.0029L13.6079,30l.0093-.0024A11.9852,11.9852,0,0,1,24,12Z`,fill:`url(#cg-a)`}),(0,P.jsx)(`circle`,{cx:`24`,cy:`24`,r:`9.5`,fill:`#1a73e8`}),(0,P.jsx)(`path`,{d:`M34.3913,30.0029,24.0007,48A23.994,23.994,0,0,0,44.78,12.0031H23.9989l-.0025.0093A11.985,11.985,0,0,1,34.3913,30.0029Z`,fill:`url(#cg-b)`}),(0,P.jsx)(`path`,{d:`M13.6086,30.0031,3.218,12.006A23.994,23.994,0,0,0,24.0025,48L34.3931,30.0029l-.0067-.0068a11.9852,11.9852,0,0,1-20.7778.007Z`,fill:`url(#cg-c)`})]})}function Zn(){document.cookie=`bypass_browser_check=1;path=/;max-age=2592000`,location.reload()}function Qn({reason:e=`mobile`}){if(e===`browser`)return(0,P.jsx)(`div`,{className:Z.root,children:(0,P.jsxs)(`div`,{className:Z.card,children:[(0,P.jsx)(`img`,{className:Z.logo,src:p(`assets/logo.png`),alt:``,draggable:!1}),(0,P.jsx)(`h1`,{className:Z.title,children:`Browser Not Supported`}),(0,P.jsxs)(`p`,{className:Z.subtitle,children:[`Decentraland Web requires `,(0,P.jsx)(`strong`,{children:`Google Chrome`}),` on desktop to run.`]}),(0,P.jsx)(`div`,{className:Z.buttons,children:(0,P.jsxs)(r,{variant:`secondary`,href:qn,target:`_blank`,rel:`noopener`,className:Z.store,children:[(0,P.jsx)(Xn,{}),(0,P.jsx)(`span`,{children:`Download Chrome`})]})}),(0,P.jsx)(`button`,{type:`button`,className:Z.tryAnyway,onClick:Zn,children:`try anyway…`})]})});let t=Wn(),n=t===`ios`||t===`other`,i=t===`android`||t===`other`;return(0,P.jsx)(`div`,{className:Z.root,children:(0,P.jsxs)(`div`,{className:Z.card,children:[(0,P.jsx)(`img`,{className:Z.logo,src:p(`assets/logo.png`),alt:``,draggable:!1}),(0,P.jsx)(`h1`,{className:Z.title,children:`Decentraland`}),(0,P.jsx)(`p`,{className:Z.subtitle,children:`This experience isn’t available on mobile browsers. Download the app to explore:`}),(0,P.jsxs)(`div`,{className:Z.buttons,children:[n&&(0,P.jsxs)(r,{variant:`secondary`,href:Gn,target:`_blank`,rel:`noopener`,className:Z.store,children:[(0,P.jsx)(Jn,{}),(0,P.jsx)(`span`,{children:`Install from App Store`})]}),i&&(0,P.jsxs)(r,{variant:`secondary`,href:Kn,target:`_blank`,rel:`noopener`,className:Z.store,children:[(0,P.jsx)(Yn,{}),(0,P.jsx)(`span`,{children:`Install from Google Play`})]})]})]})})}var Q={fatalLayer:`_fatalLayer_1q3co_5`,head:`_head_1q3co_10`,title:`_title_1q3co_14`,subtitle:`_subtitle_1q3co_20`,btn:`_btn_1q3co_27`,detail:`_detail_1q3co_32`},$n={launch:{title:`Something went wrong`,subtitle:`The 3D engine couldn't start. Reloading often fixes it.`},runtime:{title:`The world crashed`,subtitle:`The 3D engine stopped unexpectedly.`},react:{title:`Something went wrong`,subtitle:`The app hit an unexpected error.`},realm:{title:`World not found`,subtitle:``}};function er({error:e,onReload:t,onDismiss:n}){let{title:a,subtitle:o}=$n[e.source],s=e.source===`realm`;return(0,P.jsx)(i,{header:(0,P.jsxs)(`div`,{className:Q.head,children:[(0,P.jsx)(`h2`,{className:Q.title,children:a}),(0,P.jsx)(`p`,{className:Q.subtitle,children:s?e.message:o})]}),role:`alertdialog`,ariaLabel:a,onClose:n,dismissOnScrim:!!n,closeButton:!1,backdropClassName:Q.fatalLayer,actionsAlign:`center`,actions:s?(0,P.jsx)(r,{variant:`primary`,className:Q.btn,onClick:n,children:`OK`}):(0,P.jsxs)(P.Fragment,{children:[n&&(0,P.jsx)(r,{variant:`ghost`,className:Q.btn,onClick:n,children:`Dismiss`}),(0,P.jsx)(r,{variant:`primary`,className:Q.btn,onClick:t,children:`Reload`})]}),children:!s&&(0,P.jsx)(`pre`,{className:Q.detail,children:e.message})})}var tr=class extends A.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){console.error(`[react error boundary]`,e)}render(){let{error:e}=this.state;return e?(0,P.jsx)(er,{error:{message:e.stack??e.message,source:`react`},onReload:()=>location.reload()}):this.props.children}},nr=`modulepreload`,rr=function(e){return`https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-28859484780.commit-52ad0d6/`+e},ir={},ar=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=rr(t,n),t=s(t),t in ir)return;ir[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:nr,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},or=(0,A.lazy)(()=>ar(()=>import(`./Showcase-BQ4R0vaS.js`).then(e=>({default:e.Showcase})),__vite__mapDeps([0,1,2,3,4,5]))),$=new URLSearchParams(location.search),sr=$.get(`mock`)===`1`?`mock`:`engine`,cr=$.get(`showcase`)===`1`;function lr(){return $.get(`nogate`)===`1`?null:Vn()||$.get(`gate`)===`1`?`mobile`:$.get(`gate`)===`browser`||!Hn()&&!Un()?`browser`:null}var ur=lr();function dr(){Fn();let e=fr();return ur?(0,P.jsx)(Qn,{reason:ur}):(0,P.jsxs)(tr,{children:[cr?(0,P.jsx)(A.Suspense,{fallback:null,children:(0,P.jsx)(or,{})}):(0,P.jsx)(pr,{}),e&&(0,P.jsx)(yn,{})]})}function fr(){let[e,t]=(0,A.useState)($.get(`fps`)===`1`);return In(e=>(e.ctrlKey||e.metaKey)&&e.shiftKey&&(e.key===`F`||e.key===`f`),()=>t(e=>!e)),e}function pr(){let{rpc:e,createDriver:t}=(0,A.useMemo)(()=>{if(sr===`mock`)return xe(),{rpc:null,createDriver:()=>new ue};let e=new pe;return{rpc:e,createDriver:()=>new fe(e)}},[]),n=ee(t);Rn(n);let r=jn(n.phase===`entering`||n.phase===`world`),[i,a]=(0,A.useState)(null),[o,s]=(0,A.useState)(null),[c,l]=(0,A.useState)(`wearables`);(0,A.useEffect)(()=>{n.backpack.open||l(`wearables`)},[n.backpack.open]);let u=!!i&&!!n.profile.data&&n.profile.data.address.toLowerCase()===i.address.toLowerCase(),d=e=>{a(e),e.address&&n.requestUserProfile(e.address)},f=e=>{let t=e.toLowerCase();return n.friends.list.some(e=>e.address.toLowerCase()===t)?`friend`:n.friends.sent.some(e=>e.address.toLowerCase()===t)?`requested`:`none`},p=()=>{let e=n.profile.data;e&&d({address:e.address,name:e.name,picture:e.picture})},m=i?n.userProfiles[i.address.toLowerCase()]??(u?n.profile.data:{address:i.address,name:i.name,picture:i.picture,hasClaimedName:!i.name.includes(`#`)&&!/^0x[0-9a-f]+$/i.test(i.name),isGuest:!1}):null,g=e=>{e===`settings`?n.settings.toggle():e===`backpack`?n.backpack.toggle():e===`communities`?n.communities.toggle():e===`map`?n.map.toggle():e===`places`?n.places.toggle():e===`gallery`?n.gallery.toggle():e===`profile`?p():e===`signout`&&n.logout()},_=n.settings.open||n.backpack.open||n.communities.open||n.map.open||n.places.open||n.gallery.open;return(0,P.jsxs)(P.Fragment,{children:[e&&(0,P.jsx)(y,{rpc:e}),n.phase===`login`&&(0,P.jsx)(Dn,{flow:n.login}),n.phase===`picking`&&(0,P.jsx)(w,{onPick:n.pickDestination}),n.phase===`entering`&&(0,P.jsx)(kn,{scene:n.scene}),n.phase===`world`&&!n.menuOpen&&(0,P.jsxs)(P.Fragment,{children:[!_&&(0,P.jsx)(nn,{session:n,onViewProfile:p}),!_&&(0,P.jsx)(cn,{hover:n.hover,locked:n.cursorLocked,proximity:n.proximity}),(0,P.jsx)(st,{chat:n.chat,hidden:n.friends.open||_,me:n.profile.data,onAddFriend:e=>n.friends.act(`request`,e),onBlock:e=>n.friends.act(`block`,e),onViewProfile:d,onTeleport:(e,t)=>n.map.teleport(e,t),onVisitWorld:e=>s(e),relationshipOf:f}),(0,P.jsx)(yt,{friends:n.friends,me:n.profile.data,relationshipOf:f,onAddFriend:e=>n.friends.act(`request`,e),onViewProfile:d,onBlock:e=>n.friends.act(`block`,e)}),(0,P.jsx)(Tt,{settings:n.settings,profile:n.profile,onNavigate:g}),(0,P.jsx)(Et,{profile:n.profile}),(0,P.jsx)(Ft,{notifications:n.notifications}),(0,P.jsx)(Zt,{emotes:n.emotes,onCustomise:()=>{l(`emotes`),n.backpack.toggle()}}),(0,P.jsx)(x,{backpack:n.backpack,emotes:n.emotes,profile:n.profile,onNavigate:g,setEngineViewport:n.setEngineViewport,initialTab:c}),(0,P.jsx)(h,{communities:n.communities,profile:n.profile,onNavigate:g,onAddFriend:e=>n.friends.act(`request`,e),onOpenChat:()=>n.chat.toggle()}),(0,P.jsx)(te,{map:n.map,profile:n.profile,onNavigate:g}),(0,P.jsx)(b,{places:n.places,profile:n.profile,onNavigate:g,onTeleport:(e,t)=>n.map.teleport(e,t),onVisitWorld:e=>n.map.changeRealm(e)}),(0,P.jsx)(re,{gallery:n.gallery,profile:n.profile,onNavigate:g,onTeleport:(e,t)=>n.map.teleport(e,t),onViewProfile:d}),i&&m&&(0,P.jsx)(pn,{profile:m,isSelf:u,isFriend:n.friends.list.some(e=>e.address.toLowerCase()===i.address.toLowerCase()),requested:n.friends.sent.some(e=>e.address.toLowerCase()===i.address.toLowerCase()),onAddFriend:e=>n.friends.act(`request`,e),onClose:()=>a(null)},i.address),o&&(0,P.jsx)(ne,{worldName:o,onCancel:()=>s(null),onConfirm:()=>{n.map.changeRealm(o),s(null)}})]}),n.phase===`world`&&n.permissions.pending.length>0&&(0,P.jsx)(_n,{request:n.permissions.pending[0],onResolve:(e,t)=>n.permissions.resolve(n.permissions.pending[0].id,e,t)},n.permissions.pending[0].id),r.confirming&&(0,P.jsx)(An,{onStay:r.stay,onLeave:r.leave}),n.fatalError&&(0,P.jsx)(er,{error:n.fatalError,onReload:n.reload,onDismiss:n.fatalError.source===`runtime`||n.fatalError.source===`realm`?n.dismissFatal:void 0})]})}var mr=`coi_sw_reloaded`;function hr(){`serviceWorker`in navigator&&(location.pathname.endsWith(`/`)||history.replaceState(history.state,``,`${location.pathname}/${location.search}${location.hash}`),navigator.serviceWorker.register(new URL(`service_worker.js`,v)).then(e=>{if(navigator.serviceWorker.controller){sessionStorage.removeItem(mr);return}let t=()=>{sessionStorage.getItem(mr)?(sessionStorage.removeItem(mr),console.error(`[coi] service worker failed to take control after reload`)):(sessionStorage.setItem(mr,`true`),window.location.reload())};if(e.active){t();return}let n=e.installing??e.waiting;n?.addEventListener(`statechange`,()=>{n.state===`activated`&&t()})}).catch(e=>console.log(`[coi] service worker registration failed:`,e)))}hr(),(0,ce.createRoot)(document.getElementById(`root`)).render((0,P.jsx)(A.StrictMode,{children:(0,P.jsx)(dr,{})}));export{at as i,it as n,nt as r,qt as t};
|