<!-- SOLID-PLAYTIME · part 175 -->
1,dt=null,Ft=async()=>{dt?.abort(),dt=new AbortController;try{let X=await fetch("/api/solid/leaderboard",{method:"GET",credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"},signal:dt.signal});if(!X.ok)throw Error("leaderboard unavailable");let ot=W3(await X.json());if(!q)m(ot)}catch(X){if(!q&&!(X instanceof DOMException&&X.name==="AbortError"))m({status:"error",leaders:[]})}};Ft();let Et=window.setInterval(()=>void Ft(),90000);return()=>{q=!0,dt?.abort(),window.clearInterval(Et)}},[]),Ze(()=>{let q=(Ft)=>{let Et=n.current;if(!Et)return;let X=Ft.key.toLowerCase();if(X==="w"||X==="arrowup")Et.setMovement(0,1);if(X==="s"||X==="arrowdown")Et.setMovement(0,-1);if(X==="a"||X==="arrowleft")Et.setMovement(-1,0);if(X==="d"||X==="arrowright")Et.setMovement(1,0);if(X==="shift")Et.setRun(!0);if(X===" ")Et.jump();if(X==="e")Et.enterNearby();if(X==="j"&&!Ft.repeat)Et.attack();if(X==="f"&&!Ft.repeat)T(Et.toggleFly())},dt=(Ft)=>{let Et=n.current;if(!Et)return;let X=Ft.key.toLowerCase();if(["w","a","s","d","arrowup","arrowdown","arrowleft","arrowright"].includes(X))Et.setMovement(0,0);if(X==="shift")Et.setRun(!1)};return window.addEventListener("keydown",q),window.addEventListener("keyup",dt),()=>{window.removeEventListener("keydown",q),window.removeEventListener("keyup",dt)}},[]);function O(q){if(s.current!==q.pointerId)return;let dt=q.clientX-a.current.x,Ft=q.clientY-a.current.y,Et=Math.max(1,Math.hypot(dt,Ft)),X=Math.min(42,Et),ot=dt/Et*X,Y=Ft/Et*X,yt=q.currentTarget.querySelector(".stick");if(yt)yt.style.transform=`translate(${ot}px, ${Y}px)`;n.current?.setMovement(ot/42,-Y/42)}function V(q){let dt=q.currentTarget.getBoundingClientRect();s.current=q.pointerId,a.current={x:dt.left+dt.width/2,y:dt.top+dt.height/2},q.currentTarget.setPointerCapture(q.pointerId),O(q)}function k(q){if(s.current!==q.pointerId)return;s.current=null,n.current?.setMovement(0,0);let dt=q.currentTarget.querySelector(".stick");if(dt)dt.style.transform="translate(0, 0)"}function et(q){r.current={id:q.pointerId,x:q.clientX,y:q.clientY},q.currentTarget.setPointerCapture(q.pointerId)}function Z(q){if(!r.current||r.current.id!==q.pointerId)return;n.current?.orbit(q.clientX-r.current.x,q.clientY-r.current.y),r.current={id:q.pointerId,x:q.clientX,y:q.clientY}}function at(q){if(r.current?.id===q.pointerId)r.current=null}function W(q,dt){S((Ft)=>{let Et=new Set(Ft);if(dt)Et.add(q);else Et.delete(q);return Et})}function ht(q,dt){W(q,!0),dt(),window.setTimeout(()=>W(q,!1),140)}function mt(q){q.preventDefault();let dt=v.trim();if(!dt)return;d((Ft)=>[...Ft,{who:"YOU",text:dt}]),y("")}return pt("main",{className:"game-shell lobby-shell",style:{"--traveler-color":ZM(t.color,window.__travelerSeed?.isKing===!0)},children:[H("div",{className:"world-stage",ref:e,onPointerDown:et,onPointerMove:Z,onPointerUp:at,onPointerCancel:at}),w&&pt("div",{className:"between-worlds",role:"status","aria-label":"The King between worlds",style:{"--between-color":t.isKing?"#ffd66d":t.color},children:[pt("div",{className:"between-king",children:[H("i",{className:"between-crown"}),H("i",{className:"between-head"}),H("i",{className:"between-body"}),H("i",{className:"between-glow"})]}),H("span",{children:"BETWEEN WORLDS"})]}),H("div",{className:"nightmare-veil lobby-veil"}),pt("header",{className:"lobby-hud","aria-label":"Lobby status",children:[pt("div",{className:"traveler-mark",children:[H("i",{}),H("span",{children:"YOUR LIGHT"})]}),pt("div",{className:"lobby-place",children:[H("span",{children:l.place}),H("small",{children:l.route})]}),H("button",{"aria-label":"Open traveler channel",onClick:()=>p(!0),children:"CHANNEL"})]}),pt("div",{className:"lobby-notice",children:[H("span",{children:"FREE LOBBY"}),H("p",{children:"THE MISSION HAS NOT STARTED"})]}),pt("div",{className:"portal-legend","aria-label":"Wormhole guide",children:[H("span",{className:"gold",children:"ENTRANCE"}),H("span",{className:"cyan",children:"RETURN TO DECK"}),H("span",{className:"magenta",children:"ONWARD — FAR ACROSS THE ISLANDS"})]}),u&&H("div",{className:"world-message",role:"status",children:u}),pt("section",{className:"sr-only","aria-live":"polite","aria-label":"Leaderboard of Continuum Infusion",children:[H("h2",{children:"Leaderboard of Continuum Infusion"}),g.status==="error"&&H("p",{children:"The board is dark."}),g.status==="ready"&&g.leaders.length===0&&H("p",{children:"No travelers infused yet — be the first."}),g.leaders.length>0&&H("ol",{children:g.leaders.map((q)=>pt("li",{children:[q.name,": ",q.infusion]},`${q.name}-${q.infusion}`))})]}),pt("div",{className:"touch-layer lobby-controls",children:[pt("div",{className:"flight-stick",role:"group","aria-label":"Roam and flight controls",children:[H("button",{className:`flight-height higher${x.has("higher")?" is-down":""}`,"aria-label":"Fly higher",disabled:!A,onClick:()=>ht("higher",()=>n.current?.adjustFlight(3.2)),children:"FLY HIGHER"}),pt("div",{className:"joystick",ref:i,"aria-label":"M