import View from"./view.mjs";export default class GameView extends View{route="/game";_template="game";_methods=["get"];async handleGet(e,t){try{this.constructor.assertDocumentDestination(e)}catch(e){return t.status(401).send(e.message)}const{db:r,game:s,logger:o}=global;if(!s.world)return this._noWorld(e,t);if(!e.user)return t.redirect(`${e.baseUrl}/join`);if(!await r.User.get(e.user))return o.error(Error(`User ${e.user} not found!`)),t.redirect(`${e.baseUrl}/join`);const a=await r.Setting.getValue("core.moduleConfiguration")||{},i=View._getStaticContent({world:!0,moduleConfig:a});t.render(this._template,{scripts:i.scripts,styles:i.styles,watermark:null})}}