"use strict";exports.id=3904,exports.ids=[3904],exports.modules={33904:(a,b,c)=>{c.d(b,{wsBridge:()=>e});class d{static getInstance(){return d.instance||(d.instance=new d),d.instance}sendToUser(a,b){try{let c=global.wsUserConnections,d=global.wsConnections;if(!c||!d)return!1;let e=c.get(a);if(!e)return!1;let f=d.get(e);if(!f)return!1;if(1===f.readyState)return f.send(JSON.stringify(b)),!0;return!1}catch(a){return!1}}broadcastToRoom(a,b,c){try{let d=global.wsRoomConnections,e=global.wsConnections;if(!d||!e)return 0;let f=d.get(a);if(!f)return 0;let g=0;return f.forEach(a=>{if(a!==c){let c=e.get(a);if(c&&1===c.readyState)try{c.send(JSON.stringify(b)),g++}catch(a){}}}),g}catch(a){return 0}}getConnectedUsers(){try{let a=global.wsUserConnections;if(!a)return[];return Array.from(a.keys())}catch(a){return[]}}isUserConnected(a){try{let b=global.wsUserConnections;if(!b)return!1;return b.has(a)}catch(a){return!1}}}let e=d.getInstance()}};