!function(e){var t={};function n(s){if(t[s])return t[s].exports;var o=t[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(s,o,function(t){return e[t]}.bind(null,o));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=104)}({104:function(e,t,n){n(32),e.exports=n(108)},108:function(e,t,n){"use strict";n.r(t);window.transport=new class{constructor(){this.requestIdCounter=0,this.requests={},this.queuedRequests=[],this.isReconnecting=!1,this.request=e=>new Promise((t,n)=>{var s;const o=this.requestIdCounter;this.requestIdCounter++,this.requests[o]={resolve:t,reject:n};const i=Object.assign({requestId:o},e);if((null===(s=this.socket)||void 0===s?void 0:s.readyState)!==WebSocket.OPEN)return console.log("Websocket not open. Queueing this request:",JSON.stringify(i)),void this.queuedRequests.push(i);this.socket.send(JSON.stringify(i))}),this.onOpen=()=>{console.log("Websocket connection established"),console.log(`Replaying ${this.queuedRequests.length} queued requests`),this.queuedRequests.length>0&&(this.queuedRequests.forEach(e=>this.socket.send(JSON.stringify({requestId:e.requestId,channel:e.channel,action:e.action,payload:e.payload}))),this.queuedRequests=[])},this.onClose=()=>{var e;console.log("Websocket connection closed"),this.isReconnecting||null===(e=this.disconnectCallback)||void 0===e||e.call(this)},this.onMessage=e=>{let t;try{t=JSON.parse(e.data),this.requests[t.requestId].resolve(t.payload),delete this.requests[t.requestId]}catch(t){console.log("Malformed response from backend, ignoring",e.data,t)}}}async connect(){return new Promise((e,t)=>{const{protocol:n,host:s,pathname:o}=window.location,i=`${n.replace(/http/,"ws")}//${s}${o}`;this.socket=new WebSocket(i),this.socket.addEventListener("open",()=>{this.onOpen(),e()}),this.socket.addEventListener("message",this.onMessage),this.socket.addEventListener("close",this.onClose)})}async disconnect(){return this.socket.close(),Promise.resolve()}async reconnect(){return new Promise(async(e,t)=>{this.isReconnecting=!0;for(let t=0;t<=15;t++)try{return console.log("Reconnection attempt #"+t),await Promise.race([this.connect(),new Promise((e,n)=>setTimeout(()=>n(),100*Math.pow(2,t)))]),this.isReconnecting=!1,e()}catch(e){continue}return console.log("15 retry attempts failed. Giving up."),this.isReconnecting=!1,t()})}onDisconnect(e){this.disconnectCallback=e}}},17:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},32:function(e,t,n){(function(e){("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0.333.0"}}).call(this,n(17))}});
//# sourceMappingURL=serverChunk.js.map