{"version":3,"sources":["webpack:///../../../src/components/VDataTable/VSimpleTable.ts","webpack:///./src/views/subscription/components/PurchaseOverview.vue?e814","webpack:///./src/views/subscription/components/PurchaseOverview.vue","webpack:///./src/views/subscription/components/PurchaseOverview.vue?c355","webpack:///./src/views/subscription/components/PurchaseOverview.vue?5dbb","webpack:///./src/views/subscription/components/PurchaseOverview.vue?7ec6"],"names":["mixins","Themeable","extend","name","props","dense","Boolean","fixedHeader","height","Number","String","computed","classes","this","$slots","top","bottom","themeClasses","methods","genWrapper","wrapper","$createElement","staticClass","style","convertToUnit","default","render","h","class","_vm","_h","_c","_self","VForm","VCard","VSimpleTable","staticStyle","_v","_s","$t","productName","pricingOptions","cycle","formatPrice","formatAmount","grossAmount","coupon","duration","discountPrice","_e","attrs","netTotal","reverseCharge","vatRate","euVat","vat_abbr","grossTotal","on","$event","preventDefault","redeemCoupon","VTextField","model","value","callback","$$v","couponCode","expression","VIcon","VBtn","removeCoupon","discountTime","VDivider","VSpacer","cancelPurchase","checkoutEnabled","subscriptionLoading","confirmPurchase","staticRenderFns","PurchaseOverview","url","window","location","origin","product","products","find","monthlyPrice","tier","yearlyPrice","duration_in_months","d","toString","amount","toFixed","parseFloat","step","endpoint","elements","paymentElementRef","addressElement","getElement","getValue","then","result","console","log","data","currency","priceId","isGermanTaxRate","couponId","userId","city","address","country","addressLine1","line1","addressLine2","line2","postalCode","postal_code","state","phoneNumber","phone","vatId","buyAsCompany","companyName","taxExempt","preferredLocale","LocalStorage","getLocale","api","post","subscription","displaySnackbar","confirmIntent","type","stripe","confirmSetup","confirmPayment","submit","submitError","error","clientSecret","confirmParams","return_url","messageContainer","document","querySelector","textContent","message","msg","response","end","get","fallback","EUVat","rates","$nextTick","vatValidated","Vue","__decorate","Prop","PropSync","Getter","Action","Watch","immediate","Component","component"],"mappings":"4LAOeA,sBAAOC,QAAWC,OAAO,CACtCC,KAAM,iBAENC,MAAO,CACLC,MAAOC,QACPC,YAAaD,QACbE,OAAQ,CAACC,O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gB,gBADpC0F,QACoB1F,WCzO0Z,I,wBCQ3a2F,EAAY,eACd,EACAhJ,EACAoD,GACA,EACA,KACA,KACA,MAIa,aAAA4F,E,oECnBf,W","file":"assets/js/chunk-1172fd10.97c52c87.js","sourcesContent":["import './VSimpleTable.sass'\n\nimport { convertToUnit } from '../../util/helpers'\nimport Themeable from '../../mixins/themeable'\nimport mixins from '../../util/mixins'\nimport { VNode } from 'vue'\n\nexport default mixins(Themeable).extend({\n name: 'v-simple-table',\n\n props: {\n dense: Boolean,\n fixedHeader: Boolean,\n height: [Number, String],\n },\n\n computed: {\n classes (): Record {\n return {\n 'v-data-table--dense': this.dense,\n 'v-data-table--fixed-height': !!this.height && !this.fixedHeader,\n 'v-data-table--fixed-header': this.fixedHeader,\n 'v-data-table--has-top': !!this.$slots.top,\n 'v-data-table--has-bottom': !!this.$slots.bottom,\n ...this.themeClasses,\n }\n },\n },\n\n methods: {\n genWrapper () {\n return this.$slots.wrapper || this.$createElement('div', {\n staticClass: 'v-data-table__wrapper',\n style: {\n height: convertToUnit(this.height),\n },\n }, [\n this.$createElement('table', this.$slots.default),\n ])\n },\n },\n\n render (h): VNode {\n return h('div', {\n staticClass: 'v-data-table',\n class: this.classes,\n }, [\n this.$slots.top,\n this.genWrapper(),\n this.$slots.bottom,\n ])\n },\n})\n","import { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VDivider } from 'vuetify/lib/components/VDivider';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VSimpleTable } from 'vuetify/lib/components/VDataTable';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\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(VForm,[_c(VCard,[_c(VCardText,[_c(VSimpleTable,[_c('thead',[_c('tr',[_c('th',{staticClass:\"text-left pr-0\",staticStyle:{\"width\":\"20px\"}},[_vm._v(\"#\")]),_c('th',{staticClass:\"text-left\",staticStyle:{\"min-width\":\"fit-content\"}},[_vm._v(\" \"+_vm._s(_vm.$t(\"subscription.product\"))+\" \")]),_c('th',{staticClass:\"text-left\",staticStyle:{\"min-width\":\"fit-content\"}},[_vm._v(\" \"+_vm._s(_vm.$t(\"subscription.cycle\"))+\" \")]),_c('th',{staticClass:\"text-left\",staticStyle:{\"min-width\":\"fit-content\"}},[_vm._v(\" \"+_vm._s(_vm.$t(\"subscription.duration\"))+\" \")]),_c('th',{staticClass:\"text-right\",staticStyle:{\"min-width\":\"fit-content\"}},[_vm._v(\" \"+_vm._s(_vm.$t(\"subscription.price\"))+\" \")])])]),_c('tbody',[_c('tr',[_c('td',[_vm._v(\"1\")]),_c('td',[_c('b',[_vm._v(_vm._s(_vm.productName))])]),_c('td',{staticClass:\"text-left\"},[_vm._v(\" \"+_vm._s(_vm.pricingOptions.cycle === \"year\" ? _vm.$t(\"subscription.perYear\") : _vm.$t(\"subscription.perMonth\"))+\" \")]),_c('td',{staticClass:\"text-left\"},[_vm._v(\" 1 \"+_vm._s(_vm.pricingOptions.cycle === \"year\" ? _vm.$t(\"subscription.year\") : _vm.$t(\"subscription.month\"))+\" \")]),_c('td',{staticClass:\"text-right\"},[_c('b',[_vm._v(_vm._s(_vm.formatPrice(_vm.formatAmount(_vm.grossAmount))))])])]),(_vm.coupon)?_c('tr',[_c('td',[_vm._v(\"2\")]),_c('td',[_c('b',[_vm._v(_vm._s(_vm.$t(\"subscription.coupon\"))+\": \"+_vm._s(_vm.coupon.name))])]),_c('td',{staticClass:\"text-left\"},[_vm._v(\" \"+_vm._s(_vm.pricingOptions.cycle === \"year\" ? _vm.$t(\"subscription.perYear\") : _vm.$t(\"subscription.perMonth\"))+\" \")]),_c('td',{staticClass:\"text-left\"},[_vm._v(\" \"+_vm._s(_vm.coupon.duration === \"forever\" ? _vm.$t(\"subscription.forever\") : _vm.coupon.duration)+\"* \")]),_c('td',{staticClass:\"text-right\"},[_c('b',[_vm._v(_vm._s(_vm.formatPrice( -(_vm.formatAmount(_vm.grossAmount) - _vm.formatAmount(_vm.discountPrice)) )))])])]):_vm._e()]),_c('tfoot',[_c('tr',[_c('td',{staticStyle:{\"padding\":\"0\",\"height\":\"20px\",\"border\":\"0\"},attrs:{\"colspan\":\"5\"}},[_c('div',{staticClass:\"w-full mt-16\"})])]),_c('tr',[_c('td',{staticClass:\"pl-0\",staticStyle:{\"border\":\"0\"},attrs:{\"colspan\":\"3\"}},[_c('b',[_vm._v(_vm._s(_vm.$t(\"subscription.netTotal\"))+\":\")])]),_c('td',{staticClass:\"text-right pr-0\",staticStyle:{\"border\":\"0\"},attrs:{\"colspan\":\"2\"}},[_c('b',[_vm._v(_vm._s(_vm.formatPrice(_vm.formatAmount(_vm.netTotal))))])])]),_c('tr',[_c('td',{staticClass:\"pl-0\",staticStyle:{\"border\":\"0\",\"vertical-align\":\"top\"},attrs:{\"colspan\":\"3\"}},[_vm._v(\" \"+_vm._s(_vm.reverseCharge ? 0 : _vm.vatRate)+\"% \"+_vm._s(_vm.euVat.vat_abbr || _vm.$t(\"subscription.vat\"))+\": \"),(_vm.reverseCharge)?_c('div',{staticClass:\"caption mt-2 mb-6 grey--text\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"subscription.reverseCharge\"))+\" \")]):_vm._e()]),_c('td',{staticClass:\"text-right pr-0\",staticStyle:{\"border\":\"0\",\"vertical-align\":\"top\"},attrs:{\"colspan\":\"2\"}},[_vm._v(\" \"+_vm._s(_vm.reverseCharge ? _vm.formatPrice(0) : _vm.formatPrice( _vm.formatAmount(_vm.grossTotal) - _vm.formatAmount(_vm.netTotal) ))+\" \"),(_vm.reverseCharge)?_c('br'):_vm._e(),(_vm.reverseCharge)?_c('div',{staticClass:\"caption mt-2 mb-6 grey--text\"},[_vm._v(\" (excl. \"+_vm._s(_vm.formatPrice( _vm.formatAmount(_vm.grossTotal) - _vm.formatAmount(_vm.netTotal) ))+\") \")]):_vm._e()])]),_c('tr',[_c('td',{staticClass:\"pl-0 text-h6\",staticStyle:{\"border-top\":\"2px solid\"},attrs:{\"colspan\":\"3\"}},[_c('b',[_vm._v(_vm._s(_vm.$t(\"subscription.total\"))+\":\")])]),_c('td',{staticClass:\"text-right pr-0 text-h6\",staticStyle:{\"border-top\":\"2px solid\"},attrs:{\"colspan\":\"2\"}},[_c('b',[_vm._v(_vm._s(_vm.reverseCharge ? _vm.formatPrice(_vm.formatAmount(_vm.netTotal)) : _vm.formatPrice(_vm.formatAmount(_vm.grossTotal))))])])])])])],1),_c('div',{staticClass:\"d-flex my-6 justify-start align-center pl-4\",staticStyle:{\"margin-left\":\"auto\"}},[(_vm.coupon !== 'fba')?_c(VForm,{staticStyle:{\"min-width\":\"200px\",\"height\":\"3em\",\"margin-bottom\":\"-6px\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.redeemCoupon($event)}}},[_c(VTextField,{staticClass:\"input-fix\",attrs:{\"outlined\":\"\",\"dense\":\"\",\"placeholder\":_vm.$t('subscription.enterCode'),\"readonly\":!!_vm.coupon,\"disabled\":!!_vm.coupon,\"append-icon\":_vm.coupon ? 'mdi-check-circle' : 'mdi-receipt-text-plus',\"color\":_vm.coupon && 'success',\"background-color\":_vm.coupon && '#fafafa'},on:{\"click:append\":_vm.redeemCoupon},model:{value:(_vm.couponCode),callback:function ($$v) {_vm.couponCode=$$v},expression:\"couponCode\"}})],1):_c('div',{staticClass:\"d-flex caption justify-center align-center\",staticStyle:{\"height\":\"3em\"}},[_c(VIcon,{staticClass:\"mr-2\"},[_vm._v(\"mdi-check-circle\")]),_c('span',[_vm._v(_vm._s(_vm.couponCode)+\" (\"+_vm._s(_vm.$t(\"subscription.redeemed\"))+\")\")])],1),(_vm.coupon)?_c(VBtn,{staticClass:\"ml-4\",staticStyle:{\"height\":\"3em\"},attrs:{\"text\":\"\"},on:{\"click\":_vm.removeCoupon}},[_vm._v(_vm._s(_vm.$t(\"subscription.remove\")))]):_c(VBtn,{staticClass:\"ml-4\",staticStyle:{\"height\":\"3em\"},attrs:{\"text\":\"\"},on:{\"click\":_vm.redeemCoupon}},[_vm._v(_vm._s(_vm.$t(\"subscription.redeem\")))])],1),(_vm.discountTime)?_c('div',{staticClass:\"caption text-left mt-4 pl-4\"},[_c('i',[_vm._v(_vm._s(_vm.discountTime))])]):_vm._e(),_c(VCardText,{staticClass:\"stripe-caption\"},[_vm._v(_vm._s(_vm.$t(\"subscription.legalNotice\")))]),_c(VDivider,{staticClass:\"my-4\"}),_c(VCardActions,[_c(VSpacer),_c(VBtn,{attrs:{\"elevation\":\"0\",\"color\":\"accent\"},on:{\"click\":_vm.cancelPurchase}},[_c('span',{staticClass:\"main--text\"},[_vm._v(_vm._s(_vm.$t(\"subscription.back\")))])]),_c(VBtn,{attrs:{\"elevation\":\"0\",\"color\":\"primary\",\"disabled\":!_vm.checkoutEnabled || _vm.subscriptionLoading,\"loading\":_vm.subscriptionLoading},on:{\"click\":_vm.confirmPurchase}},[_c('span',[_vm._v(_vm._s(_vm.$t(\"subscription.purchaseSubscription\")))])])],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\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\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\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 api from \"@/core/utils/api\";\r\nimport { Product, User } from \"@/core/models\";\r\nimport { Action, Getter } from \"vuex-class\";\r\nimport { Component, Prop, PropSync, Watch } from \"vue-property-decorator\";\r\nimport { StripeElements } from \"@stripe/stripe-js\";\r\nimport { EUVat, EUVatRate } from \"@/core/plugins/eu-vat-rates\";\r\nimport LocalStorage from \"@/core/utils/LocalStorage\";\r\n\r\n@Component\r\nexport default class PurchaseOverview extends Vue {\r\n @Prop({ default: () => null }) pricingOptions!: {\r\n tier: string;\r\n cycle: string;\r\n };\r\n @Prop({ default: () => false }) loading!: boolean;\r\n @Prop({ default: () => 0 }) grossAmount!: number;\r\n @Prop({ default: () => 0 }) netTotal!: number;\r\n @Prop({ default: () => 0 }) grossTotal!: number;\r\n @Prop({ default: () => 0 }) discountPrice!: number;\r\n @PropSync(\"stepProp\", { type: Number }) step!: number;\r\n @PropSync(\"checkoutEnabledProp\", { type: Boolean }) checkoutEnabled!: boolean;\r\n @PropSync(\"paymentElementRefProp\", {})\r\n paymentElementRef!: HTMLFormElement | null;\r\n @PropSync(\"couponProp\", {}) coupon!: any | null;\r\n @PropSync(\"vatIdProp\", { type: String }) vatId!: string;\r\n @PropSync(\"companyNameProp\", { type: String }) companyName!: string;\r\n @PropSync(\"countryProp\", { type: String }) country!: string;\r\n @PropSync(\"buyAsCompanyProp\", { type: Boolean }) buyAsCompany!: boolean;\r\n @PropSync(\"vatValidatedProp\", { type: Boolean }) vatValidated!: boolean;\r\n @PropSync(\"euVatProp\", {}) euVat!: EUVatRate;\r\n @PropSync(\"vatRateProp\", { type: Number }) vatRate!: number;\r\n @PropSync(\"taxExemptProp\", { type: String }) taxExempt!: string;\r\n @PropSync(\"reverseChargeProp\", { type: Boolean }) reverseCharge!: boolean;\r\n @Getter(\"products/products\") products!: Product[];\r\n @Getter(\"profile/id\") userId!: User;\r\n @Action(\"displaySnackbar\") displaySnackbar!: Function;\r\n\r\n couponCode = \"\";\r\n subscriptionLoading = false;\r\n url = window.location.origin;\r\n\r\n get productName() {\r\n const product = this.products.find(\r\n product =>\r\n product.monthlyPrice === this.pricingOptions.tier ||\r\n product.yearlyPrice === this.pricingOptions.tier,\r\n );\r\n return product ? product.name : \"\";\r\n }\r\n\r\n get discountTime() {\r\n if (!this.coupon) return null;\r\n const { duration_in_months, duration } = this.coupon;\r\n return duration === \"forever\"\r\n ? this.$t(\"subscription.discountForever\")\r\n : this.$t(\"subscription.discountMonths\", {\r\n d: duration_in_months,\r\n }).toString();\r\n }\r\n\r\n formatPrice(amount: number) {\r\n return `${amount.toFixed(2)} EUR`;\r\n }\r\n\r\n formatAmount(amount: number) {\r\n // Use on all calculations with currency amounts per value to prevent 3rd decimal (.xx5) rounding issues of percent/tax calculations\r\n return parseFloat((amount / 100).toFixed(2));\r\n }\r\n\r\n cancelPurchase() {\r\n this.step = 1;\r\n }\r\n\r\n removeCoupon() {\r\n this.coupon = null;\r\n this.couponCode = \"\";\r\n }\r\n\r\n async confirmPurchase() {\r\n this.subscriptionLoading = true;\r\n\r\n let data;\r\n const endpoint = \"/api/Purchase/PurchaseSubscription\";\r\n\r\n const elements = (this.paymentElementRef\r\n ?.elements as unknown) as StripeElements;\r\n\r\n const addressElement = elements.getElement(\"address\");\r\n await addressElement?.getValue().then(result => {\r\n console.log(result);\r\n\r\n data = {\r\n currency: \"EUR\",\r\n priceId: this.pricingOptions.tier,\r\n isGermanTaxRate: true,\r\n couponId: this.couponCode,\r\n userId: this.userId,\r\n city: result.value.address.city,\r\n country: result.value.address.country,\r\n addressLine1: result.value.address.line1,\r\n addressLine2: result.value.address.line2,\r\n postalCode: result.value.address.postal_code,\r\n state: result.value.address.state,\r\n phoneNumber: result.value.phone,\r\n vatId: this.buyAsCompany ? this.vatId : null,\r\n companyName: this.buyAsCompany ? this.companyName : null,\r\n taxExempt: this.taxExempt, // One of none, exempt, or reverse.\r\n preferredLocale: LocalStorage.getLocale() || \"EN\",\r\n };\r\n });\r\n\r\n try {\r\n const subscription = (await api.post(endpoint, data)) as any;\r\n\r\n console.log(subscription);\r\n\r\n this.displaySnackbar(this.$t(\"snack.stripe.subscribing\"));\r\n\r\n const confirmIntent =\r\n subscription.type === \"setup\"\r\n ? this.paymentElementRef?.stripe.confirmSetup\r\n : this.paymentElementRef?.stripe.confirmPayment;\r\n\r\n // Manual elements submit method for more control on error handling & param overrides\r\n if (this.paymentElementRef?.stripe) {\r\n const { error: submitError } = await elements.submit();\r\n if (submitError) {\r\n console.error(submitError);\r\n return;\r\n }\r\n\r\n const { error } = confirmIntent({\r\n //`Elements` instance that was used to create the Payment Element\r\n elements: elements,\r\n clientSecret: subscription.clientSecret,\r\n confirmParams: {\r\n return_url: `${this.url}/subscription/checkout`,\r\n },\r\n //redirect: \"if_required\",\r\n });\r\n\r\n if (error) {\r\n console.error(error);\r\n // This point will only be reached if there is an immediate error when\r\n // confirming the payment. Show error to your customer (for example, payment\r\n // details incomplete)\r\n const messageContainer = document.querySelector(\"#error-message\");\r\n if (messageContainer)\r\n messageContainer.textContent = error.message as string;\r\n this.subscriptionLoading = false;\r\n } else {\r\n // Your customer will be redirected to your `return_url`. For some payment\r\n // methods like iDEAL, your customer will be redirected to an intermediate\r\n // site first to authorize the payment, then redirected to the `return_url`.\r\n }\r\n }\r\n } catch (error: any) {\r\n console.log(error);\r\n const msg =\r\n error.response?.data?.message ||\r\n this.$t(\"snack.stripe.pfail\").toString();\r\n this.displaySnackbar(msg);\r\n this.subscriptionLoading = false;\r\n }\r\n }\r\n\r\n async redeemCoupon() {\r\n if (!this.couponCode) {\r\n const msg = this.$t(\"snack.stripe.entercode\").toString();\r\n this.displaySnackbar(msg);\r\n return;\r\n }\r\n\r\n try {\r\n const end = `/api/Coupons/${this.couponCode}`;\r\n this.coupon = await api.get(end);\r\n } catch (error: any) {\r\n const fallback = this.$t(\"snack.stripe.codeinvalid\").toString();\r\n const msg = error.message || fallback;\r\n this.displaySnackbar(msg);\r\n }\r\n }\r\n\r\n @Watch(\"country\", { immediate: true })\r\n async updateVatRate() {\r\n const { [this.country]: euVat } = EUVat.rates;\r\n this.euVat = euVat || {};\r\n this.$nextTick().then(() => {\r\n if (this.buyAsCompany && this.euVat && this.vatValidated)\r\n if (this.euVat.country === \"Germany\") {\r\n console.log(\"No Reverse Charge in DE\");\r\n this.reverseCharge = false;\r\n } else if (!this.euVat.country) {\r\n console.log(\"No Reverse Charge (outside EU) in\", this.country);\r\n this.reverseCharge = false;\r\n } else {\r\n console.log(\"Apply Reverse Charge in\", this.country);\r\n this.reverseCharge = true;\r\n }\r\n else {\r\n console.log(\"No valid Company - Apply default tax in\", this.country);\r\n this.reverseCharge = false;\r\n }\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!./PurchaseOverview.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!./PurchaseOverview.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./PurchaseOverview.vue?vue&type=template&id=fe85b994&\"\nimport script from \"./PurchaseOverview.vue?vue&type=script&lang=ts&\"\nexport * from \"./PurchaseOverview.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./PurchaseOverview.vue?vue&type=style&index=0&id=fe85b994&prod&lang=css&\"\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","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PurchaseOverview.vue?vue&type=style&index=0&id=fe85b994&prod&lang=css&\""],"sourceRoot":""}