"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),t=["https://connectivitycheck.gstatic.com/generate_204","https://1.1.1.1/cdn-cgi/trace","https://cloudflare.com/cdn-cgi/trace"];exports.checkInternetConnection=function(){return e.__awaiter(void 0,void 0,void 0,(function(){var r,n,c,o,s;return e.__generator(this,(function(a){switch(a.label){case 0:if(!navigator.onLine)return[2,!1];r=function(t){var r,n;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),r=new AbortController,n=setTimeout((function(){return r.abort()}),3e3),[4,fetch(t,{method:"HEAD",mode:"no-cors",signal:r.signal})];case 1:return e.sent(),clearTimeout(n),[2,{value:!0}];case 2:return e.sent(),[2,"continue"];case 3:return[2]}}))},n=0,c=t,a.label=1;case 1:return n<c.length?(o=c[n],[5,r(o)]):[3,4];case 2:if("object"==typeof(s=a.sent()))return[2,s.value];a.label=3;case 3:return n++,[3,1];case 4:return[2,!1]}}))}))};
//# sourceMappingURL=checkConnection.js.map
