@perevorot/shop 3.0.16 → 3.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js.map +1 -1
- package/dist/components/account/OrderItem.js.map +1 -1
- package/dist/components/account/User.js.map +1 -1
- package/dist/components/auth/Forget.js.map +1 -1
- package/dist/components/auth/Login.js.map +1 -1
- package/dist/components/auth/Reset.js.map +1 -1
- package/dist/components/auth/User.js.map +1 -1
- package/dist/components/shop/CodeCopy.js.map +1 -1
- package/dist/components/shop/Gallery.js.map +1 -1
- package/dist/components/shop/Notice.js.map +1 -1
- package/dist/components/shop/PromoProducts.js.map +1 -1
- package/dist/components/shop/Search.js.map +1 -1
- package/dist/components/shop/bundle/Bundle.js.map +1 -1
- package/dist/components/shop/bundle/BundleAdd.js.map +1 -1
- package/dist/components/shop/cart/Cart.js.map +1 -1
- package/dist/components/shop/cart/CartAdd.js.map +1 -1
- package/dist/components/shop/cart/CartItem.js.map +1 -1
- package/dist/components/shop/cart/CartTrigger.js.map +1 -1
- package/dist/components/shop/compare/CompareAdd.js.map +1 -1
- package/dist/components/shop/compare/CompareDelete.js.map +1 -1
- package/dist/components/shop/compare/CompareDeleteAll.js.map +1 -1
- package/dist/components/shop/filters/FilterSearch.js.map +1 -1
- package/dist/components/shop/filters/Price.js.map +1 -1
- package/dist/components/shop/order/Checkout.js +1 -1
- package/dist/components/shop/order/Checkout.js.map +1 -1
- package/dist/components/shop/order/CheckoutItem.js.map +1 -1
- package/dist/components/shop/order/OneClick.js.map +1 -1
- package/dist/components/shop/order/shipping/CheckoutShippingCourier.js.map +1 -1
- package/dist/components/shop/order/shipping/CheckoutShippingNovaposhtaAddress.js.map +1 -1
- package/dist/components/shop/order/shipping/CheckoutShippingNovaposhtaWarehouse.js.map +1 -1
- package/dist/components/shop/order/shipping/CheckoutShippingPickup.js.map +1 -1
- package/dist/components/shop/order/shipping/CheckoutShippingUkrposhtaWarehouse.js.map +1 -1
- package/dist/components/shop/reviews/Question.js.map +1 -1
- package/dist/components/shop/reviews/Review.js.map +1 -1
- package/dist/components/shop/viewed/Viewed.js.map +1 -1
- package/dist/components/shop/viewed/ViewedDelete.js.map +1 -1
- package/dist/components/shop/viewed/Viewer.js.map +1 -1
- package/dist/components/shop/wishlist/WishlistAdd.js.map +1 -1
- package/dist/components/shop/wishlist/WishlistDelete.js.map +1 -1
- package/dist/forms/FormCheckbox.js.map +1 -1
- package/dist/forms/FormCheckboxes.js.map +1 -1
- package/dist/forms/FormPassword.js.map +1 -1
- package/dist/forms/FormRadio.js.map +1 -1
- package/dist/forms/FormRating.js.map +1 -1
- package/dist/forms/FormSelect.js.map +1 -1
- package/dist/forms/FormSwitch.js.map +1 -1
- package/dist/forms/FormText.js.map +1 -1
- package/dist/forms/FormTextarea.js.map +1 -1
- package/dist/global.js.map +1 -1
- package/dist/store.js +1 -1
- package/dist/store.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkout.js","sources":["../../../../src/components/shop/order/CheckoutItem.vue","../../../../src/components/shop/order/CheckoutItem.vue?vue&type=template&id=4d5a1fac&lang.js","../../../../src/components/shop/order/Checkout.vue","../../../../src/components/shop/order/Checkout.vue?vue&type=template&id=652ffade&lang.js"],"sourcesContent":["<template>\n <div class=\"columns is-multiline shop-cart-item\" v-bind:class=\"{ 'is-bundle': item.attributes.bundle }\">\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow\">\n <a :href=\"item.attributes.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.href\">{{ item.name }}</a>\n </div>\n </div>\n <div class=\"column is-2 has-text-centered is-relative\">\n <div class=\"quantity\">⨉ {{ item.quantity }}</div>\n <div class=\"quantity-price\" v-if=\"parseInt(item.quantity) > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\"></div>\n </div>\n </div>\n </div>\n <div class=\"options is-toggled\" v-if=\"itemOptions && itemOptions.length\">\n <div class=\"toggler\">\n <span>{{ __('shop.cart.additional') }} {{ itemOptions.length }}</span>\n </div>\n <div class=\"wrapper\">\n <div v-for=\"(option, index) in itemOptions\" v-bind:key=\"index\" class=\"columns is-checked\">\n <div class=\"column\">\n <div class=\"option-title\">{{ option.name }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\"><use xlink:href=\"#bundle-plus\" /></svg>\n <a :href=\"item.attributes.second.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.second.href\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\"><use xlink:href=\"#bundle-plus\" /></svg>\n <a :href=\"item.attributes.third.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.third.href\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { defineComponent, computed } from 'vue';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'CheckoutItem',\n props: {\n item: Object\n },\n setup(props) {\n const options = computed(() => (props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []));\n const itemOptions = computed(() => (props.item.options && props.item.options.length ? props.item.options.filter((option) => options.value.indexOf(option.id) !== -1) : []));\n\n return {\n itemOptions\n };\n }\n});\n</script>","<template>\n <div class=\"columns is-multiline shop-cart-item\" v-bind:class=\"{ 'is-bundle': item.attributes.bundle }\">\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow\">\n <a :href=\"item.attributes.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.href\">{{ item.name }}</a>\n </div>\n </div>\n <div class=\"column is-2 has-text-centered is-relative\">\n <div class=\"quantity\">⨉ {{ item.quantity }}</div>\n <div class=\"quantity-price\" v-if=\"parseInt(item.quantity) > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\"></div>\n </div>\n </div>\n </div>\n <div class=\"options is-toggled\" v-if=\"itemOptions && itemOptions.length\">\n <div class=\"toggler\">\n <span>{{ __('shop.cart.additional') }} {{ itemOptions.length }}</span>\n </div>\n <div class=\"wrapper\">\n <div v-for=\"(option, index) in itemOptions\" v-bind:key=\"index\" class=\"columns is-checked\">\n <div class=\"column\">\n <div class=\"option-title\">{{ option.name }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\"><use xlink:href=\"#bundle-plus\" /></svg>\n <a :href=\"item.attributes.second.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.second.href\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\"><use xlink:href=\"#bundle-plus\" /></svg>\n <a :href=\"item.attributes.third.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.third.href\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { defineComponent, computed } from 'vue';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'CheckoutItem',\n props: {\n item: Object\n },\n setup(props) {\n const options = computed(() => (props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []));\n const itemOptions = computed(() => (props.item.options && props.item.options.length ? props.item.options.filter((option) => options.value.indexOf(option.id) !== -1) : []));\n\n return {\n itemOptions\n };\n }\n});\n</script>","<template>\n <div class=\"cart checkout\">\n <form ref=\"redirectForm\" v-if=\"redirect.url\" :action=\"redirect.url\"\n style=\"position: absolute; left: -1000px; top:-1000px;\" method=\"post\">\n <input type=\"hidden\" :name=\"name\" :value=\"value\" v-for=\"(value, name, index) in redirect.data\"\n v-bind:key=\"index\" />\n </form>\n\n <div class=\"items-wrapper\" v-if=\"items.length && !thanks\">\n <div class=\"checkout-title\">{{ __('shop.order.checkout_title') }}</div>\n <div class=\"columns\">\n <div class=\"column checkout-blocks-wrapper\">\n <slot name=\"header\"></slot>\n <div class=\"checkout-block is-cart\"><!--items-->\n <div class=\"wrapper\">\n <div class=\"title-row\">\n <div class=\"items-title\">\n {{ __('shop.order.your_order') }}\n <span class=\"ml-3\"\n v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> <span\n v-html=\"__('shop.cart.bysum') + ' ' + $filters.price(total)\"></span>\n </div>\n </div>\n <slot name=\"cart\" :items=\"items\">\n <checkout-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\"></checkout-item>\n <cart-trigger class=\"trigger\">\n <template #default=\"props\">\n <button class=\"button\" @click=\"props.open\">\n <svg>\n <use xlink:href=\"#cart-edit\" />\n </svg>\n <span>{{ __('shop.order.edit') }}</span>\n </button>\n </template>\n </cart-trigger>\n </slot>\n <slot name=\"cart-footer\" :total=\"total\"></slot>\n </div>\n </div>\n <div class=\"checkout-block is-user auth-user\">\n <div class=\"wrapper\">\n <div class=\"items-title\">{{ __('shop.order.contact_title') }}</div>\n <div class=\"user-tabs\" v-if=\"!auth && isLogin\">\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"new\" />{{\n __('shop.order.auth_new')\n }}</label>\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"login\" />{{\n __('shop.order.auth_old')\n }}</label>\n </div>\n <div class=\"columns\">\n <div class=\"logged-user\" v-if=\"auth\">\n <p><strong>{{ loggedUser.last_name }} {{ loggedUser.name }} {{\n loggedUser.middle_name }}</strong></p>\n <p>{{ phoneFormatted(loggedUser.phone) }}, {{ loggedUser.email }}</p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.company_name\"><strong>{{\n loggedUser.company_name\n }}</strong></p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.registration_number\">ЄДРПОУ\n {{\n loggedUser.registration_number }}</p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.region\">{{\n loggedUser.region_name }} {{\n loggedUser.district_name ? ', ' + loggedUser.district_name : '' }}</p>\n </div>\n <div class=\"column user-form\" v-if=\"userType == 'new'\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"userSchema\"\n :validation-schema=\"userValidation\" :initial-errors=\"userErrors\" :key=\"userKey\"\n :preventModelCleanupOnSchemaChange=\"true\">\n <template #afterForm>\n <button type=\"submit\" ref=\"userSubmitButton\" class=\"is-hidden\"></button>\n </template>\n </SchemaForm>\n </div>\n <div class=\"column user-login user-form\" v-if=\"userType == 'login' && isLogin\">\n <login :login-callback=\"loginCallback\"></login>\n </div>\n <div class=\"column\" v-if=\"isLogin\">\n <div class=\"social-auth\" v-if=\"!auth\">\n <div class=\"socials\">\n <div class=\"description\">{{ __('shop.order.auth_social') }}</div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\">\n <svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"checkout-block is-shipping\">\n <div class=\"wrapper shipping-type-block\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.shipping') }}</div>\n </div>\n <div class=\"value\" v-if=\"shippingSelected && shippingSelected.nextDates\">\n <div class=\"next-dates\">на {{ shippingSelected.nextDates }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"shipping = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': shipping }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in shippingTypesRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"shipping\" :value=\"item.id\"\n @click=\"toggleShippingRadio(item.id)\" />\n <img class=\"icon\" :src=\"item.icon\" v-if=\"item.icon\" />\n <svg v-else class=\"icon\">\n <use xlink:href=\"#shipping\" />\n </svg>\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <div class=\"value\">\n <span class=\"green\" v-if=\"!item.amount && item.price_label\">{{\n item.price_label }}</span>\n <span v-else\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div>\n </div>\n <!-- <div v-if=\"!slots.shippingFooter\">\n <component :is=\"item.component\" v-if=\"item.component && item.id == shipping\" :commit=\"shippingStoreData\" :data=\"shippingComponentData\" :item=\"item\" :take-user-data=\"true\"></component>\n </div> -->\n </div>\n </div>\n <slot name=\"shipping-footer\" :shippingTypesRestricted=\"shippingTypesRestricted\"\n :shipping=\"shipping\" :shippingStoreData=\"shippingStoreData\"\n :shippingComponentData=\"shippingComponentData\"></slot>\n </div>\n </div>\n <div class=\"checkout-block is-payment\" v-if=\"!isPaymentMethodOverSummary\">\n <div class=\"wrapper payment-method-block\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.payment') }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"payment = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': payment }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row no-icon\" v-bind:class=\"'is-' + item.code\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"payment\" :value=\"item.id\"\n @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <!-- <div class=\"value\" v-if=\"item.amount\">\n <span\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div> -->\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-4\">\n <div class=\"checkout-block summary\">\n <div class=\"inner payment-method-block\" v-if=\"isPaymentMethodOverSummary\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.payment') }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"payment = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': payment }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row no-icon\" v-bind:class=\"'is-' + item.code\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"payment\" :value=\"item.id\"\n @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <!-- <div class=\"value\" v-if=\"item.amount\">\n <span\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div> -->\n </div>\n <component :is=\"'checkout-payment-' + item.code\"\n v-if=\"payment == item.id && isComponentExists('checkout-payment-' + item.code)\">\n </component>\n </div>\n </div>\n </div>\n <div class=\"divider\"></div>\n <div class=\"inner\">\n <div class=\"items-title\">{{ __('shop.order.total') }}</div>\n <div class=\"rows\">\n <div class=\"row products\">\n <div class=\"info\"><span\n v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> {{\n __('shop.cart.bysum') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n <div class=\"row discount\" v-if=\"discount\">\n <div class=\"info\">{{ __('shop.order.discount') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(discount)\"></span>\n </div>\n </div>\n <!-- <div class=\"row fee\" v-if=\"fee > 0\">\n <div class=\"info\">{{ __('shop.order.fee') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(fee)\"></span>\n </div>\n </div> -->\n <div class=\"row shipping\" v-if=\"shipping\">\n <div class=\"info\">{{ __('shop.order.shipping_price') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(shippingPrice)\" v-if=\"shippingPrice > 0\"></span>\n <span class=\"green\"\n v-else-if=\"shippingSelected && shippingSelected.price_label\">{{\n shippingSelected.price_label }}</span>\n </div>\n </div>\n <div class=\"row promo\" v-if=\"promoCodeApplied\">\n <div class=\"info\">{{ __('shop.order.promo_code') }}<br><span class=\"green\">{{\n promoCode }}</span>\n </div>\n <div class=\"value\">\n <span\n v-html=\"(promoCodeApplied.type == 'percent' ? promoCodeApplied.amount + '%' : $filters.price(promoCodeApplied.amount))\"></span>\n </div>\n </div>\n <div class=\"row price\">\n <div class=\"info\">{{ __('shop.order.price') }}</div>\n <div class=\"value orange\">\n <span v-html=\"$filters.price(calculateWithPromoCodeDiscount())\"></span>\n </div>\n </div>\n </div>\n <div class=\"checkbox-wrapper nocall\">\n <label> <input type=\"checkbox\" class=\"checkbox\" v-model=\"dontcall\" />{{\n __('shop.order.nocall')\n }}</label>\n </div>\n <slot name=\"loyalty\" :loyalty=\"loyalty\" :inactive=\"isUseLoyaltyPoints\"></slot>\n <div class=\"user-loyalty consent\"\n v-if=\"loggedUser && loggedUser.loyalty_points > 0 && total <= loggedUser.loyalty_points\">\n <div class=\"checkbox-wrapper\">\n <label>\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"isUseLoyaltyPoints\">\n <div class=\"label\">Сплатити замовлення за <span>{{\n pluralize(readableTotalInPoints,\n __('shop.pluralize.points')) }}</span></div>\n </label>\n </div>\n <!-- <div class=\"notice\">{{ pluralize(readableUserLoyaltyPoints, __('shop.pluralize.points')) }} в наявності</div>\n <div class=\"user-form is-loyalty-use\">\n <div class=\"control\">\n <input type=\"number\" class=\"input\" placeholder=\"Сума бонусів\" v-model=\"loyaltyUse\" :disabled=\"loyaltyUseApplied\">\n </div>\n <button v-if=\"!loyaltyUseApplied\" class=\"button\" @click=\"applyLoyaltyUse\" :disabled=\"!loyaltyUse || loyaltyUse > loggedUser.loyalty_points\">Використати</button>\n <button v-else class=\"button is-reset\" @click=\"resetLoyaltyUse\">Відмінити</button>\n </div> -->\n </div>\n <div class=\"minimum-amount-message\" v-if=\"total < $env.checkout.minimum_amount\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <svg viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M9.50007 18C5.35778 18 2 14.6423 2 10.5C2 6.35775 5.35778 3 9.50007 3C13.6424 3 17.0001 6.35775 17.0001 10.5C17.0001 14.6423 13.6424 18 9.50007 18ZM8.75006 12.75V14.25H10.2501V12.75H8.75006ZM8.75006 6.75V11.25H10.2501V6.75H8.75006Z\"\n fill=\"#7C7C7C\" />\n </svg>\n </div>\n <div class=\"column\">\n <div class=\"message\"\n v-html=\"__('shop.order.minimum_amount', { amount: $filters.price($env.checkout.minimum_amount) })\">\n </div>\n </div>\n </div>\n </div>\n <button class=\"button submit\" @click=\"checkout\"\n v-bind:class=\"{ disabled: total < $env.checkout.minimum_amount, red: !ifCheckoutReady, 'is-loading': loading }\">{{\n __('shop.order.action') }}</button>\n <slot name=\"submit\" :total=\"total\"></slot>\n <div class=\"consent\" v-if=\"isConsent\">\n <div class=\"checkbox-wrapper\">\n <label>\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"consent\" />\n <div class=\"label\" v-html=\"__('shop.order.consent')\"></div>\n </label>\n </div>\n </div>\n <div class=\"comment-wrapper is-promo-code\" v-bind:class=\"{ 'is-open': isPromoCodeToggled }\"\n v-if=\"isPromoCode\">\n <div class=\"toggler\" @click=\"isPromoCodeToggled = !isPromoCodeToggled\">\n <span>{{ __('shop.order.promo_code') }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"user-form is-promo-code\">\n <div class=\"control\">\n <input type=\"text\" class=\"input\" placeholder=\" \" v-model=\"promoCode\"\n :disabled=\"promoCodeApplied\" id=\"promo-code-applied\">\n <label class=\"label\" for=\"promo-code-applied\">{{\n __('shop.order.promo.placeholder') }}</label>\n </div>\n <button v-if=\"!promoCodeApplied\" class=\"button\" @click=\"applyPromoCode\"\n :disabled=\"!promoCode\" v-bind:class=\"{ 'is-loading': isPromoLoading }\">{{\n __('shop.order.promo.apply') }}</button>\n <button v-else class=\"button\" @click=\"resetPromoCode\">{{\n __('shop.order.promo.reset') }}</button>\n </div>\n </div>\n <div class=\"comment-wrapper\" v-bind:class=\"{ 'is-open': isCommentToggled }\">\n <div class=\"toggler\" @click=\"isCommentToggled = !isCommentToggled\">\n <span>{{ __('shop.order.comment') }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"user-form\">\n <textarea class=\"textarea\" v-model=\"comment\"></textarea>\n <div class=\"chars-count\" v-if=\"comment.length\">{{ commentMaxLength - comment.length\n }}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"checkout-block thanks\" v-else-if=\"thanks && order\">\n <slot name=\"thanks\" :order=\"order\" :redirect=\"redirect\" :redirectForm=\"redirectForm\" :home=\"home\"\n :auth=\"auth\" :filters=\"$filters\" :user=\"user\">\n <div class=\"title\">\n {{ __('shop.order.order') }}\n <span>№{{ order.id }}</span> {{ isPayed ? __('shop.order.payed') : __('shop.order.success') }}\n </div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"redirect.url\">\n <div class=\"subtitle\">{{ __('shop.order.pay_online') }}</div>\n <button class=\"button is-payment\" @click=\"redirectForm.submit()\">{{\n __('shop.order.pay_online_go')\n }}</button>\n </div>\n <div class=\"column is-6\" v-else>\n <button class=\"button is-orange\" @click=\"home\">{{ __('shop.cart.continue') }}</button>\n </div>\n <div class=\"column is-6\">\n <div class=\"info-wrapper\" v-if=\"order.shipping[0]\">\n <div class=\"title\">{{ __('shop.order.shipping') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"order.shipping[0]\" v-html=\"order.shipping[0]\"></div>\n <div class=\"column is-6\" v-if=\"order.shipping[1]\" v-html=\"order.shipping[1]\"></div>\n </div>\n </div>\n <div class=\"info-wrapper\" v-if=\"order.payment[0]\">\n <div class=\"title\">{{ __('shop.order.payment') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"order.payment[0]\" v-html=\"order.payment[0]\"></div>\n <div class=\"column is-6\" v-if=\"order.payment[1]\" v-html=\"order.payment[1]\"></div>\n </div>\n </div>\n <div class=\"info-wrapper\" v-if=\"order.promoCode\">\n <div class=\"title\">{{ __('shop.order.promo_code') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\">\n <span v-html=\"order.promoCode\" class=\"green\"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </slot>\n </div>\n <div v-else-if=\"!redirectOnEmpty\" class=\"checkout-block empty\">\n <div class=\"title\">{{ __('shop.cart.no_no') }}</div>\n <div class=\"message\">\n {{ __('shop.cart.no_prop') }}\n <a :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.no_home') }}</a>, <br />{{\n __('shop.cart.no_search') }}\n </div>\n <a class=\"button continue\" :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.continue')\n }}</a>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, markRaw, defineComponent, watch, getCurrentInstance, nextTick, provide, useSlots, onMounted, resolveDynamicComponent, resolveComponent } from 'vue';\nimport CheckoutItem from './CheckoutItem.vue';\nimport { pluralize, numberFormat } from '@perevorot/shop/dist/helpers';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormRadio from '@perevorot/shop/dist/forms/FormRadio';\nimport * as yup from 'yup';\nimport { useToast } from 'vue-toastification';\nimport { auth as api } from '@perevorot/shop/dist/api';\nimport { formParse } from '@perevorot/shop/dist/helpers';\n\nyup.addMethod(yup.string, 'numberFilled', function (min, msg) {\n return this.test({\n name: 'numberFilled',\n exclusive: true,\n message: __('auth.validation.number'),\n params: {\n min: min,\n },\n test: (value) => !(value == '' || isNaN(value)),\n });\n});\n\nmarkRaw(FormText);\nmarkRaw(FormRadio);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nconst HtmlMessage = {\n props: {\n message: '',\n },\n template: '<div v-html=\"message\"></div>',\n};\n\nwindow.viewedSwiperOptions = {\n slidesPerView: 'auto',\n freeMode: true,\n slideClass: 'product',\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: '.next',\n prevEl: '.prev'\n },\n observer: true,\n observeParents: true\n};\n\nexport default /*#__PURE__*/ defineComponent({\n components: {\n CheckoutItem,\n SchemaForm\n },\n props: {\n isLogin: {\n type: Boolean,\n default: true\n },\n isPhoneMasked: {\n type: Boolean,\n default: true\n },\n isPromoCode: {\n type: Boolean,\n default: true\n },\n isConsent: {\n type: Boolean,\n default: false\n },\n isPaymentMethodOverSummary: {\n type: Boolean,\n default: false\n },\n userFields: {\n type: Array,\n default: ['last_name', 'name', 'email', 'phone'],\n },\n redirectOnEmpty: {\n type: String,\n default: false\n },\n showPlaceholders: {\n type: Boolean,\n default: false\n },\n isTrackAfterSuccessOnlinePurchase: {\n type: Boolean,\n default: false\n }\n },\n name: 'order-checkout',\n setup(props) {\n const slots = useSlots();\n const toast = useToast();\n const store = useStore();\n const loading = ref(false);\n const quantity = computed(() => store.getters['cart/quantity']);\n const items = computed(() => store.getters['cart/items']);\n const total = computed(() => store.getters['cart/total']);\n const auth = computed(() => store.getters['auth/is']);\n const userCheckout = computed(() => store.getters['checkout/user']);\n const loggedUser = computed(() => store.getters['auth/me']);\n const ifCheckoutReady = ref(true);\n const redirectForm = ref(null);\n const thanks = ref(false);\n const order = ref(null);\n const consent = ref(false);\n const shippingComponent = ref(null);\n\n const redirect = ref({});\n\n const shippingTypes = ref([]);\n const paymentMethods = ref([]);\n\n const userType = ref('new');\n const userSubmitButton = ref(null);\n\n const shippingComponentData = computed(() => store.getters['checkout/shippingData']);\n const isCommentToggled = ref(false);\n const commentMaxLength = 1000;\n\n const isPromoCodeToggled = ref(false);\n const promoCode = ref('');\n const promoCodeApplied = ref(null);\n const isPromoLoading = ref(false);\n const app = getCurrentInstance();\n\n const loyalty = computed(() => {\n const points = items.value.reduce((acc, array) => acc + (array.attributes.loyalty ? array.attributes.loyalty.points * array.quantity : 0), 0);\n\n return {\n points: points,\n name: pluralize(points, __('shop.pluralize.points'))\n };\n });\n\n const loyaltyUse = ref('');\n const isUseLoyaltyPoints = ref(false);\n\n watch(isUseLoyaltyPoints, (value) => {\n if (value) {\n loyaltyUse.value = total.value;\n } else {\n loyaltyUse.value = '';\n }\n });\n\n const loyaltyUseApplied = ref(false);\n\n const resetLoyaltyUse = () => {\n loyaltyUse.value = 0;\n loyaltyUseApplied.value = false;\n };\n\n const applyLoyaltyUse = () => {\n if (loyaltyUse.value) {\n loyaltyUseApplied.value = true;\n }\n };\n\n const readableTotalInPoints = computed(() => {\n return numberFormat(total.value);\n });\n\n const readableUserLoyaltyPoints = computed(() => {\n return numberFormat(loggedUser.value.loyalty_points - (loyaltyUseApplied.value ? loyaltyUse.value : 0));\n });\n\n const resetPromoCode = () => {\n promoCode.value = '';\n promoCodeApplied.value = null;\n };\n\n const isUserConsent = computed(() => {\n return (props.isConsent && consent.value) || !props.isConsent;\n });\n\n const applyPromoCode = () => {\n if (promoCode.value) {\n isPromoLoading.value = true;\n\n $http\n .post(window.location.href, {\n promoCodeApply: promoCode.value,\n email: user.value.email,\n total: total.value\n })\n .then(response => {\n promoCodeApplied.value = response.data;\n }).catch(error => {\n if (error.response && error.response.data.length) {\n error.response.data.forEach(error => {\n const component = {\n component: HtmlMessage,\n props: {\n message: __('shop.order.promo.error_' + error.error, { number: app.appContext.config.globalProperties.$filters.price(error.number) }),\n },\n };\n\n toast(component, {\n type: 'error'\n });\n\n if (error.error == 'not_found') {\n promoCode.value = '';\n }\n });\n\n promoCodeApplied.value = null;\n }\n }).finally(() => {\n isPromoLoading.value = false;\n });\n }\n };\n\n const dontcall = computed({\n get() {\n return store.getters['checkout/dontcall'];\n },\n set(value) {\n store.commit('checkout/dontcall', value);\n }\n });\n\n const comment = computed({\n get() {\n const comment = store.getters['checkout/comment'];\n\n if (!!comment) {\n isCommentToggled.value = true;\n }\n\n return comment;\n },\n set(value) {\n store.commit('checkout/comment', value);\n }\n });\n\n watch(comment, (value) => {\n if (value.length > commentMaxLength) {\n comment.value = comment.value.substring(0, commentMaxLength);\n }\n });\n\n const field = (name, defaultValue) => {\n return computed({\n get() {\n return userCheckout.value[name] ? userCheckout.value[name] : defaultValue;\n },\n set(value) {\n let data = JSON.parse(JSON.stringify(userCheckout.value));\n data[name] = value;\n\n store.commit('checkout/user', data);\n }\n });\n };\n\n provide('field', field);\n\n // const user = ref({\n // last_name: field('last_name'),\n // middle_name: field('middle_name'),\n // name: field('name'),\n // email: field('email'),\n // phone: field('phone'),\n // registration_number: field('registration_number'),\n // company_name: field('company_name'),\n // user_type: field('user_type', 'individual'),\n // });\n const user = ref({});\n\n if (!auth.value) {\n api.registerForm()\n .then((response) => {\n if (response.data) {\n const form = formParse(response.data);\n\n userSchema.value = form.schema;\n user.value = form.model;\n userValidation.value = form.validation;\n }\n })\n .finally(() => {\n\n });\n }\n\n provide('user', user);\n provide('formModel', user);\n provide('loggedUser', loggedUser);\n\n store.dispatch('auth/me', {\n finally: () => { }\n });\n\n const calculateWithPromoCodeDiscount = () => {\n const sum = total.value + fee.value + shippingPrice.value;\n\n if (promoCodeApplied.value && promoCodeApplied.value.type == 'percent') {\n return Math.round(sum - sum * promoCodeApplied.value.amount / 100);\n }\n\n if (promoCodeApplied.value && promoCodeApplied.value.type == 'discount') {\n return Math.max(0, sum - promoCodeApplied.value.amount);\n }\n\n return sum;\n };\n\n const shipping = computed({\n get() {\n return store.getters['checkout/shipping'];\n },\n set(id) {\n store.commit('checkout/shipping', id);\n }\n });\n\n const payment = computed({\n get() {\n return store.getters['checkout/payment'];\n },\n set(id) {\n store.commit('checkout/payment', id);\n }\n });\n\n const shippingSelected = computed(() => {\n return shipping.value ? shippingTypes.value.find((item) => item.id == shipping.value) : {};\n });\n\n const paymentSelected = computed(() => {\n return payment.value ? paymentMethods.value.find((item) => item.id == payment.value) : {};\n });\n\n const shippingPrice = computed(() => {\n return calculatePrice(shippingTypes.value, shipping.value);\n });\n\n const fee = computed(() => {\n return calculatePrice(paymentMethods.value, payment.value);\n });\n\n const shippingTypesRestricted = computed(() => {\n return restrictCheck(shippingTypes.value);\n });\n\n const paymentMethodsRestricted = computed(() => {\n return restrictCheck(paymentMethods.value);\n });\n\n const categoriesInCart = computed(() => {\n let categories = [];\n\n items.value.forEach((item) => {\n if (categories.indexOf(item.category_id) === -1) {\n categories.push(item.category_id);\n }\n });\n\n return categories;\n });\n\n const calculatePrice = (items, value) => {\n let price = 0;\n\n if (value) {\n const item = items.find((item) => item.id == value);\n\n if (item) {\n if (item.type == 'sum') {\n price = item.amount;\n } else {\n price = Math.round((total.value * item.amount) / 100);\n }\n }\n }\n\n return price;\n };\n\n const restrictCheck = (elements) => {\n let items = [];\n\n elements.forEach((item) => {\n if (item.restrictions && Object.keys(item.restrictions).length) {\n let ok = true;\n\n const r = item.restrictions;\n\n if (r.price_min && r.price_max) {\n ok = total.value >= r.price_min && total.value <= r.price_max;\n item.restrictedForce = !ok;\n } else if (r.price_min) {\n ok = total.value >= r.price_min;\n item.restrictedForce = !ok;\n } else if (r.price_max) {\n ok = total.value <= r.price_max;\n item.restrictedForce = !ok;\n }\n\n if (ok && shipping.value) {\n if (r.shipping_type && r.shipping_type.length) {\n ok = r.shipping_type.indexOf(shipping.value) !== -1;\n }\n }\n\n if (ok && payment.value) {\n if (r.payment_method && r.payment_method.length) {\n ok = r.payment_method.indexOf(payment.value) !== -1;\n }\n }\n\n if (ok && r.categories && r.categories.length) {\n ok = !categoriesInCart.value.filter((value) => !r.categories.includes(value)).length;\n item.restrictedForce = !ok;\n }\n\n if (ok && r.code === 'user_type') {\n ok = r.value === loggedUser.value.user_type || r.value === user.value.user_type;\n item.restrictedForce = !ok;\n }\n\n item.restricted = !ok;\n } else {\n item.restricted = false;\n }\n\n if (!item.restrictedForce) {\n items.push(item);\n }\n });\n\n return items;\n };\n\n const discount = computed(() => {\n let sum = 0;\n\n items.value.forEach((item) => {\n let s = 0;\n\n if (item.attributes.priceOld) {\n s = item.attributes.priceOld - item.attributes.price;\n }\n\n sum += s * item.quantity;\n });\n\n return sum;\n });\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const loginCallback = () => {\n userType.value = 'new';\n };\n\n $http.post(window.location.href).then((response) => {\n shippingTypes.value = response.data.shipping;\n paymentMethods.value = response.data.payment;\n });\n\n watch(userType, (value) => {\n if (value == 'login') {\n store.commit('auth/modal', 'login');\n }\n });\n\n // let userSchemaFields = {\n // user_type: {\n // component: FormRadio,\n // model: 'user_type',\n // label: '',\n // list: [\n // { code: 'individual', value: __('auth.registration.form.user_type_individual') },\n // { code: 'legal', value: __('auth.registration.form.user_type_legal') }\n // ],\n // },\n // name: {\n // component: FormText,\n // label: __('auth.registration.form.name'),\n // model: 'first_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.name') : '',\n // },\n // last_name: {\n // component: FormText,\n // label: __('auth.registration.form.last_name'),\n // model: 'last_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.last_name') : '',\n // },\n // middle_name: {\n // component: FormText,\n // label: __('auth.registration.form.middle_name'),\n // model: 'middle_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.middle_name') : '',\n // },\n // phone: {\n // component: FormText,\n // label: __('auth.registration.form.phone'),\n // model: 'phone',\n // type: 'phone',\n // //placeholder: '(050) 123-45-67'\n // },\n // registration_number: {\n // component: FormText,\n // label: __('auth.registration.form.registration_number'),\n // model: 'registration_number',\n // condition: (model) => model.user_type === 'legal',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.registration_number') : '',\n // },\n // company_name: {\n // component: FormText,\n // label: __('auth.registration.form.company_name'),\n // model: 'company_name',\n // condition: (model) => model.user_type === 'legal',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.company_name') : '',\n // },\n // email: {\n // component: FormText,\n // label: __('auth.login.form.email'),\n // model: 'email',\n // placeholder: props.showPlaceholders ? __('auth.login.form.email') : '',\n // },\n // };\n\n // if (props.isPhoneMasked) {\n // userSchemaFields.phone.mask = '(###) ###-##-##';\n // }\n\n // let userSchemaFieldsFiltered = Object.keys(userSchemaFields).reduce((obj, key) => {\n // if (props.userFields.includes(key)) {\n // obj[key] = userSchemaFields[key];\n // }\n\n // return obj;\n // }, {});\n\n // userSchemaFieldsFiltered = props.userFields.reduce((obj, key) => {\n // obj[key] = userSchemaFieldsFiltered[key];\n // return obj;\n // }, {});\n\n //const userSchema = ref(userSchemaFieldsFiltered);\n const userSchema = ref({});\n const userErrors = ref({});\n const userKey = ref(0);\n\n useSchemaForm(user);\n\n // const phoneRegExp = /^\\(\\d{3}\\) \\d{3}\\-\\d{2}\\-\\d{2}$/;\n // const userValidationFields = {\n // last_name: yup.string().trim().required(__('auth.validation.required')),\n // middle_name: yup.string().trim().required(__('auth.validation.required')),\n // name: yup.string().trim().required(__('auth.validation.required')),\n // phone: props.isPhoneMasked ? yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone')) : yup.string().required(__('auth.validation.phone')),\n // email: yup.string().trim().email(__('auth.validation.email')).required(__('auth.validation.required')),\n // registration_number: yup.string().when('user_type', (user_type) => {\n // if (user_type == 'legal') {\n // return yup.string().numberFilled();\n // }\n // }),\n // company_name: yup.string().when('user_type', (user_type) => {\n // if (user_type == 'legal') {\n // return yup.string().required(__('auth.validation.required'));\n // }\n // }),\n // };\n\n // const userValidationFieldsFiltered = Object.keys(userValidationFields).reduce((obj, key) => {\n // if (props.userFields.includes(key)) {\n // obj[key] = userValidationFields[key];\n // }\n\n // return obj;\n // }, {});\n\n //const userValidation = yup.object().shape(userValidationFieldsFiltered);\n const userValidation = ref({});\n\n const paymentValidations = ref({});\n\n provide('paymentValidations', paymentValidations);\n provide('paymentMethods', paymentMethods);\n\n window.addEventListener('beforeunload', () => {\n store.commit('auth/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit('auth/modal', null);\n });\n\n const validate = async () => {\n if (typeof shippingComponentValid.value == 'function') {\n const isShippingComponentFormsValid = await shippingComponentValid.value();\n\n if (userSubmitButton.value) {\n userSubmitButton.value.click();\n }\n\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (isUserValid) {\n ifCheckoutReady.value = isUserValid && payment.value && isUserConsent.value && shipping.value && (!shippingSelected.value.component || (shippingSelected.value.component && shippingComponentData.value[shippingSelected.value.code] && shippingComponentData.value[shippingSelected.value.code].isValid)) && isShippingComponentFormsValid;\n });\n } else {\n ifCheckoutReady.value = payment.value && isUserConsent.value && shipping.value && (!shippingSelected.value.component || (shippingSelected.value.component && shippingComponentData.value[shippingSelected.value.code] && shippingComponentData.value[shippingSelected.value.code].isValid)) && isShippingComponentFormsValid;\n }\n }\n };\n\n const shippingComponentValid = ref(null);\n provide('shippingComponentValid', shippingComponentValid);\n\n const shippingComponentUserData = ref({});\n provide('shippingComponentUserData', shippingComponentUserData);\n\n const initPaymentWidget = (payment, order) => {\n const wayforpay = new Wayforpay();\n\n window.addEventListener('message', (event) => {\n if (event.data == 'WfpWidgetEventClose' || event.data == 'WfpWidgetEventDeclined' || event.data == 'WfpWidgetEventPending') {\n\n }\n\n if (event.data == 'WfpWidgetEventApproved') {\n resetCheckoutForm(order);\n\n isPayed.value = true;\n\n store.dispatch('cart/clear', {\n finally: () => { }\n });\n }\n });\n\n wayforpay.run(payment);\n }\n\n const isPayed = ref(false);\n\n const resetCheckoutForm = (_order) => {\n thanks.value = true;\n order.value = _order;\n\n document.querySelector('html').classList.add('is-checkout-thanks');\n\n resertStore();\n }\n\n const checkout = async () => {\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (valid) {\n if (!valid) {\n userType.value = 'new';\n userSubmitButton.value.click();\n\n toast(__('shop.order.validate_user'), {\n type: 'error'\n });\n } else if (user.value.is_register) {\n store.dispatch('auth/register', {\n type: 'Full',\n credentials: user.value,\n finally: () => {\n },\n callback: (response) => {\n createOrder();\n },\n catch: (error) => {\n let incomingErrors = {};\n\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n incomingErrors[field] = messages[0];\n }\n }\n\n userKey.value++;\n }\n\n userErrors.value = incomingErrors;\n }\n });\n } else {\n createOrder();\n }\n });\n } else {\n createOrder();\n }\n };\n\n const createOrderWithoutValidate = (valid) => {\n let isShippingComponentFormsValid = typeof shippingComponentValid.value == 'function' ? shippingComponentValid.value() : null;\n\n let isPaymentValid = paymentValidations.value[paymentSelected.value.code] ? paymentValidations.value[paymentSelected.value.code]() : true;\n\n if (!isPaymentValid) {\n toast('Заповніть необхідні дані оплати', {\n type: 'error'\n });\n\n return;\n }\n\n if (shippingSelected.value && !shippingSelected.value.component) {\n isShippingComponentFormsValid = true;\n }\n\n if (total.value < $env.checkout.minimum_amount) {\n const component = {\n component: HtmlMessage,\n props: {\n message: __('shop.order.validate_minimum_amount', { amount: app.appContext.config.globalProperties.$filters.price($env.checkout.minimum_amount) }),\n },\n };\n\n toast(component, {\n type: 'error'\n });\n } else if (!valid) {\n userType.value = 'new';\n userSubmitButton.value.click();\n\n toast(__('shop.order.validate_user'), {\n type: 'error'\n });\n } else if (!shipping.value) {\n toast(__('shop.order.validate_shipping'), {\n type: 'error'\n });\n } else if (shippingSelected.value.component && (!shippingComponentData.value[shippingSelected.value.code] || !shippingComponentData.value[shippingSelected.value.code].isValid)) {\n toast(__('shop.order.validate_shipping1') + ': «' + shippingSelected.value.name + '»', {\n type: 'error'\n });\n } else if (!isShippingComponentFormsValid) {\n toast(__('shop.order.validate_shipping1') + ': «' + shippingSelected.value.name + '»', {\n type: 'error'\n });\n } else if (!payment.value) {\n toast(__('shop.order.validate_payment'), {\n type: 'error'\n });\n } else if (!isUserConsent.value) {\n toast(__('shop.order.validate_consent'), {\n type: 'error'\n });\n } else {\n let clientId;\n let data = shippingComponentData.value[shippingSelected.value.code] ? JSON.parse(JSON.stringify(shippingComponentData.value[shippingSelected.value.code])) : {};\n\n delete data.isValid;\n\n setTimeout(() => {\n const shippingUserData = JSON.parse(JSON.stringify(shippingComponentUserData.value));\n\n if (document.cookie) {\n const cookies = document.cookie.split(';');\n\n cookies.forEach((cookie) => {\n const parts = cookie.split('=');\n\n if (parts[0].trim() === '_ga') {\n clientId = parts[1].split('.')[2] + '.' + parts[1].split('.')[3];\n }\n });\n }\n\n const userValue = auth.value ? loggedUser.value : user.value;\n\n const model = {\n checkout: true,\n user: {\n last_name: userValue.last_name,\n middle_name: userValue.middle_name,\n name: userValue.name,\n phone: userValue.phone,\n email: userValue.email,\n user_type: userValue.user_type,\n registration_number: userValue.registration_number,\n password: userValue.is_register ? userValue.password : null,\n company_name: userValue.company_name,\n district: userValue.district,\n region: userValue.region,\n is_register: userValue.is_register,\n },\n shipping: {\n id: shipping.value,\n data: data,\n user: shippingUserData,\n },\n payment: {\n id: payment.value\n },\n comment: comment.value,\n dontcall: dontcall.value,\n promoCode: promoCode.value,\n loyalty: loyaltyUse.value,\n clientId: clientId\n };\n\n loading.value = true;\n\n $http\n .post(window.location.href, model)\n .then((response) => {\n if (response.data && response.data.error && response.data.message) {\n toast(response.data.message, {\n type: 'error',\n });\n\n return;\n }\n\n let products = [];\n\n items.value.forEach((item) => {\n let product = {\n item_name: item.name,\n item_id: item.attributes.code,\n price: item.price,\n quantity: item.quantity\n };\n\n if (item.attributes.brand) {\n product.item_brand = item.attributes.brand;\n }\n\n if (item.attributes.property) {\n product.item_variant = item.attributes.property;\n }\n\n if (item.attributes.categoryFull) {\n if (item.attributes.categoryFull.indexOf('/') !== -1) {\n item.attributes.categoryFull.split('/').forEach((segment, index) => {\n product['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n product.item_category = item.attributes.categoryFull;\n }\n }\n\n if (item.attributes.index) {\n product.index = item.attributes.index;\n }\n\n if (item.attributes.itemListName) {\n product.item_list_name = item.attributes.itemListName;\n }\n\n products.push(product);\n });\n\n\n let object = {\n payment_type: paymentSelected.value.name,\n shipping_tier: shippingSelected.value.name,\n ecommerce: {\n transaction_id: response.data.order.id,\n affiliation: 'main',\n value: parseFloat(total.value),\n shipping: 0,\n currency: 'UAH',\n items: products\n },\n event: 'purchase',\n };\n\n if (user.value.user_type) {\n object.user_type = __('auth.registration.form.user_type_' + user.value.user_type);\n }\n\n if (promoCode.value) {\n object.ecommerce.coupon = promoCode.value;\n }\n\n if (props.isTrackAfterSuccessOnlinePurchase && (response.data.redirect || (response.data.payment_widget_data && window.Wayforpay))) {\n localStorage.setItem('ecommerce', JSON.stringify(object));\n } else {\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n\n if (response.data.redirect) {\n redirect.value = {\n url: response.data.redirect.url,\n data: response.data.redirect.data\n };\n\n nextTick(() => {\n setTimeout(() => {\n redirectForm.value.submit();\n }, 400);\n });\n }\n\n if (response.data.payment_widget_data && window.Wayforpay) {\n initPaymentWidget(JSON.parse(response.data.payment_widget_data), response.data.order);\n } else {\n resetCheckoutForm(response.data.order);\n }\n })\n .catch((e) => {\n toast(__('shop.order.error'), {\n type: 'error'\n });\n\n console.error(e);\n })\n .finally(() => {\n loading.value = false;\n });\n }, 100);\n }\n }\n\n const createOrder = () => {\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (valid) {\n createOrderWithoutValidate(valid);\n });\n } else {\n createOrderWithoutValidate(true);\n }\n }\n\n const toggleShippingRadio = (id) => {\n if (shipping.value === id) {\n shipping.value = null;\n }\n };\n\n const togglePaymentRadio = (id) => {\n if (payment.value === id) {\n payment.value = null;\n }\n };\n\n const resertStore = () => {\n // debug\n store.commit('checkout/reset');\n store.commit('cart/clear');\n };\n\n const shippingStoreData = (code, data, isValid) => {\n let d = JSON.parse(JSON.stringify(shippingComponentData.value));\n\n data.isValid = isValid;\n d[code] = data;\n\n store.commit('checkout/shippingData', d);\n };\n\n const home = () => {\n window.location.href = $env.locale.url ? $env.locale.url : '/';\n };\n\n onMounted(() => {\n if (!quantity.value && props.redirectOnEmpty) {\n window.location.href = props.redirectOnEmpty;\n }\n\n let products = [];\n\n items.value.forEach((item) => {\n let product = {\n item_name: item.name,\n item_id: item.attributes.code,\n price: parseFloat(item.attributes.price),\n quantity: item.quantity\n };\n\n if (item.attributes.brand) {\n product.item_brand = item.attributes.brand;\n }\n\n if (item.attributes.property) {\n product.item_variant = item.attributes.property;\n }\n\n if (item.attributes.categoryFull) {\n if (item.attributes.categoryFull.indexOf('/') !== -1) {\n item.attributes.categoryFull.split('/').forEach((segment, index) => {\n product['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n product.item_category = item.attributes.categoryFull;\n }\n }\n\n if (item.attributes.index) {\n product.index = item.attributes.index;\n }\n\n if (item.attributes.itemListName) {\n product.item_list_name = item.attributes.itemListName;\n }\n\n products.push(product);\n });\n\n if (products.length) {\n const object = {\n ecommerce: {\n currency: 'UAH',\n items: products,\n value: parseFloat(total.value),\n },\n event: 'begin_checkout'\n };\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n\n const phoneFormatted = (phone) => {\n return phone.replace(/(\\d{3})(\\d{3})(\\d{2})(\\d{2})/, '($1) $2-$3-$4');\n }\n\n const isComponentExists = (name) => {\n return typeof resolveDynamicComponent(name) !== 'string';\n }\n\n return {\n auth,\n userType,\n facebook,\n google,\n loginCallback,\n quantity,\n items,\n loading,\n pluralize,\n discount,\n total,\n shipping,\n shippingPrice,\n payment,\n fee,\n userValidation,\n userSchema,\n userSubmitButton,\n checkout,\n ifCheckoutReady,\n validate,\n shippingTypesRestricted,\n paymentMethodsRestricted,\n toggleShippingRadio,\n togglePaymentRadio,\n shippingSelected,\n paymentSelected,\n shippingComponentData,\n shippingStoreData,\n resertStore,\n user,\n dontcall,\n comment,\n isCommentToggled,\n commentMaxLength,\n userCheckout,\n thanks,\n order,\n redirect,\n redirectForm,\n home,\n isPromoCodeToggled,\n applyPromoCode,\n promoCode,\n isPromoLoading,\n promoCodeApplied,\n resetPromoCode,\n calculateWithPromoCodeDiscount,\n consent,\n shippingComponent,\n slots,\n isPayed,\n loyalty,\n loyaltyUse,\n loyaltyUseApplied,\n resetLoyaltyUse,\n applyLoyaltyUse,\n readableUserLoyaltyPoints,\n userErrors,\n userKey,\n loggedUser,\n phoneFormatted,\n readableTotalInPoints,\n isUseLoyaltyPoints,\n isComponentExists,\n };\n }\n});\n</script>","<template>\n <div class=\"cart checkout\">\n <form ref=\"redirectForm\" v-if=\"redirect.url\" :action=\"redirect.url\"\n style=\"position: absolute; left: -1000px; top:-1000px;\" method=\"post\">\n <input type=\"hidden\" :name=\"name\" :value=\"value\" v-for=\"(value, name, index) in redirect.data\"\n v-bind:key=\"index\" />\n </form>\n\n <div class=\"items-wrapper\" v-if=\"items.length && !thanks\">\n <div class=\"checkout-title\">{{ __('shop.order.checkout_title') }}</div>\n <div class=\"columns\">\n <div class=\"column checkout-blocks-wrapper\">\n <slot name=\"header\"></slot>\n <div class=\"checkout-block is-cart\"><!--items-->\n <div class=\"wrapper\">\n <div class=\"title-row\">\n <div class=\"items-title\">\n {{ __('shop.order.your_order') }}\n <span class=\"ml-3\"\n v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> <span\n v-html=\"__('shop.cart.bysum') + ' ' + $filters.price(total)\"></span>\n </div>\n </div>\n <slot name=\"cart\" :items=\"items\">\n <checkout-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\"></checkout-item>\n <cart-trigger class=\"trigger\">\n <template #default=\"props\">\n <button class=\"button\" @click=\"props.open\">\n <svg>\n <use xlink:href=\"#cart-edit\" />\n </svg>\n <span>{{ __('shop.order.edit') }}</span>\n </button>\n </template>\n </cart-trigger>\n </slot>\n <slot name=\"cart-footer\" :total=\"total\"></slot>\n </div>\n </div>\n <div class=\"checkout-block is-user auth-user\">\n <div class=\"wrapper\">\n <div class=\"items-title\">{{ __('shop.order.contact_title') }}</div>\n <div class=\"user-tabs\" v-if=\"!auth && isLogin\">\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"new\" />{{\n __('shop.order.auth_new')\n }}</label>\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"login\" />{{\n __('shop.order.auth_old')\n }}</label>\n </div>\n <div class=\"columns\">\n <div class=\"logged-user\" v-if=\"auth\">\n <p><strong>{{ loggedUser.last_name }} {{ loggedUser.name }} {{\n loggedUser.middle_name }}</strong></p>\n <p>{{ phoneFormatted(loggedUser.phone) }}, {{ loggedUser.email }}</p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.company_name\"><strong>{{\n loggedUser.company_name\n }}</strong></p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.registration_number\">ЄДРПОУ\n {{\n loggedUser.registration_number }}</p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.region\">{{\n loggedUser.region_name }} {{\n loggedUser.district_name ? ', ' + loggedUser.district_name : '' }}</p>\n </div>\n <div class=\"column user-form\" v-if=\"userType == 'new'\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"userSchema\"\n :validation-schema=\"userValidation\" :initial-errors=\"userErrors\" :key=\"userKey\"\n :preventModelCleanupOnSchemaChange=\"true\">\n <template #afterForm>\n <button type=\"submit\" ref=\"userSubmitButton\" class=\"is-hidden\"></button>\n </template>\n </SchemaForm>\n </div>\n <div class=\"column user-login user-form\" v-if=\"userType == 'login' && isLogin\">\n <login :login-callback=\"loginCallback\"></login>\n </div>\n <div class=\"column\" v-if=\"isLogin\">\n <div class=\"social-auth\" v-if=\"!auth\">\n <div class=\"socials\">\n <div class=\"description\">{{ __('shop.order.auth_social') }}</div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\">\n <svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"checkout-block is-shipping\">\n <div class=\"wrapper shipping-type-block\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.shipping') }}</div>\n </div>\n <div class=\"value\" v-if=\"shippingSelected && shippingSelected.nextDates\">\n <div class=\"next-dates\">на {{ shippingSelected.nextDates }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"shipping = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': shipping }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in shippingTypesRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"shipping\" :value=\"item.id\"\n @click=\"toggleShippingRadio(item.id)\" />\n <img class=\"icon\" :src=\"item.icon\" v-if=\"item.icon\" />\n <svg v-else class=\"icon\">\n <use xlink:href=\"#shipping\" />\n </svg>\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <div class=\"value\">\n <span class=\"green\" v-if=\"!item.amount && item.price_label\">{{\n item.price_label }}</span>\n <span v-else\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div>\n </div>\n <!-- <div v-if=\"!slots.shippingFooter\">\n <component :is=\"item.component\" v-if=\"item.component && item.id == shipping\" :commit=\"shippingStoreData\" :data=\"shippingComponentData\" :item=\"item\" :take-user-data=\"true\"></component>\n </div> -->\n </div>\n </div>\n <slot name=\"shipping-footer\" :shippingTypesRestricted=\"shippingTypesRestricted\"\n :shipping=\"shipping\" :shippingStoreData=\"shippingStoreData\"\n :shippingComponentData=\"shippingComponentData\"></slot>\n </div>\n </div>\n <div class=\"checkout-block is-payment\" v-if=\"!isPaymentMethodOverSummary\">\n <div class=\"wrapper payment-method-block\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.payment') }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"payment = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': payment }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row no-icon\" v-bind:class=\"'is-' + item.code\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"payment\" :value=\"item.id\"\n @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <!-- <div class=\"value\" v-if=\"item.amount\">\n <span\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div> -->\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-4\">\n <div class=\"checkout-block summary\">\n <div class=\"inner payment-method-block\" v-if=\"isPaymentMethodOverSummary\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.payment') }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"payment = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': payment }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row no-icon\" v-bind:class=\"'is-' + item.code\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"payment\" :value=\"item.id\"\n @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <!-- <div class=\"value\" v-if=\"item.amount\">\n <span\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div> -->\n </div>\n <component :is=\"'checkout-payment-' + item.code\"\n v-if=\"payment == item.id && isComponentExists('checkout-payment-' + item.code)\">\n </component>\n </div>\n </div>\n </div>\n <div class=\"divider\"></div>\n <div class=\"inner\">\n <div class=\"items-title\">{{ __('shop.order.total') }}</div>\n <div class=\"rows\">\n <div class=\"row products\">\n <div class=\"info\"><span\n v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> {{\n __('shop.cart.bysum') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n <div class=\"row discount\" v-if=\"discount\">\n <div class=\"info\">{{ __('shop.order.discount') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(discount)\"></span>\n </div>\n </div>\n <!-- <div class=\"row fee\" v-if=\"fee > 0\">\n <div class=\"info\">{{ __('shop.order.fee') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(fee)\"></span>\n </div>\n </div> -->\n <div class=\"row shipping\" v-if=\"shipping\">\n <div class=\"info\">{{ __('shop.order.shipping_price') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(shippingPrice)\" v-if=\"shippingPrice > 0\"></span>\n <span class=\"green\"\n v-else-if=\"shippingSelected && shippingSelected.price_label\">{{\n shippingSelected.price_label }}</span>\n </div>\n </div>\n <div class=\"row promo\" v-if=\"promoCodeApplied\">\n <div class=\"info\">{{ __('shop.order.promo_code') }}<br><span class=\"green\">{{\n promoCode }}</span>\n </div>\n <div class=\"value\">\n <span\n v-html=\"(promoCodeApplied.type == 'percent' ? promoCodeApplied.amount + '%' : $filters.price(promoCodeApplied.amount))\"></span>\n </div>\n </div>\n <div class=\"row price\">\n <div class=\"info\">{{ __('shop.order.price') }}</div>\n <div class=\"value orange\">\n <span v-html=\"$filters.price(calculateWithPromoCodeDiscount())\"></span>\n </div>\n </div>\n </div>\n <div class=\"checkbox-wrapper nocall\">\n <label> <input type=\"checkbox\" class=\"checkbox\" v-model=\"dontcall\" />{{\n __('shop.order.nocall')\n }}</label>\n </div>\n <slot name=\"loyalty\" :loyalty=\"loyalty\" :inactive=\"isUseLoyaltyPoints\"></slot>\n <div class=\"user-loyalty consent\"\n v-if=\"loggedUser && loggedUser.loyalty_points > 0 && total <= loggedUser.loyalty_points\">\n <div class=\"checkbox-wrapper\">\n <label>\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"isUseLoyaltyPoints\">\n <div class=\"label\">Сплатити замовлення за <span>{{\n pluralize(readableTotalInPoints,\n __('shop.pluralize.points')) }}</span></div>\n </label>\n </div>\n <!-- <div class=\"notice\">{{ pluralize(readableUserLoyaltyPoints, __('shop.pluralize.points')) }} в наявності</div>\n <div class=\"user-form is-loyalty-use\">\n <div class=\"control\">\n <input type=\"number\" class=\"input\" placeholder=\"Сума бонусів\" v-model=\"loyaltyUse\" :disabled=\"loyaltyUseApplied\">\n </div>\n <button v-if=\"!loyaltyUseApplied\" class=\"button\" @click=\"applyLoyaltyUse\" :disabled=\"!loyaltyUse || loyaltyUse > loggedUser.loyalty_points\">Використати</button>\n <button v-else class=\"button is-reset\" @click=\"resetLoyaltyUse\">Відмінити</button>\n </div> -->\n </div>\n <div class=\"minimum-amount-message\" v-if=\"total < $env.checkout.minimum_amount\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <svg viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M9.50007 18C5.35778 18 2 14.6423 2 10.5C2 6.35775 5.35778 3 9.50007 3C13.6424 3 17.0001 6.35775 17.0001 10.5C17.0001 14.6423 13.6424 18 9.50007 18ZM8.75006 12.75V14.25H10.2501V12.75H8.75006ZM8.75006 6.75V11.25H10.2501V6.75H8.75006Z\"\n fill=\"#7C7C7C\" />\n </svg>\n </div>\n <div class=\"column\">\n <div class=\"message\"\n v-html=\"__('shop.order.minimum_amount', { amount: $filters.price($env.checkout.minimum_amount) })\">\n </div>\n </div>\n </div>\n </div>\n <button class=\"button submit\" @click=\"checkout\"\n v-bind:class=\"{ disabled: total < $env.checkout.minimum_amount, red: !ifCheckoutReady, 'is-loading': loading }\">{{\n __('shop.order.action') }}</button>\n <slot name=\"submit\" :total=\"total\"></slot>\n <div class=\"consent\" v-if=\"isConsent\">\n <div class=\"checkbox-wrapper\">\n <label>\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"consent\" />\n <div class=\"label\" v-html=\"__('shop.order.consent')\"></div>\n </label>\n </div>\n </div>\n <div class=\"comment-wrapper is-promo-code\" v-bind:class=\"{ 'is-open': isPromoCodeToggled }\"\n v-if=\"isPromoCode\">\n <div class=\"toggler\" @click=\"isPromoCodeToggled = !isPromoCodeToggled\">\n <span>{{ __('shop.order.promo_code') }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"user-form is-promo-code\">\n <div class=\"control\">\n <input type=\"text\" class=\"input\" placeholder=\" \" v-model=\"promoCode\"\n :disabled=\"promoCodeApplied\" id=\"promo-code-applied\">\n <label class=\"label\" for=\"promo-code-applied\">{{\n __('shop.order.promo.placeholder') }}</label>\n </div>\n <button v-if=\"!promoCodeApplied\" class=\"button\" @click=\"applyPromoCode\"\n :disabled=\"!promoCode\" v-bind:class=\"{ 'is-loading': isPromoLoading }\">{{\n __('shop.order.promo.apply') }}</button>\n <button v-else class=\"button\" @click=\"resetPromoCode\">{{\n __('shop.order.promo.reset') }}</button>\n </div>\n </div>\n <div class=\"comment-wrapper\" v-bind:class=\"{ 'is-open': isCommentToggled }\">\n <div class=\"toggler\" @click=\"isCommentToggled = !isCommentToggled\">\n <span>{{ __('shop.order.comment') }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"user-form\">\n <textarea class=\"textarea\" v-model=\"comment\"></textarea>\n <div class=\"chars-count\" v-if=\"comment.length\">{{ commentMaxLength - comment.length\n }}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"checkout-block thanks\" v-else-if=\"thanks && order\">\n <slot name=\"thanks\" :order=\"order\" :redirect=\"redirect\" :redirectForm=\"redirectForm\" :home=\"home\"\n :auth=\"auth\" :filters=\"$filters\" :user=\"user\">\n <div class=\"title\">\n {{ __('shop.order.order') }}\n <span>№{{ order.id }}</span> {{ isPayed ? __('shop.order.payed') : __('shop.order.success') }}\n </div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"redirect.url\">\n <div class=\"subtitle\">{{ __('shop.order.pay_online') }}</div>\n <button class=\"button is-payment\" @click=\"redirectForm.submit()\">{{\n __('shop.order.pay_online_go')\n }}</button>\n </div>\n <div class=\"column is-6\" v-else>\n <button class=\"button is-orange\" @click=\"home\">{{ __('shop.cart.continue') }}</button>\n </div>\n <div class=\"column is-6\">\n <div class=\"info-wrapper\" v-if=\"order.shipping[0]\">\n <div class=\"title\">{{ __('shop.order.shipping') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"order.shipping[0]\" v-html=\"order.shipping[0]\"></div>\n <div class=\"column is-6\" v-if=\"order.shipping[1]\" v-html=\"order.shipping[1]\"></div>\n </div>\n </div>\n <div class=\"info-wrapper\" v-if=\"order.payment[0]\">\n <div class=\"title\">{{ __('shop.order.payment') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"order.payment[0]\" v-html=\"order.payment[0]\"></div>\n <div class=\"column is-6\" v-if=\"order.payment[1]\" v-html=\"order.payment[1]\"></div>\n </div>\n </div>\n <div class=\"info-wrapper\" v-if=\"order.promoCode\">\n <div class=\"title\">{{ __('shop.order.promo_code') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\">\n <span v-html=\"order.promoCode\" class=\"green\"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </slot>\n </div>\n <div v-else-if=\"!redirectOnEmpty\" class=\"checkout-block empty\">\n <div class=\"title\">{{ __('shop.cart.no_no') }}</div>\n <div class=\"message\">\n {{ __('shop.cart.no_prop') }}\n <a :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.no_home') }}</a>, <br />{{\n __('shop.cart.no_search') }}\n </div>\n <a class=\"button continue\" :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.continue')\n }}</a>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, markRaw, defineComponent, watch, getCurrentInstance, nextTick, provide, useSlots, onMounted, resolveDynamicComponent, resolveComponent } from 'vue';\nimport CheckoutItem from './CheckoutItem.vue';\nimport { pluralize, numberFormat } from '@perevorot/shop/dist/helpers';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormRadio from '@perevorot/shop/dist/forms/FormRadio';\nimport * as yup from 'yup';\nimport { useToast } from 'vue-toastification';\nimport { auth as api } from '@perevorot/shop/dist/api';\nimport { formParse } from '@perevorot/shop/dist/helpers';\n\nyup.addMethod(yup.string, 'numberFilled', function (min, msg) {\n return this.test({\n name: 'numberFilled',\n exclusive: true,\n message: __('auth.validation.number'),\n params: {\n min: min,\n },\n test: (value) => !(value == '' || isNaN(value)),\n });\n});\n\nmarkRaw(FormText);\nmarkRaw(FormRadio);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nconst HtmlMessage = {\n props: {\n message: '',\n },\n template: '<div v-html=\"message\"></div>',\n};\n\nwindow.viewedSwiperOptions = {\n slidesPerView: 'auto',\n freeMode: true,\n slideClass: 'product',\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: '.next',\n prevEl: '.prev'\n },\n observer: true,\n observeParents: true\n};\n\nexport default /*#__PURE__*/ defineComponent({\n components: {\n CheckoutItem,\n SchemaForm\n },\n props: {\n isLogin: {\n type: Boolean,\n default: true\n },\n isPhoneMasked: {\n type: Boolean,\n default: true\n },\n isPromoCode: {\n type: Boolean,\n default: true\n },\n isConsent: {\n type: Boolean,\n default: false\n },\n isPaymentMethodOverSummary: {\n type: Boolean,\n default: false\n },\n userFields: {\n type: Array,\n default: ['last_name', 'name', 'email', 'phone'],\n },\n redirectOnEmpty: {\n type: String,\n default: false\n },\n showPlaceholders: {\n type: Boolean,\n default: false\n },\n isTrackAfterSuccessOnlinePurchase: {\n type: Boolean,\n default: false\n }\n },\n name: 'order-checkout',\n setup(props) {\n const slots = useSlots();\n const toast = useToast();\n const store = useStore();\n const loading = ref(false);\n const quantity = computed(() => store.getters['cart/quantity']);\n const items = computed(() => store.getters['cart/items']);\n const total = computed(() => store.getters['cart/total']);\n const auth = computed(() => store.getters['auth/is']);\n const userCheckout = computed(() => store.getters['checkout/user']);\n const loggedUser = computed(() => store.getters['auth/me']);\n const ifCheckoutReady = ref(true);\n const redirectForm = ref(null);\n const thanks = ref(false);\n const order = ref(null);\n const consent = ref(false);\n const shippingComponent = ref(null);\n\n const redirect = ref({});\n\n const shippingTypes = ref([]);\n const paymentMethods = ref([]);\n\n const userType = ref('new');\n const userSubmitButton = ref(null);\n\n const shippingComponentData = computed(() => store.getters['checkout/shippingData']);\n const isCommentToggled = ref(false);\n const commentMaxLength = 1000;\n\n const isPromoCodeToggled = ref(false);\n const promoCode = ref('');\n const promoCodeApplied = ref(null);\n const isPromoLoading = ref(false);\n const app = getCurrentInstance();\n\n const loyalty = computed(() => {\n const points = items.value.reduce((acc, array) => acc + (array.attributes.loyalty ? array.attributes.loyalty.points * array.quantity : 0), 0);\n\n return {\n points: points,\n name: pluralize(points, __('shop.pluralize.points'))\n };\n });\n\n const loyaltyUse = ref('');\n const isUseLoyaltyPoints = ref(false);\n\n watch(isUseLoyaltyPoints, (value) => {\n if (value) {\n loyaltyUse.value = total.value;\n } else {\n loyaltyUse.value = '';\n }\n });\n\n const loyaltyUseApplied = ref(false);\n\n const resetLoyaltyUse = () => {\n loyaltyUse.value = 0;\n loyaltyUseApplied.value = false;\n };\n\n const applyLoyaltyUse = () => {\n if (loyaltyUse.value) {\n loyaltyUseApplied.value = true;\n }\n };\n\n const readableTotalInPoints = computed(() => {\n return numberFormat(total.value);\n });\n\n const readableUserLoyaltyPoints = computed(() => {\n return numberFormat(loggedUser.value.loyalty_points - (loyaltyUseApplied.value ? loyaltyUse.value : 0));\n });\n\n const resetPromoCode = () => {\n promoCode.value = '';\n promoCodeApplied.value = null;\n };\n\n const isUserConsent = computed(() => {\n return (props.isConsent && consent.value) || !props.isConsent;\n });\n\n const applyPromoCode = () => {\n if (promoCode.value) {\n isPromoLoading.value = true;\n\n $http\n .post(window.location.href, {\n promoCodeApply: promoCode.value,\n email: user.value.email,\n total: total.value\n })\n .then(response => {\n promoCodeApplied.value = response.data;\n }).catch(error => {\n if (error.response && error.response.data.length) {\n error.response.data.forEach(error => {\n const component = {\n component: HtmlMessage,\n props: {\n message: __('shop.order.promo.error_' + error.error, { number: app.appContext.config.globalProperties.$filters.price(error.number) }),\n },\n };\n\n toast(component, {\n type: 'error'\n });\n\n if (error.error == 'not_found') {\n promoCode.value = '';\n }\n });\n\n promoCodeApplied.value = null;\n }\n }).finally(() => {\n isPromoLoading.value = false;\n });\n }\n };\n\n const dontcall = computed({\n get() {\n return store.getters['checkout/dontcall'];\n },\n set(value) {\n store.commit('checkout/dontcall', value);\n }\n });\n\n const comment = computed({\n get() {\n const comment = store.getters['checkout/comment'];\n\n if (!!comment) {\n isCommentToggled.value = true;\n }\n\n return comment;\n },\n set(value) {\n store.commit('checkout/comment', value);\n }\n });\n\n watch(comment, (value) => {\n if (value.length > commentMaxLength) {\n comment.value = comment.value.substring(0, commentMaxLength);\n }\n });\n\n const field = (name, defaultValue) => {\n return computed({\n get() {\n return userCheckout.value[name] ? userCheckout.value[name] : defaultValue;\n },\n set(value) {\n let data = JSON.parse(JSON.stringify(userCheckout.value));\n data[name] = value;\n\n store.commit('checkout/user', data);\n }\n });\n };\n\n provide('field', field);\n\n // const user = ref({\n // last_name: field('last_name'),\n // middle_name: field('middle_name'),\n // name: field('name'),\n // email: field('email'),\n // phone: field('phone'),\n // registration_number: field('registration_number'),\n // company_name: field('company_name'),\n // user_type: field('user_type', 'individual'),\n // });\n const user = ref({});\n\n if (!auth.value) {\n api.registerForm()\n .then((response) => {\n if (response.data) {\n const form = formParse(response.data);\n\n userSchema.value = form.schema;\n user.value = form.model;\n userValidation.value = form.validation;\n }\n })\n .finally(() => {\n\n });\n }\n\n provide('user', user);\n provide('formModel', user);\n provide('loggedUser', loggedUser);\n\n store.dispatch('auth/me', {\n finally: () => { }\n });\n\n const calculateWithPromoCodeDiscount = () => {\n const sum = total.value + fee.value + shippingPrice.value;\n\n if (promoCodeApplied.value && promoCodeApplied.value.type == 'percent') {\n return Math.round(sum - sum * promoCodeApplied.value.amount / 100);\n }\n\n if (promoCodeApplied.value && promoCodeApplied.value.type == 'discount') {\n return Math.max(0, sum - promoCodeApplied.value.amount);\n }\n\n return sum;\n };\n\n const shipping = computed({\n get() {\n return store.getters['checkout/shipping'];\n },\n set(id) {\n store.commit('checkout/shipping', id);\n }\n });\n\n const payment = computed({\n get() {\n return store.getters['checkout/payment'];\n },\n set(id) {\n store.commit('checkout/payment', id);\n }\n });\n\n const shippingSelected = computed(() => {\n return shipping.value ? shippingTypes.value.find((item) => item.id == shipping.value) : {};\n });\n\n const paymentSelected = computed(() => {\n return payment.value ? paymentMethods.value.find((item) => item.id == payment.value) : {};\n });\n\n const shippingPrice = computed(() => {\n return calculatePrice(shippingTypes.value, shipping.value);\n });\n\n const fee = computed(() => {\n return calculatePrice(paymentMethods.value, payment.value);\n });\n\n const shippingTypesRestricted = computed(() => {\n return restrictCheck(shippingTypes.value);\n });\n\n const paymentMethodsRestricted = computed(() => {\n return restrictCheck(paymentMethods.value);\n });\n\n const categoriesInCart = computed(() => {\n let categories = [];\n\n items.value.forEach((item) => {\n if (categories.indexOf(item.category_id) === -1) {\n categories.push(item.category_id);\n }\n });\n\n return categories;\n });\n\n const calculatePrice = (items, value) => {\n let price = 0;\n\n if (value) {\n const item = items.find((item) => item.id == value);\n\n if (item) {\n if (item.type == 'sum') {\n price = item.amount;\n } else {\n price = Math.round((total.value * item.amount) / 100);\n }\n }\n }\n\n return price;\n };\n\n const restrictCheck = (elements) => {\n let items = [];\n\n elements.forEach((item) => {\n if (item.restrictions && Object.keys(item.restrictions).length) {\n let ok = true;\n\n const r = item.restrictions;\n\n if (r.price_min && r.price_max) {\n ok = total.value >= r.price_min && total.value <= r.price_max;\n item.restrictedForce = !ok;\n } else if (r.price_min) {\n ok = total.value >= r.price_min;\n item.restrictedForce = !ok;\n } else if (r.price_max) {\n ok = total.value <= r.price_max;\n item.restrictedForce = !ok;\n }\n\n if (ok && shipping.value) {\n if (r.shipping_type && r.shipping_type.length) {\n ok = r.shipping_type.indexOf(shipping.value) !== -1;\n }\n }\n\n if (ok && payment.value) {\n if (r.payment_method && r.payment_method.length) {\n ok = r.payment_method.indexOf(payment.value) !== -1;\n }\n }\n\n if (ok && r.categories && r.categories.length) {\n ok = !categoriesInCart.value.filter((value) => !r.categories.includes(value)).length;\n item.restrictedForce = !ok;\n }\n\n if (ok && r.code === 'user_type') {\n ok = r.value === loggedUser.value.user_type || r.value === user.value.user_type;\n item.restrictedForce = !ok;\n }\n\n item.restricted = !ok;\n } else {\n item.restricted = false;\n }\n\n if (!item.restrictedForce) {\n items.push(item);\n }\n });\n\n return items;\n };\n\n const discount = computed(() => {\n let sum = 0;\n\n items.value.forEach((item) => {\n let s = 0;\n\n if (item.attributes.priceOld) {\n s = item.attributes.priceOld - item.attributes.price;\n }\n\n sum += s * item.quantity;\n });\n\n return sum;\n });\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const loginCallback = () => {\n userType.value = 'new';\n };\n\n $http.post(window.location.href).then((response) => {\n shippingTypes.value = response.data.shipping;\n paymentMethods.value = response.data.payment;\n });\n\n watch(userType, (value) => {\n if (value == 'login') {\n store.commit('auth/modal', 'login');\n }\n });\n\n // let userSchemaFields = {\n // user_type: {\n // component: FormRadio,\n // model: 'user_type',\n // label: '',\n // list: [\n // { code: 'individual', value: __('auth.registration.form.user_type_individual') },\n // { code: 'legal', value: __('auth.registration.form.user_type_legal') }\n // ],\n // },\n // name: {\n // component: FormText,\n // label: __('auth.registration.form.name'),\n // model: 'first_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.name') : '',\n // },\n // last_name: {\n // component: FormText,\n // label: __('auth.registration.form.last_name'),\n // model: 'last_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.last_name') : '',\n // },\n // middle_name: {\n // component: FormText,\n // label: __('auth.registration.form.middle_name'),\n // model: 'middle_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.middle_name') : '',\n // },\n // phone: {\n // component: FormText,\n // label: __('auth.registration.form.phone'),\n // model: 'phone',\n // type: 'phone',\n // //placeholder: '(050) 123-45-67'\n // },\n // registration_number: {\n // component: FormText,\n // label: __('auth.registration.form.registration_number'),\n // model: 'registration_number',\n // condition: (model) => model.user_type === 'legal',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.registration_number') : '',\n // },\n // company_name: {\n // component: FormText,\n // label: __('auth.registration.form.company_name'),\n // model: 'company_name',\n // condition: (model) => model.user_type === 'legal',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.company_name') : '',\n // },\n // email: {\n // component: FormText,\n // label: __('auth.login.form.email'),\n // model: 'email',\n // placeholder: props.showPlaceholders ? __('auth.login.form.email') : '',\n // },\n // };\n\n // if (props.isPhoneMasked) {\n // userSchemaFields.phone.mask = '(###) ###-##-##';\n // }\n\n // let userSchemaFieldsFiltered = Object.keys(userSchemaFields).reduce((obj, key) => {\n // if (props.userFields.includes(key)) {\n // obj[key] = userSchemaFields[key];\n // }\n\n // return obj;\n // }, {});\n\n // userSchemaFieldsFiltered = props.userFields.reduce((obj, key) => {\n // obj[key] = userSchemaFieldsFiltered[key];\n // return obj;\n // }, {});\n\n //const userSchema = ref(userSchemaFieldsFiltered);\n const userSchema = ref({});\n const userErrors = ref({});\n const userKey = ref(0);\n\n useSchemaForm(user);\n\n // const phoneRegExp = /^\\(\\d{3}\\) \\d{3}\\-\\d{2}\\-\\d{2}$/;\n // const userValidationFields = {\n // last_name: yup.string().trim().required(__('auth.validation.required')),\n // middle_name: yup.string().trim().required(__('auth.validation.required')),\n // name: yup.string().trim().required(__('auth.validation.required')),\n // phone: props.isPhoneMasked ? yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone')) : yup.string().required(__('auth.validation.phone')),\n // email: yup.string().trim().email(__('auth.validation.email')).required(__('auth.validation.required')),\n // registration_number: yup.string().when('user_type', (user_type) => {\n // if (user_type == 'legal') {\n // return yup.string().numberFilled();\n // }\n // }),\n // company_name: yup.string().when('user_type', (user_type) => {\n // if (user_type == 'legal') {\n // return yup.string().required(__('auth.validation.required'));\n // }\n // }),\n // };\n\n // const userValidationFieldsFiltered = Object.keys(userValidationFields).reduce((obj, key) => {\n // if (props.userFields.includes(key)) {\n // obj[key] = userValidationFields[key];\n // }\n\n // return obj;\n // }, {});\n\n //const userValidation = yup.object().shape(userValidationFieldsFiltered);\n const userValidation = ref({});\n\n const paymentValidations = ref({});\n\n provide('paymentValidations', paymentValidations);\n provide('paymentMethods', paymentMethods);\n\n window.addEventListener('beforeunload', () => {\n store.commit('auth/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit('auth/modal', null);\n });\n\n const validate = async () => {\n if (typeof shippingComponentValid.value == 'function') {\n const isShippingComponentFormsValid = await shippingComponentValid.value();\n\n if (userSubmitButton.value) {\n userSubmitButton.value.click();\n }\n\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (isUserValid) {\n ifCheckoutReady.value = isUserValid && payment.value && isUserConsent.value && shipping.value && (!shippingSelected.value.component || (shippingSelected.value.component && shippingComponentData.value[shippingSelected.value.code] && shippingComponentData.value[shippingSelected.value.code].isValid)) && isShippingComponentFormsValid;\n });\n } else {\n ifCheckoutReady.value = payment.value && isUserConsent.value && shipping.value && (!shippingSelected.value.component || (shippingSelected.value.component && shippingComponentData.value[shippingSelected.value.code] && shippingComponentData.value[shippingSelected.value.code].isValid)) && isShippingComponentFormsValid;\n }\n }\n };\n\n const shippingComponentValid = ref(null);\n provide('shippingComponentValid', shippingComponentValid);\n\n const shippingComponentUserData = ref({});\n provide('shippingComponentUserData', shippingComponentUserData);\n\n const initPaymentWidget = (payment, order) => {\n const wayforpay = new Wayforpay();\n\n window.addEventListener('message', (event) => {\n if (event.data == 'WfpWidgetEventClose' || event.data == 'WfpWidgetEventDeclined' || event.data == 'WfpWidgetEventPending') {\n\n }\n\n if (event.data == 'WfpWidgetEventApproved') {\n resetCheckoutForm(order);\n\n isPayed.value = true;\n\n store.dispatch('cart/clear', {\n finally: () => { }\n });\n }\n });\n\n wayforpay.run(payment);\n }\n\n const isPayed = ref(false);\n\n const resetCheckoutForm = (_order) => {\n thanks.value = true;\n order.value = _order;\n\n document.querySelector('html').classList.add('is-checkout-thanks');\n\n resertStore();\n }\n\n const checkout = async () => {\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (valid) {\n if (!valid) {\n userType.value = 'new';\n userSubmitButton.value.click();\n\n toast(__('shop.order.validate_user'), {\n type: 'error'\n });\n } else if (user.value.is_register) {\n store.dispatch('auth/register', {\n type: 'Full',\n credentials: user.value,\n finally: () => {\n },\n callback: (response) => {\n createOrder();\n },\n catch: (error) => {\n let incomingErrors = {};\n\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n incomingErrors[field] = messages[0];\n }\n }\n\n userKey.value++;\n }\n\n userErrors.value = incomingErrors;\n }\n });\n } else {\n createOrder();\n }\n });\n } else {\n createOrder();\n }\n };\n\n const createOrderWithoutValidate = (valid) => {\n let isShippingComponentFormsValid = typeof shippingComponentValid.value == 'function' ? shippingComponentValid.value() : null;\n\n let isPaymentValid = paymentValidations.value[paymentSelected.value.code] ? paymentValidations.value[paymentSelected.value.code]() : true;\n\n if (!isPaymentValid) {\n toast('Заповніть необхідні дані оплати', {\n type: 'error'\n });\n\n return;\n }\n\n if (shippingSelected.value && !shippingSelected.value.component) {\n isShippingComponentFormsValid = true;\n }\n\n if (total.value < $env.checkout.minimum_amount) {\n const component = {\n component: HtmlMessage,\n props: {\n message: __('shop.order.validate_minimum_amount', { amount: app.appContext.config.globalProperties.$filters.price($env.checkout.minimum_amount) }),\n },\n };\n\n toast(component, {\n type: 'error'\n });\n } else if (!valid) {\n userType.value = 'new';\n userSubmitButton.value.click();\n\n toast(__('shop.order.validate_user'), {\n type: 'error'\n });\n } else if (!shipping.value) {\n toast(__('shop.order.validate_shipping'), {\n type: 'error'\n });\n } else if (shippingSelected.value.component && (!shippingComponentData.value[shippingSelected.value.code] || !shippingComponentData.value[shippingSelected.value.code].isValid)) {\n toast(__('shop.order.validate_shipping1') + ': «' + shippingSelected.value.name + '»', {\n type: 'error'\n });\n } else if (!isShippingComponentFormsValid) {\n toast(__('shop.order.validate_shipping1') + ': «' + shippingSelected.value.name + '»', {\n type: 'error'\n });\n } else if (!payment.value) {\n toast(__('shop.order.validate_payment'), {\n type: 'error'\n });\n } else if (!isUserConsent.value) {\n toast(__('shop.order.validate_consent'), {\n type: 'error'\n });\n } else {\n let clientId;\n let data = shippingComponentData.value[shippingSelected.value.code] ? JSON.parse(JSON.stringify(shippingComponentData.value[shippingSelected.value.code])) : {};\n\n delete data.isValid;\n\n setTimeout(() => {\n const shippingUserData = JSON.parse(JSON.stringify(shippingComponentUserData.value));\n\n if (document.cookie) {\n const cookies = document.cookie.split(';');\n\n cookies.forEach((cookie) => {\n const parts = cookie.split('=');\n\n if (parts[0].trim() === '_ga') {\n clientId = parts[1].split('.')[2] + '.' + parts[1].split('.')[3];\n }\n });\n }\n\n const userValue = auth.value ? loggedUser.value : user.value;\n\n const model = {\n checkout: true,\n user: {\n last_name: userValue.last_name,\n middle_name: userValue.middle_name,\n name: userValue.name,\n phone: userValue.phone,\n email: userValue.email,\n user_type: userValue.user_type,\n registration_number: userValue.registration_number,\n password: userValue.is_register ? userValue.password : null,\n company_name: userValue.company_name,\n district: userValue.district,\n region: userValue.region,\n is_register: userValue.is_register,\n },\n shipping: {\n id: shipping.value,\n data: data,\n user: shippingUserData,\n },\n payment: {\n id: payment.value\n },\n comment: comment.value,\n dontcall: dontcall.value,\n promoCode: promoCode.value,\n loyalty: loyaltyUse.value,\n clientId: clientId\n };\n\n loading.value = true;\n\n $http\n .post(window.location.href, model)\n .then((response) => {\n if (response.data && response.data.error && response.data.message) {\n toast(response.data.message, {\n type: 'error',\n });\n\n return;\n }\n\n let products = [];\n\n items.value.forEach((item) => {\n let product = {\n item_name: item.name,\n item_id: item.attributes.code,\n price: item.price,\n quantity: item.quantity\n };\n\n if (item.attributes.brand) {\n product.item_brand = item.attributes.brand;\n }\n\n if (item.attributes.property) {\n product.item_variant = item.attributes.property;\n }\n\n if (item.attributes.categoryFull) {\n if (item.attributes.categoryFull.indexOf('/') !== -1) {\n item.attributes.categoryFull.split('/').forEach((segment, index) => {\n product['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n product.item_category = item.attributes.categoryFull;\n }\n }\n\n if (item.attributes.index) {\n product.index = item.attributes.index;\n }\n\n if (item.attributes.itemListName) {\n product.item_list_name = item.attributes.itemListName;\n }\n\n products.push(product);\n });\n\n\n let object = {\n payment_type: paymentSelected.value.name,\n shipping_tier: shippingSelected.value.name,\n ecommerce: {\n transaction_id: response.data.order.id,\n affiliation: 'main',\n value: parseFloat(total.value),\n shipping: 0,\n currency: 'UAH',\n items: products\n },\n event: 'purchase',\n };\n\n if (user.value.user_type) {\n object.user_type = __('auth.registration.form.user_type_' + user.value.user_type);\n }\n\n if (promoCode.value) {\n object.ecommerce.coupon = promoCode.value;\n }\n\n if (props.isTrackAfterSuccessOnlinePurchase && (response.data.redirect || (response.data.payment_widget_data && window.Wayforpay))) {\n localStorage.setItem('ecommerce', JSON.stringify(object));\n } else {\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n\n if (response.data.redirect) {\n redirect.value = {\n url: response.data.redirect.url,\n data: response.data.redirect.data\n };\n\n nextTick(() => {\n setTimeout(() => {\n redirectForm.value.submit();\n }, 400);\n });\n }\n\n if (response.data.payment_widget_data && window.Wayforpay) {\n initPaymentWidget(JSON.parse(response.data.payment_widget_data), response.data.order);\n } else {\n resetCheckoutForm(response.data.order);\n }\n })\n .catch((e) => {\n toast(__('shop.order.error'), {\n type: 'error'\n });\n\n console.error(e);\n })\n .finally(() => {\n loading.value = false;\n });\n }, 100);\n }\n }\n\n const createOrder = () => {\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (valid) {\n createOrderWithoutValidate(valid);\n });\n } else {\n createOrderWithoutValidate(true);\n }\n }\n\n const toggleShippingRadio = (id) => {\n if (shipping.value === id) {\n shipping.value = null;\n }\n };\n\n const togglePaymentRadio = (id) => {\n if (payment.value === id) {\n payment.value = null;\n }\n };\n\n const resertStore = () => {\n // debug\n store.commit('checkout/reset');\n store.commit('cart/clear');\n };\n\n const shippingStoreData = (code, data, isValid) => {\n let d = JSON.parse(JSON.stringify(shippingComponentData.value));\n\n data.isValid = isValid;\n d[code] = data;\n\n store.commit('checkout/shippingData', d);\n };\n\n const home = () => {\n window.location.href = $env.locale.url ? $env.locale.url : '/';\n };\n\n onMounted(() => {\n if (!quantity.value && props.redirectOnEmpty) {\n window.location.href = props.redirectOnEmpty;\n }\n\n let products = [];\n\n items.value.forEach((item) => {\n let product = {\n item_name: item.name,\n item_id: item.attributes.code,\n price: parseFloat(item.attributes.price),\n quantity: item.quantity\n };\n\n if (item.attributes.brand) {\n product.item_brand = item.attributes.brand;\n }\n\n if (item.attributes.property) {\n product.item_variant = item.attributes.property;\n }\n\n if (item.attributes.categoryFull) {\n if (item.attributes.categoryFull.indexOf('/') !== -1) {\n item.attributes.categoryFull.split('/').forEach((segment, index) => {\n product['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n product.item_category = item.attributes.categoryFull;\n }\n }\n\n if (item.attributes.index) {\n product.index = item.attributes.index;\n }\n\n if (item.attributes.itemListName) {\n product.item_list_name = item.attributes.itemListName;\n }\n\n products.push(product);\n });\n\n if (products.length) {\n const object = {\n ecommerce: {\n currency: 'UAH',\n items: products,\n value: parseFloat(total.value),\n },\n event: 'begin_checkout'\n };\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n\n const phoneFormatted = (phone) => {\n return phone.replace(/(\\d{3})(\\d{3})(\\d{2})(\\d{2})/, '($1) $2-$3-$4');\n }\n\n const isComponentExists = (name) => {\n return typeof resolveDynamicComponent(name) !== 'string';\n }\n\n return {\n auth,\n userType,\n facebook,\n google,\n loginCallback,\n quantity,\n items,\n loading,\n pluralize,\n discount,\n total,\n shipping,\n shippingPrice,\n payment,\n fee,\n userValidation,\n userSchema,\n userSubmitButton,\n checkout,\n ifCheckoutReady,\n validate,\n shippingTypesRestricted,\n paymentMethodsRestricted,\n toggleShippingRadio,\n togglePaymentRadio,\n shippingSelected,\n paymentSelected,\n shippingComponentData,\n shippingStoreData,\n resertStore,\n user,\n dontcall,\n comment,\n isCommentToggled,\n commentMaxLength,\n userCheckout,\n thanks,\n order,\n redirect,\n redirectForm,\n home,\n isPromoCodeToggled,\n applyPromoCode,\n promoCode,\n isPromoLoading,\n promoCodeApplied,\n resetPromoCode,\n calculateWithPromoCodeDiscount,\n consent,\n shippingComponent,\n slots,\n isPayed,\n loyalty,\n loyaltyUse,\n loyaltyUseApplied,\n resetLoyaltyUse,\n applyLoyaltyUse,\n readableUserLoyaltyPoints,\n userErrors,\n userKey,\n loggedUser,\n phoneFormatted,\n readableTotalInPoints,\n isUseLoyaltyPoints,\n isComponentExists,\n };\n }\n});\n</script>"],"names":["script$1","defineComponent","name","props","item","Object","setup","options","computed","attributes","length","itemOptions","filter","option","value","indexOf","id","class","_hoisted_2","_hoisted_3","_hoisted_4","_createElementVNode","createElementVNode","xlink:href","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_14","_hoisted_16","_hoisted_17","_hoisted_20","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_32","_hoisted_39","_hoisted_41","_hoisted_44","_hoisted_51","_hoisted_53","then","direct","resolve","_empty","f","i","arguments","apply","this","args","Promise","reject","e","_createElementBlock","createElementBlock","is-bundle","_ctx","bundle","_openBlock","_hoisted_1","_toDisplayString","__","mb-0","href","no-thumb","image","src","_hoisted_7","_hoisted_9","code","_hoisted_13","quantity","parseInt","openBlock","_hoisted_18","innerHTML","price","_createTextVNode","createTextVNode","bundle-price","priceOld","$filters","amount","percent","sum","_hoisted_24","_Fragment","Fragment","_renderList","index","key","_hoisted_31","_hoisted_33","second","_normalizeClass","_hoisted_36","_hoisted_38","_hoisted_40","toDisplayString","_hoisted_42","third","_hoisted_43","_hoisted_45","_hoisted_48","_hoisted_50","_hoisted_52","_hoisted_54","yup","addMethod","string","min","msg","test","exclusive","message","params","isNaN","markRaw","FormText","FormRadio","SchemaForm","SchemaFormFactory","VeeValidatePlugin","HtmlMessage","template","window","viewedSwiperOptions","slidesPerView","freeMode","slideClass","mousewheel","forceToAxis","navigation","nextEl","prevEl","observer","observeParents","script","components","CheckoutItem","isLogin","type","Boolean","default","isPhoneMasked","isPromoCode","isConsent","isPaymentMethodOverSummary","userFields","Array","redirectOnEmpty","String","showPlaceholders","isTrackAfterSuccessOnlinePurchase","slots","useSlots","toast","useToast","store","useStore","loading","ref","getters","items","total","auth","userCheckout","loggedUser","ifCheckoutReady","redirectForm","thanks","order","consent","shippingComponent","redirect","shippingTypes","paymentMethods","userType","userSubmitButton","shippingComponentData","isCommentToggled","isPromoCodeToggled","promoCode","promoCodeApplied","isPromoLoading","app","getCurrentInstance","loyalty","points","reduce","acc","array","pluralize","loyaltyUse","isUseLoyaltyPoints","watch","loyaltyUseApplied","readableTotalInPoints","numberFormat","readableUserLoyaltyPoints","loyalty_points","isUserConsent","dontcall","get","set","commit","comment","substring","provide","defaultValue","data","JSON","parse","stringify","user","api","registerForm","response","form","formParse","userSchema","schema","model","userValidation","validation","dispatch","finally","shipping","payment","shippingSelected","find","paymentSelected","shippingPrice","calculatePrice","fee","shippingTypesRestricted","restrictCheck","paymentMethodsRestricted","categoriesInCart","categories","forEach","category_id","push","Math","round","elements","restrictions","keys","ok","r","price_min","price_max","restrictedForce","shipping_type","payment_method","includes","user_type","restricted","discount","s","$http","post","location","userErrors","userKey","useSchemaForm","paymentValidations","addEventListener","validate","_async","body","result","_invokeIgnored","shippingComponentValid","_await","isShippingComponentFormsValid","click","component","isValid","isUserValid","shippingComponentUserData","isPayed","resetCheckoutForm","_order","document","querySelector","classList","add","resertStore","checkout","createOrder","valid","is_register","credentials","callback","catch","error","incomingErrors","errors","_i","_Object$entries","entries","_Object$entries$_i","_slicedToArray","field","messages","createOrderWithoutValidate","$env","minimum_amount","appContext","config","globalProperties","clientId","setTimeout","shippingUserData","cookie","split","parts","trim","userValue","last_name","middle_name","phone","email","registration_number","password","company_name","district","region","products","product","item_name","item_id","brand","item_brand","property","item_variant","categoryFull","segment","item_category","itemListName","item_list_name","object","payment_type","shipping_tier","ecommerce","transaction_id","affiliation","parseFloat","currency","event","coupon","payment_widget_data","Wayforpay","localStorage","setItem","debug","console","log","dataLayer","url","nextTick","submit","wayforpay","run","initPaymentWidget","onMounted","facebook","$ziggy","provider","google","loginCallback","toggleShippingRadio","togglePaymentRadio","shippingStoreData","d","commentMaxLength","home","locale","applyPromoCode","promoCodeApply","number","resetPromoCode","calculateWithPromoCodeDiscount","max","resetLoyaltyUse","applyLoyaltyUse","phoneFormatted","replace","isComponentExists","resolveDynamicComponent","_hoisted_5","_hoisted_6","_hoisted_8","_hoisted_30","_hoisted_47","_hoisted_49","_hoisted_57","_hoisted_61","_hoisted_62","_hoisted_63","_hoisted_64","_hoisted_65","_hoisted_66","_hoisted_68","_hoisted_71","_hoisted_72","_hoisted_74","_hoisted_75","_hoisted_76","_hoisted_77","_hoisted_78","_hoisted_80","_hoisted_84","_hoisted_85","_hoisted_86","_hoisted_87","_hoisted_88","_hoisted_90","_hoisted_93","_hoisted_94","_hoisted_97","_hoisted_98","_hoisted_102","_hoisted_104","_hoisted_105","_hoisted_107","_hoisted_108","_hoisted_109","_hoisted_111","_hoisted_113","_hoisted_114","_hoisted_116","viewBox","fill","xmlns","_hoisted_118","_hoisted_121","_hoisted_124","_hoisted_125","for","_hoisted_130","_hoisted_133","_hoisted_134","_hoisted_136","_hoisted_138","_hoisted_140","_hoisted_141","_hoisted_145","_hoisted_146","_hoisted_150","_hoisted_151","_hoisted_152","_hoisted_155","_hoisted_156","action","style","position","left","top","method","renderList","_renderSlot","$slots","_createCommentVNode","createCommentVNode","textContent","_createBlock","createBlock","_component_checkout_item","_createVNode","createVNode","_component_cart_trigger","_withCtx","onClick","open","_hoisted_15","renderSlot","_hoisted_19","$event","_hoisted_21","_hoisted_22","_hoisted_23","region_name","district_name","_component_SchemaForm","schemaRowClasses","validation-schema","initial-errors","preventModelCleanupOnSchemaChange","afterForm","_component_login","login-callback","nextDates","_hoisted_46","is-disabled","icon","_hoisted_55","description","_hoisted_56","price_label","_hoisted_58","_hoisted_60","normalizeClass","_hoisted_70","_hoisted_73","_hoisted_82","_resolveDynamicComponent","_hoisted_83","_hoisted_92","_hoisted_96","_hoisted_100","_hoisted_101","_hoisted_103","inactive","_hoisted_112","_hoisted_115","_hoisted_117","disabled","red","_hoisted_120","_cache","_hoisted_123","placeholder","_hoisted_127","is-loading","_hoisted_128","is-open","_hoisted_129","_hoisted_131","_hoisted_132","filters","_hoisted_135","_hoisted_137","_hoisted_139","_hoisted_144","_hoisted_149","_hoisted_154","_hoisted_157","_hoisted_158","_hoisted_159"],"mappings":"suDA0FA,IAAeA,EAAcC,kBAAgB,CACzCC,KAAM,eACNC,MAAO,CACHC,KAAMC,QAEVC,MAAK,SAACH,GACF,IAAMI,EAAUC,EAAAA,UAAS,WAAA,OAAOL,EAAMC,KAAKK,WAAWF,SAAWJ,EAAMC,KAAKK,WAAW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GAAA,0BAAA,GACxB1C,qBAIK,MAJLgb,GAIK,CAHDhb,EAAAA,mBAEK,MAFLib,GAEK,CADDjb,EAAmDC,mBAAA,OAAA,CAA7CuD,UAAQnB,EAAKmH,MAACW,UAAWvK,MAAM,sEAQhDyC,EAAe8F,iDAAhC5F,EAAAA,YAAAL,qBASK,MATLoe,GASK,CARDtgB,EAAmDC,mBAAA,MAAnDib,GAAmDzY,EAAAsC,gBAA7B1C,EAAEK,GAAA,oBAAA,GACxB1C,EAAAC,mBAIK,MAJLkb,GAIK,CAHEzX,EAAAA,gBAAAjB,EAAAsC,gBAAA1C,EAAAK,yBAAyB,IAC5B,GAAA1C,EAAoFC,mBAAA,IAAA,CAAhF2C,KAAMP,EAAI2P,KAACuE,OAAOlB,IAAMhT,EAAI2P,KAACuE,OAAOlB,2BAAchT,EAAEK,GAAA,sBAAA,EAAA6d,sBAA4B,MAAEC,uCAClFne,EAAEK,GAAA,wBAAA,KAEV1C,EACSC,mBAAA,IAAA,CADNL,MAAM,kBAAmBgD,KAAMP,EAAI2P,KAACuE,OAAOlB,IAAMhT,EAAI2P,KAACuE,OAAOlB,2BAAchT,EAAEK,GAAA,uBAAA,EAAA+d"}
|
|
1
|
+
{"version":3,"file":"Checkout.js","sources":["../../../../src/components/shop/order/CheckoutItem.vue","../../../../src/components/shop/order/CheckoutItem.vue?vue&type=template&id=4d5a1fac&lang.js","../../../../src/components/shop/order/Checkout.vue","../../../../src/components/shop/order/Checkout.vue?vue&type=template&id=80bee058&lang.js"],"sourcesContent":["<template>\n <div class=\"columns is-multiline shop-cart-item\" v-bind:class=\"{ 'is-bundle': item.attributes.bundle }\">\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow\">\n <a :href=\"item.attributes.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.href\">{{ item.name }}</a>\n </div>\n </div>\n <div class=\"column is-2 has-text-centered is-relative\">\n <div class=\"quantity\">⨉ {{ item.quantity }}</div>\n <div class=\"quantity-price\" v-if=\"parseInt(item.quantity) > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\"></div>\n </div>\n </div>\n </div>\n <div class=\"options is-toggled\" v-if=\"itemOptions && itemOptions.length\">\n <div class=\"toggler\">\n <span>{{ __('shop.cart.additional') }} {{ itemOptions.length }}</span>\n </div>\n <div class=\"wrapper\">\n <div v-for=\"(option, index) in itemOptions\" v-bind:key=\"index\" class=\"columns is-checked\">\n <div class=\"column\">\n <div class=\"option-title\">{{ option.name }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\"><use xlink:href=\"#bundle-plus\" /></svg>\n <a :href=\"item.attributes.second.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.second.href\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\"><use xlink:href=\"#bundle-plus\" /></svg>\n <a :href=\"item.attributes.third.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.third.href\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { defineComponent, computed } from 'vue';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'CheckoutItem',\n props: {\n item: Object\n },\n setup(props) {\n const options = computed(() => (props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []));\n const itemOptions = computed(() => (props.item.options && props.item.options.length ? props.item.options.filter((option) => options.value.indexOf(option.id) !== -1) : []));\n\n return {\n itemOptions\n };\n }\n});\n</script>","<template>\n <div class=\"columns is-multiline shop-cart-item\" v-bind:class=\"{ 'is-bundle': item.attributes.bundle }\">\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow\">\n <a :href=\"item.attributes.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.href\">{{ item.name }}</a>\n </div>\n </div>\n <div class=\"column is-2 has-text-centered is-relative\">\n <div class=\"quantity\">⨉ {{ item.quantity }}</div>\n <div class=\"quantity-price\" v-if=\"parseInt(item.quantity) > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\"></div>\n </div>\n </div>\n </div>\n <div class=\"options is-toggled\" v-if=\"itemOptions && itemOptions.length\">\n <div class=\"toggler\">\n <span>{{ __('shop.cart.additional') }} {{ itemOptions.length }}</span>\n </div>\n <div class=\"wrapper\">\n <div v-for=\"(option, index) in itemOptions\" v-bind:key=\"index\" class=\"columns is-checked\">\n <div class=\"column\">\n <div class=\"option-title\">{{ option.name }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\"><use xlink:href=\"#bundle-plus\" /></svg>\n <a :href=\"item.attributes.second.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.second.href\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\"><use xlink:href=\"#bundle-plus\" /></svg>\n <a :href=\"item.attributes.third.href\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else><use xlink:href=\"#logo\" /></svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a :href=\"item.attributes.third.href\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { defineComponent, computed } from 'vue';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'CheckoutItem',\n props: {\n item: Object\n },\n setup(props) {\n const options = computed(() => (props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []));\n const itemOptions = computed(() => (props.item.options && props.item.options.length ? props.item.options.filter((option) => options.value.indexOf(option.id) !== -1) : []));\n\n return {\n itemOptions\n };\n }\n});\n</script>","<template>\n <div class=\"cart checkout\">\n <form ref=\"redirectForm\" v-if=\"redirect.url\" :action=\"redirect.url\"\n style=\"position: absolute; left: -1000px; top:-1000px;\" method=\"post\">\n <input type=\"hidden\" :name=\"name\" :value=\"value\" v-for=\"(value, name, index) in redirect.data\"\n v-bind:key=\"index\" />\n </form>\n\n <div class=\"items-wrapper\" v-if=\"items.length && !thanks\">\n <div class=\"checkout-title\">{{ __('shop.order.checkout_title') }}</div>\n <div class=\"columns\">\n <div class=\"column checkout-blocks-wrapper\">\n <slot name=\"header\"></slot>\n <div class=\"checkout-block is-cart\"><!--items-->\n <div class=\"wrapper\">\n <div class=\"title-row\">\n <div class=\"items-title\">\n {{ __('shop.order.your_order') }}\n <span class=\"ml-3\"\n v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> <span\n v-html=\"__('shop.cart.bysum') + ' ' + $filters.price(total)\"></span>\n </div>\n </div>\n <slot name=\"cart\" :items=\"items\">\n <checkout-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\"></checkout-item>\n <cart-trigger class=\"trigger\">\n <template #default=\"props\">\n <button class=\"button\" @click=\"props.open\">\n <svg>\n <use xlink:href=\"#cart-edit\" />\n </svg>\n <span>{{ __('shop.order.edit') }}</span>\n </button>\n </template>\n </cart-trigger>\n </slot>\n <slot name=\"cart-footer\" :total=\"total\"></slot>\n </div>\n </div>\n <div class=\"checkout-block is-user auth-user\">\n <div class=\"wrapper\">\n <div class=\"items-title\">{{ __('shop.order.contact_title') }}</div>\n <div class=\"user-tabs\" v-if=\"!auth && isLogin\">\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"new\" />{{\n __('shop.order.auth_new')\n }}</label>\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"login\" />{{\n __('shop.order.auth_old')\n }}</label>\n </div>\n <div class=\"columns\">\n <div class=\"logged-user\" v-if=\"auth\">\n <p><strong>{{ loggedUser.last_name }} {{ loggedUser.name }} {{\n loggedUser.middle_name }}</strong></p>\n <p>{{ phoneFormatted(loggedUser.phone) }}, {{ loggedUser.email }}</p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.company_name\"><strong>{{\n loggedUser.company_name\n }}</strong></p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.registration_number\">ЄДРПОУ\n {{\n loggedUser.registration_number }}</p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.region\">{{\n loggedUser.region_name }} {{\n loggedUser.district_name ? ', ' + loggedUser.district_name : '' }}</p>\n </div>\n <div class=\"column user-form\" v-if=\"userType == 'new'\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"userSchema\"\n :validation-schema=\"userValidation\" :initial-errors=\"userErrors\" :key=\"userKey\"\n :preventModelCleanupOnSchemaChange=\"true\">\n <template #afterForm>\n <button type=\"submit\" ref=\"userSubmitButton\" class=\"is-hidden\"></button>\n </template>\n </SchemaForm>\n </div>\n <div class=\"column user-login user-form\" v-if=\"userType == 'login' && isLogin\">\n <login :login-callback=\"loginCallback\"></login>\n </div>\n <div class=\"column\" v-if=\"isLogin\">\n <div class=\"social-auth\" v-if=\"!auth\">\n <div class=\"socials\">\n <div class=\"description\">{{ __('shop.order.auth_social') }}</div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\">\n <svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"checkout-block is-shipping\">\n <div class=\"wrapper shipping-type-block\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.shipping') }}</div>\n </div>\n <div class=\"value\" v-if=\"shippingSelected && shippingSelected.nextDates\">\n <div class=\"next-dates\">на {{ shippingSelected.nextDates }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"shipping = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': shipping }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in shippingTypesRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"shipping\" :value=\"item.id\"\n @click=\"toggleShippingRadio(item.id)\" />\n <img class=\"icon\" :src=\"item.icon\" v-if=\"item.icon\" />\n <svg v-else class=\"icon\">\n <use xlink:href=\"#shipping\" />\n </svg>\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <div class=\"value\">\n <span class=\"green\" v-if=\"!item.amount && item.price_label\">{{\n item.price_label }}</span>\n <span v-else\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div>\n </div>\n <!-- <div v-if=\"!slots.shippingFooter\">\n <component :is=\"item.component\" v-if=\"item.component && item.id == shipping\" :commit=\"shippingStoreData\" :data=\"shippingComponentData\" :item=\"item\" :take-user-data=\"true\"></component>\n </div> -->\n </div>\n </div>\n <slot name=\"shipping-footer\" :shippingTypesRestricted=\"shippingTypesRestricted\"\n :shipping=\"shipping\" :shippingStoreData=\"shippingStoreData\"\n :shippingComponentData=\"shippingComponentData\"></slot>\n </div>\n </div>\n <div class=\"checkout-block is-payment\" v-if=\"!isPaymentMethodOverSummary\">\n <div class=\"wrapper payment-method-block\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.payment') }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"payment = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': payment }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row no-icon\" v-bind:class=\"'is-' + item.code\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"payment\" :value=\"item.id\"\n @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <!-- <div class=\"value\" v-if=\"item.amount\">\n <span\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div> -->\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-4\">\n <div class=\"checkout-block summary\">\n <div class=\"inner payment-method-block\" v-if=\"isPaymentMethodOverSummary\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.payment') }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"payment = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': payment }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row no-icon\" v-bind:class=\"'is-' + item.code\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"payment\" :value=\"item.id\"\n @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <!-- <div class=\"value\" v-if=\"item.amount\">\n <span\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div> -->\n </div>\n <component :is=\"'checkout-payment-' + item.code\"\n v-if=\"payment == item.id && isComponentExists('checkout-payment-' + item.code)\">\n </component>\n </div>\n </div>\n </div>\n <div class=\"divider\"></div>\n <div class=\"inner\">\n <div class=\"items-title\">{{ __('shop.order.total') }}</div>\n <div class=\"rows\">\n <div class=\"row products\">\n <div class=\"info\"><span\n v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> {{\n __('shop.cart.bysum') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n <div class=\"row discount\" v-if=\"discount\">\n <div class=\"info\">{{ __('shop.order.discount') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(discount)\"></span>\n </div>\n </div>\n <!-- <div class=\"row fee\" v-if=\"fee > 0\">\n <div class=\"info\">{{ __('shop.order.fee') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(fee)\"></span>\n </div>\n </div> -->\n <div class=\"row shipping\" v-if=\"shipping\">\n <div class=\"info\">{{ __('shop.order.shipping_price') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(shippingPrice)\" v-if=\"shippingPrice > 0\"></span>\n <span class=\"green\"\n v-else-if=\"shippingSelected && shippingSelected.price_label\">{{\n shippingSelected.price_label }}</span>\n </div>\n </div>\n <div class=\"row promo\" v-if=\"promoCodeApplied\">\n <div class=\"info\">{{ __('shop.order.promo_code') }}<br><span class=\"green\">{{\n promoCode }}</span>\n </div>\n <div class=\"value\">\n <span\n v-html=\"(promoCodeApplied.type == 'percent' ? promoCodeApplied.amount + '%' : $filters.price(promoCodeApplied.amount))\"></span>\n </div>\n </div>\n <div class=\"row price\">\n <div class=\"info\">{{ __('shop.order.price') }}</div>\n <div class=\"value orange\">\n <span v-html=\"$filters.price(calculateWithPromoCodeDiscount())\"></span>\n </div>\n </div>\n </div>\n <div class=\"checkbox-wrapper nocall\">\n <label> <input type=\"checkbox\" class=\"checkbox\" v-model=\"dontcall\" />{{\n __('shop.order.nocall')\n }}</label>\n </div>\n <slot name=\"loyalty\" :loyalty=\"loyalty\" :inactive=\"isUseLoyaltyPoints\"></slot>\n <div class=\"user-loyalty consent\"\n v-if=\"loggedUser && loggedUser.loyalty_points > 0 && total <= loggedUser.loyalty_points\">\n <div class=\"checkbox-wrapper\">\n <label>\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"isUseLoyaltyPoints\">\n <div class=\"label\">Сплатити замовлення за <span>{{\n pluralize(readableTotalInPoints,\n __('shop.pluralize.points')) }}</span></div>\n </label>\n </div>\n <!-- <div class=\"notice\">{{ pluralize(readableUserLoyaltyPoints, __('shop.pluralize.points')) }} в наявності</div>\n <div class=\"user-form is-loyalty-use\">\n <div class=\"control\">\n <input type=\"number\" class=\"input\" placeholder=\"Сума бонусів\" v-model=\"loyaltyUse\" :disabled=\"loyaltyUseApplied\">\n </div>\n <button v-if=\"!loyaltyUseApplied\" class=\"button\" @click=\"applyLoyaltyUse\" :disabled=\"!loyaltyUse || loyaltyUse > loggedUser.loyalty_points\">Використати</button>\n <button v-else class=\"button is-reset\" @click=\"resetLoyaltyUse\">Відмінити</button>\n </div> -->\n </div>\n <div class=\"minimum-amount-message\" v-if=\"total < $env.checkout.minimum_amount\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <svg viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M9.50007 18C5.35778 18 2 14.6423 2 10.5C2 6.35775 5.35778 3 9.50007 3C13.6424 3 17.0001 6.35775 17.0001 10.5C17.0001 14.6423 13.6424 18 9.50007 18ZM8.75006 12.75V14.25H10.2501V12.75H8.75006ZM8.75006 6.75V11.25H10.2501V6.75H8.75006Z\"\n fill=\"#7C7C7C\" />\n </svg>\n </div>\n <div class=\"column\">\n <div class=\"message\"\n v-html=\"__('shop.order.minimum_amount', { amount: $filters.price($env.checkout.minimum_amount) })\">\n </div>\n </div>\n </div>\n </div>\n <button class=\"button submit\" @click=\"checkout\"\n v-bind:class=\"{ disabled: total < $env.checkout.minimum_amount, red: !ifCheckoutReady, 'is-loading': loading }\">{{\n __('shop.order.action') }}</button>\n <slot name=\"submit\" :total=\"total\"></slot>\n <div class=\"consent\" v-if=\"isConsent\">\n <div class=\"checkbox-wrapper\">\n <label>\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"consent\" />\n <div class=\"label\" v-html=\"__('shop.order.consent')\"></div>\n </label>\n </div>\n </div>\n <div class=\"comment-wrapper is-promo-code\" v-bind:class=\"{ 'is-open': isPromoCodeToggled }\"\n v-if=\"isPromoCode\">\n <div class=\"toggler\" @click=\"isPromoCodeToggled = !isPromoCodeToggled\">\n <span>{{ __('shop.order.promo_code') }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"user-form is-promo-code\">\n <div class=\"control\">\n <input type=\"text\" class=\"input\" placeholder=\" \" v-model=\"promoCode\"\n :disabled=\"promoCodeApplied\" id=\"promo-code-applied\">\n <label class=\"label\" for=\"promo-code-applied\">{{\n __('shop.order.promo.placeholder') }}</label>\n </div>\n <button v-if=\"!promoCodeApplied\" class=\"button\" @click=\"applyPromoCode\"\n :disabled=\"!promoCode\" v-bind:class=\"{ 'is-loading': isPromoLoading }\">{{\n __('shop.order.promo.apply') }}</button>\n <button v-else class=\"button\" @click=\"resetPromoCode\">{{\n __('shop.order.promo.reset') }}</button>\n </div>\n </div>\n <div class=\"comment-wrapper\" v-bind:class=\"{ 'is-open': isCommentToggled }\">\n <div class=\"toggler\" @click=\"isCommentToggled = !isCommentToggled\">\n <span>{{ __('shop.order.comment') }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"user-form\">\n <textarea class=\"textarea\" v-model=\"comment\"></textarea>\n <div class=\"chars-count\" v-if=\"comment.length\">{{ commentMaxLength - comment.length\n }}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"checkout-block thanks\" v-else-if=\"thanks && order\">\n <slot name=\"thanks\" :order=\"order\" :redirect=\"redirect\" :redirectForm=\"redirectForm\" :home=\"home\"\n :auth=\"auth\" :filters=\"$filters\" :user=\"user\">\n <div class=\"title\">\n {{ __('shop.order.order') }}\n <span>№{{ order.id }}</span> {{ isPayed ? __('shop.order.payed') : __('shop.order.success') }}\n </div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"redirect.url\">\n <div class=\"subtitle\">{{ __('shop.order.pay_online') }}</div>\n <button class=\"button is-payment\" @click=\"redirectForm.submit()\">{{\n __('shop.order.pay_online_go')\n }}</button>\n </div>\n <div class=\"column is-6\" v-else>\n <button class=\"button is-orange\" @click=\"home\">{{ __('shop.cart.continue') }}</button>\n </div>\n <div class=\"column is-6\">\n <div class=\"info-wrapper\" v-if=\"order.shipping[0]\">\n <div class=\"title\">{{ __('shop.order.shipping') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"order.shipping[0]\" v-html=\"order.shipping[0]\"></div>\n <div class=\"column is-6\" v-if=\"order.shipping[1]\" v-html=\"order.shipping[1]\"></div>\n </div>\n </div>\n <div class=\"info-wrapper\" v-if=\"order.payment[0]\">\n <div class=\"title\">{{ __('shop.order.payment') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"order.payment[0]\" v-html=\"order.payment[0]\"></div>\n <div class=\"column is-6\" v-if=\"order.payment[1]\" v-html=\"order.payment[1]\"></div>\n </div>\n </div>\n <div class=\"info-wrapper\" v-if=\"order.promoCode\">\n <div class=\"title\">{{ __('shop.order.promo_code') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\">\n <span v-html=\"order.promoCode\" class=\"green\"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </slot>\n </div>\n <div v-else-if=\"!redirectOnEmpty\" class=\"checkout-block empty\">\n <div class=\"title\">{{ __('shop.cart.no_no') }}</div>\n <div class=\"message\">\n {{ __('shop.cart.no_prop') }}\n <a :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.no_home') }}</a>, <br />{{\n __('shop.cart.no_search') }}\n </div>\n <a class=\"button continue\" :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.continue')\n }}</a>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, markRaw, defineComponent, watch, getCurrentInstance, nextTick, provide, useSlots, onMounted, resolveDynamicComponent, resolveComponent } from 'vue';\nimport CheckoutItem from './CheckoutItem.vue';\nimport { pluralize, numberFormat } from '@perevorot/shop/dist/helpers';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormRadio from '@perevorot/shop/dist/forms/FormRadio';\nimport * as yup from 'yup';\nimport { useToast } from 'vue-toastification';\nimport { auth as api } from '@perevorot/shop/dist/api';\nimport { formParse } from '@perevorot/shop/dist/helpers';\n\nyup.addMethod(yup.string, 'numberFilled', function (min, msg) {\n return this.test({\n name: 'numberFilled',\n exclusive: true,\n message: __('auth.validation.number'),\n params: {\n min: min,\n },\n test: (value) => !(value == '' || isNaN(value)),\n });\n});\n\nmarkRaw(FormText);\nmarkRaw(FormRadio);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nconst HtmlMessage = {\n props: {\n message: '',\n },\n template: '<div v-html=\"message\"></div>',\n};\n\nwindow.viewedSwiperOptions = {\n slidesPerView: 'auto',\n freeMode: true,\n slideClass: 'product',\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: '.next',\n prevEl: '.prev'\n },\n observer: true,\n observeParents: true\n};\n\nexport default /*#__PURE__*/ defineComponent({\n components: {\n CheckoutItem,\n SchemaForm\n },\n props: {\n isLogin: {\n type: Boolean,\n default: true\n },\n isPhoneMasked: {\n type: Boolean,\n default: true\n },\n isPromoCode: {\n type: Boolean,\n default: true\n },\n isConsent: {\n type: Boolean,\n default: false\n },\n isPaymentMethodOverSummary: {\n type: Boolean,\n default: false\n },\n userFields: {\n type: Array,\n default: ['last_name', 'name', 'email', 'phone'],\n },\n redirectOnEmpty: {\n type: String,\n default: false\n },\n showPlaceholders: {\n type: Boolean,\n default: false\n },\n isTrackAfterSuccessOnlinePurchase: {\n type: Boolean,\n default: false\n }\n },\n name: 'order-checkout',\n setup(props) {\n const slots = useSlots();\n const toast = useToast();\n const store = useStore();\n const loading = ref(false);\n const quantity = computed(() => store.getters['cart/quantity']);\n const items = computed(() => store.getters['cart/items']);\n const total = computed(() => store.getters['cart/total']);\n const auth = computed(() => store.getters['auth/is']);\n const userCheckout = computed(() => store.getters['checkout/user']);\n const loggedUser = computed(() => store.getters['auth/me']);\n const ifCheckoutReady = ref(true);\n const redirectForm = ref(null);\n const thanks = ref(false);\n const order = ref(null);\n const consent = ref(false);\n const shippingComponent = ref(null);\n\n const redirect = ref({});\n\n const shippingTypes = ref([]);\n const paymentMethods = ref([]);\n\n const userType = ref('new');\n const userSubmitButton = ref(null);\n\n const shippingComponentData = computed(() => store.getters['checkout/shippingData']);\n const isCommentToggled = ref(false);\n const commentMaxLength = 1000;\n\n const isPromoCodeToggled = ref(false);\n const promoCode = ref('');\n const promoCodeApplied = ref(null);\n const isPromoLoading = ref(false);\n const app = getCurrentInstance();\n\n const loyalty = computed(() => {\n const points = items.value.reduce((acc, array) => acc + (array.attributes.loyalty ? array.attributes.loyalty.points * array.quantity : 0), 0);\n\n return {\n points: points,\n name: pluralize(points, __('shop.pluralize.points'))\n };\n });\n\n const loyaltyUse = ref('');\n const isUseLoyaltyPoints = ref(false);\n\n watch(isUseLoyaltyPoints, (value) => {\n if (value) {\n loyaltyUse.value = total.value;\n } else {\n loyaltyUse.value = '';\n }\n });\n\n const loyaltyUseApplied = ref(false);\n\n const resetLoyaltyUse = () => {\n loyaltyUse.value = 0;\n loyaltyUseApplied.value = false;\n };\n\n const applyLoyaltyUse = () => {\n if (loyaltyUse.value) {\n loyaltyUseApplied.value = true;\n }\n };\n\n const readableTotalInPoints = computed(() => {\n return numberFormat(total.value);\n });\n\n const readableUserLoyaltyPoints = computed(() => {\n return numberFormat(loggedUser.value.loyalty_points - (loyaltyUseApplied.value ? loyaltyUse.value : 0));\n });\n\n const resetPromoCode = () => {\n promoCode.value = '';\n promoCodeApplied.value = null;\n };\n\n const isUserConsent = computed(() => {\n return (props.isConsent && consent.value) || !props.isConsent;\n });\n\n const applyPromoCode = () => {\n if (promoCode.value) {\n isPromoLoading.value = true;\n\n $http\n .post(window.location.href, {\n promoCodeApply: promoCode.value,\n email: user.value.email,\n total: total.value\n })\n .then(response => {\n promoCodeApplied.value = response.data;\n }).catch(error => {\n if (error.response && error.response.data.length) {\n error.response.data.forEach(error => {\n const component = {\n component: HtmlMessage,\n props: {\n message: __('shop.order.promo.error_' + error.error, { number: app.appContext.config.globalProperties.$filters.price(error.number) }),\n },\n };\n\n toast(component, {\n type: 'error'\n });\n\n if (error.error == 'not_found') {\n promoCode.value = '';\n }\n });\n\n promoCodeApplied.value = null;\n }\n }).finally(() => {\n isPromoLoading.value = false;\n });\n }\n };\n\n const dontcall = computed({\n get() {\n return store.getters['checkout/dontcall'];\n },\n set(value) {\n store.commit('checkout/dontcall', value);\n }\n });\n\n const comment = computed({\n get() {\n const comment = store.getters['checkout/comment'];\n\n if (!!comment) {\n isCommentToggled.value = true;\n }\n\n return comment;\n },\n set(value) {\n store.commit('checkout/comment', value);\n }\n });\n\n watch(comment, (value) => {\n if (value.length > commentMaxLength) {\n comment.value = comment.value.substring(0, commentMaxLength);\n }\n });\n\n const field = (name, defaultValue) => {\n return computed({\n get() {\n return userCheckout.value[name] ? userCheckout.value[name] : defaultValue;\n },\n set(value) {\n let data = JSON.parse(JSON.stringify(userCheckout.value));\n data[name] = value;\n\n store.commit('checkout/user', data);\n }\n });\n };\n\n provide('field', field);\n\n // const user = ref({\n // last_name: field('last_name'),\n // middle_name: field('middle_name'),\n // name: field('name'),\n // email: field('email'),\n // phone: field('phone'),\n // registration_number: field('registration_number'),\n // company_name: field('company_name'),\n // user_type: field('user_type', 'individual'),\n // });\n const user = ref({});\n\n if (!auth.value) {\n api.registerForm()\n .then((response) => {\n if (response.data) {\n const form = formParse(response.data);\n\n userSchema.value = form.schema;\n user.value = form.model;\n userValidation.value = form.validation;\n }\n })\n .finally(() => {\n\n });\n }\n\n provide('user', user);\n provide('formModel', user);\n provide('loggedUser', loggedUser);\n\n store.dispatch('auth/me', {\n finally: () => { }\n });\n\n const calculateWithPromoCodeDiscount = () => {\n const sum = total.value + fee.value + shippingPrice.value;\n\n if (promoCodeApplied.value && promoCodeApplied.value.type == 'percent') {\n return Math.round(sum - sum * promoCodeApplied.value.amount / 100);\n }\n\n if (promoCodeApplied.value && promoCodeApplied.value.type == 'discount') {\n return Math.max(0, sum - promoCodeApplied.value.amount);\n }\n\n return sum;\n };\n\n const shipping = computed({\n get() {\n return store.getters['checkout/shipping'];\n },\n set(id) {\n store.commit('checkout/shipping', id);\n }\n });\n\n const payment = computed({\n get() {\n return store.getters['checkout/payment'];\n },\n set(id) {\n store.commit('checkout/payment', id);\n }\n });\n\n const shippingSelected = computed(() => {\n return shipping.value ? shippingTypes.value.find((item) => item.id == shipping.value) : {};\n });\n\n const paymentSelected = computed(() => {\n return payment.value ? paymentMethods.value.find((item) => item.id == payment.value) : {};\n });\n\n const shippingPrice = computed(() => {\n return calculatePrice(shippingTypes.value, shipping.value);\n });\n\n const fee = computed(() => {\n return calculatePrice(paymentMethods.value, payment.value);\n });\n\n const shippingTypesRestricted = computed(() => {\n return restrictCheck(shippingTypes.value);\n });\n\n const paymentMethodsRestricted = computed(() => {\n return restrictCheck(paymentMethods.value);\n });\n\n const categoriesInCart = computed(() => {\n let categories = [];\n\n items.value.forEach((item) => {\n if (categories.indexOf(item.category_id) === -1) {\n categories.push(item.category_id);\n }\n });\n\n return categories;\n });\n\n const calculatePrice = (items, value) => {\n let price = 0;\n\n if (value) {\n const item = items.find((item) => item.id == value);\n\n if (item) {\n if (item.type == 'sum') {\n price = item.amount;\n } else {\n price = Math.round((total.value * item.amount) / 100);\n }\n }\n }\n\n return price;\n };\n\n const restrictCheck = (elements) => {\n let items = [];\n\n elements.forEach((item) => {\n if (item.restrictions && Object.keys(item.restrictions).length) {\n let ok = true;\n\n const r = item.restrictions;\n\n if (r.price_min && r.price_max) {\n ok = total.value >= r.price_min && total.value <= r.price_max;\n item.restrictedForce = !ok;\n } else if (r.price_min) {\n ok = total.value >= r.price_min;\n item.restrictedForce = !ok;\n } else if (r.price_max) {\n ok = total.value <= r.price_max;\n item.restrictedForce = !ok;\n }\n\n if (ok && shipping.value) {\n if (r.shipping_type && r.shipping_type.length) {\n ok = r.shipping_type.indexOf(shipping.value) !== -1;\n }\n }\n\n if (ok && payment.value) {\n if (r.payment_method && r.payment_method.length) {\n ok = r.payment_method.indexOf(payment.value) !== -1;\n }\n }\n\n if (ok && r.categories && r.categories.length) {\n ok = !categoriesInCart.value.filter((value) => !r.categories.includes(value)).length;\n item.restrictedForce = !ok;\n }\n\n if (ok && r.code === 'user_type') {\n ok = r.value === loggedUser.value.user_type || r.value === user.value.user_type;\n item.restrictedForce = !ok;\n }\n\n item.restricted = !ok;\n } else {\n item.restricted = false;\n }\n\n if (!item.restrictedForce) {\n items.push(item);\n }\n });\n\n return items;\n };\n\n const discount = computed(() => {\n let sum = 0;\n\n items.value.forEach((item) => {\n let s = 0;\n\n if (item.attributes.priceOld) {\n s = item.attributes.priceOld - item.attributes.price;\n }\n\n sum += s * item.quantity;\n });\n\n return sum;\n });\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const loginCallback = () => {\n userType.value = 'new';\n };\n\n $http.post(window.location.href).then((response) => {\n shippingTypes.value = response.data.shipping;\n paymentMethods.value = response.data.payment;\n });\n\n watch(userType, (value) => {\n if (value == 'login') {\n store.commit('auth/modal', 'login');\n }\n });\n\n // let userSchemaFields = {\n // user_type: {\n // component: FormRadio,\n // model: 'user_type',\n // label: '',\n // list: [\n // { code: 'individual', value: __('auth.registration.form.user_type_individual') },\n // { code: 'legal', value: __('auth.registration.form.user_type_legal') }\n // ],\n // },\n // name: {\n // component: FormText,\n // label: __('auth.registration.form.name'),\n // model: 'first_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.name') : '',\n // },\n // last_name: {\n // component: FormText,\n // label: __('auth.registration.form.last_name'),\n // model: 'last_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.last_name') : '',\n // },\n // middle_name: {\n // component: FormText,\n // label: __('auth.registration.form.middle_name'),\n // model: 'middle_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.middle_name') : '',\n // },\n // phone: {\n // component: FormText,\n // label: __('auth.registration.form.phone'),\n // model: 'phone',\n // type: 'phone',\n // //placeholder: '(050) 123-45-67'\n // },\n // registration_number: {\n // component: FormText,\n // label: __('auth.registration.form.registration_number'),\n // model: 'registration_number',\n // condition: (model) => model.user_type === 'legal',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.registration_number') : '',\n // },\n // company_name: {\n // component: FormText,\n // label: __('auth.registration.form.company_name'),\n // model: 'company_name',\n // condition: (model) => model.user_type === 'legal',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.company_name') : '',\n // },\n // email: {\n // component: FormText,\n // label: __('auth.login.form.email'),\n // model: 'email',\n // placeholder: props.showPlaceholders ? __('auth.login.form.email') : '',\n // },\n // };\n\n // if (props.isPhoneMasked) {\n // userSchemaFields.phone.mask = '(###) ###-##-##';\n // }\n\n // let userSchemaFieldsFiltered = Object.keys(userSchemaFields).reduce((obj, key) => {\n // if (props.userFields.includes(key)) {\n // obj[key] = userSchemaFields[key];\n // }\n\n // return obj;\n // }, {});\n\n // userSchemaFieldsFiltered = props.userFields.reduce((obj, key) => {\n // obj[key] = userSchemaFieldsFiltered[key];\n // return obj;\n // }, {});\n\n //const userSchema = ref(userSchemaFieldsFiltered);\n const userSchema = ref({});\n const userErrors = ref({});\n const userKey = ref(0);\n\n useSchemaForm(user);\n\n // const phoneRegExp = /^\\(\\d{3}\\) \\d{3}\\-\\d{2}\\-\\d{2}$/;\n // const userValidationFields = {\n // last_name: yup.string().trim().required(__('auth.validation.required')),\n // middle_name: yup.string().trim().required(__('auth.validation.required')),\n // name: yup.string().trim().required(__('auth.validation.required')),\n // phone: props.isPhoneMasked ? yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone')) : yup.string().required(__('auth.validation.phone')),\n // email: yup.string().trim().email(__('auth.validation.email')).required(__('auth.validation.required')),\n // registration_number: yup.string().when('user_type', (user_type) => {\n // if (user_type == 'legal') {\n // return yup.string().numberFilled();\n // }\n // }),\n // company_name: yup.string().when('user_type', (user_type) => {\n // if (user_type == 'legal') {\n // return yup.string().required(__('auth.validation.required'));\n // }\n // }),\n // };\n\n // const userValidationFieldsFiltered = Object.keys(userValidationFields).reduce((obj, key) => {\n // if (props.userFields.includes(key)) {\n // obj[key] = userValidationFields[key];\n // }\n\n // return obj;\n // }, {});\n\n //const userValidation = yup.object().shape(userValidationFieldsFiltered);\n const userValidation = ref({});\n\n const paymentValidations = ref({});\n\n provide('paymentValidations', paymentValidations);\n provide('paymentMethods', paymentMethods);\n\n window.addEventListener('beforeunload', () => {\n store.commit('auth/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit('auth/modal', null);\n });\n\n const validate = async () => {\n if (typeof shippingComponentValid.value == 'function') {\n const isShippingComponentFormsValid = await shippingComponentValid.value();\n\n if (userSubmitButton.value) {\n userSubmitButton.value.click();\n }\n\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (isUserValid) {\n ifCheckoutReady.value = isUserValid && payment.value && isUserConsent.value && shipping.value && (!shippingSelected.value.component || (shippingSelected.value.component && shippingComponentData.value[shippingSelected.value.code] && shippingComponentData.value[shippingSelected.value.code].isValid)) && isShippingComponentFormsValid;\n });\n } else {\n ifCheckoutReady.value = payment.value && isUserConsent.value && shipping.value && (!shippingSelected.value.component || (shippingSelected.value.component && shippingComponentData.value[shippingSelected.value.code] && shippingComponentData.value[shippingSelected.value.code].isValid)) && isShippingComponentFormsValid;\n }\n }\n };\n\n const shippingComponentValid = ref(null);\n provide('shippingComponentValid', shippingComponentValid);\n\n const shippingComponentUserData = ref({});\n provide('shippingComponentUserData', shippingComponentUserData);\n\n const initPaymentWidget = (payment, order) => {\n const wayforpay = new Wayforpay();\n\n window.addEventListener('message', (event) => {\n if (event.data == 'WfpWidgetEventClose' || event.data == 'WfpWidgetEventDeclined' || event.data == 'WfpWidgetEventPending') {\n\n }\n\n if (event.data == 'WfpWidgetEventApproved') {\n resetCheckoutForm(order);\n\n isPayed.value = true;\n\n store.dispatch('cart/clear', {\n finally: () => { }\n });\n }\n });\n\n wayforpay.run(payment);\n }\n\n const isPayed = ref(false);\n\n const resetCheckoutForm = (_order) => {\n thanks.value = true;\n order.value = _order;\n\n document.querySelector('html').classList.add('is-checkout-thanks');\n\n resertStore();\n }\n\n const checkout = async () => {\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (valid) {\n if (!valid) {\n userType.value = 'new';\n userSubmitButton.value.click();\n\n toast(__('shop.order.validate_user'), {\n type: 'error'\n });\n } else if (user.value.is_register) {\n store.dispatch('auth/register', {\n type: 'Full',\n credentials: user.value,\n finally: () => {\n },\n callback: (response) => {\n createOrder();\n },\n catch: (error) => {\n let incomingErrors = {};\n\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n incomingErrors[field] = messages[0];\n }\n }\n\n userKey.value++;\n }\n\n userErrors.value = incomingErrors;\n }\n });\n } else {\n createOrder();\n }\n });\n } else {\n createOrder();\n }\n };\n\n const createOrderWithoutValidate = (valid) => {\n let isShippingComponentFormsValid = typeof shippingComponentValid.value == 'function' ? shippingComponentValid.value() : null;\n\n let isPaymentValid = paymentValidations.value[paymentSelected.value.code] ? paymentValidations.value[paymentSelected.value.code]() : true;\n\n if (!isPaymentValid) {\n toast('Заповніть необхідні дані оплати', {\n type: 'error'\n });\n\n return;\n }\n\n if (shippingSelected.value && !shippingSelected.value.component) {\n isShippingComponentFormsValid = true;\n }\n\n if (total.value < $env.checkout.minimum_amount) {\n const component = {\n component: HtmlMessage,\n props: {\n message: __('shop.order.validate_minimum_amount', { amount: app.appContext.config.globalProperties.$filters.price($env.checkout.minimum_amount) }),\n },\n };\n\n toast(component, {\n type: 'error'\n });\n } else if (!valid) {\n userType.value = 'new';\n userSubmitButton.value.click();\n\n toast(__('shop.order.validate_user'), {\n type: 'error'\n });\n } else if (!shipping.value) {\n toast(__('shop.order.validate_shipping'), {\n type: 'error'\n });\n } else if (shippingSelected.value.component && (!shippingComponentData.value[shippingSelected.value.code] || !shippingComponentData.value[shippingSelected.value.code].isValid)) {\n toast(__('shop.order.validate_shipping1') + ': «' + shippingSelected.value.name + '»', {\n type: 'error'\n });\n } else if (!isShippingComponentFormsValid) {\n toast(__('shop.order.validate_shipping1') + ': «' + shippingSelected.value.name + '»', {\n type: 'error'\n });\n } else if (!payment.value) {\n toast(__('shop.order.validate_payment'), {\n type: 'error'\n });\n } else if (!isUserConsent.value) {\n toast(__('shop.order.validate_consent'), {\n type: 'error'\n });\n } else {\n let clientId;\n let data = shippingComponentData.value[shippingSelected.value.code] ? JSON.parse(JSON.stringify(shippingComponentData.value[shippingSelected.value.code])) : {};\n\n delete data.isValid;\n\n setTimeout(() => {\n const shippingUserData = JSON.parse(JSON.stringify(shippingComponentUserData.value));\n\n if (document.cookie) {\n const cookies = document.cookie.split(';');\n\n cookies.forEach((cookie) => {\n const parts = cookie.split('=');\n\n if (parts[0].trim() === '_ga') {\n clientId = parts[1].split('.')[2] + '.' + parts[1].split('.')[3];\n }\n });\n }\n\n const userValue = auth.value ? loggedUser.value : user.value;\n const paymentMethodData = paymentMethods.value.find((item) => item.id == payment.value);\n const model = {\n checkout: true,\n user: {\n last_name: userValue.last_name,\n middle_name: userValue.middle_name,\n name: userValue.name,\n phone: userValue.phone,\n email: userValue.email,\n user_type: userValue.user_type,\n registration_number: userValue.registration_number,\n password: userValue.is_register ? userValue.password : null,\n company_name: userValue.company_name,\n district: userValue.district,\n region: userValue.region,\n is_register: userValue.is_register,\n },\n shipping: {\n id: shipping.value,\n data: data,\n user: shippingUserData,\n },\n payment: {\n id: payment.value,\n price: paymentMethodData?.amount.toFixed(2) || 0,\n },\n comment: comment.value,\n dontcall: dontcall.value,\n promoCode: promoCode.value,\n loyalty: loyaltyUse.value,\n clientId: clientId\n };\n\n loading.value = true;\n\n $http\n .post(window.location.href, model)\n .then((response) => {\n if (response.data && response.data.error && response.data.message) {\n toast(response.data.message, {\n type: 'error',\n });\n\n return;\n }\n\n let products = [];\n\n items.value.forEach((item) => {\n let product = {\n item_name: item.name,\n item_id: item.attributes.code,\n price: item.price,\n quantity: item.quantity\n };\n\n if (item.attributes.brand) {\n product.item_brand = item.attributes.brand;\n }\n\n if (item.attributes.property) {\n product.item_variant = item.attributes.property;\n }\n\n if (item.attributes.categoryFull) {\n if (item.attributes.categoryFull.indexOf('/') !== -1) {\n item.attributes.categoryFull.split('/').forEach((segment, index) => {\n product['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n product.item_category = item.attributes.categoryFull;\n }\n }\n\n if (item.attributes.index) {\n product.index = item.attributes.index;\n }\n\n if (item.attributes.itemListName) {\n product.item_list_name = item.attributes.itemListName;\n }\n\n products.push(product);\n });\n\n\n let object = {\n payment_type: paymentSelected.value.name,\n shipping_tier: shippingSelected.value.name,\n ecommerce: {\n transaction_id: response.data.order.id,\n affiliation: 'main',\n value: parseFloat(total.value),\n shipping: 0,\n currency: 'UAH',\n items: products\n },\n event: 'purchase',\n };\n\n if (user.value.user_type) {\n object.user_type = __('auth.registration.form.user_type_' + user.value.user_type);\n }\n\n if (promoCode.value) {\n object.ecommerce.coupon = promoCode.value;\n }\n\n if (props.isTrackAfterSuccessOnlinePurchase && (response.data.redirect || (response.data.payment_widget_data && window.Wayforpay))) {\n localStorage.setItem('ecommerce', JSON.stringify(object));\n } else {\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n\n if (response.data.redirect && response.data.redirect.redirect_url) {\n setTimeout(() => {\n window.location.href = response.data.redirect.redirect_url;\n }, 400);\n }\n\n if (response.data.redirect && response.data.redirect.url && response.data.redirect.data) {\n redirect.value = {\n url: response.data.redirect.url,\n data: response.data.redirect.data\n };\n\n nextTick(() => {\n setTimeout(() => {\n redirectForm.value.submit();\n }, 400);\n });\n }\n\n if (response.data.payment_widget_data && window.Wayforpay) {\n initPaymentWidget(JSON.parse(response.data.payment_widget_data), response.data.order);\n } else {\n resetCheckoutForm(response.data.order);\n }\n })\n .catch((e) => {\n toast(__('shop.order.error'), {\n type: 'error'\n });\n\n console.error(e);\n })\n .finally(() => {\n loading.value = false;\n });\n }, 100);\n }\n }\n\n const createOrder = () => {\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (valid) {\n createOrderWithoutValidate(valid);\n });\n } else {\n createOrderWithoutValidate(true);\n }\n }\n\n const toggleShippingRadio = (id) => {\n if (shipping.value === id) {\n shipping.value = null;\n }\n };\n\n const togglePaymentRadio = (id) => {\n if (payment.value === id) {\n payment.value = null;\n }\n };\n\n const resertStore = () => {\n // debug\n store.commit('checkout/reset');\n store.commit('cart/clear');\n };\n\n const shippingStoreData = (code, data, isValid) => {\n let d = JSON.parse(JSON.stringify(shippingComponentData.value));\n\n data.isValid = isValid;\n d[code] = data;\n\n store.commit('checkout/shippingData', d);\n };\n\n const home = () => {\n window.location.href = $env.locale.url ? $env.locale.url : '/';\n };\n\n onMounted(() => {\n if (!quantity.value && props.redirectOnEmpty) {\n window.location.href = props.redirectOnEmpty;\n }\n\n let products = [];\n\n items.value.forEach((item) => {\n let product = {\n item_name: item.name,\n item_id: item.attributes.code,\n price: parseFloat(item.attributes.price),\n quantity: item.quantity\n };\n\n if (item.attributes.brand) {\n product.item_brand = item.attributes.brand;\n }\n\n if (item.attributes.property) {\n product.item_variant = item.attributes.property;\n }\n\n if (item.attributes.categoryFull) {\n if (item.attributes.categoryFull.indexOf('/') !== -1) {\n item.attributes.categoryFull.split('/').forEach((segment, index) => {\n product['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n product.item_category = item.attributes.categoryFull;\n }\n }\n\n if (item.attributes.index) {\n product.index = item.attributes.index;\n }\n\n if (item.attributes.itemListName) {\n product.item_list_name = item.attributes.itemListName;\n }\n\n products.push(product);\n });\n\n if (products.length) {\n const object = {\n ecommerce: {\n currency: 'UAH',\n items: products,\n value: parseFloat(total.value),\n },\n event: 'begin_checkout'\n };\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n\n const phoneFormatted = (phone) => {\n return phone.replace(/(\\d{3})(\\d{3})(\\d{2})(\\d{2})/, '($1) $2-$3-$4');\n }\n\n const isComponentExists = (name) => {\n return typeof resolveDynamicComponent(name) !== 'string';\n }\n\n return {\n auth,\n userType,\n facebook,\n google,\n loginCallback,\n quantity,\n items,\n loading,\n pluralize,\n discount,\n total,\n shipping,\n shippingPrice,\n payment,\n fee,\n userValidation,\n userSchema,\n userSubmitButton,\n checkout,\n ifCheckoutReady,\n validate,\n shippingTypesRestricted,\n paymentMethodsRestricted,\n toggleShippingRadio,\n togglePaymentRadio,\n shippingSelected,\n paymentSelected,\n shippingComponentData,\n shippingStoreData,\n resertStore,\n user,\n dontcall,\n comment,\n isCommentToggled,\n commentMaxLength,\n userCheckout,\n thanks,\n order,\n redirect,\n redirectForm,\n home,\n isPromoCodeToggled,\n applyPromoCode,\n promoCode,\n isPromoLoading,\n promoCodeApplied,\n resetPromoCode,\n calculateWithPromoCodeDiscount,\n consent,\n shippingComponent,\n slots,\n isPayed,\n loyalty,\n loyaltyUse,\n loyaltyUseApplied,\n resetLoyaltyUse,\n applyLoyaltyUse,\n readableUserLoyaltyPoints,\n userErrors,\n userKey,\n loggedUser,\n phoneFormatted,\n readableTotalInPoints,\n isUseLoyaltyPoints,\n isComponentExists,\n };\n }\n});\n</script>","<template>\n <div class=\"cart checkout\">\n <form ref=\"redirectForm\" v-if=\"redirect.url\" :action=\"redirect.url\"\n style=\"position: absolute; left: -1000px; top:-1000px;\" method=\"post\">\n <input type=\"hidden\" :name=\"name\" :value=\"value\" v-for=\"(value, name, index) in redirect.data\"\n v-bind:key=\"index\" />\n </form>\n\n <div class=\"items-wrapper\" v-if=\"items.length && !thanks\">\n <div class=\"checkout-title\">{{ __('shop.order.checkout_title') }}</div>\n <div class=\"columns\">\n <div class=\"column checkout-blocks-wrapper\">\n <slot name=\"header\"></slot>\n <div class=\"checkout-block is-cart\"><!--items-->\n <div class=\"wrapper\">\n <div class=\"title-row\">\n <div class=\"items-title\">\n {{ __('shop.order.your_order') }}\n <span class=\"ml-3\"\n v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> <span\n v-html=\"__('shop.cart.bysum') + ' ' + $filters.price(total)\"></span>\n </div>\n </div>\n <slot name=\"cart\" :items=\"items\">\n <checkout-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\"></checkout-item>\n <cart-trigger class=\"trigger\">\n <template #default=\"props\">\n <button class=\"button\" @click=\"props.open\">\n <svg>\n <use xlink:href=\"#cart-edit\" />\n </svg>\n <span>{{ __('shop.order.edit') }}</span>\n </button>\n </template>\n </cart-trigger>\n </slot>\n <slot name=\"cart-footer\" :total=\"total\"></slot>\n </div>\n </div>\n <div class=\"checkout-block is-user auth-user\">\n <div class=\"wrapper\">\n <div class=\"items-title\">{{ __('shop.order.contact_title') }}</div>\n <div class=\"user-tabs\" v-if=\"!auth && isLogin\">\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"new\" />{{\n __('shop.order.auth_new')\n }}</label>\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"login\" />{{\n __('shop.order.auth_old')\n }}</label>\n </div>\n <div class=\"columns\">\n <div class=\"logged-user\" v-if=\"auth\">\n <p><strong>{{ loggedUser.last_name }} {{ loggedUser.name }} {{\n loggedUser.middle_name }}</strong></p>\n <p>{{ phoneFormatted(loggedUser.phone) }}, {{ loggedUser.email }}</p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.company_name\"><strong>{{\n loggedUser.company_name\n }}</strong></p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.registration_number\">ЄДРПОУ\n {{\n loggedUser.registration_number }}</p>\n <p v-if=\"loggedUser.user_type == 'legal' && loggedUser.region\">{{\n loggedUser.region_name }} {{\n loggedUser.district_name ? ', ' + loggedUser.district_name : '' }}</p>\n </div>\n <div class=\"column user-form\" v-if=\"userType == 'new'\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"userSchema\"\n :validation-schema=\"userValidation\" :initial-errors=\"userErrors\" :key=\"userKey\"\n :preventModelCleanupOnSchemaChange=\"true\">\n <template #afterForm>\n <button type=\"submit\" ref=\"userSubmitButton\" class=\"is-hidden\"></button>\n </template>\n </SchemaForm>\n </div>\n <div class=\"column user-login user-form\" v-if=\"userType == 'login' && isLogin\">\n <login :login-callback=\"loginCallback\"></login>\n </div>\n <div class=\"column\" v-if=\"isLogin\">\n <div class=\"social-auth\" v-if=\"!auth\">\n <div class=\"socials\">\n <div class=\"description\">{{ __('shop.order.auth_social') }}</div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\">\n <svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"checkout-block is-shipping\">\n <div class=\"wrapper shipping-type-block\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.shipping') }}</div>\n </div>\n <div class=\"value\" v-if=\"shippingSelected && shippingSelected.nextDates\">\n <div class=\"next-dates\">на {{ shippingSelected.nextDates }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"shipping = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': shipping }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in shippingTypesRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"shipping\" :value=\"item.id\"\n @click=\"toggleShippingRadio(item.id)\" />\n <img class=\"icon\" :src=\"item.icon\" v-if=\"item.icon\" />\n <svg v-else class=\"icon\">\n <use xlink:href=\"#shipping\" />\n </svg>\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <div class=\"value\">\n <span class=\"green\" v-if=\"!item.amount && item.price_label\">{{\n item.price_label }}</span>\n <span v-else\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div>\n </div>\n <!-- <div v-if=\"!slots.shippingFooter\">\n <component :is=\"item.component\" v-if=\"item.component && item.id == shipping\" :commit=\"shippingStoreData\" :data=\"shippingComponentData\" :item=\"item\" :take-user-data=\"true\"></component>\n </div> -->\n </div>\n </div>\n <slot name=\"shipping-footer\" :shippingTypesRestricted=\"shippingTypesRestricted\"\n :shipping=\"shipping\" :shippingStoreData=\"shippingStoreData\"\n :shippingComponentData=\"shippingComponentData\"></slot>\n </div>\n </div>\n <div class=\"checkout-block is-payment\" v-if=\"!isPaymentMethodOverSummary\">\n <div class=\"wrapper payment-method-block\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.payment') }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"payment = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': payment }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row no-icon\" v-bind:class=\"'is-' + item.code\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"payment\" :value=\"item.id\"\n @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <!-- <div class=\"value\" v-if=\"item.amount\">\n <span\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div> -->\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-4\">\n <div class=\"checkout-block summary\">\n <div class=\"inner payment-method-block\" v-if=\"isPaymentMethodOverSummary\">\n <div class=\"rows\">\n <div class=\"item\">\n <div class=\"row\">\n <div class=\"info\">\n <div class=\"items-title mb-1\">{{ __('shop.order.payment') }}</div>\n </div>\n <div class=\"value\" v-if=\"1 != 1\">\n <a @click=\"payment = null\" class=\"reset\"\n v-bind:class=\"{ 'is-active': payment }\">{{\n __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\"\n v-bind:class=\"{ 'is-disabled': item.restricted }\">\n <div class=\"row no-icon\" v-bind:class=\"'is-' + item.code\">\n <div class=\"info\">\n <label>\n <input type=\"radio\" class=\"radio\" v-model=\"payment\" :value=\"item.id\"\n @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}\n </div>\n </div>\n <!-- <div class=\"value\" v-if=\"item.amount\">\n <span\n v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div> -->\n </div>\n <component :is=\"'checkout-payment-' + item.code\"\n v-if=\"payment == item.id && isComponentExists('checkout-payment-' + item.code)\">\n </component>\n </div>\n </div>\n </div>\n <div class=\"divider\"></div>\n <div class=\"inner\">\n <div class=\"items-title\">{{ __('shop.order.total') }}</div>\n <div class=\"rows\">\n <div class=\"row products\">\n <div class=\"info\"><span\n v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> {{\n __('shop.cart.bysum') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n <div class=\"row discount\" v-if=\"discount\">\n <div class=\"info\">{{ __('shop.order.discount') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(discount)\"></span>\n </div>\n </div>\n <!-- <div class=\"row fee\" v-if=\"fee > 0\">\n <div class=\"info\">{{ __('shop.order.fee') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(fee)\"></span>\n </div>\n </div> -->\n <div class=\"row shipping\" v-if=\"shipping\">\n <div class=\"info\">{{ __('shop.order.shipping_price') }}</div>\n <div class=\"value\">\n <span v-html=\"$filters.price(shippingPrice)\" v-if=\"shippingPrice > 0\"></span>\n <span class=\"green\"\n v-else-if=\"shippingSelected && shippingSelected.price_label\">{{\n shippingSelected.price_label }}</span>\n </div>\n </div>\n <div class=\"row promo\" v-if=\"promoCodeApplied\">\n <div class=\"info\">{{ __('shop.order.promo_code') }}<br><span class=\"green\">{{\n promoCode }}</span>\n </div>\n <div class=\"value\">\n <span\n v-html=\"(promoCodeApplied.type == 'percent' ? promoCodeApplied.amount + '%' : $filters.price(promoCodeApplied.amount))\"></span>\n </div>\n </div>\n <div class=\"row price\">\n <div class=\"info\">{{ __('shop.order.price') }}</div>\n <div class=\"value orange\">\n <span v-html=\"$filters.price(calculateWithPromoCodeDiscount())\"></span>\n </div>\n </div>\n </div>\n <div class=\"checkbox-wrapper nocall\">\n <label> <input type=\"checkbox\" class=\"checkbox\" v-model=\"dontcall\" />{{\n __('shop.order.nocall')\n }}</label>\n </div>\n <slot name=\"loyalty\" :loyalty=\"loyalty\" :inactive=\"isUseLoyaltyPoints\"></slot>\n <div class=\"user-loyalty consent\"\n v-if=\"loggedUser && loggedUser.loyalty_points > 0 && total <= loggedUser.loyalty_points\">\n <div class=\"checkbox-wrapper\">\n <label>\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"isUseLoyaltyPoints\">\n <div class=\"label\">Сплатити замовлення за <span>{{\n pluralize(readableTotalInPoints,\n __('shop.pluralize.points')) }}</span></div>\n </label>\n </div>\n <!-- <div class=\"notice\">{{ pluralize(readableUserLoyaltyPoints, __('shop.pluralize.points')) }} в наявності</div>\n <div class=\"user-form is-loyalty-use\">\n <div class=\"control\">\n <input type=\"number\" class=\"input\" placeholder=\"Сума бонусів\" v-model=\"loyaltyUse\" :disabled=\"loyaltyUseApplied\">\n </div>\n <button v-if=\"!loyaltyUseApplied\" class=\"button\" @click=\"applyLoyaltyUse\" :disabled=\"!loyaltyUse || loyaltyUse > loggedUser.loyalty_points\">Використати</button>\n <button v-else class=\"button is-reset\" @click=\"resetLoyaltyUse\">Відмінити</button>\n </div> -->\n </div>\n <div class=\"minimum-amount-message\" v-if=\"total < $env.checkout.minimum_amount\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <svg viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M9.50007 18C5.35778 18 2 14.6423 2 10.5C2 6.35775 5.35778 3 9.50007 3C13.6424 3 17.0001 6.35775 17.0001 10.5C17.0001 14.6423 13.6424 18 9.50007 18ZM8.75006 12.75V14.25H10.2501V12.75H8.75006ZM8.75006 6.75V11.25H10.2501V6.75H8.75006Z\"\n fill=\"#7C7C7C\" />\n </svg>\n </div>\n <div class=\"column\">\n <div class=\"message\"\n v-html=\"__('shop.order.minimum_amount', { amount: $filters.price($env.checkout.minimum_amount) })\">\n </div>\n </div>\n </div>\n </div>\n <button class=\"button submit\" @click=\"checkout\"\n v-bind:class=\"{ disabled: total < $env.checkout.minimum_amount, red: !ifCheckoutReady, 'is-loading': loading }\">{{\n __('shop.order.action') }}</button>\n <slot name=\"submit\" :total=\"total\"></slot>\n <div class=\"consent\" v-if=\"isConsent\">\n <div class=\"checkbox-wrapper\">\n <label>\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"consent\" />\n <div class=\"label\" v-html=\"__('shop.order.consent')\"></div>\n </label>\n </div>\n </div>\n <div class=\"comment-wrapper is-promo-code\" v-bind:class=\"{ 'is-open': isPromoCodeToggled }\"\n v-if=\"isPromoCode\">\n <div class=\"toggler\" @click=\"isPromoCodeToggled = !isPromoCodeToggled\">\n <span>{{ __('shop.order.promo_code') }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"user-form is-promo-code\">\n <div class=\"control\">\n <input type=\"text\" class=\"input\" placeholder=\" \" v-model=\"promoCode\"\n :disabled=\"promoCodeApplied\" id=\"promo-code-applied\">\n <label class=\"label\" for=\"promo-code-applied\">{{\n __('shop.order.promo.placeholder') }}</label>\n </div>\n <button v-if=\"!promoCodeApplied\" class=\"button\" @click=\"applyPromoCode\"\n :disabled=\"!promoCode\" v-bind:class=\"{ 'is-loading': isPromoLoading }\">{{\n __('shop.order.promo.apply') }}</button>\n <button v-else class=\"button\" @click=\"resetPromoCode\">{{\n __('shop.order.promo.reset') }}</button>\n </div>\n </div>\n <div class=\"comment-wrapper\" v-bind:class=\"{ 'is-open': isCommentToggled }\">\n <div class=\"toggler\" @click=\"isCommentToggled = !isCommentToggled\">\n <span>{{ __('shop.order.comment') }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"user-form\">\n <textarea class=\"textarea\" v-model=\"comment\"></textarea>\n <div class=\"chars-count\" v-if=\"comment.length\">{{ commentMaxLength - comment.length\n }}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"checkout-block thanks\" v-else-if=\"thanks && order\">\n <slot name=\"thanks\" :order=\"order\" :redirect=\"redirect\" :redirectForm=\"redirectForm\" :home=\"home\"\n :auth=\"auth\" :filters=\"$filters\" :user=\"user\">\n <div class=\"title\">\n {{ __('shop.order.order') }}\n <span>№{{ order.id }}</span> {{ isPayed ? __('shop.order.payed') : __('shop.order.success') }}\n </div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"redirect.url\">\n <div class=\"subtitle\">{{ __('shop.order.pay_online') }}</div>\n <button class=\"button is-payment\" @click=\"redirectForm.submit()\">{{\n __('shop.order.pay_online_go')\n }}</button>\n </div>\n <div class=\"column is-6\" v-else>\n <button class=\"button is-orange\" @click=\"home\">{{ __('shop.cart.continue') }}</button>\n </div>\n <div class=\"column is-6\">\n <div class=\"info-wrapper\" v-if=\"order.shipping[0]\">\n <div class=\"title\">{{ __('shop.order.shipping') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"order.shipping[0]\" v-html=\"order.shipping[0]\"></div>\n <div class=\"column is-6\" v-if=\"order.shipping[1]\" v-html=\"order.shipping[1]\"></div>\n </div>\n </div>\n <div class=\"info-wrapper\" v-if=\"order.payment[0]\">\n <div class=\"title\">{{ __('shop.order.payment') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\" v-if=\"order.payment[0]\" v-html=\"order.payment[0]\"></div>\n <div class=\"column is-6\" v-if=\"order.payment[1]\" v-html=\"order.payment[1]\"></div>\n </div>\n </div>\n <div class=\"info-wrapper\" v-if=\"order.promoCode\">\n <div class=\"title\">{{ __('shop.order.promo_code') }}</div>\n <div class=\"columns\">\n <div class=\"column is-6\">\n <span v-html=\"order.promoCode\" class=\"green\"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </slot>\n </div>\n <div v-else-if=\"!redirectOnEmpty\" class=\"checkout-block empty\">\n <div class=\"title\">{{ __('shop.cart.no_no') }}</div>\n <div class=\"message\">\n {{ __('shop.cart.no_prop') }}\n <a :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.no_home') }}</a>, <br />{{\n __('shop.cart.no_search') }}\n </div>\n <a class=\"button continue\" :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.continue')\n }}</a>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, markRaw, defineComponent, watch, getCurrentInstance, nextTick, provide, useSlots, onMounted, resolveDynamicComponent, resolveComponent } from 'vue';\nimport CheckoutItem from './CheckoutItem.vue';\nimport { pluralize, numberFormat } from '@perevorot/shop/dist/helpers';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormRadio from '@perevorot/shop/dist/forms/FormRadio';\nimport * as yup from 'yup';\nimport { useToast } from 'vue-toastification';\nimport { auth as api } from '@perevorot/shop/dist/api';\nimport { formParse } from '@perevorot/shop/dist/helpers';\n\nyup.addMethod(yup.string, 'numberFilled', function (min, msg) {\n return this.test({\n name: 'numberFilled',\n exclusive: true,\n message: __('auth.validation.number'),\n params: {\n min: min,\n },\n test: (value) => !(value == '' || isNaN(value)),\n });\n});\n\nmarkRaw(FormText);\nmarkRaw(FormRadio);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nconst HtmlMessage = {\n props: {\n message: '',\n },\n template: '<div v-html=\"message\"></div>',\n};\n\nwindow.viewedSwiperOptions = {\n slidesPerView: 'auto',\n freeMode: true,\n slideClass: 'product',\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: '.next',\n prevEl: '.prev'\n },\n observer: true,\n observeParents: true\n};\n\nexport default /*#__PURE__*/ defineComponent({\n components: {\n CheckoutItem,\n SchemaForm\n },\n props: {\n isLogin: {\n type: Boolean,\n default: true\n },\n isPhoneMasked: {\n type: Boolean,\n default: true\n },\n isPromoCode: {\n type: Boolean,\n default: true\n },\n isConsent: {\n type: Boolean,\n default: false\n },\n isPaymentMethodOverSummary: {\n type: Boolean,\n default: false\n },\n userFields: {\n type: Array,\n default: ['last_name', 'name', 'email', 'phone'],\n },\n redirectOnEmpty: {\n type: String,\n default: false\n },\n showPlaceholders: {\n type: Boolean,\n default: false\n },\n isTrackAfterSuccessOnlinePurchase: {\n type: Boolean,\n default: false\n }\n },\n name: 'order-checkout',\n setup(props) {\n const slots = useSlots();\n const toast = useToast();\n const store = useStore();\n const loading = ref(false);\n const quantity = computed(() => store.getters['cart/quantity']);\n const items = computed(() => store.getters['cart/items']);\n const total = computed(() => store.getters['cart/total']);\n const auth = computed(() => store.getters['auth/is']);\n const userCheckout = computed(() => store.getters['checkout/user']);\n const loggedUser = computed(() => store.getters['auth/me']);\n const ifCheckoutReady = ref(true);\n const redirectForm = ref(null);\n const thanks = ref(false);\n const order = ref(null);\n const consent = ref(false);\n const shippingComponent = ref(null);\n\n const redirect = ref({});\n\n const shippingTypes = ref([]);\n const paymentMethods = ref([]);\n\n const userType = ref('new');\n const userSubmitButton = ref(null);\n\n const shippingComponentData = computed(() => store.getters['checkout/shippingData']);\n const isCommentToggled = ref(false);\n const commentMaxLength = 1000;\n\n const isPromoCodeToggled = ref(false);\n const promoCode = ref('');\n const promoCodeApplied = ref(null);\n const isPromoLoading = ref(false);\n const app = getCurrentInstance();\n\n const loyalty = computed(() => {\n const points = items.value.reduce((acc, array) => acc + (array.attributes.loyalty ? array.attributes.loyalty.points * array.quantity : 0), 0);\n\n return {\n points: points,\n name: pluralize(points, __('shop.pluralize.points'))\n };\n });\n\n const loyaltyUse = ref('');\n const isUseLoyaltyPoints = ref(false);\n\n watch(isUseLoyaltyPoints, (value) => {\n if (value) {\n loyaltyUse.value = total.value;\n } else {\n loyaltyUse.value = '';\n }\n });\n\n const loyaltyUseApplied = ref(false);\n\n const resetLoyaltyUse = () => {\n loyaltyUse.value = 0;\n loyaltyUseApplied.value = false;\n };\n\n const applyLoyaltyUse = () => {\n if (loyaltyUse.value) {\n loyaltyUseApplied.value = true;\n }\n };\n\n const readableTotalInPoints = computed(() => {\n return numberFormat(total.value);\n });\n\n const readableUserLoyaltyPoints = computed(() => {\n return numberFormat(loggedUser.value.loyalty_points - (loyaltyUseApplied.value ? loyaltyUse.value : 0));\n });\n\n const resetPromoCode = () => {\n promoCode.value = '';\n promoCodeApplied.value = null;\n };\n\n const isUserConsent = computed(() => {\n return (props.isConsent && consent.value) || !props.isConsent;\n });\n\n const applyPromoCode = () => {\n if (promoCode.value) {\n isPromoLoading.value = true;\n\n $http\n .post(window.location.href, {\n promoCodeApply: promoCode.value,\n email: user.value.email,\n total: total.value\n })\n .then(response => {\n promoCodeApplied.value = response.data;\n }).catch(error => {\n if (error.response && error.response.data.length) {\n error.response.data.forEach(error => {\n const component = {\n component: HtmlMessage,\n props: {\n message: __('shop.order.promo.error_' + error.error, { number: app.appContext.config.globalProperties.$filters.price(error.number) }),\n },\n };\n\n toast(component, {\n type: 'error'\n });\n\n if (error.error == 'not_found') {\n promoCode.value = '';\n }\n });\n\n promoCodeApplied.value = null;\n }\n }).finally(() => {\n isPromoLoading.value = false;\n });\n }\n };\n\n const dontcall = computed({\n get() {\n return store.getters['checkout/dontcall'];\n },\n set(value) {\n store.commit('checkout/dontcall', value);\n }\n });\n\n const comment = computed({\n get() {\n const comment = store.getters['checkout/comment'];\n\n if (!!comment) {\n isCommentToggled.value = true;\n }\n\n return comment;\n },\n set(value) {\n store.commit('checkout/comment', value);\n }\n });\n\n watch(comment, (value) => {\n if (value.length > commentMaxLength) {\n comment.value = comment.value.substring(0, commentMaxLength);\n }\n });\n\n const field = (name, defaultValue) => {\n return computed({\n get() {\n return userCheckout.value[name] ? userCheckout.value[name] : defaultValue;\n },\n set(value) {\n let data = JSON.parse(JSON.stringify(userCheckout.value));\n data[name] = value;\n\n store.commit('checkout/user', data);\n }\n });\n };\n\n provide('field', field);\n\n // const user = ref({\n // last_name: field('last_name'),\n // middle_name: field('middle_name'),\n // name: field('name'),\n // email: field('email'),\n // phone: field('phone'),\n // registration_number: field('registration_number'),\n // company_name: field('company_name'),\n // user_type: field('user_type', 'individual'),\n // });\n const user = ref({});\n\n if (!auth.value) {\n api.registerForm()\n .then((response) => {\n if (response.data) {\n const form = formParse(response.data);\n\n userSchema.value = form.schema;\n user.value = form.model;\n userValidation.value = form.validation;\n }\n })\n .finally(() => {\n\n });\n }\n\n provide('user', user);\n provide('formModel', user);\n provide('loggedUser', loggedUser);\n\n store.dispatch('auth/me', {\n finally: () => { }\n });\n\n const calculateWithPromoCodeDiscount = () => {\n const sum = total.value + fee.value + shippingPrice.value;\n\n if (promoCodeApplied.value && promoCodeApplied.value.type == 'percent') {\n return Math.round(sum - sum * promoCodeApplied.value.amount / 100);\n }\n\n if (promoCodeApplied.value && promoCodeApplied.value.type == 'discount') {\n return Math.max(0, sum - promoCodeApplied.value.amount);\n }\n\n return sum;\n };\n\n const shipping = computed({\n get() {\n return store.getters['checkout/shipping'];\n },\n set(id) {\n store.commit('checkout/shipping', id);\n }\n });\n\n const payment = computed({\n get() {\n return store.getters['checkout/payment'];\n },\n set(id) {\n store.commit('checkout/payment', id);\n }\n });\n\n const shippingSelected = computed(() => {\n return shipping.value ? shippingTypes.value.find((item) => item.id == shipping.value) : {};\n });\n\n const paymentSelected = computed(() => {\n return payment.value ? paymentMethods.value.find((item) => item.id == payment.value) : {};\n });\n\n const shippingPrice = computed(() => {\n return calculatePrice(shippingTypes.value, shipping.value);\n });\n\n const fee = computed(() => {\n return calculatePrice(paymentMethods.value, payment.value);\n });\n\n const shippingTypesRestricted = computed(() => {\n return restrictCheck(shippingTypes.value);\n });\n\n const paymentMethodsRestricted = computed(() => {\n return restrictCheck(paymentMethods.value);\n });\n\n const categoriesInCart = computed(() => {\n let categories = [];\n\n items.value.forEach((item) => {\n if (categories.indexOf(item.category_id) === -1) {\n categories.push(item.category_id);\n }\n });\n\n return categories;\n });\n\n const calculatePrice = (items, value) => {\n let price = 0;\n\n if (value) {\n const item = items.find((item) => item.id == value);\n\n if (item) {\n if (item.type == 'sum') {\n price = item.amount;\n } else {\n price = Math.round((total.value * item.amount) / 100);\n }\n }\n }\n\n return price;\n };\n\n const restrictCheck = (elements) => {\n let items = [];\n\n elements.forEach((item) => {\n if (item.restrictions && Object.keys(item.restrictions).length) {\n let ok = true;\n\n const r = item.restrictions;\n\n if (r.price_min && r.price_max) {\n ok = total.value >= r.price_min && total.value <= r.price_max;\n item.restrictedForce = !ok;\n } else if (r.price_min) {\n ok = total.value >= r.price_min;\n item.restrictedForce = !ok;\n } else if (r.price_max) {\n ok = total.value <= r.price_max;\n item.restrictedForce = !ok;\n }\n\n if (ok && shipping.value) {\n if (r.shipping_type && r.shipping_type.length) {\n ok = r.shipping_type.indexOf(shipping.value) !== -1;\n }\n }\n\n if (ok && payment.value) {\n if (r.payment_method && r.payment_method.length) {\n ok = r.payment_method.indexOf(payment.value) !== -1;\n }\n }\n\n if (ok && r.categories && r.categories.length) {\n ok = !categoriesInCart.value.filter((value) => !r.categories.includes(value)).length;\n item.restrictedForce = !ok;\n }\n\n if (ok && r.code === 'user_type') {\n ok = r.value === loggedUser.value.user_type || r.value === user.value.user_type;\n item.restrictedForce = !ok;\n }\n\n item.restricted = !ok;\n } else {\n item.restricted = false;\n }\n\n if (!item.restrictedForce) {\n items.push(item);\n }\n });\n\n return items;\n };\n\n const discount = computed(() => {\n let sum = 0;\n\n items.value.forEach((item) => {\n let s = 0;\n\n if (item.attributes.priceOld) {\n s = item.attributes.priceOld - item.attributes.price;\n }\n\n sum += s * item.quantity;\n });\n\n return sum;\n });\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const loginCallback = () => {\n userType.value = 'new';\n };\n\n $http.post(window.location.href).then((response) => {\n shippingTypes.value = response.data.shipping;\n paymentMethods.value = response.data.payment;\n });\n\n watch(userType, (value) => {\n if (value == 'login') {\n store.commit('auth/modal', 'login');\n }\n });\n\n // let userSchemaFields = {\n // user_type: {\n // component: FormRadio,\n // model: 'user_type',\n // label: '',\n // list: [\n // { code: 'individual', value: __('auth.registration.form.user_type_individual') },\n // { code: 'legal', value: __('auth.registration.form.user_type_legal') }\n // ],\n // },\n // name: {\n // component: FormText,\n // label: __('auth.registration.form.name'),\n // model: 'first_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.name') : '',\n // },\n // last_name: {\n // component: FormText,\n // label: __('auth.registration.form.last_name'),\n // model: 'last_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.last_name') : '',\n // },\n // middle_name: {\n // component: FormText,\n // label: __('auth.registration.form.middle_name'),\n // model: 'middle_name',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.middle_name') : '',\n // },\n // phone: {\n // component: FormText,\n // label: __('auth.registration.form.phone'),\n // model: 'phone',\n // type: 'phone',\n // //placeholder: '(050) 123-45-67'\n // },\n // registration_number: {\n // component: FormText,\n // label: __('auth.registration.form.registration_number'),\n // model: 'registration_number',\n // condition: (model) => model.user_type === 'legal',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.registration_number') : '',\n // },\n // company_name: {\n // component: FormText,\n // label: __('auth.registration.form.company_name'),\n // model: 'company_name',\n // condition: (model) => model.user_type === 'legal',\n // placeholder: props.showPlaceholders ? __('auth.registration.form.company_name') : '',\n // },\n // email: {\n // component: FormText,\n // label: __('auth.login.form.email'),\n // model: 'email',\n // placeholder: props.showPlaceholders ? __('auth.login.form.email') : '',\n // },\n // };\n\n // if (props.isPhoneMasked) {\n // userSchemaFields.phone.mask = '(###) ###-##-##';\n // }\n\n // let userSchemaFieldsFiltered = Object.keys(userSchemaFields).reduce((obj, key) => {\n // if (props.userFields.includes(key)) {\n // obj[key] = userSchemaFields[key];\n // }\n\n // return obj;\n // }, {});\n\n // userSchemaFieldsFiltered = props.userFields.reduce((obj, key) => {\n // obj[key] = userSchemaFieldsFiltered[key];\n // return obj;\n // }, {});\n\n //const userSchema = ref(userSchemaFieldsFiltered);\n const userSchema = ref({});\n const userErrors = ref({});\n const userKey = ref(0);\n\n useSchemaForm(user);\n\n // const phoneRegExp = /^\\(\\d{3}\\) \\d{3}\\-\\d{2}\\-\\d{2}$/;\n // const userValidationFields = {\n // last_name: yup.string().trim().required(__('auth.validation.required')),\n // middle_name: yup.string().trim().required(__('auth.validation.required')),\n // name: yup.string().trim().required(__('auth.validation.required')),\n // phone: props.isPhoneMasked ? yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone')) : yup.string().required(__('auth.validation.phone')),\n // email: yup.string().trim().email(__('auth.validation.email')).required(__('auth.validation.required')),\n // registration_number: yup.string().when('user_type', (user_type) => {\n // if (user_type == 'legal') {\n // return yup.string().numberFilled();\n // }\n // }),\n // company_name: yup.string().when('user_type', (user_type) => {\n // if (user_type == 'legal') {\n // return yup.string().required(__('auth.validation.required'));\n // }\n // }),\n // };\n\n // const userValidationFieldsFiltered = Object.keys(userValidationFields).reduce((obj, key) => {\n // if (props.userFields.includes(key)) {\n // obj[key] = userValidationFields[key];\n // }\n\n // return obj;\n // }, {});\n\n //const userValidation = yup.object().shape(userValidationFieldsFiltered);\n const userValidation = ref({});\n\n const paymentValidations = ref({});\n\n provide('paymentValidations', paymentValidations);\n provide('paymentMethods', paymentMethods);\n\n window.addEventListener('beforeunload', () => {\n store.commit('auth/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit('auth/modal', null);\n });\n\n const validate = async () => {\n if (typeof shippingComponentValid.value == 'function') {\n const isShippingComponentFormsValid = await shippingComponentValid.value();\n\n if (userSubmitButton.value) {\n userSubmitButton.value.click();\n }\n\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (isUserValid) {\n ifCheckoutReady.value = isUserValid && payment.value && isUserConsent.value && shipping.value && (!shippingSelected.value.component || (shippingSelected.value.component && shippingComponentData.value[shippingSelected.value.code] && shippingComponentData.value[shippingSelected.value.code].isValid)) && isShippingComponentFormsValid;\n });\n } else {\n ifCheckoutReady.value = payment.value && isUserConsent.value && shipping.value && (!shippingSelected.value.component || (shippingSelected.value.component && shippingComponentData.value[shippingSelected.value.code] && shippingComponentData.value[shippingSelected.value.code].isValid)) && isShippingComponentFormsValid;\n }\n }\n };\n\n const shippingComponentValid = ref(null);\n provide('shippingComponentValid', shippingComponentValid);\n\n const shippingComponentUserData = ref({});\n provide('shippingComponentUserData', shippingComponentUserData);\n\n const initPaymentWidget = (payment, order) => {\n const wayforpay = new Wayforpay();\n\n window.addEventListener('message', (event) => {\n if (event.data == 'WfpWidgetEventClose' || event.data == 'WfpWidgetEventDeclined' || event.data == 'WfpWidgetEventPending') {\n\n }\n\n if (event.data == 'WfpWidgetEventApproved') {\n resetCheckoutForm(order);\n\n isPayed.value = true;\n\n store.dispatch('cart/clear', {\n finally: () => { }\n });\n }\n });\n\n wayforpay.run(payment);\n }\n\n const isPayed = ref(false);\n\n const resetCheckoutForm = (_order) => {\n thanks.value = true;\n order.value = _order;\n\n document.querySelector('html').classList.add('is-checkout-thanks');\n\n resertStore();\n }\n\n const checkout = async () => {\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (valid) {\n if (!valid) {\n userType.value = 'new';\n userSubmitButton.value.click();\n\n toast(__('shop.order.validate_user'), {\n type: 'error'\n });\n } else if (user.value.is_register) {\n store.dispatch('auth/register', {\n type: 'Full',\n credentials: user.value,\n finally: () => {\n },\n callback: (response) => {\n createOrder();\n },\n catch: (error) => {\n let incomingErrors = {};\n\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n incomingErrors[field] = messages[0];\n }\n }\n\n userKey.value++;\n }\n\n userErrors.value = incomingErrors;\n }\n });\n } else {\n createOrder();\n }\n });\n } else {\n createOrder();\n }\n };\n\n const createOrderWithoutValidate = (valid) => {\n let isShippingComponentFormsValid = typeof shippingComponentValid.value == 'function' ? shippingComponentValid.value() : null;\n\n let isPaymentValid = paymentValidations.value[paymentSelected.value.code] ? paymentValidations.value[paymentSelected.value.code]() : true;\n\n if (!isPaymentValid) {\n toast('Заповніть необхідні дані оплати', {\n type: 'error'\n });\n\n return;\n }\n\n if (shippingSelected.value && !shippingSelected.value.component) {\n isShippingComponentFormsValid = true;\n }\n\n if (total.value < $env.checkout.minimum_amount) {\n const component = {\n component: HtmlMessage,\n props: {\n message: __('shop.order.validate_minimum_amount', { amount: app.appContext.config.globalProperties.$filters.price($env.checkout.minimum_amount) }),\n },\n };\n\n toast(component, {\n type: 'error'\n });\n } else if (!valid) {\n userType.value = 'new';\n userSubmitButton.value.click();\n\n toast(__('shop.order.validate_user'), {\n type: 'error'\n });\n } else if (!shipping.value) {\n toast(__('shop.order.validate_shipping'), {\n type: 'error'\n });\n } else if (shippingSelected.value.component && (!shippingComponentData.value[shippingSelected.value.code] || !shippingComponentData.value[shippingSelected.value.code].isValid)) {\n toast(__('shop.order.validate_shipping1') + ': «' + shippingSelected.value.name + '»', {\n type: 'error'\n });\n } else if (!isShippingComponentFormsValid) {\n toast(__('shop.order.validate_shipping1') + ': «' + shippingSelected.value.name + '»', {\n type: 'error'\n });\n } else if (!payment.value) {\n toast(__('shop.order.validate_payment'), {\n type: 'error'\n });\n } else if (!isUserConsent.value) {\n toast(__('shop.order.validate_consent'), {\n type: 'error'\n });\n } else {\n let clientId;\n let data = shippingComponentData.value[shippingSelected.value.code] ? JSON.parse(JSON.stringify(shippingComponentData.value[shippingSelected.value.code])) : {};\n\n delete data.isValid;\n\n setTimeout(() => {\n const shippingUserData = JSON.parse(JSON.stringify(shippingComponentUserData.value));\n\n if (document.cookie) {\n const cookies = document.cookie.split(';');\n\n cookies.forEach((cookie) => {\n const parts = cookie.split('=');\n\n if (parts[0].trim() === '_ga') {\n clientId = parts[1].split('.')[2] + '.' + parts[1].split('.')[3];\n }\n });\n }\n\n const userValue = auth.value ? loggedUser.value : user.value;\n const paymentMethodData = paymentMethods.value.find((item) => item.id == payment.value);\n const model = {\n checkout: true,\n user: {\n last_name: userValue.last_name,\n middle_name: userValue.middle_name,\n name: userValue.name,\n phone: userValue.phone,\n email: userValue.email,\n user_type: userValue.user_type,\n registration_number: userValue.registration_number,\n password: userValue.is_register ? userValue.password : null,\n company_name: userValue.company_name,\n district: userValue.district,\n region: userValue.region,\n is_register: userValue.is_register,\n },\n shipping: {\n id: shipping.value,\n data: data,\n user: shippingUserData,\n },\n payment: {\n id: payment.value,\n price: paymentMethodData?.amount.toFixed(2) || 0,\n },\n comment: comment.value,\n dontcall: dontcall.value,\n promoCode: promoCode.value,\n loyalty: loyaltyUse.value,\n clientId: clientId\n };\n\n loading.value = true;\n\n $http\n .post(window.location.href, model)\n .then((response) => {\n if (response.data && response.data.error && response.data.message) {\n toast(response.data.message, {\n type: 'error',\n });\n\n return;\n }\n\n let products = [];\n\n items.value.forEach((item) => {\n let product = {\n item_name: item.name,\n item_id: item.attributes.code,\n price: item.price,\n quantity: item.quantity\n };\n\n if (item.attributes.brand) {\n product.item_brand = item.attributes.brand;\n }\n\n if (item.attributes.property) {\n product.item_variant = item.attributes.property;\n }\n\n if (item.attributes.categoryFull) {\n if (item.attributes.categoryFull.indexOf('/') !== -1) {\n item.attributes.categoryFull.split('/').forEach((segment, index) => {\n product['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n product.item_category = item.attributes.categoryFull;\n }\n }\n\n if (item.attributes.index) {\n product.index = item.attributes.index;\n }\n\n if (item.attributes.itemListName) {\n product.item_list_name = item.attributes.itemListName;\n }\n\n products.push(product);\n });\n\n\n let object = {\n payment_type: paymentSelected.value.name,\n shipping_tier: shippingSelected.value.name,\n ecommerce: {\n transaction_id: response.data.order.id,\n affiliation: 'main',\n value: parseFloat(total.value),\n shipping: 0,\n currency: 'UAH',\n items: products\n },\n event: 'purchase',\n };\n\n if (user.value.user_type) {\n object.user_type = __('auth.registration.form.user_type_' + user.value.user_type);\n }\n\n if (promoCode.value) {\n object.ecommerce.coupon = promoCode.value;\n }\n\n if (props.isTrackAfterSuccessOnlinePurchase && (response.data.redirect || (response.data.payment_widget_data && window.Wayforpay))) {\n localStorage.setItem('ecommerce', JSON.stringify(object));\n } else {\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n\n if (response.data.redirect && response.data.redirect.redirect_url) {\n setTimeout(() => {\n window.location.href = response.data.redirect.redirect_url;\n }, 400);\n }\n\n if (response.data.redirect && response.data.redirect.url && response.data.redirect.data) {\n redirect.value = {\n url: response.data.redirect.url,\n data: response.data.redirect.data\n };\n\n nextTick(() => {\n setTimeout(() => {\n redirectForm.value.submit();\n }, 400);\n });\n }\n\n if (response.data.payment_widget_data && window.Wayforpay) {\n initPaymentWidget(JSON.parse(response.data.payment_widget_data), response.data.order);\n } else {\n resetCheckoutForm(response.data.order);\n }\n })\n .catch((e) => {\n toast(__('shop.order.error'), {\n type: 'error'\n });\n\n console.error(e);\n })\n .finally(() => {\n loading.value = false;\n });\n }, 100);\n }\n }\n\n const createOrder = () => {\n if (!auth.value) {\n userValidation.value.isValid(user.value).then(function (valid) {\n createOrderWithoutValidate(valid);\n });\n } else {\n createOrderWithoutValidate(true);\n }\n }\n\n const toggleShippingRadio = (id) => {\n if (shipping.value === id) {\n shipping.value = null;\n }\n };\n\n const togglePaymentRadio = (id) => {\n if (payment.value === id) {\n payment.value = null;\n }\n };\n\n const resertStore = () => {\n // debug\n store.commit('checkout/reset');\n store.commit('cart/clear');\n };\n\n const shippingStoreData = (code, data, isValid) => {\n let d = JSON.parse(JSON.stringify(shippingComponentData.value));\n\n data.isValid = isValid;\n d[code] = data;\n\n store.commit('checkout/shippingData', d);\n };\n\n const home = () => {\n window.location.href = $env.locale.url ? $env.locale.url : '/';\n };\n\n onMounted(() => {\n if (!quantity.value && props.redirectOnEmpty) {\n window.location.href = props.redirectOnEmpty;\n }\n\n let products = [];\n\n items.value.forEach((item) => {\n let product = {\n item_name: item.name,\n item_id: item.attributes.code,\n price: parseFloat(item.attributes.price),\n quantity: item.quantity\n };\n\n if (item.attributes.brand) {\n product.item_brand = item.attributes.brand;\n }\n\n if (item.attributes.property) {\n product.item_variant = item.attributes.property;\n }\n\n if (item.attributes.categoryFull) {\n if (item.attributes.categoryFull.indexOf('/') !== -1) {\n item.attributes.categoryFull.split('/').forEach((segment, index) => {\n product['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n product.item_category = item.attributes.categoryFull;\n }\n }\n\n if (item.attributes.index) {\n product.index = item.attributes.index;\n }\n\n if (item.attributes.itemListName) {\n product.item_list_name = item.attributes.itemListName;\n }\n\n products.push(product);\n });\n\n if (products.length) {\n const object = {\n ecommerce: {\n currency: 'UAH',\n items: products,\n value: parseFloat(total.value),\n },\n event: 'begin_checkout'\n };\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n\n const phoneFormatted = (phone) => {\n return phone.replace(/(\\d{3})(\\d{3})(\\d{2})(\\d{2})/, '($1) $2-$3-$4');\n }\n\n const isComponentExists = (name) => {\n return typeof resolveDynamicComponent(name) !== 'string';\n }\n\n return {\n auth,\n userType,\n facebook,\n google,\n loginCallback,\n quantity,\n items,\n loading,\n pluralize,\n discount,\n total,\n shipping,\n shippingPrice,\n payment,\n fee,\n userValidation,\n userSchema,\n userSubmitButton,\n checkout,\n ifCheckoutReady,\n validate,\n shippingTypesRestricted,\n paymentMethodsRestricted,\n toggleShippingRadio,\n togglePaymentRadio,\n shippingSelected,\n paymentSelected,\n shippingComponentData,\n shippingStoreData,\n resertStore,\n user,\n dontcall,\n comment,\n isCommentToggled,\n commentMaxLength,\n userCheckout,\n thanks,\n order,\n redirect,\n redirectForm,\n home,\n isPromoCodeToggled,\n applyPromoCode,\n promoCode,\n isPromoLoading,\n promoCodeApplied,\n resetPromoCode,\n calculateWithPromoCodeDiscount,\n consent,\n shippingComponent,\n slots,\n isPayed,\n loyalty,\n loyaltyUse,\n loyaltyUseApplied,\n resetLoyaltyUse,\n applyLoyaltyUse,\n readableUserLoyaltyPoints,\n userErrors,\n userKey,\n loggedUser,\n phoneFormatted,\n readableTotalInPoints,\n isUseLoyaltyPoints,\n isComponentExists,\n };\n }\n});\n</script>"],"names":["script$1","defineComponent","name","props","item","Object","setup","options","computed","attributes","length","itemOptions","filter","option","value","indexOf","id","class","_hoisted_2","_hoisted_3","_hoisted_4","_createElementVNode","createElementVNode","xlink:href","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_14","_hoisted_16","_hoisted_17","_hoisted_20","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_32","_hoisted_39","_hoisted_41","_hoisted_44","_hoisted_51","_hoisted_53","then","direct","resolve","_empty","f","i","arguments","apply","this","args","Promise","reject","e","_createElementBlock","createElementBlock","is-bundle","_ctx","bundle","_openBlock","_hoisted_1","_toDisplayString","__","mb-0","href","no-thumb","image","src","_hoisted_7","_hoisted_9","code","_hoisted_13","quantity","parseInt","openBlock","_hoisted_18","innerHTML","price","_createTextVNode","createTextVNode","bundle-price","priceOld","$filters","amount","percent","sum","_hoisted_24","_Fragment","Fragment","_renderList","index","key","_hoisted_31","_hoisted_33","second","_normalizeClass","_hoisted_36","_hoisted_38","_hoisted_40","toDisplayString","_hoisted_42","third","_hoisted_43","_hoisted_45","_hoisted_48","_hoisted_50","_hoisted_52","_hoisted_54","yup","addMethod","string","min","msg","test","exclusive","message","params","isNaN","markRaw","FormText","FormRadio","SchemaForm","SchemaFormFactory","VeeValidatePlugin","HtmlMessage","template","window","viewedSwiperOptions","slidesPerView","freeMode","slideClass","mousewheel","forceToAxis","navigation","nextEl","prevEl","observer","observeParents","script","components","CheckoutItem","isLogin","type","Boolean","default","isPhoneMasked","isPromoCode","isConsent","isPaymentMethodOverSummary","userFields","Array","redirectOnEmpty","String","showPlaceholders","isTrackAfterSuccessOnlinePurchase","slots","useSlots","toast","useToast","store","useStore","loading","ref","getters","items","total","auth","userCheckout","loggedUser","ifCheckoutReady","redirectForm","thanks","order","consent","shippingComponent","redirect","shippingTypes","paymentMethods","userType","userSubmitButton","shippingComponentData","isCommentToggled","isPromoCodeToggled","promoCode","promoCodeApplied","isPromoLoading","app","getCurrentInstance","loyalty","points","reduce","acc","array","pluralize","loyaltyUse","isUseLoyaltyPoints","watch","loyaltyUseApplied","readableTotalInPoints","numberFormat","readableUserLoyaltyPoints","loyalty_points","isUserConsent","dontcall","get","set","commit","comment","substring","provide","defaultValue","data","JSON","parse","stringify","user","api","registerForm","response","form","formParse","userSchema","schema","model","userValidation","validation","dispatch","finally","shipping","payment","shippingSelected","find","paymentSelected","shippingPrice","calculatePrice","fee","shippingTypesRestricted","restrictCheck","paymentMethodsRestricted","categoriesInCart","categories","forEach","category_id","push","Math","round","elements","restrictions","keys","ok","r","price_min","price_max","restrictedForce","shipping_type","payment_method","includes","user_type","restricted","discount","s","$http","post","location","userErrors","userKey","useSchemaForm","paymentValidations","addEventListener","validate","_async","body","result","_invokeIgnored","shippingComponentValid","_await","isShippingComponentFormsValid","click","component","isValid","isUserValid","shippingComponentUserData","isPayed","resetCheckoutForm","_order","document","querySelector","classList","add","resertStore","checkout","createOrder","valid","is_register","credentials","callback","catch","error","incomingErrors","errors","_i","_Object$entries","entries","_Object$entries$_i","_slicedToArray","field","messages","createOrderWithoutValidate","$env","minimum_amount","appContext","config","globalProperties","clientId","setTimeout","shippingUserData","cookie","split","parts","trim","userValue","paymentMethodData","last_name","middle_name","phone","email","registration_number","password","company_name","district","region","toFixed","products","product","item_name","item_id","brand","item_brand","property","item_variant","categoryFull","segment","item_category","itemListName","item_list_name","object","payment_type","shipping_tier","ecommerce","transaction_id","affiliation","parseFloat","currency","event","coupon","payment_widget_data","Wayforpay","localStorage","setItem","debug","console","log","dataLayer","redirect_url","url","nextTick","submit","wayforpay","run","initPaymentWidget","onMounted","facebook","$ziggy","provider","google","loginCallback","toggleShippingRadio","togglePaymentRadio","shippingStoreData","d","commentMaxLength","home","locale","applyPromoCode","promoCodeApply","number","resetPromoCode","calculateWithPromoCodeDiscount","max","resetLoyaltyUse","applyLoyaltyUse","phoneFormatted","replace","isComponentExists","resolveDynamicComponent","_hoisted_5","_hoisted_6","_hoisted_8","_hoisted_30","_hoisted_47","_hoisted_49","_hoisted_57","_hoisted_61","_hoisted_62","_hoisted_63","_hoisted_64","_hoisted_65","_hoisted_66","_hoisted_68","_hoisted_71","_hoisted_72","_hoisted_74","_hoisted_75","_hoisted_76","_hoisted_77","_hoisted_78","_hoisted_80","_hoisted_84","_hoisted_85","_hoisted_86","_hoisted_87","_hoisted_88","_hoisted_90","_hoisted_93","_hoisted_94","_hoisted_97","_hoisted_98","_hoisted_102","_hoisted_104","_hoisted_105","_hoisted_107","_hoisted_108","_hoisted_109","_hoisted_111","_hoisted_113","_hoisted_114","_hoisted_116","viewBox","fill","xmlns","_hoisted_118","_hoisted_121","_hoisted_124","_hoisted_125","for","_hoisted_130","_hoisted_133","_hoisted_134","_hoisted_136","_hoisted_138","_hoisted_140","_hoisted_141","_hoisted_145","_hoisted_146","_hoisted_150","_hoisted_151","_hoisted_152","_hoisted_155","_hoisted_156","action","style","position","left","top","method","renderList","_renderSlot","$slots","_createCommentVNode","createCommentVNode","textContent","_createBlock","createBlock","_component_checkout_item","_createVNode","createVNode","_component_cart_trigger","_withCtx","onClick","open","_hoisted_15","renderSlot","_hoisted_19","$event","_hoisted_21","_hoisted_22","_hoisted_23","region_name","district_name","_component_SchemaForm","schemaRowClasses","validation-schema","initial-errors","preventModelCleanupOnSchemaChange","afterForm","_component_login","login-callback","nextDates","_hoisted_46","is-disabled","icon","_hoisted_55","description","_hoisted_56","price_label","_hoisted_58","_hoisted_60","normalizeClass","_hoisted_70","_hoisted_73","_hoisted_82","_resolveDynamicComponent","_hoisted_83","_hoisted_92","_hoisted_96","_hoisted_100","_hoisted_101","_hoisted_103","inactive","_hoisted_112","_hoisted_115","_hoisted_117","disabled","red","_hoisted_120","_cache","_hoisted_123","placeholder","_hoisted_127","is-loading","_hoisted_128","is-open","_hoisted_129","_hoisted_131","_hoisted_132","filters","_hoisted_135","_hoisted_137","_hoisted_139","_hoisted_144","_hoisted_149","_hoisted_154","_hoisted_157","_hoisted_158","_hoisted_159"],"mappings":"suDA0FA,IAAeA,EAAcC,kBAAgB,CACzCC,KAAM,eACNC,MAAO,CACHC,KAAMC,QAEVC,MAAAA,SAAMH,GACF,IAAMI,EAAUC,EAAAA,UAAS,WAAA,OAAOL,EAAMC,KAAKK,WAAWF,SAAWJ,EAAMC,KAAKK,WAAWF,QAAQG,OAASP,EAAMC,KAAKK,WAAWF,QAAU,MAGxI,MAAO,CACHI,YAHgBH,EAAAA,UAAS,WAAA,OAAOL,EAAMC,KAAKG,SAAWJ,EAAMC,KAAKG,QAAQG,OAASP,EAAMC,KAAKG,QAAQK,QAAO,SAACC,GAAM,OAA2C,IAAtCN,EAAQO,MAAMC,QAAQF,EAAOG,OAAc,mBC/FlKC,MAAM,gBACFC,EAAA,CAAAD,MAAM,gBAEVE,EAAA,CAAAF,MAAM,eAEEG,EAAA,CAAAH,MAAM,sDAIaI,EAA0BC,mBAAA,MAAA,CAArBC,aAAW,mBAInCC,EAAA,CAAAP,MAAM,UACFQ,EAAA,CAAAR,MAAM,2BACFS,EAAA,CAAAT,MAAM,mBACFA,MAAM,QACNU,EAAA,CAAAV,MAAM,oBAIVW,EAAA,CAAAX,MAAM,6CACFY,EAAA,CAAAZ,MAAM,qBACNA,MAAM,kCAEVa,EAAA,CAAAb,MAAM,uFAQVA,MAAM,sBACFc,EAAA,CAAAd,MAAM,WAGNe,EAAA,CAAAf,MAAM,WAEEgB,EAAA,CAAAhB,MAAM,UACFiB,EAAA,C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