{"id":"LM4G","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395749058},{"name":"./webdetector.plugins","loc":{"line":45,"column":35},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/ts/index.ts","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/ts/webdetector.plugins.ts"},{"name":"rxjs/operators","loc":{"line":46,"column":26},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/ts/index.ts","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/operators/index.js"}],"generated":{"js":"\"use strict\";var t=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{u(r.next(t))}catch(e){o(e)}}function a(t){try{u(r.throw(t))}catch(e){o(e)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})},e=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},\"function\"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError(\"Generator is already executing.\");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1] {\n controller.abort();\n }, 1000);\n\n await fetchPromise.then(async response => {\n reachesInternet = true\n }).catch(err => {\n // console.log(`request to ${this.options.checkOnlineUrl} failed}`)\n });\n const latestLocalState = (() => {\n if(reachesInternet) {\n return 'online'\n } else {\n return 'offline'\n }\n })();\n if(latestLocalState !== this.latestState) {\n \n this.onlineObservableIntake.push(this.latestState);\n }\n this.latestState = latestLocalState;\n return reachesInternet;\n }\n\n async startPeriodicChecks() {\n while (true) {\n await this.isOnline();\n await plugins.smartdelay.delayFor(3000);\n }\n }\n}"},"lineCount":null}},"hash":"6bf02d84ac2eabfdde00ece73fdd7d39","cacheData":{"env":{}}}