{"version":3,"sources":["webpack:///./src/views/pages/app/register.vue?bc7e","webpack:///./node_modules/cache-loader/dist/cjs.js","webpack:///./src/views/pages/app/register.vue?9d51","webpack:///./src/views/pages/app/register.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","staticClass","_v","_s","$t","on","onValid","model","value","callback","$$v","errorResponse","expression","isFormValid","isLoading","performRegistration","staticRenderFns","Vue","extend","components","pRequestAlert","layout","data","login","register","undefined","methods","$set","userData","$shoppingBasket","getInvoiceAddress","$service","api","userAccount","postRegister","then","response","_this","setAccount","self","addresses","forEach","address","addressType","setInvoiceAddress","$router","replace","catch","error","console","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,QAAQ,CAACE,MAAM,CAAC,OAAS,GAAG,cAAc,GAAG,eAAe,GAAG,iBAAiB,KAAK,CAACF,EAAG,SAAS,CAACE,MAAM,CAAC,MAAQ,QAAQ,CAACF,EAAG,QAAQ,CAACE,MAAM,CAAC,cAAc,KAAK,CAACF,EAAG,QAAQ,CAACG,YAAY,OAAOD,MAAM,CAAC,KAAO,KAAK,CAACF,EAAG,YAAY,CAACE,MAAM,CAAC,MAAQ,GAAG,MAAQ,OAAO,KAAO,KAAK,CAACF,EAAG,KAAK,CAACJ,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIU,GAAG,4BAA4BN,EAAG,MAAM,CAACG,YAAY,QAAQ,CAACH,EAAG,iBAAiB,CAACE,MAAM,CAAC,cAAa,EAAM,4BAA2B,GAAOK,GAAG,CAAC,MAAQX,EAAIY,YAAY,GAAGR,EAAG,QAAQ,CAACG,YAAY,QAAQ,CAACH,EAAG,QAAQ,CAACE,MAAM,CAAC,KAAO,KAAK,CAACF,EAAG,kBAAkB,CAACS,MAAM,CAACC,MAAOd,EAAiB,cAAEe,SAAS,SAAUC,GAAMhB,EAAIiB,cAAcD,GAAKE,WAAW,oBAAoB,GAAGd,EAAG,QAAQ,CAACE,MAAM,CAAC,cAAc,GAAG,OAAS,KAAK,CAACF,EAAG,WAAW,CAACE,MAAM,CAAC,UAAYN,EAAImB,aAAenB,EAAIoB,UAAU,QAAUpB,EAAIoB,UAAU,KAAO,IAAIT,GAAG,CAAC,MAAQX,EAAIqB,sBAAsB,CAACrB,EAAIQ,GAAG,IAAIR,EAAIS,GAAGT,EAAIU,GAAG,mBAAmB,QAAQ,IAAI,IAAI,IAAI,IAAI,IAAI,IAC7gCY,EAAkB,G,kEC8BPC,SAAIC,OAAO,CACxBC,WAAY,CAAEC,cAAa,QAC3BC,OAAQ,UACRC,KAAM,WAAM,MAAC,CACXC,MAAO,GACPC,SAAU,GACVV,WAAW,EACXD,aAAa,EACbF,mBAAec,IAEjBC,QAAS,CACPpB,QAAA,SAAQO,GACNlB,KAAKgC,KAAKhC,KAAM,cAAekB,IAEjCE,oBAAA,sBACEpB,KAAKmB,WAAY,EACjB,IAAMc,EAAWjC,KAAKkC,gBAAgBC,oBACtCnC,KAAKoC,SAASC,IAAIC,YAAYC,aAAaN,GACxCO,MAAK,SAACC,GACLC,EAAKvB,WAAY,EACjBuB,EAAKR,gBAAgBS,WAAWF,GAChC,IAAMG,EAAOF,EACbD,EAASI,UAAUC,SAAQ,SAACC,GACE,IAAxBA,EAAQC,aACVJ,EAAKV,gBAAgBe,kBAAkBF,MAG3CL,EAAKQ,QAAQC,QAAQ,uBAEtBC,OAAM,SAACC,GACNX,EAAKvB,WAAY,EACjBmC,QAAQD,MAAMA,GACdX,EAAK1B,cAAgBqC,SC/Dgb,I,YCO3cE,EAAY,eACd,EACAzD,EACAuB,GACA,EACA,KACA,KACA,MAIa,aAAAkC,E","file":"js/chunk-2d0d2ba2.d850690c.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p-row',{attrs:{\"column\":\"\",\"fill-height\":\"\",\"align-center\":\"\",\"justify-center\":\"\"}},[_c('p-card',{attrs:{\"width\":\"66%\"}},[_c('p-row',{attrs:{\"fill-height\":\"\"}},[_c('p-col',{staticClass:\"pa-3\",attrs:{\"xs12\":\"\"}},[_c('p-toolbar',{attrs:{\"dense\":\"\",\"color\":\"base\",\"card\":\"\"}},[_c('h6',[_vm._v(_vm._s(_vm.$t('login.registration')))])]),_c('div',{staticClass:\"mt-4\"},[_c('v-form-address',{attrs:{\"show-title\":false,\"can-set-delivery-address\":false},on:{\"valid\":_vm.onValid}})],1),_c('p-row',{staticClass:\"mt-4\"},[_c('p-col',{attrs:{\"grow\":\"\"}},[_c('p-request-alert',{model:{value:(_vm.errorResponse),callback:function ($$v) {_vm.errorResponse=$$v},expression:\"errorResponse\"}})],1),_c('p-col',{attrs:{\"justify-end\":\"\",\"shrink\":\"\"}},[_c('p-button',{attrs:{\"disabled\":!_vm.isFormValid || _vm.isLoading,\"loading\":_vm.isLoading,\"text\":\"\"},on:{\"click\":_vm.performRegistration}},[_vm._v(\" \"+_vm._s(_vm.$t('login.register'))+\" \")])],1)],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\nimport pRequestAlert from '@glittr/frontend-core/src/components/p-request-alert/p-request-alert.vue';\nimport Vue from 'vue';\n\nexport default Vue.extend({\n components: { pRequestAlert },\n layout: 'reduced',\n data: () => ({\n login: {},\n register: {},\n isLoading: false,\n isFormValid: false,\n errorResponse: undefined as any,\n }),\n methods: {\n onValid(isFormValid: boolean) {\n this.$set(this, 'isFormValid', isFormValid);\n },\n performRegistration() {\n this.isLoading = true;\n const userData = this.$shoppingBasket.getInvoiceAddress();\n this.$service.api.userAccount.postRegister(userData!)\n .then((response) => {\n this.isLoading = false;\n this.$shoppingBasket.setAccount(response);\n const self = this;\n response.addresses.forEach((address) => {\n if (address.addressType === 0) {\n self.$shoppingBasket.setInvoiceAddress(address);\n }\n });\n this.$router.replace('register-success');\n })\n .catch((error: any) => {\n this.isLoading = false;\n console.error(error);\n this.errorResponse = error;\n });\n },\n },\n});\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./register.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./register.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./register.vue?vue&type=template&id=2c5a41a4&\"\nimport script from \"./register.vue?vue&type=script&lang=ts&\"\nexport * from \"./register.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":""}