(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["5bfdf1dc","2d23845a"],{3492:function(e,t,a){},"90d8":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("q-page",{staticClass:"flex justify-center items-center docs-input",attrs:{"data-test":e.CypressTarget("AppLoginPage"),padding:""}},[a("div",{staticClass:"full-width row justify-center logo-auth"},[a("div",{staticClass:"col-10 text-center"},[a("img",{attrs:{id:"logo",src:e.SET_LOGO.login}})]),a("div",{staticClass:"col-xs-12 col-md-6 col-lg-4"},[a("login-form",{attrs:{"save-local":!0}}),a("div",{staticClass:"col-12 text-center",attrs:{"data-test":e.CypressTarget("Buttons")}},[e.SET_DISPLAY.helpMenu?a("q-btn",{staticClass:"full-width",attrs:{"data-test":e.CypressTarget("OpenHelpModal"),label:e.$t("button.help"),icon:"fas fa-question-circle",flat:""},nativeOn:{click:function(t){e.openModal=!0}}}):e._e(),e.SET_DISPLAY.importantInformationMenu?a("q-btn",{staticClass:"full-width q-ma-sm",attrs:{label:e.$t("button.importantInformations"),icon:"fas fa-info-circle",flat:""},nativeOn:{click:function(t){e.openModal=!0}}}):e._e()],1)],1)]),a("active-component-common-modal-help-faq",{model:{value:e.openModal,callback:function(t){e.openModal=t},expression:"openModal"}})],1)},i=[];n._withStripped=!0;var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("form",{staticClass:"full-width",attrs:{"data-test":e.CypressTarget("AppLoginForm")},on:{submit:function(e){e.preventDefault()}}},[a("q-field",{attrs:{"data-test":e.CypressTarget("CpfField"),error:e.$v.cpf.$error,"error-label":e.$t("error.invalid.field",{field:e.$t("field.user.cpf.label")})}},[a("q-input",{directives:[{name:"mask",rawName:"v-mask",value:["###.###.###-##","##.###.###/####-##"],expression:"['###.###.###-##', '##.###.###/####-##']"}],attrs:{"data-test":e.CypressTarget("CpfInput"),"float-label":e.cpfCnpjLabel,color:e.SET_COLOR.primary,clearable:"",type:"tel",autocomplete:"cpf"},on:{blur:function(t){e.$v.cpf.$touch()}},model:{value:e.cpf,callback:function(t){e.cpf="string"===typeof t?t.trim():t},expression:"cpf"}})],1),a("q-field",{attrs:{"data-test":e.CypressTarget("EmailField"),error:e.$v.email.$error,"error-label":e.$t("error.invalid.field",{field:e.$t("field.user.email.label")})}},[a("q-input",{attrs:{"data-test":e.CypressTarget("EmailInput"),color:e.SET_COLOR.primary,"float-label":e.$t("field.user.email.label"),clearable:"",type:"email",autocomplete:"email"},on:{blur:function(t){e.$v.email.$touch()}},model:{value:e.email,callback:function(t){e.email=t},expression:"email"}})],1),a("q-field",[a("q-btn",{staticClass:"full-width",attrs:{"data-test":e.CypressTarget("LoginButton"),disable:!e.userCanLogin,color:e.SET_COLOR.primary,loader:""},nativeOn:{click:function(t){e.openLoginDialogs()}},model:{value:e.btnState,callback:function(t){e.btnState=t},expression:"btnState"}},[e._v("\n      "+e._s(e.$t("button.login"))+"\n      "),a("q-spinner",{attrs:{slot:"loading"},slot:"loading"})],1)],1),e.saveLocal?a("q-field",{attrs:{"data-test":e.CypressTarget("SaveLocalField")}},[a("q-toggle",{attrs:{"data-test":e.CypressTarget("SaveLocalSwitch"),label:e.$t("label.saveLocalUser"),color:e.SET_COLOR.primary},model:{value:e.userSaveLocal,callback:function(t){e.userSaveLocal=t},expression:"userSaveLocal"}})],1):e._e(),a("login-pin-modal",{attrs:{"save-local":e.userSaveLocal},on:{userLoggedIn:e.redirectUser,userNotFound:e.showUserNotFound,error:function(t){e.btnState=!1},"close-dialog":function(t){e.openSelect=!1}},model:{value:e.openSelect,callback:function(t){e.openSelect=t},expression:"openSelect"}})],1)},l=[];o._withStripped=!0;var r=a("3156"),s=a.n(r),c=(a("a481"),a("2f62")),u=a("b5ae"),p=a("e554"),d=a("ff59"),f=a("3751"),m=a("9186"),h={name:"UserLoginForm",components:{LoginPinModal:f["default"]},mixins:[d["a"]],props:{saveLocal:{type:Boolean,required:!1,default:!1}},data:function(){return{email:"",cpf:"",openSelect:!1,btnState:!1,userSaveLocal:!0}},computed:{cpfCnpjClean:function(){return this.cpf.replace(/[^0-9]/g,"")},userCanLogin:function(){return!this.$v.email.$error&&!this.$v.cpf.$error},cpfCnpjLabel:function(){return 11===this.cpfCnpjClean.length?this.$t("field.user.cpf.label"):14===this.cpfCnpjClean.length?this.$t("field.user.cnpj.label"):this.$t("field.user.cpfCnpj.label")}},methods:s()({},Object(c["b"])("authentication",["setUser","getAuthenticationPinModes","sendPinCode"]),Object(c["c"])("settings",["getIntiModule"]),{openLoginDialogs:function(){return this.$v.$touch(),!this.$v.$error&&(this.setUser({cpf:this.cpf,email:this.email,module:this.SET_MODULE})&&(this.openSelect=!0),!0)},redirectUser:function(){this.ROUTE_REDIRECT_USER(m["a"].getRouteIntiModuleLogin(this.SET_VUE_MODULE))},showUserNotFound:function(){"subscription"===this.getIntiModule&&this.toastError(this.$t("error.server.customer.notFound"))},displayError:function(e){var t=this;this.toastError(e).then(function(){t.openSelect=!1})}}),validations:{email:{required:u["required"],email:u["email"]},cpf:{required:u["required"],cpfCnpjValid:p["a"]}}},g=h,v=a("2877"),E=Object(v["a"])(g,o,l,!1,null,null,null);E.options.__file="AppLoginForm.vue";var b=E.exports,C={name:"AppUserLogin",components:{ActiveComponentCommonModalHelpFaq:function(){return Promise.all([a.e("acf3ab64"),a.e("2d0dd432"),a.e("2d0b64ae")]).then(a.bind(null,"1d16"))},LoginForm:b},mixins:[d["a"]],data:function(){return{openModal:!1}},created:function(){document.title="".concat(this.SET_PAGE_NAME," | ").concat(this.$t("page.login"))},mounted:function(){this.$tracker.pageView({page:this.$route.path,title:this.$t("page.login")})}},_=C,S=(a("a18a"),Object(v["a"])(_,n,i,!1,null,"dc4be35e",null));S.options.__file="index.vue";t["default"]=S.exports},a18a:function(e,t,a){"use strict";var n=a("3492"),i=a.n(n);i.a},ff59:function(e,t,a){"use strict";var n=a("3156"),i=a.n(n),o=(a("a481"),a("9186")),l=a("2f62"),r=a("57d5");t["a"]={methods:{ROUTE_REDIRECT_USER:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?this.$router.replace({name:e}):"string"===typeof this.SET_EVENT_CODE&&""!==this.SET_EVENT_CODE?this.$router.replace({name:r["C"],params:{code:this.SET_EVENT_CODE}}):"string"===typeof this.SET_PROMOTION_CODE&&""!==this.SET_PROMOTION_CODE?this.$router.replace({name:r["U"],params:{code:this.SET_PROMOTION_CODE}}):this.SET_VUE_MODULE?this.$router.replace({name:o["a"].getRouteVueModule(this.SET_VUE_MODULE)}):this.$router.replace({name:o["a"].getRouteIntiModule(this.SET_MODULE)})}},computed:i()({},Object(l["c"])("settings",["getIntiModule"]),Object(l["c"])("authentication",["isLogged"]))}}}]);
//# sourceMappingURL=5bfdf1dc.cb934c5f.2024-10-22T18:36:13.257Z.js.map