{"version":3,"sources":["theme.js","history.js","auth.js","index.js","state.js","logo.png","component/AppHeader.js","component/Loader.js"],"names":["theme","createMuiTheme","overrides","MuiTableCell","root","padding","TableCell","whiteSpace","wordWrap","maxWidth","palette","primary","main","secondary","green","success","error","red","background","default","createBrowserHistory","basename","axios","interceptors","request","use","a","config","url","split","headers","Authorization","localStorage","getItem","history","push","Math","floor","Date","now","post","refresh_token","then","response","setItem","data","token","expires","catch","location","pathname","includes","Login","lazy","SignUp","Forgot","Dashboard","Support","Websites","CheckoutSuccess","NewWebsite","SetupWebsite","ResetPassword","ConfirmEmail","Report","ReactDOM","render","ThemeProvider","CssBaseline","fallback","AppHeader","style","margin","position","top","left","transform","Loader","path","component","exact","document","querySelector","state","proxy","domains","currentDomain","useStyles","makeStyles","toolbar","mixins","flexGrow","color","logo","pointerEvents","breakpoints","down","icon","fill","select","overflow","textOverflow","width","borderColor","logoBox","domainBox","appBar","classes","useLocation","useTheme","matches","useMediaQuery","showLogout","GetData","get","length","React","useEffect","useHistory","logout","removeItem","addsite","snap","useSnapshot","Fragment","className","AppBar","Toolbar","Box","src","alt","paddingLeft","FormControl","Select","labelId","id","variant","autoWidth","inputProps","value","onChange","event","target","map","domain","MenuItem","IconButton","onClick","Button","startIcon","display","justifyContent","paddding","spacing","size"],"mappings":"gMAqCeA,EAhCDC,YAAe,CAC3BC,UAAW,CACTC,aAAc,CACVC,KAAM,CACFC,QAAS,aAGjBC,UAAW,CACPC,WAAY,SACZC,SAAU,aACVC,SAAU,UAGhBC,QAAS,CACPC,QAAS,CACPC,KAAM,WAERC,UAAW,CACTD,KAAME,IAAM,MAEdC,QAAS,CACPH,KAAME,IAAM,MAEdE,MAAO,CACLJ,KAAMK,IAAI,MAEZC,WAAY,CACVC,QAAS,c,QC9BAC,cAAqB,CAC5BC,SAAU,S,0DCCdC,IAAMC,aAAaC,QAAQC,IAA3B,+BAAAC,EAAA,MAA+B,WAAMC,GAAN,SAAAD,EAAA,yDACV,8BAAfC,EAAOC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IE,eAACS,EAAA,EAAD,WACF,cAACoB,EAAA,EAAD,CAAQxD,MAAM,UAAUyD,UAAW,cAAC,IAAD,IAAkBF,QAAS1B,EAA9D,sBACC,cAAC2B,EAAA,EAAD,CAAQxD,MAAM,UAAUyD,UAAW,cAAC,IAAD,IAAkBF,QAAS5B,EAA9D,0BAMC,UAIJ,qBAAKM,UAAWlB,EAAQlB,iB,gCCnM9B,mEAKe,SAASZ,IACpB,IAAM7E,EAAQ6G,cAEhB,OACE,qBAAKtC,MAAO,CAAC+E,QAAS,OAAQC,eAAgB,SAAUC,SAAUxJ,EAAMyJ,QAAQ,IAAhF,SACA,cAAC,IAAD,CAAkB7D,MAAM,UAAU8D,KAAK,c","file":"static/js/main.2fa22ff4.chunk.js","sourcesContent":["import { red } from '@material-ui/core/colors';\nimport { createMuiTheme } from '@material-ui/core/styles';\nimport green from '@material-ui/core/colors/green';\n\n// A custom theme for this app\nconst theme = createMuiTheme({\n overrides: {\n MuiTableCell: {\n root: { //This can be referred from Material UI API documentation. \n padding: '6px 12px',\n },\n },\n TableCell: {\n whiteSpace: 'normal',\n wordWrap: 'break-word',\n maxWidth: '300px'\n },\n},\n palette: {\n primary: {\n main: '#1863e6',\n },\n secondary: {\n main: green[500],\n },\n success: {\n main: green[500],\n },\n error: {\n main: red[500],\n },\n background: {\n default: '#F4F6F8',\n },\n },\n});\n\nexport default theme;\n","import { createBrowserHistory } from 'history';\n\nexport default createBrowserHistory({\n basename: '/app'\n })","import axios from 'axios';\nimport history from './history';\n\n // Add a request interceptor\n axios.interceptors.request.use(async config => {\n if (config.url === \"/api/account/refreshtoken\" || config.url === \"/api/account/login\" ||\n config.url === \"/api/create-checkout-session\" || config.url === \"/api/finish-checkout-session\"\n || config.url === \"/api/reset\" || config.url === \"/api/confirm\" || config.url === \"/api/account/forgot\"\n || config.url.split('?')[0] === \"/api/scan\") {// Early return for refreshes\n return config;\n }\n \n config.headers.Authorization = localStorage.getItem(\"token\");\n if(localStorage.getItem(\"token\") === null && localStorage.getItem(\"refresh_token\") === null){\n history.push('login');\n return config;\n }\n if (localStorage.getItem(\"expires\") < Math.floor(Date.now() / 1000)){\n const response = await axios.post('/api/account/refreshtoken', {refresh_token: localStorage.getItem(\"refresh_token\")})\n .then(function (response) {\n localStorage.setItem(\"token\", response.data.token);\n localStorage.setItem(\"expires\", response.data.expires);\n localStorage.setItem(\"refresh_token\", response.data.refresh_token); \n config.headers.Authorization = response.data.token;\n }).catch(function (error) {\n if (!history.location.pathname.includes(\"login\")){\n localStorage.setItem(\"lastlink\", history.location.pathname);\n }\n history.push('login');\n });\n }\n return config;\n });","import React, { Suspense, lazy } from 'react';\nimport ReactDOM from 'react-dom';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport { ThemeProvider } from '@material-ui/core/styles';\nimport { Router, Route} from 'react-router-dom';\nimport theme from './theme';\nimport history from './history';\nimport AppHeader from './component/AppHeader';\nimport Loader from './component/Loader';\nimport auth from \"./auth\";\n\nconst Login = lazy(() => import('./view/Login'));\nconst SignUp = lazy(() => import('./view/SignUp'));\nconst Forgot = lazy(() => import('./view/Forgot'));\nconst Dashboard = lazy(() => import('./view/Dashboard'));\nconst Support = lazy(() => import('./view/Support'));\nconst Websites = lazy(() => import('./view/Websites'));\nconst CheckoutSuccess = lazy(() => import('./view/CheckoutSuccess'));\nconst NewWebsite = lazy(() => import('./view/NewWebsite'));\nconst SetupWebsite = lazy(() => import('./view/SetupWebsite'));\nconst ResetPassword = lazy(() => import('./view/ResetPassword'));\nconst ConfirmEmail = lazy(() => import('./view/ConfirmEmail'));\nconst Report = lazy(() => import('./view/Report'));\n\n\n\nReactDOM.render(\n \n \n {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}\n \n \n
}>\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
,\n document.querySelector('#root'),\n);\n","import { proxy } from 'valtio'\n\nconst state = proxy({ domains: [], currentDomain: \"\" })\n\nexport { state };","export default __webpack_public_path__ + \"static/media/logo.c2da8880.png\";","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport { useLocation, useHistory } from \"react-router-dom\";\nimport { state } from '../state';\nimport AddCircleIcon from '@material-ui/icons/AddCircle';\nimport { useTheme } from '@material-ui/core/styles';\nimport ExitToAppIcon from '@material-ui/icons/ExitToApp';\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\nimport IconButton from \"@material-ui/core/IconButton\";\n\nimport { useSnapshot } from 'valtio';\nimport axios from 'axios';\n\nimport {\n Select,\n MenuItem,\n FormControl,\n} from '@material-ui/core';\n\nimport logo from './../logo.png';\n\nconst useStyles = makeStyles((theme) => ({\n toolbar: theme.mixins.toolbar,\n root: {\n flexGrow: 1,\n color: 'white',\n },\n logo: {\n maxWidth: 120,\n flexGrow: 1,\n pointerEvents: 'none',\n [theme.breakpoints.down('sm')]: {\n maxWidth: 85,\n },\n },\n\n icon: {\n fill: 'white',\n},\n select: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n [theme.breakpoints.down('sm')]: {\n width: '12rem',\n },\n [theme.breakpoints.down('xs')]: {\n width: '8rem',\n },\n [theme.breakpoints.down(365)]: {\n width: '5rem',\n },\n color: 'white',\n '&:before': {\n borderColor: 'white',\n },\n '&:after': {\n borderColor: 'white',\n },\n '&:not(.Mui-disabled):hover::before': {\n borderColor: 'white',\n },\n},\n logoBox: {\n pointerEvents: 'none',\n },\n domainBox: {\n flexGrow: 1,\n },\n appBar: {\n background: \"#1863e6\",\n position: \"fixed\",\n }\n}));\n\n\nexport default function AppHeader() {\n const classes = useStyles();\n const location = useLocation();\n const theme = useTheme();\n const matches = useMediaQuery(theme.breakpoints.down('xs'));\n\n\n var showLogout = true;\n if (location.pathname === \"/login\" || location.pathname === \"/signup\" || location.pathname === \"/checkout_success\"\n || location.pathname === \"/reset_password\" || location.pathname === \"/confirm_email\" || location.pathname === \"/forgot_password\" || location.pathname === \"/report\") {\n showLogout = false;\n }\n\n const GetData = async () => { \n const result = await axios.get('/api/shield/list')\n .then(function (response) {\n if (response.data === null){\n state.domains = [\"none\"];\n state.currentDomain = \"none\";\n return\n } \n state.domains = response.data;\n if (response.data.length !== 0 && state.currentDomain === \"\"){\n state.currentDomain = response.data[0];\n }\n });\n }\n\n React.useEffect(() => { \n if (showLogout) {\n GetData();\n }\n }, []); \n\n const handleSelect = (event) => {\n state.currentDomain = event.target.value;\n }\n\n const history = useHistory();\n function logout(){\n localStorage.removeItem(\"token\");\n localStorage.removeItem(\"expires\");\n localStorage.removeItem(\"refresh_token\");\n localStorage.removeItem(\"role\");\n if (!location.pathname.includes(\"login\")){\n localStorage.setItem(\"lastlink\", location.pathname);\n }\n history.push('login');\n }\n\n function addsite(){\n history.push('new_website');\n }\n\n const snap = useSnapshot(state);\n\n return (\n \n
\n \n \n \n \"logo\"\n \n { showLogout && snap.domains.length > 0 ? (\n \n \n \n \n {snap.domains.map((domain) => {\n return {domain}\n })}\n \n \n \n )\n : null\n }\n { showLogout ? (\n \n {matches ? (\n \n \n \n \n \n \n \n \n ) : (\n \n \n \n \n )\n }\n \n )\n : null\n }\n \n \n
\n
\n \n );\n}","import React from 'react';\nimport { useTheme } from '@material-ui/core/styles';\n\nimport CircularProgress from '@material-ui/core/CircularProgress';\n\nexport default function Loader() {\n const theme = useTheme();\n\n return (\n
\n \n
\n )\n}"],"sourceRoot":""}