File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/www/8135.8edd680ba485d81a.js
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8135],{68135:(u,s,t)=>{t.r(s),t.d(s,{Network:()=>w,NetworkWeb:()=>i});var c=t(73308),r=t(22126);function a(){const o=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection;let n="unknown";const e=o?o.type||o.effectiveType:null;if(e&&"string"==typeof e)switch(e){case"bluetooth":case"cellular":case"slow-2g":case"2g":case"3g":n="cellular";break;case"none":n="none";break;case"ethernet":case"wifi":case"wimax":case"4g":n="wifi";break;case"other":case"unknown":n="unknown"}return n}class i extends r.E_{constructor(){super(),this.handleOnline=()=>{const e={connected:!0,connectionType:a()};this.notifyListeners("networkStatusChange",e)},this.handleOffline=()=>{this.notifyListeners("networkStatusChange",{connected:!1,connectionType:"none"})},typeof window<"u"&&(window.addEventListener("online",this.handleOnline),window.addEventListener("offline",this.handleOffline))}getStatus(){var n=this;return(0,c.A)(function*(){if(!window.navigator)throw n.unavailable("Browser does not support the Network Information API");const e=window.navigator.onLine,l=a();return{connected:e,connectionType:e?l:"none"}})()}}const w=new i}}]);