{"version":3,"sources":["error.js","Casegraph.js","legend.jsx","LeafletMap.js","About.js","App.js","routes.js","serviceWorker.js","index.js","styles/Images/downArrow.png","styles/Images/downArrowDark.png","styles/Images/upArrow.png","styles/Images/upArrowDark.png"],"names":["Error","props","url","style","fontFamily","fontWeight","fontStyle","className","onClick","history","push","this","Component","Chart","toggle","setState","on","state","buttonDirection","upArrow","darkArrow","upArrowDark","downArrow","downArrowDark","onClickHandler","event","newIndex","target","innerText","updateChart","collapse","display","render","chartData","data","latest","region","index","myObj","require","retDict","date","tempDates","tempVals","dates","vals","v","err","console","log","index_data","getData","current_index","labels","datasets","label","fill","borderColor","backgroundColor","pointBackgroundColor","pointBorderColor","pointHoverBackgroundColor","pointHoverBorderColor","setData","country","undefined","r","includes","split","id","class","minWidth","color","fontSize","verticalAlign","paddingTop","float","src","onMouseOver","e","currentTarget","onMouseOut","height","width","alt","options","title","text","fontColor","hover","mode","intersect","legend","position","elements","line","tension","scales","xAxes","ticks","scaleLabel","labelString","yAxes","Legend","colors","i","c","classify","length","React","customBounds","colorDict","statusDict","defaultData","mapData","features","properties","ADMIN","backup","JSON","parse","stringify","big_countries","xhr","XMLHttpRequest","addEventListener","LeafletMap","initialized","mapRef","createRef","geoJSONRef","useState","L","control","info","graph","highlightFeature","layer","setStyle","weight","dashArray","fillOpacity","Browser","ie","opera","edge","bringToFront","update","feature","resetHighlight","current","leafletElement","resetStyle","zoomToFeature","init","fitBounds","name_en","getBounds","open","send","responseText","name","clearLayers","addData","useEffect","onAdd","map","_div","DomUtil","create","innerHTML","toString","replace","addTo","div","jsx","Casegraph","ReactDOM","Map","center","lat","lng","ref","zoom","window","innerHeight","TileLayer","attribution","tileSize","zoomOffset","GeoJSON","fillColor","opacity","onEachFeature","mouseover","mouseout","click","About","href","rel","App","about","view","setView","Navbar","expand","Brand","Toggle","aria-controls","Collapse","Nav","activeKey","onSelect","selectedKey","Item","Link","eventKey","Routes","exact","path","component","Boolean","location","hostname","match","StrictMode","document","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch","error","message","module","exports"],"mappings":"glgnCA8BeA,G,wDAzBX,WAAYC,GAAO,IAAD,8BACd,cAAMA,IACDC,IAAM,0BAFG,E,qDAKR,IAAD,OACP,OACI,yBAAKC,MAAS,CAACC,WAAY,gBACzB,4BAAI,oDACJ,yBAAKD,MAAS,CAACC,WAAY,gBAC3B,uDAIA,yBAAKD,MAAS,CAACE,WAAY,QAC7B,yBAAKF,MAAQ,CAACG,UAAW,UAAUC,UAAU,qBAAqBC,QAAS,kBAAM,EAAKP,MAAMQ,QAAQC,KAAK,OAAM,0DACzFC,KAAKT,IADoF,Y,GAhBrGU,c,mKC4PLC,E,kDAtPX,WAAYZ,GAAQ,IAAD,8BACf,cAAMA,IAaVa,OAAS,WACL,EAAKC,SAAS,CACVC,IAAK,EAAKC,MAAMD,MAEE,IAAlB,EAAKC,MAAMD,GACX,EAAKD,SAAS,CACVG,gBAAiBC,IACjBC,UAAWC,MAGf,EAAKN,SAAS,CACVG,gBAAiBI,IACjBF,UAAWG,OA1BJ,EAwGnBC,eAAiB,SAACC,GACd,IAAIC,EAAWD,EAAME,OAAOC,UAC5B,EAAKC,YAAYH,IA1GF,EA6GnBI,SAAW,WACP,EAAKf,SAAS,CACVgB,SAAS,IAEb,EAAKC,UA/GL,EAAKf,MAAQ,CACTgB,UAAW,GACXC,KAAM,GACNC,OAAQ,GACRC,OAAQ,GACRL,SAAS,EACTf,IAAI,EACJE,gBAAiBI,IACjBF,UAAWG,KAVA,E,gLAmCf,IAASc,KAHLC,EAAQC,EAAQ,KAEhBC,EAAU,GACIF,EAAO,CAGrB,IAASG,KAFLC,EAAY,GACZC,EAAW,GACEL,EAAMD,GACnBM,EAASjC,KAAK4B,EAAMD,GAAOI,IAC3BC,EAAUhC,KAAK+B,GAInBD,EADQH,GACK,CAACK,EAAWC,G,gBAGvBhC,KAAKI,SAAS,CAAEmB,KAAMM,I,oIAIxBH,GACJ,IAAIO,EAAQ,GACRC,EAAO,G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React, { Component } from \"react\";\r\n// import {Redirect} from 'react-router';\r\nimport './Data.css';\r\n\r\nclass Error extends Component {\r\n constructor(props){\r\n super(props)\r\n this.url = 'https://covid19-map.com'\r\n\r\n }\r\n render() {\r\n return (\r\n
\r\n

ERROR 404

\r\n
\r\n \r\n page not found\r\n \r\n
\r\n
\r\n
this.props.history.push('/')}>\r\n click to return to {this.url} \r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n}\r\n\r\nexport default Error;\r\n","import React, { Component } from \"react\";\r\nimport { Line } from \"react-chartjs-2\";\r\nimport \"bootstrap/dist/css/bootstrap.min.css\";\r\nimport \"./styles/CasesChart.css\";\r\nimport downArrow from \"./styles/Images/downArrow.png\";\r\nimport upArrow from \"./styles/Images/upArrow.png\";\r\nimport downArrowDark from \"./styles/Images/downArrowDark.png\";\r\nimport upArrowDark from \"./styles/Images/upArrowDark.png\";\r\n\r\nclass Chart extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n chartData: {},\r\n data: {},\r\n latest: \"\",\r\n region: \"\",\r\n display: true,\r\n on: false, //false is down, true is up\r\n buttonDirection: downArrow,\r\n darkArrow: downArrowDark,\r\n };\r\n }\r\n\r\n toggle = () => {\r\n this.setState({\r\n on: !this.state.on,\r\n });\r\n if (this.state.on === false) {\r\n this.setState({\r\n buttonDirection: upArrow,\r\n darkArrow: upArrowDark,\r\n });\r\n } else {\r\n this.setState({\r\n buttonDirection: downArrow,\r\n darkArrow: downArrowDark,\r\n });\r\n }\r\n };\r\n //Takes currency, gives back [dates,xrates]\r\n async setData() { \r\n let myObj = require('./data/global.json')\r\n\r\n let retDict = {};\r\n for (let index in myObj) {\r\n let tempDates = [];\r\n let tempVals = [];\r\n for (let date in myObj[index]) {\r\n tempVals.push(myObj[index][date]);\r\n tempDates.push(date);\r\n \r\n }\r\n let t = index;\r\n retDict[t] = [tempDates, tempVals];\r\n }\r\n \r\n await this.setState({ data: retDict });\r\n \r\n }\r\n\r\n getData(index) {\r\n let dates = [];\r\n let vals = [];\r\n \r\n try{\r\n for (let date in this.state.data[index][0]) {\r\n dates.push(this.state.data[index][0][date]);\r\n }\r\n for (let v in this.state.data[index][1]) {\r\n vals.push(this.state.data[index][1][v]);\r\n }\r\n } catch( err){\r\n console.log(this.state.data);\r\n console.log(index)\r\n throw err;\r\n }\r\n let ret = [dates, vals];\r\n return ret;\r\n }\r\n\r\n async updateChart(index) {\r\n let index_data = this.getData(index);\r\n let dates = index_data[0];\r\n let vals = index_data[1];\r\n\r\n this.setState({\r\n current_index: index,\r\n region: index,\r\n chartData: {\r\n labels: dates,\r\n datasets: [\r\n {\r\n label: \"Confirmed Cases\",\r\n data: vals,\r\n fill: false,\r\n borderColor: \"#cc4125\",\r\n backgroundColor: \"#cc4125\",\r\n pointBackgroundColor: \"#cc4125\",\r\n pointBorderColor: \"#cc4125\",\r\n pointHoverBackgroundColor: \"#a3341d\",\r\n pointHoverBorderColor: \"#a3341d\",\r\n },\r\n ],\r\n },\r\n });\r\n }\r\n\r\n async componentWillMount() {\r\n await this.setData();\r\n this.updateChart(this.props.country); //default indence\r\n }\r\n\r\n //updates chart for specific country\r\n onClickHandler = (event) => {\r\n let newIndex = event.target.innerText;\r\n this.updateChart(newIndex);\r\n };\r\n\r\n collapse = () => {\r\n this.setState({\r\n display: false,\r\n });\r\n this.render();\r\n };\r\n\r\n render() {\r\n if (this.props.country !== undefined) {\r\n if (\r\n this.props.country !== this.state.latest &&\r\n this.props.country in this.state.data\r\n ) {\r\n this.updateChart(this.props.country);\r\n let r = this.props.country;\r\n if (this.props.country.includes(\"-\")) {\r\n r = this.props.country.split(\"-\")[0];\r\n }\r\n this.setState({\r\n latest: this.props.country,\r\n region: r,\r\n });\r\n }\r\n }\r\n\r\n // function collapse (){\r\n // let ting = document.getElementById(\"graphCollapse\");\r\n // this.setState({\r\n // display: false\r\n // });\r\n // }\r\n\r\n return (\r\n
\r\n
\r\n {!this.state.on && (\r\n \r\n Casegraph\r\n \r\n )}\r\n \r\n (e.currentTarget.src = this.state.darkArrow)\r\n }\r\n onMouseOut={(e) =>\r\n (e.currentTarget.src = this.state.buttonDirection)\r\n }\r\n height=\"40\"\r\n width=\"40\"\r\n alt=\"alt\"\r\n onClick={this.toggle}\r\n />\r\n
\r\n\r\n {this.state.on && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default Chart;\r\n","import React from 'react';\r\nimport './Data.css';\r\n\r\nclass Legend extends React.Component{\r\n constructor(props){\r\n super(props)\r\n this.state = {\r\n // Colors defined in Data.css\r\n colors: [['forestgreen', 'No cases'],\r\n ['green', 'Cases decreasing'],\r\n ['yellow', 'Cases plateauing'],\r\n ['orange', 'Linear increase'],\r\n ['red', 'Exponential increase'],\r\n ['grey', 'Undefined cases']]\r\n }\r\n }\r\n // changeColor(color){\r\n // var bodyStyles = document.body.style;\r\n // bodyStyles.setProperty('--legend-color', color)\r\n // }\r\n // ('(255,85,0)', 'Decreasing Slope')\r\n // ('(255,0,0)', 'Exponential Increase')\r\n // ('(84,255,0)', 'Cases decreasing by more and more')\r\n // ('(255,170,0)', 'Near 0, but increasing')\r\n // ('(170,255,0)', 'Cases decreasing, but by less and less')\r\n // ('(255,255,0)', 'Near 0, but decreasing')\r\n // ('(0,255,0)', 'No Cases')\r\n legendText(){\r\n let color = [];\r\n // for(var c in this.state.colors){\r\n for(var i = 0; i< 6; i++){\r\n let c = this.state.colors[i]\r\n let classify = 'colors ' + c[0];\r\n color.push(\r\n bo {c[1]}

\r\n );\r\n }\r\n return (\r\n
{color}
\r\n );\r\n }\r\n render() {\r\n let color = [];\r\n // for(var c in this.state.colors){\r\n for(var i = 0; ib {c[1]}\r\n );\r\n }\r\n return (\r\n
\r\n {color}\r\n
\r\n //
{this.legendText()}
\r\n )\r\n }\r\n}\r\n\r\nexport default Legend;","// @flow\r\nimport React, { createRef, useEffect, useState } from \"react\";\r\nimport { Map, TileLayer, GeoJSON } from \"react-leaflet\";\r\nimport L from \"leaflet\";\r\nimport Casegraph from \"./Casegraph.js\";\r\nimport ReactDOM from \"react-dom\";\r\nimport './Data.css';\r\nimport Legend from './legend.jsx';\r\nimport Control from \"react-leaflet-control\";\r\nimport \"./styles/CasesChart.css\";\r\n\r\nvar customBounds = {\r\n \"United States of America\": [[50, -70],[35.0000,-130]],\r\n \"Alaska\": [[72.559290,-140],[51.2,-186.004319]],\r\n \"Canada\": [[74.6773358417,-49.6668184285],[40.3209806691,-143.7406068054]],\r\n \"France\": [[41.9281506772,-5.8970008063],[51.6370183287,9.5523234029]],\r\n \"Russia\": [[78, 180], [38,20]]\r\n}\r\n\r\nvar colorDict = require(\"./data/color.json\");\r\nvar statusDict = require(\"./data/status.json\");\r\n\r\nvar defaultData = require('./data/countries_110.json');\r\nvar mapData = {}\r\nfor (let index in defaultData.features){\r\n mapData[defaultData.features[index].properties.ADMIN] = defaultData.features[index];\r\n}\r\nvar backup = JSON.parse(JSON.stringify(mapData));\r\nvar big_countries = require('./data/big_countries.json');\r\n\r\nvar xhr = new XMLHttpRequest()\r\nxhr.addEventListener('load', () => {\r\n})\r\n\r\nconst LeafletMap = (props) => {\r\n let initialized = false;\r\n var mapRef = createRef();\r\n var geoJSONRef = createRef();\r\n var [info, setInfo] = useState(L.control());\r\n var [graph, setGraph] = useState(L.control());\r\n\r\n const handleClick = (event) => {\r\n };\r\n\r\n var mapboxAccessToken =\r\n \"pk.eyJ1IjoiY29yb25hdHJhY2tlciIsImEiOiJjazkzOTdtbDcwMmI0M2VxbjVtZHcwd2VuIn0.kKpmEGWj7mKvzeIp3-U-Ug\";\r\n\r\n const getColor = (name) => {\r\n if (name in colorDict) {\r\n return colorDict[name]\r\n }\r\n return \"#999991\";\r\n };\r\n \r\n const style = (feature) => {\r\n return {\r\n fillColor: getColor(\r\n feature.properties.ADMIN || feature.properties.name_en\r\n ),\r\n weight: 1,\r\n opacity: 1,\r\n color: \"white\",\r\n dashArray: \"3\",\r\n fillOpacity: 0.7,\r\n };\r\n };\r\n\r\n const highlightFeature = (e) => {\r\n var layer = e.target;\r\n\r\n layer.setStyle({\r\n weight: 2,\r\n color: \"#666\",\r\n dashArray: \"\",\r\n fillOpacity: 0.7,\r\n });\r\n\r\n if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) {\r\n layer.bringToFront();\r\n }\r\n info.update(layer.feature.properties);\r\n graph.update(layer.feature.properties);\r\n };\r\n\r\n const resetHighlight = (e) => {\r\n geoJSONRef.current.leafletElement.resetStyle(e.target);\r\n info.update();\r\n graph.update();\r\n };\r\n\r\n const zoomToFeature = (e) => { \r\n if (!initialized){\r\n init();\r\n }\r\n if (e.target.feature.properties.ADMIN in customBounds){\r\n mapRef.current.leafletElement.fitBounds(customBounds[e.target.feature.properties.ADMIN]);\r\n }\r\n else if (e.target.feature.properties.name_en in customBounds){\r\n mapRef.current.leafletElement.fitBounds(customBounds[e.target.feature.properties.name_en]);\r\n }\r\n else{\r\n mapRef.current.leafletElement.fitBounds(e.target.getBounds());\r\n }\r\n if (big_countries.includes(e.target.feature.properties.ADMIN)) {\r\n xhr.open('GET', 'https://raw.githubusercontent.com/gnanduru1/CoronaTrackerAPI/master/big_countries/'+e.target.feature.properties.ADMIN+'.json', false);\r\n xhr.send();\r\n mapData[e.target.feature.properties.ADMIN] = JSON.parse(xhr.responseText);\r\n init();\r\n }\r\n };\r\n\r\n const onEachFeature = (feature, layer) => {\r\n layer.on({\r\n mouseover: highlightFeature,\r\n mouseout: resetHighlight,\r\n click: zoomToFeature,\r\n });\r\n };\r\n const reset = () => { \r\n mapData = JSON.parse(JSON.stringify(backup));\r\n init()\r\n };\r\n const init = () => {\r\n if (geoJSONRef.current==undefined){\r\n return;\r\n }\r\n geoJSONRef.current.leafletElement.clearLayers();\r\n for (let name in mapData){\r\n geoJSONRef.current.leafletElement.addData(mapData[name]);\r\n }\r\n initialized = true;\r\n }\r\n\r\n useEffect(() => {\r\n // var info = L.control();\r\n info.onAdd = function (map) {\r\n this._div = L.DomUtil.create(\"div\", \"info\"); // create a div with a class \"info\"\r\n this.update();\r\n return this._div;\r\n };\r\n\r\n\r\n // method that we will use to update the control based on feature properties passed\r\n info.update = function (props) {\r\n if (props != undefined) {\r\n let name = props.ADMIN;\r\n if (name === undefined) {\r\n name = props.name_en;\r\n }\r\n let data = statusDict[name];\r\n\r\n if (data === undefined) {\r\n data = statusDict[props.name_en];\r\n }\r\n if (data === undefined) {\r\n console.log(props);\r\n console.log(name);\r\n\r\n data = 'Undefined'\r\n }\r\n this._div.innerHTML =\r\n \"

COVID-19 Interactive Map

\" +\r\n (props\r\n ? \"\" + name + \"
\" + data.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \" \") + \" cases\"\r\n : \"Hover over a region\");\r\n }\r\n };\r\n\r\n info.addTo(mapRef.current.leafletElement);\r\n\r\n graph.onAdd = function (map) {\r\n this.div = L.DomUtil.create(\"div\", \"graph\");\r\n const jsx = (\r\n
\r\n \r\n
\r\n );\r\n ReactDOM.render(jsx, this.div);\r\n return this.div;\r\n };\r\n\r\n graph.update = function (props) {\r\n if (props != undefined) {\r\n let name = props.ADMIN;\r\n if (name === undefined) {\r\n name = props.name_en;\r\n }\r\n const jsx = (\r\n
\r\n \r\n
\r\n );\r\n ReactDOM.render(jsx, this.div);\r\n return this.div;\r\n }\r\n };\r\n\r\n graph.addTo(mapRef.current.leafletElement);\r\n\r\n init();\r\n }, []);\r\n \r\n return (\r\n
\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n
Colors
\r\n
\r\n\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default LeafletMap;","import React from 'react';\r\nimport './Data.css';\r\nclass About extends React.Component{\r\n render() {\r\n return (\r\n
\r\n

\r\n About COVID-19 Map\r\n

\r\n

\r\n Click on a country to divide it into regions.

\r\n Currently detailable countries are\r\n India, United Kingdom, France, United States of America, Denmark, Netherlands, Italy, Spain, Australia, Canada, China, and New Zealand\r\n



\r\n Built with ReactJS, Leaflet, and OpenStreetMap.\r\n

\r\n \r\n Data Collection\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default About;","import React, { useState } from \"react\";\r\nimport LeafletMap from \"./LeafletMap.js\";\r\nimport About from \"./About.js\"\r\nimport \"bootstrap/dist/css/bootstrap.min.css\";\r\nimport { Navbar } from \"react-bootstrap\";\r\nimport Nav from \"react-bootstrap/Nav\";\r\nimport \"./styles/App.css\";\r\n\r\n\r\nconst App = () => {\r\n const map = \r\n const about = \r\n const [view, setView] = useState(map);\r\n\r\n const onSelect = selectedKey => {\r\n switch (selectedKey) {\r\n case \"map\":\r\n setView(map);\r\n break;\r\n case \"about\":\r\n setView(about);\r\n break;\r\n default:\r\n setView(map);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n COVID-19 Map\r\n \r\n \r\n onSelect(selectedKey)}\r\n >\r\n \r\n Map\r\n \r\n \r\n About\r\n \r\n \r\n \r\n \r\n {view}\r\n
\r\n );\r\n};\r\n\r\nexport default App;\r\n","import React from 'react';\r\nimport {Route, Switch, BrowserRouter as Router } from \"react-router-dom\";\r\n\r\nimport Error from './error.js';\r\nimport App from './App.js';\r\n\r\n\r\nconst Routes =() =>{\r\n return(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Routes","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' },\r\n })\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then(registration => {\r\n registration.unregister();\r\n })\r\n .catch(error => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.css';\r\nimport Routes from './routes.js';\r\nimport * as serviceWorker from './serviceWorker';\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n","module.exports = __webpack_public_path__ + \"static/media/downArrow.3d5d33e5.png\";","module.exports = __webpack_public_path__ + \"static/media/downArrowDark.73ccab06.png\";","module.exports = __webpack_public_path__ + \"static/media/upArrow.e22fe679.png\";","module.exports = __webpack_public_path__ + \"static/media/upArrowDark.b5db21f7.png\";"],"sourceRoot":""}