{"version":3,"sources":["app.js","serviceWorker.js","index.js"],"names":["spinner","react_default","a","createElement","className","AuthForm","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","handleSubmit","bind","assertThisInitialized","event","preventDefault","data","FormData","target","fetch","method","body","then","resp","json","console","log","error","message","redirect","host","token","url","concat","window","location","elem","action","type","name","value","ReactDOM","render","document","getElementById","querySelector","submit","msg","id","onSubmit","placeholder","required","href","React","Component","Boolean","hostname","match","src_app","navigator","serviceWorker","ready","registration","unregister"],"mappings":"4RAIMA,SACJC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,WACbH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,kBACfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,kBACfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,kBACfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,kBACfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,kBACfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,kBAEfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,iBACfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,iBACfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,iBACfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,iBACfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,iBACfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,mBAqEJC,cAjEb,SAAAA,IAAc,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAJ,IACZC,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAF,GAAAO,KAAAH,QACKI,aAAeP,EAAKO,aAAaC,KAAlBP,OAAAQ,EAAA,EAAAR,CAAAD,IAFRA,oHAKKU,kFACjBA,EAAMC,iBACAC,EAAO,IAAIC,SAASH,EAAMI,iBAEfC,MAAM,cAAe,CACpCC,OAAQ,OACRC,KAAML,IACLM,KAAK,S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mD,KAAK,wBAAR,qBA5DtBC,IAAMC,WCTTC,QACW,cAA7BrB,OAAOC,SAASqB,UAEe,UAA7BtB,OAAOC,SAASqB,UAEhBtB,OAAOC,SAASqB,SAASC,MACvB,2DCZNhB,IAASC,OAAO3C,EAAAC,EAAAC,cAACyD,EAAD,MAASf,SAASC,eAAe,SD2H3C,kBAAmBe,WACrBA,UAAUC,cAAcC,MAAMvC,KAAK,SAAAwC,GACjCA,EAAaC","file":"static/js/main.46c5fd52.chunk.js","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './app.css';\n\nconst spinner =\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n\nclass AuthForm extends React.Component {\n constructor() {\n super();\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n async handleSubmit(event) {\n event.preventDefault();\n const data = new FormData(event.target);\n\n let resp = await fetch('/cloud/auth', {\n method: 'POST',\n body: data,\n }).then(function (resp) {\n return resp.json();\n });\n\n console.log(resp);\n\n if (resp.error || resp.message) {\n this.error(resp.error || resp.message);\n } else {\n this.redirect(resp.host, resp.token);\n }\n }\n\n redirect(host, token) {\n let url = `https://${host}.${window.location.host}/cloud/host`;\n const elem =\n
\n
\n \n
\n
\n\n ReactDOM.render(elem, document.getElementById(\"root\"));\n document.querySelector(\"form\").submit();\n }\n\n\n error(msg) {\n const elem =
{msg}
;\n ReactDOM.render(null, document.getElementById(\"messages\"));\n ReactDOM.render(elem, document.getElementById(\"messages\"));\n }\n\n render() {\n return (\n
\n\n
\n
\n {spinner}\n
\n

\n

\n

\n
\n
\n\n

supported by Neirolis

\n
\n );\n }\n}\n\nexport default AuthForm;\n\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.1/8 is 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 .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.then(registration => {\n registration.unregister();\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(, document.getElementById('root'));\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":""}