{"version":3,"sources":["assets/images/avatars/user.png","App.js","serviceWorker.js","store.js","index.js"],"names":["ReactGA","initialize","send","hitType","page","title","loading","_jsx","className","children","DefaultLayout","React","lazy","Login","Onboarding","Register","Page404","Page500","App","Component","render","BrowserRouter","Suspense","fallback","_jsxs","Switch","Route","exact","path","name","props","Boolean","window","location","hostname","match","initialState","sidebarShow","sidebarUnfoldable","user","dataSyncStatus","userImage","avatar8","userName","s3_bucket","site_details","selected_site","final_divisions","store","createStore","state","arguments","length","undefined","type","rest","ReactDOM","Provider","document","getElementById","navigator","serviceWorker","ready","then","registration","unregister"],"mappings":"4KAAe,QAA0B,gC,4jCCkFzCA,IAAQC,WAAW,gBACnBD,IAAQE,KAAK,CAAEC,QAAS,WAAYC,KAAM,IAAKC,MAAO,YAItD,MAAMC,EACJC,cAAA,OAAKC,UAAU,mBAAkBC,SAC/BF,cAAA,OAAKC,UAAU,kCAKbE,EAAgBC,IAAMC,MAAK,IAAM,+DAGjCC,EAAQF,IAAMC,MAAK,IAAM,8DACzBE,EAAaH,IAAMC,MAAK,IAAM,uDAE9BG,EAAWJ,IAAMC,MAAK,IAAM,uDAC5BI,EAAUL,IAAMC,MAAK,IAAM,uDAC3BK,EAAUN,IAAMC,MAAK,IAAM,uDAEjC,MAAMM,UAAYC,YAEhBC,SACE,OAEEb,cAACc,IAAa,CAAAZ,SACZF,cAACI,IAAMW,SAAQ,CAACC,SAAUjB,EAAQG,SAChCe,eAACC,IAAM,CAAAhB,SAAA,CACLF,cAACmB,IAAK,CAACC,OAAK,EAACC,KAAK,SAASC,KAAK,aAAaT,OAASU,GAAUvB,cAACM,EAAK,IAAKiB,MAC3EvB,cAACmB,IAAK,CAACC,OAAK,EAACC,KAAK,cAAcC,KAAK,kBAAkBT,OAASU,GAAUvB,cAACO,EAAU,IAAKgB,MAE1FvB,cAACmB,IAAK,CACJC,OAAK,EACLC,KAAK,YACLC,KAAK,gBACLT,OAASU,GAAUvB,cAACQ,EAAQ,IAAKe,MAEnCvB,cAACmB,IAAK,CAACC,OAAK,EAACC,KAAK,OAAOC,KAAK,WAAWT,OAASU,GAAUvB,cAACS,EAAO,IAAKc,MACzEvB,cAACmB,IAAK,CAACC,OAAK,EAACC,KAAK,OAAOC,KAAK,WAAWT,OAASU,GAAUvB,cAACU,EAAO,IAAKa,MACzEvB,cAACmB,IAAK,CAACE,KAAK,IAAIC,KAAK,OAAOT,OAASU,GAAUvB,cAACG,EAAa,IAAKoB,YAK5E,EAGaZ,QCzHKa,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MAAM,2D,sBCZnC,MAAMC,EAAe,CACnBC,aAAa,EACbC,mBAAkB,EAClBC,KAAK,CAAC,EACNC,gBAAe,EACfC,U,OAAUC,EACVC,SAAS,GACTC,UAAU,GACVC,aAAa,CAAC,EACdC,cAAc,GACdC,gBAAgB,CAAC,GAcbC,EAAQC,aAXM,WAA8C,IAA7CC,EAAKC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGf,GAAc,KAAEkB,KAASC,GAAMJ,UAAAC,OAAA,EAAAD,UAAA,QAAAE,EAC1D,OAAQC,GACN,IAAK,MACH,MAAO,IAAIJ,KAAUK,GACvB,IAAK,YACD,MAAO,IAAIL,KAAUK,EAAY,OACrC,QACE,OAAOL,EAEb,IAGeF,QChBfQ,IAASpC,OACPb,cAACkD,IAAQ,CAACT,MAAOA,EAAMvC,SACrBF,cAACW,EAAG,MAENwC,SAASC,eAAe,SFqGpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAMC,MAAMC,IAClCA,EAAaC,YAAY,G","file":"static/js/main.049937f1.chunk.js","sourcesContent":["export default __webpack_public_path__ + \"static/media/user.a502917b.png\";","import React, { Component } from 'react'\nimport { BrowserRouter , Route, Switch } from 'react-router-dom'\nimport './scss/style.scss'\nimport ReactGA from \"react-ga4\";\nimport { initializeApp } from \"firebase/app\";\n// TODO: Add SDKs for Firebase products that you want to use\n// https://firebase.google.com/docs/web/setup#available-libraries\nimport { getMessaging, getToken } from \"firebase/messaging\";\n\n\n // localStorage.removeItem('userCredentials')\n\n\n\n// Your web app's Firebase configuration\n// For Firebase JS SDK v7.20.0 and later, measurementId is optional\n// const firebaseConfig = {\n// apiKey: \"AIzaSyCbQBSmer03G1k4cGEMTAATaapOud2EqXI\",\n// authDomain: \"waipoint-b572b.firebaseapp.com\",\n// projectId: \"waipoint-b572b\",\n// storageBucket: \"waipoint-b572b.appspot.com\",\n// messagingSenderId: \"445304520852\",\n// appId: \"1:445304520852:web:993508652fbebb42553481\",\n// };\n\n// Initialize Firebase\n// const app = initializeApp(firebaseConfig);\n// const messaging = getMessaging(app);\n// // Add the public key generated from the console here.\n// getToken(messaging, {vapidKey: \"BFh7RF0bldbgF4u1tZ9AwDEvgww_18ouJ1nrieXGJtezls0utK2xahHzadhUuVSTDjUAvUdJ8FnqGKqpnUlxRt4\"}).then((currentToken) => {\n// if (currentToken) {\n\n// Notification.requestPermission().then((permission) => {\n// if (permission === 'granted') {\n// // Need to see if the user actually exists in the system to pull the user profile\n// let userCredentials = localStorage.getItem('userCredentials');\n// userCredentials = JSON.parse(userCredentials);\n \n// const requestOptions = {\n// method: 'POST',\n// headers: { 'Content-Type': 'application/json'},\n// body:JSON.stringify({\n// \"endpoint\":\"UpdateFirebaseToken\",\n// \"payload\":{\n// \"athleteID\":userCredentials['userID'].toString(),\n// \"fcmToken\":currentToken,\n// }\n// })\n \n// };\n \n// return fetch('https://tkuakkoe4e.execute-api.ca-central-1.amazonaws.com/api',requestOptions)\n// .then(response =>response.json())\n// .then(function(response){ \n// console.log(response)\n// })\n// .catch(function(err){\n// console.log(err);\n// })\n\n\n \n\n// console.log('Notification permission granted.');\n// console.log('FCM Token?')\n// console.log(currentToken);\n// }\n// })\n// // Send the token to your server and update the UI if necessary\n// // ...\n// } else {\n// // Show permission request UI\n// console.log('No registration token available. Request permission to generate one.');\n// // ...\n// }\n// }).catch((err) => {\n// console.log('An error occurred while retrieving token. ', err);\n// // ...\n// });;\n\n\n\nReactGA.initialize(\"G-L9YZ6XJ545\");\nReactGA.send({ hitType: \"pageview\", page: \"/\", title: \"Landing\" });\n\n\n\nconst loading = (\n
\n
\n
\n)\n\n// Containers\nconst DefaultLayout = React.lazy(() => import('./layout/DefaultLayout'))\n\n// Pages\nconst Login = React.lazy(() => import('./views/pages/login/Login'))\nconst Onboarding = React.lazy(() => import('./views/Onboarding/Onboarding'))\n\nconst Register = React.lazy(() => import('./views/pages/register/Register'))\nconst Page404 = React.lazy(() => import('./views/pages/page404/Page404'))\nconst Page500 = React.lazy(() => import('./views/pages/page500/Page500'))\n\nclass App extends Component {\n\n render() {\n return (\n\n \n \n \n } />\n } />\n\n }\n />\n } />\n } />\n } />\n \n \n \n )\n }\n}\n\nexport default App\n","// In production, we register a service worker to serve assets from local cache.\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 the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\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.1/8 is considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/),\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)\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://goo.gl/SC7cgQ',\n )\n })\n } else {\n // Is not local host. 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 installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and\n // the fresh content will have been added to the cache.\n // It's the perfect time to display a \"New content is\n // available; please refresh.\" message in your web app.\n console.log('New content is available; please refresh.')\n\n // Execute callback\n if (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.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 .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n if (\n response.status === 404 ||\n response.headers.get('content-type').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('No internet connection found. App is running in offline mode.')\n })\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister()\n })\n }\n}\n","import { createStore } from 'redux'\nimport avatar8 from './assets/images/avatars/user.png'\n\nconst initialState = {\n sidebarShow: true,\n sidebarUnfoldable:false,\n user:{},\n dataSyncStatus:false,\n userImage:avatar8,\n userName:'',\n s3_bucket:'',\n site_details:{},\n selected_site:'',\n final_divisions:{}\n}\n \nconst changeState = (state = initialState, { type, ...rest }) => {\n switch (type) {\n case 'set':\n return {...state, ...rest }\n case 'set_state':\n return {...state, ...rest['state'] }\n default:\n return state\n }\n}\n\nconst store = createStore(changeState)\nexport default store\n","import 'react-app-polyfill/stable'\nimport 'core-js'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport App from './App'\nimport * as serviceWorker from './serviceWorker'\nimport { Provider } from 'react-redux'\nimport store from './store'\n// import * as services from './services'\n\n// services.configureAmplify() \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: http://bit.ly/CRA-PWA\nserviceWorker.unregister()\n"],"sourceRoot":""}