{"version":3,"sources":["Components/intro.js","Components/Form.js","Components/Information.js","Components/weather.js","Components/Footer.js","App.js","serviceWorker.js","index.js"],"names":["Intro","id","className","href","Component","Form","props","onSubmit","getWeather","type","name","placeholder","Information","city","country","main","tempreature","temp_min","temp_max","description","Weather","state","humidity","error","e","a","preventDefault","target","elements","value","fetch","api","json","data","number","Math","round","temp","min_number","max_number","console","log","setState","sys","weather","this","Footer","Date","getFullYear","App","Boolean","window","location","hostname","match","ReactDOM","render","StrictMode","document","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch","message"],"mappings":"gPAkBeA,E,uKAdP,OACI,6BAASC,GAAG,QACN,uBAAGC,UAAU,OAAOC,KAAK,SAAzB,QACN,6BACI,4BACI,4BAAI,uBAAGA,KAAK,SAAR,SACJ,4BAAI,uBAAGA,KAAK,YAAR,cAGZ,2CAAgB,6BAAhB,qB,GAXQC,a,uBCULC,EAVF,SAACC,GACV,OACI,0BAAMC,SAAUD,EAAME,YAClB,2BAAOC,KAAK,OAAOC,KAAK,OAAOC,YAAY,mBAC3C,0CCuBGC,EA3BK,SAACN,GACjB,OAEI,6BAEQA,EAAMO,MAAQ,2BAAIP,EAAMO,KAAV,MAAmBP,EAAMQ,SAGvCR,EAAMS,MAAQ,2BAAIT,EAAMS,MAGxBT,EAAMU,aAAe,2BAAIV,EAAMU,YAAV,SAIrBV,EAAMW,UAAY,2BAAIX,EAAMW,SAAV,cAAkCX,EAAMY,SAAxC,UAKlBZ,EAAMa,aAAe,2BAAIb,EAAMa,eC4EhCC,E,4MA1FXC,MAAQ,CACJR,KAAM,GACNC,QAAS,GACTE,YAAa,GACbC,SAAU,GACVC,SAAU,GACVH,KAAM,GACNO,SAAU,GACVH,YAAa,GACbI,MAAO,I,EAIXf,W,uCAAa,WAAOgB,GAAP,yBAAAC,EAAA,6DACTD,EAAEE,iBACIb,EAAOW,EAAEG,OAAOC,SAASf,KAAKgB,MAF3B,SAGSC,MAAM,qDAAD,OAAsDjB,EAAtD,6CAHd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AD,MACA,kBAAC,EAAD,QCAegD,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2DCZNC,IAASC,OACP,kBAAC,IAAMC,WAAP,KACE,kBAAC,EAAD,OAEFC,SAASC,eAAe,SDyHpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBC,MAAK,SAAAC,GACJA,EAAaC,gBAEdC,OAAM,SAAA3C,GACLiB,QAAQjB,MAAMA,EAAM4C,a","file":"static/js/main.ea6cfc16.chunk.js","sourcesContent":["import React, { Component } from 'react'\r\n\r\nclass Intro extends Component {\r\n render() {\r\n return (\r\n
\r\n logo\r\n \r\n

Hello It is
Weather App

\r\n
\r\n )\r\n }\r\n}\r\nexport default Intro","import React from 'react'\r\n\r\nconst Form = (props) => {\r\n return (\r\n
\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\n\r\nexport default Form","import React from \"react\";\r\n\r\nconst Information = (props) => {\r\n return (\r\n // using curley bracket to make it not type celisius symbol\r\n
\r\n {\r\n props.city &&

{props.city} , {props.country}

\r\n }\r\n {\r\n props.main &&

{props.main}

\r\n }\r\n {\r\n props.tempreature &&

{props.tempreature}°

\r\n }\r\n\r\n {\r\n props.temp_min &&

{props.temp_min}°   {props.temp_max}°

\r\n }\r\n\r\n\r\n {\r\n props.description &&

{props.description}

\r\n }\r\n\r\n
\r\n );\r\n};\r\n\r\nexport default Information;\r\n","import React, { Component } from \"react\";\r\nimport Form from \"./Form\";\r\nimport Information from \"./Information\";\r\n\r\n\r\n\r\nclass Weather extends Component {\r\n\r\n state = {\r\n city: '',\r\n country: '',\r\n tempreature: '',\r\n temp_min: '',\r\n temp_max: '',\r\n main: '',\r\n humidity: '',\r\n description: '',\r\n error: ''\r\n }\r\n\r\n //Using Api to pass information\r\n getWeather = async (e) => {\r\n e.preventDefault()\r\n const city = e.target.elements.city.value;\r\n const api = await fetch(`https://api.openweathermap.org/data/2.5/weather?q=${city},&appid=e36ed364400282e43250b6c4c0274d44`)\r\n const data = await api.json();\r\n\r\n // turnning the temperature degree from fhernhait to celisius in Integer number\r\n const number = Math.round(data.main.temp - 273);\r\n const min_number = Math.round(data.main.temp_min - 273);\r\n const max_number = Math.round(data.main.temp_max - 273);\r\n\r\n //getting all data and to know the target of each state\r\n console.log(data)\r\n\r\n if (city) {\r\n this.setState({\r\n city: data.name,\r\n country: data.sys.country,\r\n tempreature: number,\r\n temp_min: min_number,\r\n temp_max: max_number,\r\n humidity: data.main.humidity,\r\n main: data.weather[0].main,\r\n description: data.weather[0].description,\r\n error: false\r\n })\r\n } else {\r\n this.setState({\r\n city: '',\r\n country: '',\r\n tempreature: '',\r\n temp_min: '',\r\n temp_max: '',\r\n main: '',\r\n humidity: '',\r\n description: '',\r\n error: 'Please Enter City Name'\r\n })\r\n }\r\n\r\n }\r\n render() {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n

just type the city name

\r\n

you must sppelling correctly

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