"use strict";(self.blocksyJsonP=self.blocksyJsonP||[]).push([[321],{679:function(e,t,n){n.d(t,{Kz:function(){return i},Vz:function(){return c},pF:function(){return a},r:function(){return s},v3:function(){return r},zT:function(){return o}});const o=function(e){e.closest(".ct-media-container, .ct-dynamic-media").dataset.state="playing"},i=function(e){e&&(e.matches("video")?e.play():e.matches('iframe[src*="youtu"]')?e.contentWindow.postMessage(JSON.stringify({event:"command",func:"playVideo"}),"*"):e.matches('iframe[src*="vimeo"]')&&e.contentWindow.postMessage(JSON.stringify({method:"play"}),"*"))},r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};e&&(e.matches("video[autoplay]")||e.matches('iframe[src*="youtu"][src*="autoplay=1"]')||e.matches('iframe[src*="vimeo"][src*="autoplay=1"]')?(t(),i(e)):n())},c=function(e){e.closest(".ct-media-container, .ct-dynamic-media").dataset.state="paused"},s=function(e){if(e)if(e.matches("video"))e.pause();else if(e.matches('iframe[src*="youtu"]'))e.contentWindow.postMessage(JSON.stringify({event:"command",func:"pauseVideo"}),"*");else if(e.matches('iframe[src*="vimeo"]'))e.contentWindow.postMessage(JSON.stringify({method:"pause"}),"*");else if(e.matches("iframe")){const t=e.src;e.src="",e.src=t}},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(e)return e.matches("video")?(t("ready"),e.addEventListener("play",(function(){return t("play")})),void e.addEventListener("pause",(function(){return t("pause")}))):e.matches('iframe[src*="youtu"]')?(e.contentWindow.postMessage(JSON.stringify({event:"listening",id:1,channel:"widget"}),"*"),e.contentWindow.postMessage(JSON.stringify({event:"command",func:"addEventListener",args:["onStateChange"],id:1,channel:"widget"}),"*"),window.addEventListener("message",(function(e){if(e.data)try{const n=JSON.parse(e.data);"onStateChange"===n.event&&(1===n.info&&t("play"),2===n.info&&t("pause"))}catch(e){}})),void t("ready")):void(e.matches('iframe[src*="vimeo"]')&&window.addEventListener("message",(function(n){if(n.data)try{const o=JSON.parse(n.data);"ready"===o.event&&(e.contentWindow.postMessage(JSON.stringify({method:"addEventListener",value:"pause"}),"*"),e.contentWindow.postMessage(JSON.stringify({method:"addEventListener",value:"play"}),"*"),t(o.event)),"pause"!==o.event&&"play"!==o.event||t(o.event)}catch(n){}})))}},321:function(e,t,n){n.r(t),n.d(t,{mount:function(){return d}});var o=n(194),i=n.n(o),r=(n(601),n(846)),c=n(679);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=function(e,t){let{event:o}=t;const s=window.PhotoSwipe&&!!ct_localizations.has_product_single_lightbox,l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e.closest(".elementor-section-wrap"))return;const o=i()(".pswp")[0],r=i()(e);let s=[...e.closest(".woocommerce-product-gallery").querySelectorAll(".ct-media-container")].filter((function(e){return!e.closest(".flexy-pills")}));if(s=s.map((function(e){if(e.matches("[data-media-id]"))return{mediaContainer:e,html:`<div class="ct-lightbox-video-container" data-media-id="${e.dataset.mediaId}"></div>`};const t=e.querySelector("video,iframe");if(t)return{mediaContainer:e,html:`<div class="ct-lightbox-video-container">${t.outerHTML}</div>`};const n=e.querySelector("img:not(.zoomImg)");return{mediaContainer:e,img:n,src:n.closest("[data-src]")&&(n.closest("[data-src]").dataset.src||n.closest("[data-src]").href)||n.src,w:(n.closest("[data-width]")?n.closest("[data-width]").dataset.width:n.width)||n.width,h:(n.closest("[data-height]")?n.closest("[data-height]").dataset.height:n.width)||n.width,title:n.getAttribute("data-caption")}})),1===s.length&&s[0].img&&s[0].img.closest("a")&&!s[0].img.closest("a").getAttribute("data-src")&&"woocommerce-placeholder"===s[0].img.title)return;var a=i().extend({index:0===t?0:t||i()(r).index(),addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].textContent=e.title,!0):(t.children[0].textContent="",!1)}},{shareEl:!1,fullscreenEl:!0,closeOnScroll:!1,history:!1,showHideOpacity:!1,hideAnimationDuration:0,showAnimationDuration:0}),l=new PhotoSwipe(o,PhotoSwipeUI_Default,s,a);l.init();const d=function(){l.currItem.container.closest(".pswp").querySelectorAll("video,iframe").forEach((function(e){return(0,c.r)(e)}))};l.listen("close",(function(){return d()}));const u=function(){const e=l.currItem.container.querySelector("[data-media-id]");if(!e||e.querySelector("video,iframe"))return;const t=e.closest(".pswp").querySelector(".pswp__preloader");t&&t.classList.add("pswp__preloader--active"),n.e(87).then(n.bind(n,87)).then((function(n){let{fetchVideoBy:o}=n;o(e.dataset.mediaId,{ignoreVideoOptions:!0}).then((function(n){e.innerHTML=n.html,t&&t.classList.remove("pswp__preloader--active")}))}))};setTimeout((function(){u()}),300),l.listen("afterChange",(function(){d(),u()}))};o&&(0,r.b)()&&"click"===o.type&&setTimeout((function(){o.target&&o.target.click&&o.target.click()})),function(){let{onlyZoom:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[...document.querySelectorAll(".woocommerce-product-gallery .woocommerce-product-gallery__trigger")];[...document.querySelectorAll(".woocommerce-product-gallery .ct-media-container")].filter((function(e){return!e.closest(".flexy-pills")})).map((function(n){if(!(window.wp&&wp.customize&&wp.customize("has_product_single_lightbox")&&"yes"===wp.customize("has_product_single_lightbox")())&&window.wp&&window.wp.customize||e||n.matches("[data-media-id]")||n.hasPhotoswipeListener||(n.hasPhotoswipeListener=!0,n.addEventListener("click",(function(e){if(!s)return;if(t.length>0)return;e.preventDefault();let o=0;o=[...n.parentNode.querySelectorAll(".ct-media-container")].indexOf(n),n.closest(".flexy-items")&&(o=[...n.closest(".flexy-items").children].indexOf(n.parentNode)),s&&l(n,o)}))),i().fn.zoom&&(window.wp&&wp.customize&&wp.customize("has_product_single_zoom")&&"yes"===wp.customize("has_product_single_zoom")()||!window.wp||!window.wp.customize)){const e=n.getBoundingClientRect();if(n.closest(".elementor-section-wrap"))return;if(n.closest(".ct-quick-view-card"))return;if(n.querySelector("iframe"))return;if(n.querySelector("video"))return;parseFloat(n.getAttribute("data-width"))>n.closest(".woocommerce-product-gallery").getBoundingClientRect().width&&i()(n).zoom(a(a({url:n.dataset.src,touch:!1,duration:50},e.width>parseFloat(n.dataset.width)||e.height>parseFloat(n.dataset.height)?{magnify:2}:{}),(0,r.b)()?{on:"toggle"}:{}))}})),i().fn.zoom&&(window.wp&&wp.customize&&wp.customize("has_product_single_zoom")&&"yes"===wp.customize("has_product_single_zoom")()||!window.wp||!window.wp.customize)&&setTimeout((function(){o&&(o.target.closest(".elementor-section-wrap")||(o.target.closest(".flexy-items")||o.target.closest(".ct-media-container")&&o.target.closest(".ct-media-container").parentNode.classList.contains("ct-stacked-gallery-container"))&&i()(o.target.closest(".ct-media-container")).trigger((0,r.b)()?"click.zoom":"mouseenter.zoom"))}),150),t.map((function(e){e.hasPhotoswipeListener||(e.hasPhotoswipeListener=!0,e.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();const n=e.closest(".woocommerce-product-gallery");if(!n.querySelector(".ct-media-container")||n.querySelector(".flexy-items")){if(e.closest(".ct-media-container")&&e.closest(".flexy-items")&&e.closest(".ct-columns-top-gallery"))s&&l(e.closest(".ct-media-container"),[...e.closest(".ct-media-container").parentNode.parentNode.children].indexOf(e.closest(".ct-media-container").parentNode));else if(document.querySelector(".single-product .ct-stacked-gallery-container > .ct-media-container")&&s&&l(document.querySelector(".single-product .ct-stacked-gallery-container > .ct-media-container")),document.querySelector(".single-product .flexy-items .ct-media-container")){let e=document.querySelector(".single-product .flexy-pills"),t=Array.from(e.querySelector(".active").parentNode.children).indexOf(e.querySelector(".active")||e.firstElementChild);s&&l(document.querySelector(".single-product .flexy-items").children[t].firstElementChild,t)}}else s&&l(n.querySelector(".ct-media-container"))})))}))}()}}}]);