{"version":3,"sources":["App.js","serviceWorker.js","index.js"],"names":["COLOR_STATES","veryHigh","high","medHigh","med","medLow","low","soon","useStyles","makeStyles","theme","opacity","textBlock","margin","marginTop","flatCircleOfTime","backgroundColor","height","width","borderRadius","animation","animationIterationCount","position","top","left","transform","outerCircle","padding","background","boxShadow","innerText","fetcher","fetch","then","res","json","App","maxTime","classes","queryString","window","location","search","urlParams","URLSearchParams","clinicId","get","index","vindex","useSWR","process","refreshInterval","data","error","console","log","Grid","container","direction","justify","alignItems","Typography","color","variant","align","style","clinic","clinicName","sm","md","className","border","minTime","LinearProgress","Boolean","hostname","match","baseTheme","createMuiTheme","palette","primary","main","secondary","highTime","typography","fontFamily","join","responsiveFontSizes","render","StrictMode","ThemeProvider","document","getElementById","navigator","serviceWorker","ready","registration","unregister","catch","message"],"mappings":"4NAIMA,EAAe,CACnBC,SAAU,UACVC,KAAM,UACNC,QAAS,UACTC,IAAK,UACLC,OAAQ,UACRC,IAAK,UACLC,KAAM,WAGFC,EAAYC,aAAW,SAACC,GAAD,MAAY,CACvC,0BAA2B,CACzB,KAAM,CAAEC,QAAS,GACjB,MAAO,CAAEA,QAAS,GAClB,OAAQ,CAAEA,QAAS,IAGrBC,UAAW,CACTC,OAAQ,MACRC,UAAW,OAEbC,iBAAkB,CAChBC,gBAAiB,aAEjBC,OAAQ,MACRC,MAAO,MACPC,aAAc,MACdC,UAAW,4BACXC,wBAAyB,WACzBV,QAAS,MACTW,SAAU,WACVC,IAAK,MACLC,KAAM,MACNC,UAAW,yBAEbC,YAAa,CACXT,OAAQ,OACRC,MAAO,OACPS,QAAS,SACTR,aAAc,MACdS,WAAY,4CACZC,UAAU,mEAEVhB,OAAQ,MACRS,SAAU,YAEZQ,UAAW,CACTR,SAAU,WACVC,IAAK,MACLC,KAAM,MACNC,UAAW,6BAsBf,IAAMM,EAAU,kBAAaC,MAAK,WAAL,aAAeC,MAAK,SAACC,GAAD,OAASA,EAAIC,WAE/C,SAASC,IACtB,IArBqBC,E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AQ,KAAKK,GAAI,EAAGC,GAAI,GAAIL,MAAM,SAASM,UAAWhC,EAAQ1B,WAA1F,qJAnCJ,6BACE,kBAAC6D,EAAA,EAAD,CAAgBX,MAAM,aCtFVY,QACW,cAA7BlC,OAAOC,SAASkC,UAEe,UAA7BnC,OAAOC,SAASkC,UAEhBnC,OAAOC,SAASkC,SAASC,MACvB,2D,4BCZFC,EAAYC,YAAe,CAC7BC,QAAS,CACPC,QAAS,CACPC,KAAM,WAGRC,UAAW,CACTD,KAAM,WAGRE,SAAU,WAEZC,WAAY,CACVC,WAAY,CAAC,SAAU,SAAU,aAAaC,KAAK,MAGrDrE,OAAQ,SAEV4D,EAAYU,YAAoBV,GAEhCW,iBACE,kBAAC,IAAMC,WAAP,KACE,kBAACC,EAAA,EAAD,CAAehF,MAAOmE,GACpB,kBAACzC,EAAD,QAGJuD,SAASC,eAAe,SDmGpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrB9D,MAAK,SAAA+D,GACJA,EAAaC,gBAEdC,OAAM,SAAA7C,GACLC,QAAQD,MAAMA,EAAM8C,c","file":"static/js/main.04379d46.chunk.js","sourcesContent":["import React from 'react'\r\nimport { makeStyles, Grid, Typography, Button, LinearProgress } from '@material-ui/core'\r\nimport useSWR from 'swr'\r\n\r\nconst COLOR_STATES = {\r\n veryHigh: '#ac222c',\r\n high: '#C2571A',\r\n medHigh: '#AA8f00',\r\n med: '#008040',\r\n medLow: '#007a7c',\r\n low: '#406098',\r\n soon: '#283e73',\r\n}\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n '@keyframes opacityPulse': {\r\n '0%': { opacity: 0.0 },\r\n '50%': { opacity: 1.0 },\r\n '100%': { opacity: 0.0 },\r\n },\r\n\r\n textBlock: {\r\n margin: '2vh',\r\n marginTop: '4vh',\r\n },\r\n flatCircleOfTime: {\r\n backgroundColor: '#FFFFFF 0%',\r\n\r\n height: '90%',\r\n width: '90%',\r\n borderRadius: '50%',\r\n animation: '$opacityPulse 4s ease-out',\r\n animationIterationCount: 'infinite',\r\n opacity: '0.0',\r\n position: 'relative',\r\n top: '50%',\r\n left: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n },\r\n outerCircle: {\r\n height: '60vw',\r\n width: '60vw',\r\n padding: '1.25vh',\r\n borderRadius: '50%',\r\n background: 'linear-gradient(145deg, #e6e6e6, #ffffff)',\r\n boxShadow: `20px 20px 60px #d9d9d9,\r\n -20px -20px 60px #ffffff`,\r\n margin: '4vh',\r\n position: 'relative',\r\n },\r\n innerText: {\r\n position: 'absolute',\r\n top: '50%',\r\n left: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n },\r\n}))\r\n\r\nfunction getColorState(maxTime) {\r\n if (maxTime <= 1.5) {\r\n return 'soon'\r\n } else if (maxTime <= 2.5) {\r\n return 'low'\r\n } else if (maxTime <= 4) {\r\n return 'medLow'\r\n } else if (maxTime <= 5) {\r\n return 'med'\r\n } else if (maxTime <= 6) {\r\n return 'medHigh'\r\n } else if (maxTime <= 7.5) {\r\n return 'high'\r\n } else {\r\n return 'veryHigh'\r\n }\r\n}\r\n\r\nconst fetcher = (...args) => fetch(...args).then((res) => res.json())\r\n\r\nexport default function App() {\r\n const classes = useStyles()\r\n\r\n const queryString = window.location.search\r\n const urlParams = new URLSearchParams(queryString)\r\n const clinicId = urlParams.get('c')\r\n const index = urlParams.get('i')\r\n const vindex = urlParams.get('v')\r\n\r\n const { data, error } = useSWR(\r\n process.env.REACT_APP_CLINIC_ENDPOINT + `?clinicId=${clinicId}&index=${index}&vindex=${vindex}`,\r\n fetcher,\r\n { refreshInterval: 1000 * 60 * 10 }\r\n )\r\n console.log(data)\r\n\r\n if (error) return
failed to load
\r\n if (!data)\r\n return (\r\n
\r\n \r\n
\r\n )\r\n\r\n return (\r\n \r\n \r\n {data.clinic.clinicName}\r\n \r\n\r\n {vindex ? (\r\n
\r\n \r\n Due to overwhelming demand and specific expiration limits of the vaccine, we are unable to provide an exact\r\n wait time prediction for COVID vaccines. Please wait for a text to come to the clinic – feel free to wait\r\n away from the clinic until then. Make sure you can arrive at the clinic within 1 hour of being texted to\r\n arrive.\r\n \r\n
\r\n ) : (\r\n <>\r\n
\r\n
\r\n
\r\n \r\n {data.clinic.minTime === data.clinic.maxTime\r\n ? `${data.clinic.maxTime} hrs`\r\n : `${data.clinic.minTime} to ${data.clinic.maxTime} hrs`}\r\n \r\n
\r\n \r\n \r\n Due to high demands, wait times may be longer than estimated. We are sorry for any inconvenience. Please\r\n check this page regularly for updates.\r\n \r\n \r\n )}\r\n
\r\n )\r\n}\r\n\r\n// . . . . . . . . . + .\r\n// . . : . .. :. .___---------___.\r\n// . . . . :.:. _\".^ .^ ^. '.. :\"-_. .\r\n// . : . . .:../: . .^ :.:\\.\r\n// . . :: +. :.:/: . . . . . .:\\\r\n// . : . . _ :::/: . ^ . . .:\\\r\n// .. . . . - : :.:./. . .:\\\r\n// . . . :..|: . . ^. .:|\r\n// . . : : ..|| . . . !:|\r\n// . . . . ::. ::\\( . :)/\r\n// . . : . : .:.|. ###### .#######::|\r\n// :.. . :- : .: ::|.####### ..########:|\r\n// . . . .. . .. :\\ ######## :######## :/\r\n// . .+ :: : -.:\\ ######## . ########.:/\r\n// . .+ . . . . :.:\\. ####### #######..:/\r\n// :: . . . . ::.:..:.\\ . . ..:/\r\n// . . . .. : -::::.\\. | | . .:/\r\n// . : . . .-:.\":.::.\\ ..:/\r\n// . -. . . . .: .:::.:.\\. .:/\r\n// . . . : : ....::_:..:\\ ___. :/\r\n// . . . .:. .. . .: :.:.:\\ :/\r\n// + . . : . ::. :.:. .:.|\\ .:/|\r\n// . + . . ...:: ..| --.:|\r\n// . . . . . . . ... :..:..\"( ..)\"\r\n// . . . : . .: ::/ . .::\\\r\n","// 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 { render } from 'react-dom'\r\nimport App from './App'\r\nimport * as serviceWorker from './serviceWorker'\r\nimport { createMuiTheme, ThemeProvider, responsiveFontSizes } from '@material-ui/core/styles'\r\n\r\nlet baseTheme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: '#283e73',\r\n },\r\n\r\n secondary: {\r\n main: '#ac222c',\r\n },\r\n\r\n highTime: '#ff0000',\r\n },\r\n typography: {\r\n fontFamily: ['Roboto', 'Oswald', 'Open Sans'].join(','),\r\n },\r\n\r\n height: '100%',\r\n})\r\nbaseTheme = responsiveFontSizes(baseTheme)\r\n\r\nrender(\r\n \r\n \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"],"sourceRoot":""}