"use strict";(globalThis.blocksyJsonP=globalThis.blocksyJsonP||[]).push([[778],{9778:function(e,t,r){r.r(t),r.d(t,{Flexy:function(){return a.r},mount:function(){return x}});var n=r(4705),o=r(1669),l=r.n(o),a=r(3071),c=r(8113),i=r.n(c);let s=null,u=matchMedia("all and (max-width: 689px)"),y=matchMedia("all and (max-width: 999px)");const f=function(){s=u.matches?"mobile":y.matches?"tablet":"desktop"};f(),u.addListener(function(){return f()}),y.addListener(function(){return f()});const p=function(e){return e&&"[object Function]"==={}.toString.call(e)?e():e};function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}const x=function(e,t){t=w({event:null,flexyOptions:{}},t);let r=e;if((e=p(e)).flexy)return e.flexy;let n=e.querySelector(".flexy-pills [data-flexy]"),o=e.querySelector(".flexy .flexy-arrow-prev"),c=e.querySelector(".flexy .flexy-arrow-next");const u=e.closest('[class*="ct-suggested-products"]');u&&(o=u.querySelector(".ct-arrow-prev"),c=u.querySelector(".ct-arrow-next"));const y=".flexy-pills > * > *",f=t.event&&"touchstart"===t.event.type&&t.event.target.closest(y);if(t.event&&"mouseover"===t.event.type&&("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)){let e=t.event.target.closest(y);const r=".flexy-arrow-prev, .flexy-arrow-next";e||(e=t.event.target.closest(r)),!e&&t.event.target.matches(r)&&(e=t.event.target),e&&setTimeout(function(){e.click()})}const d=new a.r(function(){const e=p(r);return e?e.querySelector(".flexy-items"):null},w(w(w(w({flexyAttributeEl:r,elementsThatDoNotStartDrag:[".twentytwenty-handle"]},t.event&&"touchstart"===t.event.type&&!f?{initialDragEvent:t.event}:{}),{},{autoplay:!!(Object.keys(e.dataset).indexOf("autoplay")>-1&&parseInt(e.dataset.autoplay,10))&&e.dataset.autoplay},e.querySelector(".flexy-pills")?{pillsContainerSelector:e.querySelector(".flexy-pills").firstElementChild}:{}),{},{leftArrow:o,rightArrow:c,scaleRotateEffect:!1,onDragStart:function(e){e.target.closest(".flexy-items")&&Array.from(e.target.closest(".flexy-items").querySelectorAll(".zoomImg")).map(function(e){l()(e).stop().fadeTo(120,0)})},wrapAroundMode:"viewport"===e.dataset.wrap?"viewport":"container"},n?{pillsFlexyInstance:n}:{}),{},{onSlideChange:function(e,t){i().trigger("blocksy:frontend:flexy:slide-change",{instance:e,payload:t})}},t.flexyOptions||{}));if(n){const e=new a.r(n,w(w({elementsThatDoNotStartDrag:[".twentytwenty-handle"],wrapAroundMode:"viewport"===n.dataset.wrap?"viewport":"container"},t.event&&"touchstart"===t.event.type&&f?{initialDragEvent:t.event}:{}),{},{leftArrow:n.parentNode.querySelector(".flexy-arrow-prev"),rightArrow:n.parentNode.querySelector(".flexy-arrow-next")},n.closest(".thumbs-left")&&"mobile"!==function(){let{withTablet:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e?s:"tablet"===s?"mobile":s}({withTablet:!0})?{orientation:"vertical"}:{}));n.flexy=e}return e.flexy=d,d}}}]);