{"version":3,"sources":["webpack:///./src/views/ConfirmRegistrationView.vue?5e14","webpack:///./src/views/ConfirmRegistrationView.vue","webpack:///./src/views/ConfirmRegistrationView.vue?14cb","webpack:///./src/views/ConfirmRegistrationView.vue?c647"],"names":["_hoisted_1","class","_hoisted_2","key","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","showSpinner","_createCommentVNode","_defineComponent","__name","setup","__props","expose","__expose","toast","useToast","store","useStore","ref","redirectUrl","router","currentRoute","value","query","isDefaultConfirmRegistration","computed","name","verify","token","action","setTimeout","dispatch","then","success","position","POSITION","TOP_LEFT","timeout","push","String","catch","error","finally","onMounted","id","params","__returned__","Object","defineProperty","enumerable","__exports__"],"mappings":"8IAEA,MACMA,EAAa,CAAEC,MAAO,+BACtBC,EAAa,CACjBC,IAAK,EACLF,MAAO,WAGH,SAAUG,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,OAAQC,yBAAcC,gCAAoB,MAAOZ,EAAY,CAC1DQ,EAAOK,aACHF,yBAAcC,gCAAoB,MAAOV,IAC1CY,gCAAoB,IAAI,K,kDCNJC,+BAAiB,CAC3CC,OAAQ,0BACRC,MAAMC,GAAWC,OAAQC,IACzBA,IAEF,MAAMC,EAAQC,iBACRC,EAAQC,iBACRX,EAAcY,kBAAI,IAClB,YAAEC,GAAgBC,aAAOC,aAAaC,MAAMC,MAE5CC,EAA+BC,sBAAS,IACF,wBAAnCL,aAAOC,aAAaC,MAAMI,MAG7BC,EAAUC,IACd,MAAMC,EAASL,EAA6BF,MACxC,cACA,kCACJhB,EAAYgB,OAAQ,EACpBQ,WAAW,KACTd,EACGe,SAASF,EAAQD,GACjBI,KAAK,KACJlB,EAAMmB,QAAQ,kCAAmC,CAC/CC,SAAUC,OAASC,SACnBC,QAAS,MAEXP,WAAW,KACTV,aAAOkB,KAAKd,EAA6BF,MACrCiB,OAAOpB,GACP,MAEH,OAEJqB,MAAM,KACL1B,EAAM2B,MAAM,uBAAwB,CAClCP,SAAUC,OAASC,SACnBC,QAAS,MAEXP,WAAW,KACTV,aAAOkB,KAAK,MACX,OAEJI,QAAQ,KACPpC,EAAYgB,OAAQ,KAEvB,OAELqB,uBAAU,KACR,MAAM,GAAEC,GAAOxB,aAAOC,aAAaC,MAAMuB,OACzClB,EAAOY,OAAOK,MAGhB,MAAME,EAAe,CAAEhC,QAAOE,QAAOV,cAAaa,cAAaK,+BAA8BG,SAAQF,uBAAUkB,yBAAWzB,aAAK,aAAe,OAAOE,cAAU,eAAiB,OAAOH,QAAY,eAAiB,OAAOkB,QAAY,eAAiB,OAAOpB,SAE/P,OADAgC,OAAOC,eAAeF,EAAc,kBAAmB,CAAEG,YAAY,EAAO3B,OAAO,IAC5EwB,K,iCCvDP,MAAMI,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASrD,GAAQ,CAAC,YAAY,qBAE1E,gB,yDCTf","file":"js/ConfirmRegistration.d314b857.js","sourcesContent":["import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-195642bf\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"container container--verify\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"spinner\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n ($setup.showSpinner)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : _createCommentVNode(\"\", true)\n ]))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { computed, onMounted, ref } from \"vue\";\nimport router from \"@/router\";\nimport { useStore } from \"vuex\";\nimport { POSITION, useToast } from \"vue-toastification\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ConfirmRegistrationView',\n setup(__props, { expose: __expose }) {\n __expose();\n\nconst toast = useToast();\nconst store = useStore();\nconst showSpinner = ref(false);\nconst { redirectUrl } = router.currentRoute.value.query;\n\nconst isDefaultConfirmRegistration = computed(() => {\n return router.currentRoute.value.name === \"ConfirmRegistration\";\n});\n\nconst verify = (token: string) => {\n const action = isDefaultConfirmRegistration.value\n ? \"user/verify\"\n : \"user/verifyUnregisteredCustomer\";\n showSpinner.value = true;\n setTimeout(() => {\n store\n .dispatch(action, token)\n .then(() => {\n toast.success(\"Email was verified successfully\", {\n position: POSITION.TOP_LEFT,\n timeout: 3000,\n });\n setTimeout(() => {\n router.push(isDefaultConfirmRegistration.value\n ? String(redirectUrl)\n : \"/\"\n );\n }, 3000);\n })\n .catch(() => {\n toast.error(\"The link has expired\", {\n position: POSITION.TOP_LEFT,\n timeout: 3000,\n });\n setTimeout(() => {\n router.push(\"/\");\n }, 3000);\n })\n .finally(() => {\n showSpinner.value = false;\n });\n }, 1200);\n};\nonMounted(() => {\n const { id } = router.currentRoute.value.params;\n verify(String(id));\n});\n\nconst __returned__ = { toast, store, showSpinner, redirectUrl, isDefaultConfirmRegistration, verify, computed, onMounted, ref, get router() { return router }, get useStore() { return useStore }, get POSITION() { return POSITION }, get useToast() { return useToast } }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./ConfirmRegistrationView.vue?vue&type=template&id=195642bf&scoped=true&ts=true&lang=pug\"\nimport script from \"./ConfirmRegistrationView.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ConfirmRegistrationView.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ConfirmRegistrationView.vue?vue&type=style&index=0&id=195642bf&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-195642bf\"]])\n\nexport default __exports__","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!./ConfirmRegistrationView.vue?vue&type=style&index=0&id=195642bf&lang=scss&scoped=true\""],"sourceRoot":""}