{"version":3,"sources":["webpack:///./src/assets/images/logoafp.png","webpack:///./src/views/Login.vue?5384","webpack:///./src/services/LoginService.ts","webpack:///./src/models/LoginModel.ts","webpack:///./src/views/Login.vue","webpack:///./src/views/Login.vue?52a1","webpack:///./src/views/Login.vue?4950","webpack:///./src/views/Login.vue?f21f"],"names":["module","exports","LoginService","_BaseService","_classCallCheck","_callSuper","_inherits","_createClass","key","value","_login","_asyncToGenerator","regeneratorRuntime","mark","_callee","loginModel","wrap","_context","prev","next","abrupt","this","post","stop","login","_x","apply","arguments","BaseService","LoginModel","userIdentity","password","sessionId","_defineProperty","render","_vm","_c","_self","_setupProxy","staticClass","userIsLoggedIn","user","esAfiliado","esAfiInactivo","_e","_v","attrs","require","directives","name","rawName","showLoginError","expression","staticStyle","_s","loginMessage","showComunicationError","ref","on","$event","preventDefault","loginUser","scopedSlots","_u","fn","_ref","errors","domProps","target","composing","$set","_ref2","goRecuperarClave","loading","redirectHome","staticRenderFns","Login","_Vue","_this","_len","length","args","Array","_key","concat","Date","getFullYear","IframeCommunicatorService","html","document","getElementsByTagName","i","style","overflow","$route","query","invalidUser","$router","push","_this2","$refs","form","validate","then","isValid","submittedCedula","uuidv4","loginService","response","redirectObj","userName","dataNoAfiliadoSignIn","dataJson","jsonEncoded","data","respCode","entity","cedula","$store","dispatch","applyRedirect","primerNombre","primerApellido","username","redirectUrl","isLocalRedirect","JSON","stringify","btoa","iframeService","postMessageToParent","InterPagesMessages","MessageTypes","NoAfiliadoSignIn","catch","e","console","error","finally","replace","c","r","Math","random","v","toString","userEsAfiliado","log","redirectPage","redirectToSiembra","window","location","href","GlobalConfig","PUBLIC_WEB_URL","Vue","__decorate","Getter","Component","components","ValidationProvider","ValidationObserver","component"],"mappings":"qGAAAA,EAAOC,QAAU,IAA0B,4B,oCCA3C,W,4cCCiD,IAI5BC,EAAa,SAAAC,GAC9B,SAAAD,IAAA,OAAAE,eAAA,KAAAF,GAAAG,EAAA,KAAAH,EAAA,CACU,aACT,OAA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,EAAKmB,OAAOC,SAAS,sBAAuB,MAC5CpB,EAAK3C,uBAAwB,EAC7B2C,EAAK1B,SAAU,KAEhBiE,SAAQ,WACPvC,EAAK1B,SAAU,WAIxB,CAAAjE,IAAA,SAAAC,MACM,WACL,MAAO,uCAAuCkI,QAAQ,SAAS,SAASC,GACtE,IAAIC,EAAqB,GAAhBC,KAAKC,SAAiB,EAC7BC,EAAS,KAALJ,EAAWC,EAAS,EAAJA,EAAW,EACjC,OAAOG,EAAEC,SAAS,SAErB,CAAAzI,IAAA,gBAAAC,MACM,SACLyI,GAKA,IAAItB,EAAc,GACdC,GAAkB,EAGtB,OADAW,QAAQW,IAAI,oBAAoBD,GAC5BA,GAMA7H,KAAKyE,OAAOC,MAAMqD,eACpBxB,EAAcvG,KAAKyE,OAAOC,MAAMqD,aAChCvB,GAAkB,EAClBxG,KAAK4E,QAAQC,KAAK0B,IAIdvG,KAAKyE,OAAOC,MAAMsD,oBACpBzB,EAAcvG,KAAKyE,OAAOC,MAAMsD,kBAChCxB,GAAkB,EAClBxG,KAAK4E,QAAQC,KAAK0B,IAIfA,GAIHvG,KAAK4E,QAAQC,KAAK,cAItB0B,EAAcA,GAAe,aAEtB,CAAEA,cAAaC,qBA7BpBxG,KAAK4E,QAAQC,KAAK,6BACV,CAAE0B,cAAaC,sBAuC1B,CAAArH,IAAA,eAAAC,MACM,WACL6I,OAAOC,SAASC,KAAOC,OAAaC,mBAtKd,CAASC,QAUjBC,eAAA,CAAfC,eAAO,S,2BAVWjF,EAAKgF,eAAA,CANzBE,eAAU,CACTC,WAAY,CACVC,0BACAC,8BAGiBrF,WCrB0W,I,wBCQ3XsF,EAAY,eACd,EACAhI,EACAyC,GACA,EACA,KACA,WACA,MAIa,aAAAuF,E","file":"js/chunk-158a74dc.1026abe3.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/logoafp.de928135.png\";","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=style&index=0&id=62606b14&prod&scoped=true&lang=css\"","import { AxiosResponse } from 'axios';\nimport BaseService from \"@/services/BaseService\";\nimport ServiceResponseEntity from './response-models/ServiceResponseEntity';\nimport LoginModel from \"@/models/LoginModel\";\nimport User from \"@/models/User\";\nexport default class LoginService extends BaseService {\n public constructor() {\n super(\"Afiliado\");\n }\n\n public async login(loginModel: LoginModel): \n Promise>> {\n return this.post('Login', loginModel);\n }\n}","export default class LoginModel {\n constructor(\n public userIdentity?: string,\n public password?: string,\n\t\tpublic sessionId?: string\n ) {}\n}","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"bg\"},[_c('div',{staticClass:\"container\"},[(_vm.userIsLoggedIn && !_vm.user.esAfiliado && !_vm.user.esAfiInactivo)?_c('h3',{staticClass:\"specialMessage\"},[_vm._v(\"\\n Opción disponible para afiliados de AFP Siembra.\\n \")]):_vm._e(),(_vm.userIsLoggedIn && _vm.user.esAfiInactivo)?_c('h3',{staticClass:\"specialMessage\"},[_vm._v(\"\\n Hola, lo sentimos, tu cuenta no está activa, por lo que esta opción no\\n está disponible.\\n \")]):_vm._e(),_c('div',{},[_c('div',{staticClass:\"ctn\"},[_c('div',{},[_c('div',{staticClass:\"log\"},[_c('img',{attrs:{\"src\":require(\"../assets/images/logoafp.png\"),\"alt\":\"\"}}),_c('h1',[_vm._v(\"Bienvenido a AFP Siembra\")]),_c('h4',[_vm._v(\"\\n Inicia sesión y conoce más sobre tu inversión y tus beneficios\\n \")]),_c('label',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showLoginError),expression:\"showLoginError\"}],staticClass:\"validation-error\",staticStyle:{\"margin-top\":\"15px\",\"max-width\":\"450px\"}},[_vm._v(_vm._s(_vm.loginMessage))]),_c('label',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showComunicationError),expression:\"showComunicationError\"}],staticClass:\"validation-error\",staticStyle:{\"max-width\":\"450px\"}},[_vm._v(\"Lo sentimos, ha ocurrido un error en la comunicación. Por favor\\n intenta más tarde.\")])]),_c('ValidationObserver',{ref:\"form\"},[_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.loginUser.apply(null, arguments)}}},[_c('div',{staticClass:\"input\"},[_c('div',{},[_c('ValidationProvider',{attrs:{\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function({ errors }){return [_c('h4',[_vm._v(\"Usuario\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.loginModel.userIdentity),expression:\"loginModel.userIdentity\"}],staticClass:\"form-control\",attrs:{\"type\":\"number\",\"id\":\"username\",\"name\":\"username\",\"aria-describedby\":\"emailHelp\",\"placeholder\":\"Ingrese su usuario\",\"oninput\":\"this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\\\\..*)\\\\./g, '$1');\"},domProps:{\"value\":(_vm.loginModel.userIdentity)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.loginModel, \"userIdentity\", $event.target.value)}}}),_c('span',{staticClass:\"validation-error\"},[_vm._v(_vm._s(errors[0]))])]}}])})],1)]),_c('div',{staticClass:\"input\"},[_c('div',{},[_c('ValidationProvider',{attrs:{\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function({ errors }){return [_c('h4',[_vm._v(\"Contraseña\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.loginModel.password),expression:\"loginModel.password\"}],staticClass:\"form-control\",attrs:{\"type\":\"password\",\"id\":\"password\",\"name\":\"password\",\"placeholder\":\"Ingrese su contraseña\"},domProps:{\"value\":(_vm.loginModel.password)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.loginModel, \"password\", $event.target.value)}}}),_c('span',{staticClass:\"validation-error\"},[_vm._v(_vm._s(errors[0]))])]}}])})],1)]),_c('div',{staticClass:\"opc\"},[_c('div',{staticClass:\"opcs\"},[_c('router-link',{staticClass:\"Olvidar\",attrs:{\"to\":\"/cambio-password\"}},[_vm._v(\"¿Olvidaste tu contraseña?\")]),_c('a',{staticClass:\"Solicitar\",staticStyle:{\"cursor\":\"pointer\"},on:{\"click\":function($event){return _vm.goRecuperarClave()}}},[_vm._v(\"Solicitar clave\")])],1)]),_c('div',{staticClass:\"btn\"},[_c('button',{staticClass:\"buttonload\"},[_vm._v(\"\\n Iniciar sesión\\n \"),(_vm.loading)?_c('i',{staticClass:\"fa fa-circle-o-notch fa-spin\"}):_vm._e()])]),_c('div',{staticClass:\"btns2\",staticStyle:{\"color\":\"white\"},on:{\"click\":function($event){return _vm.redirectHome()}}},[_vm._v(\"\\n Volver\\n \")])])])],1)])])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport { Component, Vue } from \"vue-property-decorator\";\nimport LoginModel from \"@/models/LoginModel\";\nimport User from \"@/models/User\";\nimport LoginService from \"@/services/LoginService\";\nimport { ValidationProvider, extend, ValidationObserver } from \"vee-validate\";\nimport IframeCommunicatorService, {\n InterPagesMessages,\n MessageTypes,\n} from \"@/services/IframeCommunicatorService\";\nimport VeeValidateForm from \"@/vee-validate/types/VeeValidateForm\";\nimport { Getter } from \"vuex-class\";\nimport GlobalConfig from \"@/GlobalConfig\";\nimport { newGuid } from \"@microsoft/applicationinsights-core-js\";\n\n@Component({\n components: {\n ValidationProvider,\n ValidationObserver,\n },\n})\nexport default class Login extends Vue {\n public currentYear = new Date().getFullYear();\n public loginModel = new LoginModel();\n public loginService = new LoginService();\n public loading = false;\n public showComunicationError = false;\n public showLoginError = false;\n public loginMessage = \"\";\n public iframeService = new IframeCommunicatorService();\n public userIsLoggedIn = false;\n @Getter(\"user\") user: User;\n\n mounted() {\n var html = document.getElementsByTagName(\"html\");\n for (var i = 0; i < html.length; i++) {\n html[i].style.overflow = \"visible\";\n }\n this.userIsLoggedIn = this.$route.query.invalidUser === \"true\";\n }\n public goRecuperarClave() {\n this.$router.push(\"/cambio-password\");\n }\n public loginUser() {\n (this.$refs.form as VeeValidateForm).validate().then((isValid: boolean) => {\n if (isValid) {\n this.loading = true;\n this.showComunicationError = false;\n this.showLoginError = false;\n let submittedCedula = this.loginModel.userIdentity;\n let submittedPassword = this.loginModel.password;\n let sessionId = this.$route.query.sessionId\n ? (this.$route.query.sessionId as string)\n : this.uuidv4();\n this.loginModel.sessionId = sessionId;\n\n this.loginService\n .login(this.loginModel)\n .then(async (response) => {\n if (response.data.respCode == 200) {\n var user = response.data.entity;\n user.cedula = submittedCedula;\n user.password = this.loginModel.password;\n this.$store.dispatch(\"setUserLoggedAction\", user);\n\n this.$store.dispatch(\"setSessionId\", sessionId);\n\n var redirectObj = this.applyRedirect(user.esAfiliado);\n\n if (user.esAfiliado) {\n // var userJson = JSON.stringify({\n // username: submittedCedula,\n // password: submittedPassword,\n // redirectUrl: redirectObj.redirectUrl,\n // isLocalRedirect: redirectObj.isLocalRedirect,\n // });\n // var jsonEncoded = btoa(userJson);\n // this.iframeService.postMessageToParent(\n // new InterPagesMessages(\n // MessageTypes.AfiliadoSignIn,\n // jsonEncoded\n // )\n // );\n } else {\n var userName = user.primerNombre + \" \" + user.primerApellido;\n var dataNoAfiliadoSignIn = {\n username: userName,\n redirectUrl: redirectObj.redirectUrl,\n isLocalRedirect: redirectObj.isLocalRedirect,\n };\n let dataJson = JSON.stringify(dataNoAfiliadoSignIn);\n var jsonEncoded = btoa(dataJson);\n this.iframeService.postMessageToParent(\n new InterPagesMessages(\n MessageTypes.NoAfiliadoSignIn,\n jsonEncoded\n )\n );\n }\n\n // setTimeout(() => {\n // this.applyRedirect(user.esAfiliado);\n // //this.loading = false;\n // }, 1850);\n //\n } else if (response.data.respCode == 1001) {\n this.loginMessage =\n \"Usuario o contraseña incorrecta, por favor verifique.\";\n this.showLoginError = true;\n this.loading = false;\n } else {\n this.showComunicationError = true;\n this.loading = false;\n }\n })\n .catch((e) => {\n console.error(e);\n this.$store.dispatch(\"setUserLoggedAction\", null);\n this.showComunicationError = true;\n this.loading = false;\n })\n .finally(() => {\n this.loading = false;\n });\n }\n });\n }\n public uuidv4(): string {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function(c) {\n var r = (Math.random() * 16) | 0,\n v = c == \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }\n public applyRedirect(\n userEsAfiliado: boolean\n ): {\n redirectUrl: string;\n isLocalRedirect: boolean;\n } {\n var redirectUrl = \"\";\n var isLocalRedirect = true;\n debugger;\n console.log(\"es afiliado Login\"+userEsAfiliado)\n if(!userEsAfiliado){\n this.$router.push(\"/solicitudes-beneficiario\")\n return { redirectUrl, isLocalRedirect };\n }\n\n\n if (this.$route.query.redirectPage) {\n redirectUrl = this.$route.query.redirectPage as string;\n isLocalRedirect = true;\n this.$router.push(redirectUrl);\n }\n\n \n if (this.$route.query.redirectToSiembra) {\n redirectUrl = this.$route.query.redirectToSiembra as string;\n isLocalRedirect = false;\n this.$router.push(redirectUrl);\n }\n\n // Si es afiliado y no se especifica ReturnUrl, mandar a default\n if (!redirectUrl) {\n // window.location.href = GlobalConfig.PORTAL_BASE_URL;\n // redirectUrl = \"/default.aspx\";\n // isLocalRedirect = false;\n this.$router.push(\"/Dashboard\");\n }\n \n\n redirectUrl = redirectUrl || \"/Dashboard\";\n\n return { redirectUrl, isLocalRedirect };\n // if (isLocalRedirect) {\n // this.$router.push(redirectUrl);\n // } else {\n // this.iframeService.postMessageToParent(\n // new InterPagesMessages(\n // MessageTypes.Redirect,\n // redirectUrl\n // )\n // );\n // }\n }\n public redirectHome() {\n window.location.href = GlobalConfig.PUBLIC_WEB_URL;\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./Login.vue?vue&type=template&id=62606b14&scoped=true\"\nimport script from \"./Login.vue?vue&type=script&lang=ts\"\nexport * from \"./Login.vue?vue&type=script&lang=ts\"\nimport style0 from \"./Login.vue?vue&type=style&index=0&id=62606b14&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"62606b14\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}