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AfiC,EAAMjC,KAClDgJ,EAAU,sCACiB,sBAAlB/G,EAAM+G,UACfA,EAAU,yDAEZf,EAAU,CAAEjD,MAAO,mBAAoB+D,YAAaC,IACpDhC,GAASG,EAAAA,EAAAA,KAAW,GACtB,GAqByGhF,SAC9FvB,IAAA,IAAC,cAAEsC,GAAetC,EAAA,OACjBsB,EAAAA,EAAAA,MAACiB,EAAAA,GAAI,CAACf,UAAWC,GAAeF,SAAA,EAC9BG,EAAAA,EAAAA,KAAA,OAAKF,UAAWC,GAAcF,UAC5BG,EAAAA,EAAAA,KAACc,EAAAA,GAAQ,CAACC,SAAUH,EAAeI,OAAQA,GAAQC,OAAQC,EAAAA,QAE7DtB,EAAAA,EAAAA,MAAA,OAAKE,UAAWC,GAAyBF,SAAA,EACvCG,EAAAA,EAAAA,KAAA,QAAMF,UAAS,uBAAAG,OAAyBF,IAAkBqB,QAAS2F,EAAelH,SAAC,gCAInFG,EAAAA,EAAAA,KAACmB,EAAAA,GAAM,CAACE,OAAO,UAAU8D,KAAK,SAAQtF,SAAC,2BAIpC,KAGXD,EAAAA,EAAAA,MAAA,OAAKE,UAAWC,GAAoBF,SAAA,EAClCD,EAAAA,EAAAA,MAAA,QAAME,UAAU,cAAaD,SAAA,CAAC,sCAE5BG,EAAAA,EAAAA,KAAA,UAAQF,UAAS,WAAAG,OAAaF,IAAoBqB,QAlC3C+F,KACnBP,EAASQ,EAAAA,EAAMC,OAAO,EAiC8DxH,SAAC,sBAI3EG,EAAAA,EAAAA,KAAA,QAAMF,UAAWC,iBAKzBC,EAAAA,EAAAA,KAAA,OAAKF,UAAWC,OACZ,C","sources":["webpack://melo-app/./src/pages/landing/SignIn/ForgotPassword/ForgotPassword.module.scss?c427","webpack://melo-app/./src/pages/landing/SignIn/ForgotPassword/FormCodePassword/FormCodePassword.module.scss?bf49","pages/landing/SignIn/ForgotPassword/FormCodePassword/FormCodePassword.js","assets/icons/PadLock.svg","webpack://melo-app/./src/pages/landing/SignIn/ForgotPassword/FormEmail/FormEmail.module.scss?46c5","pages/landing/SignIn/ForgotPassword/FormEmail/FormEmail.js","pages/landing/SignIn/ForgotPassword/ForgotPassword.js","webpack://melo-app/./src/pages/landing/SignIn/SignIn.module.scss?85e8","pages/landing/SignIn/ChangePassword/ChangePassword.js","pages/landing/SignIn/SignIn.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"content\":\"ForgotPassword_content__ea2gf\"};","// extracted by mini-css-extract-plugin\nexport default {\"head\":\"FormCodePassword_head__1JoVW\",\"color\":\"FormCodePassword_color__ZEjDC\",\"form\":\"FormCodePassword_form__RAJxV\",\"resend\":\"FormCodePassword_resend__Kuvn9\",\"second-title\":\"FormCodePassword_second-title__J96VI\",\"buttons\":\"FormCodePassword_buttons__5wN+y\"};","import { Form, Formik } from 'formik';\nimport moment from 'moment-timezone';\nimport React, { useContext, useState } from 'react';\nimport { Auth } from 'aws-amplify';\nimport * as Yup from 'yup';\n\nimport { Button, FormChangePassword, FormGrid, LabelFieldFormik } from '../../../../../components';\nimport useTimer from '../../../../../services/hooks/UI/useTimer';\nimport { stringSchema } from '../../../../../services/schemas';\nimport { formTypes } from '../../../../../store/catalogs/forms';\nimport Context from '../../../../../store/context';\nimport { messageErrorForm } from '../../../../../store/constants/messageErrors';\n\nimport classes from './FormCodePassword.module.scss';\n\nconst codeField = [{ key: 'code', label: 'Código de verificación', placeholder: '123456' }];\n\nconst valuesDemography = {\n code: '',\n newPassword: '',\n newPasswordConfirmation: ''\n};\n\nconst validationSchema = Yup.object().shape({\n code: stringSchema('Campo requerido'),\n newPassword: Yup.string()\n .min(8, messageErrorForm.password.min)\n .oneOf([Yup.ref('newPasswordConfirmation')], messageErrorForm.password.newPassword)\n .required(messageErrorForm.password.required),\n newPasswordConfirmation: Yup.string()\n .oneOf([Yup.ref('newPassword')], messageErrorForm.password.newPassword)\n .required(messageErrorForm.password.required)\n});\n\nconst FormCodePassword = ({ forgotState }) => {\n const [wait30SecondsState] = useState(moment().add(30, 'seconds'));\n const { timer } = useTimer({ isActive: false, endTime: wait30SecondsState });\n\n const {\n modal: { hideModal },\n toast: { showSuccess }\n } = useContext(Context);\n\n const onAccept = async (values, { setFieldError }) => {\n try {\n await Auth.forgotPasswordSubmit(forgotState.email, values.code, values.newPasswordConfirmation);\n showSuccess('Contraseña cambiada');\n hideModal();\n } catch (error) {\n if (error.code === 'CodeMismatchException') {\n setFieldError('code', messageErrorForm.codeForgotPassword.invalid);\n }\n }\n };\n\n const reSendCode = async () => {\n try {\n await Auth.forgotPassword(forgotState.email);\n } catch (error) {\n // seterrorMessage(errorResponse);\n }\n };\n\n return (\n
\n
\n Restablece tu contraseña\n Ingresa el código\n Te enviamos un código de 4 dígitos al correo.\n
\n \n {({ setFieldValue }) => {\n return (\n
\n \n
\n ¿No te llegó el correo?\n {timer !== '00:00:00' ? (\n Podemos reenviarlo en {timer}\n ) : (\n
\n \n
\n )}\n
\n {/*
\n Establece una nueva contraseña\n Recuerda que debe tener mínimo 8 caracteres.\n
\n \n
\n \n \n
*/}\n \n \n );\n }}\n
\n
\n );\n};\n\nexport default FormCodePassword;\n","var _circle, _g, _defs;\nconst _excluded = [\"title\", \"titleId\"];\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }\nimport * as React from \"react\";\nfunction SvgPadLock(_ref, svgRef) {\n let {\n title,\n titleId\n } = _ref,\n props = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 80,\n height: 80,\n viewBox: \"0 0 80 80\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 40,\n cy: 40,\n r: 40,\n fill: \"#E0F0F6\"\n })), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip0_614_2043)\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M57.5 31.25H22.5C21.5335 31.25 20.75 32.0335 20.75 33V57.5C20.75 58.4665 21.5335 59.25 22.5 59.25H57.5C58.4665 59.25 59.25 58.4665 59.25 57.5V33C59.25 32.0335 58.4665 31.25 57.5 31.25Z\",\n stroke: \"#2C3B60\",\n strokeWidth: 2.5,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M32.125 31.25V23.375C32.125 21.2864 32.9547 19.2834 34.4315 17.8065C35.9084 16.3297 37.9114 15.5 40 15.5C42.0886 15.5 44.0916 16.3297 45.5685 17.8065C47.0453 19.2834 47.875 21.2864 47.875 23.375V31.25\",\n stroke: \"#2C3B60\",\n strokeWidth: 2.5,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }))), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clip0_614_2043\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n width: 56,\n height: 56,\n fill: \"white\",\n transform: \"translate(12 12)\"\n })))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPadLock);\nexport default __webpack_public_path__ + \"static/media/PadLock.9d226dcae5c7403340b5e7da1e2a0b69.svg\";\nexport { ForwardRef as ReactComponent };","// extracted by mini-css-extract-plugin\nexport default {\"form\":\"FormEmail_form__OpdQo\",\"buttons\":\"FormEmail_buttons__ZLrys\",\"content\":\"FormEmail_content__5cteR\",\"title\":\"FormEmail_title__qUODG\",\"description\":\"FormEmail_description__BHFYd\"};","import { Form, Formik } from 'formik';\nimport React, { useContext } from 'react';\nimport * as Yup from 'yup';\nimport { Auth } from 'aws-amplify';\n\nimport { Button, FormGrid, LabelFieldFormik } from '../../../../../components';\nimport { emailSchema } from '../../../../../services/schemas';\nimport Context from '../../../../../store/context';\nimport { ReactComponent as PadLock } from '../../../../../assets/icons/PadLock.svg';\n\nimport classes from './FormEmail.module.scss';\n\nimport { setLoading } from '../../../../../store/slices/UI';\nimport { useDispatch } from 'react-redux';\nimport { messageErrorForm } from '../../../../../store/constants/messageErrors';\n\nconst valuesDemography = {\n email: ''\n};\n\nconst validationSchema = Yup.object().shape({\n email: emailSchema(messageErrorForm.email)\n});\n\nconst fields = [{ key: 'email', label: 'Correo', placeholder: 'hola@ejemplo.com', cols: 2 }];\n\nconst FormEmail = ({ onAccept, setForgotState }) => {\n const {\n modal: { hideModal }\n } = useContext(Context);\n const dispatch = useDispatch();\n\n const sendEmail = async ({ email }, { setFieldError }) => {\n dispatch(setLoading(true));\n try {\n await Auth.forgotPassword(email);\n setForgotState(state => ({ ...state, current: 1, email }));\n } catch (error) {\n let errorResponse = '';\n if (error.code === 'InvalidParameterException') {\n errorResponse = 'Parametros invalidos';\n } else if (error.code === 'UserNotFoundException') {\n errorResponse = 'No existe el correo, por favor digitar uno existente';\n } else {\n errorResponse = 'Se excedio el limite, por favor intentar mas tarde';\n }\n // seterrorMessage(errorResponse);\n setFieldError('email', errorResponse);\n }\n dispatch(setLoading(false));\n };\n return (\n
\n \n Reestablece tu contraseña\n Ingresa tu correo electrónico y te enviaremos instrucciones para hacerlo.\n \n {({ setFieldValue }) => {\n return (\n
\n \n
\n \n \n
\n \n );\n }}\n
\n
\n );\n};\n\nexport default FormEmail;\n","import React, { useState } from 'react';\n\nimport classes from './ForgotPassword.module.scss';\nimport FormCodePassword from './FormCodePassword/FormCodePassword';\nimport FormEmail from './FormEmail/FormEmail';\n\nconst ForgotPassword = () => {\n const [forgotState, setForgotState] = useState({ current: 0, email: null });\n\n return (\n
\n {forgotState.current === 0 && }\n {forgotState.current === 1 && }\n
\n );\n};\n\nexport default ForgotPassword;\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"SignIn_container__ySnEt\",\"logo\":\"SignIn_logo__BMWVI\",\"div-left\":\"SignIn_div-left__gwLJ9\",\"div-form\":\"SignIn_div-form__0xAP5\",\"form\":\"SignIn_form__8qsu1\",\"fields\":\"SignIn_fields__g-S8+\",\"field\":\"SignIn_field__vgeAj\",\"forgot\":\"SignIn_forgot__710R0\",\"forgot-button\":\"SignIn_forgot-button__rJcKK\",\"register\":\"SignIn_register__zbLO7\",\"div-rigth\":\"SignIn_div-rigth__sHMHu\",\"cursor\":\"SignIn_cursor__g7bev\",\"inputs\":\"SignIn_inputs__+TX2P\",\"div-text\":\"SignIn_div-text__-O1kC\",\"loading\":\"SignIn_loading__Xmjda\",\"dimension-button\":\"SignIn_dimension-button__7zEbK\"};","import { Form, Formik } from 'formik';\nimport React, { useContext, useState } from 'react';\nimport * as Yup from 'yup';\nimport { Auth } from 'aws-amplify';\nimport { useDispatch } from 'react-redux';\nimport classes from './ChangePassword.module.scss';\n\nimport { setLoading } from '../../../../store/slices/UI';\nimport { Button, FormChangePassword, FormGrid, LabelFieldFormik, TextInput } from '../../../../components';\nimport Context from '../../../../store/context';\nimport { formTypes } from '../../../../store/catalogs/forms';\nimport { setUserValues } from '../../../../store/slices/user';\nimport { useFetch } from '../../../../services/hooks';\nimport apiMethods from '../../../../apis';\nimport utils from '../../../../services/utils';\n\nconst initialFormValues = {\n newPassword: '',\n newPasswordConfirmation: ''\n};\n\nconst formValidationSquema = Yup.object().shape({\n newPassword: Yup.string().min(8, 'La contraseña debe tener mínimo 8 caracteres').required('Contraseña requerida!'),\n newPasswordConfirmation: Yup.string()\n .required('Este campo es obligatorio')\n .oneOf([Yup.ref('newPassword')], 'Las contraseñas no coinciden')\n});\n\nexport const ChangePassword = ({ user }) => {\n const {\n modal: { showError }\n } = useContext(Context);\n\n const { sendRequest: updateUser } = useFetch(apiMethods.updateUser);\n\n const dispatch = useDispatch();\n\n const onAccept = async value => {\n try {\n await Auth.completeNewPassword(user, value.newPasswordConfirmation);\n updateUser(user.username, utils.dateToSendEmailMarketing(utils.statusEmailMarketing.NOTCOMPLETEREGISTER, 2));\n dispatch(setUserValues({ userId: user.username }));\n dispatch(setLoading(false));\n } catch (error) {\n showError({ title: 'Nueva contraseña', description: 'Error al cambiar la contraseña' });\n }\n };\n\n return (\n \n {({ setFieldValue }) => (\n
\n \n \n )}\n
\n );\n};\n","import React, { useContext } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { Form, Formik } from 'formik';\nimport { useNavigate } from 'react-router-dom';\nimport * as Yup from 'yup';\n\nimport { loginUser } from '../../../services/hooks/authentication/useAuthentication';\nimport { setLoading } from '../../../store/slices/UI';\nimport { setUserValues } from '../../../store/slices/user';\nimport { Button, FormGrid, LabelFieldFormik } from '../../../components';\nimport Context from '../../../store/context';\nimport { paths } from '../../../routes';\nimport { emailSchema, stringSchema } from '../../../services/schemas';\nimport { ReactComponent as MeloLogo } from '../../../assets/icons/MeloLogo.svg';\nimport ForgotPassword from './ForgotPassword/ForgotPassword';\n\nimport classes from './SignIn.module.scss';\nimport { ChangePassword } from './ChangePassword/ChangePassword';\n\nconst message = 'Campo requerido';\nconst validationSchema = Yup.object().shape({\n email: emailSchema(message),\n password: stringSchema(message)\n});\n\nconst initialValues = {\n email: '',\n password: ''\n};\n\nconst fields = [\n { key: 'email', label: 'Correo', placeholder: 'hola@ejemplo.com', cols: 2 },\n { key: 'password', label: 'Contraseña', type: 'password', placeholder: '******', cols: 2 }\n];\n\nconst SignIn = () => {\n const dispatch = useDispatch();\n const navigate = useNavigate();\n const {\n modal: { showModal, showError }\n } = useContext(Context);\n //const { globalLoading: isLoadingUI } = useSelector(state => state.UI);\n\n const loginHandler = async values => {\n try {\n dispatch(setLoading(true));\n const { email, password } = values;\n const user = await loginUser(email, password);\n if (user.challengeName === 'NEW_PASSWORD_REQUIRED') {\n showModal(, false);\n } else {\n dispatch(setUserValues({ userId: user.username }));\n dispatch(setLoading(false));\n }\n } catch (error) {\n let message = 'Error en la autenticación de usuario';\n if (error.code === 'UserNotFoundException' || error.code === 'NotAuthorizedException') {\n message = 'Usuario o contraseña incorrectos';\n } else if (error.message === 'User is disabled.') {\n message = 'Usuario inhabilitado, por favor contacte al proveedor';\n }\n showError({ title: 'Inicio de sesion', description: message });\n dispatch(setLoading(false));\n }\n };\n\n const updatePassword = () => {\n // showModal();\n showModal();\n };\n\n const registerUser = () => {\n navigate(paths.signup);\n };\n\n return (\n
\n
\n
\n \n
\n
\n
\n

Las finanzas de tu empresa, en un solo lugar.

\n \n {({ setFieldValue }) => (\n
\n
\n \n
\n
\n \n Olvidé mi contraseña\n \n\n \n
\n
\n )}\n
\n
\n \n ¿Aún no estás registrado?\n \n \n \n
\n
\n
\n
\n
\n
\n );\n};\n\nexport default SignIn;\n"],"names":["codeField","key","label","placeholder","valuesDemography","code","newPassword","newPasswordConfirmation","validationSchema","Yup","shape","stringSchema","min","messageErrorForm","password","oneOf","required","_ref","forgotState","wait30SecondsState","useState","moment","add","timer","useTimer","isActive","endTime","modal","hideModal","toast","showSuccess","useContext","Context","reSendCode","async","Auth","forgotPassword","email","error","_jsxs","children","className","classes","_jsx","concat","Formik","initialValues","onSubmit","values","_ref2","setFieldError","forgotPasswordSubmit","codeForgotPassword","invalid","_ref3","setFieldValue","Form","FormGrid","onChange","fields","Render","LabelFieldFormik","Button","onClick","custom","FormChangePassword","_circle","_g","_defs","_excluded","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","SvgPadLock","svgRef","title","titleId","props","o","i","includes","_objectWithoutPropertiesLoose","getOwnPropertySymbols","s","propertyIsEnumerable","_objectWithoutProperties","width","height","viewBox","fill","xmlns","ref","id","cx","cy","clipPath","d","stroke","strokeWidth","strokeLinecap","strokeLinejoin","transform","ForwardRef","emailSchema","cols","onAccept","setForgotState","dispatch","useDispatch","PadLock","setLoading","state","_objectSpread","current","errorResponse","_ref4","type","ForgotPassword","FormEmail","FormCodePassword","initialFormValues","formValidationSquema","ChangePassword","user","showError","sendRequest","updateUser","useFetch","apiMethods","completeNewPassword","value","username","utils","dateToSendEmailMarketing","statusEmailMarketing","NOTCOMPLETEREGISTER","setUserValues","userId","description","message","SignIn","navigate","useNavigate","showModal","updatePassword","MeloLogo","loginUser","challengeName","registerUser","paths","signup"],"sourceRoot":""}