Files
doneit-web/.angular/cache/14.2.12/babel-webpack/94cefa370d3e711c099a27ffab7fcac1.json
T

1 line
11 KiB
JSON
Raw Normal View History

2023-06-30 09:54:21 +01:00
{"ast":null,"code":"import * as tslib_1 from \"tslib\";\nimport { Injectable } from '@angular/core';\nimport { IonicNativePlugin, cordova, checkAvailability, cordovaPropertyGet, cordovaPropertySet } from '@ionic-native/core';\nimport { Observable, merge } from 'rxjs';\nimport * as ɵngcc0 from '@angular/core';\nexport var Connection;\n(function (Connection) {\n Connection[Connection[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n Connection[Connection[\"ETHERNET\"] = 1] = \"ETHERNET\";\n Connection[Connection[\"WIFI\"] = 2] = \"WIFI\";\n Connection[Connection[\"CELL_2G\"] = 3] = \"CELL_2G\";\n Connection[Connection[\"CELL_3G\"] = 4] = \"CELL_3G\";\n Connection[Connection[\"CELL_4G\"] = 5] = \"CELL_4G\";\n Connection[Connection[\"CELL\"] = 6] = \"CELL\";\n Connection[Connection[\"NONE\"] = 7] = \"NONE\";\n})(Connection || (Connection = {}));\nvar Network = /** @class */function (_super) {\n tslib_1.__extends(Network, _super);\n function Network() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Constants for possible connection types\n */\n _this.Connection = {\n UNKNOWN: 'unknown',\n ETHERNET: 'ethernet',\n WIFI: 'wifi',\n CELL_2G: '2g',\n CELL_3G: '3g',\n CELL_4G: '4g',\n CELL: 'cellular',\n NONE: 'none'\n };\n return _this;\n }\n Network.prototype.onChange = function () {\n var _this = this;\n return function () {\n if (checkAvailability(_this) === true) {\n return merge(_this.onConnect(), _this.onDisconnect());\n }\n }();\n };\n Network.prototype.onDisconnect = function () {\n return cordova(this, \"onDisconnect\", {\n \"eventObservable\": true,\n \"event\": \"offline\",\n \"element\": \"document\"\n }, arguments);\n };\n Network.prototype.onConnect = function () {\n return cordova(this, \"onConnect\", {\n \"eventObservable\": true,\n \"event\": \"online\",\n \"element\": \"document\"\n }, arguments);\n };\n Object.defineProperty(Network.prototype, \"type\", {\n get: function () {\n return cordovaPropertyGet(this, \"type\");\n },\n set: function (value) {\n cordovaPropertySet(this, \"type\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Network.prototype, \"downlinkMax\", {\n get: function () {\n return cordovaPropertyGet(this, \"downlinkMax\");\n },\n set: function (value) {\n cordovaPropertySet(this, \"downlinkMax\", value);\n },\n enumerable: true,\n configurable: true\n });\n Network.pluginName = \"Network\";\n Network.plugin = \"cordova-plugin-network-information\";\n Network.pluginRef = \"navigator.connection\";\n Network.repo = \"https://github.com/apache/cordova-plugin-network-information\";\n Network.platforms = [\"Amazon Fire OS\", \"Android\", \"Browser\", \"iOS\", \"Windows\"];\n Network.ɵfac = /*@__PURE__*/function () {\n var ɵNetwork_BaseFactory;\n return function Network_Factory(t) {\n return (ɵNetwork_BaseFactory || (ɵNetwork_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(Network)))(t || Network);\n };\n }();\n Network.ɵprov = /*@__PURE__*/ɵngcc0.ɵɵdefineInjectable({\n token: Network,\n factory: function (t) {\n return Network.ɵfac(t);\n }\n });\n (function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(Network, [{\n type: Injectable\n }], null, null);\n })();\n return Network;\n}(IonicNativePlugin);\nexport { Network };","map":{"version":3,"names":["tslib_1","Injectable","IonicNativePlugin","cordova","checkAvailability","cordovaPropertyGet","cordovaPropertySet","Observable","merge","ɵngcc0","Connection","Network","_super","__extends","_this","apply","arguments","UNKNOWN","ETHERNET","WIFI","CELL_2G","CELL_3G","CELL_4G","CELL","NONE","prototype","onChange","onConnect","onDisconnect","Object","defineProperty","get","set","value","enumerable","configurable","pluginName","plugin","pluginRef","repo","platforms","ɵfac","ɵNetwork_BaseFactory","N