!function(e){"use strict";e.fn.shopengine__extend_var_swatch_form=function(){return this.each((function(){var t=e(this);t.addClass("swatches-support").on("click",".swatch",(function(s){s.preventDefault();var a=e(this),i=a.closest(".value").find("select"),n=a.attr("data-value");if(!a.hasClass("disabled")){if(i.trigger("focusin"),!i.find('option[value="'+n+'"]').length)return a.siblings(".swatch").removeClass("selected"),i.val("").change(),void t.trigger("shopengine__no_matching_variation",[a]);a.hasClass("selected")?(i.val(""),a.removeClass("selected")):(a.addClass("selected").siblings(".selected").removeClass("selected"),i.val(n)),i.change()}})).on("click",".reset_variations",(function(){t.find(".swatch.selected").removeClass("selected"),t.find(".swatch.disabled").removeClass("disabled")})).on("woocommerce_update_variation_values",(function(){setTimeout((function(){t.find("tbody tr").each((function(){var t=e(this),s=t.find("select").find("option"),a=s.filter(":selected"),i=[];s.each((function(e,t){""!==t.value&&i.push(t.value)})),t.find(".swatch").each((function(){var t=e(this),s=t.attr("data-value");i.indexOf(s)>-1?t.removeClass("disabled"):(t.addClass("disabled"),a.length&&s===a.val()&&t.removeClass("selected"))}))}))}),100)})).on("shopengine__no_matching_variation",(function(){window.alert(wc_add_to_cart_variation_params.i18n_no_matching_variations_text)}))}))},e((function(){setTimeout((()=>{e(".variations_form").shopengine__extend_var_swatch_form()}),500)})),e(document.body).on("click",".shopengine_loop_swatches_wrap .shopengine_swatches .swatch_color.swatch_color_loop",(function(){const t=e(".product-type-variable"),s=t.find(".woocommerce-loop-product__link").find(".attachment-woocommerce_thumbnail");t.find(".shopengine_loop_swatches_wrap").length&&s.length&&(e(s).siblings(".lds-spinner").remove(),e(s).siblings(".preloader-shadow").remove(),e(s).before('