![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/vreg/node_modules/.cache/nuxt/dist/server/pages/wi/ |
{"version":3,"file":"pages/wi/verify.js","sources":["webpack:///./pages/wi/verify.vue?0d55","webpack:///./pages/wi/verify.vue?fcbb","webpack:///./pages/wi/verify.vue?c34c","webpack:///./pages/wi/verify.vue?7fbf","webpack:///./pages/wi/verify.vue","webpack:///./pages/wi/verify.vue?7971","webpack:///./pages/wi/verify.vue?e9e6","webpack:///./components/Forms/InputField.vue?b99a","webpack:///./components/Forms/InputField.vue","webpack:///./components/Forms/InputField.vue?b7d9","webpack:///./components/Forms/InputField.vue?be57","webpack:///./components/Forms/InputField.vue?bf7d","webpack:///./components/Forms/FormErrorMsg.vue?9f25","webpack:///./mixins/forms.js","webpack:///./components/Forms/FormErrorMsg.vue?497a","webpack:///./components/Forms/FormErrorMsg.vue","webpack:///./components/Forms/FormErrorMsg.vue?5544","webpack:///./components/Forms/FormErrorMsg.vue?6e2b","webpack:///./components/Forms/InputField.vue?db84","webpack:///./components/Forms/InputField.vue?fbac","webpack:///./components/Forms/FormErrorMsg.vue?6c28","webpack:///./components/Forms/FormErrorMsg.vue?d1be"],"sourcesContent":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./verify.vue?vue&type=style&index=0&lang=css&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add CSS to SSR context\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesServer.js\").default\nmodule.exports.__inject__ = function (context) {\n add(\"488bf3a4\", content, true, context)\n};","export * from \"-!../../node_modules/vue-style-loader/index.js??ref--3-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./verify.vue?vue&type=style&index=0&lang=css&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".loading{min-height:457px;background:#f0f4f8;padding:40px 0 50px}.loading-box{max-width:580px;margin:0 auto;border-radius:4px;box-shadow:0 5px 15px rgba(0,0,0,.15);padding:25px 40px 32px}.loading-bar,.loading-box{width:100%;background:#fff}.loading-bar{border:1px solid #9ca3b5;border-radius:4px;height:8px;position:relative;margin-bottom:36px}@-webkit-keyframes progress-animation{0%{width:0}20%{width:14%}55%{width:41.2%}to{width:85.4%}}@keyframes progress-animation{0%{width:0}20%{width:14%}55%{width:41.2%}to{width:85.4%}}@-webkit-keyframes complete-progress-animation{0%{width:85.4%}20%{width:95%}55%{width:99%}to{width:100%}}@keyframes complete-progress-animation{0%{width:85.4%}20%{width:95%}55%{width:99%}to{width:100%}}.loading-bar .inner{position:absolute;left:-1px;top:-1px;height:8px;background:#006bcd;border-radius:4px;width:85.4%;-webkit-animation:progress-animation 10s ease-in-out;animation:progress-animation 10s ease-in-out}.loading-bar .inner.completed{width:calc(100% + 2px);-webkit-animation:complete-progress-animation 2s ease-in-out;animation:complete-progress-animation 2s ease-in-out}.loading-step{border:1px solid #9ca3b5;background:#fff;border-radius:4px;margin-bottom:15px;position:relative;padding:13px 45px 14px 18px;transition:all .3s ease-in}.loading-step p{margin:0;color:#1d2e59}.loading-step .error-image{width:16px;height:16px}.loading-step .error-image,.loading-step .loading-image{position:absolute;right:3px;top:50%;transform:translateY(-50%);opacity:1;transition:all .3s ease-in}.loading-step .error-image,.loading-step .loaded-image{position:absolute;right:12px;top:47%;transform:translateY(-50%);opacity:0;transition:all .3s ease-in}.loading-step.done{border:1px solid #4bbf64}.loading-step.done .loading-image,.loading-step.error .loading-image{opacity:0}.loading-step.done .loaded-image,.loading-step.error .error-image{opacity:1}@media only screen and (max-width:767px){.loading-box{padding:25px 20px 32px}}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._ssrNode(\"<h1>Verify</h1> <p class=\\\"description\\\">Verifying information ...</p> <div class=\\\"loading-bar\\\"><div\"+(_vm._ssrClass(\"inner\",_vm.loadingBarInnerClass))+\"></div></div> \"+(_vm._ssrList((_vm.steps),function(step){return (((step.status !== 'pending')?(\"<div\"+(_vm._ssrClass(\"loading-step\",step.status))+\"><p>\"+_vm._ssrEscape(_vm._s(step.status !== 'done'?step.waiting_text:step.done_text))+\"</p> \"+((step.hint_text)?(\"<small>\"+_vm._ssrEscape(_vm._s(step.hint_text))+\"</small>\"):\"<!---->\")+\" <img src=\\\"/images/verify/loading-blue.gif\\\" alt=\\\"Loading\\\" class=\\\"loading-image\\\"> <img src=\\\"/images/verify/form-tick.svg\\\" alt=\\\"Loaded\\\" class=\\\"loaded-image\\\"> <img src=\\\"/images/verify/cross.svg\\\" alt=\\\"Loaded\\\" class=\\\"error-image\\\"></div>\"):\"<!---->\"))}))+\" \"),_c('b-modal',{attrs:{\"id\":\"error-message-modal\",\"hide-footer\":\"\",\"hide-header\":\"\",\"body-class\":\"p-3\"}},[_c('div',{staticClass:\"text-center\"},[_c('p',{staticClass:\"text-danger text-center mt-3\"},[_vm._v(\"\\n \"+_vm._s(_vm.errorMessage)+\"\\n \")]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('b-button',{staticClass:\"dark-btn pull-right\",on:{\"click\":function($event){return _vm.$bvModal.hide('error-message-modal')}}},[_vm._v(\"Close\")])],1)]),_vm._ssrNode(\" \"),_c('b-modal',{attrs:{\"id\":\"suggestion-modal\",\"hide-footer\":\"\",\"body-class\":\"px-5 py-3\",\"title\":\"Car Registration\"}},[_c('div',[_c('ul',{staticClass:\"pl-0 suggestions-list\"},[_c('li',[_vm._v(\"\\n Confirm that you are using the exact tag on vehicle's registrations\\n\\n \")]),_c('li',[_vm._v(\"\\n Double check your plate entry for typos\\n \")]),_vm._v(\" \"),_c('li',[_vm._v(\"\\n Make sure you are using the Correct ZIPCODE on file with the DMV\\n \")])]),_vm._v(\" \"),_c('p',{staticClass:\"text-danger text-center mt-4\"},[_c('b-button',{staticClass:\"btn btn-success\",staticStyle:{\"width\":\"70%\"},on:{\"click\":function($event){return _vm.$router.push({path:'/wi/step-1'})}}},[_vm._v(\"\\n Re-enter info\\n \")])],1)])])],2)}\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\nimport forms from \"@/mixins/forms\";\n\nexport default {\n name: \"verify\",\n mixins: [forms],\n middleware({store: {state}, redirect, route: {path}}) {\n if (Object.keys(state.step2Form).length === 0) {\n return redirect('/wi/step-1');\n }\n },\n data() {\n return {\n loadingBarInnerClass: '',\n errorMessage: '',\n steps: {\n verify_information: {\n status: 'in_progress',\n waiting_text: 'Your information is being verified',\n done_text: 'Your information is verified',\n },\n searching_vehicle: {\n status: 'pending',\n waiting_text: 'Searching database for vehicle to renew',\n done_text: 'Vehicle found in database',\n },\n finalizing_app: {\n status: 'pending',\n waiting_text: 'Finalizing application',\n hint_text: 'Do not click Back or Refresh.',\n done_text: 'Your application is ready',\n },\n },\n verifyInformation: null,\n searchingVehicle: null,\n }\n },\n mounted() {\n this.verifyInformation = setTimeout(() => {\n this.steps.searching_vehicle.status = 'in_progress';\n this.steps.verify_information.status = 'done';\n }, 5000);\n\n this.searchingVehicle = setTimeout(() => {\n this.steps.finalizing_app.status = 'in_progress';\n this.steps.searching_vehicle.status = 'done';\n }, 10000);\n\n let orderId = this.$store.state.orderId,\n url = process.env.get_estimates_api + '/' + orderId,\n firstPlate = this.$store.getters.getOfflineFormPlates[0];\n\n if (firstPlate.license_plate === 'XXXX') {\n setTimeout(() => {\n this.dummyPrices();\n }, 1000);\n return;\n }\n\n this.$axios.get(url).then(({data}) => {\n this.completeSteps();\n if (data.status === 'success') {\n this.steps.finalizing_app.status = 'done';\n this.redirectSuccessStatus(data);\n } else {\n let errorMessage = data.error_message;\n\n if (errorMessage && errorMessage.startsWith('ERROR:')) {\n this.errorMessage = errorMessage.replace('ERROR:', '');\n }\n\n this.catchError();\n }\n }).catch((error) => {\n this.catchError();\n });\n },\n methods: {\n goManual() {\n this.completeSteps();\n this.$store.commit('SET_ORIGINAL_ORDER_TYPE', 'manual')\n this.redirectSuccessStatus({\n \"status\": \"success\",\n \"estimates\": []\n });\n },\n redirectSuccessStatus(data) {\n\n let prices = this.getPrices(data),\n path = '/wi/step-3';\n\n\n if (this.arePricesEmpty(prices)) {\n return this.catchError()\n }\n\n\n this.storeSavedSession('verify', path, {\n form_flow: this.$store.state.formFlow,\n empty_estimates: this.$store.state.emptyEstimates,\n original_order_type: this.$store.state.originalOrderType,\n prices: prices\n })\n },\n catchError(message) {\n this.completeSteps();\n this.steps.finalizing_app.status = 'error';\n\n if (message || this.errorMessage) {\n this.$bvModal.show('error-message-modal');\n } else {\n this.$bvModal.show('suggestion-modal')\n }\n\n },\n arePricesEmpty(prices) {\n return (Array.isArray(prices) && prices.length === 0)\n || (prices.constructor === Object && Object.keys(prices).length === 0)\n },\n dummyPrices() {\n let data = {\n \"status\": \"success\",\n \"estimates\": [{\n \"address\": \"85541\",\n \"zip_code\": \"85541\",\n \"estimates\": [\"1 YEAR RENEWALÂ $208.20 (through 5/15/2022)\", \"2 YEAR RENEWALÂ $362.25 (through 5/15/2023)\", \"5 YEAR RENEWALÂ $691.13 (through 5/15/2026)\"],\n \"recipient\": \"Matthew\",\n \"license_make\": \"BUIC\",\n \"vehicle_year\": \"2014\",\n \"license_plate\": \"XXXX\",\n \"vehicle_model\": \"Lacrosse\",\n \"license_expiry\": \"\",\n \"offline_processing\": false\n }]\n };\n this.redirectSuccessStatus(data);\n },\n getPricePlaceholder() {\n return {\n index: 0,\n 'license_plate': '',\n 'license_make': '',\n 'license_plate_label': '',\n offline_processing: true,\n 'prices': [{\n price: ''\n }],\n }\n },\n completeSteps() {\n clearTimeout(this.verifyInformation);\n clearTimeout(this.searchingVehicle);\n this.steps.searching_vehicle.status = 'done';\n this.steps.verify_information.status = 'done';\n this.loadingBarInnerClass = 'completed';\n },\n getPrices(data) {\n let prices = {};\n\n data.estimates.forEach((license) => {\n\n if (!license.estimates.length) {\n return;\n }\n\n prices[license.license_plate] = {\n 'license_plate': license.license_plate,\n 'license_make': license.license_make ? license.license_make.replace(/[()]/g, '') : '',\n 'license_plate_label': license.license_plate,\n 'vehicle_year': license.vehicle_year,\n dont_include: false,\n 'prices': [],\n };\n\n\n if (license.license_expiry) {\n prices[license.license_plate]['license_plate_label'] = `${license.license_plate} - Expires ${license.license_expiry}`;\n prices[license.license_plate]['expires_on'] = license.license_expiry;\n }\n\n prices[license.license_plate]['offline_processing'] = true;\n\n let priceIndex = 0;\n\n license.estimates.forEach((text) => {\n\n if (!this.includeEstimate(text)) {\n return;\n }\n\n let price = text.split('$')[1].split(' ')[0],\n formattedPrice = this.$money(price),\n description,\n renewal_type;\n\n if (text.toLowerCase().indexOf('1 year') >= 0) {\n description = `1-Year Renewal`;\n renewal_type = 'one_year';\n } else if (text.toLowerCase().indexOf('2 year') >= 0) {\n description = `2-Years Renewal`;\n renewal_type = 'two_years';\n } else if (text.toLowerCase().indexOf('5 year') >= 0) {\n description = `5-Years Renewal`;\n renewal_type = 'five_years';\n }\n\n prices[license.license_plate]['prices'].push({\n key: license.license_plate + '_' + priceIndex,\n licence_plate: license.license_plate,\n estimate: text,\n renewal_type: renewal_type,\n description: description,\n formatted_price: this.$money(price),\n price: price,\n });\n\n priceIndex++;\n\n });\n });\n\n\n prices = this.clearEmptyPrices(prices);\n prices = this.orderPricesByExpiresOn(prices);\n\n this.$store.commit('SET_OFFLINE_API_PLATES', prices);\n\n return prices;\n },\n orderPricesByExpiresOn(prices, dir = 'desc') {\n return _.orderBy(prices, (item) => {\n let expires_on = item['expires_on'] || this.$moment().subtract(100, 'y');\n return this.$moment(expires_on).unix();\n }, dir);\n },\n clearEmptyPrices(prices) {\n\n for (let priceKey in prices) {\n if (!prices[priceKey].prices || !prices[priceKey].prices.length) {\n delete prices[priceKey];\n }\n }\n\n return prices;\n },\n shouldConsiderAllAsOffline(estimates) {\n let considerAllAsOffline = false;\n\n for (let index in estimates) {\n if (this.isLicenseOffline(estimates[index])) {\n considerAllAsOffline = true;\n break;\n }\n }\n\n return considerAllAsOffline;\n },\n isLicenseOffline(license) {\n return (license.hasOwnProperty('offline_processing')\n && (license.offline_processing == 'true'\n || license.offline_processing == true\n || license.offline_processing == 1))\n },\n includeEstimate(estimate) {\n let excludedEstimates = ['Take no action', 'Take No Action', 'Get a Duplicate Registration'];\n\n for (let excludeEstimate of excludedEstimates) {\n if (estimate.includes(excludeEstimate)) {\n return false;\n }\n }\n return true;\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./verify.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./verify.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./verify.vue?vue&type=template&id=9e5acf24&\"\nimport script from \"./verify.vue?vue&type=script&lang=js&\"\nexport * from \"./verify.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n var style0 = require(\"./verify.vue?vue&type=style&index=0&lang=css&\")\nif (style0.__inject__) style0.__inject__(context)\n\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 injectStyles,\n null,\n \"4e3c67c2\"\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ValidationProvider',{attrs:{\"rules\":_vm.rules,\"name\":_vm.vName || _vm.field},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('div',{staticClass:\"form-group with-animation\",class:_vm.formGroupClasses},[_vm._t(\"default\",function(){return [_c('p',{staticClass:\"placeholder-text\",class:{'required':_vm.isRequired}},[_vm._v(_vm._s(_vm.placeholder))]),_vm._v(\" \"),((_vm.type)==='checkbox')?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form[_vm.field]),expression:\"form[field]\"}],staticClass:\"form-control\",class:{'with-border':_vm.addWithBorderClass},attrs:{\"disabled\":_vm.$attrs['disabled'],\"name\":_vm.vName || _vm.field,\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.form[_vm.field])?_vm._i(_vm.form[_vm.field],null)>-1:(_vm.form[_vm.field])},on:{\"change\":function($event){var $$a=_vm.form[_vm.field],$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.form, _vm.field, $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.form, _vm.field, $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.form, _vm.field, $$c)}}}}):((_vm.type)==='radio')?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form[_vm.field]),expression:\"form[field]\"}],staticClass:\"form-control\",class:{'with-border':_vm.addWithBorderClass},attrs:{\"disabled\":_vm.$attrs['disabled'],\"name\":_vm.vName || _vm.field,\"type\":\"radio\"},domProps:{\"checked\":_vm._q(_vm.form[_vm.field],null)},on:{\"change\":function($event){return _vm.$set(_vm.form, _vm.field, null)}}}):_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form[_vm.field]),expression:\"form[field]\"}],staticClass:\"form-control\",class:{'with-border':_vm.addWithBorderClass},attrs:{\"disabled\":_vm.$attrs['disabled'],\"name\":_vm.vName || _vm.field,\"type\":_vm.type},domProps:{\"value\":(_vm.form[_vm.field])},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.form, _vm.field, $event.target.value)}}})]}),_vm._v(\" \"),_vm._l((_vm.$getFormInputErrors(errors,_vm.field,_vm.form)),function(err){return (!_vm.errorMsgsOutOfWrapper)?_c('span',{staticClass:\"validation-err-msg\",domProps:{\"innerHTML\":_vm._s(err)}}):_vm._e()})],2),_vm._v(\" \"),_vm._l((_vm.$getFormInputErrors(errors,_vm.field,_vm.form)),function(err){return (_vm.errorMsgsOutOfWrapper)?_c('span',{staticClass:\"validation-err-msg\",domProps:{\"innerHTML\":_vm._s(err)}}):_vm._e()})]}}],null,true)})}\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\nexport default {\n name: \"input-field\",\n props: {\n vName: {\n required: false,\n },\n type: {\n required: false,\n default: 'text'\n },\n rules: {\n required: false,\n type: String,\n default: ''\n },\n formGroupClass: {\n require: false,\n default: ''\n },\n form: {\n required: true\n },\n field: {\n required: true,\n type: String\n },\n placeholder: {\n required: false,\n default: ''\n },\n errorMsgsOutOfWrapper: {\n required: false,\n default: false\n }\n },\n data() {\n return {\n addWithBorderClass: false,\n formGroupClasses: []\n }\n },\n mounted() {\n\n this.formGroupClass.split(' ').forEach(c => {\n if (c.trim()) {\n this.formGroupClasses.push({[c]: true});\n }\n });\n\n this.focusOnInputIfValue();\n\n },\n methods: {\n focusOnInputIfValue() {\n\n if (!this.fieldValue) {\n return;\n }\n\n let hasFocusedClass = this.formGroupClasses.find(c => {\n if (c['focused']) {\n return c;\n }\n });\n\n if (hasFocusedClass) {\n return;\n }\n\n this.formGroupClasses.push({\n 'focused': true\n });\n },\n\n },\n computed: {\n isRequired() {\n return this.rules.indexOf('required') >= 0;\n },\n fieldValue() {\n return this.field.split('.').reduce((o, f) => o[f], this.form);\n }\n },\n watch: {\n fieldValue() {\n this.focusOnInputIfValue();\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InputField.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InputField.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./InputField.vue?vue&type=template&id=7fbd73e8&scoped=true&\"\nimport script from \"./InputField.vue?vue&type=script&lang=js&\"\nexport * from \"./InputField.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n var style0 = require(\"./InputField.vue?vue&type=style&index=0&id=7fbd73e8&scoped=true&lang=css&\")\nif (style0.__inject__) style0.__inject__(context)\n\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 injectStyles,\n \"7fbd73e8\",\n \"4951dfc0\"\n \n)\n\nexport default component.exports","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InputField.vue?vue&type=style&index=0&id=7fbd73e8&scoped=true&lang=css&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add CSS to SSR context\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesServer.js\").default\nmodule.exports.__inject__ = function (context) {\n add(\"f5598fc8\", content, true, context)\n};","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FormErrorMsg.vue?vue&type=style&index=0&id=4c656529&scoped=true&lang=css&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add CSS to SSR context\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesServer.js\").default\nmodule.exports.__inject__ = function (context) {\n add(\"3e06b350\", content, true, context)\n};","import InputField from \"@/components/Forms/InputField\";\nimport FormErrorMsg from \"@/components/Forms/FormErrorMsg\";\nimport {toPng} from 'html-to-image';\n\nexport default {\n components: {\n InputField, FormErrorMsg\n },\n data() {\n return {\n formErrorMsg: ''\n }\n },\n methods: {\n frontendFormSubmitHandler() {\n\n if (!this.$refs.form) {\n return this.submit();\n }\n\n this.$refs.form.validate().then(success => {\n //submit the form if not errors occurs\n if (success) {\n return this.submit();\n }\n\n let firstErrorFieldName = this.getFirstFieldErrorName();\n\n //focus on the input if found!\n if (firstErrorFieldName) {\n this.focusOnElement(firstErrorFieldName);\n }\n\n });\n\n },\n getFirstFieldErrorName() {\n let errorsKeys = Object.keys(this.$refs.form.errors),\n firstErrorFieldName;\n\n while (errorsKeys.length) {\n firstErrorFieldName = errorsKeys.shift();\n\n if (this.$refs.form.errors[firstErrorFieldName].length) {\n return firstErrorFieldName;\n }\n }\n },\n focusOnElement(fieldName) {\n let [el] = document.getElementsByName(fieldName);\n\n //try with id\n if (!el) {\n el = document.getElementById(fieldName);\n }\n\n el.scrollIntoView({behavior: 'smooth'});\n el.focus();\n },\n catchError(err) {\n if (err.response) {\n this.form.onFail(err.response.data.data);\n this.formErrorMsg = err.response.data.message;\n } else {\n this.formErrorMsg = err.message;\n }\n },\n storeSavedSession(step, redirectTo, payload) {\n let storedOrderId = this.$store.state.orderId;\n\n if (storedOrderId) {\n\n this.$axios.post(`orders/${storedOrderId}/${step}/store-saved-session`, {\n payload: payload\n });\n\n }\n\n if (redirectTo) {\n this.$router.push({path: redirectTo});\n }\n\n },\n saveElectronicSignature() {\n const {isEmpty, data} = this.$refs.signaturePad.saveSignature();\n\n if (isEmpty) {\n this.form.electronic_signature = '';\n } else {\n this.form.electronic_signature = data;\n }\n },\n clearElectronicSignature() {\n this.$refs.signaturePad.clearSignature();\n this.saveElectronicSignature();\n },\n async htmlToPNG() {\n const el = this.$refs.screenShotSection;\n this.form.signature_sc = await toPng(el);\n },\n async screenshot() {\n await this.htmlToPNG();\n this.ipVisible = false;\n },\n onBeginSignature() {\n },\n onEndSignature() {\n this.saveElectronicSignature();\n },\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.errorMsg)?_c('p',{staticClass:\"form-error-msg\",domProps:{\"innerHTML\":_vm._s(_vm.errorMsg)}},[]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n\nexport default {\n name: \"FormErrorMsg\",\n props: {\n msg: {\n type: String\n }\n },\n data() {\n return {\n errorMsg: ''\n }\n },\n mounted() {\n this.setFormErrorMsg(this.msg);\n },\n methods: {\n setFormErrorMsg(msg) {\n this.errorMsg = msg;\n }\n },\n beforeMount() {\n this.$eventBus.$on('setFormErrorMsg', this.setFormErrorMsg)\n },\n watch: {\n msg() {\n this.setFormErrorMsg(this.msg);\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FormErrorMsg.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FormErrorMsg.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./FormErrorMsg.vue?vue&type=template&id=4c656529&scoped=true&\"\nimport script from \"./FormErrorMsg.vue?vue&type=script&lang=js&\"\nexport * from \"./FormErrorMsg.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n var style0 = require(\"./FormErrorMsg.vue?vue&type=style&index=0&id=4c656529&scoped=true&lang=css&\")\nif (style0.__inject__) style0.__inject__(context)\n\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 injectStyles,\n \"4c656529\",\n \"1910dda6\"\n \n)\n\nexport default component.exports","export * from \"-!../../node_modules/vue-style-loader/index.js??ref--3-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InputField.vue?vue&type=style&index=0&id=7fbd73e8&scoped=true&lang=css&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".form-control[data-v-7fbd73e8]:disabled{background-color:unset!important}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","export * from \"-!../../node_modules/vue-style-loader/index.js??ref--3-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FormErrorMsg.vue?vue&type=style&index=0&id=4c656529&scoped=true&lang=css&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".form-error-msg[data-v-4c656529]{text-align:right;margin-top:10px;color:red;font-weight:700}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AAAA;AAAA;AAAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;ACrDA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;AC5BA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAsBA;AAOA;AAuBA;;;;;;;;;;ACpDA;AACA;AACA;;;;;ACFA;AACA;AACA;AACA;AAEA;;ACLA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AAAA;AAAA;AAAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AAAA;AAAA;AAAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;A","sourceRoot":""}