{"version":3,"sources":["../../../../src/client/dev/error-overlay/websocket.ts"],"names":["addMessageListener","sendMessage","connectHMR","source","eventCallbacks","getSocketProtocol","assetPrefix","protocol","location","URL","callback","push","data","readyState","OPEN","send","reconnections","options","init","close","handleOnline","window","console","log","handleMessage","event","msg","JSON","parse","eventCallback","timer","handleDisconnect","onerror","onclose","reload","clearTimeout","setTimeout","hostname","port","replace","url","startsWith","split","WebSocket","path","onopen","onmessage"],"mappings":";;;;;;;;;;;;;;;;IAmBgBA,kBAAkB;eAAlBA;;IAIAC,WAAW;eAAXA;;IAOAC,UAAU;eAAVA;;;AA5BhB,IAAIC;AAIJ,MAAMC,iBAAwC,EAAE;AAEhD,SAASC,kBAAkBC,WAAmB;IAC5C,IAAIC,WAAWC,SAASD,QAAQ;IAEhC,IAAI;QACF,uBAAuB;QACvBA,WAAW,IAAIE,IAAIH,aAAaC,QAAQ;IAC1C,EAAE,UAAM,CAAC;IAET,OAAOA,aAAa,UAAU,OAAO;AACvC;AAEO,SAASP,mBAAmBU,QAAwB;IACzDN,eAAeO,IAAI,CAACD;AACtB;AAEO,SAAST,YAAYW,IAAY;IACtC,IAAI,CAACT,UAAUA,OAAOU,UAAU,KAAKV,OAAOW,IAAI,EAAE;IAClD,OAAOX,OAAOY,IAAI,CAACH;AACrB;AAEA,IAAII,gBAAgB;AAEb,SAASd,WAAWe,OAA8C;IACvE,SAASC;QACP,IAAIf,QAAQA,OAAOgB,KAAK;QAExB,SAASC;YACPJ,gBAAgB;YAChBK,OAAOC,OAAO,CAACC,GAAG,CAAC;QACrB;QAEA,SAASC,cAAcC,KAA2B;YAChD,sDAAsD;YACtD,MAAMC,MAAwBC,KAAKC,KAAK,CAACH,MAAMb,IAAI;YACnD,KAAK,MAAMiB,iBAAiBzB,eAAgB;gBAC1CyB,cAAcH;YAChB;QACF;QAEA,IAAII;QACJ,SAASC;YACP5B,OAAO6B,OAAO,GAAG;YACjB7B,OAAO8B,OAAO,GAAG;YACjB9B,OAAOgB,KAA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