{"version":3,"sources":["components/NavMenu.js","components/Layout.js","components/Home.js","components/FetchData.js","components/Counter.js","App.js","registerServiceWorker.js","index.js"],"names":["NavMenu","props","toggleNavbar","bind","state","collapsed","this","setState","Navbar","className","light","Container","NavbarBrand","tag","Link","to","NavbarToggler","onClick","Collapse","isOpen","navbar","NavItem","NavLink","Component","displayName","name","Layout","children","Home","href","FetchData","forecasts","loading","populateWeatherData","contents","renderForecastsTable","id","fetch","response","json","data","aria-labelledby","map","forecast","key","date","temperatureC","temperatureF","summary","Counter","currentCount","incrementCounter","aria-live","App","exact","path","component","isLocalhost","Boolean","window","location","hostname","match","registerValidSW","swUrl","navigator","serviceWorker","register","then","registration","onupdatefound","installingWorker","installing","onstatechange","controller","console","log","catch","error","baseUrl","document","getElementsByTagName","getAttribute","rootElement","getElementById","ReactDOM","render","basename","URL","process","origin","addEventListener","status","headers","get","indexOf","ready","unregister","reload","checkValidServiceWorker","registerServiceWorker"],"mappings":"uWAKaA,G,MAAb,kDAGE,WAAaC,GAAQ,IAAD,8BAClB,cAAMA,IAEDC,aAAe,EAAKA,aAAaC,KAAlB,gBACpB,EAAKC,MAAQ,CACXC,WAAW,GALK,EAHtB,2DAaIC,KAAKC,SAAS,CACZF,WAAYC,KAAKF,MAAMC,cAd7B,+BAmBI,OACE,gCACE,kBAACG,EAAA,EAAD,CAAQC,UAAU,+EAA+EC,OAAK,GACpG,kBAACC,EAAA,EAAD,KACE,kBAACC,EAAA,EAAD,CAAaC,IAAKC,IAAMC,GAAG,KAA3B,sBACA,kBAACC,EAAA,EAAD,CAAeC,QAASX,KAAKJ,aAAcO,UAAU,SACrD,kBAACS,EAAA,EAAD,CAAUT,UAAU,uCAAuCU,QAASb,KAAKF,MAAMC,UAAWe,QAAM,GAC9F,wBAAIX,UAAU,wBACZ,kBAACY,EAAA,EAAD,KACE,kBAACC,EAAA,EAAD,CAAST,IAAKC,IAAML,UAAU,YAAYM,GAAG,KAA7C,SAEF,kBAACM,EAAA,EAAD,KACE,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,cAAgB,WACA,cAA3BF,EAAiBnE,QACf6D,UAAUC,cAAcQ,WAK1BC,QAAQC,IAAI,6CAKZD,QAAQC,IAAI,4CAMrBC,OAAM,SAAAC,GACLH,QAAQG,MAAM,4CAA6CA,MC/DjE,IAAMC,EAAUC,SAASC,qBAAqB,QAAQ,GAAGC,aAAa,QAChEC,EAAcH,SAASI,eAAe,QAE5CC,IAASC,OACP,kBAAC,IAAD,CAAeC,SAAUR,GACvB,kBAAC,EAAD,OAEFI,GDMa,WACb,GAA6C,kBAAmBlB,UAAW,CAGzE,GADkB,IAAIuB,IAAIC,GAAwB9B,OAAOC,UAC3C8B,SAAW/B,OAAOC,SAAS8B,OAIvC,OAGF/B,OAAOgC,iBAAiB,QAAQ,WAC9B,IAAM3B,EAAK,UAAMyB,GAAN,sBAEPhC,EAwCV,SAAkCO,GAEhC3B,MAAM2B,GACHI,MAAK,SAAA9B,GAGkB,MAApBA,EAASsD,SACuD,IAAhEtD,EAASuD,QAAQC,IAAI,gBAAgBC,QAAQ,cAG7C9B,UAAUC,cAAc8B,MAAM5B,MAAK,SAAAC,GACjCA,EAAa4B,aAAa7B,MAAK,WAC7BT,OAAOC,SAASsC,eAKpBnC,EAAgBC,MAGnBa,OAAM,WACLF,QAAQC,IACN,oEA5DAuB,CAAwBnC,GAGxBD,EAAgBC,OCvBxBoC,K","file":"static/js/main.96acf08b.chunk.js","sourcesContent":["import React, { Component } from 'react';\r\nimport { Collapse, Container, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap';\r\nimport { Link } from 'react-router-dom';\r\nimport './NavMenu.css';\r\n\r\nexport class NavMenu extends Component {\r\n static displayName = NavMenu.name;\r\n\r\n constructor (props) {\r\n super(props);\r\n\r\n this.toggleNavbar = this.toggleNavbar.bind(this);\r\n this.state = {\r\n collapsed: true\r\n };\r\n }\r\n\r\n toggleNavbar () {\r\n this.setState({\r\n collapsed: !this.state.collapsed\r\n });\r\n }\r\n\r\n render () {\r\n return (\r\n
\r\n \r\n \r\n Adonis Example Web\r\n \r\n \r\n
    \r\n \r\n Home\r\n \r\n \r\n Counter\r\n \r\n \r\n Fetch data\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport { Container } from 'reactstrap';\r\nimport { NavMenu } from './NavMenu';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport class Layout extends Component {\r\n static displayName = Layout.name;\r\n\r\n render () {\r\n return (\r\n
\r\n \r\n \r\n {this.props.children}\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nLayout.propTypes = {\r\n children: PropTypes.node.isRequired\r\n};","import React, { Component } from 'react';\r\n\r\nexport class Home extends Component {\r\n static displayName = Home.name;\r\n\r\n render () {\r\n return (\r\n
\r\n

Hello, world!

\r\n

Welcome to your new single-page application, built with:

\r\n \r\n

To help you get started, we have also set up:

\r\n \r\n

The ClientApp subdirectory is a standard React application based on the create-react-app template. If you open a command prompt in that directory, you can run npm commands such as npm test or npm install.

\r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\n\r\nexport class FetchData extends Component {\r\n static displayName = FetchData.name;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { forecasts: [], loading: true };\r\n }\r\n\r\n componentDidMount() {\r\n this.populateWeatherData();\r\n }\r\n\r\n static renderForecastsTable(forecasts) {\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 {forecasts.map(forecast =>\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n
DateTemp. (C)Temp. (F)Summary
{forecast.date}{forecast.temperatureC}{forecast.temperatureF}{forecast.summary}
\r\n );\r\n }\r\n\r\n render() {\r\n const contents = this.state.loading\r\n ?

Loading...

\r\n : FetchData.renderForecastsTable(this.state.forecasts);\r\n\r\n return (\r\n
\r\n

Weather forecast

\r\n

This component demonstrates fetching data from the server.

\r\n {contents}\r\n
\r\n );\r\n }\r\n\r\n async populateWeatherData() {\r\n const response = await fetch('weatherforecast');\r\n const data = await response.json();\r\n this.setState({ forecasts: data, loading: false });\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\n\r\nexport class Counter extends Component {\r\n static displayName = Counter.name;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { currentCount: 0 };\r\n this.incrementCounter = this.incrementCounter.bind(this);\r\n }\r\n\r\n incrementCounter() {\r\n this.setState({\r\n currentCount: this.state.currentCount + 1\r\n });\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n

Counter

\r\n\r\n

This is a simple example of a React component.

\r\n\r\n

Current count: {this.state.currentCount}

\r\n\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport { Route } from 'react-router';\r\nimport { Layout } from './components/Layout';\r\nimport { Home } from './components/Home';\r\nimport { FetchData } from './components/FetchData';\r\nimport { Counter } from './components/Counter';\r\n\r\nimport './custom.css';\r\n\r\nexport default class App extends Component {\r\n static displayName = App.name;\r\n\r\n render () {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","// In production, we register a service worker to serve assets from local cache.\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 the \"N+1\" visit to a page, since previously\r\n// cached resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\r\n// This link also includes instructions on opting out of this behavior.\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.1/8 is 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 default function register () {\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);\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/facebookincubator/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. Lets check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl);\r\n } else {\r\n // Is not local host. Just register service worker\r\n registerValidSW(swUrl);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW (swUrl) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the old content will have been purged and\r\n // the fresh content will have been added to the cache.\r\n // It's the perfect time to display a \"New content is\r\n // available; please refresh.\" message in your web app.\r\n console.log('New content is available; please refresh.');\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 }\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) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n if (\r\n response.status === 404 ||\r\n response.headers.get('content-type').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);\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.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import 'bootstrap/dist/css/bootstrap.css';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { BrowserRouter } from 'react-router-dom';\r\nimport App from './App';\r\nimport registerServiceWorker from './registerServiceWorker';\r\n\r\nconst baseUrl = document.getElementsByTagName('base')[0].getAttribute('href');\r\nconst rootElement = document.getElementById('root');\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n rootElement);\r\n\r\nregisterServiceWorker();\r\n"],"sourceRoot":""}