{"version":3,"sources":["webpack:///./src/views/RestorePasswordView.vue?da23","webpack:///./src/views/RestorePasswordView.vue?da21","webpack:///./src/views/RestorePasswordView.vue","webpack:///./src/views/RestorePasswordView.vue?863c"],"names":["_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_1","class","_hoisted_2","_hoisted_3","_createElementVNode","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","key","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","onSubmit","_withModifiers","submitForm","_createVNode","modelValue","form","password","$event","v$","$error","placeholder","_toDisplayString","$errors","$message","_createCommentVNode","confirmPassword","errorMessage","_defineComponent","__name","setup","__props","expose","__expose","typeAction","router","currentRoute","value","meta","mapActions","reset","activate","store","useStore","toast","useToast","ref","rules","computed","required","validatePassword","helpers","withMessage","newPasswordError","sameAsPassword","confirmPasswordError","sameAs","useVuelidate","async","$touch","isFormCorrect","$validate","dispatch","token","params","id","then","res","success","position","POSITION","TOP_LEFT","TOP_CENTER","data","push","catch","error","response","message","__returned__","PasswordProgress","InputPassword","Object","defineProperty","enumerable","__exports__"],"mappings":"uHAAA,W,gFCEA,MAAMA,EAAeC,IAAMC,yBAAa,mBAAmBD,EAAEA,IAAIE,0BAAcF,GACzEG,EAAa,CAAEC,MAAO,oBACtBC,EAAa,CAAED,MAAO,QACtBE,EAA2BP,EAAa,IAAmBQ,gCAAoB,MAAO,CAAEH,MAAO,SAAW,mBAAoB,IAC9HI,EAAa,CAAC,YACdC,EAAa,CAAEL,MAAO,cACtBM,EAA2BX,EAAa,IAAmBQ,gCAAoB,OAAQ,CAAEH,MAAO,SAAW,gBAAiB,IAC5HO,EAAa,CACjBC,IAAK,EACLR,MAAO,SAEHS,EAAa,CAAET,MAAO,cACtBU,EAA2Bf,EAAa,IAAmBQ,gCAAoB,OAAQ,CAAEH,MAAO,SAAW,wBAAyB,IACpIW,EAAc,CAClBH,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NjD,EAAaU,MAAQuC,EAAMC,SAASJ,KAAKK,WAIzCC,EAAe,CAAE7C,aAAYK,aAAYG,QAAOE,QAAOjB,eAAcX,OAAM+B,QAAO5B,KAAIN,aAAYmE,8BAAkB,mBAAqB,OAAOvB,QAAgB,cAAgB,OAAON,QAAW,eAAiB,OAAOF,QAAY,aAAe,OAAOO,QAAU,uBAAyB,OAAON,uBAAoB+B,2BAAejC,uBAAUF,aAAK,aAAe,OAAOX,cAAU,eAAiB,OAAOQ,QAAY,2BAA6B,OAAOY,2BAAwB,uBAAyB,OAAOF,uBAAoB,eAAiB,OAAOiB,QAAY,eAAiB,OAAOzB,SAE9kB,OADAqC,OAAOC,eAAeJ,EAAc,kBAAmB,CAAEK,YAAY,EAAO/C,OAAO,IAC5E0C,K,iCCvEP,MAAMM,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASnF,GAAQ,CAAC,YAAY,qBAE1E","file":"js/RestorePasswordView.e20c151d.js","sourcesContent":["export * from \"-!../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./RestorePasswordView.vue?vue&type=style&index=0&id=456781b9&lang=scss&scoped=true\"","import { createElementVNode as _createElementVNode, createVNode as _createVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-456781b9\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"restore-password\" }\nconst _hoisted_2 = { class: \"card\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"Change Password\", -1))\nconst _hoisted_4 = [\"onSubmit\"]\nconst _hoisted_5 = { class: \"form-group\" }\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"label\" }, \"New password\", -1))\nconst _hoisted_7 = {\n key: 0,\n class: \"error\"\n}\nconst _hoisted_8 = { class: \"form-group\" }\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"label\" }, \"Confirm new password\", -1))\nconst _hoisted_10 = {\n key: 0,\n class: \"error\"\n}\nconst _hoisted_11 = { class: \"form-group progress-bar\" }\nconst _hoisted_12 = {\n key: 0,\n class: \"error\"\n}\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"form-group\" }, [\n /*#__PURE__*/_createElementVNode(\"button\", { class: \"button primary large w-100\" }, \"Confirm\")\n], -1))\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _hoisted_3,\n _createElementVNode(\"form\", {\n onSubmit: _withModifiers($setup.submitForm, [\"prevent\"])\n }, [\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"label\", null, [\n _hoisted_6,\n _createVNode($setup[\"InputPassword\"], {\n modelValue: $setup.form.password,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (($setup.form.password) = $event)),\n \"input-classes\": ['input-large', { 'input--error': $setup.v$.password.$error }],\n placeholder: \"New password\"\n }, null, 8, [\"modelValue\", \"input-classes\"])\n ]),\n ($setup.v$.password.$error)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_7, _toDisplayString($setup.v$.password.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"label\", null, [\n _hoisted_9,\n _createVNode($setup[\"InputPassword\"], {\n modelValue: $setup.form.confirmPassword,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (($setup.form.confirmPassword) = $event)),\n \"input-classes\": ['input-large', { 'input--error': $setup.v$.confirmPassword.$error }],\n placeholder: \"Confirm new password\"\n }, null, 8, [\"modelValue\", \"input-classes\"]),\n ($setup.v$.confirmPassword.$error)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_10, _toDisplayString($setup.v$.confirmPassword.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_11, [\n _createVNode($setup[\"PasswordProgress\"], {\n password: $setup.form.password\n }, null, 8, [\"password\"]),\n ($setup.errorMessage)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_12, _toDisplayString($setup.errorMessage), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _hoisted_13\n ], 40, _hoisted_4)\n ])\n ]))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport PasswordProgress from \"@/components/ui/PasswordProgress.vue\";\nimport useVuelidate from \"@vuelidate/core\";\nimport { helpers, required, sameAs } from \"@vuelidate/validators\";\nimport { validatePassword } from \"@/helpers/validation\";\nimport InputPassword from \"@/components/ui/input/InputPassword.vue\";\nimport { computed, ref } from \"vue\";\nimport router from \"@/router\";\nimport { useStore } from \"vuex\";\nimport { confirmPasswordError, newPasswordError } from \"@/constants/validation\";\nimport { POSITION, useToast } from \"vue-toastification\";\n\ntype Action = \"activate\" | \"reset\";\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'RestorePasswordView',\n setup(__props, { expose: __expose }) {\n __expose();\n\nconst typeAction = router.currentRoute.value.meta.typeAction as Action;\nconst mapActions = {\n reset: \"user/changePassword\",\n activate: \"user/activatePassword\",\n};\nconst store = useStore();\nconst toast = useToast();\nconst errorMessage = ref(\"\");\n\nconst form = ref({\n password: \"\",\n confirmPassword: \"\",\n});\nconst rules = computed(() => ({\n password: {\n required,\n validatePassword: helpers.withMessage(newPasswordError, validatePassword),\n },\n confirmPassword: {\n required,\n sameAsPassword: helpers.withMessage(\n confirmPasswordError,\n sameAs(form.value.password)\n ),\n },\n}));\n\nconst v$ = useVuelidate(rules, form);\n\nconst submitForm = async () => {\n v$.value.$touch();\n const isFormCorrect = await v$.value.$validate();\n if (!isFormCorrect) return;\n\n await store\n .dispatch(mapActions[typeAction], {\n token: router.currentRoute.value.params.id,\n password: form.value.password,\n })\n .then((res) => {\n toast.success(typeAction === \"activate\"\n ? \"The account was activated successfully.\"\n : \"The password was updated successfully.\", {\n position: typeAction === \"activate\"\n ? POSITION.TOP_LEFT\n : POSITION.TOP_CENTER,\n });\n store.dispatch(\"user/setUserAndTokens\", res.data)\n .then(() => {\n router.push(\"/\");\n });\n })\n .catch((error) => {\n errorMessage.value = error.response.data.message;\n });\n};\n\nconst __returned__ = { typeAction, mapActions, store, toast, errorMessage, form, rules, v$, submitForm, PasswordProgress, get useVuelidate() { return useVuelidate }, get helpers() { return helpers }, get required() { return required }, get sameAs() { return sameAs }, get validatePassword() { return validatePassword }, InputPassword, computed, ref, get router() { return router }, get useStore() { return useStore }, get confirmPasswordError() { return confirmPasswordError }, get newPasswordError() { return newPasswordError }, get POSITION() { return POSITION }, get useToast() { return useToast } }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./RestorePasswordView.vue?vue&type=template&id=456781b9&scoped=true&ts=true&lang=pug\"\nimport script from \"./RestorePasswordView.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./RestorePasswordView.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./RestorePasswordView.vue?vue&type=style&index=0&id=456781b9&lang=scss&scoped=true\"\n\nimport exportComponent from \"/codebuild/output/src264950160/src/lottrackr-front/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-456781b9\"]])\n\nexport default __exports__"],"sourceRoot":""}