"use strict";(self.webpackChunkproject=self.webpackChunkproject||[]).push([[457],{5457:(w,s,t)=>{t.r(s),t.d(s,{Network:()=>l,NetworkWeb:()=>a});var c=t(8885),r=t(4961);function i(){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 a extends r.E_{constructor(){super(),this.handleOnline=()=>{const e={connected:!0,connectionType:i()};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,u=i();return{connected:e,connectionType:e?u:"none"}})()}}const l=new a}}]);