System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./data-legacy-B9xdUIE5.js?v=1773287522785"],(function(e,t){"use strict";var a,n,c,s;return{setters:[e=>{a=e.bp,n=e.bq,c=e.i},e=>{s=e.i}],execute:function(){e("u",(function(e,t={}){const o={},i=a(function(){const{host:t,protocol:a}=window.location;return("http:"===a?"ws://":"wss://")+t+"/v2"+e}(),{autoReconnect:{retries:0,delay:500},immediate:t.immediate,onConnected:()=>{!function(){const e={};e["x-http-token"]=document.getElementById("request_token_head")?.getAttribute("token"),t.verifyData&&Object.assign(e,t.verifyData),l(e)}(),r()},onMessage:(e,a)=>{if(s(a.data)){const t=JSON.parse(a.data),n=t.callback||t.ws_callback||t.def_name;n&&o[n]&&o[n].callback(e,a)}t.onMessage?.(e,a)},onDisconnected:t.onDisconnected}),l=e=>{(e=>i.status.value===e)("OPEN")&&i.send(c(e)?JSON.stringify(e):e)},r=()=>{Object.entries(o).forEach((([,e])=>{l(e.data)}))};return{...i,send:(e,t)=>{if(t)o[t.action]={data:e,callback:t.callback};else{const t=n(10);o[t]={data:e,callback:()=>{}}}l(e)},close:()=>{Object.keys(o).forEach((e=>{delete o[e]})),i.close()}}}))}}}));
