Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/wwwroot/mifepriston.org/mifepriston.org_20230623190107.bak/dist/ |
Upload File : |
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{10:function(t,e,a){"use strict";a.r(e);var n=a(14),s=a.n(n);for(var i in n)"default"!==i&&function(t){a.d(e,t,(function(){return n[t]}))}(i);var l=a(46),r=a(15),o=Object(r.a)(s.a,l.a,l.b,!1,(function(t){a(28)}),null,null);o.options.__file="src\\Cart.vue",e.default=o.exports},14:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return t&&t.__esModule?t:{default:t}}(a(19));e.default={data:function(){return{productName:productName,price:price,currency:currency,quantity:0,translation:{},visible:!1,name:"",phone:"",email:"",shipment_id:0,address:"",comment:"",shipMethods:[],orderPlaced:!1,invalid:{},minQuantity:1,maxQuantity:20}},methods:{t:function(t){return this.$data.translation[t]||t},addToCart:function(t){Number(t)?this.quantity+=Number(t):this.quantity=this.quantity||1,this.orderPlaced=!1,this.visible=!0},decCount:function(){this.quantity--,this.quantity<this.minQuantity&&(this.quantity=this.minQuantity)},incCount:function(){this.quantity++,this.quantity>this.maxQuantity&&(this.quantity=this.maxQuantity)},placeOrder:function(){var t=this,e=["quantity","price","name","phone","email","shipment_id","address","comment"],a=!0,s=!0,i=!1,l=void 0;try{for(var r,o=e[Symbol.iterator]();!(s=(r=o.next()).done);s=!0){var d=r.value;a=this.validate(d)&&a}}catch(t){i=!0,l=t}finally{try{!s&&o.return&&o.return()}finally{if(i)throw l}}if(a){var c=new FormData;c.set(csrfParam,csrfToken),c.set("Order[lang]",lang);var u=!0,m=!1,v=void 0;try{for(var p,h=e[Symbol.iterator]();!(u=(p=h.next()).done);u=!0){var f=p.value;c.set("Order["+f+"]",this[f])}}catch(t){m=!0,v=t}finally{try{!u&&h.return&&h.return()}finally{if(m)throw v}}n.default.post(placeOrderUrl,c,{headers:{"Content-Type":"multipart/form-data"}}).then((function(e){"OK"===e.data.result?(t.visible=!1,t.quantity=0,t.orderPlaced=!0):alert(t.t("An error occured"))})).catch((function(e){alert(t.t("An error occured"))}))}},resetForm:function(){this.quantity=1,this.name="",this.phone="",this.email="",this.shipment_id=this.shipMethods[0].id,this.address="",this.comment="",this.resetAllHelpers()},resetHelper:function(t){this.invalid[t]=!1},resetAllHelpers:function(){this.invalid={quantity:!1,name:!1,phone:!1,email:!1,address:!1}},validate:function(t){"string"==typeof this[t]&&(this[t]=this[t].trim());var e=!0;switch(t){case"quantity":e="number"==typeof this.quantity&&this.quantity>=this.minQuantity&&this.quantity<=this.maxQuantity;break;case"price":break;case"name":this.name=this.name.substring(0,50),e=this.name.match(/^\S+\s+\S+/);break;case"phone":this.phone=this.phone.replace(/\D/g,""),e=/^(38)?0\d{9}$/.test(this.phone)||/^7\d{10}$/.test(this.phone);break;case"email":this.email=this.email.substring(0,50),e=""===this.email||this.email.match(/^\S+@\S+$/);break;case"shipment_id":break;case"address":this.address=this.address.substring(0,200),e=""!==this.address;break;case"comment":this.comment=this.comment.substring(0,300);break;default:console.error("Unknown attribute: "+t),e=!1}return this.invalid[t]=!e,e}},mounted:function(){var t=this;n.default.get(getTranslationUrl,{params:{lang:lang,category:"cart"}}).then((function(e){t.$data.translation=e.data})),n.default.get(getShippingUrl,{params:{lang:lang}}).then((function(e){t.$data.shipMethods=e.data.map((function(t){return{id:Number(t.id),name:t.name}})),t.$data.shipment_id=t.$data.shipMethods[0].id})),this.resetAllHelpers()}}},28:function(t,e,a){var n=a(29);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals),(0,a(18).default)("871a3bcc",n,!1,{})},29:function(t,e,a){(t.exports=a(13)(!0)).push([t.i,"\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button{\n -webkit-appearance:none;\n margin:0;\n}\ninput[type=number]{\n -moz-appearance:textfield;\n}\n","",{version:3,sources:["C:/OpenServer/domains/mifepriston/src/src/Cart.vue"],names:[],mappings:";AA4UA;;IAGA,wBAAA;IACA,SAAA;CACA;AAEA;IACA,0BAAA;CACA",file:"Cart.vue",sourcesContent:['<template>\n<div>\n <div class="modal" :class="{ \'is-active\': visible }">\n <div class="modal-background" @click="visible = false"></div>\n <div class="modal-card">\n <header class="modal-card-head">\n <p class="modal-card-title">{{ t(\'Shopping Cart\') }}</p>\n <button class="delete" aria-label="close" @click="visible = false"></button>\n </header>\n <section class="modal-card-body">\n \x3c!-- Product name --\x3e\n <div class="is-size-5">\n {{ t("You\'re purchasing") }} <span class="has-text-info">{{ productName }}</span>\n <input type="hidden" name="price" :value="price">\n </div><br>\n\n <div class="columns is-mobile">\n <div class="column">\n \x3c!-- Quantity --\x3e\n <div class="field is-horizontal">\n <div class="field-label">\n <label class="label">{{ t(\'Quantity\') }}</label>\n </div>\n <div class="field-body">\n <div class="field is-expanded">\n <div class="field has-addons">\n <p class="control">\n <a href="#" class="button" @click="decCount()"><svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512">\x3c!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path d="M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"/></svg></a>\n </p>\n <p class="control is-expanded">\n <input class="input" :class="{\'is-danger\': invalid.quantity}" name="quantity" type="number" v-model="quantity" @input="resetHelper(\'quantity\')" @blur="validate(\'quantity\')">\n </p>\n <p class="control">\n <a href="#" class="button" @click="incCount()"><svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512">\x3c!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path d="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"/></svg></a>\n </p>\n </div>\n <p v-if="invalid.quantity" class="help is-danger">{{ t(\'Input a number between\') }} {{ minQuantity }} {{ t(\'and\') }} {{ maxQuantity }}</p>\n </div>\n </div>\n </div>\n </div>\n <div class="column">\n \x3c!-- Cost --\x3e\n <div class="field is-horizontal">\n <div class="field-label is-normal">\n <label class="label">{{ t(\'Cost\') }}</label>\n </div>\n <div class="field-body">\n <div class="field has-addons">\n <p class="control">\n <input class="input" name="cost" type="text" readonly :value="quantity * price">\n </p>\n <p class="control">\n <span class="button is-static">{{ currency }}</span>\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n \x3c!-- Name --\x3e\n <div class="field is-horizontal">\n <div class="field-label is-normal">\n <label class="label">{{ t(\'Your name\') }}</label>\n </div>\n <div class="field-body">\n <div class="field">\n <div class="control">\n <input class="input" :class="{\'is-danger\': invalid.name}" type="text" name="name" v-model="name" :placeholder="t(\'Input your name\')" @input="resetHelper(\'name\')" @blur="validate(\'name\')">\n </div>\n <p v-if="invalid.name" class="help is-danger">{{ t(\'Name is required\') }}</p>\n </div>\n </div>\n </div>\n\n \x3c!-- Phone --\x3e\n <div class="field is-horizontal">\n <div class="field-label is-normal">\n <label class="label">{{ t(\'Your phone\') }}</label>\n </div>\n <div class="field-body">\n <div class="field">\n <div class="control">\n <input class="input" :class="{\'is-danger\': invalid.phone}" type="tel" name="phone" :placeholder="t(\'In international format\')" v-model="phone" @input="resetHelper(\'phone\')" @blur="validate(\'phone\')">\n </div>\n <p v-if="invalid.phone" class="help is-danger">{{ t(\'Phone is required\') }}</p>\n </div>\n </div>\n </div>\n\n \x3c!-- Email --\x3e\n <div class="field is-horizontal">\n <div class="field-label is-normal">\n <label class="label">{{ t(\'Email\') }}</label>\n </div>\n <div class="field-body">\n <div class="field">\n <div class="control has-icons-left">\n <input class="input" :class="{\'is-danger\': invalid.email}" type="email" name="email" v-model="email" placeholder="you@email.com" @input="resetHelper(\'email\')" @blur="validate(\'email\')">\n <span class="icon is-small is-left">\n <svg style="fill: #DBDBDB" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512">\x3c!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg>\n </span>\n </div>\n <p v-if="invalid.email" class="help is-danger">{{ t(\'This email is invalid\') }}</p>\n </div>\n </div>\n </div>\n\n \x3c!-- Shipment --\x3e\n <div class="field is-horizontal">\n <div class="field-label is-normal">\n <label class="label">{{ t(\'Ship to\') }}</label>\n </div>\n <div class="field-body">\n <div class="field is-narrow">\n <div class="control">\n <div class="select is-fullwidth">\n <select name="shipment_id" v-model="shipment_id">\n <option v-for="row of shipMethods" :key="row.id" :value="row.id">{{ row.name }}</option>\n </select>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n \x3c!-- Address --\x3e\n <div class="field is-horizontal">\n <div class="field-label is-normal">\n <label class="label">{{ t(\'Shipping address\') }}</label>\n </div>\n <div class="field-body">\n <div class="field">\n <div class="control">\n <textarea class="textarea" :class="{\'is-danger\': invalid.address}" name="address" v-model="address" :placeholder="t(\'Please input shipping address carefully\')" @input="resetHelper(\'address\')" @blur="validate(\'address\')"></textarea>\n </div>\n <p v-if="invalid.address" class="help is-danger">{{ t(\'Address is required\') }}</p>\n </div>\n </div>\n </div>\n\n \x3c!-- Comment --\x3e\n <div class="field is-horizontal">\n <div class="field-label is-normal">\n <label class="label">{{ t(\'Comment\') }}</label>\n </div>\n <div class="field-body">\n <div class="field">\n <div class="control">\n <textarea class="textarea" name="comment" v-model="comment" :placeholder="t(\'Additional information (optional)\')"></textarea>\n </div>\n </div>\n </div>\n </div>\n\n </section>\n <footer class="modal-card-foot">\n <button class="button is-primary" @click.prevent="placeOrder()">{{ t(\'Place order\') }}</button>\n <button class="button" @click="visible = false">{{ t(\'Cancel\') }}</button>\n <button class="button" @click="resetForm()">{{ t(\'Reset form\') }}</button>\n </footer>\n </div>\n </div>\n\n <div class="modal" :class="{ \'is-active\': orderPlaced }">\n <div class="modal-background" @click="orderPlaced = false"></div>\n <div class="modal-content">\n <div class="box" @click="orderPlaced = false">\n {{ t(\'You have placed the order successfully\') }}.<br>\n {{ t(\'Our employee will contact you as soon as possible\') }}.\n </div>\n </div>\n <button class="modal-close is-large" aria-label="close" @click="orderPlaced = false"></button>\n </div>\n</div>\n</template>\n\n<script>\nimport axios from \'axios\';\n\nexport default {\n data() {\n return {\n productName: productName,\n price: price,\n currency: currency,\n quantity: 0,\n translation: {},\n visible: false,\n name: \'\',\n phone: \'\',\n email: \'\',\n shipment_id: 0,\n address: \'\',\n comment: \'\',\n shipMethods: [],\n orderPlaced: false,\n invalid: {},\n minQuantity: 1,\n maxQuantity: 20,\n }\n },\n\n methods: {\n t(txt) {\n return this.$data.translation[txt] || txt;\n },\n\n addToCart(count) {\n if (Number(count)) this.quantity += Number(count);\n else this.quantity = this.quantity || 1;\n this.orderPlaced = false;\n this.visible = true;\n },\n\n decCount() {\n this.quantity--;\n if (this.quantity < this.minQuantity) this.quantity = this.minQuantity;\n },\n\n incCount() {\n this.quantity++;\n if (this.quantity > this.maxQuantity) this.quantity = this.maxQuantity;\n },\n\n placeOrder() {\n const attrs = [\'quantity\', \'price\', \'name\', \'phone\', \'email\', \'shipment_id\', \'address\', \'comment\'];\n let formValid = true;\n for (let attr of attrs) formValid = this.validate(attr) && formValid;\n if (! formValid) return;\n const formData = new FormData;\n formData.set(csrfParam, csrfToken);\n formData.set(\'Order[lang]\', lang);\n for (let attr of attrs) formData.set(\'Order[\' + attr + \']\', this[attr]);\n axios.post(placeOrderUrl, formData, { headers: {\'Content-Type\': \'multipart/form-data\' } })\n .then( response => {\n if (response.data.result === \'OK\') {\n this.visible = false;\n this.quantity = 0;\n this.orderPlaced = true;\n } else {\n alert(this.t(\'An error occured\'));\n }\n })\n .catch( error => {\n alert(this.t(\'An error occured\'));\n });\n },\n\n resetForm() {\n this.quantity = 1;\n this.name = \'\';\n this.phone = \'\';\n this.email = \'\';\n this.shipment_id = this.shipMethods[0].id;\n this.address = \'\';\n this.comment = \'\';\n this.resetAllHelpers();\n },\n\n resetHelper(field) {\n this.invalid[field] = false;\n },\n\n resetAllHelpers() {\n this.invalid = {\n quantity: false,\n name: false,\n phone: false,\n email: false,\n address: false,\n }\n },\n\n validate(attr) {\n if (typeof this[attr] === \'string\') {\n this[attr] = this[attr].trim();\n }\n let valid = true;\n switch (attr) {\n case \'quantity\':\n valid = typeof this.quantity === \'number\' && this.quantity >= this.minQuantity && this.quantity <= this.maxQuantity;\n break;\n case \'price\':\n break;\n case \'name\':\n this.name = this.name.substring(0, 50);\n valid = this.name.match(/^\\S+\\s+\\S+/);\n break;\n case \'phone\':\n this.phone = this.phone.replace(/\\D/g, \'\');\n valid = /^(38)?0\\d{9}$/.test(this.phone) || /^7\\d{10}$/.test(this.phone);\n break;\n case \'email\':\n this.email = this.email.substring(0, 50);\n valid = this.email === \'\' || this.email.match(/^\\S+@\\S+$/);\n break;\n case \'shipment_id\':\n break;\n case \'address\':\n this.address = this.address.substring(0, 200);\n valid = this.address !== \'\';\n break;\n case \'comment\':\n this.comment = this.comment.substring(0, 300);\n break;\n default:\n console.error(\'Unknown attribute: \' + attr);\n valid = false;\n }\n this.invalid[attr] = ! valid;\n return valid;\n }\n },\n\n mounted() {\n axios.get(getTranslationUrl, { params: {lang: lang, category: \'cart\'} })\n .then( response => {\n this.$data.translation = response.data;\n });\n axios.get(getShippingUrl, { params: {lang: lang} })\n .then( response => {\n this.$data.shipMethods = response.data.map(row => { return {id: Number(row.id), name: row.name} });\n this.$data.shipment_id = this.$data.shipMethods[0].id;\n });\n this.resetAllHelpers();\n }\n}\n<\/script>\n\n<style>\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n /* display: none; <- Crashes Chrome on hover */\n -webkit-appearance: none;\n margin: 0; /* <-- Apparently some margin are still there even though it\'s hidden */\n}\n\ninput[type=number] {\n -moz-appearance:textfield; /* Firefox */\n}\n</style>\n'],sourceRoot:""}])},46:function(t,e,a){"use strict";a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return s}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"modal",class:{"is-active":t.visible}},[a("div",{staticClass:"modal-background",on:{click:function(e){t.visible=!1}}}),t._v(" "),a("div",{staticClass:"modal-card"},[a("header",{staticClass:"modal-card-head"},[a("p",{staticClass:"modal-card-title"},[t._v(t._s(t.t("Shopping Cart")))]),t._v(" "),a("button",{staticClass:"delete",attrs:{"aria-label":"close"},on:{click:function(e){t.visible=!1}}})]),t._v(" "),a("section",{staticClass:"modal-card-body"},[a("div",{staticClass:"is-size-5"},[t._v("\n "+t._s(t.t("You're purchasing"))+" "),a("span",{staticClass:"has-text-info"},[t._v(t._s(t.productName))]),t._v(" "),a("input",{attrs:{type:"hidden",name:"price"},domProps:{value:t.price}})]),a("br"),t._v(" "),a("div",{staticClass:"columns is-mobile"},[a("div",{staticClass:"column"},[a("div",{staticClass:"field is-horizontal"},[a("div",{staticClass:"field-label"},[a("label",{staticClass:"label"},[t._v(t._s(t.t("Quantity")))])]),t._v(" "),a("div",{staticClass:"field-body"},[a("div",{staticClass:"field is-expanded"},[a("div",{staticClass:"field has-addons"},[a("p",{staticClass:"control"},[a("a",{staticClass:"button",attrs:{href:"#"},on:{click:function(e){return t.decCount()}}},[a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512"}},[a("path",{attrs:{d:"M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"}})])])]),t._v(" "),a("p",{staticClass:"control is-expanded"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.quantity,expression:"quantity"}],staticClass:"input",class:{"is-danger":t.invalid.quantity},attrs:{name:"quantity",type:"number"},domProps:{value:t.quantity},on:{input:[function(e){e.target.composing||(t.quantity=e.target.value)},function(e){return t.resetHelper("quantity")}],blur:function(e){return t.validate("quantity")}}})]),t._v(" "),a("p",{staticClass:"control"},[a("a",{staticClass:"button",attrs:{href:"#"},on:{click:function(e){return t.incCount()}}},[a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512"}},[a("path",{attrs:{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"}})])])])]),t._v(" "),t.invalid.quantity?a("p",{staticClass:"help is-danger"},[t._v(t._s(t.t("Input a number between"))+" "+t._s(t.minQuantity)+" "+t._s(t.t("and"))+" "+t._s(t.maxQuantity))]):t._e()])])])]),t._v(" "),a("div",{staticClass:"column"},[a("div",{staticClass:"field is-horizontal"},[a("div",{staticClass:"field-label is-normal"},[a("label",{staticClass:"label"},[t._v(t._s(t.t("Cost")))])]),t._v(" "),a("div",{staticClass:"field-body"},[a("div",{staticClass:"field has-addons"},[a("p",{staticClass:"control"},[a("input",{staticClass:"input",attrs:{name:"cost",type:"text",readonly:""},domProps:{value:t.quantity*t.price}})]),t._v(" "),a("p",{staticClass:"control"},[a("span",{staticClass:"button is-static"},[t._v(t._s(t.currency))])])])])])])]),t._v(" "),a("div",{staticClass:"field is-horizontal"},[a("div",{staticClass:"field-label is-normal"},[a("label",{staticClass:"label"},[t._v(t._s(t.t("Your name")))])]),t._v(" "),a("div",{staticClass:"field-body"},[a("div",{staticClass:"field"},[a("div",{staticClass:"control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"name"}],staticClass:"input",class:{"is-danger":t.invalid.name},attrs:{type:"text",name:"name",placeholder:t.t("Input your name")},domProps:{value:t.name},on:{input:[function(e){e.target.composing||(t.name=e.target.value)},function(e){return t.resetHelper("name")}],blur:function(e){return t.validate("name")}}})]),t._v(" "),t.invalid.name?a("p",{staticClass:"help is-danger"},[t._v(t._s(t.t("Name is required")))]):t._e()])])]),t._v(" "),a("div",{staticClass:"field is-horizontal"},[a("div",{staticClass:"field-label is-normal"},[a("label",{staticClass:"label"},[t._v(t._s(t.t("Your phone")))])]),t._v(" "),a("div",{staticClass:"field-body"},[a("div",{staticClass:"field"},[a("div",{staticClass:"control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.phone,expression:"phone"}],staticClass:"input",class:{"is-danger":t.invalid.phone},attrs:{type:"tel",name:"phone",placeholder:t.t("In international format")},domProps:{value:t.phone},on:{input:[function(e){e.target.composing||(t.phone=e.target.value)},function(e){return t.resetHelper("phone")}],blur:function(e){return t.validate("phone")}}})]),t._v(" "),t.invalid.phone?a("p",{staticClass:"help is-danger"},[t._v(t._s(t.t("Phone is required")))]):t._e()])])]),t._v(" "),a("div",{staticClass:"field is-horizontal"},[a("div",{staticClass:"field-label is-normal"},[a("label",{staticClass:"label"},[t._v(t._s(t.t("Email")))])]),t._v(" "),a("div",{staticClass:"field-body"},[a("div",{staticClass:"field"},[a("div",{staticClass:"control has-icons-left"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],staticClass:"input",class:{"is-danger":t.invalid.email},attrs:{type:"email",name:"email",placeholder:"you@email.com"},domProps:{value:t.email},on:{input:[function(e){e.target.composing||(t.email=e.target.value)},function(e){return t.resetHelper("email")}],blur:function(e){return t.validate("email")}}}),t._v(" "),a("span",{staticClass:"icon is-small is-left"},[a("svg",{staticStyle:{fill:"#DBDBDB"},attrs:{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512"}},[a("path",{attrs:{d:"M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"}})])])]),t._v(" "),t.invalid.email?a("p",{staticClass:"help is-danger"},[t._v(t._s(t.t("This email is invalid")))]):t._e()])])]),t._v(" "),a("div",{staticClass:"field is-horizontal"},[a("div",{staticClass:"field-label is-normal"},[a("label",{staticClass:"label"},[t._v(t._s(t.t("Ship to")))])]),t._v(" "),a("div",{staticClass:"field-body"},[a("div",{staticClass:"field is-narrow"},[a("div",{staticClass:"control"},[a("div",{staticClass:"select is-fullwidth"},[a("select",{directives:[{name:"model",rawName:"v-model",value:t.shipment_id,expression:"shipment_id"}],attrs:{name:"shipment_id"},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.shipment_id=e.target.multiple?a:a[0]}}},t._l(t.shipMethods,(function(e){return a("option",{key:e.id,domProps:{value:e.id}},[t._v(t._s(e.name))])})),0)])])])])]),t._v(" "),a("div",{staticClass:"field is-horizontal"},[a("div",{staticClass:"field-label is-normal"},[a("label",{staticClass:"label"},[t._v(t._s(t.t("Shipping address")))])]),t._v(" "),a("div",{staticClass:"field-body"},[a("div",{staticClass:"field"},[a("div",{staticClass:"control"},[a("textarea",{directives:[{name:"model",rawName:"v-model",value:t.address,expression:"address"}],staticClass:"textarea",class:{"is-danger":t.invalid.address},attrs:{name:"address",placeholder:t.t("Please input shipping address carefully")},domProps:{value:t.address},on:{input:[function(e){e.target.composing||(t.address=e.target.value)},function(e){return t.resetHelper("address")}],blur:function(e){return t.validate("address")}}})]),t._v(" "),t.invalid.address?a("p",{staticClass:"help is-danger"},[t._v(t._s(t.t("Address is required")))]):t._e()])])]),t._v(" "),a("div",{staticClass:"field is-horizontal"},[a("div",{staticClass:"field-label is-normal"},[a("label",{staticClass:"label"},[t._v(t._s(t.t("Comment")))])]),t._v(" "),a("div",{staticClass:"field-body"},[a("div",{staticClass:"field"},[a("div",{staticClass:"control"},[a("textarea",{directives:[{name:"model",rawName:"v-model",value:t.comment,expression:"comment"}],staticClass:"textarea",attrs:{name:"comment",placeholder:t.t("Additional information (optional)")},domProps:{value:t.comment},on:{input:function(e){e.target.composing||(t.comment=e.target.value)}}})])])])])]),t._v(" "),a("footer",{staticClass:"modal-card-foot"},[a("button",{staticClass:"button is-primary",on:{click:function(e){return e.preventDefault(),t.placeOrder()}}},[t._v(t._s(t.t("Place order")))]),t._v(" "),a("button",{staticClass:"button",on:{click:function(e){t.visible=!1}}},[t._v(t._s(t.t("Cancel")))]),t._v(" "),a("button",{staticClass:"button",on:{click:function(e){return t.resetForm()}}},[t._v(t._s(t.t("Reset form")))])])])]),t._v(" "),a("div",{staticClass:"modal",class:{"is-active":t.orderPlaced}},[a("div",{staticClass:"modal-background",on:{click:function(e){t.orderPlaced=!1}}}),t._v(" "),a("div",{staticClass:"modal-content"},[a("div",{staticClass:"box",on:{click:function(e){t.orderPlaced=!1}}},[t._v("\n "+t._s(t.t("You have placed the order successfully"))+"."),a("br"),t._v("\n "+t._s(t.t("Our employee will contact you as soon as possible"))+".\n ")])]),t._v(" "),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(e){t.orderPlaced=!1}}})])])},s=[];n._withStripped=!0}}]); //# sourceMappingURL=5-35b582201514644cfeeb.js.map