diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index c3176fb..0000000 --- a/.editorconfig +++ /dev/null @@ -1,10 +0,0 @@ -root = true - -[*.js] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 2 -trim_trailing_whitespace = true -quote_type = single \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4d29575..0000000 --- a/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/README.md b/README.md deleted file mode 100644 index 46edb66..0000000 --- a/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Material UI To Do App - -An example Material UI app that integrates with an external REST API for authentication and data storage. This is a completely headless implementation for the frontend. The source code for the [Laravel API backend](https://github.com/devinsays/laravel-react-bootstrap) is also available on GitHub. - -View the demo: http://devinsays.github.io/laravel-react-material - -![Dashboard Screenshot](https://raw.githubusercontent.com/devinsays/laravel-react-material/master/public/screenshot.png) - -If you're interested in mobile development, check out the [Flutter version of this project](https://github.com/devinsays/flutter_todo). - -There is also a [native mobile app version of this project built with Flutter](https://github.com/devinsays/flutter_todo). - -### Development - -This app was scaffolded with [Create React App](https://reactjs.org/docs/create-a-new-react-app.html). - -`yarn install` - -Installs the dependencies. - -`yarn start` - -Runs the app in the development mode.
-Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -`yarn test` - -Launches the test runner in the interactive watch mode.
-See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -`yarn build` - -Builds the app for production to the `build` folder.
-It correctly bundles React in production mode and optimizes the build for the best performance. - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### Authentication - -To log into the dashboard, first register for an account. This can be a throwaway email, the database is wiped regularly. Then log in the credentials you just created. diff --git a/asset-manifest.json b/asset-manifest.json new file mode 100644 index 0000000..7784f5e --- /dev/null +++ b/asset-manifest.json @@ -0,0 +1,22 @@ +{ + "files": { + "main.css": "/laravel-react-material/static/css/main.d2870ac4.chunk.css", + "main.js": "/laravel-react-material/static/js/main.9f263873.chunk.js", + "main.js.map": "/laravel-react-material/static/js/main.9f263873.chunk.js.map", + "runtime-main.js": "/laravel-react-material/static/js/runtime-main.50ba2421.js", + "runtime-main.js.map": "/laravel-react-material/static/js/runtime-main.50ba2421.js.map", + "static/js/2.e72125d5.chunk.js": "/laravel-react-material/static/js/2.e72125d5.chunk.js", + "static/js/2.e72125d5.chunk.js.map": "/laravel-react-material/static/js/2.e72125d5.chunk.js.map", + "index.html": "/laravel-react-material/index.html", + "precache-manifest.2be953854c9ff304e652ae8d01b47c81.js": "/laravel-react-material/precache-manifest.2be953854c9ff304e652ae8d01b47c81.js", + "service-worker.js": "/laravel-react-material/service-worker.js", + "static/css/main.d2870ac4.chunk.css.map": "/laravel-react-material/static/css/main.d2870ac4.chunk.css.map", + "static/js/2.e72125d5.chunk.js.LICENSE.txt": "/laravel-react-material/static/js/2.e72125d5.chunk.js.LICENSE.txt" + }, + "entrypoints": [ + "static/js/runtime-main.50ba2421.js", + "static/js/2.e72125d5.chunk.js", + "static/css/main.d2870ac4.chunk.css", + "static/js/main.9f263873.chunk.js" + ] +} \ No newline at end of file diff --git a/public/favicon.ico b/favicon.ico similarity index 100% rename from public/favicon.ico rename to favicon.ico diff --git a/index.html b/index.html new file mode 100644 index 0000000..1c774e7 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +Laravel Material App
\ No newline at end of file diff --git a/public/logo192.png b/logo192.png similarity index 100% rename from public/logo192.png rename to logo192.png diff --git a/public/logo512.png b/logo512.png similarity index 100% rename from public/logo512.png rename to logo512.png diff --git a/public/manifest.json b/manifest.json similarity index 100% rename from public/manifest.json rename to manifest.json diff --git a/package.json b/package.json deleted file mode 100644 index c83a1af..0000000 --- a/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "laravel-react-material", - "homepage": "http://devinsays.github.io/laravel-react-material", - "version": "0.1.0", - "private": true, - "dependencies": { - "@material-ui/core": "^4.9.2", - "@material-ui/icons": "^4.9.1", - "@material-ui/lab": "^4.0.0-alpha.44", - "@testing-library/jest-dom": "^4.2.4", - "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", - "classnames": "^2.2.6", - "lodash": "^4.17.15", - "react": "^16.12.0", - "react-dom": "^16.12.0", - "react-helmet": "^5.2.1", - "react-redux": "^7.1.3", - "react-router": "^5.1.2", - "react-router-dom": "^5.1.2", - "react-scripts": "3.3.1", - "reactstrap": "^8.4.1", - "redux": "^4.0.5", - "redux-persist": "^6.0.0", - "redux-thunk": "^2.3.0", - "ree-validate": "3.0.2", - "validator": "^12.2.0" - }, - "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject", - "predeploy": "npm run build", - "deploy": "gh-pages -d build" - }, - "eslintConfig": { - "extends": "react-app" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "devDependencies": { - "gh-pages": "^2.2.0" - } -} diff --git a/precache-manifest.2be953854c9ff304e652ae8d01b47c81.js b/precache-manifest.2be953854c9ff304e652ae8d01b47c81.js new file mode 100644 index 0000000..746eba9 --- /dev/null +++ b/precache-manifest.2be953854c9ff304e652ae8d01b47c81.js @@ -0,0 +1,26 @@ +self.__precacheManifest = (self.__precacheManifest || []).concat([ + { + "revision": "06c0cfe99e8b891b3b67d28256694a4d", + "url": "/laravel-react-material/index.html" + }, + { + "revision": "9a897da4afe63af1949c", + "url": "/laravel-react-material/static/css/main.d2870ac4.chunk.css" + }, + { + "revision": "9632dc3024aaa26d202f", + "url": "/laravel-react-material/static/js/2.e72125d5.chunk.js" + }, + { + "revision": "1ae01fb0d60dfdefe7f9d6cbefaaa517", + "url": "/laravel-react-material/static/js/2.e72125d5.chunk.js.LICENSE.txt" + }, + { + "revision": "9a897da4afe63af1949c", + "url": "/laravel-react-material/static/js/main.9f263873.chunk.js" + }, + { + "revision": "d6f00ec1998f42f1f79c", + "url": "/laravel-react-material/static/js/runtime-main.50ba2421.js" + } +]); \ No newline at end of file diff --git a/public/index.html b/public/index.html deleted file mode 100644 index 195d135..0000000 --- a/public/index.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - Laravel Material App - - - -
- - - diff --git a/public/robots.txt b/robots.txt similarity index 100% rename from public/robots.txt rename to robots.txt diff --git a/public/screenshot.png b/screenshot.png similarity index 100% rename from public/screenshot.png rename to screenshot.png diff --git a/service-worker.js b/service-worker.js new file mode 100644 index 0000000..f55cd1c --- /dev/null +++ b/service-worker.js @@ -0,0 +1,39 @@ +/** + * Welcome to your Workbox-powered service worker! + * + * You'll need to register this file in your web app and you should + * disable HTTP caching for this file too. + * See https://goo.gl/nhQhGp + * + * The rest of the code is auto-generated. Please don't update this file + * directly; instead, make changes to your Workbox build configuration + * and re-run your build process. + * See https://goo.gl/2aRDsh + */ + +importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); + +importScripts( + "/laravel-react-material/precache-manifest.2be953854c9ff304e652ae8d01b47c81.js" +); + +self.addEventListener('message', (event) => { + if (event.data && event.data.type === 'SKIP_WAITING') { + self.skipWaiting(); + } +}); + +workbox.core.clientsClaim(); + +/** + * The workboxSW.precacheAndRoute() method efficiently caches and responds to + * requests for URLs in the manifest. + * See https://goo.gl/S9QRab + */ +self.__precacheManifest = [].concat(self.__precacheManifest || []); +workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); + +workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/laravel-react-material/index.html"), { + + blacklist: [/^\/_/,/\/[^\/?]+\.[^\/]+$/], +}); diff --git a/src/App.js b/src/App.js deleted file mode 100644 index 882010a..0000000 --- a/src/App.js +++ /dev/null @@ -1,26 +0,0 @@ -import React, { Component } from 'react'; -import { BrowserRouter as Router, Switch } from 'react-router-dom'; -import { ThemeProvider } from '@material-ui/core/styles'; -import { Provider } from 'react-redux'; - -import Routes from './routes'; -import store from './store'; -import theme from './theme'; - -class App extends Component { - render() { - return ( - - - - - - - - - - ); - } -} - -export default App; diff --git a/src/Base.js b/src/Base.js deleted file mode 100644 index 9f8e541..0000000 --- a/src/Base.js +++ /dev/null @@ -1,33 +0,0 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { Box, Container, Grid } from '@material-ui/core'; - -import Header from './components/Header'; - -const Base = ({ children }) => ( - - -
- - - - - {children} - - - - -); - -const mapStateToProps = state => ({ - isAuthenticated: state.Auth.isAuthenticated -}); - -export default connect(mapStateToProps)(Base); diff --git a/src/Http.js b/src/Http.js deleted file mode 100644 index 35fb68a..0000000 --- a/src/Http.js +++ /dev/null @@ -1,19 +0,0 @@ -import axios from 'axios'; -import store from './store'; - -import * as actions from './store/actions'; - -const token = localStorage.getItem('access_token'); -axios.defaults.headers.common.Authorization = `Bearer ${token}`; - -axios.interceptors.response.use( - response => response, - error => { - if (error.response.status === 401) { - store.dispatch(actions.authLogout()); - } - return Promise.reject(error); - } -); - -export default axios; diff --git a/src/components/Header.js b/src/components/Header.js deleted file mode 100644 index d6b4ac1..0000000 --- a/src/components/Header.js +++ /dev/null @@ -1,107 +0,0 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { Link, useHistory } from 'react-router-dom'; -import { makeStyles } from '@material-ui/core/styles'; -import AccountCircle from '@material-ui/icons/AccountCircle'; -import { - AppBar, - Toolbar, - Typography, - IconButton, - Menu, - MenuItem -} from '@material-ui/core'; - -import * as actions from '../store/actions'; - -function Header(props) { - const classes = useStyles(); - const [anchorEl, setAnchorEl] = React.useState(null); - const open = Boolean(anchorEl); - - const history = useHistory(); - - const handleMenu = event => { - setAnchorEl(event.currentTarget); - }; - - const handleClose = () => { - setAnchorEl(null); - }; - - const navigateLogIn = () => { - setAnchorEl(null); - history.push('/login'); - }; - - const handleLogout = () => { - setAnchorEl(null); - props.dispatch(actions.authLogout()); - }; - - return ( - - - - - Laravel Material - - - -
- - - - - {!props.isAuthenticated && ( - Log In - )} - {props.isAuthenticated && ( - Logout - )} - -
-
-
- ); -} - -const useStyles = makeStyles(theme => ({ - title: { - flexGrow: 1 - }, - titleLink: { - color: theme.white, - textDecoration: 'none', - '&:hover': { - color: theme.white, - textDecoration: 'none' - } - } -})); - -const mapStateToProps = state => ({ - isAuthenticated: state.Auth.isAuthenticated -}); - -export default connect(mapStateToProps)(Header); diff --git a/src/components/Loader.js b/src/components/Loader.js deleted file mode 100644 index 80421cc..0000000 --- a/src/components/Loader.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { makeStyles } from '@material-ui/core/styles'; -import { CircularProgress } from '@material-ui/core'; - -const useStyles = makeStyles(theme => ({ - loader: { - color: theme.white - } -})); - -export default function Loader() { - // Styles. - const classes = useStyles(); - - return ( - - ); -} diff --git a/src/components/LoginForm.js b/src/components/LoginForm.js deleted file mode 100644 index af83c98..0000000 --- a/src/components/LoginForm.js +++ /dev/null @@ -1,200 +0,0 @@ -import React, { useState } from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; -import { Link, Redirect } from 'react-router-dom'; -import { TextField, Button, Typography, Box, Paper } from '@material-ui/core'; -import MuiAlert from '@material-ui/lab/Alert'; -import isEqual from 'lodash/isEqual'; - -import AuthService from '../services'; -import { - emailValidationError, - passwordValidationError -} from '../utils/validation.js'; -import Loader from './Loader'; - -function LoginForm(props) { - // State hooks. - const [loading, setLoading] = useState(false); - const [email, setEmail] = useState(); - const [password, setPassword] = useState(); - const [validationErrors, setValidationErrors] = useState({ - email: false, - password: false - }); - const [response, setResponse] = useState({ - error: false, - message: '' - }); - - const handleChange = e => { - const { name, value } = e.target; - - // Remove existing validation error for field. - // We'll do a fresh validation check on blur or submission. - if (name in validationErrors) { - setValidationErrors({ ...validationErrors, [name]: false }); - } - - if (name === 'email') { - setEmail(value); - return; - } - - if (name === 'password') { - setPassword(value); - return; - } - }; - - const handleBlur = e => { - const { name, value } = e.target; - - // Avoid validation until input has a value. - if (value === '') { - return; - } - - let validationError = false; - - if (name === 'email') { - setEmail(value); - validationError = emailValidationError(value); - } - - if (name === 'password') { - setPassword(value); - validationError = passwordValidationError(value); - } - - // Set the validation error if validation failed. - if (validationError !== false) { - setValidationErrors({ ...validationErrors, [name]: validationError }); - } - }; - - const handleSubmit = e => { - e.preventDefault(); - - // Runs final form validation. - const errors = { - email: emailValidationError(email), - password: passwordValidationError(password) - }; - - // Compares the objects to see if validation messages have changed. - const validates = isEqual(validationErrors, errors); - - if (validates) { - setLoading(true); - submit({ email, password }); - } else { - setValidationErrors({ ...errors }); - } - }; - - const submit = credentials => { - props.dispatch(AuthService.login(credentials)).catch(err => { - const errors = Object.values(err.errors); - errors.join(' '); - const response = { - error: true, - message: errors - }; - setResponse(response); - setLoading(false); - setEmail(''); - setPassword(''); - }); - }; - - // If user is already authenticated we redirect to entry location. - const { isAuthenticated } = props; - if (isAuthenticated) { - const { from } = props.location?.state || { from: { pathname: '/' } }; - return ; - } - - return ( -
- - - Log in to the App - - - - - -
- {response.error && ( - - {response.message} - - )} - - - - - - - - - - - - - Don't have an account? Register. - -
-
-
- - - Forgot Your Password? - - -
- ); -} - -LoginForm.propTypes = { - dispatch: PropTypes.func.isRequired, - isAuthenticated: PropTypes.bool.isRequired -}; - -const mapStateToProps = state => ({ - isAuthenticated: state.Auth.isAuthenticated -}); - -export default connect(mapStateToProps)(LoginForm); diff --git a/src/config.js b/src/config.js deleted file mode 100644 index 9722dcc..0000000 --- a/src/config.js +++ /dev/null @@ -1 +0,0 @@ -export const apiBase = 'https://laravelreact.com'; diff --git a/src/index.css b/src/index.css deleted file mode 100644 index d9cdf50..0000000 --- a/src/index.css +++ /dev/null @@ -1,52 +0,0 @@ -*, -*:before, -*:after { - box-sizing: border-box; -} - -html { - height: 100%; - width: 100%; - font-size: 14px; -} - -body { - margin: 0; - padding: 0; - height: 100%; - width: 100%; - font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", - "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - line-height: 1.3; - font-size: 100%; - color: #222; - background: #f5f5f6; -} - -#root { - height: 100%; -} - -img, -svg { - max-width: 100%; - height: auto; -} - -a { - text-decoration: none; - color: #4285f4; - transition: all 0.2s ease; -} - -a:hover { - text-decoration: underline; - color: #0059c1; -} - -p:last-of-type { - margin-bottom: 0; -} diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 45e19d5..0000000 --- a/src/index.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; - -import App from './App'; -import * as serviceWorker from './serviceWorker'; -import * as action from './store/actions'; -import store from './store'; - -import './index.css'; - -store.dispatch(action.authCheck()); - -ReactDOM.render(, document.getElementById('root')); - -// If you want your app to work offline and load faster, you can change -// unregister() to register() below. Note this comes with some pitfalls. -// Learn more about service workers: https://bit.ly/CRA-PWA -serviceWorker.unregister(); diff --git a/src/pages/Archive.js b/src/pages/Archive.js deleted file mode 100644 index 63a37b0..0000000 --- a/src/pages/Archive.js +++ /dev/null @@ -1,159 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { Helmet } from 'react-helmet'; -import { - Box, - Button, - Typography, - Paper, - Container, - Table, - TableBody, - TableCell, - TableHead, - TableRow, - IconButton -} from '@material-ui/core'; -import MuiAlert from '@material-ui/lab/Alert'; -import Delete from '@material-ui/icons/Delete'; - -import { apiBase } from '../config'; -import http from '../http'; -import Loader from '../components/Loader'; - -export default function Archive() { - // State hooks. - const [loading, setLoading] = useState(false); - const [data, setData] = useState({}); - const [apiMore, setApiMore] = useState(''); - const [moreLoaded, setMoreLoaded] = useState(false); - const [error, setError] = useState(false); - - // API Path - const api = `${apiBase}/api/v1/todo`; - - // Effect runs once on mount. - useEffect(() => { - http - .get(api) - .then(response => { - const { data } = response.data; - const apiMore = response.data.links.next; - setData(data); - setApiMore(apiMore); - setLoading(false); - setError(false); - }) - .catch(() => { - setError('Unable to fetch data.'); - }); - }, [api]); - - const loadMore = () => { - setLoading(true); - http - .get(apiMore) - .then(response => { - const apiMore = response.data.links.next; - const dataMore = data.concat(response.data.data); - setData(dataMore); - setApiMore(apiMore); - setLoading(false); - setError(false); - setMoreLoaded(true); - }) - .catch(() => { - setError('Unable to fetch data.'); - }); - }; - - const deleteTodo = id => { - const todos = data; - - http - .delete(`${api}/${id}`) - .then(response => { - if (response.status === 204) { - const index = todos.findIndex( - todo => parseInt(todo.id, 10) === parseInt(id, 10) - ); - const update = [...todos.slice(0, index), ...todos.slice(index + 1)]; - setData(update); - } - }) - .catch(error => { - console.log(error); - }); - }; - - const todos = Array.from(data); - - return ( - <> - - Archive | Laravel Material - - - {error && {error}} - - - Archive - - - - - - - - Time - To Do - Status - Action - - - - {todos.map(todo => ( - - - {todo.created_at} - - {todo.value} - {todo.status} - - deleteTodo(todo.id)} - > - - - - - ))} - -
-
-
- - {apiMore && ( - - )} - - {apiMore === null && moreLoaded === true && ( - - Everything loaded. - - )} -
- - ); -} diff --git a/src/pages/Dashboard.js b/src/pages/Dashboard.js deleted file mode 100644 index e641c59..0000000 --- a/src/pages/Dashboard.js +++ /dev/null @@ -1,174 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { Helmet } from 'react-helmet'; -import { Link } from 'react-router-dom'; -import { - Box, - Typography, - Paper, - Container, - Table, - TableBody, - TableCell, - TableHead, - TableRow, - IconButton, - FormControl, - InputLabel, - FilledInput, - InputAdornment, - Grid -} from '@material-ui/core'; -import AddIcon from '@material-ui/icons/Add'; -import CloseIcon from '@material-ui/icons/HighlightOff'; - -import { apiBase } from '../config'; -import http from '../http'; - -export default function Dashboard() { - // State hooks. - const [todo, setTodo] = useState(''); - const [error, setError] = useState(false); - const [data, setData] = useState([]); - - // API Path - const api = `${apiBase}/api/v1/todo`; - - // Effect runs once on mount. - useEffect(() => { - http - .get(`${api}?status=open`) - .then(response => { - const { data } = response.data; - setData(data); - setError(false); - }) - .catch(() => { - setError('Unable to fetch data.'); - }); - }, [api]); - - const handleChange = e => { - const { value } = e.target; - setTodo(value); - }; - - const handleSubmit = e => { - e.preventDefault(); - addTodo(todo); - }; - - const addTodo = todo => { - http - .post(api, { value: todo }) - .then(({ data: response }) => { - const newItem = { - id: response.id, - value: todo - }; - const allTodos = [newItem, ...data]; - setData(allTodos); - setTodo(''); - }) - .catch(() => { - setError('Sorry, there was an error saving your to do.'); - }); - }; - - const closeTodo = id => { - const todos = data; - - http - .patch(`${api}/${id}`, { status: 'closed' }) - .then(() => { - const updatedTodos = todos.filter(todo => todo.id !== parseInt(id, 10)); - setData(updatedTodos); - }) - .catch(() => { - setError('Sorry, there was an error closing your to do.'); - }); - }; - - return ( - <> - - Dashboard | Laravel Material - - - - - Add a Task - - -
- - New Task - - - - - - } - /> - -
-
- - {error && ( -
- {error} -
- )} - - - - - - Open Tasks - - - - View Archive - - - - - - - - - To Do - Action - - - - {data.map(row => ( - - - {row.value} - - - closeTodo(row.id)} - > - - - - - ))} - -
-
-
- - ); -} diff --git a/src/pages/ForgotPassword.js b/src/pages/ForgotPassword.js deleted file mode 100644 index 707bc5c..0000000 --- a/src/pages/ForgotPassword.js +++ /dev/null @@ -1,187 +0,0 @@ -import React, { useState } from 'react'; -import { Helmet } from 'react-helmet'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; -import { - Container, - TextField, - Button, - Typography, - Box, - Paper -} from '@material-ui/core'; -import MuiAlert from '@material-ui/lab/Alert'; -import isEqual from 'lodash/isEqual'; - -import AuthService from '../services'; -import { emailValidationError } from '../utils/validation.js'; -import Loader from '../components/Loader'; - -function ForgotPassword(props) { - // State hooks. - const [loading, setLoading] = useState(false); - const [success, setSuccess] = useState(false); - const [email, setEmail] = useState(); - const [validationErrors, setValidationErrors] = useState({ - email: false - }); - const [response, setResponse] = useState({ - error: false, - message: '' - }); - - const handleChange = e => { - const { name, value } = e.target; - - // Remove existing validation error for field. - // We'll do a fresh validation check on blur or submission. - if (name in validationErrors) { - setValidationErrors({ ...validationErrors, [name]: false }); - } - - if (name === 'email') { - setEmail({ value }); - } - }; - - const handleBlur = e => { - const { name, value } = e.target; - - // Avoid validation until input has a value. - if (value === '') { - return; - } - - let validationError = false; - - if (name === 'email') { - setEmail(value); - validationError = emailValidationError(value); - } - - // Set the validation error if validation failed. - if (validationError !== false) { - setValidationErrors({ ...validationErrors, [name]: validationError }); - } - }; - - const handleSubmit = e => { - e.preventDefault(); - - // Runs final form validation. - const errors = { - email: emailValidationError(email) - }; - - // Compares the objects to see if validation messages have changed. - const validates = isEqual(validationErrors, errors); - - if (validates) { - setLoading(true); - submit({ email }); - } else { - setValidationErrors({ ...errors }); - } - }; - - const submit = credentials => { - props - .dispatch(AuthService.resetPassword(credentials)) - .then(() => { - setLoading(false); - setSuccess(true); - }) - .catch(err => { - const errors = Object.values(err.errors); - errors.join(' '); - const response = { - error: true, - message: errors - }; - setResponse(response); - setLoading(false); - }); - }; - - return ( - <> - - Forgot Password | Laravel Material - - - - Request Password Reset - - - - {success && ( - - A password reset link has been sent! - - )} - {!success && ( -
- {response.error && ( - - {response.message} - - )} - -
- -
-
- - - -
- )} -
-
-
- - ); -} - -ForgotPassword.defaultProps = { - location: { - state: { - pathname: '/' - } - } -}; - -ForgotPassword.propTypes = { - dispatch: PropTypes.func.isRequired, - isAuthenticated: PropTypes.bool.isRequired, - location: PropTypes.shape({ - state: { - pathname: PropTypes.string - } - }) -}; - -const mapStateToProps = state => ({ - isAuthenticated: state.Auth.isAuthenticated -}); - -export default connect(mapStateToProps)(ForgotPassword); diff --git a/src/pages/Home.js b/src/pages/Home.js deleted file mode 100644 index 5455450..0000000 --- a/src/pages/Home.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Typography, Grid, Box } from '@material-ui/core'; - -import LoginForm from '../components/LoginForm'; - -export default function Home() { - return ( - - - - Example To Do App - - - - This headless frontend was built with{' '} - Material UI and scaffolded - with{' '} - - Create React App - - . The project authenticates and stores data using{' '} - - an API built in Laravel - - . - - - - Source code and documentation on GitHub. - - - - - - - - - ); -} diff --git a/src/pages/Login.js b/src/pages/Login.js deleted file mode 100644 index 525b1b8..0000000 --- a/src/pages/Login.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { Helmet } from 'react-helmet'; -import { Container } from '@material-ui/core'; - -import LoginForm from '../components/LoginForm'; - -export default function Login() { - return ( - <> - - Log In | Laravel Material - - - - - - ); -} diff --git a/src/pages/NoMatch.js b/src/pages/NoMatch.js deleted file mode 100644 index 62e7c0e..0000000 --- a/src/pages/NoMatch.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { Helmet } from 'react-helmet'; - -import { Typography } from '@material-ui/core'; - -const NoMatch = () => ( - <> - - 404 | Laravel Material - - - 404 - - No page found. - -); - -export default NoMatch; diff --git a/src/pages/Register.js b/src/pages/Register.js deleted file mode 100644 index 12aa419..0000000 --- a/src/pages/Register.js +++ /dev/null @@ -1,275 +0,0 @@ -import React, { useState } from 'react'; -import { Helmet } from 'react-helmet'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; -import { Link, Redirect } from 'react-router-dom'; -import { - Container, - TextField, - Button, - Typography, - Box, - Paper -} from '@material-ui/core'; -import MuiAlert from '@material-ui/lab/Alert'; -import isEqual from 'lodash/isEqual'; - -import AuthService from '../services'; -import { - nameValidationError, - emailValidationError, - passwordValidationError, - passwordConfirmValidationError -} from '../utils/validation.js'; -import Loader from '../components/Loader'; - -function Register(props) { - // State hooks. - const [loading, setLoading] = useState(false); - const [success, setSuccess] = useState(false); - const [name, setName] = useState(); - const [email, setEmail] = useState(); - const [password, setPassword] = useState(''); - const [passwordConfirm, setPasswordConfirm] = useState(''); - const [validationErrors, setValidationErrors] = useState({ - name: false, - email: false, - password: false, - passwordConfirm: false - }); - const [response, setResponse] = useState({ - error: false, - message: '' - }); - - const handleChange = e => { - const { name, value } = e.target; - - // Remove existing validation error for field. - // We'll do a fresh validation check on blur or submission. - if (name in validationErrors) { - setValidationErrors({ ...validationErrors, [name]: false }); - } - - if (name === 'name') { - setName(value); - return; - } - - if (name === 'email') { - setEmail(value); - return; - } - - if (name === 'password') { - setPassword(value); - return; - } - - if (name === 'passwordConfirm') { - setPasswordConfirm(value); - return; - } - }; - - const handleBlur = e => { - const { name, value } = e.target; - - // Avoid validation until input has a value. - if (value === '') { - return; - } - - let validationError = false; - - if (name === 'name') { - setName(value); - validationError = nameValidationError(value); - } - - if (name === 'email') { - setEmail(value); - validationError = emailValidationError(value); - } - - if (name === 'password') { - setPassword(value); - validationError = passwordValidationError(value); - } - - if (name === 'passwordConfirm') { - setPasswordConfirm(value); - validationError = passwordConfirmValidationError(value, password); - } - - // Set the validation error if validation failed. - if (validationError !== false) { - setValidationErrors({ ...validationErrors, [name]: validationError }); - } - }; - - const handleSubmit = e => { - e.preventDefault(); - - // Runs final form validation. - const errors = { - name: nameValidationError(name), - email: emailValidationError(email), - password: passwordValidationError(password), - passwordConfirm: passwordConfirmValidationError(passwordConfirm, password) - }; - - // Compares the objects to see if validation messages have changed. - const validates = isEqual(validationErrors, errors); - - if (validates) { - setLoading(true); - submit({ name, email, password, password_confirmation: passwordConfirm }); - } else { - setValidationErrors({ ...errors }); - } - }; - - const submit = credentials => { - props - .dispatch(AuthService.register(credentials)) - .then(() => { - setLoading(false); - setSuccess(true); - }) - .catch(err => { - const errors = Object.values(err.errors); - errors.join(' '); - const response = { - error: true, - message: errors - }; - setResponse(response); - setLoading(false); - }); - }; - - // If user is already authenticated we redirect to entry location. - const { isAuthenticated } = props; - if (isAuthenticated) { - const { from } = props.location.state || { from: { pathname: '/' } }; - return ; - } - - return ( - <> - - Register | Laravel Material - - - - - Register for the App - - - - - {success && ( - - Registration successful. - - Please log in with your new email and password. - - - )} - {!success && ( -
- {response.error && ( - {response.message} - )} - - - - - - - - - - - - - - - - - - - - Already have an account? Log in. - -
- )} -
-
-
- - ); -} - -Register.propTypes = { - dispatch: PropTypes.func.isRequired, - isAuthenticated: PropTypes.bool.isRequired -}; - -const mapStateToProps = state => ({ - isAuthenticated: state.Auth.isAuthenticated -}); - -export default connect(mapStateToProps)(Register); diff --git a/src/pages/ResetPassword.js b/src/pages/ResetPassword.js deleted file mode 100644 index 5951e3a..0000000 --- a/src/pages/ResetPassword.js +++ /dev/null @@ -1,246 +0,0 @@ -import React, { useState } from 'react'; -import { Helmet } from 'react-helmet'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; -import { - Container, - TextField, - Button, - Typography, - Box, - Paper -} from '@material-ui/core'; -import MuiAlert from '@material-ui/lab/Alert'; -import isEqual from 'lodash/isEqual'; - -import AuthService from '../services'; -import { - passwordValidationError, - passwordConfirmValidationError -} from '../utils/validation.js'; -import Loader from '../components/Loader'; - -function ForgotPassword(props) { - // State hooks. - const [loading, setLoading] = useState(false); - const [success, setSuccess] = useState(false); - const [password, setPassword] = useState(); - const [passwordConfirm, setPasswordConfirm] = useState(); - const [validationErrors, setValidationErrors] = useState({ - password: false, - passwordConfirm: false - }); - const [response, setResponse] = useState({ - error: false, - message: '' - }); - - const handleChange = e => { - const { name, value } = e.target; - - // Remove existing validation error for field. - // We'll do a fresh validation check on blur or submission. - if (name in validationErrors) { - setValidationErrors({ ...validationErrors, [name]: false }); - } - - if (name === 'password') { - setPassword({ value }); - return; - } - - if (name === 'passwordConfirm') { - setPasswordConfirm({ value }); - return; - } - }; - - const handleBlur = e => { - const { name, value } = e.target; - - // Avoid validation until input has a value. - if (value === '') { - return; - } - - let validationError = false; - - if (name === 'password') { - setPassword(value); - validationError = passwordValidationError(value); - } - - if (name === 'passwordConfirm') { - setPasswordConfirm(value); - validationError = passwordValidationError(value); - // Ensures password and passwordConfirm match. - if (validationError === false && password !== value) { - validationError = 'Password confirmation does not match password.'; - } - } - - // Set the validation error if validation failed. - if (validationError !== false) { - setValidationErrors({ ...validationErrors, [name]: validationError }); - } - }; - - const handleSubmit = e => { - e.preventDefault(); - - // Runs final form validation. - const errors = { - password: passwordValidationError(password), - passwordConfirm: passwordConfirmValidationError(passwordConfirm, password) - }; - - // Compares the objects to see if validation messages have changed. - const validates = isEqual(validationErrors, errors); - - if (validates) { - setLoading(true); - submit({ - password, - password_confirmation: passwordConfirm - }); - } else { - setValidationErrors({ ...errors }); - } - }; - - const getResetId = () => { - const params = new URLSearchParams(props.location.search); - if (params.has('id')) { - return params.get('id'); - } - return ''; - }; - - const getResetToken = () => { - const params = new URLSearchParams(props.location.search); - if (params.has('token')) { - return params.get('token'); - } - return ''; - }; - - const submit = credentials => { - const payload = { - id: getResetId(), - token: getResetToken(), - ...credentials - }; - props - .dispatch(AuthService.updatePassword(payload)) - .then(() => { - setLoading(false); - setSuccess(true); - }) - .catch(err => { - const errors = Object.values(err.errors); - errors.join(' '); - const response = { - error: true, - message: errors - }; - setResponse(response); - setLoading(false); - }); - }; - - return ( - <> - - Reset Password | Laravel Material - - - - Reset Your Password - - - - {success && ( - - Your password has been reset! - - )} - {!success && ( -
- {response.error && ( - {response.message} - )} - - -
- -
-
- -
-
- - - -
- )} -
-
-
- - ); -} - -ForgotPassword.defaultProps = { - location: { - state: { - pathname: '/' - } - } -}; - -ForgotPassword.propTypes = { - dispatch: PropTypes.func.isRequired, - isAuthenticated: PropTypes.bool.isRequired, - location: PropTypes.shape({ - state: { - pathname: PropTypes.string - } - }) -}; - -const mapStateToProps = state => ({ - isAuthenticated: state.Auth.isAuthenticated -}); - -export default connect(mapStateToProps)(ForgotPassword); diff --git a/src/routes/Private.js b/src/routes/Private.js deleted file mode 100644 index 9207942..0000000 --- a/src/routes/Private.js +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { Route, Redirect } from 'react-router'; -import { connect } from 'react-redux'; -import Base from '../Base'; - -const PrivateRoute = ({ component: Component, isAuthenticated, ...rest }) => ( - - isAuthenticated ? ( - - - - ) : ( - - ) - } - /> -); - -PrivateRoute.propTypes = { - isAuthenticated: PropTypes.bool.isRequired -}; - -const mapStateToProps = state => ({ - isAuthenticated: state.Auth.isAuthenticated -}); - -export default connect(mapStateToProps)(PrivateRoute); diff --git a/src/routes/Public.js b/src/routes/Public.js deleted file mode 100644 index 6dd89f4..0000000 --- a/src/routes/Public.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { Route } from 'react-router'; -import Base from '../Base'; - -const PublicRoute = ({ component: Component, ...rest }) => ( - ( - - - - )} - /> -); - -export default PublicRoute; diff --git a/src/routes/Split.js b/src/routes/Split.js deleted file mode 100644 index ed89040..0000000 --- a/src/routes/Split.js +++ /dev/null @@ -1,38 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { Route } from 'react-router'; -import { connect } from 'react-redux'; - -import Base from '../Base'; - -const SplitRoute = ({ - component: Component, - fallback: Fallback, - isAuthenticated, - ...rest -}) => ( - - isAuthenticated ? ( - - - - ) : ( - - - - ) - } - /> -); - -SplitRoute.propTypes = { - isAuthenticated: PropTypes.bool.isRequired -}; - -const mapStateToProps = state => ({ - isAuthenticated: state.Auth.isAuthenticated -}); - -export default connect(mapStateToProps)(SplitRoute); diff --git a/src/routes/index.js b/src/routes/index.js deleted file mode 100644 index 649e427..0000000 --- a/src/routes/index.js +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import { BrowserRouter as Router, Switch } from 'react-router-dom'; -import routes from './routes'; -import PublicRoute from './Public'; -import PrivateRoute from './Private'; -import SplitRoute from './Split'; - -// This is config for GitHub Pages. -// If you are deploying to a top level domain, -// you can remove the basename prop from the Router. -const base = process.env.PUBLIC_URL || '/'; - -const Routes = () => ( - - - {routes.map(route => { - if (route.auth && route.fallback) { - return ; - } else if (route.auth) { - return ; - } - return ; - })} - - -); - -export default Routes; diff --git a/src/routes/routes.js b/src/routes/routes.js deleted file mode 100644 index 50917ec..0000000 --- a/src/routes/routes.js +++ /dev/null @@ -1,56 +0,0 @@ -import Home from '../pages/Home'; -import Login from '../pages/Login'; -import Dashboard from '../pages/Dashboard'; -import Register from '../pages/Register'; -import ForgotPassword from '../pages/ForgotPassword'; -import ResetPassword from '../pages/ResetPassword'; -import Archive from '../pages/Archive'; -import NoMatch from '../pages/NoMatch'; - -const routes = [ - { - path: '/', - exact: true, - auth: true, - component: Dashboard, - fallback: Home - }, - { - path: `/login`, - exact: true, - auth: false, - component: Login - }, - { - path: `/register`, - exact: true, - auth: false, - component: Register - }, - { - path: `/forgot-password`, - exact: true, - auth: false, - component: ForgotPassword - }, - { - path: `/reset-password`, - exact: true, - auth: false, - component: ResetPassword - }, - { - path: `/archive`, - exact: true, - auth: true, - component: Archive - }, - { - path: '', - exact: false, - auth: false, - component: NoMatch - } -]; - -export default routes; diff --git a/src/serviceWorker.js b/src/serviceWorker.js deleted file mode 100644 index 8703ddb..0000000 --- a/src/serviceWorker.js +++ /dev/null @@ -1,137 +0,0 @@ -// This optional code is used to register a service worker. -// register() is not called by default. - -// This lets the app load faster on subsequent visits in production, and gives -// it offline capabilities. However, it also means that developers (and users) -// will only see deployed updates on subsequent visits to a page, after all the -// existing tabs open on the page have been closed, since previously cached -// resources are updated in the background. - -// To learn more about the benefits of this model and instructions on how to -// opt-in, read https://bit.ly/CRA-PWA - -const isLocalhost = Boolean( - window.location.hostname === 'localhost' || - // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || - // 127.0.0.0/8 are considered localhost for IPv4. - window.location.hostname.match( - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ - ) -); - -export function register(config) { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { - // The URL constructor is available in all browsers that support SW. - const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); - if (publicUrl.origin !== window.location.origin) { - // Our service worker won't work if PUBLIC_URL is on a different origin - // from what our page is served on. This might happen if a CDN is used to - // serve assets; see https://github.com/facebook/create-react-app/issues/2374 - return; - } - - window.addEventListener('load', () => { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - - if (isLocalhost) { - // This is running on localhost. Let's check if a service worker still exists or not. - checkValidServiceWorker(swUrl, config); - - // Add some additional logging to localhost, pointing developers to the - // service worker/PWA documentation. - navigator.serviceWorker.ready.then(() => { - console.log( - 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit https://bit.ly/CRA-PWA' - ); - }); - } else { - // Is not localhost. Just register service worker - registerValidSW(swUrl, config); - } - }); - } -} - -function registerValidSW(swUrl, config) { - navigator.serviceWorker - .register(swUrl) - .then(registration => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - if (installingWorker == null) { - return; - } - installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { - if (navigator.serviceWorker.controller) { - // At this point, the updated precached content has been fetched, - // but the previous service worker will still serve the older - // content until all client tabs are closed. - console.log( - 'New content is available and will be used when all ' + - 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' - ); - - // Execute callback - if (config && config.onUpdate) { - config.onUpdate(registration); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); - - // Execute callback - if (config && config.onSuccess) { - config.onSuccess(registration); - } - } - } - }; - }; - }) - .catch(error => { - console.error('Error during service worker registration:', error); - }); -} - -function checkValidServiceWorker(swUrl, config) { - // Check if the service worker can be found. If it can't reload the page. - fetch(swUrl, { - headers: { 'Service-Worker': 'script' } - }) - .then(response => { - // Ensure service worker exists, and that we really are getting a JS file. - const contentType = response.headers.get('content-type'); - if ( - response.status === 404 || - (contentType != null && contentType.indexOf('javascript') === -1) - ) { - // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then(registration => { - registration.unregister().then(() => { - window.location.reload(); - }); - }); - } else { - // Service worker found. Proceed as normal. - registerValidSW(swUrl, config); - } - }) - .catch(() => { - console.log( - 'No internet connection found. App is running in offline mode.' - ); - }); -} - -export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready.then(registration => { - registration.unregister(); - }); - } -} diff --git a/src/services/authService.js b/src/services/authService.js deleted file mode 100644 index 952a2d1..0000000 --- a/src/services/authService.js +++ /dev/null @@ -1,84 +0,0 @@ -import http from '../http'; -import * as action from '../store/actions'; -import { apiBase } from '../config'; - -export function login(credentials) { - return dispatch => - new Promise((resolve, reject) => { - http - .post(`${apiBase}/api/v1/auth/login`, credentials) - .then(res => { - dispatch(action.authLogin(res.data)); - return resolve(); - }) - .catch(err => { - const { status, errors } = err.response.data; - const data = { - status, - errors: errors ? errors : ['Unknown error.'] - }; - return reject(data); - }); - }); -} - -export function register(credentials) { - return dispatch => - new Promise((resolve, reject) => { - http - .post(`${apiBase}/api/v1/auth/register`, credentials) - .then(res => resolve(res.data)) - .catch(err => { - const { status, errors } = err.response.data; - const data = { - status, - errors - }; - return reject(data); - }); - }); -} - -export function resetPassword(credentials) { - return dispatch => - new Promise((resolve, reject) => { - http - .post(`${apiBase}/api/v1/auth/forgot-password`, credentials) - .then(res => resolve(res.data)) - .catch(err => { - const { status, errors } = err.response.data; - const data = { - status, - errors - }; - return reject(data); - }); - }); -} - -export function updatePassword(credentials) { - return dispatch => - new Promise((resolve, reject) => { - http - .post(`${apiBase}/api/v1/auth/password-reset`, credentials) - .then(res => { - const { status } = res.data.status; - if (status === 202) { - const data = { - error: res.data.message, - status - }; - return reject(data); - } - return resolve(res); - }) - .catch(err => { - const { status, errors } = err.response.data; - const data = { - status, - errors - }; - return reject(data); - }); - }); -} diff --git a/src/services/index.js b/src/services/index.js deleted file mode 100644 index 9c5e191..0000000 --- a/src/services/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import * as AuthService from './authService'; - -export default AuthService; diff --git a/src/store/action-types/index.js b/src/store/action-types/index.js deleted file mode 100644 index 5bbc541..0000000 --- a/src/store/action-types/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export const AUTH_LOGIN = 'AUTH_LOGIN'; -export const AUTH_CHECK = 'AUTH_CHECK'; -export const AUTH_LOGOUT = 'AUTH_LOGOUT'; diff --git a/src/store/actions/index.js b/src/store/actions/index.js deleted file mode 100644 index 3616434..0000000 --- a/src/store/actions/index.js +++ /dev/null @@ -1,20 +0,0 @@ -import * as ActionTypes from '../action-types'; - -export function authLogin(payload) { - return { - type: ActionTypes.AUTH_LOGIN, - payload - }; -} - -export function authLogout() { - return { - type: ActionTypes.AUTH_LOGOUT - }; -} - -export function authCheck() { - return { - type: ActionTypes.AUTH_CHECK - }; -} diff --git a/src/store/index.js b/src/store/index.js deleted file mode 100644 index f4ac104..0000000 --- a/src/store/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import { applyMiddleware, createStore, compose } from 'redux'; -import { persistStore } from 'redux-persist'; -import ReduxThunk from 'redux-thunk'; -import RootReducer from './reducers'; - -const store = createStore(RootReducer, compose(applyMiddleware(ReduxThunk))); - -persistStore(store); - -export default store; diff --git a/src/store/reducers/Auth.js b/src/store/reducers/Auth.js deleted file mode 100644 index ce140e7..0000000 --- a/src/store/reducers/Auth.js +++ /dev/null @@ -1,63 +0,0 @@ -import * as ActionTypes from '../action-types'; -import http from '../../http'; - -const defaultUser = { - id: null, - name: null, - email: null -}; - -const initialState = { - isAuthenticated: false, - user: defaultUser -}; - -const authLogin = (state, payload) => { - const { access_token: AccessToken, user } = payload; - localStorage.setItem('access_token', AccessToken); - localStorage.setItem('user', JSON.stringify(user)); - http.defaults.headers.common.Authorization = `Bearer ${AccessToken}`; - const stateObj = Object.assign({}, state, { - isAuthenticated: true, - user - }); - return stateObj; -}; - -const checkAuth = state => { - const stateObj = Object.assign({}, state, { - isAuthenticated: !!localStorage.getItem('access_token'), - user: JSON.parse(localStorage.getItem('user')) - }); - if (state.isAuthenticated) { - http.defaults.headers.common.Authorization = `Bearer ${localStorage.getItem( - 'access_token' - )}`; - } - return stateObj; -}; - -const logout = state => { - localStorage.removeItem('access_token'); - localStorage.removeItem('user'); - const stateObj = Object.assign({}, state, { - isAuthenticated: false, - user: defaultUser - }); - return stateObj; -}; - -const Auth = (state = initialState, { type, payload = null }) => { - switch (type) { - case ActionTypes.AUTH_LOGIN: - return authLogin(state, payload); - case ActionTypes.AUTH_CHECK: - return checkAuth(state); - case ActionTypes.AUTH_LOGOUT: - return logout(state); - default: - return state; - } -}; - -export default Auth; diff --git a/src/store/reducers/index.js b/src/store/reducers/index.js deleted file mode 100644 index dd35bb8..0000000 --- a/src/store/reducers/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import { combineReducers } from 'redux'; -import Auth from './Auth'; -import persistStore from './persistStore'; - -const RootReducer = combineReducers({ Auth, persistStore }); - -export default RootReducer; diff --git a/src/store/reducers/persistStore.js b/src/store/reducers/persistStore.js deleted file mode 100644 index 94d34ad..0000000 --- a/src/store/reducers/persistStore.js +++ /dev/null @@ -1,15 +0,0 @@ -function persistStore(state, payload) { - const stateObj = Object.assign({}, state, payload); - return stateObj; -} - -const reducer = (state = {}, { type, payload = null }) => { - switch (type) { - case 'persist/REHYDRATE': - return persistStore(state, payload); - default: - return state; - } -}; - -export default reducer; diff --git a/src/theme.js b/src/theme.js deleted file mode 100644 index c8b60f5..0000000 --- a/src/theme.js +++ /dev/null @@ -1,49 +0,0 @@ -import { createMuiTheme } from '@material-ui/core/styles'; - -const theme = createMuiTheme({ - text: '#222', - white: '#fff', - bg1: '#F5F5F6', - bg2: '#E1E2E1', - palette: { - primary: { - light: '#80b4ff', - main: '#4285f4', - dark: '#0059c1', - contrastText: '#fff' - } - }, - typography: { - fontSize: 16, - h1: { - fontSize: '3rem', - fontWeight: 300 - }, - h2: { - fontSize: '2.2rem', - fontWeight: 300 - }, - h3: { - fontSize: '2rem', - fontWeight: 300, - marginBottom: '1rem' - }, - body1: { - marginBottom: '1rem' - } - }, - overrides: { - MuiMenuItem: { - root: { - marginBottom: '0' - } - }, - MuiInputBase: { - root: { - marginBottom: '0' - } - } - } -}); - -export default theme; diff --git a/src/utils/validation.js b/src/utils/validation.js deleted file mode 100644 index 41cf971..0000000 --- a/src/utils/validation.js +++ /dev/null @@ -1,32 +0,0 @@ -import isEmail from 'validator/es/lib/isEmail'; - -export const nameValidationError = value => { - if (value.length < 3) { - return 'Name must be at least 3 characters.'; - } - return false; -}; - -export const emailValidationError = (value = '') => { - if (!isEmail(value)) { - return 'The email field must be a valid email.'; - } - return false; -}; - -export const passwordValidationError = (value = '') => { - if (value.length < 6) { - return 'The password field must be at least 6 characters.'; - } - return false; -}; - -export const passwordConfirmValidationError = (value = '', password = '') => { - if (value.length < 6) { - return 'The password field must be at least 6 characters.'; - } - if (password !== value) { - return 'Password confirmation does not match password.'; - } - return false; -}; diff --git a/static/css/main.d2870ac4.chunk.css b/static/css/main.d2870ac4.chunk.css new file mode 100644 index 0000000..e3ddb71 --- /dev/null +++ b/static/css/main.d2870ac4.chunk.css @@ -0,0 +1,2 @@ +*,:after,:before{box-sizing:border-box}html{font-size:14px}body,html{height:100%;width:100%}body{margin:0;padding:0;font-family:"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.3;font-size:100%;color:#222;background:#f5f5f6}#root{height:100%}img,svg{max-width:100%;height:auto}a{text-decoration:none;color:#4285f4;-webkit-transition:all .2s ease;transition:all .2s ease}a:hover{text-decoration:underline;color:#0059c1}p:last-of-type{margin-bottom:0} +/*# sourceMappingURL=main.d2870ac4.chunk.css.map */ \ No newline at end of file diff --git a/static/css/main.d2870ac4.chunk.css.map b/static/css/main.d2870ac4.chunk.css.map new file mode 100644 index 0000000..4b0024b --- /dev/null +++ b/static/css/main.d2870ac4.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["index.css"],"names":[],"mappings":"AAAA,iBAGE,qBACF,CAEA,KAGE,cACF,CAEA,UALE,WAAY,CACZ,UAkBF,CAdA,KACE,QAAS,CACT,SAAU,CAGV,mJAEY,CACZ,kCAAmC,CACnC,iCAAkC,CAClC,eAAgB,CAChB,cAAe,CACf,UAAW,CACX,kBACF,CAEA,MACE,WACF,CAEA,QAEE,cAAe,CACf,WACF,CAEA,EACE,oBAAqB,CACrB,aAAc,CACd,+BAAyB,CAAzB,uBACF,CAEA,QACE,yBAA0B,CAC1B,aACF,CAEA,eACE,eACF","file":"main.d2870ac4.chunk.css","sourcesContent":["*,\n*:before,\n*:after {\n box-sizing: border-box;\n}\n\nhtml {\n height: 100%;\n width: 100%;\n font-size: 14px;\n}\n\nbody {\n margin: 0;\n padding: 0;\n height: 100%;\n width: 100%;\n font-family: \"Roboto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\",\n \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n line-height: 1.3;\n font-size: 100%;\n color: #222;\n background: #f5f5f6;\n}\n\n#root {\n height: 100%;\n}\n\nimg,\nsvg {\n max-width: 100%;\n height: auto;\n}\n\na {\n text-decoration: none;\n color: #4285f4;\n transition: all 0.2s ease;\n}\n\na:hover {\n text-decoration: underline;\n color: #0059c1;\n}\n\np:last-of-type {\n margin-bottom: 0;\n}\n"]} \ No newline at end of file diff --git a/static/js/2.e72125d5.chunk.js b/static/js/2.e72125d5.chunk.js new file mode 100644 index 0000000..8ea77c2 --- /dev/null +++ b/static/js/2.e72125d5.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.e72125d5.chunk.js.LICENSE.txt */ +(this["webpackJsonplaravel-react-material"]=this["webpackJsonplaravel-react-material"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(126)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){"use strict";function r(e){var t,n,o="";if(e)if("object"===typeof e)if(Array.isArray(e))for(t=0;t1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var i=t.defaultTheme,l=t.withTheme,d=void 0!==l&&l,p=t.name,h=Object(o.a)(t,["defaultTheme","withTheme","name"]);var m=p,v=Object(c.a)(e,Object(r.a)({defaultTheme:i,Component:n,name:p||n.displayName,classNamePrefix:m},h)),b=a.a.forwardRef((function(e,t){e.classes;var l,u=e.innerRef,c=Object(o.a)(e,["classes","innerRef"]),h=v(e),m=c;return("string"===typeof p||d)&&(l=Object(f.a)()||i,p&&(m=Object(s.a)({theme:l,name:p,props:c})),d&&!m.theme&&(m.theme=l)),a.a.createElement(n,Object(r.a)({ref:u||t,classes:h},m))}));return b.defaultProps=n.defaultProps,u()(b,n),b}},p=n(36);t.a=function(e,t){return d(e,Object(r.a)({defaultTheme:p.a},t))}},function(e,t,n){e.exports=n(130)()},function(e,t,n){"use strict";var r=n(104);var o=n(105);function i(e,t){return Object(r.a)(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}}(e,t)||Object(o.a)()}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(127)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n.n(r),i=n(40);function a(e,t){return o.a.useMemo((function(){return null==e&&null==t?null:function(n){Object(i.a)(e,n),Object(i.a)(t,n)}}),[e,t])}},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function i(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function a(e,t){var n=l(e),r=l(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function l(e){var t="hsl"===(e=o(e)).type?o(function(e){var t=(e=o(e)).values,n=t[0],r=t[1]/100,a=t[2]/100,l=r*Math.min(a,1-a),u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return a-l*Math.max(Math.min(t-3,9-t,1),-1)},c="rgb",s=[Math.round(255*u(0)),Math.round(255*u(8)),Math.round(255*u(4))];return"hsla"===e.type&&(c+="a",s.push(t[3])),i({type:c,values:s})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function u(e,t){return e=o(e),t=r(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,i(e)}function c(e,t){if(e=o(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return i(e)}function s(e,t){if(e=o(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return i(e)}n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return s}))},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(5),a=n.n(i),l=o.a.createContext(null);var u=function(e){e()},c={notify:function(){}};function s(){var e=u,t=[],n=[];return{clear:function(){n=null,t=null},notify:function(){var r=t=n;e((function(){for(var e=0;e. You may also pass a {context : MyContext} option to connect");var M=A;return function(t){var n=t.displayName||t.name||"Component",i=a(n),l=Object(h.a)({},N,{getDisplayName:a,methodName:c,renderCountProp:d,shouldHandleStateChanges:v,storeKey:k,displayName:i,wrappedComponentName:n,WrappedComponent:t}),u=N.pure;var s=u?r.useMemo:function(e){return e()};function p(n){var a=Object(r.useMemo)((function(){var e=n.forwardedRef,t=Object(m.a)(n,["forwardedRef"]);return[n.context,e,t]}),[n]),u=a[0],c=a[1],d=a[2],p=Object(r.useMemo)((function(){return u&&u.Consumer&&Object(x.isContextConsumer)(o.a.createElement(u.Consumer,null))?u:M}),[u,M]),b=Object(r.useContext)(p),y=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),k=Boolean(b)&&Boolean(b.store);g()(y||k,'Could not find "store" in the context of "'+i+'". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to '+i+" in connect options.");var C=y?n.store:b.store,j=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,l)}(C)}),[C]),P=Object(r.useMemo)((function(){if(!v)return O;var e=new f(C,y?null:b.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[C,y,b]),R=P[0],_=P[1],A=Object(r.useMemo)((function(){return y?b:Object(h.a)({},b,{subscription:R})}),[y,b,R]),N=Object(r.useReducer)(S,E,T),I=N[0][0],L=N[1];if(I&&I.error)throw I.error;var z=Object(r.useRef)(),D=Object(r.useRef)(d),F=Object(r.useRef)(),U=Object(r.useRef)(!1),B=s((function(){return F.current&&d===D.current?F.current:j(C.getState(),d)}),[C,I,d]);w((function(){D.current=d,z.current=B,U.current=!1,F.current&&(F.current=null,_())})),w((function(){if(v){var e=!1,t=null,n=function(){if(!e){var n,r,o=C.getState();try{n=j(o,D.current)}catch(i){r=i,t=i}r||(t=null),n===z.current?U.current||_():(z.current=n,F.current=n,U.current=!0,L({type:"STORE_UPDATED",payload:{error:r}}))}};R.onStateChange=n,R.trySubscribe(),n();return function(){if(e=!0,R.tryUnsubscribe(),R.onStateChange=null,t)throw t}}}),[C,R,j]);var W=Object(r.useMemo)((function(){return o.a.createElement(t,Object(h.a)({},B,{ref:c}))}),[c,t,B]);return Object(r.useMemo)((function(){return v?o.a.createElement(p.Provider,{value:A},W):W}),[p,W,A])}var y=u?o.a.memo(p):p;if(y.WrappedComponent=t,y.displayName=i,R){var C=o.a.forwardRef((function(e,t){return o.a.createElement(y,Object(h.a)({},e,{forwardedRef:t}))}));return C.displayName=i,C.WrappedComponent=t,b()(C,t)}return b()(y,t)}}var C=Object.prototype.hasOwnProperty;function j(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function P(e,t){if(j(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function W(e,t){return e===t}var H=function(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?k:n,o=t.mapStateToPropsFactories,i=void 0===o?I:o,a=t.mapDispatchToPropsFactories,l=void 0===a?M:a,u=t.mergePropsFactories,c=void 0===u?z:u,s=t.selectorFactory,f=void 0===s?U:s;return function(e,t,n,o){void 0===o&&(o={});var a=o,u=a.pure,s=void 0===u||u,d=a.areStatesEqual,p=void 0===d?W:d,v=a.areOwnPropsEqual,b=void 0===v?P:v,y=a.areStatePropsEqual,g=void 0===y?P:y,x=a.areMergedPropsEqual,w=void 0===x?P:x,E=Object(m.a)(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),O=B(e,i,"mapStateToProps"),S=B(t,l,"mapDispatchToProps"),T=B(n,c,"mergeProps");return r(f,Object(h.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:O,initMapDispatchToProps:S,initMergeProps:T,pure:s,areStatesEqual:p,areOwnPropsEqual:b,areStatePropsEqual:g,areMergedPropsEqual:w},E))}}();function $(){var e=Object(r.useContext)(l);return g()(e,"could not find react-redux context value; please ensure the component is wrapped in a "),e}function V(e){void 0===e&&(e=l);var t=e===l?$:function(){return Object(r.useContext)(e)};return function(){return t().store}}var q=V();!function(e){void 0===e&&(e=l);var t=e===l?q:V(e)}();var G=function(e,t){return e===t};!function(e){void 0===e&&(e=l);var t=e===l?$:function(){return Object(r.useContext)(e)}}();var K,Y=n(9);n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return H})),K=Y.unstable_batchedUpdates,u=K},function(e,t,n){"use strict";var r=n(107);function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var m=function(e){var t,n;return n=t=function(t){function n(){return p(this,n),h(this,t.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),n.prototype.shouldComponentUpdate=function(e){return!(0,u.default)(this.props,e)},n.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case s.TAG_NAMES.SCRIPT:case s.TAG_NAMES.NOSCRIPT:return{innerHTML:t};case s.TAG_NAMES.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},n.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,o=e.arrayTypeChildren,i=e.newChildProps,a=e.nestedChildren;return r({},o,((t={})[n.type]=[].concat(o[n.type]||[],[r({},i,this.mapNestedChildrenToProps(n,a))]),t))},n.prototype.mapObjectTypeChildren=function(e){var t,n,o=e.child,i=e.newProps,a=e.newChildProps,l=e.nestedChildren;switch(o.type){case s.TAG_NAMES.TITLE:return r({},i,((t={})[o.type]=l,t.titleAttributes=r({},a),t));case s.TAG_NAMES.BODY:return r({},i,{bodyAttributes:r({},a)});case s.TAG_NAMES.HTML:return r({},i,{htmlAttributes:r({},a)})}return r({},i,((n={})[o.type]=r({},a),n))},n.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=r({},t);return Object.keys(e).forEach((function(t){var o;n=r({},n,((o={})[t]=e[t],o))})),n},n.prototype.warnOnInvalidChildren=function(e,t){return!0},n.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return i.default.Children.forEach(e,(function(e){if(e&&e.props){var o=e.props,i=o.children,a=d(o,["children"]),l=(0,c.convertReactPropstoHtmlAttributes)(a);switch(n.warnOnInvalidChildren(e,i),e.type){case s.TAG_NAMES.LINK:case s.TAG_NAMES.META:case s.TAG_NAMES.NOSCRIPT:case s.TAG_NAMES.SCRIPT:case s.TAG_NAMES.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:l,nestedChildren:i});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:l,nestedChildren:i})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},n.prototype.render=function(){var t=this.props,n=t.children,o=d(t,["children"]),a=r({},o);return n&&(a=this.mapChildrenToProps(n,a)),i.default.createElement(e,a)},o(n,null,[{key:"canUseDOM",set:function(t){e.canUseDOM=t}}]),n}(i.default.Component),t.propTypes={base:a.default.object,bodyAttributes:a.default.object,children:a.default.oneOfType([a.default.arrayOf(a.default.node),a.default.node]),defaultTitle:a.default.string,defer:a.default.bool,encodeSpecialCharacters:a.default.bool,htmlAttributes:a.default.object,link:a.default.arrayOf(a.default.object),meta:a.default.arrayOf(a.default.object),noscript:a.default.arrayOf(a.default.object),onChangeClientState:a.default.func,script:a.default.arrayOf(a.default.object),style:a.default.arrayOf(a.default.object),title:a.default.string,titleAttributes:a.default.object,titleTemplate:a.default.string},t.defaultProps={defer:!0,encodeSpecialCharacters:!0},t.peek=e.peek,t.rewind=function(){var t=e.rewind();return t||(t=(0,c.mapStateOnServer)({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},n}((0,l.default)(c.reducePropsToState,c.handleClientStateChange,c.mapStateOnServer)((function(){return null})));m.renderStatic=m.rewind,t.Helmet=m,t.default=m},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return b}));var r=n(18),o=n(16),i=n(0),a=n.n(i),l=n(25),u=(n(5),n(1)),c=n(13),s=n(22),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=0;d--){var p=a[d];"."===p?i(a,d):".."===p?(i(a,d),f++):f&&(i(a,d),f--)}if(!c)for(;f--;f)a.unshift("..");!c||""===a[0]||a[0]&&o(a[0])||a.unshift("");var h=a.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=l(t),o=l(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},c=n(22);function s(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function m(e,t,n,o){var i;"string"===typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function v(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function b(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"===typeof e?e(t,n):e;"string"===typeof i?"function"===typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=m(e,t,d(),x.location);s.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(x.entries[x.index]=r,f({action:"REPLACE",location:r}))}))},go:g,goBack:function(){g(-1)},goForward:function(){g(1)},canGo:function(e){var t=x.index+e;return t>=0&&t1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a=o.a.createContext(null)},function(e,t,n){var r=n(147),o=n(152);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(118),o=n(36);function i(){return Object(r.a)()||o.a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n.n(r);function i(e,t){return o.a.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},function(e,t,n){"use strict";var r=n(0),o=n.n(r).a.createContext({});t.a=o},,function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},,,function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(137),o=n(138),i=n(139),a=n(140),l=n(141);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;is))return!1;var d=u.get(e);if(d&&u.get(t))return d==t;var p=-1,h=!0,m=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++p-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(i)})),e.exports=l}).call(this,n(207))},function(e,t,n){"use strict";var r=n(21),o=n(209),i=n(92),a=n(211),l=n(212),u=n(96);e.exports=function(e){return new Promise((function(t,c){var s=e.data,f=e.headers;r.isFormData(s)&&delete f["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",h=e.auth.password||"";f.Authorization="Basic "+btoa(p+":"+h)}if(d.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};o(t,c,r),d=null}},d.onabort=function(){d&&(c(u("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){c(u("Network Error",e,null,d)),d=null},d.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var m=n(213),v=(e.withCredentials||l(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;v&&(f[e.xsrfHeaderName]=v)}if("setRequestHeader"in d&&r.forEach(f,(function(e,t){"undefined"===typeof s&&"content-type"===t.toLowerCase()?delete f[t]:d.setRequestHeader(t,e)})),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(b){if("json"!==e.responseType)throw b}"function"===typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),c(e),d=null)})),void 0===s&&(s=null),d.send(s)}))}},function(e,t,n){"use strict";var r=n(210);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},function(e,t,n){"use strict";var r=n(21);e.exports=function(e,t){t=t||{};var n={};return r.forEach(["url","method","params","data"],(function(e){"undefined"!==typeof t[e]&&(n[e]=t[e])})),r.forEach(["headers","auth","proxy"],(function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):"undefined"!==typeof t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):"undefined"!==typeof e[o]&&(n[o]=e[o])})),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(r){"undefined"!==typeof t[r]?n[r]=t[r]:"undefined"!==typeof e[r]&&(n[r]=e[r])})),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";var r=n(1),o=n(2),i=n(0),a=n.n(i),l=(n(5),n(3)),u=n(4),c=n(7),s=a.a.forwardRef((function(e,t){var n=e.children,i=e.classes,u=e.className,s=e.color,f=void 0===s?"inherit":s,d=e.component,p=void 0===d?"svg":d,h=e.fontSize,m=void 0===h?"default":h,v=e.htmlColor,b=e.titleAccess,y=e.viewBox,g=void 0===y?"0 0 24 24":y,x=Object(o.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return a.a.createElement(p,Object(r.a)({className:Object(l.a)(i.root,u,"inherit"!==f&&i["color".concat(Object(c.a)(f))],"default"!==m&&i["fontSize".concat(Object(c.a)(m))]),focusable:"false",viewBox:g,color:v,"aria-hidden":b?null:"true",role:b?"img":"presentation",ref:t},x),n,b?a.a.createElement("title",null,b):null)}));s.muiName="SvgIcon",t.a=Object(u.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(s)},function(e,t){t.__esModule=!0;t.ATTRIBUTE_NAMES={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"};var n=t.TAG_NAMES={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},r=(t.VALID_TAG_NAMES=Object.keys(n).map((function(e){return n[e]})),t.TAG_PROPERTIES={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src"},t.REACT_TAG_MAP={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"});t.HELMET_PROPS={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},t.HTML_TAG_MAP=Object.keys(r).reduce((function(e,t){return e[r[t]]=t,e}),{}),t.SELF_CLOSING_TAGS=[n.NOSCRIPT,n.SCRIPT,n.STYLE],t.HELMET_ATTRIBUTE="data-react-helmet"},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31),o=n(39);function i(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!==typeof t?Object(o.a)(e):t}},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"===typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"===typeof o?o(n,r,e):t(o)}}}}var o=r();o.withExtraArgument=r,t.a=o},function(e,t,n){"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(t){var n="__global_unique_id__";e.exports=function(){return t[n]=(t[n]||0)+1}}).call(this,n(52))},function(e,t,n){"use strict";var r=n(49);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(0)),i=(0,r(n(59)).default)(o.default.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.default=i},function(e,t,n){"use strict";var r=n(49);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(0)),i=(0,r(n(59)).default)(o.default.createElement("path",{d:"M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"HighlightOff");t.default=i},function(e,t,n){"use strict";var r=n(49);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(0)),i=(0,r(n(59)).default)(o.default.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.default=i},function(e,t,n){"use strict";var r=n(49);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(0)),i=(0,r(n(59)).default)(o.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"}),"AccountCircle");t.default=i},function(e,t,n){"use strict";var r=n(8),o=n(2),i=n(258),a=n(1),l=["xs","sm","md","lg","xl"];function u(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,u=e.step,c=void 0===u?5:u,s=Object(o.a)(e,["values","unit","step"]);function f(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function d(e,t){var r=l.indexOf(t);return r===l.length-1?f(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(i,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[l[r+1]]?n[l[r+1]]:t)-c/100).concat(i,")")}return Object(a.a)({keys:l,values:n,up:f,down:function(e){var t=l.indexOf(e)+1,r=n[l[t]];return t===l.length?f("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-c/100).concat(i,")")},between:d,only:function(e){return d(e,e)},width:function(e){return n[e]}},s)}function c(e,t,n){var o;return Object(a.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(a.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(a.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(o={minHeight:56},Object(r.a)(o,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(o,e.up("sm"),{minHeight:64}),o)},n)}var s={black:"#000",white:"#fff"},f={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},d={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},p={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},h={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},v={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},b={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},y=n(12),g={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:s.white,default:f[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},x={text:{primary:s.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:f[800],default:"#303030"},action:{active:s.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function w(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(y.d)(e.main,r):"dark"===t&&(e.dark=Object(y.a)(e.main,1.5*r)))}function E(e){var t=e.primary,n=void 0===t?{light:d[300],main:d[500],dark:d[700]}:t,r=e.secondary,l=void 0===r?{light:p.A200,main:p.A400,dark:p.A700}:r,u=e.error,c=void 0===u?{light:h[300],main:h[500],dark:h[700]}:u,E=e.warning,O=void 0===E?{light:m[300],main:m[500],dark:m[700]}:E,S=e.info,T=void 0===S?{light:v[300],main:v[500],dark:v[700]}:S,k=e.success,C=void 0===k?{light:b[300],main:b[500],dark:b[700]}:k,j=e.type,P=void 0===j?"light":j,R=e.contrastThreshold,_=void 0===R?3:R,A=e.tonalOffset,N=void 0===A?.2:A,M=Object(o.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function I(e){if(!e)throw new TypeError("Material-UI: missing background argument in getContrastText(".concat(e,")."));return Object(y.c)(e,x.text.primary)>=_?x.text.primary:g.text.primary}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=Object(a.a)({},e)).main&&e[t]&&(e.main=e[t]),w(e,"light",n,N),w(e,"dark",r,N),e.contrastText||(e.contrastText=I(e.main)),e}var z={dark:x,light:g};return Object(i.a)(Object(a.a)({common:s,type:P,primary:L(n),secondary:L(l,"A400","A200","A700"),error:L(c),warning:L(O),info:L(T),success:L(C),grey:f,contrastThreshold:_,getContrastText:I,augmentColor:L,tonalOffset:N},z[P]),M)}function O(e){return Math.round(1e5*e)/1e5}var S={textTransform:"uppercase"};function T(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,l=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,u=n.fontSize,c=void 0===u?14:u,s=n.fontWeightLight,f=void 0===s?300:s,d=n.fontWeightRegular,p=void 0===d?400:d,h=n.fontWeightMedium,m=void 0===h?500:h,v=n.fontWeightBold,b=void 0===v?700:v,y=n.htmlFontSize,g=void 0===y?16:y,x=n.allVariants,w=n.pxToRem,E=Object(o.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var T=c/14,k=w||function(e){return"".concat(e/g*T,"rem")},C=function(e,t,n,r,o){return Object(a.a)({fontFamily:l,fontWeight:e,fontSize:k(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===l?{letterSpacing:"".concat(O(r/t),"em")}:{},{},o,{},x)},j={h1:C(f,96,1.167,-1.5),h2:C(f,60,1.2,-.5),h3:C(p,48,1.167,0),h4:C(p,34,1.235,.25),h5:C(p,24,1.334,0),h6:C(m,20,1.6,.15),subtitle1:C(p,16,1.75,.15),subtitle2:C(m,14,1.57,.1),body1:C(p,16,1.5,.15),body2:C(p,14,1.43,.15),button:C(m,14,1.75,.4,S),caption:C(p,12,1.66,.4),overline:C(p,12,2.66,1,S)};return Object(i.a)(Object(a.a)({htmlFontSize:g,pxToRem:k,round:O,fontFamily:l,fontSize:c,fontWeightLight:f,fontWeightRegular:p,fontWeightMedium:m,fontWeightBold:b},j),E,{clone:!1})}function k(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var C=["none",k(0,2,1,-1,0,1,1,0,0,1,3,0),k(0,3,1,-2,0,2,2,0,0,1,5,0),k(0,3,3,-2,0,3,4,0,0,1,8,0),k(0,2,4,-1,0,4,5,0,0,1,10,0),k(0,3,5,-1,0,5,8,0,0,1,14,0),k(0,3,5,-1,0,6,10,0,0,1,18,0),k(0,4,5,-2,0,7,10,1,0,2,16,1),k(0,5,5,-3,0,8,10,1,0,3,14,2),k(0,5,6,-3,0,9,12,1,0,3,16,2),k(0,6,6,-3,0,10,14,1,0,4,18,3),k(0,6,7,-4,0,11,15,1,0,4,20,3),k(0,7,8,-4,0,12,17,2,0,5,22,4),k(0,7,8,-4,0,13,19,2,0,5,24,4),k(0,7,9,-4,0,14,21,2,0,5,26,4),k(0,8,9,-5,0,15,22,2,0,6,28,5),k(0,8,10,-5,0,16,24,2,0,6,30,5),k(0,8,11,-5,0,17,26,2,0,6,32,5),k(0,9,11,-5,0,18,28,2,0,7,34,6),k(0,9,12,-6,0,19,29,2,0,7,36,6),k(0,10,13,-6,0,20,31,3,0,8,38,7),k(0,10,13,-6,0,21,33,3,0,8,40,7),k(0,10,14,-6,0,22,35,3,0,8,42,7),k(0,11,14,-7,0,23,36,3,0,9,44,8),k(0,11,15,-7,0,24,38,3,0,9,46,8)],j={borderRadius:4};function P(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"===typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?_.standard:n,i=t.easing,a=void 0===i?R.easeInOut:i,l=t.delay,u=void 0===l?0:l;Object(o.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof r?r:A(r)," ").concat(a," ").concat("string"===typeof u?u:A(u))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},M=n(63);t.a=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,a=void 0===r?{}:r,l=e.palette,s=void 0===l?{}:l,f=e.spacing,d=e.typography,p=void 0===d?{}:d,h=Object(o.a)(e,["breakpoints","mixins","palette","spacing","typography"]),m=E(s),v=u(n),b=P(f),y=Object(i.a)({breakpoints:v,direction:"ltr",mixins:c(v,b,a),overrides:{},palette:m,props:{},shadows:C,typography:T(m,p),spacing:b,shape:j,transitions:N,zIndex:M.a},h),g=arguments.length,x=new Array(g>1?g-1:0),w=1;w3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(Object(T.a)(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===a.indexOf(e.tagName)&&C(e,o)}))}function R(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function _(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=d(e);return t.body===e?p(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var a=k();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(j(i)+a,"px"),n=d(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(j(e)+a,"px")}))}var l=i.parentElement,u="HTML"===l.nodeName&&"scroll"===window.getComputedStyle(l)["overflow-y"]?l:i;r.push({value:u.style.overflow,key:"overflow",el:u}),u.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var A=function(){function e(){Object(O.a)(this,e),this.modals=[],this.containers=[]}return Object(S.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&C(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);P(t,e.mountNode,e.modalRef,r,!0);var o=R(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=R(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=_(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=R(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&C(e.modalRef,!0),P(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&C(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();var N=function(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,o=e.disableEnforceFocus,i=void 0!==o&&o,l=e.disableRestoreFocus,u=void 0!==l&&l,c=e.getDoc,f=e.isEnabled,p=e.open,h=a.a.useRef(),m=a.a.useRef(null),v=a.a.useRef(null),b=a.a.useRef(),g=a.a.useRef(null),x=a.a.useCallback((function(e){g.current=s.a.findDOMNode(e)}),[]),w=Object(y.a)(t.ref,x);return a.a.useMemo((function(){p&&"undefined"!==typeof window&&(b.current=c().activeElement)}),[p]),a.a.useEffect((function(){if(p){var e=d(g.current);r||!g.current||g.current.contains(e.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex",-1),g.current.focus());var t=function(){i||!f()||h.current?h.current=!1:g.current&&!g.current.contains(e.activeElement)&&g.current.focus()},n=function(t){!i&&f()&&9===t.keyCode&&e.activeElement===g.current&&(h.current=!0,t.shiftKey?v.current.focus():m.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),u||(b.current&&b.current.focus&&b.current.focus(),b.current=null)}}}),[r,i,u,f,p]),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelStart"}),a.a.cloneElement(t,{ref:w}),a.a.createElement("div",{tabIndex:0,ref:v,"data-test":"sentinelEnd"}))},M={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},I=a.a.forwardRef((function(e,t){var n=e.invisible,i=void 0!==n&&n,l=e.open,u=Object(o.a)(e,["invisible","open"]);return l?a.a.createElement("div",Object(r.a)({"aria-hidden":!0,ref:t},u,{style:Object(r.a)({},M.root,{},i?M.invisible:{},{},u.style)})):null}));var L=new A,z=a.a.forwardRef((function(e,t){var n=Object(m.a)(),i=Object(v.a)({name:"MuiModal",props:Object(r.a)({},e),theme:n}),l=i.BackdropComponent,u=void 0===l?I:l,c=i.BackdropProps,f=i.children,p=i.closeAfterTransition,b=void 0!==p&&p,g=i.container,O=i.disableAutoFocus,S=void 0!==O&&O,T=i.disableBackdropClick,k=void 0!==T&&T,j=i.disableEnforceFocus,P=void 0!==j&&j,R=i.disableEscapeKeyDown,_=void 0!==R&&R,A=i.disablePortal,M=void 0!==A&&A,z=i.disableRestoreFocus,D=void 0!==z&&z,F=i.disableScrollLock,U=void 0!==F&&F,B=i.hideBackdrop,W=void 0!==B&&B,H=i.keepMounted,$=void 0!==H&&H,V=i.manager,q=void 0===V?L:V,G=i.onBackdropClick,K=i.onClose,Y=i.onEscapeKeyDown,X=i.onRendered,Q=i.open,J=Object(o.a)(i,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Z=a.a.useState(!0),ee=Z[0],te=Z[1],ne=a.a.useRef({}),re=a.a.useRef(null),oe=a.a.useRef(null),ie=Object(y.a)(oe,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(i),le=function(){return d(re.current)},ue=function(){return ne.current.modalRef=oe.current,ne.current.mountNode=re.current,ne.current},ce=function(){q.mount(ue(),{disableScrollLock:U}),oe.current.scrollTop=0},se=Object(w.a)((function(){var e=function(e){return e="function"===typeof e?e():e,s.a.findDOMNode(e)}(g)||le().body;q.add(ue(),e),oe.current&&ce()})),fe=a.a.useCallback((function(){return q.isTopModal(ue())}),[q]),de=Object(w.a)((function(e){re.current=e,e&&(X&&X(),Q&&fe()?ce():C(oe.current,!0))})),pe=a.a.useCallback((function(){q.remove(ue())}),[q]);if(a.a.useEffect((function(){return function(){pe()}}),[pe]),a.a.useEffect((function(){Q?se():ae&&b||pe()}),[Q,pe,ae,b,se]),!$&&!Q&&(!ae||ee))return null;var he=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:E.a}),me={};return void 0===f.props.tabIndex&&(me.tabIndex=f.props.tabIndex||"-1"),ae&&(me.onEnter=h((function(){te(!1)}),f.props.onEnter),me.onExited=h((function(){te(!0),b&&pe()}),f.props.onExited)),a.a.createElement(x,{ref:de,container:g,disablePortal:M},a.a.createElement("div",Object(r.a)({ref:ie,onKeyDown:function(e){"Escape"===e.key&&fe()&&(e.stopPropagation(),Y&&Y(e),!_&&K&&K(e,"escapeKeyDown"))},role:"presentation"},J,{style:Object(r.a)({},he.root,{},!Q&&ee?he.hidden:{},{},J.style)}),W?null:a.a.createElement(u,Object(r.a)({open:Q,onClick:function(e){e.target===e.currentTarget&&(G&&G(e),!k&&K&&K(e,"backdropClick"))}},c)),a.a.createElement(N,{disableEnforceFocus:P,disableAutoFocus:S,disableRestoreFocus:D,getDoc:le,isEnabled:fe,open:Q},a.a.cloneElement(f,me))))})),D=n(13),F=n(16),U=!1,B=n(43),W=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o="exited",r.appearStatus="entering"):o="entered":o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}Object(F.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=s.a.findDOMNode(this);"entering"===t?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context?this.context.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;!t&&!r||U?this.safeSetState({status:"entered"},(function(){n.props.onEntered(e)})):(this.props.onEnter(e,o),this.safeSetState({status:"entering"},(function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:"entered"},(function(){n.props.onEntered(e,o)}))}))})))},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n&&!U?(this.props.onExit(e),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=Object(D.a)(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"===typeof n)return a.a.createElement(B.a.Provider,{value:null},n(e,r));var o=a.a.Children.only(n);return(a.a.createElement(B.a.Provider,{value:null},a.a.cloneElement(o,r)))},t}(a.a.Component);function H(){}W.contextType=B.a,W.propTypes={},W.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:H,onEntering:H,onEntered:H,onExit:H,onExiting:H,onExited:H},W.UNMOUNTED=0,W.EXITED=1,W.ENTERING=2,W.ENTERED=3,W.EXITING=4;var $=W,V=n(45);function q(e,t){var n=e.timeout,r=e.style,o=void 0===r?{}:r;return{duration:o.transitionDuration||"number"===typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}function G(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var K={entering:{opacity:1,transform:G(1)},entered:{opacity:1,transform:"none"}},Y=a.a.forwardRef((function(e,t){var n=e.children,i=e.in,l=e.onEnter,u=e.onExit,c=e.style,s=e.timeout,f=void 0===s?"auto":s,d=Object(o.a)(e,["children","in","onEnter","onExit","style","timeout"]),p=a.a.useRef(),h=a.a.useRef(),m=Object(y.a)(n.ref,t),v=Object(V.a)();return a.a.useEffect((function(){return function(){clearTimeout(p.current)}}),[]),a.a.createElement($,Object(r.a)({appear:!0,in:i,onEnter:function(e,t){!function(e){e.scrollTop}(e);var n,r=q({style:c,timeout:f},{mode:"enter"}),o=r.duration,i=r.delay;"auto"===f?(n=v.transitions.getAutoHeightDuration(e.clientHeight),h.current=n):n=o,e.style.transition=[v.transitions.create("opacity",{duration:n,delay:i}),v.transitions.create("transform",{duration:.666*n,delay:i})].join(","),l&&l(e,t)},onExit:function(e){var t,n=q({style:c,timeout:f},{mode:"exit"}),r=n.duration,o=n.delay;"auto"===f?(t=v.transitions.getAutoHeightDuration(e.clientHeight),h.current=t):t=r,e.style.transition=[v.transitions.create("opacity",{duration:t,delay:o}),v.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=G(.75),u&&u(e)},addEndListener:function(e,t){"auto"===f&&(p.current=setTimeout(t,h.current||0))},timeout:"auto"===f?null:f},d),(function(e,t){return a.a.cloneElement(n,Object(r.a)({style:Object(r.a)({opacity:0,transform:G(.75),visibility:"exited"!==e||i?void 0:"hidden"},K[e],{},c,{},n.props.style),ref:m},t))}))}));Y.muiSupportAuto=!0;var X=Y,Q=n(227);function J(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Z(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function ee(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function te(e){return"function"===typeof e?e():e}var ne=a.a.forwardRef((function(e,t){var n=e.action,i=e.anchorEl,u=e.anchorOrigin,c=void 0===u?{vertical:"top",horizontal:"left"}:u,m=e.anchorPosition,v=e.anchorReference,b=void 0===v?"anchorEl":v,y=e.children,g=e.classes,x=e.className,w=e.container,E=e.elevation,O=void 0===E?8:E,S=e.getContentAnchorEl,T=e.marginThreshold,k=void 0===T?16:T,C=e.onEnter,j=e.onEntered,P=e.onEntering,R=e.onExit,_=e.onExited,A=e.onExiting,N=e.open,M=e.PaperProps,I=void 0===M?{}:M,L=e.transformOrigin,D=void 0===L?{vertical:"top",horizontal:"left"}:L,F=e.TransitionComponent,U=void 0===F?X:F,B=e.transitionDuration,W=void 0===B?"auto":B,H=e.TransitionProps,$=void 0===H?{}:H,V=Object(o.a)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),q=a.a.useRef(),G=a.a.useCallback((function(e){if("anchorPosition"===b)return m;var t=te(i),n=(t instanceof p(t).Element?t:d(q.current).body).getBoundingClientRect(),r=0===e?c.vertical:"center";return{top:n.top+J(n,r),left:n.left+Z(n,c.horizontal)}}),[i,c.horizontal,c.vertical,m,b]),K=a.a.useCallback((function(e){var t=0;if(S&&"anchorEl"===b){var n=S(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[c.vertical,b,S]),Y=a.a.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:J(e,D.vertical)+t,horizontal:Z(e,D.horizontal)}}),[D.horizontal,D.vertical]),ne=a.a.useCallback((function(e){var t=K(e),n={width:e.offsetWidth,height:e.offsetHeight},r=Y(n,t);if("none"===b)return{top:null,left:null,transformOrigin:ee(r)};var o=G(t),a=o.top-r.vertical,l=o.left-r.horizontal,u=a+n.height,c=l+n.width,s=p(te(i)),f=s.innerHeight-k,d=s.innerWidth-k;if(af){var m=u-f;a-=m,r.vertical+=m}if(ld){var y=c-d;l-=y,r.horizontal+=y}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(l),"px"),transformOrigin:ee(r)}}),[i,b,G,K,Y,k]),re=a.a.useCallback((function(){var e=q.current;if(e){var t=ne(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[ne]),oe=a.a.useCallback((function(e){q.current=s.a.findDOMNode(e)}),[]);a.a.useEffect((function(){N&&re()})),a.a.useImperativeHandle(n,(function(){return N?{updatePosition:function(){re()}}:null}),[N,re]),a.a.useEffect((function(){if(N){var e=Object(f.a)((function(){re()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("rezise",e)}}}),[N,re]);var ie=W;"auto"!==W||U.muiSupportAuto||(ie=void 0);var ae=w||(i?d(te(i)).body:void 0);return a.a.createElement(z,Object(r.a)({container:ae,open:N,ref:t,BackdropProps:{invisible:!0},className:Object(l.a)(g.root,x)},V),a.a.createElement(U,Object(r.a)({appear:!0,in:N,onEnter:C,onEntered:j,onExit:R,onExited:_,onExiting:A,timeout:ie},$,{onEntering:h((function(e,t){P&&P(e,t),re()}),$.onEntering)}),a.a.createElement(Q.a,Object(r.a)({elevation:O,ref:oe},I,{className:Object(l.a)(g.paper,I.className)}),y)))})),re=Object(u.a)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(ne),oe=n(47),ie=a.a.forwardRef((function(e,t){var n=e.children,i=e.classes,u=e.className,c=e.component,s=void 0===c?"ul":c,f=e.dense,d=void 0!==f&&f,p=e.disablePadding,h=void 0!==p&&p,m=e.subheader,v=Object(o.a)(e,["children","classes","className","component","dense","disablePadding","subheader"]),b=a.a.useMemo((function(){return{dense:d}}),[d]);return a.a.createElement(oe.a.Provider,{value:b},a.a.createElement(s,Object(r.a)({className:Object(l.a)(i.root,u,d&&i.dense,!h&&i.padding,m&&i.subheader),ref:t},v),m,n))})),ae=Object(u.a)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(ie);function le(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ue(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function ce(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function se(e,t,n,r,o){for(var i=!1,a=r(e,t,!!t&&n);a;){if(a===e.firstChild){if(i)return!1;i=!0}if(a.hasAttribute("tabindex")&&!a.disabled&&"true"!==a.getAttribute("aria-disabled")&&ce(a,o))return a.focus(),!0;a=r(e,a,n)}return!1}var fe="undefined"===typeof window?a.a.useEffect:a.a.useLayoutEffect,de=a.a.forwardRef((function(e,t){var n=e.actions,i=e.autoFocus,l=void 0!==i&&i,u=e.autoFocusItem,c=void 0!==u&&u,f=e.children,p=e.className,h=e.onKeyDown,m=e.disableListWrap,v=void 0!==m&&m,b=e.variant,g=void 0===b?"selectedMenu":b,x=Object(o.a)(e,["actions","autoFocus","autoFocusItem","children","className","onKeyDown","disableListWrap","variant"]),w=a.a.useRef(null),E=a.a.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});fe((function(){l&&w.current.focus()}),[l]),a.a.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!w.current.style.width;if(e.clientHeight0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);var l=r&&!o.repeating&&ce(r,o);o.previousKeyMatched&&(l||se(t,r,!1,le,o))?e.preventDefault():o.previousKeyMatched=!1}h&&h(e)},tabIndex:l?0:-1},x),C)})),pe={vertical:"top",horizontal:"right"},he={vertical:"top",horizontal:"left"},me=a.a.forwardRef((function(e,t){var n=e.autoFocus,i=void 0===n||n,u=e.children,c=e.classes,f=e.disableAutoFocusItem,d=void 0!==f&&f,p=e.MenuListProps,h=void 0===p?{}:p,m=e.onClose,v=e.onEntering,y=e.open,g=e.PaperProps,x=void 0===g?{}:g,w=e.PopoverClasses,E=e.transitionDuration,O=void 0===E?"auto":E,S=e.variant,T=void 0===S?"selectedMenu":S,k=Object(o.a)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),C=Object(V.a)(),j=i&&!d&&y,P=a.a.useRef(null),R=a.a.useRef(null),_=-1;a.a.Children.map(u,(function(e,t){a.a.isValidElement(e)&&(e.props.disabled||("menu"!==T&&e.props.selected?_=t:-1===_&&(_=t)))}));var A=a.a.Children.map(u,(function(e,t){return t===_?a.a.cloneElement(e,{ref:function(t){R.current=s.a.findDOMNode(t),Object(b.a)(e.ref,t)}}):e}));return a.a.createElement(re,Object(r.a)({getContentAnchorEl:function(){return R.current},classes:w,onClose:m,onEntering:function(e,t){P.current&&P.current.adjustStyleForScrollbar(e,C),v&&v(e,t)},anchorOrigin:"rtl"===C.direction?pe:he,transformOrigin:"rtl"===C.direction?pe:he,PaperProps:Object(r.a)({},x,{classes:Object(r.a)({},x.classes,{root:c.paper})}),open:y,ref:t,transitionDuration:O},k),a.a.createElement(de,Object(r.a)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),m&&m(e,"tabKeyDown"))},actions:P,autoFocus:i&&(-1===_||d),autoFocusItem:j,variant:T},h,{className:Object(l.a)(c.list,h.className)}),A))}));t.a=Object(u.a)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(me)},function(e,t,n){"use strict";var r="persist/REHYDRATE",o="persist/REGISTER";var i=n(24);function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case o:return u({},e,{registry:[].concat(a(e.registry),[t.key])});case r:var n=e.registry.indexOf(t.key),i=a(e.registry);return i.splice(n,1),u({},e,{registry:i,bootstrapped:0===i.length});default:return e}};function d(e,t,n){var a=n||!1,l=Object(i.e)(f,s,t&&t.enhancer?t.enhancer:void 0),c=function(e){l.dispatch({type:o,key:e})},d=function(t,n,o){var i={type:r,payload:n,err:o,key:t};e.dispatch(i),l.dispatch(i),a&&p.getState().bootstrapped&&(a(),a=!1)},p=u({},l,{purge:function(){var t=[];return e.dispatch({type:"persist/PURGE",result:function(e){t.push(e)}}),Promise.all(t)},flush:function(){var t=[];return e.dispatch({type:"persist/FLUSH",result:function(e){t.push(e)}}),Promise.all(t)},pause:function(){e.dispatch({type:"persist/PAUSE"})},persist:function(){e.dispatch({type:"persist/PERSIST",register:c,rehydrate:d})}});return t&&t.manualPersist||p.persist(),p}n.d(t,"a",(function(){return d}))},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){var t;if(!("string"===typeof e||e instanceof String))throw t=null===e?"null":"object"===(t=r(e))&&e.constructor&&e.constructor.hasOwnProperty("name")?e.constructor.name:"a ".concat(t),new TypeError("Expected string but received ".concat(t,"."))}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var n in t)"undefined"===typeof e[n]&&(e[n]=t[n]);return e}function a(e){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){var n,r;o(e),"object"===a(t)?(n=t.min||0,r=t.max):(n=arguments[1],r=arguments[2]);var i=encodeURI(e).split(/%..|./).length-1;return i>=n&&("undefined"===typeof r||i<=r)}var u={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};var c=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,s=/^[0-9A-F]{1,4}$/i;function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(o(e),!(t=String(t)))return f(e,4)||f(e,6);if("4"===t){if(!c.test(e))return!1;var n=e.split(".").sort((function(e,t){return e-t}));return n[3]<=255}if("6"===t){var r=[e];if(e.includes("%")){if(2!==(r=e.split("%")).length)return!1;if(!r[0].includes(":"))return!1;if(""===r[1])return!1}var i=r[0].split(":"),a=!1,l=f(i[i.length-1],4),u=l?7:8;if(i.length>u)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(i.shift(),i.shift(),a=!0):"::"===e.substr(e.length-2)&&(i.pop(),i.pop(),a=!0);for(var d=0;d0&&d=1:i.length===u}return!1}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n.d(t,"a",(function(){return x}));var p={allow_display_name:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},h=/^([^\x00-\x1F\x7F-\x9F\cX]+)<(.+)>$/i,m=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,v=/^[a-z\d]+$/,b=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,y=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,g=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;function x(e,t){if(o(e),(t=i(t,p)).require_display_name||t.allow_display_name){var n=e.match(h);if(n){var r,a=d(n,3);if(r=a[1],e=a[2],r.endsWith(" ")&&(r=r.substr(0,r.length-1)),!function(e){var t=e.match(/^"(.+)"$/i),n=t?t[1]:e;if(!n.trim())return!1;if(/[\.";<>]/.test(n)){if(!t)return!1;if(!(n.split('"').length===n.split('\\"').length))return!1}return!0}(r))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>254)return!1;var c=e.split("@"),s=c.pop(),x=c.join("@"),w=s.toLowerCase();if(t.domain_specific_validation&&("gmail.com"===w||"googlemail.com"===w)){var E=(x=x.toLowerCase()).split("+")[0];if(!l(E.replace(".",""),{min:6,max:30}))return!1;for(var O=E.split("."),S=0;S63)return!1;if(t.require_tld){var a=n.pop();if(!n.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(a))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(a))return!1}for(var l,c=0;c0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,a=t.center,l=void 0===a?i||t.pulsate:a,u=t.fakeElement,c=void 0!==u&&u;if("mousedown"===e.type&&v.current)v.current=!1;else{"touchstart"===e.type&&(v.current=!0);var s,f,d,p=c?null:g.current,h=p?p.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(l||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)s=Math.round(h.width/2),f=Math.round(h.height/2);else{var m=e.clientX?e.clientX:e.touches[0].clientX,w=e.clientY?e.clientY:e.touches[0].clientY;s=Math.round(m-h.left),f=Math.round(w-h.top)}if(l)(d=Math.sqrt((2*Math.pow(h.width,2)+Math.pow(h.height,2))/3))%2===0&&(d+=1);else{var E=2*Math.max(Math.abs((p?p.clientWidth:0)-s),s)+2,O=2*Math.max(Math.abs((p?p.clientHeight:0)-f),f)+2;d=Math.sqrt(Math.pow(E,2)+Math.pow(O,2))}e.touches?null===y.current&&(y.current=function(){x({pulsate:o,rippleX:s,rippleY:f,rippleSize:d,cb:n})},b.current=setTimeout((function(){y.current&&(y.current(),y.current=null)}),80)):x({pulsate:o,rippleX:s,rippleY:f,rippleSize:d,cb:n})}}),[i,x]),E=a.a.useCallback((function(){w({},{pulsate:!0})}),[w]),O=a.a.useCallback((function(e,t){if(clearTimeout(b.current),"touchend"===e.type&&y.current)return e.persist(),y.current(),y.current=null,void(b.current=setTimeout((function(){O(e,t)})));y.current=null,p((function(e){return e.length>0?e.slice(1):e})),m.current=t}),[]);return a.a.useImperativeHandle(t,(function(){return{pulsate:E,start:w,stop:O}}),[E,w,O]),a.a.createElement("span",Object(r.a)({className:Object(c.a)(l.root,u),ref:g},s),a.a.createElement(I,{component:null,exit:!0},d))})),F=Object(d.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(a.a.memo(D)),U=a.a.forwardRef((function(e,t){var n=e.action,i=e.buttonRef,l=e.centerRipple,d=void 0!==l&&l,p=e.children,m=e.classes,v=e.className,b=e.component,y=void 0===b?"button":b,g=e.disabled,x=void 0!==g&&g,w=e.disableRipple,E=void 0!==w&&w,O=e.disableTouchRipple,T=void 0!==O&&O,k=e.focusRipple,C=void 0!==k&&k,j=e.focusVisibleClassName,P=e.onBlur,R=e.onClick,_=e.onFocus,A=e.onFocusVisible,N=e.onKeyDown,M=e.onKeyUp,I=e.onMouseDown,L=e.onMouseLeave,z=e.onMouseUp,D=e.onTouchEnd,U=e.onTouchMove,B=e.onTouchStart,W=e.onDragLeave,H=e.tabIndex,$=void 0===H?0:H,V=e.TouchRippleProps,q=e.type,G=void 0===q?"button":q,K=Object(o.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),Y=a.a.useRef(null);var X=a.a.useRef(null),Q=a.a.useState(!1),J=Q[0],Z=Q[1];x&&J&&Z(!1);var ee=S(),te=ee.isFocusVisible,ne=ee.onBlurVisible,re=ee.ref;function oe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;return Object(f.a)((function(r){return t&&t(r),!n&&X.current&&X.current[e](r),!0}))}a.a.useImperativeHandle(n,(function(){return{focusVisible:function(){Z(!0),Y.current.focus()}}}),[]),a.a.useEffect((function(){J&&C&&!E&&X.current.pulsate()}),[E,C,J]);var ie=oe("start",I),ae=oe("stop",W),le=oe("stop",z),ue=oe("stop",(function(e){J&&e.preventDefault(),L&&L(e)})),ce=oe("start",B),se=oe("stop",D),fe=oe("stop",U),de=oe("stop",(function(e){J&&(ne(e),Z(!1)),P&&P(e)}),!1),pe=Object(f.a)((function(e){x||(Y.current||(Y.current=e.currentTarget),te(e)&&(Z(!0),A&&A(e)),_&&_(e))})),he=function(){var e=u.a.findDOMNode(Y.current);return y&&"button"!==y&&!("A"===e.tagName&&e.href)},me=a.a.useRef(!1),ve=Object(f.a)((function(e){C&&!me.current&&J&&X.current&&" "===e.key&&(me.current=!0,e.persist(),X.current.stop(e,(function(){X.current.start(e)}))),N&&N(e),e.target===e.currentTarget&&he()&&"Enter"===e.key&&(e.preventDefault(),R&&R(e))})),be=Object(f.a)((function(e){C&&" "===e.key&&X.current&&J&&!e.defaultPrevented&&(me.current=!1,e.persist(),X.current.stop(e,(function(){X.current.pulsate(e)}))),M&&M(e),e.target===e.currentTarget&&he()&&" "===e.key&&!e.defaultPrevented&&(e.preventDefault(),R&&R(e))})),ye=y;"button"===ye&&K.href&&(ye="a");var ge={};"button"===ye?(ge.type=G,ge.disabled=x):("a"===ye&&K.href||(ge.role="button"),ge["aria-disabled"]=x);var xe=Object(s.a)(i,t),we=Object(s.a)(re,Y),Ee=Object(s.a)(xe,we);return a.a.createElement(ye,Object(r.a)({className:Object(c.a)(m.root,v,J&&[m.focusVisible,j],x&&m.disabled),onBlur:de,onClick:R,onFocus:pe,onKeyDown:ve,onKeyUp:be,onMouseDown:ie,onMouseLeave:ue,onMouseUp:le,onDragLeave:ae,onTouchEnd:se,onTouchMove:fe,onTouchStart:ce,ref:Ee,tabIndex:x?-1:$},ge,K),p,E||x?null:a.a.createElement(h,null,a.a.createElement(F,Object(r.a)({ref:X,center:d},V))))}));t.a=Object(d.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(U)},,,,,,,function(e,t,n){"use strict";var r=n(67),o="function"===typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,s=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113;o&&Symbol.for("react.suspense_list");var h=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116;o&&Symbol.for("react.fundamental"),o&&Symbol.for("react.responder"),o&&Symbol.for("react.scope");var v="function"===typeof Symbol&&Symbol.iterator;function b(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n_.length&&_.push(e)}function M(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case a:u=!0}}if(u)return r(o,t,""===n?"."+I(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c