{"version":3,"sources":["webpack:///./src/views/auth/components/NewPassword.vue?f5ac","webpack:///./src/views/auth/components/NewPassword.vue","webpack:///./src/views/auth/components/NewPassword.vue?f97a","webpack:///./src/views/auth/components/NewPassword.vue?3f74"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","VCard","attrs","_v","_s","$t","VForm","on","$event","preventDefault","submit","error","description","_e","VTextField","passwordErrors","showPass","model","value","callback","$$v","passwordInput","expression","confirmPasswordErrors","confirmPasswordInput","VBtn","loading","done","hasError","staticStyle","staticRenderFns","NewPassword","errors","$v","$dirty","required","push","minLength","min","passwordSettings","maxLength","max","passwordRules","sameAsPassword","$touch","$invalid","length","msg","toString","displaySnackbar","end","data","token","email","userEmail","newPassword","api","post","setTimeout","$router","Vue","__decorate","Action","PropSync","default","Component","mixins","validationMixin","validations","sameAs","component"],"mappings":"uLAOIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACF,EAAGG,EAAA,KAAM,CAACD,YAAY,aAAaE,MAAM,CAAC,UAAY,MAAM,CAACJ,EAAG,OAAW,CAACA,EAAG,MAAM,CAACE,YAAY,gDAAgD,CAACN,EAAIS,GAAG,IAAIT,EAAIU,GAAGV,EAAIW,GAAG,mCAAmC,SAASP,EAAG,OAAU,CAACA,EAAGQ,EAAA,KAAM,CAACN,YAAY,iBAAiBO,GAAG,CAAC,OAAS,SAASC,GAAgC,OAAxBA,EAAOC,iBAAwBf,EAAIgB,OAAOF,MAAW,CAAEd,EAAS,MAAEI,EAAG,MAAM,CAACE,YAAY,wBAAwB,CAACF,EAAGG,EAAA,KAAM,CAACD,YAAY,OAAOE,MAAM,CAAC,UAAY,IAAI,KAAO,GAAG,MAAQ,UAAU,CAACJ,EAAG,OAAW,CAACE,YAAY,kCAAkC,CAACN,EAAIS,GAAGT,EAAIU,GAAGV,EAAIiB,M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,6BACNC,EAAO,CACXC,MAAOzD,KAAKyD,MACZC,MAAO1D,KAAK2D,UACZC,YAAa5D,KAAK0B,eACnB,UACKmC,OAAIC,KAAKP,EAAKC,GAAK,QACzBxD,KAAKgC,MAAO,EACNoB,EAAMpD,KAAKU,GAAG,oBAAoB2C,WACxCrD,KAAKsD,gBAAgBF,GACrBW,YAAW,kBAAM,EAAKC,QAAQvB,KAAK,iBAAgB,KAAU,qDAE7DzC,KAAKgB,MAAQ,EAAH,GACJoC,EAAMpD,KAAKU,GAAG,wBAAwB2C,WAC5CrD,KAAKsD,gBAAgBF,GAAK,QAE5BpD,KAAK+B,SAAU,EAAM,0DACtB,qDA7BA,IA6BA,oBAED,WACE,QACI/B,KAAKgB,OACPhB,KAAKoB,eAAe+B,OAAS,GAC7BnD,KAAK4B,sBAAsBuB,OAAS,MAEvC,EA3E6B,CAASc,cACZC,gBAA1BC,eAAO,oBAAkB,sCACgBD,gBAAzCE,eAAS,QAAS,CAAEC,QAAS,iBAAM,OAAK,gCACKH,gBAA7CE,eAAS,YAAa,CAAEC,QAAS,iBAAM,OAAK,4BAH1BjC,EAAW,gBAf/BkC,eAAU,CACTC,OAAQ,CAACC,sBACTC,YAAa,CACX/C,cAAe,CACbc,uBACAE,UAAWA,uBAAUE,sBAAiBF,WACtCG,UAAWA,uBAAUD,sBAAiBC,WACtCE,cAAeH,sBAAiBG,eAElClB,qBAAsB,CACpBW,uBACAQ,eAAgB0B,oBAAO,sBAIRtC,WC9FqZ,I,YCOtauC,EAAY,eACd,EACA7E,EACAqC,GACA,EACA,KACA,KACA,MAIa,aAAAwC,E","file":"assets/js/chunk-2d21a396.64eca29d.js","sourcesContent":["import { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\n\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-wrapper\"},[_c(VCard,{staticClass:\"px-6 py-12\",attrs:{\"elevation\":\"0\"}},[_c(VCardTitle,[_c('div',{staticClass:\"display-1 mb-12 text-center font-weight-bold\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"passwordResetSection.resetPass\"))+\" \")])]),_c(VCardText,[_c(VForm,{staticClass:\"form-container\",on:{\"submit\":function($event){$event.preventDefault();return _vm.submit($event)}}},[(_vm.error)?_c('div',{staticClass:\"error-container mb-6\"},[_c(VCard,{staticClass:\"mb-2\",attrs:{\"elevation\":\"0\",\"dark\":\"\",\"color\":\"error\"}},[_c(VCardTitle,{staticClass:\"subtitle-2 justify-center pa-2\"},[_vm._v(_vm._s(_vm.error.description || _vm.$t(\"passwordResetSection.error\")))])],1)],1):_vm._e(),_c(VTextField,{attrs:{\"label\":_vm.$t('passwordResetSection.newPassRequired'),\"error-messages\":_vm.passwordErrors,\"append-icon\":_vm.showPass ? 'mdi-eye-off' : 'mdi-eye',\"type\":_vm.showPass ? 'text' : 'password'},on:{\"click:append\":function($event){_vm.showPass = !_vm.showPass}},model:{value:(_vm.passwordInput),callback:function ($$v) {_vm.passwordInput=$$v},expression:\"passwordInput\"}}),_c(VTextField,{attrs:{\"label\":_vm.$t('passwordResetSection.confirmPass'),\"error-messages\":_vm.confirmPasswordErrors,\"append-icon\":_vm.showPass ? 'mdi-eye-off' : 'mdi-eye',\"type\":_vm.showPass ? 'text' : 'password'},on:{\"click:append\":function($event){_vm.showPass = !_vm.showPass}},model:{value:(_vm.confirmPasswordInput),callback:function ($$v) {_vm.confirmPasswordInput=$$v},expression:\"confirmPasswordInput\"}}),_c('div',{staticClass:\"mt-4 d-flex flex-column align-items-center\"},[(_vm.done)?_c('div',{staticClass:\"mb-2 font-weight-bold\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"passwordResetSection.doneRedirect\"))+\" \")]):_vm._e(),_c(VBtn,{attrs:{\"block\":\"\",\"type\":\"submit\",\"elevation\":\"0\",\"color\":\"primary\",\"loading\":_vm.loading,\"disabled\":_vm.loading || _vm.done || _vm.hasError}},[_c('span',[_vm._v(_vm._s(_vm.$t(\"passwordResetSection.resetMyPass\")))])]),(!_vm.done)?_c('router-link',{staticClass:\"mt-4 text-center\",staticStyle:{\"text-decoration\":\"underline\"},attrs:{\"to\":\"/auth/password/forgot\"}},[_c('span',[_vm._v(_vm._s(_vm.$t(\"passwordResetSection.backToForgotPass\")))])]):_vm._e()],1)],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\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\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport Vue from \"vue\";\r\nimport { Action } from \"vuex-class\";\r\nimport { validationMixin } from \"vuelidate\";\r\nimport { Component, PropSync } from \"vue-property-decorator\";\r\nimport {\r\n required,\r\n minLength,\r\n maxLength,\r\n sameAs,\r\n} from \"vuelidate/lib/validators\";\r\n\r\nimport api from \"@/core/utils/api\";\r\nimport { passwordSettings } from \"@/settings\";\r\n\r\n@Component({\r\n mixins: [validationMixin],\r\n validations: {\r\n passwordInput: {\r\n required,\r\n minLength: minLength(passwordSettings.minLength),\r\n maxLength: maxLength(passwordSettings.maxLength),\r\n passwordRules: passwordSettings.passwordRules,\r\n },\r\n confirmPasswordInput: {\r\n required,\r\n sameAsPassword: sameAs(\"passwordInput\"),\r\n },\r\n },\r\n})\r\nexport default class NewPassword extends Vue {\r\n @Action(\"displaySnackbar\") displaySnackbar!: (s: string) => void;\r\n @PropSync(\"email\", { default: () => \"\" }) userEmail!: string;\r\n @PropSync(\"tokenProp\", { default: () => \"\" }) token!: string;\r\n\r\n done = false;\r\n loading = false;\r\n showPass = false;\r\n error: any = null;\r\n passwordInput = \"\";\r\n confirmPasswordInput = \"\";\r\n\r\n get passwordErrors() {\r\n const errors: any[] = [];\r\n if (!this.$v.passwordInput!.$dirty) return errors;\r\n if (!this.$v.passwordInput!.required)\r\n errors.push(this.$t(\"registerSection.passRequired\"));\r\n if (!this.$v.passwordInput!.minLength)\r\n errors.push(\r\n this.$t(\"registerSection.passMin\", { min: passwordSettings.minLength }),\r\n );\r\n !this.$v.passwordInput!.maxLength &&\r\n errors.push(\r\n this.$t(\"registerSection.passMax\", { max: passwordSettings.maxLength }),\r\n );\r\n if (!this.$v.passwordInput!.passwordRules)\r\n errors.push(this.$t(\"registerSection.passRules\"));\r\n return errors;\r\n }\r\n\r\n get confirmPasswordErrors(): any[] {\r\n const errors: any[] = [];\r\n if (!this.$v.confirmPasswordInput!.$dirty) return errors;\r\n !this.$v.confirmPasswordInput!.required &&\r\n errors.push(this.$t(\"passwordResetSection.confirmPassRequired\"));\r\n !this.$v.confirmPasswordInput!.sameAsPassword &&\r\n errors.push(this.$t(\"passwordResetSection.passNoMatch\"));\r\n return errors;\r\n }\r\n\r\n async submit() {\r\n this.$v.$touch();\r\n if (this.$v.$invalid || this.passwordErrors.length > 0) {\r\n const msg = this.$t(\"forms.invalidform\").toString();\r\n this.displaySnackbar(msg);\r\n return;\r\n }\r\n\r\n this.loading = true;\r\n try {\r\n const end = \"/api/Account/ResetPassword\";\r\n const data = {\r\n token: this.token,\r\n email: this.userEmail,\r\n newPassword: this.passwordInput,\r\n };\r\n await api.post(end, data);\r\n this.done = true;\r\n const msg = this.$t(\"snack.auth.reset\").toString();\r\n this.displaySnackbar(msg);\r\n setTimeout(() => this.$router.push(\"/auth/login\"), 5 * 1000);\r\n } catch (error) {\r\n this.error = error;\r\n const msg = this.$t(\"snack.auth.resetfail\").toString();\r\n this.displaySnackbar(msg);\r\n }\r\n this.loading = false;\r\n }\r\n\r\n get hasError() {\r\n return (\r\n !!this.error ||\r\n this.passwordErrors.length > 0 ||\r\n this.confirmPasswordErrors.length > 0\r\n );\r\n }\r\n}\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NewPassword.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NewPassword.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./NewPassword.vue?vue&type=template&id=dc458ed4&\"\nimport script from \"./NewPassword.vue?vue&type=script&lang=ts&\"\nexport * from \"./NewPassword.vue?vue&type=script&lang=ts&\"\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 null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}