(e=>{function i(e,u){var i,c,g,h,r=(e=e.find(".minimog-feature-product")).find(".woo-single-gallery");r.length<=0||(i={},r.hasClass("has-thumbs-slider")&&(i={thumbs:{swiper:r.find(".minimog-thumbs-swiper").MinimogSwiper()}}),c=r.children(".minimog-main-swiper").MinimogSwiper(i),g=e.find(".variations_form"),h=g.data("product_variations"),g.find("select").on("change",function(){for(var e=!0,i=!1,r={},n=g.serializeArray(),t=0;t<n.length;t++){var a=n[t].name;if("attribute_"===a.substring(0,10)&&(r[a]=n[t].value,""===n[t].value)){e=!1;break}}if(!0===e){for(var o=Object.entries(r),d=0,s=0,t=h.length-1;0<=t;t--){var f=h[t],l=Object.entries(f.attributes),m=0;l.forEach(([r,n])=>{o.forEach(([e,i])=>{e!==r||i!==n&&""!==n||m++})}),s<m&&(s=m,d=f.image_id)}d?u(c.$wrapperEl[0]).find(".swiper-slide").each(function(e){var i=u(this).attr("data-image-id");if(parseInt(i)===d)return c.slideTo(e),!1}):i=!0}else i=!0;i&&(i=u(c.$wrapperEl[0]).find(".product-main-image").index(),c.slideTo(i))}))}e(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/tm-feature-product.default",i)})})(jQuery);