"use strict";(self.webpackChunkgulp_template=self.webpackChunkgulp_template||[]).push([[3216,6531],{4965:function(e,t,n){function i(){const e=document.querySelectorAll(".js-accordion:not(.init)");e.length&&e.forEach((e=>{const t=e.querySelector(".js-accordion-content"),n=e.querySelector(".js-accordion-button");n&&t&&(e.classList.add("init"),n.addEventListener("click",(function(){e.classList.toggle("show"),e.classList.contains("show")?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=0})))}))}n.d(t,{A:function(){return i}})},3218:function(e,t,n){function i(){const e=document.body,t=window.innerWidth-e.clientWidth;if(e.style.transition="margin-right 0.3s easy-in-out",e.style.marginRight=`${t}px`,e.style.overflow="hidden",!window.matchMedia("(min-width: 996px)").matches){const t=window.pageYOffset;e.style.top=-t+"px",e.style.position="fixed",e.style.width="100%"}}function o(){const e=document.body;if(e.style.transition="margin-right 0s easy-in-out",e.style.marginRight="0",e.style.overflow="unset",!window.matchMedia("(min-width: 996px)").matches){const t=Math.abs(parseInt(e.style.top||0,10));e.style.position="static",e.style.width="auto",e.style.removeProperty("top"),window.scrollTo({top:t||0,behavior:"instant"})}}n.d(t,{$:function(){return i},W:function(){return o}})},2585:function(e,t,n){n.r(t),n.d(t,{default:function(){return o}});var i=n(3218);function o(e,t=null,n=[]){const o=document.querySelector(".js-navigation");e&&(o.classList.contains("navigation__fixed--white")||o.classList.add("navigation__fixed--white"),e.on("show",(()=>{(0,i.$)(),t&&t(...n)})),e.on("hide",(()=>{(0,i.W)(),e.destroy()})),e.show())}},2048:function(e,t,n){n.d(t,{A:function(){return o}});var i=n(3218);function o(e,t=!0){const n=document.querySelector(".js-loader");n&&(t?n.classList.add("loader-fixed"):n.classList.remove("loader-fixed"),n.classList.toggle(e),n.classList.contains("loader-fixed")&&(n.classList.contains("show-global")?(0,i.$)():(0,i.W)()))}},6531:function(e,t,n){n.r(t),n.d(t,{default:function(){return r}});var i=n(5914);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t{window.matchMedia("(min-width: 996px)").matches?n.classList.contains(`${t}--mobile`)||new i.Ay(n,s({modules:[i.Vx,i.dK,i.dF],navigation:{nextEl:".slider-button-next",prevEl:".slider-button-prev"},on:{init(e){e.isLocked&&(e.navigation&&e.navigation.nextEl&&e.navigation.prevEl&&(e.navigation.nextEl.style.display="none",e.navigation.prevEl.style.display="none"),e.pagination&&e.pagination.el&&(e.pagination.el.style.display="none")),e.slides&&e.slides.forEach(((e,t)=>{e.setAttribute("data-slide-index",t)}))}}},e)):n.classList.contains(`${t}--desktop`)||new i.Ay(n,s({modules:[i.Vx,i.dK,i.dF],navigation:{nextEl:".slider-button-next",prevEl:".slider-button-prev"},on:{init(e){e.slides&&e.slides.forEach(((e,t)=>{e.setAttribute("data-slide-index",t)}))}}},e))}))}},5158:function(e,t,n){n.d(t,{A:function(){return s}});var i=n(5914);function o(e){const t=e.slides[e.realIndex],n=t.querySelector(".js-slide-link"),i=document.querySelector(".js-slide-article");i&&(t.dataset.article?(i.innerText=t.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(e){if(!window.matchMedia("(min-width: 996px)").matches){const t=e.slides.map((e=>e.querySelector(".interior-ideas-slider__slide-wrapper")));t.forEach((e=>{e.scrollLeft=(e.scrollWidth-e.clientWidth)/2}))}o(e)},slideChange:function(e){o(e)}}})}},4916:function(e,t,n){var i=n(5158),o=n(5914);function s(e,t,n,i,o,s){e.crossOrigin||(e.crossOrigin="anonymous");const r=()=>{const r=document.createElement("canvas");r.width=document.body.clientWidth,r.height=window.innerHeight;const l="100%"!==i?i:r.width,c=r.getContext("2d");d(c,e,0,0,r.width,r.height);try{const e=c.getImageData(t,n,l,o).data;s(Math.round(100*a(e)/255))}catch(e){console.error("CORS error:",e),s(50)}};e.complete?r():(e.onload=r,e.onerror=e=>{console.error("imageEL.onerror",e),s(50)})}const r=e=>(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4,l=(e,t,n)=>.212655*r(e)+.715158*r(t)+.072187*r(n),a=e=>{for(var t=0,n=0;n{2===arguments.length&&(n=i=0,o=e.canvas.width,s=e.canvas.height),(r="number"==typeof r?r:.5)<0&&(r=0),(l="number"==typeof l?l:.5)<0&&(l=0),r>1&&(r=1),l>1&&(l=1);var a,d,c,u,h=t.naturalWidth,p=t.naturalHeight,f=Math.min(o/h,s/p),v=h*f,y=p*f,m=1;vh&&(c=h),u>p&&(u=p),e.drawImage(t,a,d,c,u,n,i,o,s)};var c=n(7083),u=n(2585);function h(){const e=document.querySelector(".js-vk-shorts-slider"),t=document.querySelector(".js-dialog-vk-clip");if(!e||!t||"1"===e.dataset.vkShortsInit)return;e.dataset.vkShortsInit="1",new o.Ay(e,{slidesPerView:"auto",spaceBetween:20,breakpoints:{1280:{slidesPerView:4}}});const n=t.querySelector(".js-vk-clip-slider"),i=t.querySelectorAll(".js-vk-clip-slide"),s=t.querySelector(".js-vk-clip-prev"),r=t.querySelector(".js-vk-clip-next");if(!n||0===i.length)return;i.length<2&&(null==s||s.style.setProperty("display","none"),null==r||r.style.setProperty("display","none"));let l=null;const a=(e,t)=>{const i=e.slides[t];if(!i)return;(e=>{e.querySelector(".js-vk-clip-zone")||[["prev",-1],["next",1]].forEach((([t,n])=>{const i=document.createElement("button");i.type="button",i.className=`vk-clip-slide__zone vk-clip-slide__zone--${t} js-vk-clip-zone`,i.setAttribute("aria-label","prev"===t?"Предыдущий клип":"Следующий клип");let o=0;i.addEventListener("touchstart",(e=>{o=e.touches[0].clientX}),{passive:!0}),i.addEventListener("touchend",(e=>{const t=e.changedTouches[0].clientX-o;Math.abs(t)<40||(t<0&&n>0||t>0&&n<0)&&(n>0?null==l||l.slideNext():null==l||l.slidePrev())})),e.appendChild(i)}))})(i);const o=i.querySelector(".js-vk-clip-loader"),{isNew:s}=(e=>{let t=e.querySelector(".js-vk-clip-iframe");return t&&t.hasAttribute("src")?{iframe:t,isNew:!1}:(t||(t=document.createElement("iframe"),t.className="dialog-media__iframe vk-clip-slide__iframe js-vk-clip-iframe",t.setAttribute("title","VK clip player"),t.setAttribute("allow","autoplay; encrypted-media; fullscreen; picture-in-picture; screen-wake-lock;"),t.setAttribute("allowfullscreen",""),t.addEventListener("load",(()=>{var t;e.dataset.loaded="1",null===(t=e.querySelector(".js-vk-clip-loader"))||void 0===t||t.classList.remove("show")})),e.appendChild(t)),t.setAttribute("src",(e=>{const t=new URL(e);return t.searchParams.set("autoplay","1"),t.searchParams.set("js_api","1"),t.toString()})(e.dataset.embed)),{iframe:t,isNew:!0})})(i);s||"1"!==i.dataset.loaded?null==o||o.classList.add("show"):null==o||o.classList.remove("show"),(e=>{n.querySelectorAll(".js-vk-clip-slide").forEach((t=>{if(t===e)return;const n=t.querySelector(".js-vk-clip-iframe");n&&n.hasAttribute("src")&&(e=>{var t;null===(t=e.contentWindow)||void 0===t||t.postMessage({method:"pause"},"*")})(n)}))})(i)},d=e=>{l=new o.Ay(n,{modules:[o.Vx],initialSlide:e,speed:300,navigation:{prevEl:s,nextEl:r},on:{init:e=>a(e,e.activeIndex),slideChange:e=>a(e,e.activeIndex)}})};e.querySelectorAll(".js-vk-clip").forEach((e=>{e.addEventListener("click",(function(e){const o=this.getAttribute("href")||"";if(""===o)return;e.preventDefault();const s=Array.from(i).findIndex((e=>e.dataset.embed===o)),r=new c.default(t);r.on("show",(()=>{l||d(Math.max(s,0))})),(0,u.default)(r),r.on("destroy",(()=>{n.querySelectorAll(".js-vk-clip-iframe").forEach((e=>e.remove())),null==l||l.destroy(),l=null}))}))}))}var p=n(6531),f=n(4965);if(document.querySelector("body.kz")){const e=document.querySelectorAll(".js-where-to-buy-kz");for(const t of e)t.addEventListener("click",(()=>{"undefined"!=typeof ym&&ym(94577901,"hit",`${window.location.origin}/#shops-kz`,{title:document.title,referer:""})}))}var v=n(2048);function y(e,t,n,i,o,s,r){try{var l=e[s](r),a=l.value}catch(e){return void n(e)}l.done?t(a):Promise.resolve(a).then(i,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var s=e.apply(t,n);function r(e){y(s,i,o,r,l,"next",e)}function l(e){y(s,i,o,r,l,"throw",e)}r(void 0)}))}}window.addEventListener("DOMContentLoaded",(()=>{const e=function(){var e=m((function*(){if(document.querySelector(".js-dialog-reg-fiz")){const[e,t]=yield Promise.all([n.e(7820).then(n.bind(n,7820)),n.e(5994).then(n.bind(n,5994))]);t.default(),e.default()}}));return function(){return e.apply(this,arguments)}}(),t=function(){var e=m((function*(){if(window.smartCaptcha)return;if(!document.querySelectorAll(".js-reg-form-steps").length)return;(0,v.A)("show-global",!1);const{default:e}=yield n.e(1608).then(n.bind(n,1608));e.init({onLoad:()=>{(0,v.A)("show-global",!1)}})}));return function(){return e.apply(this,arguments)}}();window.addEventListener("load",(()=>{window.addEventListener("scroll",t,{once:!0,passive:!0})}),{once:!0}),document.addEventListener("click",(function e(n){n.target.closest(".js-short-reg")&&(t(),document.removeEventListener("click",e))})),(0,p.default)({loop:!0,slidesPerView:1,spaceBetween:20,preloadImages:!1,lazy:{loadPrevNext:!0},breakpoints:{996:{slidesPerView:"auto",loopedSlides:5,loopedSlidesLimit:!1,navigation:{nextEl:".slider-button-next",prevEl:".slider-button-prev"}}}},"js-products-slider"),function(){let e=null;window.addEventListener("resize",(()=>{e=null}));const t=(t,i)=>{if(window.matchMedia("(min-width: 996px)").matches){const o=document.querySelector("header .js-navigation"),s=t.slides[t.activeIndex],r=s?s.querySelector("img"):null,l=s.querySelector(".index-banner-slider__slide-info"),a=r.complete&&0!==r.naturalHeight;if(!r)return o.classList.remove("navigation__fixed--light"),void l.classList.remove("index-banner-slider__slide-info--light");a?null===e&&"transitionEnd"===i?(e=n(l),e(o,r,l)):"transitionStart"===i&&e&&e(o,r,l):r.onload=()=>{null===e&&"transitionEnd"===i?(e=n(l),e(o,r,l)):"transitionStart"===i&&e&&e(o,r,l)}}},n=t=>{let{x:n,y:i,width:o,height:r}=t.getBoundingClientRect();return(t,l,a)=>{n<0?e=null:(s(l,0,0,"100%",100,(e=>{e<70?t.classList.add("navigation__fixed--light"):t.classList.remove("navigation__fixed--light")})),s(l,n,i,o,r,(e=>{e<70?a.classList.add("index-banner-slider__slide-info--light"):a.classList.remove("index-banner-slider__slide-info--light")})))}},i=new o.Ay(".js-index-banner-slider",{modules:[o.Vx,o.Ij,o.dF],autoHeight:!0,loop:!0,autoplay:{delay:5e3},slidesPerView:1,preloadImages:!1,lazy:{enabled:!0,loadPrevNext:!0},on:{init:function(e){const t=e.slides[e.activeIndex];if(t){const n=window.matchMedia("(min-width: 996px)").matches?".js-header-video":".js-header-video-mobile";t.querySelector(n)&&(e.autoplay.stop(),setTimeout((()=>{e.autoplay.start()}),1e4))}e.isLocked&&e.navigation&&e.navigation.nextEl&&e.navigation.prevEl&&(e.navigation.nextEl.style.display="none",e.navigation.prevEl.style.display="none")},transitionStart:function(){t(this,"transitionStart")},transitionEnd:function(){t(this,"transitionEnd")}},breakpoints:{996:{autoHeight:!1,navigation:{nextEl:".slider-button-next",prevEl:".slider-button-prev"}}}});i.on("slideChange",(function(e){const t=e.slides[e.activeIndex];if(t){const n=window.matchMedia("(min-width: 996px)").matches?".js-header-video":".js-header-video-mobile";t.querySelector(n)&&(e.autoplay.stop(),setTimeout((()=>{e.autoplay.start()}),1e4))}}))}(),(0,i.A)(),h(),(0,f.A)(),e()}))}},function(e){e.O(0,[8096],(function(){return e(e.s=4916)})),e.O()}]);