{"version":3,"sources":["_images/logo-circle.svg","_helpers/history.js","_helpers/userValidator.js","_helpers/profileValidator.js","_constants/auth.js","_constants/profile.js","_services/auth.js","_actions/handler.js","_actions/auth.js","_services/profile.js","_actions/profile.js","_components/PrivateRoute.js","_components/FormFooter.js","LoginRegister/LoginForm.js","LoginRegister/RegisterForm.js","LoginRegister/LoginRegisterMobile.js","LoginRegister/LoginRegister.js","_components/VerifyEmail.js","_components/LoginAs.js","_components/Logout.js","RegisterPending/RegisterPending.js","_components/Sidebar/Sidebar.js","_components/Header/Header.js","_components/AppWrapper/AppWrapper.js","HomePage/HomePage.js","ForgotPassword/ForgotPassword.js","Security/Security.js","ForgotPassword/ResetPassword.js","App/App.js","_reducers/auth.js","_reducers/profile.js","_reducers/index.js","configureStore.js","serviceWorker.js","index.js","_helpers/language.js","_images/logo.svg","_images/btn-arrow.svg"],"names":["module","exports","history","createBrowserHistory","emailPattern","userValidator","full_name","value","email","test","String","toLowerCase","password","length","profileValidator","authConstants","profileConstants","authService","require","getLanguage","login","body","requestOptions","method","headers","JSON","stringify","fetch","then","handleResponse","register","origin","language","name","url","logout","resendVerificationEmail","verifyEmail","token","forgotPassword","resetPassword","updatePassword","oldPassword","newPassword","password_old","password_new","getSession","loginAs","userId","response","ok","text","parse","Promise","reject","handleError","dispatch","failureFunction","status","type","errorMessage","err","createPath","path","user","push","catch","failure","error","handle","data","window","Localize","setLanguage","drift","config","locale","profileService","getProfile","PROFILE_ROUTE","updateProfile","updateData","opts","updateAvatar","file","FormData","append","profile","success","PrivateRoute","props","state","userRefreshed","self","this","refreshSession","r","setState","qs","location","search","from","session","token_verify","verified","pathname","to","id","setTimeout","href","children","Component","actionCreators","result","connect","loggingOut","auth","FormFooterConnected","light","useState","isLangDropdownOpen","setIsLangDropdownOpen","useEffect","className","onClick","_","get","LANGUAGES","Object","keys","map","v","k","key","lang","target","LoginForm","validate","field","errors","validateAll","valid","handleChange","event","checked","onSubmit","loggingIn","submitLogin","submitted","bind","loginError","role","onKeyDown","onKeyPressHandler","placeholder","onChange","LoginFormConnected","RegisterForm","registering","submitRegister","registerError","RegisterFormConnected","LoginRegisterMobile","isRegisterOpen","onSwitchHandler","onSubmitRegister","onSubmitLogin","Container","Row","Col","src","btnArrow","alt","LoginRegister","registerOpen","parsedQs","loginRegisterClear","params","ParticlesConfig","width","height","viewBox","preserveAspectRatio","fill","d","logo","request","LoginRegisterConnected","VerifyEmail","verifying","LoginAs","user_id","Logout","assign","RegisterPending","e","preventDefault","resendingVerify","resendVerifyClear","resendingVerifyError","resendingVerifySuccess","RegisterPendingConnected","Sidebar","selected","OverlayTrigger","placement","overlay","Tooltip","router","Header","Dropdown","alignRight","Toggle","variant","avatarUrl","Menu","Item","AppWrapper","linkSelected","languageMapping","en","phoneLocalEn","es","phoneLocalEs","phoneLocalPt","HomePage","handleChangeDefault","handlePhoneChange","handleSubmit","pick","handleAvatarClick","refs","avatarBrowse","click","handleAvatarUpload","files","avatarLoading","phone","updatingProfile","size","color","loading","ref","disabled","labels","Form","Control","as","defaultValue","getLanguageName","updateProfileError","updateProfileSuccess","React","profileData","ForgotPassword","sendingForgotPassword","forgotPasswordClear","forgotPasswordError","forgotPasswordSuccess","ForgotPasswordConnected","Security","validatePasswordConfirmed","newPasswordConfirm","validatePassword","updatingPassword","updatePasswordClear","updatePasswordError","updatePasswordSuccess","ResetPassword","changingPassword","passwordRepeat","resetPasswordClear","resetPasswordError","App","exact","component","initialState","loggedIn","logoutError","verifyEmailError","authReducer","action","user_reg","lastAvatarUrl","getAvatarUrl","Date","getTime","withAvatarUrl","refresh","profileReducer","rootReducer","combineReducers","persistReducer","storage","connectRouter","store","Boolean","hostname","match","middleware","routerMiddleware","thunkMiddleware","createStore","applyMiddleware","persistor","persistStore","configureStore","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","registration","unregister","languages","concat"],"mappings":"uHAAAA,EAAOC,QAAU,IAA0B,yC,0cCE9BC,EAAUC,cCFnBC,EAAe,wJAENC,EAAgB,CAC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UAVC,oBAaX4R,GAbW,IAa5B,2BAA4B,CAAC,IAApBtL,EAAmB,QAC1B,GAAIP,EAAUO,GACZ,OAAOA,GAfiB,8BAoB5B,IAAK,IAAIA,KAAQP,EACf,OAAOO,I,mBC3CXtI,EAAOC,QAAU,IAA0B,kC,muCCA3CD,EAAOC,QAAU,IAA0B,wC","file":"static/js/main.51075079.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/logo-circle.9c8819ac.svg\";","import { createBrowserHistory } from 'history';\n\nexport const history = createBrowserHistory();\n","var emailPattern = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\nexport const userValidator = {\n full_name: function(value, edit = false){\n if (!value){\n return 'Full name must be provided';\n }\n\n return null;\n },\n\n email: function(value, edit = false){\n if (!value){\n return 'Email must be provided';\n }\n\n if(!emailPattern.test(String(value).toLowerCase())){\n return 'Email is not valid'\n }\n\n return null;\n },\n\n password: function(value){\n if(!value){\n return 'Password must be provided'\n }\n\n if(value.length < 7){\n return 'Password must be at least 7 characters long' \n }\n }\n}\n","\nexport const profileValidator = {\n 'name': function(value, edit = false){\n if (!value){\n return 'Full name must be provided';\n }\n\n return null;\n },\n 'phone': function(value, edit = false){\n return null\n }\n}\n","export const authConstants = {\n REGISTER_REQUEST: 'REGISTER_REQUEST',\n REGISTER_SUCCESS: 'REGISTER_SUCCESS',\n REGISTER_FAILURE: 'REGISTER_FAILURE',\n\n VERIFY_EMAIL_REQUEST: 'VERIFY_EMAIL_REQUEST',\n VERIFY_EMAIL_SUCCESS: 'VERIFY_EMAIL_SUCCESS',\n VERIFY_EMAIL_FAILURE: 'VERIFY_EMAIL_FAILURE',\n\n LOGIN_REQUEST: 'LOGIN_REQUEST',\n LOGIN_SUCCESS: 'LOGIN_SUCCESS',\n LOGIN_FAILURE: 'LOGIN_FAILURE',\n\n LOGIN_REGISTER_CLEAR: 'LOGIN_REGISTER_CLEAR',\n\n SESSION_REFRESH_REQUEST: 'SESSION_REFRESH_REQUEST',\n SESSION_REFRESH_SUCCESS: 'SESSION_REFRESH_SUCCESS',\n SESSION_REFRESH_FAILURE: 'SESSION_REFRESH_FAILURE',\n \n LOGOUT_REQUEST: 'LOGOUT_REQUEST',\n LOGOUT_SUCCESS: 'LOGOUT_SUCCESS',\n LOGOUT_FAILURE: 'LOGOUT_FAILURE',\n\n FORGOT_PASSWORD_REQUEST: 'FORGOT_PASSWORD_REQUEST',\n FORGOT_PASSWORD_SUCCESS: 'FORGOT_PASSWORD_SUCCESS',\n FORGOT_PASSWORD_FAILURE: 'FORGOT_PASSWORD_FAILURE',\n FORGOT_PASSWORD_CLEAR: 'FORGOT_PASSWORD_CLEAR',\n\n RESET_PASSWORD_REQUEST: 'RESET_PASSWORD_REQUEST',\n RESET_PASSWORD_SUCCESS: 'RESET_PASSWORD_SUCCESS',\n RESET_PASSWORD_FAILURE: 'RESET_PASSWORD_FAILURE',\n RESET_PASSWORD_CLEAR: 'RESET_PASSWORD_CLEAR',\n\n UPDATE_PASSWORD_REQUEST: 'UPDATE_PASSWORD_REQUEST',\n UPDATE_PASSWORD_SUCCESS: 'UPDATE_PASSWORD_SUCCESS',\n UPDATE_PASSWORD_FAILURE: 'UPDATE_PASSWORD_FAILURE',\n UPDATE_PASSWORD_CLEAR: 'UPDATE_PASSWORD_CLEAR',\n\n RESEND_VERIF_EMAIL_REQUEST: 'RESEND_VERIF_EMAIL_REQUEST',\n RESEND_VERIF_EMAIL_SUCCEESS: 'RESEND_VERIF_EMAIL_SUCCESS',\n RESEND_VERIF_EMAIL_FAILURE: 'RESEND_VERIF_EMAIL_FAILURE',\n RESEND_VERIF_EMAIL_CLEAR: 'RESEND_VERIF_EMAIL_CLEAR',\n\n LOGIN_AS_REQUEST: 'LOGIN_AS_REQUEST',\n LOGIN_AS_SUCCESS: 'LOGIN_AS_SUCCESS',\n LOGIN_AS_FAILURE: 'LOGIN_AS_FAILURE',\n\n SET_LANGUAGE: 'SET_LANGUAGE',\n};\n\n","export const profileConstants = {\n /* Clearing the user's profile. */\n PROFILE_CLEAR: 'PROFILE_CLEAR',\n\n /* Fetching the user's profile. */\n PROFILE_GET_REQUEST: 'PROFILE_GET_REQUEST',\n PROFILE_GET_SUCCESS: 'PROFILE_GET_SUCCESS',\n PROFILE_GET_FAILURE: 'PROFILE_GET_FAILURE',\n\n /* Updating the user's profile information. */\n PROFILE_UPDATE_REQUEST: 'PROFILE_UPDATE_REQUEST',\n PROFILE_UPDATE_SUCCESS: 'PROFILE_UPDATE_SUCCESS',\n PROFILE_UPDATE_FAILURE: 'PROFILE_UPDATE_FAILURE',\n\n /* Updating the user's avatar. */\n PROFILE_AVATAR_REQUEST: 'PROFILE_AVATAR_REQUEST',\n PROFILE_AVATAR_SUCCESS: 'PROFILE_AVATAR_SUCCESS',\n PROFILE_AVATAR_FAILURE: 'PROFILE_AVATAR_FAILURE',\n};\n","const { getLanguage } = require('../_helpers/language');\n\nexport const authService = {\n login,\n register,\n logout,\n resendVerificationEmail,\n verifyEmail,\n forgotPassword,\n resetPassword,\n updatePassword,\n getSession,\n loginAs\n};\n\nconst USERS_ROUTE = '/api/v1/users';\nconst SESSIONS_ROUTE = '/api/v1/sessions';\n\nfunction contentTypeHeader() {\n return { \n 'Content-Type': 'application/json'\n }\n}\n\nfunction login(email, password) {\n let body = {\n email: email,\n password: password\n }\n\n const requestOptions = {\n method: 'POST',\n headers: contentTypeHeader(),\n body: JSON.stringify(body),\n };\n\n return fetch(SESSIONS_ROUTE, requestOptions).then(handleResponse);\n}\n\n// TODO: Make a distinction between logging out of one vs all sessions.\n// TODO: Make logging out of the one session a default.\n// TODO: Logging out of /all/ sessions should be a separate less visible button.\nfunction logout() {\n const requestOptions = {\n method: 'DELETE',\n };\n\n return fetch(SESSIONS_ROUTE, requestOptions)\n .then(handleResponse);\n}\n\nfunction resendVerificationEmail(email, origin) {\n let body = {\n email: email\n }\n\n let url = `${USERS_ROUTE}/email`\n if (origin){\n url += '?origin=' + origin\n }\n\n const requestOptions = {\n method: 'DELETE',\n headers: contentTypeHeader(),\n body: JSON.stringify(body),\n };\n\n return fetch(url, requestOptions)\n .then(handleResponse);\n}\n\nfunction forgotPassword(email, origin) {\n const requestOptions = {\n method: 'DELETE',\n headers: contentTypeHeader(),\n body: JSON.stringify({email}),\n };\n\n let url = `${USERS_ROUTE}/password`;\n if (origin){\n url += '?origin=' + origin;\n }\n\n return fetch(url, requestOptions).then(handleResponse);\n}\n\nfunction resetPassword(token, password) {\n let body = {\n token: token,\n password: password\n }\n\n const requestOptions = {\n method: 'POST',\n headers: contentTypeHeader(),\n body: JSON.stringify(body),\n };\n\n return fetch(`${USERS_ROUTE}/password`, requestOptions)\n .then(handleResponse);\n}\n\nfunction updatePassword(oldPassword, newPassword) {\n let body = {\n password_old: oldPassword,\n password_new: newPassword\n }\n\n const requestOptions = {\n method: 'PUT',\n headers: contentTypeHeader(),\n body: JSON.stringify(body),\n };\n\n return fetch(`${USERS_ROUTE}/password`, requestOptions)\n .then(handleResponse)\n}\n\nfunction register(full_name, email, password, origin, language) {\n let body = {\n name: full_name,\n email: email,\n password: password,\n language: language,\n }\n\n const requestOptions = {\n method: 'POST',\n headers: contentTypeHeader(),\n body: JSON.stringify(body),\n };\n\n let url = USERS_ROUTE\n if (origin){\n url += '?origin=' + origin\n }\n\n return fetch(url, requestOptions)\n .then(handleResponse);\n}\n\nfunction verifyEmail(token) {\n const url = `${USERS_ROUTE}/email?token=${token}`;\n\n const requestOptions = {\n method: 'POST',\n };\n\n return fetch(url, requestOptions)\n .then(handleResponse);\n}\n\nfunction getSession(){\n const url = `${SESSIONS_ROUTE}/me`;\n\n const requestOptions = {\n method: 'GET',\n };\n\n return fetch(url, requestOptions)\n .then(handleResponse);\n}\n\nfunction loginAs(userId) {\n\n const requestOptions = {\n method: 'POST'\n };\n\n return fetch(`${SESSIONS_ROUTE}/as?user_id=` + userId, requestOptions)\n .then(handleResponse);\n}\n\nfunction handleResponse(response) {\n if (!response.ok){\n return Promise.reject(response)\n }\n\n return response.text().then(text => {\n const data = text && JSON.parse(text);\n\n return data;\n });\n}\n","import { authConstants } from '../_constants';\n\nexport function handleError(dispatch, failureFunction) {\n return response => {\n if (response.status === 401) {\n return dispatch({ type: authConstants.LOGOUT_SUCCESS });\n }\n \n return response.text().then(text => {\n try {\n const errorMessage = text && JSON.parse(text);\n return dispatch(failureFunction(errorMessage));\n } catch (err) {\n return dispatch(failureFunction('Request failed'));\n }\n });\n };\n}\n","import { authConstants } from '../_constants';\nimport { authService } from '../_services/auth';\nimport { handleError } from './handler';\nimport { history } from '../_helpers';\n\n\nfunction createPath(path, origin){\n if (origin){\n return path + '?origin=' + origin\n }\n\n return path\n }\n\nexport function loginRegisterClear(){\n return dispatch => {\n dispatch({ type: authConstants.LOGIN_REGISTER_CLEAR });\n };\n}\n\nexport function resendVerifyClear(){\n return dispatch => {\n dispatch({ type: authConstants.RESEND_VERIF_EMAIL_CLEAR });\n };\n}\n\nexport function forgotPasswordClear(){\n return dispatch => {\n dispatch({ type: authConstants.FORGOT_PASSWORD_CLEAR });\n };\n}\n\nexport function resetPasswordClear(){\n return dispatch => {\n dispatch({ type: authConstants.RESET_PASSWORD_CLEAR });\n };\n}\n\nexport function updatePasswordClear(){\n return dispatch => {\n dispatch({ type: authConstants.UPDATE_PASSWORD_CLEAR });\n };\n}\n\nexport function login(email, password, origin) {\n return dispatch => {\n dispatch(request({ email }));\n\n authService.login(email, password)\n .then(result => {\n dispatch(success(result));\n const path = createPath('/', origin)\n history.push(path);\n })\n .catch(response => {\n return response.text().then(text => {\n try {\n const errorMessage = text && JSON.parse(text);\n dispatch(failure(errorMessage));\n } catch (err) {\n dispatch(failure('Login failed'));\n }\n });\n });\n };\n\n function request(email) {\n return { type: authConstants.LOGIN_REQUEST, email }\n }\n function success(result) {\n return { type: authConstants.LOGIN_SUCCESS, ...result }\n }\n function failure(error) {\n return { type: authConstants.LOGIN_FAILURE, error }\n }\n}\n\nexport function logout() {\n return dispatch => {\n dispatch(request());\n authService.logout()\n .then(\n user => { \n dispatch(success());\n history.push('/login');\n })\n .catch(handleError(dispatch, failure))\n };\n\n function request() {\n return { type: authConstants.LOGOUT_REQUEST }\n }\n function success() {\n return { type: authConstants.LOGOUT_SUCCESS }\n }\n function failure(error) {\n return { type: authConstants.LOGOUT_FAILURE, error }\n }\n}\n\nexport function verifyEmail(token, origin) {\n return dispatch => {\n dispatch(request({ token }));\n\n return authService.verifyEmail(token)\n .then(result => {\n dispatch(success(result));\n //const path = createPath('/', origin)\n //history.push(path);\n })\n .catch(handleError(dispatch, failure))\n };\n\n function request(token) {\n return { type: authConstants.VERIFY_EMAIL_REQUEST, token }\n }\n function success(result) {\n return { type: authConstants.VERIFY_EMAIL_SUCCESS, ...result }\n }\n function failure(error) {\n return { type: authConstants.VERIFY_EMAIL_FAILURE, error }\n }\n}\n\nexport function refreshSession() {\n return dispatch => {\n dispatch(request({}));\n\n return authService.getSession()\n .then(result => {\n dispatch(success(result));\n })\n .catch(handleError(dispatch, failure))\n };\n\n function request(token) {\n return { type: authConstants.SESSION_REFRESH_REQUEST }\n }\n function success(result) {\n return { type: authConstants.SESSION_REFRESH_SUCCESS, ...result }\n }\n function failure(error) {\n return { type: authConstants.SESSION_REFRESH_FAILURE, error }\n }\n}\n\nexport function loginAs(userId, origin) {\n return dispatch => {\n dispatch(request({ userId }));\n\n authService.loginAs(userId)\n .then(result => {\n dispatch(success(result));\n const path = createPath('/', origin)\n history.push(path);\n })\n .catch(handleError(dispatch, failure))\n };\n\n function request(userId) {\n return { type: authConstants.LOGIN_AS_REQUEST, userId }\n }\n function success(result) {\n return { type: authConstants.LOGIN_AS_SUCCESS, ...result }\n }\n function failure(error) {\n return { type: authConstants.LOGIN_AS_FAILURE, error }\n }\n}\n\n\nexport function resendVerificationEmail(email, origin) {\n return dispatch => {\n dispatch(request());\n authService.resendVerificationEmail(email, origin)\n .then(_ => { \n dispatch(success());\n })\n .catch(handleError(dispatch, failure))\n };\n\n function request() {\n return { type: authConstants.RESEND_VERIF_EMAIL_REQUEST }\n }\n function success() {\n return { type: authConstants.RESEND_VERIF_EMAIL_SUCCEESS }\n }\n function failure(error) {\n return { type: authConstants.RESEND_VERIF_EMAIL_FAILURE, error }\n }\n}\n\nexport function forgotPassword(email, origin) {\n return dispatch => {\n dispatch(request());\n authService.forgotPassword(email, origin)\n .then(_ => { \n dispatch(success());\n })\n .catch(handleError(dispatch, failure))\n };\n\n function request() {\n return { type: authConstants.FORGOT_PASSWORD_REQUEST }\n }\n function success() {\n return { type: authConstants.FORGOT_PASSWORD_SUCCESS }\n }\n function failure(error) {\n return { type: authConstants.FORGOT_PASSWORD_FAILURE, error }\n }\n}\n\nexport function resetPassword(token, password, origin) {\n return dispatch => {\n dispatch(request());\n authService.resetPassword(token, password)\n .then(result => {\n dispatch(success(result));\n const path = createPath('/', origin)\n history.push(path);\n })\n .catch(handleError(dispatch, failure))\n };\n\n function request() {\n return { type: authConstants.RESET_PASSWORD_REQUEST }\n }\n function success(result) {\n return { type: authConstants.RESET_PASSWORD_SUCCESS, ...result }\n }\n function failure(error) {\n return { type: authConstants.RESET_PASSWORD_FAILURE, error }\n }\n}\n\nexport function updatePassword(oldPassword, newPassword) {\n return dispatch => {\n dispatch(request());\n authService.updatePassword(oldPassword, newPassword)\n .then(result => {\n dispatch(success(result));\n })\n .catch(handleError(dispatch, failure))\n };\n\n function request() {\n return { type: authConstants.UPDATE_PASSWORD_REQUEST }\n }\n function success(result) {\n return { type: authConstants.UPDATE_PASSWORD_SUCCESS, ...result }\n }\n function failure(error) {\n return { type: authConstants.UPDATE_PASSWORD_FAILURE, error }\n }\n}\n\nexport function register(full_name, email, password, origin, language) {\n return dispatch => {\n dispatch(request());\n authService.register(full_name, email, password, origin, language)\n .then(result => {\n dispatch(success(result));\n const path = createPath('/pending', origin)\n history.push(path);\n })\n .catch(handleError(dispatch, failure))\n };\n\n function request() {\n return { type: authConstants.REGISTER_REQUEST }\n }\n function success(result) {\n return { type: authConstants.REGISTER_SUCCESS, ...result }\n }\n function failure(error) {\n return { type: authConstants.REGISTER_FAILURE, error }\n }\n}\n\nexport function setLanguage(language) {\n return dispatch => {\n dispatch({type: authConstants.SET_LANGUAGE, language: language});\n };\n}\n","const PROFILE_ROUTE = '/api/v1/users';\n\nfunction getProfile() {\n return fetch(PROFILE_ROUTE + '/me').then(handle);\n}\n\nfunction updateProfile(userId, updateData) {\n const opts = {\n method: 'PATCH',\n headers: {'content-type': 'application/json'},\n body: JSON.stringify(updateData),\n };\n\n return fetch(PROFILE_ROUTE + '/' + userId, opts).then(handle);\n}\n\nfunction updateAvatar(userId, file) {\n const data = new FormData();\n data.append('image', file);\n const opts = {method: 'PUT', body: data};\n return fetch('api/v1/users/avatar', opts).then(handle);\n}\n\nfunction handle(response) {\n if (response.ok) {\n return response.text().then(text => {\n const data = text && JSON.parse(text);\n if(data && data.language){\n window.Localize.setLanguage(data.language);\n if (window.drift && window.drift.config) {\n window.drift.config({\n locale: data.language\n });\n }\n }\n \n return data\n });\n } else {\n return Promise.reject(response);\n }\n}\n\nexport const profileService = {\n getProfile,\n updateProfile,\n updateAvatar,\n};\n","import { profileConstants } from '../_constants';\nimport { profileService } from '../_services/profile';\nimport { handleError } from './handler';\n\nexport function profileClear(){\n return dispatch => {\n dispatch({type: profileConstants.PROFILE_CLEAR});\n };\n};\n\nexport function getProfile() {\n return dispatch => {\n dispatch(request());\n return profileService\n .getProfile()\n .then(profile => dispatch(success(profile)))\n .catch(handleError(dispatch, failure));\n };\n\n function request() {\n return {type: profileConstants.PROFILE_GET_REQUEST};\n }\n\n function success(profile) {\n return {\n type: profileConstants.PROFILE_GET_SUCCESS,\n profile: profile,\n };\n }\n\n function failure(error) {\n return {\n type: profileConstants.PROFILE_GET_FAILURE,\n error,\n };\n }\n};\n\nexport function updateProfile(userId, profileData) {\n return dispatch => {\n dispatch(request());\n return profileService\n .updateProfile(userId, profileData)\n .then(profile => dispatch(success(profile)))\n .catch(handleError(dispatch, failure));\n };\n\n function request() {\n return {type: profileConstants.PROFILE_UPDATE_REQUEST};\n }\n\n function success(profile) {\n return {\n type: profileConstants.PROFILE_UPDATE_SUCCESS,\n ...profile,\n };\n }\n\n function failure(error) {\n return {\n type: profileConstants.PROFILE_UPDATE_FAILURE,\n error,\n };\n }\n};\n\nexport function updateAvatar(userId, file) {\n return dispatch => {\n dispatch({type: profileConstants.PROFILE_AVATAR_REQUEST});\n return profileService\n .updateAvatar(userId, file)\n .then(profile => dispatch(success(profile)))\n .catch(handleError(dispatch, failure));\n }\n\n function success(profile) {\n return {\n type: profileConstants.PROFILE_AVATAR_SUCCESS,\n ...profile,\n };\n }\n\n function failure(error) {\n return {\n type: profileConstants.PROFILE_AVATAR_FAILURE,\n error,\n };\n }\n};\n","import React, { Component } from 'react'\nimport { Route, Redirect } from 'react-router-dom'\nimport { connect } from 'react-redux'\nimport { refreshSession } from '../_actions';\nimport * as qs from 'query-string'\n\nclass PrivateRoute extends Component {\n constructor(props){\n super(props);\n\n this.state = {\n userRefreshed: false\n };\n }\n\n componentDidMount(){\n const self = this;\n this.props.refreshSession()\n .then(function(r){\n self.setState({ userRefreshed: true })\n })\n }\n\n render() {\n\n if(!this.state.userRefreshed){\n return null;\n }\n\n const pendingPath = '/pending'\n\n const parsedQs = qs.parse(this.props.location.search)\n var origin = parsedQs.origin\n\n const from = this.props.location\n\n const { user, session, token_verify } = this.props\n\n // TODO add exiry somehow\n const isExpired = false\n //const isExpired = user && user.exp < current\n \n function createPath(path, origin){\n if (origin){\n return path + '?origin=' + origin;\n }\n\n return path;\n }\n\n // if user is logged in but not verified redirect to pending\n if (user && !user.verified && from.pathname !== pendingPath) {\n const path = createPath('/pending', origin);\n return ;\n }\n\n // if user is logged in and verified and tries to go to pending\n // page, redirect him to homepage\n if (user && user.verified && from.pathname === pendingPath) {\n const path = createPath('/', origin);\n return ;\n }\n\n if (!user || isExpired) {\n // if user is logging out -> redirect to\n // login, but do not save location because\n // we always want to open home page\n // TODO see what to do with this\n /*\n if (this.props.loggingOut) {\n return \n }\n */\n\n // if user paste a url in address bar but was\n // logged out, it will be redirected to login,\n // but in this case after login we want to redirect\n // to that url\n const path = createPath('/login', origin);\n return ;\n }\n\n // if user is logged in and verified and there is origin\n if (user && user.verified && origin && window.location.pathname !== '/loginas') {\n origin += `?session=${session.id}`;\n origin += `&token=${token_verify}`;\n setTimeout(function(){\n window.location.href = origin;\n return null;\n }, 200)\n return null;\n //window.location.assign(origin);\n }\n\n return {this.props.children}\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n loggingOut: state.auth.loggingOut,\n user: state.auth.user,\n session: state.auth.session,\n token_verify: state.auth.token_verify,\n }\n}\n\nconst actionCreators = {\n refreshSession: refreshSession,\n};\n\nexport default connect(\n mapStateToProps,\n actionCreators,\n)(PrivateRoute)\n","import React, { useState, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodash\";\nimport { Localize } from \"react-common/services\";\nimport { LANGUAGES } from \"../_helpers/language\";\nimport { setLanguage } from \"../_actions\";\nimport \"./FormFooter.css\";\n\nconst FormFooter = (props) => {\n const { language, setLanguage, light = false } = props;\n const [isLangDropdownOpen, setIsLangDropdownOpen] = useState(false);\n\n useEffect(() => {\n setLanguage(Localize.getLanguage());\n }, [setLanguage]);\n\n const changeLanguage = (lang) => {\n Localize.setLanguage(lang);\n setLanguage(lang);\n setIsLangDropdownOpen(false);\n };\n\n const renderLangItems = () =>\n Object.keys(LANGUAGES).map((v, k) =>\n v !== language ? (\n
\n {\n changeLanguage(v);\n }}\n >\n {LANGUAGES[v]}\n \n
\n ) : null\n );\n return (\n
\n \n {\n setIsLangDropdownOpen(!isLangDropdownOpen);\n }}\n >\n {_.get(LANGUAGES, language, \"\")}\n {\" \"}\n \n
\n {isLangDropdownOpen && renderLangItems()}\n
\n
\n\n
\n \n Privacy\n \n \n Terms\n \n
\n \n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n language: state.auth.language,\n };\n};\n\nconst actionCreators = {\n setLanguage: setLanguage,\n};\n\nconst FormFooterConnected = connect(\n mapStateToProps,\n actionCreators\n)(FormFooter);\n\nexport default FormFooterConnected;\n","import React, { Component } from \"react\";\nimport { connect } from \"react-redux\";\nimport { userValidator } from \"../_helpers\";\nimport FormFooter from \"../_components/FormFooter\";\n\nclass LoginForm extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n email: \"\",\n password: \"\",\n submitted: false,\n errors: {\n email: \"\",\n password: \"\",\n },\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.onSubmit = this.onSubmit.bind(this);\n this.submitLogin = props.onSubmit;\n }\n\n validate = (field, value) => {\n const validateField = userValidator[field] || (() => \"\");\n const error = validateField(value, false);\n const errors = {\n ...this.state.errors,\n [field]: error,\n };\n\n this.setState({ errors });\n return !error;\n };\n\n validateAll = () => {\n let valid = true;\n for (var field of [\"email\", \"password\"]) {\n if (!this.validate(field, this.state[field])) {\n valid = false;\n }\n }\n\n return valid;\n };\n\n handleChange = (event, checked) => {\n const field = event.target.name;\n const value = event.target.value;\n\n this.setState({\n ...this.state,\n [field]: value,\n });\n\n this.validate(field, value);\n };\n\n onSubmit = () => {\n if (!this.validateAll() || this.props.auth.loggingIn) {\n return;\n }\n this.submitLogin(this.state.email, this.state.password);\n };\n\n render() {\n return (\n
\n
\n
Member Login
\n
\n {this.props.auth.loginError && (\n
\n \n {this.props.auth.loginError}\n
\n )}\n
\n \n\n \n\n \n Forgot password?\n \n
\n \n Login\n \n\n \n
\n );\n }\n}\n\nconst mapStateToProps = ({ auth }) => ({ auth });\n\nconst LoginFormConnected = connect(mapStateToProps, null)(LoginForm);\n\nexport default LoginFormConnected;\n","import React, { Component } from \"react\";\nimport { connect } from \"react-redux\";\nimport { userValidator } from \"../_helpers\";\nimport FormFooter from \"../_components/FormFooter\";\n\nclass RegisterForm extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n full_name: \"\",\n email: \"\",\n password: \"\",\n submitted: false,\n errors: {\n full_name: \"\",\n email: \"\",\n password: \"\",\n },\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.onSubmit = this.onSubmit.bind(this);\n this.submitRegister = props.onSubmit;\n }\n\n validate = (field, value) => {\n const validateField = userValidator[field] || (() => \"\");\n const error = validateField(value, false);\n const errors = {\n ...this.state.errors,\n [field]: error,\n };\n\n this.setState({ errors });\n\n return !!error;\n };\n\n validateAll = () => {\n let valid = true;\n for (var field of [\"full_name\", \"email\", \"password\"]) {\n if (this.validate(field, this.state[field])) {\n valid = false;\n }\n }\n\n return valid;\n };\n\n handleChange = (event, checked) => {\n const field = event.target.name;\n const value = event.target.value;\n\n this.setState({\n ...this.state,\n [field]: value,\n });\n\n this.validate(field, value);\n };\n\n onSubmit = () => {\n if (!this.validateAll() || this.props.auth.registering) {\n return;\n }\n\n this.submitRegister(\n this.state.full_name,\n this.state.email,\n this.state.password,\n this.props.auth.language\n );\n };\n\n onKeyPressHandler = (event) => {\n if (event.key === \"Enter\") {\n this.onSubmit();\n }\n };\n\n render() {\n return (\n
\n
\n
Member Sign Up
\n {/*TODO NAZIV PROIZVODA CE SE MIJENJATI JEDNOM U BUDUCNOSTI*/}\n
to CIAL Dun & Bradstreet C360
\n
\n {this.props.auth.registerError && (\n
\n \n {this.props.auth.registerError}\n
\n )}\n
\n \n {this.state.errors.full_name && (\n
\n {this.state.errors.full_name}\n
\n )}\n \n {this.state.errors.email && (\n
\n {this.state.errors.email}\n
\n )}\n \n {this.state.errors.password && (\n
\n {this.state.errors.password}\n
\n )}\n
\n \n Sign up\n \n\n \n
\n );\n }\n}\n\nconst mapStateToProps = ({ auth }) => ({ auth });\n\nconst RegisterFormConnected = connect(mapStateToProps, null)(RegisterForm);\n\nexport default RegisterFormConnected;\n","import React from \"react\";\nimport { Row, Col, Container } from \"react-bootstrap\";\nimport LoginForm from \"./LoginForm\";\nimport RegisterForm from \"./RegisterForm\";\nimport btnArrow from \"../_images/btn-arrow.svg\";\nimport \"./LoginRegisterMobile.css\";\n\nconst LoginRegisterMobile = ({\n location,\n isRegisterOpen,\n onSwitchHandler,\n onSubmitRegister,\n onSubmitLogin\n}) => {\n return (\n \n \n \n
\n
\n \"Toggle\n
\n
\n
\n \n
\n
Don't have an account?
\n
Sign up
\n
\n
\n
\n \n
\n
Already have an account?
\n
Log in
\n
\n
\n
\n
\n \n
\n
\n );\n};\n\nexport default LoginRegisterMobile;\n","import React, { Component } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Redirect } from \"react-router-dom\";\nimport { login, register, loginRegisterClear } from \"../_actions\";\nimport logo from \"../_images/logo.svg\";\nimport btnArrow from \"../_images/btn-arrow.svg\";\nimport * as qs from \"query-string\";\n\nimport \"./wizard-animation.css\";\nimport \"./LoginRegister.css\";\n\nimport Particles from \"react-particles-js\";\nimport ParticlesConfig from \"../particlesjs-config.json\";\n\nimport LoginForm from \"./LoginForm\";\nimport RegisterForm from \"./RegisterForm\";\nimport LoginRegisterMobile from \"./LoginRegisterMobile\";\n\nclass LoginRegister extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n registerOpen: false\n };\n\n const parsedQs = qs.parse(this.props.location.search);\n this.origin = parsedQs.origin;\n\n this.onSubmitLogin = this.onSubmitLogin.bind(this);\n this.onSubmitRegister = this.onSubmitRegister.bind(this);\n\n this.props.loginRegisterClear();\n }\n\n onSubmitLogin = (email, password) => {\n this.props.login(email, password, this.origin);\n };\n\n onSubmitRegister = (full_name, email, password, language) => {\n this.props.register(full_name, email, password, this.origin, language);\n };\n\n onSwitchHandler = () =>\n this.setState({\n registerOpen: !this.state.registerOpen\n });\n\n render() {\n const { user } = this.props;\n if (user) {\n return (\n \n );\n }\n\n return (\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n \n \n \n
\n \n
\n
\n
\n\n
\n \"CIAL-Logo\"\n \n
Don't have an account?
\n
Sign up
\n
\n\n \n
\n\n
\n \n
Already have an account?
\n
Log in
\n
\n\n \n
\n
\n
\n
\n \n \n \n );\n }\n}\n\nconst mapStateToProps = state => {\n return {\n user: state.auth.user\n };\n};\n\nconst actionCreators = {\n login: login,\n register: register,\n loginRegisterClear: loginRegisterClear\n};\n\nconst LoginRegisterConnected = connect(\n mapStateToProps,\n actionCreators\n)(LoginRegister);\n\nexport default LoginRegisterConnected;\n","import React, { Component } from 'react'\nimport { Redirect } from 'react-router-dom'\nimport * as qs from 'query-string'\nimport { connect } from 'react-redux'\n\nimport { verifyEmail } from '../_actions';\n\nfunction createPath(path, origin){\n if (origin){\n return path + '?origin=' + origin\n }\n\n return path\n}\n\n\nclass VerifyEmail extends Component {\n\n constructor(props){\n super(props)\n\n const parsedQs = qs.parse(this.props.location.search)\n this.token = parsedQs.token\n this.origin = parsedQs.origin\n\n this.state = {\n verifying: true\n }\n }\n\n componentDidMount(){\n const self = this;\n\n const { user } = this.props\n\n if (user && !user.verified){\n this.props.verifyEmail(this.token, this.origin)\n .then(function(r){\n self.setState({ verifying: false })\n })\n .catch(function(){\n self.setState({ verifying: false })\n })\n } else {\n self.setState({ verifying: false })\n }\n }\n\n render() {\n if (this.state.verifying) {\n return null;\n }\n\n return \n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n loggingOut: state.auth.loggingOut,\n user: state.auth.user\n }\n}\n\nconst actionCreators = {\n verifyEmail: verifyEmail\n};\n\nexport default connect(\n mapStateToProps,\n actionCreators,\n)(VerifyEmail)\n","import { Component } from 'react'\nimport * as qs from 'query-string'\nimport { connect } from 'react-redux'\nimport { loginAs } from '../_actions';\n\nclass LoginAs extends Component {\n\n constructor(props){\n super(props)\n\n const parsedQs = qs.parse(this.props.location.search)\n const userId = parsedQs.user_id\n const origin = parsedQs.origin\n\n this.props.loginAs(userId, origin)\n }\n\n render() {\n return null;\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n user: state.auth.user\n }\n}\n\nconst actionCreators = {\n loginAs: loginAs\n};\n\nexport default connect(\n mapStateToProps,\n actionCreators,\n)(LoginAs)\n","import { Component } from 'react'\nimport * as qs from 'query-string'\nimport { connect } from 'react-redux'\nimport { history } from '../_helpers';\nimport { logout } from '../_actions';\n\nclass Logout extends Component {\n\n constructor(props){\n super(props)\n\n const parsedQs = qs.parse(this.props.location.search)\n this.origin = parsedQs.origin\n\n const { user } = this.props\n\n if (user){\n this.props.logout()\n }\n }\n\n render() {\n const { user } = this.props\n if (!user){\n if (this.origin){\n return window.location.assign(this.origin);\n } else {\n history.push('/');\n }\n } \n\n return null;\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n user: state.auth.user\n }\n}\n\nconst actionCreators = {\n logout: logout\n};\n\nexport default connect(\n mapStateToProps,\n actionCreators,\n)(Logout)\n","import React, { Component } from \"react\";\nimport { connect } from \"react-redux\";\nimport * as qs from \"query-string\";\nimport Particles from \"react-particles-js\";\nimport FormFooter from \"../_components/FormFooter\";\nimport logo from \"../_images/logo.svg\";\nimport \"./RegisterPending.css\";\nimport {\n logout,\n resendVerificationEmail,\n resendVerifyClear\n} from \"../_actions\";\nimport ParticlesConfig from \"../particlesjs-config.json\";\n\nclass RegisterPending extends Component {\n constructor(props) {\n super(props);\n this.state = {};\n\n this.onClick = this.onClick.bind(this);\n this.onSubmit = this.onSubmit.bind(this);\n\n const parsedQs = qs.parse(this.props.location.search);\n this.origin = parsedQs.origin;\n\n this.props.resendVerifyClear();\n }\n\n onClick = e => {\n e.preventDefault();\n this.props.logout();\n };\n\n onSubmit = () => {\n if (this.props.auth.resendingVerify) {\n return;\n }\n this.props.resendVerificationEmail(this.props.auth.user.email, this.origin);\n };\n\n render() {\n return (\n
\n
\n \n
\n\n
\n
\n
\n
\n
\n
\n
\n \n \n \n
\n
\n\n
\n
\n \"CIAL-Logo\"\n\n
\n
You are almost there...
\n
Verify Email
\n
\n
\n
\n\n
\n
\n
\n
Welcome to CIAL!
\n
\n Before we get started, please check your email and\n click the link to verify your account\n
\n
Didn't get the email?
\n
\n {this.props.auth.resendingVerifyError && (\n \n \n {this.props.auth.resendingVerifyError}\n
\n )}\n {this.props.auth.resendingVerifySuccess && (\n \n \n {this.props.auth.resendingVerifySuccess}\n
\n )}\n\n \n Resend Email\n \n\n \n\n
\n \n Sign up\n \n with different email\n
\n
\n
\n
\n
\n
\n
\n \n \n );\n }\n}\n\nconst mapStateToProps = state => {\n return { auth: state.auth };\n};\n\nconst actionCreators = {\n logout: logout,\n resendVerificationEmail: resendVerificationEmail,\n resendVerifyClear: resendVerifyClear\n};\n\nconst RegisterPendingConnected = connect(\n mapStateToProps,\n actionCreators\n)(RegisterPending);\n\nexport default RegisterPendingConnected;\n","import React, { Component } from 'react'\nimport { connect } from 'react-redux';\nimport { Tooltip, OverlayTrigger } from \"react-bootstrap\";\nimport logo from '../../_images/logo-circle.svg';\nimport { Link } from 'react-router-dom';\nimport './Sidebar.css';\n\nclass Sidebar extends Component {\n constructor(props) {\n super(props);\n\n function getSelected(path){\n if (path === '/'){\n return 'personal'\n }\n\n if (path === '/security'){\n return 'security'\n }\n }\n\n this.state = {\n selected: getSelected(this.props.pathname),\n };\n }\n\n render() {\n return (\n
\n\n
\n\n \"logo\"/\n\n
\n Personal info}>\n \n \n \n \n\n {this.state.selected === 'personal' && (\n
\n )}\n\n
\n\n
\n \n Security\n \n }\n >\n \n \n \n \n\n {this.state.selected === 'security' && (\n
\n )}\n
\n
\n
\n )\n }\n}\n\nconst mapStateToProps = (state) => {\n return { pathname: state.router.location.pathname }\n}\n\nexport default connect(\n mapStateToProps,\n {},\n)(Sidebar)\n","import React, { Component } from 'react'\nimport { connect } from 'react-redux';\nimport { logout, getProfile } from '../../_actions';\nimport { Dropdown } from \"react-bootstrap/\";\nimport './Header.css';\n\n\nclass Header extends Component {\n constructor(props) {\n super(props);\n this.state = {profile: null};\n }\n\n componentDidMount(){\n this\n .props\n .getProfile()\n .then(r => this.setState({profile: {...this.props.profile}}));\n }\n\n render() {\n if (!this.state.profile) {\n return null;\n }\n\n return (\n
\n
\n\n \n \n
\n \n
\n {this.state.profile.profile.name}\n \n
\n\n \n Log out\n \n
\n
\n
\n );\n }\n}\n\nconst actionCreators = {\n logout: logout,\n getProfile: getProfile,\n};\n\nconst mapStateToProps = (state) => {\n return {\n user: state.auth.user,\n profile: state.profile,\n };\n}\n\nexport default connect(\n mapStateToProps,\n actionCreators,\n)(Header);\n","import React, { Component } from 'react';\nimport Sidebar from \"../Sidebar/Sidebar.js\";\nimport Header from \"../Header/Header\";\n\nclass AppWrapper extends Component {\n render() {\n return (\n
\n \n
\n
\n
\n {this.props.children}\n
\n
\n
\n );\n }\n}\n\nexport default AppWrapper;\n","import _ from \"lodash\";\nimport React from \"react\";\nimport { connect } from \"react-redux\";\nimport \"react-phone-number-input/style.css\";\nimport PhoneInput from \"react-phone-number-input\";\nimport { default as phoneLocalEn } from \"react-phone-number-input/locale/en\";\nimport { default as phoneLocalEs } from \"react-phone-number-input/locale/es\";\nimport { default as phoneLocalPt } from \"react-phone-number-input/locale/pt\";\nimport { Form } from \"react-bootstrap\";\nimport { BounceLoader } from \"react-spinners\";\nimport { profileValidator } from \"../_helpers\";\nimport { LANGUAGES, getLanguageName } from \"../_helpers/language\";\nimport { getProfile, updateProfile, updateAvatar } from \"../_actions\";\nimport AppWrapper from \"../_components/AppWrapper/AppWrapper.js\";\nimport \"./HomePage.css\";\n\nconst languageMapping = {\n en: phoneLocalEn,\n es: phoneLocalEs,\n 'pt-BR': phoneLocalPt\n};\n\nclass HomePage extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n profile: null,\n avatarLoading: false,\n errors: { name: \"\", phone: \"\" }\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n this.handleAvatarClick = this.handleAvatarClick.bind(this);\n this.handleAvatarUpload = this.handleAvatarUpload.bind(this);\n }\n\n componentDidMount() {\n this.props.getProfile().then(r => {\n this.setState({ profile: { ...this.props.profile.profile } });\n });\n }\n\n componentDidUpdate() {\n if (this.state.avatarLoading && !this.props.profile.updatingProfile) {\n this.setState({\n avatarLoading: false\n });\n }\n }\n\n validate = (field, value) => {\n const validateField = profileValidator[field] || (() => \"\");\n const error = validateField(value, false);\n const errors = {\n ...this.state.errors,\n [field]: error\n };\n\n this.setState({ errors });\n return !error;\n };\n\n validateAll = () => {\n let valid = true;\n for (var field of [\"name\", \"phone\"]) {\n if (!this.validate(field, this.state[\"profile\"][field])) {\n valid = false;\n break;\n }\n }\n\n return valid;\n };\n\n handleChange = (field, value) => {\n const profile = { ...this.state.profile };\n profile[field] = value;\n this.setState({ profile });\n this.validate(field, value);\n };\n\n handleChangeDefault = event => {\n const field = event.target.name;\n const value = event.target.value;\n this.handleChange(field, value);\n };\n\n handlePhoneChange = value => {\n this.handleChange(\"phone\", value);\n };\n\n handleSubmit = event => {\n event.preventDefault();\n if (!this.validateAll() || this.props.profile.updateProfile) {\n return;\n }\n\n this.props.updateProfile(\n this.state.profile.id,\n _.pick(this.state.profile, [\"name\", \"phone\", \"language\"])\n );\n };\n\n /* When clicking on avatar, emulate a click on the hidden file input instead. */\n handleAvatarClick = event => {\n this.refs.avatarBrowse.click();\n };\n\n /* Set a chosen avatar as soon as it is selected. */\n handleAvatarUpload = event => {\n event.preventDefault();\n\n const file = this.refs.avatarBrowse.files[0];\n if (file) {\n this.setState({\n avatarLoading: true\n });\n this.props.updateAvatar(this.state.profile.id, file);\n }\n };\n\n render() {\n if (!this.state.profile) {\n return null;\n }\n\n return (\n \n
\n
Personal Info
\n\n
\n
\n
\n
\n
Profile
\n\n
\n \n
\n \n \n
\n \n
\n
\n \n \n
\n
\n
\n\n
\n \n
\n \n
\n
\n\n {this.state.errors.name && (\n
\n {this.state.errors.name}\n
\n )}\n\n
\n \n
\n \n
\n
\n\n
\n \n
\n \n
\n
\n\n
\n \n
\n \n {Object.keys(LANGUAGES).map(lang => {\n return (\n \n );\n })}\n \n
\n
\n\n
\n
\n \n Update changes\n \n
\n
\n\n {this.props.profile.updateProfileError && (\n \n \n {this.props.profile.updateProfileError}\n
\n )}\n\n {this.props.profile.updateProfileSuccess && (\n \n \n {this.props.profile.updateProfileSuccess}\n
\n )}\n
\n
\n \n \n \n
\n );\n }\n}\n\nconst actionCreators = {\n getProfile: getProfile,\n updateProfile: updateProfile,\n updateAvatar: updateAvatar\n};\n\nconst mapStateToProps = state => {\n return {\n user: state.auth.user,\n profile: state.profile\n };\n};\n\nexport default connect(mapStateToProps, actionCreators)(HomePage);\n","import React from \"react\";\nimport { connect } from \"react-redux\";\nimport * as qs from \"query-string\";\nimport Particles from \"react-particles-js\";\nimport FormFooter from \"../_components/FormFooter\";\nimport logo from \"../_images/logo.svg\";\nimport { userValidator } from \"../_helpers\";\nimport { forgotPassword, forgotPasswordClear } from \"../_actions/auth\";\nimport ParticlesConfig from \"../particlesjs-config.json\";\nimport \"./ForgotPassword.css\";\n\nclass ForgotPassword extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n email: \"\",\n errors: {\n email: \"\",\n },\n };\n\n const parsedQs = qs.parse(this.props.location.search);\n this.origin = parsedQs.origin;\n\n this.handleChange = this.handleChange.bind(this);\n this.onSubmit = this.onSubmit.bind(this);\n\n this.props.forgotPasswordClear();\n }\n\n validate = (field, value) => {\n const validateField = userValidator[field] || (() => \"\");\n const error = validateField(value, false);\n const errors = {\n ...this.state.errors,\n [field]: error,\n };\n\n this.setState({ errors });\n\n return !error;\n };\n\n validateAll = () => {\n let valid = true;\n for (var field of [\"email\"]) {\n if (!this.validate(field, this.state[field])) {\n valid = false;\n }\n }\n\n return valid;\n };\n\n handleChange = (event, checked) => {\n const field = event.target.name;\n const value = event.target.value;\n\n this.setState({\n ...this.state,\n [field]: value,\n });\n\n this.validate(field, value);\n };\n\n onSubmit = () => {\n if (!this.validateAll() || this.props.auth.sendingForgotPassword) {\n return;\n }\n\n this.props.forgotPassword(this.state.email, this.origin);\n };\n\n onKeyPressHandler = (event) => {\n if (event.key === \"Enter\") {\n this.onSubmit();\n }\n };\n\n render() {\n return (\n
\n
\n \n
\n\n
\n
\n
\n
\n
\n
\n
\n \n \n \n
\n
\n\n
\n
\n \"CIAL-Logo\"\n\n
\n
Forgot password?
\n
\n
\n
\n\n
\n
\n
\n
Reset your password
\n
\n You will receive a link to reset your password\n
\n
\n\n {this.props.auth.forgotPasswordError && (\n \n \n {this.props.auth.forgotPasswordError}\n
\n )}\n {this.props.auth.forgotPasswordSuccess && (\n \n \n {this.props.auth.forgotPasswordSuccess}\n
\n )}\n
\n \n {this.state.errors.email && (\n
\n {this.state.errors.email}\n
\n )}\n
\n \n Reset Password\n \n\n \n\n
\n or \n Log in\n
\n
\n
\n
\n
\n
\n
\n \n \n );\n }\n}\n\nconst mapStateToProps = ({ auth }) => ({ auth });\n\nconst actionCreators = {\n forgotPassword: forgotPassword,\n forgotPasswordClear: forgotPasswordClear,\n};\n\nconst ForgotPasswordConnected = connect(\n mapStateToProps,\n actionCreators\n)(ForgotPassword);\n\nexport default ForgotPasswordConnected;\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { userValidator } from '../_helpers';\nimport { updatePassword, updatePasswordClear } from '../_actions';\nimport AppWrapper from '../_components/AppWrapper/AppWrapper.js'\nimport './Security.css';\n\nclass Security extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n password: null,\n newPassword: null,\n newPasswordConfirm: null,\n errors: {\n oldPassword: '',\n newPassword: '',\n newPasswordConfirm: ''\n }\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n this.props.updatePasswordClear()\n }\n\n validatePasswordConfirmed = (value) => {\n value = value || this.state.newPasswordConfirm\n let errors = {\n ...this.state.errors,\n newPasswordConfirm: ''\n }\n if (this.state.newPassword !== value) {\n errors.newPasswordConfirm = 'Passwords do not match'\n }\n\n this.setState({ errors })\n\n return !errors.newPasswordConfirm\n }\n\n validatePassword = (field, value) => {\n const validateField = userValidator['password'] || (() => '')\n const error = validateField(value, false)\n const errors = {\n ...this.state.errors,\n [field]: error\n }\n\n this.setState({ errors }, this.validatePasswordConfirmed)\n return !error\n }\n\n validate = (field, value) => {\n if (field === 'newPasswordConfirm'){\n return this.validatePasswordConfirmed(value)\n }\n\n if (field === 'newPassword'){\n return this.validatePassword(field, value)\n }\n\n return this.validatePassword(field, value)\n }\n\n validateAll = () => {\n let valid = true\n for (var field of ['oldPassword', 'newPassword', 'newPasswordConfirm']){\n if (!this.validate(field, this.state[field])){\n valid = false\n }\n }\n\n return valid\n }\n\n handleChange = (event) => {\n const field = event.target.name\n const value = event.target.value\n this.setState({ ...this.state, [field]: value })\n this.validate(field, value)\n }\n\n handleSubmit = (event) => {\n event.preventDefault()\n if (!this.validateAll() || this.props.auth.updatingPassword) {\n return\n }\n\n this.props.updatePassword(this.state.oldPassword, this.state.newPassword)\n }\n\n render(){\n return (\n\n\n \n
\n\n
\n Security\n
\n\n
\n
\n
\n
\n
\n Change password\n
\n\n\n\n\n
\n \n\n
\n \n {this.state.errors.oldPassword && (\n
\n {this.state.errors.oldPassword}\n
\n )}\n
\n\n
\n\n
\n \n\n
\n \n {this.state.errors.newPassword && (\n
\n {this.state.errors.newPassword}\n
\n )}\n
\n\n
\n\n\n\n
\n \n\n
\n \n {this.state.errors.newPasswordConfirm && (\n
\n {this.state.errors.newPasswordConfirm}\n
\n )}\n
\n\n
\n\n
\n
\n \n
\n
\n {this.props.auth.updatePasswordError && (\n
\n \n {this.props.auth.updatePasswordError}\n
\n )}\n {this.props.auth.updatePasswordSuccess && (\n
\n \n {this.props.auth.updatePasswordSuccess}\n
\n )}\n
\n
\n
\n
\n
\n
\n );\n }\n}\n \nconst actionCreators = {\n updatePassword: updatePassword,\n updatePasswordClear: updatePasswordClear,\n};\n\nconst mapStateToProps = (state) => {\n return { auth: state.auth }\n}\n\nexport default connect(\n mapStateToProps,\n actionCreators,\n)(Security)\n","import React from \"react\";\nimport { connect } from \"react-redux\";\nimport * as qs from \"query-string\";\nimport Particles from \"react-particles-js\";\nimport FormFooter from \"../_components/FormFooter\";\nimport logo from \"../_images/logo.svg\";\nimport { userValidator } from \"../_helpers\";\nimport { resetPassword, resetPasswordClear } from \"../_actions\";\nimport ParticlesConfig from \"../particlesjs-config.json\";\nimport \"./ForgotPassword.css\";\n\nclass ResetPassword extends React.Component {\n constructor(props) {\n super(props);\n\n const parsedQs = qs.parse(this.props.location.search);\n this.token = parsedQs.token;\n this.origin = parsedQs.origin;\n\n this.state = {\n password: \"\",\n passwordRepeat: \"\",\n errors: {\n password: \"\",\n passwordRepeat: \"\"\n }\n };\n\n this.props.resetPasswordClear();\n }\n\n validate = (field, value) => {\n let error = \"\";\n\n if (field === \"passwordRepeat\") {\n const validateField = userValidator[field] || (() => \"\");\n error = validateField(value, false);\n if (!error && this.state.password !== value) {\n error = \"Passwords do not match\";\n }\n } else {\n const validateField = userValidator[field] || (() => \"\");\n error = validateField(value, false);\n }\n\n const errors = {\n ...this.state.errors,\n [field]: error\n };\n\n this.setState({ errors });\n\n return !error;\n };\n\n validateAll = () => {\n let valid = true;\n for (var field of [\"password\", \"passwordRepeat\"]) {\n if (!this.validate(field, this.state[field])) {\n valid = false;\n }\n }\n\n return valid;\n };\n\n handleChange = (event, checked) => {\n const field = event.target.name;\n const value = event.target.value;\n\n this.setState({\n ...this.state,\n [field]: value\n });\n\n this.validate(field, value);\n };\n\n onSubmit = () => {\n if (!this.validateAll() || this.props.auth.changingPassword) {\n return;\n }\n\n this.props.resetPassword(this.token, this.state.password, this.origin);\n };\n\n render() {\n return (\n
\n
\n \n
\n\n
\n
\n
\n
\n
\n
\n
\n \n \n \n
\n
\n\n
\n
\n \"CIAL-Logo\"\n\n
\n
Change password
\n
\n
\n
\n\n
\n
\n
\n
Change password
\n
\n
\n\n {this.props.auth.resetPasswordError && (\n \n \n {this.props.auth.resetPasswordError}\n
\n )}\n\n
\n \n {this.state.errors.password && (\n
\n {this.state.errors.password}\n
\n )}\n \n {this.state.errors.passwordRepeat && (\n
\n {this.state.errors.passwordRepeat}\n
\n )}\n
\n \n Change Password\n \n\n \n\n
\n or \n \n Log in\n \n
\n
\n
\n
\n
\n
\n
\n
\n \n );\n }\n}\n\nconst mapStateToProps = ({ auth }) => ({ auth });\n\nconst actionCreators = {\n resetPassword: resetPassword,\n resetPasswordClear: resetPasswordClear\n};\n\nexport default connect(mapStateToProps, actionCreators)(ResetPassword);\n","import React from 'react';\nimport { Router, Route, Switch, Redirect } from 'react-router-dom';\nimport { history } from '../_helpers';\nimport PrivateRoute from '../_components/PrivateRoute';\nimport LoginRegister from '../LoginRegister/LoginRegister';\nimport VerifyEmail from '../_components/VerifyEmail';\nimport LoginAs from '../_components/LoginAs';\nimport Logout from '../_components/Logout';\nimport RegisterPending from '../RegisterPending/RegisterPending';\nimport HomePage from '../HomePage/HomePage';\nimport ForgotPassword from '../ForgotPassword/ForgotPassword';\nimport Security from '../Security/Security';\nimport ResetPassword from '../ForgotPassword/ResetPassword';\n\nclass App extends React.Component {\n render() {\n return (\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n );\n }\n}\n\nexport default App;\n\n","import { authConstants } from '../_constants';\n\nconst initialState = {\n user: null,\n loggingIn: false,\n registering: false,\n verifying: false,\n resendingVerify: false,\n sendingForgotPassword: false,\n changingPassword: false,\n updatingPassword: false,\n loggedIn: false,\n loginError: '',\n logoutError: '',\n registerError: '',\n resendingVerifyError: '',\n resendingVerifySuccess: '',\n verifyEmailError: '',\n forgotPasswordError: '',\n forgotPasswordSuccess: '',\n resetPasswordError: '',\n updatePasswordError: '',\n updatePasswordSuccess: '',\n language: 'en'\n}\n\n\nexport function authReducer(state = initialState, action) {\n switch (action.type) {\n case authConstants.LOGIN_REGISTER_CLEAR:\n return {\n ...state,\n loggingIn: false,\n registering: false,\n loginError: '',\n registerError: ''\n }\n case authConstants.LOGIN_REQUEST:\n return {\n ...state,\n loggingIn: true,\n loginError: ''\n }\n case authConstants.LOGIN_SUCCESS:\n return {\n ...state,\n user: action.user,\n session: action.session,\n token_verify: action.token_verify,\n loggingIn: false,\n loginError: ''\n }\n case authConstants.LOGIN_FAILURE:\n return {\n ...state,\n loggingIn: false,\n loginError: 'Login failed',\n }\n case authConstants.LOGIN_AS_REQUEST:\n return {\n ...state\n }\n case authConstants.LOGIN_AS_SUCCESS:\n return {\n ...state,\n user: action.user,\n session: action.session,\n token_verify: action.token_verify,\n loggingIn: false,\n loginError: ''\n }\n case authConstants.LOGIN_AS_FAILURE:\n return {\n ...state\n }\n case authConstants.LOGOUT_REQUEST:\n return {\n ...state,\n logoutError: ''\n }\n case authConstants.LOGOUT_SUCCESS:\n return {\n ...state,\n user: null,\n logoutError: ''\n }\n case authConstants.LOGOUT_FAILURE:\n return {\n ...state,\n logoutError: 'Logout failed'\n }\n case authConstants.REGISTER_REQUEST:\n return {\n ...state,\n registering: true,\n registerError: ''\n }\n case authConstants.REGISTER_SUCCESS:\n const user_reg = action.user;\n\n return {\n ...state,\n user: user_reg,\n session: action.session,\n token_verify: action.token_verify,\n registering: false,\n registerError: '',\n }\n case authConstants.REGISTER_FAILURE:\n return {\n ...state,\n registering: false,\n registerError: 'Sign up failed',\n }\n case authConstants.VERIFY_EMAIL_REQUEST:\n return {\n ...state,\n verifying: true\n }\n case authConstants.VERIFY_EMAIL_SUCCESS:\n return {\n ...state,\n user: action.user,\n session: action.session,\n token_verify: action.token_verify,\n verifyEmailError: ''\n }\n case authConstants.VERIFY_EMAIL_FAILURE:\n return {\n ...state,\n verifyEmailError: 'Verify email failure'\n }\n case authConstants.RESEND_VERIF_EMAIL_CLEAR:\n return {\n ...state,\n resendingVerify: false,\n resendingVerifyError: '',\n resendingVerifySuccess: ''\n }\n case authConstants.RESEND_VERIF_EMAIL_REQUEST:\n return {\n ...state,\n resendingVerify: true,\n resendingVerifyError: '',\n resendingVerifySuccess: ''\n }\n case authConstants.RESEND_VERIF_EMAIL_SUCCEESS:\n return {\n ...state,\n resendingVerify: false,\n resendingVerifyError: '',\n resendingVerifySuccess: 'New verification email has been sent'\n }\n case authConstants.RESEND_VERIF_EMAIL_FAILURE:\n return {\n ...state,\n resendingVerify: false,\n resendingVerifyError: 'Sending verification email failed',\n resendingVerifySuccess: ''\n }\n case authConstants.FORGOT_PASSWORD_CLEAR:\n return {\n ...state,\n sendingForgotPassword: false,\n forgotPasswordError: '',\n forgotPasswordSuccess: ''\n }\n case authConstants.FORGOT_PASSWORD_REQUEST:\n return {\n ...state,\n sendingForgotPassword: true,\n forgotPasswordError: '',\n forgotPasswordSuccess: ''\n }\n case authConstants.FORGOT_PASSWORD_SUCCESS:\n return {\n ...state,\n sendingForgotPassword: false,\n forgotPasswordError: '',\n forgotPasswordSuccess: \"If you have an account, we'll email you a reset link\"\n }\n // TODO ZA FORGOT PASS FAILURE DODAT ALERT FAILED MESSAGE SAMO U SLUCAJU DA JE NESTO SA SERVEROM A NE AKO UNESE KRIVI EMAIL S KOJIM SE NEMA ACCOUNT\n\n case authConstants.FORGOT_PASSWORD_FAILURE:\n return {\n ...state,\n sendingForgotPassword: false,\n forgotPasswordError: 'Error occured while processing request',\n forgotPasswordSuccess: '',\n }\n case authConstants.RESET_PASSWORD_CLEAR:\n return {\n ...state,\n changingPassword: false,\n resetPasswordError: ''\n }\n case authConstants.RESET_PASSWORD_REQUEST:\n return {\n ...state,\n changingPassword: true,\n resetPasswordError: ''\n }\n case authConstants.RESET_PASSWORD_SUCCESS:\n return {\n ...state,\n user: action.user,\n session: action.session,\n token_verify: action.token_verify,\n changingPassword: false,\n resetPasswordError: ''\n }\n case authConstants.RESET_PASSWORD_FAILURE:\n return {\n ...state,\n changingPassword: false,\n resetPasswordError: 'Error occured while processing request'\n }\n case authConstants.UPDATE_PASSWORD_CLEAR:\n return {\n ...state,\n updatingPassword: false,\n updatePasswordError: '',\n updatePasswordSuccess: ''\n }\n case authConstants.UPDATE_PASSWORD_REQUEST:\n return {\n ...state,\n updatingPassword: true,\n updatePasswordError: '',\n updatePasswordSuccess: ''\n }\n case authConstants.UPDATE_PASSWORD_SUCCESS:\n return {\n ...state,\n updatingPassword: false,\n updatePasswordError: '',\n updatePasswordSuccess: 'Password updated successfully'\n }\n case authConstants.UPDATE_PASSWORD_FAILURE:\n return {\n ...state,\n updatingPassword: false,\n updatePasswordError: 'Error in updating password',\n updatePasswordSuccess: ''\n }\n case authConstants.SESSION_REFRESH_SUCCESS:\n return {\n ...state,\n session: action.session,\n token_verify: action.token_verify\n }\n case authConstants.SET_LANGUAGE:\n return {\n ...state,\n language: action.language\n }\n default:\n return state\n }\n}\n","import { profileConstants } from '../_constants';\n\nconst initialState = {\n profile: null,\n updatingProfile: false,\n updateProfileError: '',\n updateProfileSuccess: ''\n};\n\n/* Stores a URL to the last user's avatar. */\nlet lastAvatarUrl = null;\n\n/* The browser caches the avatar so it won't update by default. After each\nupload, force the URL to change by supplying a different query param. */\nfunction getAvatarUrl(userId) {\n const baseUrl = `api/v1/users/${userId}/avatar`;\n return baseUrl + `?${new Date().getTime()}`;\n}\n\n/* Adds an avatar URL to the profile state. */\nfunction withAvatarUrl(profile, refresh = false) {\n if (refresh || !lastAvatarUrl) {\n lastAvatarUrl = getAvatarUrl(profile.id);\n }\n return {...profile, avatarUrl: lastAvatarUrl};\n}\n\nexport function profileReducer(state = initialState, action) {\n switch (action.type) {\n case profileConstants.PROFILE_CLEAR:\n return {\n ...state,\n updatingProfile: false,\n updateProfileError: '',\n updateProfileSuccess: ''\n };\n\n case profileConstants.PROFILE_GET_SUCCESS:\n return {\n ...state,\n profile: withAvatarUrl(action.profile),\n updateProfileError: '',\n updateProfileSuccess: '',\n };\n\n case profileConstants.PROFILE_UPDATE_REQUEST:\n return {\n ...state,\n updatingProfile: true,\n updateProfileError: '',\n updateProfileSuccess: '',\n };\n\n case profileConstants.PROFILE_UPDATE_SUCCESS:\n return {\n ...state,\n profile: withAvatarUrl(action.profile),\n updatingProfile: false,\n updateProfileError: '',\n updateProfileSuccess: 'Profile updated successfully'\n };\n\n case profileConstants.PROFILE_UPDATE_FAILURE:\n return {\n ...state,\n updatingProfile: false,\n updateProfileError: 'Updating profile failed',\n updateProfileSuccess: ''\n };\n\n case profileConstants.PROFILE_AVATAR_REQUEST:\n return {\n ...state,\n updatingProfile: true,\n updateProfileError: '',\n updateProfileSuccess: '',\n };\n\n /* Avatar upload success, force refresh the avatar url. */\n case profileConstants.PROFILE_AVATAR_SUCCESS:\n return {\n ...state,\n updatingProfile: false,\n updateProfileSuccess: 'Profile picture updated successfully',\n updateProfileError: '',\n profile: withAvatarUrl(state.profile, true),\n };\n\n /* Avatar upload failed -- notify the user and keep the last one. */\n case profileConstants.PROFILE_AVATAR_FAILURE:\n return {\n ...state,\n updatingProfile: false,\n updateProfileSuccess: '',\n updateProfileError: 'Updating the profile picture failed',\n };\n\n default:\n return state;\n }\n}\n","import { combineReducers } from 'redux';\nimport { authReducer } from './auth';\nimport { profileReducer } from './profile';\nimport { connectRouter } from 'connected-react-router';\nimport { persistReducer } from 'redux-persist'\nimport storage from 'redux-persist/lib/storage'\n\n// TODO add persistReducer for auth\nconst rootReducer = history => combineReducers({\n //auth: authReducer,\n auth: persistReducer({ key: 'auth', storage }, authReducer),\n profile: profileReducer,\n router: connectRouter(history)\n});\n\nexport default rootReducer;\n","import { createStore, applyMiddleware } from 'redux';\nimport { routerMiddleware } from 'connected-react-router';\nimport thunkMiddleware from 'redux-thunk';\nimport logger from 'redux-logger';\nimport { persistStore } from 'redux-persist'\nimport rootReducer from './_reducers';\n\nvar store = null;\n\nexport function getToken() {\n if(!store || !store.getState()){\n return null;\n }\n return store.getState().auth.token;\n}\n\nexport function configureStore(initialState = {}, history) {\n const middleware = [];\n\n middleware.push(routerMiddleware(history));\n middleware.push(thunkMiddleware);\n\n if (process.env.NODE_ENV === 'development') {\n middleware.push(logger)\n }\n\n // TODO is this needed\n //const reducers = connectRouter(history)(rootReducer);\n\n store = createStore(\n rootReducer(history),\n initialState,\n applyMiddleware(...middleware)\n );\n\n return { store, persistor: persistStore(store) }\n}\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { ConnectedRouter } from 'connected-react-router';\nimport { Provider } from 'react-redux';\nimport { PersistGate } from 'redux-persist/integration/react'\nimport 'open-sans-all';\nimport './_css/fontello.css';\nimport 'bootstrap/dist/css/bootstrap.min.css';\nimport './index.css';\nimport App from './App/App';\nimport { configureStore } from './configureStore';\nimport * as serviceWorker from './serviceWorker';\nimport { history } from './_helpers';\n\n\nconst initialState = {};\nconst { store, persistor } = configureStore(initialState, history)\n\nReactDOM.render(\n \n \n \n \n \n \n ,\n document.getElementById('root')\n);\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","/*\n * Language descriptions in their own language.\n *\n * The first language is also the default one.\n */\nexport const LANGUAGES = {\n en: \"English\",\n es: \"Español\",\n \"pt-BR\": \"Português\"\n};\n\n/*\n * Get a language's description in that very language.\n */\nexport function getLanguageName(lang) {\n return LANGUAGES[lang] || lang;\n}\n\n/*\n * Get the first browser's preferred language that is also a supported one,\n * defaulting to 'en-US' if none match.\n */\nexport function getLanguage() {\n let languages = [];\n\n // Modern browsers provide the entire list of preferred languages.\n if (navigator.languages) {\n languages = languages.concat(navigator.languages);\n }\n\n // Older ones only provide only the UI's language, which is an ok proxy.\n if (navigator.language) {\n languages.push(navigator.language);\n }\n\n for (let lang of languages) {\n if (LANGUAGES[lang]) {\n return lang;\n }\n }\n\n // Fallback.\n for (let lang in LANGUAGES) {\n return lang;\n }\n}\n","module.exports = __webpack_public_path__ + \"static/media/logo.dfd779b0.svg\";","module.exports = __webpack_public_path__ + \"static/media/btn-arrow.43605f9c.svg\";"],"sourceRoot":""}