var f=Object.defineProperty;var m=(r,s,t)=>s in r?f(r,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[s]=t;var a=(r,s,t)=>(m(r,typeof s!="symbol"?s+"":s,t),t);import{r as c}from"./react.0dd1ea4b.js";import{a as b}from"./Room.740ee64b.js";class h{constructor(s){a(this,"_observers",{});a(this,"_name");a(this,"_timeouts",{});this._name=s||this.constructor.name}$observe(s,t){const i=typeof s=="string"?[s]:s;return i.forEach(e=>{this._observers[e]||(this._observers[e]={notif:!1,callbacks:[]}),this._observers[e].callbacks.push(t)}),()=>{i.forEach(e=>{this._observers[e].callbacks=this._observers[e].callbacks.filter(o=>o!==t)})}}$notify(s,...t){(typeof s=="string"?[s]:s).forEach(e=>{this._timeouts[e]||(this._timeouts[e]=setTimeout(()=>{console.debug(this._name,e);const o=this._observers[e];o&&!o.notif&&(o.notif=!0,o.callbacks.forEach(u=>u(...t)),o.notif=!1),this._timeouts[e]=void 0}))})}}new h("measurements");let n;function l(){return n||(n=b()),n}function E(){const[r,s]=c.exports.useState();return c.exports.useEffect(()=>{l().then(t=>s(t))},[]),r}export{E as u};
