"use strict";(self.webpackChunkgulp_template=self.webpackChunkgulp_template||[]).push([[9503,6531],{5615:function(t,e,n){var i=n(5158),o=n(1136),s=n(6531),c=n(1641),r=n(3723),l=n(8342),a=n(270),d=n(2048),u=n(50),p=n(7343),f=n(4636),h=n(4228),m=n(9399),v=n(5914);function y(t){const e=t.slides[t.realIndex],n=e.querySelector(".js-slide-link"),i=document.querySelector(".js-slide-article");i&&(e.dataset.article?(i.innerText=e.dataset.article,i.setAttribute("href",n.getAttribute("href")),i.parentElement.style.display="inline"):i.parentElement.style.display="none")}var g=n(9865);function _(t,e,n,i,o,s,c){try{var r=t[s](c),l=r.value}catch(t){return void n(t)}r.done?e(l):Promise.resolve(l).then(i,o)}function w(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function c(t){_(s,i,o,c,r,"next",t)}function r(t){_(s,i,o,c,r,"throw",t)}c(void 0)}))}}window.addEventListener("DOMContentLoaded",(function(){function t(t){const e=[];window.dataLayer=window.dataLayer||[],t.forEach((t=>{if(function(t){const e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth;return e.bottom>0&&e.right>0&&e.top{t(document.querySelectorAll('.js-catalog-products-grid [data-ecom="0"]'))})),(0,m.C)(),(0,c.A)(u.A),(0,r.A)(u.A),(0,o.r)(),(0,s.default)({loop:!0,checkInView:!0,slidesPerView:"auto",watchSlidesProgress:!0,preloadImages:!1,lazy:{enabled:!0,loadPrevNext:!0},spaceBetween:20,navigation:{nextEl:".collections-slider__button-next",prevEl:".collections-slider__button-prev"},breakpoints:{996:{slidesPerView:4,loop:!1}}},"js-products-slider"),function(){const t=document.querySelector(".js-show-more-products");t&&(t.dispatchEvent(new Event("click")),t.addEventListener("click",w((function*(){const e=document.querySelector(".js-catalog-products-grid"),n=e.dataset.firstPage||2;t.style.display="none",(0,d.A)("show-global");try{const i=yield(0,a.A)(n);if("success"===i.status&&(i.data.page&&(e.dataset.firstPage=i.data.page,t.style.display="inline-block"),e)){e.insertAdjacentHTML("beforeend",i.data.products);const t=e.querySelectorAll(".js-product"),n=i.data.products.match(/data-id="\d*"/)[0].match(/\d/g).join(""),o=Array.from(t).findIndex((t=>Number(t.dataset.id)===Number(n)));-1!==o&&(0,f.F)(Array.from(t).slice(o))}}catch(t){console.log(t)}finally{(0,d.A)("show-global")}}))))}(),t(document.querySelectorAll('.js-catalog-products-grid [data-ecom="0"]')),(0,g.A)()}))},4965:function(t,e,n){function i(){const t=document.querySelectorAll(".js-accordion:not(.init)");t.length&&t.forEach((t=>{const e=t.querySelector(".js-accordion-content"),n=t.querySelector(".js-accordion-button");n&&e&&(t.classList.add("init"),n.addEventListener("click",(function(){t.classList.toggle("show"),t.classList.contains("show")?e.style.maxHeight=`${e.scrollHeight}px`:e.style.maxHeight=0})))}))}n.d(e,{A:function(){return i}})},3218:function(t,e,n){function i(){const t=document.body,e=window.innerWidth-t.clientWidth;if(t.style.transition="margin-right 0.3s easy-in-out",t.style.marginRight=`${e}px`,t.style.overflow="hidden",!window.matchMedia("(min-width: 996px)").matches){const e=window.pageYOffset;t.style.top=-e+"px",t.style.position="fixed",t.style.width="100%"}}function o(){const t=document.body;if(t.style.transition="margin-right 0s easy-in-out",t.style.marginRight="0",t.style.overflow="unset",!window.matchMedia("(min-width: 996px)").matches){const e=Math.abs(parseInt(t.style.top||0,10));t.style.position="static",t.style.width="auto",t.style.removeProperty("top"),window.scrollTo(0,e||0)}}n.d(e,{$:function(){return i},W:function(){return o}})},1641:function(t,e,n){n.d(e,{A:function(){return l},u:function(){return a}});var i=n(9743);function o(t,e,n,i,o,s,c){try{var r=t[s](c),l=r.value}catch(t){return void n(t)}r.done?e(l):Promise.resolve(l).then(i,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(i,s){var c=t.apply(e,n);function r(t){o(c,i,s,r,l,"next",t)}function l(t){o(c,i,s,r,l,"throw",t)}r(void 0)}))}}function c(t){return r.apply(this,arguments)}function r(){return r=s((function*(t){const e=document.querySelectorAll(".js-filters-container");if(e.length){const n={};localStorage.removeItem("filter"),e.forEach((t=>{const e=t.querySelectorAll(".js-dropdown");t.dataset.type&&(n.type=t.dataset.type),t.dataset.sectionId&&(n.sectionId=t.dataset.sectionId),e.length&&e.forEach((t=>{"brand"===t.getAttribute("data-property")&&t.querySelector(".js-dropdown-all").click();const e=t.querySelectorAll(".js-checkbox"),n=t.querySelector(".js-dropdown-label");n&&(n.innerText=n.dataset.placeholder),e.length&&e.forEach((t=>{t.checked=!1}))}))})),localStorage.setItem("filter",JSON.stringify(n)),yield t(),window.showMore=!0}})),r.apply(this,arguments)}function l(t){const e=document.querySelectorAll(".js-filters-container"),n=document.querySelectorAll(".js-clear-filters");if(localStorage.removeItem("filter"),n.length&&n.forEach((e=>{e.addEventListener("click",(function(){c(t)}))})),e.length){const i={};function o(){let t=!0;if(Object.keys(i).length)for(const e in i)if(Array.isArray(i[e])&&i[e].length){t=!1;break}const e=new URLSearchParams(window.location.search);(e.has("min_price")||e.has("max_price"))&&(t=!1),n.forEach((e=>{t?e.hasAttribute("disabled")||e.setAttribute("disabled",!0):e.hasAttribute("disabled")&&e.removeAttribute("disabled")}))}function r(t,e){i[e]?function(t){for(let n=0;n{t.checked&&r(t,e)}))}function a(t,e,n){let i=0;e.forEach((t=>{t.checked&&"all"!==t.value&&(0===i&&(n.innerText=""),i++,i>1&&(n.innerText+=", "),n.innerText+=t.dataset.label)})),i>0&&!t.classList.contains("selected")&&t.classList.add("selected"),0===i&&t.classList.contains("selected")&&t.classList.remove("selected")}e.forEach((e=>{const n=e.querySelectorAll(".js-dropdown"),c=e.querySelector(".js-show-more-products");let d=null;e.dataset.type&&(i.type=e.dataset.type),e.dataset.sectionId&&(i.sectionId=e.dataset.sectionId),localStorage.setItem("filter",JSON.stringify(i)),n.length&&n.forEach((e=>{const n=e.querySelectorAll(".js-checkbox"),u=e.querySelector(".js-dropdown-label"),p=e.dataset.property?e.dataset.property:"";if(n.length){const f=Array.from(n).find((t=>"all"===t.value));n.forEach((l=>{l.dispatchEvent(new Event("change")),l.addEventListener("change",(function(){if(this.classList.contains("js-checkbox-all"))this.checked?n.forEach((t=>{t.checked||t.closest("label").classList.contains("checkbox__disabled")||(t.checked=!0,r(t,p))})):(n.forEach((t=>{t.checked&&(t.checked=!1)})),i[p].splice(0,i[p].length),u.innerText=u.getAttribute("data-placeholder"));else if(this.checked)r(l,p);else{const t=i[p].findIndex((t=>t===this.value));(0===t||f&&f.checked)&&(f&&(f.checked=!1),i[p][1]||(u.innerText=u.getAttribute("data-placeholder"))),i[p].splice(t,1)}a(e,n,u),o(),localStorage.setItem("filter",JSON.stringify(i)),e.closest(".js-dialog-filters")||(d&&clearTimeout(d),d=setTimeout(s((function*(){yield t(),window.showMore||(window.showMore=!0,c&&(button.style.display="inline-block"))})),600))}))})),a(e,n,u),l(n,p),o()}}))}))}}function a(t,e){const n=document.querySelector(".js-tags"),o=document.querySelector(".js-tags-scroll");var r;n&&(n.addEventListener("click",(r=s((function*(n){const i=n.target.closest(".js-tags-remove"),o=n.target.closest(".js-tags-item"),s=n.target.closest(".js-tags-clear");if(i&&o){const n=JSON.parse(localStorage.getItem("filter")),s=i.dataset.type,c=i.dataset.value;if(n[s]&&"max_price"!==s&&"min_price"!==s&&(n[s]=n[s].filter((t=>t!==c)),localStorage.setItem("filter",JSON.stringify(n)),yield t()),("max_price"===s||"min_price"===s)&&e){const t=new URL(window.location.href),n=document.querySelector(".js-filters-container .min-price"),i=document.querySelector(".js-filters-container .max-price");t.searchParams.delete(s);const o=t.searchParams.toString(),c=o?`${t.pathname}?${o}${t.hash}`:`${t.pathname}${t.hash}`;history.replaceState(null,"",c),e(["min_price"===s?n.dataset.min:t.searchParams.get("min_price"),"max_price"===s?i.dataset.max:t.searchParams.get("max_price")])}o.remove()}else s&&c(t)})),function(t){return r.apply(this,arguments)})),o&&new i.A(o,{autoHide:!1}))}},2585:function(t,e,n){n.r(e),n.d(e,{default:function(){return o}});var i=n(3218);function o(t,e=null,n=[]){const o=document.querySelector(".js-navigation");t&&(o.classList.contains("navigation__fixed--white")||o.classList.add("navigation__fixed--white"),t.on("show",(()=>{(0,i.$)(),e&&e(...n)})),t.on("hide",(()=>{(0,i.W)(),t.destroy()})),t.show())}},3723:function(t,e,n){n.d(e,{A:function(){return r}});var i=n(7083),o=n(2585);function s(t,e,n,i,o,s,c){try{var r=t[s](c),l=r.value}catch(t){return void n(t)}r.done?e(l):Promise.resolve(l).then(i,o)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var c=t.apply(e,n);function r(t){s(c,i,o,r,l,"next",t)}function l(t){s(c,i,o,r,l,"throw",t)}r(void 0)}))}}function r(t){const e=document.querySelector(".js-dialog-filters");if(!e)return;const n=document.querySelectorAll(".js-dialog-filters-button"),s=e.querySelector(".js-submit-filters"),r=document.querySelector(".js-show-more-products");s.addEventListener("click",c((function*(){yield t(),window.showMore||(window.showMore=!0,r&&(button.style.display="inline-block"))}))),n.forEach((t=>{t.addEventListener("click",(function(){if(e){const t=new i.default(e);(0,o.default)(t)}}))}))}},7343:function(t,e,n){function i(t){const e=document.querySelector(".js-grid-two"),n=document.querySelector(".js-grid-auto");if(n&&e){const i=document.querySelector(".js-catalog-grid");e.addEventListener("click",(function(){this.classList.contains("catalog-page-actions__grid-button--active")||(this.classList.add("catalog-page-actions__grid-button--active"),i.classList.add(`${t}--two-columns`),this.nextElementSibling.classList.remove("catalog-page-actions__grid-button--active"))})),n.addEventListener("click",(function(){this.classList.contains("catalog-page-actions__grid-button--active")||(this.classList.add("catalog-page-actions__grid-button--active"),i.classList.remove(`${t}--two-columns`),this.previousElementSibling.classList.remove("catalog-page-actions__grid-button--active"))}))}}n.d(e,{A:function(){return i}})},4636:function(t,e,n){n.d(e,{F:function(){return g}});var i=n(600);function o(t,e,n,i,o,s,c){try{var r=t[s](c),l=r.value}catch(t){return void n(t)}r.done?e(l):Promise.resolve(l).then(i,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(i,s){var c=t.apply(e,n);function r(t){o(c,i,s,r,l,"next",t)}function l(t){o(c,i,s,r,l,"throw",t)}r(void 0)}))}}const c="active",r=document.querySelectorAll(".js-favorites-button-count"),l=document.querySelectorAll(".js-compare-button-count"),a=document.querySelectorAll(".js-basket-button-count");function d(t,e){return u.apply(this,arguments)}function u(){return u=s((function*(t,e,n=!1){var o;if((null===(o=window.APP)||void 0===o?void 0:o.FAVORITES)&&window.APP.FAVORITES.includes(Number(e))&&t.classList.add(c),!n)try{const n=yield(0,i.A)({ACTION:"add2favorites",ITEM_ID:e});if("OK"===n.STATUS){if(y(t,r,n.EVENT),v(r),"REMOVE"===n.EVENT){const t=window.APP.FAVORITES.indexOf(+e);-1!==t&&window.APP.FAVORITES.splice(t,1)}else window.APP.FAVORITES.push(+e);"REMOVE"===n.EVENT&&"/favorites/"===window.location.pathname&&(t.closest(".js-product-card").remove(),0===document.querySelectorAll(".js-product-card").length&&(document.querySelector(".js-wrap-favorites").innerHTML="",document.querySelector(".js-empty-info").classList.remove("hidden")))}}catch(t){console.log(t)}})),u.apply(this,arguments)}function p(t,e){return f.apply(this,arguments)}function f(){return f=s((function*(t,e,n=!1,o=1){var s;if((null===(s=window.APP)||void 0===s?void 0:s.BASKET)&&Object.keys(window.APP.BASKET).includes(String(e))&&(t.innerText=t.dataset.incart,t.classList.add("js-added-to-cart")),!n&&t.classList.contains("js-added-to-cart"))window.location.href="/cart/";else if(!n)try{"OK"===(yield(0,i.A)({ACTION:"add2basket",ITEM_ID:e,QUANTITY:o})).STATUS&&(a.forEach((t=>{const e=t.innerText;Number(e)>98?t.innerText="99":t.innerText=Number(e)+1})),t.innerText=t.dataset.incart,t.classList.add("js-added-to-cart"),window.APP.BASKET[e]={PRODUCT_ID:Number(e),QUANTITY:o},t.classList.contains("js-reload-page")&&location.reload())}catch(t){console.log(t)}})),f.apply(this,arguments)}function h(t,e){return m.apply(this,arguments)}function m(){return m=s((function*(t,e,n=!1){var o;if((null===(o=window.APP)||void 0===o?void 0:o.COMPARE)&&window.APP.COMPARE.includes(Number(e))&&t.classList.add(c),!n)try{const n=yield(0,i.A)({ACTION:"add2compare",ITEM_ID:e});if("OK"===n.STATUS)if(y(t,l,n.EVENT),v(l),"REMOVE"===n.EVENT){const t=window.APP.COMPARE.indexOf(+e);-1!==t&&window.APP.COMPARE.splice(t,1)}else window.APP.COMPARE.push(+e)}catch(t){console.log(t)}})),m.apply(this,arguments)}function v(t){t.forEach((t=>{const e=t.innerText.includes("+")?t.innerText.split("+")[0]:t.innerText;Number(e)<=0?t.classList.add("hidden"):t.classList.remove("hidden")}))}function y(t,e,n){t.classList.toggle(c),"REMOVE"===n?e.forEach((t=>{const e=t.innerText.includes("+")?t.innerText.split("+")[0]:t.innerText;t.innerText=Number(e)-1})):e.forEach((t=>{const e=t.innerText.includes("+")?t.innerText.split("+")[0]:t.innerText;t.innerText=Number(e)+1}))}function g(t){t.length&&window.APP&&(t.forEach((t=>{const e=t.querySelectorAll(".js-add-to-cart"),n=t.querySelectorAll(".js-add-to-cart-obrazec"),o=t.querySelectorAll(".js-add-to-cart-catalog"),c=t.querySelectorAll(".js-add-to-favorite"),r=t.querySelectorAll(".js-add-to-compare"),l=t.querySelectorAll(".js-one-click-buy"),a=Number(t.dataset.id);e.length&&e.forEach((t=>{p(t,a,!0),t.addEventListener("click",(function(){const e=this.closest(".js-actions-container"),n=null==e?void 0:e.querySelector(".js-count-picker-input"),i=n?Number(n.value):1;p(this,t.dataset.id||a,!1,i)}))})),c.length&&c.forEach((t=>{d(t,a,!0),t.addEventListener("click",(function(e){e.stopPropagation(),d(this,t.dataset.id||a)}))})),r.length&&r.forEach((t=>{h(t,a,!0),t.addEventListener("click",(function(e){e.stopPropagation(),h(this,t.dataset.id||a)}))})),n.length&&n.forEach((t=>{const e=t.dataset.id;if(p(t,e,!0),window.APP.BASKET&&window.APP.BASKET[e]){const n=t.closest(".js-actions-container"),i=null==n?void 0:n.querySelector(".js-obrazec-checkbox");i&&(i.checked=!!window.APP.BASKET[e].NO_CUT)}t.addEventListener("click",s((function*(){const n=this.closest(".js-actions-container"),o=window.matchMedia("(min-width: 996px)").matches?t.previousElementSibling.querySelector(".js-count-picker-input"):n.querySelector(".js-count-picker-input"),s=Number(o.value);yield p(this,e,!1,s);try{yield(0,i.A)({ACTION:"setDntCut",ITEM_ID:e})}catch(t){console.log(t)}})))})),o.length&&o.forEach((t=>{const e=t.dataset.id;p(t,e,!0),t.addEventListener("click",s((function*(){p(this,e)})))})),l.length&&l.forEach((t=>{t.addEventListener("click",s((function*(){const e=document.querySelector(".js-count-picker-input"),n=e?Number(e.value):1,i=t.dataset.id||a;yield p(this,i,!1,n),window.location.replace("/order/")})))}))})),v(l),v(r))}},9399:function(t,e,n){function i(){const t=Number(localStorage.getItem("lastScrollPosition")),e="y"===localStorage.getItem("scrollToLastPosition");t&&e&&(window.scrollTo({top:t,behavior:"smooth"}),localStorage.setItem("scrollToLastPosition","n"),localStorage.setItem("lastScrollPosition",0))}n.d(e,{C:function(){return i}})},4228:function(t,e,n){function i(){const t=document.querySelector(".js-navigation"),e=document.querySelector(".wrapper"),n=document.querySelector(".js-header-actions");let i=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-top")),o=window.scrollY;function s(){0===i&&(i=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-top"))),o>100&&!n.classList.contains("fixed")&&(e.style.paddingTop=`${i+n.clientHeight}px`,n.classList.add("fixed")),o<=100&&n.classList.contains("fixed")&&(e.style.paddingTop=`${i}px`,n.classList.remove("fixed"))}e&&t&&n&&(n.style.top=t.clientHeight-2+"px",s(),window.addEventListener("scroll",(function(){n.style.top=t.clientHeight-2+"px",o=window.scrollY,s()}),{passive:!0}))}n.d(e,{g:function(){return i}})},2048:function(t,e,n){n.d(e,{A:function(){return o}});var i=n(3218);function o(t,e=!0){const n=document.querySelector(".js-loader");n&&(e?n.classList.add("loader-fixed"):n.classList.remove("loader-fixed"),n.classList.toggle(t),n.classList.contains("loader-fixed")&&(n.classList.contains("show-global")?(0,i.$)():(0,i.W)()))}},8342:function(t,e,n){function i(){const t=document.querySelectorAll(".js-read-more-container");if(t.length){const e=document.querySelectorAll(".js-language-radio");let n="RU";if(0!==e.length){const t=Array.from(e).find((t=>t.checked));n=t.value}t.forEach((t=>{const e=t.querySelector(".js-read-more"),i=t.querySelector(".js-read-more-block");i&&e&&e.addEventListener("click",(function(){i.classList.toggle("open"),i.classList.contains("open")?(this.innerText="RU"===n?"Скрыть":"Hide",i.style.maxHeight=`${i.scrollHeight}px`):(this.innerText="RU"===n?"Читать далее":"Read more",i.style.maxHeight="310px")}))}))}}n.d(e,{A:function(){return i}})},50:function(t,e,n){n.d(e,{A:function(){return s}});var i=n(2048);function o(t,e,n,i,o,s,c){try{var r=t[s](c),l=r.value}catch(t){return void n(t)}r.done?e(l):Promise.resolve(l).then(i,o)}function s(){return c.apply(this,arguments)}function c(){return t=function*(){(0,i.A)("show-global");try{const t=localStorage.getItem("filter"),e=t?JSON.parse(t):{},n=window.collectionsList.params,i=yield BX.ajax.runComponentAction("citfact:collections.list","getUrl",{mode:"class",data:{filter:e,signedParameters:n}});"success"===i.status?(localStorage.setItem("lastScrollPosition",window.scrollY),localStorage.setItem("scrollToLastPosition","y"),window.location=window.location.origin+i.data.url):console.log(i.data)}catch(t){console.log(t)}finally{(0,i.A)("show-global")}},c=function(){var e=this,n=arguments;return new Promise((function(i,s){var c=t.apply(e,n);function r(t){o(c,i,s,r,l,"next",t)}function l(t){o(c,i,s,r,l,"throw",t)}r(void 0)}))},c.apply(this,arguments);var t}},270:function(t,e,n){function i(t,e,n,i,o,s,c){try{var r=t[s](c),l=r.value}catch(t){return void n(t)}r.done?e(l):Promise.resolve(l).then(i,o)}function o(t){return s.apply(this,arguments)}function s(){return t=function*(t){const e=document.querySelector(".js-filters-on-page"),n=localStorage.getItem("filter"),i=n?JSON.parse(n):{},o=window.collectionsList.params;var s;i.type||(i.type=(null==e||null===(s=e.dataset)||void 0===s?void 0:s.type)?e.dataset.type:"false",localStorage.setItem("filter",JSON.stringify(i)));try{return yield BX.ajax.runComponentAction("citfact:collections.list","loadPage",{mode:"class",data:{page:t,signedParameters:o}})}catch(t){return console.log(t),!1}},s=function(){var e=this,n=arguments;return new Promise((function(o,s){var c=t.apply(e,n);function r(t){i(c,o,s,r,l,"next",t)}function l(t){i(c,o,s,r,l,"throw",t)}r(void 0)}))},s.apply(this,arguments);var t}n.d(e,{A:function(){return o}})},600:function(t,e,n){function i(t,e,n,i,o,s,c){try{var r=t[s](c),l=r.value}catch(t){return void n(t)}r.done?e(l):Promise.resolve(l).then(i,o)}function o(t){return s.apply(this,arguments)}function s(){return t=function*(t){const e=new FormData;for(let n in t)e.append(n,t[n]);e.append("IS_AJAX_ACTION","Y");try{const t=yield fetch("/",{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},body:e});return yield t.json()}catch(t){return console.log("error",t),!1}},s=function(){var e=this,n=arguments;return new Promise((function(o,s){var c=t.apply(e,n);function r(t){i(c,o,s,r,l,"next",t)}function l(t){i(c,o,s,r,l,"throw",t)}r(void 0)}))},s.apply(this,arguments);var t}n.d(e,{A:function(){return o}})},6531:function(t,e,n){n.r(e),n.d(e,{default:function(){return c}});var i=n(5914);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){for(var e=1;e{window.matchMedia("(min-width: 996px)").matches?n.classList.contains(`${e}--mobile`)||new i.Ay(n,s({modules:[i.Vx,i.dK,i.dF],navigation:{nextEl:".slider-button-next",prevEl:".slider-button-prev"},on:{init(t){t.isLocked&&(t.navigation&&t.navigation.nextEl&&t.navigation.prevEl&&(t.navigation.nextEl.style.display="none",t.navigation.prevEl.style.display="none"),t.pagination&&t.pagination.el&&(t.pagination.el.style.display="none")),t.slides&&t.slides.forEach(((t,e)=>{t.setAttribute("data-slide-index",e)}))}}},t)):n.classList.contains(`${e}--desktop`)||new i.Ay(n,s({modules:[i.Vx,i.dK,i.dF],navigation:{nextEl:".slider-button-next",prevEl:".slider-button-prev"},on:{init(t){t.slides&&t.slides.forEach(((t,e)=>{t.setAttribute("data-slide-index",e)}))}}},t))}))}},5158:function(t,e,n){n.d(e,{A:function(){return s}});var i=n(5914);function o(t){const e=t.slides[t.realIndex],n=e.querySelector(".js-slide-link"),i=document.querySelector(".js-slide-article");i&&(e.dataset.article?(i.innerText=e.dataset.article,i.setAttribute("href",n.getAttribute("href")),i.parentElement.style.display="inline"):i.parentElement.style.display="none")}function s(){new i.Ay(".js-interior-ideas-slider",{modules:[i.Vx,i.dK,i.dF],slidesPerView:1,preloadImages:!1,lazy:{enabled:!0,loadPrevNext:!0},navigation:{nextEl:".interior-ideas-slider__button-next",prevEl:".interior-ideas-slider__button-prev"},pagination:{el:".swiper-pagination",type:"fraction"},on:{init:function(t){if(!window.matchMedia("(min-width: 996px)").matches){const e=t.slides.map((t=>t.querySelector(".interior-ideas-slider__slide-wrapper")));e.forEach((t=>{t.scrollLeft=(t.scrollWidth-t.clientWidth)/2}))}o(t)},slideChange:function(t){o(t)}}})}},9865:function(t,e,n){n.d(e,{A:function(){return l}});var i=n(4965),o=n(600),s=n(3218);function c(t,e,n,i,o,s,c){try{var r=t[s](c),l=r.value}catch(t){return void n(t)}r.done?e(l):Promise.resolve(l).then(i,o)}function r(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function r(t){c(s,i,o,r,l,"next",t)}function l(t){c(s,i,o,r,l,"throw",t)}r(void 0)}))}}function l(){const t=document.querySelectorAll(".js-split-price");t.length&&(document.querySelector('[data-modal="container"]')||document.body.insertAdjacentHTML("beforeend",'\n\n'),(0,i.A)(),t.forEach(function(){var t=r((function*(t){if(document.querySelector("[data-sum-discount-all-products]")){let t=document.querySelector("[data-sum-discount-all-products]").getAttribute("data-sum-discount-all-products");const e=yield(0,o.A)({ACTION:"getHalvaPlanHtml",PRICE:t});let n=document.querySelector(".split-price__cost"),i=document.querySelector(".js-split-price"),s=i?i.querySelector(".card-split-cost"):void 0;"success"===e.STATUS?(s&&s.remove(),n.innerHTML="Разбить на части без переплат",i.closest(".basket-aside__info-split").classList.remove("basket-aside__info-split--without-border"),i.appendChild((new DOMParser).parseFromString(e.html,"text/html").querySelector(".card-split-cost"))):("USER"===e.CODE?i.closest(".basket-aside__info-split").classList.add("basket-aside__info-split--without-border"):i.closest(".basket-aside__info-split").classList.remove("basket-aside__info-split--without-border"),n.innerHTML=e.MESSAGE,s&&s.classList.add("hidden"))}t.addEventListener("click",(t=>{t.preventDefault()}));const e=t.querySelectorAll('[data-modal="open"]'),n=document.querySelector('[data-modal="container"]'),i=n.querySelectorAll('[data-modal="close"]');e&&e.forEach((t=>{t&&t.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),n.classList.add("active"),(0,s.$)()}))})),i&&i.forEach((t=>{t&&t.addEventListener("click",(t=>{t.stopPropagation(),n.classList.contains("active")&&(n.classList.remove("active"),(0,s.W)())}))}))}));return function(e){return t.apply(this,arguments)}}()))}},1136:function(t,e,n){function i(t,e){const n=e.querySelector(".js-video-play"),i=e.querySelector(".js-video-poster"),o=e.querySelector(".js-video-dimmer");"play"===t?(o.style.bacgroundColor="transparent",n.style.display="none",i.style.display="none"):(o.style.backgroundColor="rgba(0, 0, 0, 0.35)",n.style.display="flex",i.style.display="block")}function o(){const t=document.querySelectorAll(".js-video");t&&t.length&&t.forEach((t=>{const e=t.closest(".video-block");e.querySelector(".js-video-dimmer").addEventListener("click",(()=>{t.paused?(i("play",e),t.play()):(i("pause",e),t.pause())}))}))}n.d(e,{S:function(){return i},r:function(){return o}})}},function(t){t.O(0,[8096],(function(){return t(t.s=5615)})),t.O()}]);