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B,KAAkB,CAAEhC,GAAI,sBAP5C,kBAAoB,KAAU,CAAEC,GAAI,mBAHpC,kBAAoB,KAAU,CAAEA,GAAI,UA8BpD,EACOqB,CACX,CA1D8B,CA0D5B,eAEF,IAAI,EAAkB,EAAkB,EAAkB,EAAkB,EAAkBF,C","sources":["webpack://engineering-pwa/./node_modules/react-detect-offline/dist/index.js","webpack://engineering-pwa/./src/components/views/NavigationView/NavigationView.tsx","webpack://engineering-pwa/./src/components/views/IndexView/IndexView.tsx"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Detector = exports.Offline = exports.Online = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require(\"react\");\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar inBrowser = typeof navigator !== \"undefined\";\n\n// these browsers don't fully support navigator.onLine, so we need to use a polling backup\nvar unsupportedUserAgentsPattern = /Windows.*Chrome|Windows.*Firefox|Linux.*Chrome/;\n\nvar ping = function ping(_ref) {\n var url = _ref.url,\n timeout = _ref.timeout;\n\n return new Promise(function (resolve) {\n var isOnline = function isOnline() {\n return resolve(true);\n };\n var isOffline = function isOffline() {\n return resolve(false);\n };\n\n var xhr = new XMLHttpRequest();\n\n xhr.onerror = isOffline;\n xhr.ontimeout = isOffline;\n xhr.onreadystatechange = function () {\n if (xhr.readyState === xhr.HEADERS_RECEIVED) {\n if (xhr.status) {\n isOnline();\n } else {\n isOffline();\n }\n }\n };\n\n xhr.open(\"GET\", url);\n xhr.timeout = timeout;\n xhr.send();\n });\n};\n\nvar propTypes = {\n children: _propTypes2.default.node,\n onChange: _propTypes2.default.func,\n polling: _propTypes2.default.oneOfType([_propTypes2.default.shape({\n url: _propTypes2.default.string,\n interval: _propTypes2.default.number,\n timeout: _propTypes2.default.number\n }), _propTypes2.default.bool]),\n wrapperType: _propTypes2.default.string\n};\n\nvar defaultProps = {\n polling: true,\n wrapperType: \"span\"\n};\n\nvar defaultPollingConfig = {\n enabled: inBrowser && unsupportedUserAgentsPattern.test(navigator.userAgent),\n url: \"https://httpbin.org/get\",\n timeout: 5000,\n interval: 5000\n};\n\n// base class that detects offline/online changes\n\nvar Base = function (_Component) {\n _inherits(Base, _Component);\n\n function Base() {\n _classCallCheck(this, Base);\n\n var _this = _possibleConstructorReturn(this, (Base.__proto__ || Object.getPrototypeOf(Base)).call(this));\n\n _this.state = {\n online: inBrowser && typeof navigator.onLine === \"boolean\" ? navigator.onLine : true\n };\n // bind event handlers\n _this.goOnline = _this.goOnline.bind(_this);\n _this.goOffline = _this.goOffline.bind(_this);\n return _this;\n }\n\n _createClass(Base, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n window.addEventListener(\"online\", this.goOnline);\n window.addEventListener(\"offline\", this.goOffline);\n\n if (this.getPollingConfig().enabled) {\n this.startPolling();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n window.removeEventListener(\"online\", this.goOnline);\n window.removeEventListener(\"offline\", this.goOffline);\n\n if (this.pollingId) {\n this.stopPolling();\n }\n }\n }, {\n key: \"renderChildren\",\n value: function renderChildren() {\n var _props = this.props,\n children = _props.children,\n wrapperType = _props.wrapperType;\n\n // usual case: one child that is a react Element\n\n if ((0, _react.isValidElement)(children)) {\n return children;\n }\n\n // no children\n if (!children) {\n return null;\n }\n\n // string children, multiple children, or something else\n return _react.createElement.apply(undefined, [wrapperType, {}].concat(_toConsumableArray(_react.Children.toArray(children))));\n }\n }, {\n key: \"getPollingConfig\",\n value: function getPollingConfig() {\n switch (this.props.polling) {\n case true:\n return defaultPollingConfig;\n case false:\n return { enabled: false };\n default:\n return Object.assign({}, defaultPollingConfig, this.props.polling);\n }\n }\n }, {\n key: \"goOnline\",\n value: function goOnline() {\n if (!this.state.online) {\n this.callOnChangeHandler(true);\n this.setState({ online: true });\n }\n }\n }, {\n key: \"goOffline\",\n value: function goOffline() {\n if (this.state.online) {\n this.callOnChangeHandler(false);\n this.setState({ online: false });\n }\n }\n }, {\n key: \"callOnChangeHandler\",\n value: function callOnChangeHandler(online) {\n if (this.props.onChange) {\n this.props.onChange(online);\n }\n }\n }, {\n key: \"startPolling\",\n value: function startPolling() {\n var _this2 = this;\n\n var _getPollingConfig = this.getPollingConfig(),\n interval = _getPollingConfig.interval;\n\n this.pollingId = setInterval(function () {\n var _getPollingConfig2 = _this2.getPollingConfig(),\n url = _getPollingConfig2.url,\n timeout = _getPollingConfig2.timeout;\n\n ping({ url: url, timeout: timeout }).then(function (online) {\n online ? _this2.goOnline() : _this2.goOffline();\n });\n }, interval);\n }\n }, {\n key: \"stopPolling\",\n value: function stopPolling() {\n clearInterval(this.pollingId);\n }\n }]);\n\n return Base;\n}(_react.Component);\n\nBase.propTypes = propTypes;\nBase.defaultProps = defaultProps;\n\nvar Online = exports.Online = function (_Base) {\n _inherits(Online, _Base);\n\n function Online() {\n _classCallCheck(this, Online);\n\n return _possibleConstructorReturn(this, (Online.__proto__ || Object.getPrototypeOf(Online)).apply(this, arguments));\n }\n\n _createClass(Online, [{\n key: \"render\",\n value: function render() {\n return this.state.online ? this.renderChildren() : null;\n }\n }]);\n\n return Online;\n}(Base);\n\nOnline.propTypes = propTypes;\nOnline.defaultProps = defaultProps;\n\nvar Offline = exports.Offline = function (_Base2) {\n _inherits(Offline, _Base2);\n\n function Offline() {\n _classCallCheck(this, Offline);\n\n return _possibleConstructorReturn(this, (Offline.__proto__ || Object.getPrototypeOf(Offline)).apply(this, arguments));\n }\n\n _createClass(Offline, [{\n key: \"render\",\n value: function render() {\n return !this.state.online ? this.renderChildren() : null;\n }\n }]);\n\n return Offline;\n}(Base);\n\nOffline.propTypes = propTypes;\nOffline.defaultProps = defaultProps;\n\nvar Detector = exports.Detector = function (_Base3) {\n _inherits(Detector, _Base3);\n\n function Detector() {\n _classCallCheck(this, Detector);\n\n return _possibleConstructorReturn(this, (Detector.__proto__ || Object.getPrototypeOf(Detector)).apply(this, arguments));\n }\n\n _createClass(Detector, [{\n key: \"render\",\n value: function render() {\n return this.props.render({ online: this.state.online });\n }\n }]);\n\n return Detector;\n}(Base);\n\nDetector.propTypes = Object.assign({}, propTypes, {\n render: _propTypes2.default.func.isRequired\n});\nDetector.defaultProps = defaultProps;\n","var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\nimport React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { AuthService } from 'Services';\nimport { FormattedMessage } from 'Intl';\nvar MenuLink = styled(Link)(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n color: black;\\n text-decoration: none;\\n display: flex;\\n flex-flow: column;\\n padding: .5rem;\\n background-color: white;\\n & + & {\\n margin-top: .3rem;\\n }\\n\"], [\"\\n color: black;\\n text-decoration: none;\\n display: flex;\\n flex-flow: column;\\n padding: .5rem;\\n background-color: white;\\n & + & {\\n margin-top: .3rem;\\n }\\n\"])));\nvar NavigationContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject([\"\\n flex: 1;\\n background-color: #eee;\\n overflow: scroll;\\n -webkit-overflow-scrolling: touch;\\n padding-bottom: 1rem;\\n\"], [\"\\n flex: 1;\\n background-color: #eee;\\n overflow: scroll;\\n -webkit-overflow-scrolling: touch;\\n padding-bottom: 1rem;\\n\"])));\nvar SectionHeader = styled.h1(templateObject_3 || (templateObject_3 = __makeTemplateObject([\"\\n font-size: \", \";\\n margin: 1rem 1rem .5rem;\\n\"], [\"\\n font-size: \", \";\\n margin: 1rem 1rem .5rem;\\n\"])), function (props) { return props.theme.type.sizes.default; });\nvar MenuSubtitle = styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject([\"\\n font-size: \", \";\\n\"], [\"\\n font-size: \", \";\\n\"])), function (props) { return props.theme.type.sizes.small; });\nvar MenuTitle = styled.span(templateObject_5 || (templateObject_5 = __makeTemplateObject([\"\\n font-size: \", \";\\n font-weight: 600;\\n\"], [\"\\n font-size: \", \";\\n font-weight: 600;\\n\"])), function (props) { return props.theme.type.sizes.default; });\nvar NavigationView = function () { return (React.createElement(NavigationContainer, null,\n React.createElement(SectionHeader, null,\n React.createElement(FormattedMessage, { id: 'common.device' })),\n AuthService.isEngineer() && (React.createElement(MenuLink, { id: \"commission\", to: \"/device/commission\" },\n React.createElement(MenuTitle, null,\n React.createElement(FormattedMessage, { id: 'commissionDevice.title' })),\n React.createElement(MenuSubtitle, null,\n React.createElement(FormattedMessage, { id: 'navigation.commissionDevice.description' })))),\n AuthService.isEngineer() && (React.createElement(MenuLink, { id: \"decommission\", to: \"/device/decommission\" },\n React.createElement(MenuTitle, null,\n React.createElement(FormattedMessage, { id: 'navigation.decommissionDevice.title' })),\n React.createElement(MenuSubtitle, null,\n React.createElement(FormattedMessage, { id: 'navigation.decommissionDevice.description' })))),\n AuthService.isEngineer() && (React.createElement(MenuLink, { id: \"serviceCall\", to: \"/service-call\" },\n React.createElement(MenuTitle, null,\n React.createElement(FormattedMessage, { id: 'navigation.serviceCalls.title' })),\n React.createElement(MenuSubtitle, null,\n React.createElement(FormattedMessage, { id: 'navigation.serviceCalls.description' })))),\n AuthService.isEngineer() && (React.createElement(MenuLink, { id: \"myJobHistory\", to: \"/job/history\" },\n React.createElement(MenuTitle, null,\n React.createElement(FormattedMessage, { id: 'navigation.jobHistory.title' })),\n React.createElement(MenuSubtitle, null,\n React.createElement(FormattedMessage, { id: 'navigation.jobHistory.description' })))),\n AuthService.isEngineer() && (React.createElement(MenuLink, { id: \"myJobHistory\", to: \"/vehicle-location\" },\n React.createElement(MenuTitle, null,\n React.createElement(FormattedMessage, { id: 'navigation.vehicleLocation.title' })),\n React.createElement(MenuSubtitle, null,\n React.createElement(FormattedMessage, { id: 'navigation.vehicleLocation.description' })))),\n AuthService.isVTAdmin() && (React.createElement(MenuLink, { id: \"reporting\", to: \"/reporting\" },\n React.createElement(MenuTitle, null,\n React.createElement(FormattedMessage, { id: 'navigation.reporting.title' })),\n React.createElement(MenuSubtitle, null,\n React.createElement(FormattedMessage, { id: 'navigation.reporting.description' })))))); };\nexport default NavigationView;\nvar templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;\n","var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport React from 'react';\nimport { Redirect, Route, Switch } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Offline } from 'react-detect-offline';\nimport { AuthService } from 'Services';\nimport { CommissionDeviceView, NotFoundView, JobHistoryView, DecommissionDeviceView, ReportingView, ServiceCallView, VehicleLocationView, } from 'Views';\nimport { TopBar, Loading } from 'Components.Structure';\nimport { Button } from 'Components.Form';\nimport { FormattedMessage } from 'Intl';\nimport NavigationView from '../NavigationView';\nvar IndexContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n height: 100%;\\n display: flex;\\n flex-flow: column;\\n\"], [\"\\n height: 100%;\\n display: flex;\\n flex-flow: column;\\n\"])));\nvar ContentContainer = styled.main(templateObject_2 || (templateObject_2 = __makeTemplateObject([\"\\n flex: 1;\\n background-color: #eee;\\n overflow: scroll;\\n -webkit-overflow-scrolling: touch;\\n position: relative;\\n\"], [\"\\n flex: 1;\\n background-color: #eee;\\n overflow: scroll;\\n -webkit-overflow-scrolling: touch;\\n position: relative;\\n\"])));\nvar LocationContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject([\"\\n display: flex;\\n flex-flow: column;\\n align-items: center;\\n justify-content: center;\\n height: 100%;\\n\"], [\"\\n display: flex;\\n flex-flow: column;\\n align-items: center;\\n justify-content: center;\\n height: 100%;\\n\"])));\nvar LocationText = styled.p(templateObject_4 || (templateObject_4 = __makeTemplateObject([\"\\n color: white;\\n\"], [\"\\n color: white;\\n\"])));\nvar OfflineContainer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject([\"\\n position: fixed;\\n top: 0;\\n width: calc(100% - 40px);\\n height: calc(100% - 100px);\\n background-color: #fff;\\n text-align: center;\\n padding: 100px 20px;\\n\"], [\"\\n position: fixed;\\n top: 0;\\n width: calc(100% - 40px);\\n height: calc(100% - 100px);\\n background-color: #fff;\\n text-align: center;\\n padding: 100px 20px;\\n\"])));\nvar OfflineHeading = styled.h2(templateObject_6 || (templateObject_6 = __makeTemplateObject([\"\\n margin-bottom: 1.476rem;\\n color: #387dc1;\\n\"], [\"\\n margin-bottom: 1.476rem;\\n color: #387dc1;\\n\"])));\nvar IndexView = /** @class */ (function (_super) {\n __extends(IndexView, _super);\n function IndexView(props) {\n var _this = _super.call(this, props) || this;\n _this.containerRef = React.createRef();\n _this.checkLocationService = function () {\n navigator.geolocation.getCurrentPosition(function (position) {\n _this.setState({ locationEnabled: true });\n }, function (error) {\n _this.setState({ locationEnabled: false });\n }, { enableHighAccuracy: true, timeout: 20000, maximumAge: 1000 });\n };\n _this.reload = function () { return window.location.reload(); };\n _this.checkCredentials = function () { return (!(AuthService.isEngineer() || (AuthService.isVTAdmin()))); };\n _this.state = {\n locationEnabled: false,\n };\n return _this;\n }\n IndexView.prototype.componentDidMount = function () {\n this.checkLocationService();\n };\n IndexView.prototype.render = function () {\n var _this = this;\n var locationEnabled = this.state.locationEnabled;\n if (!AuthService.isLoggedIn()) {\n return (React.createElement(Redirect, { to: \"/login\" }));\n }\n if (!(AuthService.isEngineer() || (AuthService.isVTAdmin()))) {\n return (React.createElement(Redirect, { to: \"/access-denied\" }));\n }\n if (!locationEnabled) {\n return (React.createElement(LocationContainer, null,\n React.createElement(LocationText, null,\n React.createElement(FormattedMessage, { id: 'locationServices.message' })),\n React.createElement(Button, { onClick: this.reload },\n React.createElement(FormattedMessage, { id: 'common.tryAgain' }))));\n }\n return (React.createElement(IndexContainer, null,\n React.createElement(TopBar, null),\n React.createElement(ContentContainer, { ref: this.containerRef },\n React.createElement(React.Suspense, { fallback: React.createElement(Loading, { barColor: \"#000000\" }) },\n React.createElement(Switch, null,\n React.createElement(Route, { exact: true, path: \"/\", component: NavigationView }),\n React.createElement(Route, { exact: true, path: \"/device/commission\", render: function (props) { return React.createElement(CommissionDeviceView, __assign({ container: _this.containerRef.current }, props)); } }),\n React.createElement(Route, { exact: true, path: \"/device/decommission\", render: function (props) { return React.createElement(DecommissionDeviceView, __assign({ container: _this.containerRef.current }, props)); } }),\n React.createElement(Route, { exact: true, path: \"/job/history\", component: JobHistoryView }),\n React.createElement(Route, { exact: true, path: \"/reporting\", render: function (props) { return React.createElement(ReportingView, __assign({ container: _this.containerRef.current }, props)); } }),\n React.createElement(Route, { exact: true, path: \"/service-call\", render: function (props) { return React.createElement(ServiceCallView, __assign({ container: _this.containerRef.current }, props)); } }),\n React.createElement(Route, { exact: true, path: \"/vehicle-location\", render: function (props) { return React.createElement(VehicleLocationView, __assign({ container: _this.containerRef.current }, props)); } }),\n React.createElement(Route, { path: \"*\", component: NotFoundView })))),\n React.createElement(Offline, { polling: false },\n React.createElement(OfflineContainer, null,\n React.createElement(OfflineHeading, null,\n React.createElement(FormattedMessage, { id: 'common.offlineHeading' })),\n React.createElement(FormattedMessage, { id: 'common.offlineMessage' })))));\n };\n return IndexView;\n}(React.Component));\nexport default IndexView;\nvar templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;\n"],"names":["exports","undefined","obj","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","Constructor","protoProps","staticProps","prototype","_react","_propTypes","_propTypes2","__esModule","default","_classCallCheck","instance","TypeError","_possibleConstructorReturn","self","call","ReferenceError","_inherits","subClass","superClass","create","constructor","value","setPrototypeOf","__proto__","inBrowser","navigator","ping","_ref","url","timeout","Promise","resolve","isOffline","xhr","XMLHttpRequest","onerror","ontimeout","onreadystatechange","readyState","HEADERS_RECEIVED","status","open","send","propTypes","children","node","onChange","func","polling","oneOfType","shape","string","interval","number","bool","wrapperType","defaultProps","defaultPollingConfig","enabled","test","userAgent","Base","_Component","this","_this","getPrototypeOf","state","online","onLine","goOnline","bind","goOffline","window","addEventListener","getPollingConfig","startPolling","removeEventListener","pollingId","stopPolling","_props","isValidElement","createElement","apply","concat","arr","Array","isArray","arr2","from","_toConsumableArray","Children","toArray","assign","callOnChangeHandler","setState","_this2","setInterval","_getPollingConfig2","then","clearInterval","Component","Online","_Base","arguments","renderChildren","Offline","_Base2","Detector","_Base3","render","isRequired","__makeTemplateObject","cooked","raw","MenuLink","templateObject_1","NavigationContainer","templateObject_2","SectionHeader","templateObject_3","theme","type","sizes","MenuSubtitle","templateObject_4","small","MenuTitle","templateObject_5","id","to","extendStatics","__extends","d","b","p","hasOwnProperty","String","__","__assign","t","s","n","IndexContainer","ContentContainer","LocationContainer","LocationText","OfflineContainer","OfflineHeading","templateObject_6","_super","IndexView","containerRef","checkLocationService","geolocation","getCurrentPosition","position","locationEnabled","error","enableHighAccuracy","maximumAge","reload","location","checkCredentials","componentDidMount","ref","fallback","barColor","exact","path","component","container","current","onClick"],"sourceRoot":""}