import { v as validateAuth } from './auth-DeCdZ83n.js';
import { j as json } from './shared-server-sSGG17Df.js';
import 'crypto';

const EVENTS_KEY = "__shooter_ws_events_clients";
const eventsClients = globalThis[EVENTS_KEY] || /* @__PURE__ */ new Set();
globalThis[EVENTS_KEY] = eventsClients;
function getEventsClientCount() {
  return eventsClients.size;
}
function getConnectedClientCount() {
  return getEventsClientCount();
}
const GET = ({ request }) => {
  const authError = validateAuth(request);
  if (authError) {
    return authError;
  }
  return json({
    connectedClients: getConnectedClientCount()
  });
};

export { GET };
//# sourceMappingURL=_server.ts-Cf84YIaW.js.map
