@perevorot/shop 2.0.159 → 2.0.160
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/components/shop/cart/CartAdd.js +1 -1
- package/dist/components/shop/cart/CartAdd.js.map +1 -1
- package/dist/components/shop/cart/CartItem.js +1 -1
- package/dist/components/shop/cart/CartItem.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/viewed/Viewer.js +1 -1
- package/dist/components/shop/viewed/Viewer.js.map +1 -1
- package/dist/components/shop/wishlist/WishlistAdd.js +1 -1
- package/dist/components/shop/wishlist/WishlistAdd.js.map +1 -1
- package/package.json +2 -2
|
@@ -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=ae0a8c2a&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\" 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\" 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\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> <span 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\" />{{ __('shop.order.auth_new') }}</label>\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"login\" />{{ __('shop.order.auth_old') }}</label>\n </div>\n <div class=\"columns\">\n <div class=\"column user-form\" v-show=\"userType == 'new'\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"userSchema\" :validation-schema=\"userValidation\" :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-show=\"userType == 'login'\" v-if=\"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\" v-bind:class=\"{ 'is-active': shipping }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in shippingTypesRestricted\" v-bind:key=\"item.id\" 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\" @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 }}</div>\n </div>\n <div class=\"value\">\n <span class=\"green\" v-if=\"!item.amount && item.price_label\">{{ item.price_label }}</span>\n <span v-else 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\"></component>\n </div>\n </div>\n </div>\n <slot name=\"shipping-footer\" :shippingTypesRestricted=\"shippingTypesRestricted\" :shipping=\"shipping\" :shippingStoreData=\"shippingStoreData\" :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\" v-bind:class=\"{ 'is-active': payment }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\" 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\" @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}</div>\n </div>\n <div class=\"value\" v-if=\"item.amount\">\n <span 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\" v-bind:class=\"{ 'is-active': payment }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\" 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\" @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}</div>\n </div>\n <div class=\"value\" v-if=\"item.amount\">\n <span v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"divider is-hidden\"></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 v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> {{ __('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 <slot name=\"fee\"></slot>\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\" v-else-if=\"shippingSelected && shippingSelected.price_label\">{{ 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\">{{ promoCode }}</span></div>\n <div class=\"value\">\n <span 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 <slot name=\"loyalty\" :loyalty=\"loyalty\"></slot>\n <div class=\"user-loyalty\" v-if=\"userCheckout.loyalty_points > 0\">\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 > userCheckout.loyalty_points\">Використати</button>\n <button v-else class=\"button is-reset\" @click=\"resetLoyaltyUse\">Відмінити</button>\n </div>\n </div>\n <div class=\"checkbox-wrapper nocall\">\n <label> <input type=\"checkbox\" class=\"checkbox\" v-model=\"dontcall\" />{{ __('shop.order.nocall') }}</label>\n </div>\n <button class=\"button submit\" @click=\"checkout\" v-bind:class=\"{ red: !ifCheckoutReady, 'is-loading': loading }\">{{ __('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 }\" 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\" :disabled=\"promoCodeApplied\" id=\"promo-code-applied\">\n <label class=\"label\" for=\"promo-code-applied\">{{ __('shop.order.promo.placeholder') }}</label>\n </div>\n <button v-if=\"!promoCodeApplied\" class=\"button\" @click=\"applyPromoCode\" :disabled=\"!promoCode\" v-bind:class=\"{ 'is-loading': isPromoLoading }\">{{ __('shop.order.promo.apply') }}</button>\n <button v-else class=\"button\" @click=\"resetPromoCode\">{{ __('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 }}</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\" :auth=\"auth\" :filters=\"$filters\">\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()\">{{ __('shop.order.pay_online_go') }}</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 />{{ __('shop.cart.no_search') }}\n </div>\n <a class=\"button continue\" :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.continue') }}</a>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, markRaw, defineComponent, watch, getCurrentInstance, nextTick, provide, useSlots, onMounted } 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';\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 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 loyaltyUseApplied = ref(false);\n const resetLoyaltyUse = () => {\n loyaltyUse.value = 0;\n loyaltyUseApplied.value = false;\n };\n const applyLoyaltyUse = () => {\n if (loyaltyUse.value) {\n loyaltyUseApplied.value = true;\n }\n };\n\n const readableUserLoyaltyPoints = computed(() => {\n return numberFormat(userCheckout.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\n provide('user', user);\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 === 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\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\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 userValidation.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 }\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 watch(() => user, (value) => {\n if (value && value.value.phone) {\n const phone = value.value.phone;\n\n if (phone && phone.match(/^(\\+38|38)/)) {\n user.value.phone = phone.replace(/^(\\+38|38)/, '');\n }\n }\n }, {\n deep: true\n });\n\n const checkout = async () => {\n let isShippingComponentFormsValid = typeof shippingComponentValid.value == 'function' ? shippingComponentValid.value() : null;\n\n if (shippingSelected.value && !shippingSelected.value.component) {\n isShippingComponentFormsValid = true;\n }\n\n userValidation.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 (!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 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 model = {\n checkout: true,\n user: {\n last_name: user.value.last_name,\n middle_name: user.value.middle_name,\n name: user.value.name,\n phone: user.value.phone,\n email: user.value.email,\n user_type: user.value.user_type,\n registration_number: user.value.registration_number,\n company_name: user.value.company_name,\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 }\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 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 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 };\n }\n});\n</script>","<template>\n <div class=\"cart checkout\">\n <form ref=\"redirectForm\" v-if=\"redirect.url\" :action=\"redirect.url\" 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\" 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\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> <span 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\" />{{ __('shop.order.auth_new') }}</label>\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"login\" />{{ __('shop.order.auth_old') }}</label>\n </div>\n <div class=\"columns\">\n <div class=\"column user-form\" v-show=\"userType == 'new'\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"userSchema\" :validation-schema=\"userValidation\" :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-show=\"userType == 'login'\" v-if=\"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\" v-bind:class=\"{ 'is-active': shipping }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in shippingTypesRestricted\" v-bind:key=\"item.id\" 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\" @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 }}</div>\n </div>\n <div class=\"value\">\n <span class=\"green\" v-if=\"!item.amount && item.price_label\">{{ item.price_label }}</span>\n <span v-else 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\"></component>\n </div>\n </div>\n </div>\n <slot name=\"shipping-footer\" :shippingTypesRestricted=\"shippingTypesRestricted\" :shipping=\"shipping\" :shippingStoreData=\"shippingStoreData\" :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\" v-bind:class=\"{ 'is-active': payment }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\" 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\" @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}</div>\n </div>\n <div class=\"value\" v-if=\"item.amount\">\n <span 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\" v-bind:class=\"{ 'is-active': payment }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\" 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\" @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}</div>\n </div>\n <div class=\"value\" v-if=\"item.amount\">\n <span v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"divider is-hidden\"></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 v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> {{ __('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 <slot name=\"fee\"></slot>\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\" v-else-if=\"shippingSelected && shippingSelected.price_label\">{{ 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\">{{ promoCode }}</span></div>\n <div class=\"value\">\n <span 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 <slot name=\"loyalty\" :loyalty=\"loyalty\"></slot>\n <div class=\"user-loyalty\" v-if=\"userCheckout.loyalty_points > 0\">\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 > userCheckout.loyalty_points\">Використати</button>\n <button v-else class=\"button is-reset\" @click=\"resetLoyaltyUse\">Відмінити</button>\n </div>\n </div>\n <div class=\"checkbox-wrapper nocall\">\n <label> <input type=\"checkbox\" class=\"checkbox\" v-model=\"dontcall\" />{{ __('shop.order.nocall') }}</label>\n </div>\n <button class=\"button submit\" @click=\"checkout\" v-bind:class=\"{ red: !ifCheckoutReady, 'is-loading': loading }\">{{ __('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 }\" 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\" :disabled=\"promoCodeApplied\" id=\"promo-code-applied\">\n <label class=\"label\" for=\"promo-code-applied\">{{ __('shop.order.promo.placeholder') }}</label>\n </div>\n <button v-if=\"!promoCodeApplied\" class=\"button\" @click=\"applyPromoCode\" :disabled=\"!promoCode\" v-bind:class=\"{ 'is-loading': isPromoLoading }\">{{ __('shop.order.promo.apply') }}</button>\n <button v-else class=\"button\" @click=\"resetPromoCode\">{{ __('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 }}</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\" :auth=\"auth\" :filters=\"$filters\">\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()\">{{ __('shop.order.pay_online_go') }}</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 />{{ __('shop.cart.no_search') }}\n </div>\n <a class=\"button continue\" :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.continue') }}</a>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, markRaw, defineComponent, watch, getCurrentInstance, nextTick, provide, useSlots, onMounted } 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';\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 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 loyaltyUseApplied = ref(false);\n const resetLoyaltyUse = () => {\n loyaltyUse.value = 0;\n loyaltyUseApplied.value = false;\n };\n const applyLoyaltyUse = () => {\n if (loyaltyUse.value) {\n loyaltyUseApplied.value = true;\n }\n };\n\n const readableUserLoyaltyPoints = computed(() => {\n return numberFormat(userCheckout.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\n provide('user', user);\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 === 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\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\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 userValidation.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 }\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 watch(() => user, (value) => {\n if (value && value.value.phone) {\n const phone = value.value.phone;\n\n if (phone && phone.match(/^(\\+38|38)/)) {\n user.value.phone = phone.replace(/^(\\+38|38)/, '');\n }\n }\n }, {\n deep: true\n });\n\n const checkout = async () => {\n let isShippingComponentFormsValid = typeof shippingComponentValid.value == 'function' ? shippingComponentValid.value() : null;\n\n if (shippingSelected.value && !shippingSelected.value.component) {\n isShippingComponentFormsValid = true;\n }\n\n userValidation.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 (!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 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 model = {\n checkout: true,\n user: {\n last_name: user.value.last_name,\n middle_name: user.value.middle_name,\n name: user.value.name,\n phone: user.value.phone,\n email: user.value.email,\n user_type: user.value.user_type,\n registration_number: user.value.registration_number,\n company_name: user.value.company_name,\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 }\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 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 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 };\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","Promise","resolve","f","args","i","arguments","apply","this","e","reject","_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","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","loyaltyUseApplied","readableUserLoyaltyPoints","numberFormat","loyalty_points","isUserConsent","dontcall","get","set","commit","comment","watch","substring","field","defaultValue","data","JSON","parse","stringify","provide","user","last_name","middle_name","email","phone","registration_number","company_name","user_type","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","restricted","discount","s","$http","post","location","response","userSchemaFields","component","model","label","list","placeholder","condition","mask","userSchemaFieldsFiltered","obj","userSchema","useSchemaForm","userValidationFields","trim","required","matches","when","numberFilled","userValidationFieldsFiltered","userValidation","object","shape","addEventListener","validate","_async","result","body","_empty","_invokeIgnored","shippingComponentValid","_await","isShippingComponentFormsValid","click","isValid","isUserValid","shippingComponentUserData","isPayed","resetCheckoutForm","_order","document","querySelector","classList","add","resertStore","match","replace","deep","checkout","valid","clientId","shippingUserData","cookie","split","parts","error","products","product","item_name","item_id","brand","item_brand","property","item_variant","categoryFull","segment","item_category","itemListName","item_list_name","payment_type","shipping_tier","ecommerce","transaction_id","affiliation","parseFloat","currency","event","coupon","payment_widget_data","Wayforpay","localStorage","setItem","$env","debug","console","log","dataLayer","url","nextTick","setTimeout","submit","wayforpay","run","initPaymentWidget","onMounted","facebook","$ziggy","provider","google","loginCallback","toggleShippingRadio","togglePaymentRadio","shippingStoreData","d","commentMaxLength","home","locale","applyPromoCode","promoCodeApply","number","appContext","config","globalProperties","resetPromoCode","calculateWithPromoCodeDiscount","max","resetLoyaltyUse","applyLoyaltyUse","_hoisted_5","_hoisted_6","_hoisted_8","_hoisted_21","_hoisted_35","_hoisted_37","_hoisted_46","_hoisted_58","_hoisted_59","_hoisted_60","_hoisted_61","_hoisted_62","_hoisted_63","_hoisted_65","_hoisted_70","_hoisted_71","_hoisted_73","_hoisted_74","_hoisted_75","_hoisted_76","_hoisted_77","_hoisted_79","_hoisted_85","_hoisted_86","_hoisted_87","_hoisted_88","_hoisted_89","_hoisted_91","_hoisted_94","_hoisted_95","_hoisted_98","_hoisted_99","_hoisted_102","_hoisted_103","_hoisted_107","_hoisted_109","_hoisted_110","_hoisted_112","_hoisted_113","_hoisted_114","_hoisted_117","_hoisted_118","_hoisted_119","_hoisted_122","_hoisted_124","_hoisted_127","_hoisted_128","for","_hoisted_133","_hoisted_136","_hoisted_137","_hoisted_139","_hoisted_141","_hoisted_143","_hoisted_144","_hoisted_148","_hoisted_149","_hoisted_153","_hoisted_154","_hoisted_155","_hoisted_158","_hoisted_159","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","_withDirectives","_component_SchemaForm","schemaRowClasses","schema","validation-schema","preventModelCleanupOnSchemaChange","afterForm","_hoisted_22","_hoisted_23","_component_login","login-callback","nextDates","is-disabled","icon","_hoisted_49","description","price_label","shippingFooter","_hoisted_56","_resolveDynamicComponent","resolveDynamicComponent","_hoisted_57","normalizeClass","_hoisted_67","_hoisted_68","_hoisted_72","_hoisted_81","_hoisted_82","_hoisted_84","_hoisted_93","_hoisted_97","_hoisted_101","_hoisted_105","_hoisted_106","_hoisted_108","_hoisted_116","disabled","_hoisted_121","red","_hoisted_123","is-open","_cache","_hoisted_126","_hoisted_130","is-loading","_hoisted_131","_hoisted_132","_hoisted_134","_hoisted_135","filters","_hoisted_138","_hoisted_140","_hoisted_142","_hoisted_147","_hoisted_152","_hoisted_157","_hoisted_160","_hoisted_161","_hoisted_162"],"mappings":"gsBA0FeA,EAAcC,kBAAgB,CACzCC,KAAM,eACNC,MAAO,CACHC,KAAMC,QAEVC,MAAK,SAACH,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,CAAAjB,MAAM,gBAEVkB,EAAA,CAAAlB,MAAM,uDAM1BA,MAAM,kBACFmB,EAAA,CAAAnB,MAAM,sBACPI,EAA+DC,mBAAA,MAAA,CAA1DL,MAAM,eAAa,CAACI,EAAi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mBAOK,MAPL+c,GAOK,CANDhf,EAAyDC,mBAAA,MAAzD2Z,GAAyDpX,EAAAA,gBAAnCJ,EAAEK,GAAA,0BAAA,GACxBzC,qBAIK,MAJL6Z,GAIK,CAHD7Z,EAAAA,mBAEK,MAFL8Z,GAEK,CADD9Z,EAAmDC,mBAAA,OAAA,CAA7CsD,UAAQnB,EAAKkH,MAACW,UAAWrK,MAAM,sEAQhDwC,EAAe8F,iDAAhC5F,EAAAA,YAAAL,qBAOK,MAPLgd,GAOK,CANDjf,EAAmDC,mBAAA,MAAnD8Z,GAAmDvX,EAAAsC,gBAA7B1C,EAAEK,GAAA,oBAAA,GACxBzC,EAAAC,mBAGK,MAHL+Z,GAGK,CAFEvW,EAAAA,gBAAAjB,EAAAsC,gBAAA1C,EAAAK,yBAAyB,IAC5B,GAAAzC,EAAoFC,mBAAA,IAAA,CAAhF0C,KAAMP,EAAI2R,KAACwB,OAAOnB,IAAMhS,EAAI2R,KAACwB,OAAOnB,IAAI,uBAAUhS,EAAEK,GAAA,sBAAA,EAAAyc,sBAA4B,MAAEC,uCAAS/c,EAAEK,GAAA,wBAAA,KAErGzC,EAA4GC,mBAAA,IAAA,CAAzGL,MAAM,kBAAmB+C,KAAMP,EAAI2R,KAACwB,OAAOnB,IAAMhS,EAAI2R,KAACwB,OAAOnB,2BAAchS,EAAEK,GAAA,uBAAA,EAAA2c"}
|
|
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=866caa7e&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\" 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\" 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\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> <span 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\" />{{ __('shop.order.auth_new') }}</label>\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"login\" />{{ __('shop.order.auth_old') }}</label>\n </div>\n <div class=\"columns\">\n <div class=\"column user-form\" v-show=\"userType == 'new'\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"userSchema\" :validation-schema=\"userValidation\" :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-show=\"userType == 'login'\" v-if=\"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\" v-bind:class=\"{ 'is-active': shipping }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in shippingTypesRestricted\" v-bind:key=\"item.id\" 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\" @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 }}</div>\n </div>\n <div class=\"value\">\n <span class=\"green\" v-if=\"!item.amount && item.price_label\">{{ item.price_label }}</span>\n <span v-else 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\"></component>\n </div>\n </div>\n </div>\n <slot name=\"shipping-footer\" :shippingTypesRestricted=\"shippingTypesRestricted\" :shipping=\"shipping\" :shippingStoreData=\"shippingStoreData\" :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\" v-bind:class=\"{ 'is-active': payment }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\" 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\" @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}</div>\n </div>\n <div class=\"value\" v-if=\"item.amount\">\n <span 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\" v-bind:class=\"{ 'is-active': payment }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\" 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\" @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}</div>\n </div>\n <div class=\"value\" v-if=\"item.amount\">\n <span v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"divider is-hidden\"></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 v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> {{ __('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 <slot name=\"fee\"></slot>\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\" v-else-if=\"shippingSelected && shippingSelected.price_label\">{{ 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\">{{ promoCode }}</span></div>\n <div class=\"value\">\n <span 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 <slot name=\"loyalty\" :loyalty=\"loyalty\"></slot>\n <div class=\"user-loyalty\" v-if=\"userCheckout.loyalty_points > 0\">\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 > userCheckout.loyalty_points\">Використати</button>\n <button v-else class=\"button is-reset\" @click=\"resetLoyaltyUse\">Відмінити</button>\n </div>\n </div>\n <div class=\"checkbox-wrapper nocall\">\n <label> <input type=\"checkbox\" class=\"checkbox\" v-model=\"dontcall\" />{{ __('shop.order.nocall') }}</label>\n </div>\n <button class=\"button submit\" @click=\"checkout\" v-bind:class=\"{ red: !ifCheckoutReady, 'is-loading': loading }\">{{ __('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 }\" 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\" :disabled=\"promoCodeApplied\" id=\"promo-code-applied\">\n <label class=\"label\" for=\"promo-code-applied\">{{ __('shop.order.promo.placeholder') }}</label>\n </div>\n <button v-if=\"!promoCodeApplied\" class=\"button\" @click=\"applyPromoCode\" :disabled=\"!promoCode\" v-bind:class=\"{ 'is-loading': isPromoLoading }\">{{ __('shop.order.promo.apply') }}</button>\n <button v-else class=\"button\" @click=\"resetPromoCode\">{{ __('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 }}</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\" :auth=\"auth\" :filters=\"$filters\">\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()\">{{ __('shop.order.pay_online_go') }}</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 />{{ __('shop.cart.no_search') }}\n </div>\n <a class=\"button continue\" :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.continue') }}</a>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, markRaw, defineComponent, watch, getCurrentInstance, nextTick, provide, useSlots, onMounted } 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';\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 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 loyaltyUseApplied = ref(false);\n const resetLoyaltyUse = () => {\n loyaltyUse.value = 0;\n loyaltyUseApplied.value = false;\n };\n const applyLoyaltyUse = () => {\n if (loyaltyUse.value) {\n loyaltyUseApplied.value = true;\n }\n };\n\n const readableUserLoyaltyPoints = computed(() => {\n return numberFormat(userCheckout.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\n provide('user', user);\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 === 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\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\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 userValidation.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 }\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 watch(() => user, (value) => {\n if (value && value.value.phone) {\n const phone = value.value.phone;\n\n if (phone && phone.match(/^(\\+38|38)/)) {\n user.value.phone = phone.replace(/^(\\+38|38)/, '');\n }\n }\n }, {\n deep: true\n });\n\n const checkout = async () => {\n let isShippingComponentFormsValid = typeof shippingComponentValid.value == 'function' ? shippingComponentValid.value() : null;\n\n if (shippingSelected.value && !shippingSelected.value.component) {\n isShippingComponentFormsValid = true;\n }\n\n userValidation.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 (!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 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 model = {\n checkout: true,\n user: {\n last_name: user.value.last_name,\n middle_name: user.value.middle_name,\n name: user.value.name,\n phone: user.value.phone,\n email: user.value.email,\n user_type: user.value.user_type,\n registration_number: user.value.registration_number,\n company_name: user.value.company_name,\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: $env.locale?.currency ? $env.locale.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 }\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 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: $env.locale?.currency ? $env.locale.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 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 };\n }\n});\n</script>","<template>\n <div class=\"cart checkout\">\n <form ref=\"redirectForm\" v-if=\"redirect.url\" :action=\"redirect.url\" 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\" 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\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> <span 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\" />{{ __('shop.order.auth_new') }}</label>\n <label> <input type=\"radio\" class=\"radio\" v-model=\"userType\" value=\"login\" />{{ __('shop.order.auth_old') }}</label>\n </div>\n <div class=\"columns\">\n <div class=\"column user-form\" v-show=\"userType == 'new'\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"userSchema\" :validation-schema=\"userValidation\" :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-show=\"userType == 'login'\" v-if=\"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\" v-bind:class=\"{ 'is-active': shipping }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in shippingTypesRestricted\" v-bind:key=\"item.id\" 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\" @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 }}</div>\n </div>\n <div class=\"value\">\n <span class=\"green\" v-if=\"!item.amount && item.price_label\">{{ item.price_label }}</span>\n <span v-else 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\"></component>\n </div>\n </div>\n </div>\n <slot name=\"shipping-footer\" :shippingTypesRestricted=\"shippingTypesRestricted\" :shipping=\"shipping\" :shippingStoreData=\"shippingStoreData\" :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\" v-bind:class=\"{ 'is-active': payment }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\" 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\" @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}</div>\n </div>\n <div class=\"value\" v-if=\"item.amount\">\n <span 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\" v-bind:class=\"{ 'is-active': payment }\">{{ __('shop.order.reset') }}</a>\n </div>\n </div>\n </div>\n <div class=\"item\" v-for=\"item in paymentMethodsRestricted\" v-bind:key=\"item.id\" 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\" @click=\"togglePaymentRadio(item.id)\" />\n <span>{{ item.name }}</span>\n </label>\n <div class=\"description\" v-if=\"item.description\">{{ item.description }}</div>\n </div>\n <div class=\"value\" v-if=\"item.amount\">\n <span v-html=\"item.type == 'percent' ? item.amount + '%' : $filters.price(item.amount)\"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"divider is-hidden\"></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 v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span> {{ __('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 <slot name=\"fee\"></slot>\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\" v-else-if=\"shippingSelected && shippingSelected.price_label\">{{ 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\">{{ promoCode }}</span></div>\n <div class=\"value\">\n <span 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 <slot name=\"loyalty\" :loyalty=\"loyalty\"></slot>\n <div class=\"user-loyalty\" v-if=\"userCheckout.loyalty_points > 0\">\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 > userCheckout.loyalty_points\">Використати</button>\n <button v-else class=\"button is-reset\" @click=\"resetLoyaltyUse\">Відмінити</button>\n </div>\n </div>\n <div class=\"checkbox-wrapper nocall\">\n <label> <input type=\"checkbox\" class=\"checkbox\" v-model=\"dontcall\" />{{ __('shop.order.nocall') }}</label>\n </div>\n <button class=\"button submit\" @click=\"checkout\" v-bind:class=\"{ red: !ifCheckoutReady, 'is-loading': loading }\">{{ __('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 }\" 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\" :disabled=\"promoCodeApplied\" id=\"promo-code-applied\">\n <label class=\"label\" for=\"promo-code-applied\">{{ __('shop.order.promo.placeholder') }}</label>\n </div>\n <button v-if=\"!promoCodeApplied\" class=\"button\" @click=\"applyPromoCode\" :disabled=\"!promoCode\" v-bind:class=\"{ 'is-loading': isPromoLoading }\">{{ __('shop.order.promo.apply') }}</button>\n <button v-else class=\"button\" @click=\"resetPromoCode\">{{ __('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 }}</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\" :auth=\"auth\" :filters=\"$filters\">\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()\">{{ __('shop.order.pay_online_go') }}</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 />{{ __('shop.cart.no_search') }}\n </div>\n <a class=\"button continue\" :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.continue') }}</a>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, markRaw, defineComponent, watch, getCurrentInstance, nextTick, provide, useSlots, onMounted } 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';\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 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 loyaltyUseApplied = ref(false);\n const resetLoyaltyUse = () => {\n loyaltyUse.value = 0;\n loyaltyUseApplied.value = false;\n };\n const applyLoyaltyUse = () => {\n if (loyaltyUse.value) {\n loyaltyUseApplied.value = true;\n }\n };\n\n const readableUserLoyaltyPoints = computed(() => {\n return numberFormat(userCheckout.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\n provide('user', user);\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 === 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\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\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 userValidation.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 }\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 watch(() => user, (value) => {\n if (value && value.value.phone) {\n const phone = value.value.phone;\n\n if (phone && phone.match(/^(\\+38|38)/)) {\n user.value.phone = phone.replace(/^(\\+38|38)/, '');\n }\n }\n }, {\n deep: true\n });\n\n const checkout = async () => {\n let isShippingComponentFormsValid = typeof shippingComponentValid.value == 'function' ? shippingComponentValid.value() : null;\n\n if (shippingSelected.value && !shippingSelected.value.component) {\n isShippingComponentFormsValid = true;\n }\n\n userValidation.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 (!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 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 model = {\n checkout: true,\n user: {\n last_name: user.value.last_name,\n middle_name: user.value.middle_name,\n name: user.value.name,\n phone: user.value.phone,\n email: user.value.email,\n user_type: user.value.user_type,\n registration_number: user.value.registration_number,\n company_name: user.value.company_name,\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: $env.locale?.currency ? $env.locale.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 }\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 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: $env.locale?.currency ? $env.locale.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 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 };\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","Promise","resolve","f","args","i","arguments","apply","this","e","reject","_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","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","loyaltyUseApplied","readableUserLoyaltyPoints","numberFormat","loyalty_points","isUserConsent","dontcall","get","set","commit","comment","watch","substring","field","defaultValue","data","JSON","parse","stringify","provide","user","last_name","middle_name","email","phone","registration_number","company_name","user_type","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","restricted","discount","s","$http","post","location","response","userSchemaFields","component","model","label","list","placeholder","condition","mask","userSchemaFieldsFiltered","obj","userSchema","useSchemaForm","userValidationFields","trim","required","matches","when","numberFilled","userValidationFieldsFiltered","userValidation","object","shape","addEventListener","validate","_async","result","body","_empty","_invokeIgnored","shippingComponentValid","_await","isShippingComponentFormsValid","click","isValid","isUserValid","shippingComponentUserData","isPayed","resetCheckoutForm","_order","document","querySelector","classList","add","resertStore","match","replace","deep","checkout","valid","clientId","shippingUserData","cookie","split","parts","_$env$locale","error","products","product","item_name","item_id","brand","item_brand","property","item_variant","categoryFull","segment","item_category","itemListName","item_list_name","payment_type","shipping_tier","ecommerce","transaction_id","affiliation","parseFloat","currency","$env","locale","event","coupon","payment_widget_data","Wayforpay","localStorage","setItem","debug","console","log","dataLayer","url","nextTick","setTimeout","submit","wayforpay","run","initPaymentWidget","onMounted","_$env$locale2","facebook","$ziggy","provider","google","loginCallback","toggleShippingRadio","togglePaymentRadio","shippingStoreData","d","commentMaxLength","home","applyPromoCode","promoCodeApply","number","appContext","config","globalProperties","resetPromoCode","calculateWithPromoCodeDiscount","max","resetLoyaltyUse","applyLoyaltyUse","_hoisted_5","_hoisted_6","_hoisted_8","_hoisted_21","_hoisted_35","_hoisted_37","_hoisted_46","_hoisted_58","_hoisted_59","_hoisted_60","_hoisted_61","_hoisted_62","_hoisted_63","_hoisted_65","_hoisted_70","_hoisted_71","_hoisted_73","_hoisted_74","_hoisted_75","_hoisted_76","_hoisted_77","_hoisted_79","_hoisted_85","_hoisted_86","_hoisted_87","_hoisted_88","_hoisted_89","_hoisted_91","_hoisted_94","_hoisted_95","_hoisted_98","_hoisted_99","_hoisted_102","_hoisted_103","_hoisted_107","_hoisted_109","_hoisted_110","_hoisted_112","_hoisted_113","_hoisted_114","_hoisted_117","_hoisted_118","_hoisted_119","_hoisted_122","_hoisted_124","_hoisted_127","_hoisted_128","for","_hoisted_133","_hoisted_136","_hoisted_137","_hoisted_139","_hoisted_141","_hoisted_143","_hoisted_144","_hoisted_148","_hoisted_149","_hoisted_153","_hoisted_154","_hoisted_155","_hoisted_158","_hoisted_159","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","_withDirectives","_component_SchemaForm","schemaRowClasses","schema","validation-schema","preventModelCleanupOnSchemaChange","afterForm","_hoisted_22","_hoisted_23","_component_login","login-callback","nextDates","is-disabled","icon","_hoisted_49","description","price_label","shippingFooter","_hoisted_56","_resolveDynamicComponent","resolveDynamicComponent","_hoisted_57","normalizeClass","_hoisted_67","_hoisted_68","_hoisted_72","_hoisted_81","_hoisted_82","_hoisted_84","_hoisted_93","_hoisted_97","_hoisted_101","_hoisted_105","_hoisted_106","_hoisted_108","_hoisted_116","disabled","_hoisted_121","red","_hoisted_123","is-open","_cache","_hoisted_126","_hoisted_130","is-loading","_hoisted_131","_hoisted_132","_hoisted_134","_hoisted_135","filters","_hoisted_138","_hoisted_140","_hoisted_142","_hoisted_147","_hoisted_152","_hoisted_157","_hoisted_160","_hoisted_161","_hoisted_162"],"mappings":"gsBA0FeA,EAAcC,kBAAgB,CACzCC,KAAM,eACNC,MAAO,CACHC,KAAMC,QAEVC,MAAK,SAACH,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,CA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