!function i(a,n,r){function s(e,t){if(!n[e]){if(!a[e]){var o="function"==typeof require&&require;if(!t&&o)return o(e,!0);if(l)return l(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}o=n[e]={exports:{}},a[e][0].call(o.exports,function(t){return s(a[e][1][t]||t)},o,o.exports,i,a,n,r)}return n[e].exports}for(var l="function"==typeof require&&require,t=0;t<r.length;t++)s(r[t]);return s}({1:[function(t,e,o){"use strict";function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var w;(w=jQuery).noConflict(),w(document).ready(function(){var n,t,u=[],e=wlfmc_l10n.lang,o=wlfmc_l10n.wishlist_items,a=!1;w.fn.WLFMC={init_prepare_qty_links:function(){var t=document.querySelectorAll(".wlfmc-wishlist-table .quantity");if(t.length<1)return!1;for(var e=0;e<t.length;e++){if(t[e].classList.contains("hidden"))return!1;var o=t[e].querySelector(".botiga-quantity-plus, a.plus, .ct-increase"),i=t[e].querySelector(".botiga-quantity-minus, a.minus, .ct-decrease");if(!o||!i||o.length<1||i.length<1)return!1;o.classList.add("show"),i.classList.add("show");var a=o.cloneNode(!0),n=i.cloneNode(!0);a.addEventListener("click",function(t){t.preventDefault();var t=this.parentNode.querySelector(".qty"),e=parseFloat(t.value,10)||0,o=document.createEvent("HTMLEvents"),i=t.getAttribute("max")&&parseFloat(t.getAttribute("max"),0)||1/0;return t.value=e<i?Math.round(100*(e+parseFloat(t.step||"1")))/100:i,o.initEvent("change",!0,!1),t.dispatchEvent(o),!1}),n.addEventListener("click",function(t){t.preventDefault();var t=this.parentNode.querySelector(".qty"),e=parseFloat(t.value,10)||0,o=document.createEvent("HTMLEvents"),i=t.getAttribute("min")?Math.round(100*parseFloat(t.getAttribute("min"),0))/100:0;return t.value=i<e?Math.round(100*(e-parseFloat(t.step||"1")))/100:i,o.initEvent("change",!0,!1),t.dispatchEvent(o),!1}),t[e].replaceChild(a,o),t[e].replaceChild(n,i)}},prepare_mini_wishlist:function(t){var e,o,i,a,n,r,s,l,c,d,f;t.hasClass("position-absolute")?(l=(c=t.offset()).left,c=c.top,d=t.outerWidth(),e=t.outerHeight(),n=l-(l=parseFloat(t.css("left"))),o=c-(c=parseFloat(t.css("top"))),l=l,c=c,s=(f=w(window).width())-n-d-50,r=50-n,a=(i=w(document).height())-o-e-50,f<=d?l=-1*n:f-(d+100)<0?l=(f-d)/2-n:0<r?l=r:s<0&&(l=s),i<e&&(t.height(i-t.outerHeight()+t.height()),e=t.outerHeight()),i<=e?c=-1*o:i-(e+100)<0?c=(i-e)/2-o:a<0&&(c=a),t.css({left:l,top:c})):void 0!==(n=w(".wlfmc-counter-wrapper."+t.attr("data-id")))&&0<n.length&&(r=n.offset(),s=w(window).scrollTop(),l=r.left,c=r.top+n.height()-s,d=t.outerWidth(),f=w(window).width(),t.css({left:l=f<l+d?f-d-20:l,top:c}))},appendtoBody:function(t){var e,o,i;0<!t.closest(".wlfmc-counter-wrapper").find(".position-fixed").length||(e=t.closest(".wlfmc-counter-wrapper").find(".wlfmc-counter-items").hasClass("wlfmc-lists-counter-dropdown")?"wlfmc-premium-list-counter":t.closest(".wlfmc-counter-wrapper").hasClass("wlfmc-waitlist-counter-wrapper")?"wlfmc-waitlist-counter":"wlfmc-wishlist-counter",0<t.closest(".elementor-widget-wlfmc-wishlist-counter").length||0<t.closest(".elementor-widget-wlfmc-waitlist-counter").length||0<t.closest(".elementor-widget-wlfmc-premium-list-counter").length?(i=t.closest(".elementor-widget-wlfmc-wishlist-counter").data("id")||t.closest(".elementor-widget-wlfmc-waitlist-counter").data("id")||t.closest(".elementor-widget-wlfmc-premium-list-counter").data("id"),o=t.closest("[data-elementor-id]").data("elementor-id"),w("<div class='wlfmc-elementor elementor elementor-"+o+" "+e+"'><div class='elementor-element elementor-element-"+i+"'></div></div>").appendTo("body"),w(".wlfmc-elementor.elementor-"+o+" .elementor-element-"+i).append(t)):0<!t.closest(".wlfmc-elementor").length&&(i=t.closest(".wlfmc-counter-wrapper").find(".wlfmc-counter-items").data("id"),w("<div class='wlfmc-elementor no-elementor-"+i+" "+e+"'></div>").appendTo("body"),w(".wlfmc-elementor.no-elementor-"+i).append(t)))},show_mini_wishlist:function(){w(".wlfmc-counter-dropdown").removeClass("lists-show");var t=w(".dropdown_"+w(this).attr("data-id"))||w(this).closest(".wlfmc-counter-wrapper").find(".wlfmc-counter-dropdown");w.fn.WLFMC.appendtoBody(t.closest(".wlfmc-counter-wrapper")),w.fn.WLFMC.prepare_mini_wishlist(t),t.addClass("lists-show")},hide_mini_wishlist:function(){var t=w(this).closest(".wlfmc-counter-wrapper").find(".wlfmc-counter-dropdown");w(".wlfmc-first-touch").removeClass("wlfmc-first-touch"),w(".wlfmc-first-click").removeClass("wlfmc-first-click"),t.removeClass("lists-show")},reInit_wlfmc:function(){w(document).trigger("wlfmc_init")},init_tooltip:function(){function a(t,e){var o,e=w(e),t=w(t),i=w("body").offset(),a=(w("body").css({position:"relative"}),s.show(),s.hide(),(e.outerHeight()-t.outerHeight())/2),n=-t.outerWidth()/2+e.outerWidth()/2,n={top:[-t.outerHeight()-7,n],right:[a,e.outerWidth()+7],bottom:[e.outerHeight()+7,n],left:[a,-t.outerWidth()-7]},a=["top","right","bottom","left"];Object.keys(n),"top"===s.direction||"bottom"===s.direction?(t.css("top",e.offset().top-i.top+n[s.direction][0]),t.css("left",e.offset().left-i.left+3.5+n[s.direction][1])):(o=(o=n[s.direction][0]-3.5)<0?o+3.5:o,t.css("top",e.offset().top-i.top+o),t.css("left",e.offset().left-i.left+n[s.direction][1])),r(t)&&(s.direction=a[a.indexOf(s.direction)+1]),s.show()}var r=function(t){return t.offsetLeft+t.offsetWidth<0||t.offsetTop+t.offsetHeight<0||t.offsetLeft+t.offsetWidth>window.innerWidth||t.offsetTop+t.offsetHeight>window.innerHeight},s=new function(){var i=this;this.idSelector="wlfmc-tooltip",this.text="",this.top=0,this.left=0,this.direction=void 0!==this.direction?this.direction:"bottom",this.t_type=void 0!==this.t_type?this.t_type:"default",this.target="",this.hideTimeout=null,this.node=document.getElementById(this.idSelector),this.node||(this.node=document.createElement("div"),this.node.setAttribute("id",this.idSelector),this.node.className=this.node.className+"tooltip__hidden",this.node.innerHTML=this.text,document.body.appendChild(this.node)),this.show=function(){var t=["top","right","bottom","left"],e=(i.node.innerHTML=i.text,i.direction),o=i.t_type;e?w(this.node).addClass("tooltip__expanded tooltip__expanded-"+e):w(this.node).addClass("tooltip__expanded"),w(this.node).addClass("wlfmc-tooltip-"+o),w(this.node).removeClass("tooltip__hidden"),r(w(s.node))&&(s.hide(),s.direction=t[t.indexOf(s.direction)+1],a(s.node,s.target))},this.hide=function(){i.hideTimeout&&(clearTimeout(i.hideTimeout),i.hideTimeout=null),w(i.node).css("top","0"),w(i.node).css("left","0"),w(i.node).attr("class",""),w(i.node).addClass("tooltip__hidden")}},e="ontouchstart"in window||0<navigator.maxTouchPoints;w(document).on("mouseenter touchstart",".wlfmc-tooltip",function(t){(s.target=this).className.split(" ").forEach(function(t){-1!=t.indexOf("wlfmc-tooltip-")&&(s.direction=t.split("-")[t.split("-").length-1])}),w(this).attr("data-tooltip-type")&&(s.t_type=w(this).attr("data-tooltip-type")),w(this).attr("data-tooltip-text")&&(s.text=w(this).attr("data-tooltip-text"),a(s.node,s.target)),"touchstart"===t.type&&t.preventDefault(),s.hideTimeout&&(clearTimeout(s.hideTimeout),s.hideTimeout=null)}),w(document).on("mouseleave touchend",".wlfmc-tooltip",function(t){"touchend"===t.type&&e?s.hideTimeout=setTimeout(function(){s.hide()},1e3):"mouseleave"===t.type&&s.hide()}),w(document).on("touchstart click",function(t){w(t.target).closest(".wlfmc-tooltip").length||w(t.target).is(s.node)||s.hide()})},init_fix_on_image_single_position:function(){0<w(".woocommerce-product-gallery__wrapper .wlfmc-top-of-image").length&&w(".woocommerce-product-gallery__wrapper .wlfmc-top-of-image").each(function(){w(this).insertAfter(w(this).parent())})},init_wishlist_popup:function(){function e(t,e){void 0!==t.classList&&t.classList.contains("wlfmc-overlay")&&(t="remove"===e?"removeClass":"addClass",w("body")[t]("wlfmc-with-popup"))}function o(t){e(t,"add")}function i(t){e(t,"remove")}new MutationObserver(function(t){for(var e in t){e=t[e];"childList"===e.type&&(void 0!==e.addedNodes&&e.addedNodes.forEach(o),void 0!==e.removedNodes&&e.removedNodes.forEach(i))}}).observe(document.body,{childList:!0})},init_checkbox_handling:function(){var i=w(".wlfmc-wishlist-table, .wlfmc-save-for-later-table").find('tbody .product-checkbox input[type="checkbox"]'),a=w(".multiple-product-move,.multiple-product-copy");i.off("change").on("change",function(t){t.preventDefault();var e,t=w(this),o=t.parent();return t.is(":checked")||(w('input[name="'+t.attr("name")+'"]').prop("checked",!1),w("#bulk_add_to_cart").prop("checked",!1),w("#bulk_add_to_cart2").prop("checked",!1)),o.removeClass("checked").removeClass("unchecked").addClass(t.is(":checked")?"checked":"unchecked"),0<a.length&&(i.is(":checked")?a.show():a.hide(),o=w(this).closest("tr").attr("data-item-id"),e=a.attr("data-item-id"),t.is(":checked")?e=e?((e=e.split(",")).push(o),e.join(",")):o:e&&(-1!==(t=(e=e.split(",")).indexOf(o))&&e.splice(t,1),e=e.join(",")),a.attr("data-item-id",e)),!1}).trigger("change")},init_handling_after_ajax:function(){this.init_prepare_qty_links(),this.init_checkbox_handling(),w(document).trigger("wlfmc_init_after_ajax")},init_quantity:function(){var r,s;w(document).on("change",".wlfmc-wishlist-table .quantity :input, .wlfmc-save-for-later-table .quantity :input",function(){var t=w(this),e=t.closest("[data-row-id]"),o=e.data("row-id"),i=e.data("cart-item-key"),a=t.closest(".wlfmc-wishlist-table,.wlfmc-save-for-later-table"),n=a.data("token");clearTimeout(s),e.find(".add_to_cart_button").attr("data-quantity",t.val()),s=setTimeout(function(){r&&r.abort(),r=w.ajax({url:wlfmc_l10n.ajax_url,data:{action:wlfmc_l10n.actions.update_item_quantity,nonce:a.data("nonce"),context:"frontend",product_id:o,cart_item_key:i,wishlist_token:n,quantity:t.val()},method:"POST",beforeSend:function(t){"rest_api"===wlfmc_l10n.ajax_mode&&t.setRequestHeader("X-WP-Nonce",wlfmc_l10n.nonce),w.fn.WLFMC.block(e)},complete:function(){w.fn.WLFMC.unblock(e)},success:function(t){w.fn.WLFMC.load_fragments()}})},1e3)})},init_popups:function(){w("body").on("click",".wlfmc-popup-trigger:not(.wlfmc-disabled)",function(t){t.preventDefault();var e,t=w(this).data("popup-id"),o=w("#"+t);return w("#"+t+"_wrapper").length||(e={absolute:!1,color:"#333",transition:"all 0.3s",horizontal:o.data("horizontal"),vertical:o.data("vertical")},o.popup(e)),w("#wlfmc-tooltip").css({top:"0",left:"0"}).removeClass().addClass("tooltip__hidden"),w("#"+t).popup("show"),!1}),w("body").on("click",".wlfmc-popup-close",function(t){t.preventDefault();t=w(this).data("popup-id");return w("#"+t).popup("hide"),!1})},init_components:function(){w(document).on("click",".wlfmc-list .product-components",function(t){t.preventDefault();var t=w(this).closest("tr"),e=t.find(".wlfmc-absolute-meta-data"),o=t.next(".wlfmc-row-meta-data").filter(".wlfmc-row-meta-data"),i=o.hasClass("hide");return e.fadeToggle(),o.toggleClass("hide"),t.toggleClass("show-meta-data",i),!1}),w(document).on("click",".wlfmc-list .close-components",function(t){t.preventDefault();t=w(this).closest("tr");return t.find(".wlfmc-absolute-meta-data").fadeToggle(),t.removeClass("show-meta-data"),!1})},init_popup_checkbox_handling:function(){w(document).on("change",".list-item-checkbox",function(){var t,e=w(this).closest(".list-item"),o=w(this).closest(".wlfmc-add-to-list-container, .wlfmc-move-to-list-wrapper, .wlfmc-copy-to-list-wrapper");o.hasClass("wlfmc-add-to-list-container")&&(w(this).is(":checked")?e.addClass("selected"):e.removeClass("selected")),(o.hasClass("wlfmc-move-to-list-wrapper")||o.hasClass("wlfmc-copy-to-list-wrapper"))&&(t=o.find('input[type="checkbox"]'),o.find(".list-item").removeClass("selected"),w(this).is(":checked")&&(e.addClass("selected"),t.not(w(this)).prop("checked",!1)))})},init_copy_wishlist_link:function(){w(document).on("click",".copy-link-trigger",function(t){t.stopImmediatePropagation(),t.preventDefault();t=w(this),t=w("<input/>",{val:t.attr("data-href"),type:"text"});return w("body").append(t),w.fn.WLFMC.isOS()?t[0].setSelectionRange(0,9999):t.select(),document.execCommand ("copy"),t.remove(),toastr.success(wlfmc_l10n.labels.link_copied),!1})},retrieve_fragments:function(t){var o={},e=null;return t?"object"===d(t)?(e=(t=w.extend({fragments:null,s:"",container:w(document),firstLoad:!1},t)).fragments||t.container.find(".wlfmc-wishlist-fragment"),t.s&&(e=e.not("[data-fragment-ref]").add(e.filter('[data-fragment-ref="'+t.s+'"]'))),t.firstLoad&&(e=e.filter(".on-first-load"))):(e=w(".wlfmc-wishlist-fragment"),"string"!=typeof t&&"number"!=typeof t||(e=e.not("[data-fragment-ref]").add(e.filter('[data-fragment-ref="'+t+'"]')))):e=w(".wlfmc-wishlist-fragment"),e.length?(e.each(function(){var t=w(this),e=t.attr("class").split(" ").filter(function(t){return t.length&&"exists"!==t}).join(wlfmc_l10n.fragments_index_glue);o[e]=t.data("fragment-options")}),o):null},load_fragments:function(o,i,a){clearTimeout(t),t=setTimeout(function(){n&&n.abort(),o=w.extend({firstLoad:!0},o);var t=w.fn.WLFMC.retrieve_fragments(o),e=new FormData;e.append("action",wlfmc_l10n.actions.load_fragments),e.append("context","frontend"),t&&(t=JSON.stringify(t),t=new File([t],"fragment.json"),e.append("fragments_file",t)),n=w.ajax({url:wlfmc_l10n.admin_url,data:e,type:"POST",contentType:!1,processData:!1,success:function(t){void 0!==t.fragments&&("function"==typeof i&&i.apply(null,a),w.fn.WLFMC.replace_fragments(t.fragments),w.fn.WLFMC.init_handling_after_ajax()),w("#wlfmc-lists,#wlfmc-wishlist-form").addClass("on-first-load"),void 0!==t.products&&w.fn.WLFMC.set_products_hash(JSON.stringify(t.products)),void 0!==t.waitlist&&w.fn.WLFMC.set_waitlist_hash(JSON.stringify(t.waitlist)),void 0!==t.lang&&w.fn.WLFMC.set_lang_hash(t.lang)}})},100)},replace_fragments:function(t){w.each(t,function(t,e){var t="."+t.split(wlfmc_l10n.fragments_index_glue).filter(function(t){return t.length&&"exists"!==t&&"with-count"!==t}).join("."),o=w(t),i=w(e).filter(t);i.length||(i=w(e).find(t)),o.length&&i.length&&o.replaceWith(i)})},load_automations:function(t,e,o,i,a){w.ajax({url:wlfmc_l10n.ajax_url,data:{action:wlfmc_l10n.actions.load_automations,nonce:a,context:"frontend",product_id:parseInt(t),wishlist_id:parseInt(e),customer_id:parseInt(o),list_type:i},method:"POST",beforeSend:function(t){"rest_api"===wlfmc_l10n.ajax_mode&&t.setRequestHeader("X-WP-Nonce",wlfmc_l10n.nonce)},complete:function(){}})},check_products:function(t){var e;null!==t&&(u=[],(e=w(".wlfmc-products-counter-wrapper .wlfmc-counter-item")).length&&u.length&&e.each(function(){var e=w(this).attr("data-row-id");w.grep(u,function(t){return t.product_id===e}).length||w(".wlfmc-products-counter-wrapper").find('[data-row-id="'+e+'"]').remove()}),(e=w(".wlfmc-wishlist-form .wlfmc-table-item")).length&&u.length&&e.each(function(){var e=w(this).attr("data-row-id");w.grep(u,function(t){return t.product_id===e}).length||w(".wlfmc-wishlist-form").find('[data-row-id="'+e+'"]').remove()}),w(".wlfmc-add-to-wishlist").removeClass("exists"),w.each(t,function(t,e){w(".wlfmc-add-to-wishlist-"+e.product_id).each(function(){w(this).addClass("exists"),w(this).find(".wlfmc_delete_item").attr("data-item-id",e.item_id),w(this).find(".wlfmc_delete_item").attr("data-wishlist-id",e.wishlist_id)}),w(".wlfmc-products-counter-wrapper  .products-counter-number").text(e.length),w(".wlfmc-products-counter-wishlist .total-products .wlfmc-total-count").text(e.length),u.push(e)}))},set_products_hash:function(t){r&&(localStorage.setItem(l,t),sessionStorage.setItem(l,t)),w.fn.WLFMC.check_products(JSON.parse(t))},set_lang_hash:function(t){r&&(localStorage.setItem(c,t),sessionStorage.setItem(c,t))},validateEmail:function(t){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())},isTrue:function(t){return!0===t||"yes"===t||"1"===t||1===t||"true"===t},isOS:function(){return navigator.userAgent.match(/ipad|iphone/i)},loading:function(t){0<t.find("i").length?t.addClass("wlfmc-action wlfmc-loading"):t.addClass("wlfmc-action wlfmc-loading-alt")},unloading:function(t){t.removeClass("wlfmc-loading wlfmc-loading-alt")},block:function(t){void 0!==w.fn.block&&wlfmc_l10n.enable_ajax_loading&&t.fadeTo("400","0.6").block({message:null,overlayCSS:{background:"transparent url("+wlfmc_l10n.ajax_loader_url+") no-repeat center",backgroundSize:"40px 40px",opacity:1}})},table_block:function(){void 0!==w.fn.block&&w(".wlfmc-wishlist-table-wrapper, .wlfmc-save-for-later-table-wrapper").fadeTo("400","0.6").block({message:null,overlayCSS:{background:"transparent url("+wlfmc_l10n.ajax_loader_url+") no-repeat center",backgroundSize:"80px 80px",opacity:1}})},unblock:function(t){void 0!==w.fn.unblock&&(t.stop(!0).css("opacity","1").unblock(),w(".tooltip__expanded").removeClass().addClass("tooltip__hidden"))},is_cookie_enabled:function(){if(navigator.cookieEnabled)return!0;document.cookie="cookietest=1";var t=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",t},setCookie:function(t,e){var o=new Date;o.setDate(o.getDate()+9125),document.cookie=t+"="+escape(e)+"; expires="+o.toUTCString()+"; path=/"},updateURLParameter:function(t,e,o){var i="",t=(r=t.split("?"))[0],a=r[1],n="";if(a)for(var r=a.split("&"),s=0;s<r.length;s++)r[s].split("=")[0]!==e&&(i+=n+r[s],n="&");return t+"?"+i+(n+""+e+"="+o.replace("#",""))},getUrlParameter:function(t,e){for(var o,i=decodeURIComponent(t.substring(1)).split(/[&|?]+/),a=0;a<i.length;a++)if((o=i[a].split("="))[0]===e)return void 0===o[1]||o[1]}},toastr.options={tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,closeButton:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:2e4,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"default"===wlfmc_l10n.toast_position?wlfmc_l10n.is_rtl?"toast-top-right":"toast-top-left":wlfmc_l10n.toast_position,timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",newestOnTop:!0,preventDuplicates:!1,progressBar:!0,progressClass:"toast-progress",rtl:!!wlfmc_l10n.is_rtl},w(document).on("wlfmc_init",function(){w.fn.WLFMC.init_fix_on_image_single_position();var o,t=w(this),e=w("body"),p="undefined"!=typeof wc_add_to_cart_params&&null!==wc_add_to_cart_params?wc_add_to_cart_params.cart_redirect_after_add:"";e.on("click",'.wlfmc-list button[name="apply_bulk_actions"]',function(t){var e=w(this).closest(".action-wrapper").find('select[name="bulk_actions"]'),o=w(this).closest("form").find("input.qty");0<e.length&&"delete"===e.val()&&0<o.length&&o.attr("disabled",!0)}),e.on("change","#bulk_add_to_cart,#bulk_add_to_cart2",function(){var t=w(this),e=t.closest(".wlfmc-wishlist-table,.wlfmc-save-for-later-table").find("[data-row-id]").find('input[type="checkbox"]:not(:disabled)');t.is(":checked")?(e.prop("checked","checked").trigger("change"),w("#bulk_add_to_cart").prop("checked","checked"),w("#bulk_add_to_cart2").prop("checked","checked")):(e.prop("checked",!1).trigger("change"),w("#bulk_add_to_cart").prop("checked",!1),w("#bulk_add_to_cart2").prop("checked",!1))}),e.on("submit",".wlfmc-popup-form",function(){return!1}),t.on("found_variation",function(t,e){t=w(t.target).data("product_id");e.product_id=t,w(document).trigger("wlfmc_show_variation",e)}),t.on("wlfmc_reload_fragments",w.fn.WLFMC.load_fragments),t.on("wlfmc_fragments_loaded",function(t,e,o,i){i&&w(".variations_form").find(".variations select").last().trigger("change")}),e.on("click",".wlfmc-tabs a:not(.external-link)",function(t){t.stopImmediatePropagation(),t.preventDefault();t=w(this).data("content");return w(".wlfmc-tab-content").hide(),w(this).closest(".wlfmc-tabs-wrapper").removeClass("active-tab-cart active-tab-save-for-later"),w(this).closest(".wlfmc-tabs-wrapper").addClass("active-tab-"+t),w(this).closest(".wlfmc-tabs-wrapper").find(".wlfmc-tabs a").removeClass("nav-tab-active"),w(this).addClass("nav-tab-active"),w(".wlfmc_content_"+t).show(),window.history.replaceState("","",w.fn.WLFMC.updateURLParameter(window.location.href,"tab",t)),!1}),e.on("click",".wlfmc-gdpr-btn",function(t){t.stopImmediatePropagation(),t.preventDefault();var e=w(this),t=e.data("action"),o=e.data("cid");return w.ajax({url:wlfmc_l10n.ajax_url,data:{action:wlfmc_l10n.actions.gdpr_action,nonce:e.data("nonce"),context:"frontend",action_type:t,cid:o},method:"post",beforeSend:function(t){"rest_api"===wlfmc_l10n.ajax_mode&&t.setRequestHeader("X-WP-Nonce",wlfmc_l10n.nonce),w.fn.WLFMC.loading(e)},complete:function(){w.fn.WLFMC.unloading(e)},success:function(t){t&&w(".wlfmc-gdpr-notice-wrapper, .wlfmc-unsubscribe-notice-wrapper").remove()}}),!1}),e.on("click",".wlfmc_add_to_wishlist",function(t){if(t.stopImmediatePropagation(),t.preventDefault(),a&&Array.isArray(u)&&!u.length)toastr.error(wlfmc_l10n.labels.product_adding);else{var e,r=w(this),s=r.attr("data-product-id"),t=r.attr("data-parent-product-id"),l=r.closest(".wlfmc-add-to-wishlist-"+s),o={action:wlfmc_l10n.actions.add_to_wishlist_action,context:"frontend",add_to_wishlist:s,product_type:r.attr("data-product-type")},i=(null===w(document).triggerHandler("wlfmc_add_to_wishlist_data",[r,o])&&(o=null),w('form.cart[method=post][data-product_id="'+t+'"], form.vtajaxform[method=post][data-product_id="'+t+'"]').length?e=w('form.cart[method=post][data-product_id="'+t+'"], form.vtajaxform[method=post][data-product_id="'+t+'"]').eq(0):w(this).closest("form.cart[method=post], form.vtajaxform[method=post]").length?e=w(this).closest("form.cart[method=post], form.vtajaxform[method=post]").eq(0):w("#product-"+t+" form.cart[method=post],#product-"+t+" form.vtajaxform[method=post]").length?e=w("#product-"+t+" form.cart[method=post],#product-"+t+" form.vtajaxform[method=post]").eq(0):w('form.cart[method=post] button[name="add-to-cart"][value="'+t+'"],form.vtajaxform[method=post] button[name="add-to-cart"][value="'+t+'"],form.cart[method=post] input[name="add-to-cart"][value="'+t+'"]').length&&(e=w('form.cart[method=post] button[name="add-to-cart"][value="'+t+'"],form.vtajaxform[method=post] button[name="add-to-cart"][value="'+t+'"],form.cart[method=post] input[name="add-to-cart"][value="'+t+'"]').closest("form").eq(0)),new FormData);if(void 0!==e&&0<e.length?(i=new FormData(e.get(0))).delete("add-to-cart"):(e=r.closest(".product.post-"+t).find(".add_to_cart_button")).length&&(o.quantity=e.attr("data-quantity")),w.each(o,function(t,e){i.append(t,"object"===d(e)?JSON.stringify(e):e)}),jQuery(document.body).trigger("wlfmc_adding_to_wishlist"),w.fn.WLFMC.is_cookie_enabled())return w.ajax({url:wlfmc_l10n.ajax_url,data:i,type:"POST",contentType:!1,processData:!1,cache:!1,beforeSend:function(t){"rest_api"===wlfmc_l10n.ajax_mode&&t.setRequestHeader("X-WP-Nonce",wlfmc_l10n.nonce),a=!0,w.fn.WLFMC.loading(r)},complete:function(){a=!1,w.fn.WLFMC.unloading(r)},success:function(t){var e,o,i=t.result,a=t.message,n=!0;"true"!==i&&"exists"!==i||(w.fn.WLFMC.load_fragments(),t.item_id&&null!=u&&(u.push({wishlist_id:t.wishlist_id,item_id:t.item_id,product_id:parseInt(s)}),w.fn.WLFMC.set_products_hash(JSON.stringify(u))),(e=l.attr("data-popup-id"))&&(o={absolute:n=!1,color:"#333",transition:"all 0.3s",horizontal:(e=w("#"+e)).data("horizontal"),vertical:e.data("vertical")},e.popup(o),w("#wlfmc-tooltip").css({top:"0",left:"0"}).removeClass().addClass("tooltip__hidden"),e.popup("show")),n&&""!==w.trim(wlfmc_l10n.labels.product_added_text)&&"true"===i&&toastr.success(wlfmc_l10n.labels.product_added_text),"true"===i&&w.fn.WLFMC.load_automations(s,t.wishlist_id,t.customer_id,"wishlist",t.load_automation_nonce)),"true"===i&&"add-redirect"===wlfmc_l10n.click_behavior&&(window.location.href=wlfmc_l10n.wishlist_page_url),n&&""!==w.trim(t.message)&&"true"!==i&&toastr.error(a),w.fn.WLFMC.init_handling_after_ajax(),w("body").trigger("wlfmc_added_to_wishlist",[r,l])}}),!1;a=!1,window.alert(wlfmc_l10n.labels.cookie_disabled)}}),e.on("click",".wlfmc_ajax_add_to_cart:not(.disabled)",function(t){var e=w(this),o=e.attr("data-item_id"),i=e.attr("data-wishlist_id"),o={action:wlfmc_l10n.actions.add_to_cart_action,nonce:e.data("nonce"),context:"frontend",lid:o,wid:i};return t.stopImmediatePropagation(),t.preventDefault(),e.removeClass("added"),e.addClass("loading"),!1===w(document.body).triggerHandler("should_send_ajax_request.adding_to_cart",[e])?(w(document.body).trigger("ajax_request_not_sent.adding_to_cart",[!1,!1,e]),!0):(w(document.body).trigger("adding_to_cart",[e,o]),w.ajax({url:wlfmc_l10n.admin_url,data:o,type:"POST",dataType:"json",success:function(t){if(t){if(t.error||t.success&&!w.fn.WLFMC.isTrue(t.success)){if(t.product_url)return void(window.location=t.product_url);""!==wlfmc_l10n.labels.failed_add_to_cart_message&&toastr.error(wlfmc_l10n.labels.failed_add_to_cart_message)}else{if(w.fn.WLFMC.isTrue(wc_add_to_cart_params.cart_redirect_after_add))return void(window.location=wc_add_to_cart_params.cart_url);w(document.body).trigger("wc_fragment_refresh"),w(document.body).trigger("added_to_cart",[t.fragments,t.cart_hash,e]),""!==wlfmc_l10n.labels.added_to_cart_message&&toastr.success(wlfmc_l10n.labels.added_to_cart_message)}t.message&&""!==t.message&&w(document.body).trigger("add_to_cart_message",[t.message,e])}}}),!1)}),e.on("click",".wlfmc-btn-login-need",function(t){return t.stopImmediatePropagation(),t.preventDefault(),toastr.error(wlfmc_l10n.labels.login_need),!1}),e.on("click",".wlfmc_already_in_wishlist",function(t){return t.stopImmediatePropagation(),t.preventDefault(),toastr.error(wlfmc_l10n.labels.already_in_wishlist_text),!1}),e.on("click",".wlfmc-wishlist-table .remove_from_wishlist",function(t){var a=w(this),t=(t.stopImmediatePropagation(),t.preventDefault(),a.parents(".wlfmc-wishlist-items-wrapper")),n=a.parents("[data-row-id]"),r=n.data("row-id"),s=t.data("id"),t=t.data("token"),t={action:wlfmc_l10n.actions.remove_from_wishlist_action,nonce:a.data("nonce"),context:"frontend",remove_from_wishlist:r,wishlist_id:s,wishlist_token:t};return w.ajax({url:wlfmc_l10n.ajax_url,data:t,method:"post",beforeSend:function(t){"rest_api"===wlfmc_l10n.ajax_mode&&t.setRequestHeader("X-WP-Nonce",wlfmc_l10n.nonce),w.fn.WLFMC.block(n)},complete:function(){w.fn.WLFMC.unblock(n)},success:function(t){if(w.fn.WLFMC.load_fragments(),w.fn.WLFMC.isTrue(t.result)){if(n.addClass("disabled-row"),null!=u){for(var e=u.length,o=0;o<=e-1;o++)if(void 0!==u[o]&&u[o].wishlist_id==s&&u[o].product_id==r){u.splice(o,1),w("body").trigger("wlfmc_removed_from_wishlist",[a,n,t]);break}w.fn.WLFMC.set_products_hash(JSON.stringify(u))}if("undefined"!=typeof product_in_waitlist&&null!==product_in_waitlist){var i=product_in_waitlist.length;for(o=0;o<=i-1;o++)if(void 0!==product_in_waitlist[o]&&product_in_waitlist[o].wishlist_id==s&&product_in_waitlist[o].product_id==r){product_in_waitlist.splice(o,1),w("body").trigger("wlfmc_removed_from_waitlist",[a,n,t]);break}w.fn.WLFMC.set_waitlist_hash(JSON.stringify(product_in_waitlist))}}}}),!1}),e.on("click touchend",".wlfmc-products-counter-wishlist .remove_from_wishlist,.wlfmc-products-counter-waitlist .remove_from_wishlist",function(t){var a=w(this),n=(t.stopImmediatePropagation(),t.preventDefault(),a.parents(".wlfmc-wishlist-items-wrapper")),r=a.parents("[data-row-id]"),s=r.data("row-id"),l=r.data("item-id"),c=r.data("wishlist-id"),t=r.data("wishlist-token"),d=w(".wlfmc-wishlist-form .wlfmc-wishlist-table"),t={action:wlfmc_l10n.actions.remove_from_wishlist_action,nonce:a.data("nonce"),context:"frontend",remove_from_wishlist:s,wishlist_id:c,wishlist_token:t,merge_lists:wlfmc_l10n.merge_lists};return w.ajax({url:wlfmc_l10n.ajax_url,data:t,method:"post",beforeSend:function(t){"rest_api"===wlfmc_l10n.ajax_mode&&t.setRequestHeader("X-WP-Nonce",wlfmc_l10n.nonce),w.fn.WLFMC.loading(a)},complete:function(){w.fn.WLFMC.unloading(a)},success:function(t){if(w.fn.WLFMC.isTrue(t.result)){var e=!1;if(null!=u){for(var o=u.length,i=0;i<=o-1;i++)if(void 0!==u[i]&&u[i].wishlist_id===c&&u[i].product_id===s){u.splice(i,1),w("body").trigger("wlfmc_removed_from_wishlist",[a,r,t]);break}w.fn.WLFMC.set_products_hash(JSON.stringify(u))}if("undefined"!=typeof product_in_waitlist&&null!==product_in_waitlist){for(o=product_in_waitlist.length,i=0;i<=o-1;i++)if(void 0!==product_in_waitlist[i]&&product_in_waitlist[i].wishlist_id===c&&product_in_waitlist[i].product_id===s){product_in_waitlist.splice(i,1),w("body").trigger("wlfmc_removed_from_waitlist",[a,r,t]);break}w.fn.WLFMC.set_waitlist_hash(JSON.stringify(product_in_waitlist))}0<a.closest(".wlfmc-products-counter-wrapper").length&&(w(".wlfmc-products-counter-wrapper").find('[data-item-id="'+l+'"]').remove(),w(".wlfmc-products-counter-wrapper  .products-counter-number").text(t.count),w(".wlfmc-products-counter-wishlist .total-products .wlfmc-total-count").text(t.count),w(".wlfmc-add-to-wishlist.wlfmc-add-to-wishlist-"+s).removeClass("exists")),0<a.closest(".wlfmc-waitlist-counter-wrapper").length&&(w(".wlfmc-waitlist-counter-wrapper").find('[data-item-id="'+l+'"]').remove(),w(".wlfmc-waitlist-counter-wrapper  .products-counter-number").text(t.count),w(".wlfmc-products-counter-waitlist .total-products .wlfmc-total-count").text(t.count),w(".wlfmc-add-to-waitlist.wlfmc-add-to-waitlist-"+s).removeClass("exists")),0<d.length&&parseInt(c)===parseInt(d.attr("data-id"))&&(d.find('[data-item-id="'+l+'"]').addClass("disabled-row"),e=!0),(e=t.count<1||!n.find("[data-row-id]").length?!0:e)&&w.fn.WLFMC.load_fragments()}w.fn.WLFMC.init_handling_after_ajax()}}),!1}),e.on("click",".wlfmc_delete_item",function(t){var o=w(this),e=o.attr("data-product-id"),i=o.attr("data-wishlist-id"),a=o.attr("data-item-id"),n=w(".wlfmc-add-to-wishlist-"+e),e={action:wlfmc_l10n.actions.delete_item_action,context:"frontend",wishlist_id:i,item_id:a};return t.stopImmediatePropagation(),t.preventDefault(),w.ajax({url:wlfmc_l10n.ajax_url,data:e,method:"post",dataType:"json",beforeSend:function(t){"rest_api"===wlfmc_l10n.ajax_mode&&t.setRequestHeader("X-WP-Nonce",wlfmc_l10n.nonce),w.fn.WLFMC.loading(o)},complete:function(){w.fn.WLFMC.unloading(o)},success:function(t){t.fragments;var e=t.message;"true"===t.result&&(n.removeClass("exists"),null!=u&&(u=w.grep(u,function(t){return t.item_id!==parseInt(a)}),w.fn.WLFMC.set_products_hash(JSON.stringify(u)))),o.closest(".wlfmc-remove-button").length||""===w.trim(e)||toastr.error(e),"true"===t.result&&""!==w.trim(wlfmc_l10n.labels.product_removed_text)&&toastr.error(wlfmc_l10n.labels.product_removed_text),w.fn.WLFMC.load_fragments(),w.fn.WLFMC.init_handling_after_ajax(),w("body").trigger("wlfmc_removed_from_wishlist",[o,n,t])}}),!1}),t.on("wlfmc_show_variation",function(t,e){w(t.target);var o,i,a,n,r,s,l=e.product_id,c=e.variation_id,t=w('.wlfmc-add-to-wishlist [data-parent-product-id="'+l+'"]'),d=t.closest(".wlfmc-add-to-wishlist").data("enable-outofstock");l&&c&&t.length&&(d||e.is_in_stock?t.closest(".wlfmc-add-to-wishlist").removeClass("hide"):t.closest(".wlfmc-add-to-wishlist").addClass("hide"),(d=t.closest(".wlfmc-add-to-wishlist").attr("data-popup-id"))&&(d=w("#"+d)).length&&(o=d.data("product-title"),s=wlfmc_l10n.labels.popup_content,i=wlfmc_l10n.labels.popup_title,a=d.data("image-size"),n=d.find(".wlfmc-popup-header img").data("src"),r=d.find(".wlfmc-parent-product-price").html(),r=""!==e.price_html?e.price_html:r,s=(s=s.replace("{product_price}",r)).replace("{product_name}",o),i=(i=i.replace("{product_price}",r)).replace("{product_name}",o),e.image_id&&"true"==d.data("use-featured")&&(n="large"===a?e.image.full_src:"thumbnail"===a?e.image.thumb_src:e.image.src),d.find(".wlfmc-popup-title").html(i),d.find(".wlfmc-popup-desc").html(s),d.find(".wlfmc-popup-header img").attr("src",n)),t.each(function(){var t=w(this),o=t.closest(".wlfmc-add-to-wishlist");t.attr("data-parent-product-id",l),t.attr("data-product-id",c),o.length&&o.removeClass(function(t,e){return e.match(/wlfmc-add-to-wishlist-\S+/g).join(" ")}).addClass("wlfmc-add-to-wishlist-"+c).removeClass("exists"),o.find(".wlfmc-addtowishlist a").attr("href",o.attr("data-add-url").replace("#product_id",c)),o.find(".wlfmc-removefromwishlist a").attr("href",o.attr("data-remove-url").replace("#product_id",c)),w.each(u,function(t,e){void 0!==e&&e.product_id&&e.product_id==c&&(o.addClass("exists"),o.find(".wlfmc_delete_item").attr("data-wishlist-id",e.wishlist_id),o.find(".wlfmc_delete_item").attr("data-item-id",e.item_id))})}))}),t.on("reset_data",function(t){var e,o,i,a,n,r,s=w(t.target).data("product_id"),t=w('.wlfmc-add-to-wishlist [data-parent-product-id="'+s+'"]');s&&t.length&&(t.closest(".wlfmc-add-to-wishlist").removeClass("hide"),(e=t.closest(".wlfmc-add-to-wishlist").attr("data-popup-id"))&&(e=w("#"+e)).length&&(o=e.find(".wlfmc-parent-product-price").html(),i=e.data("product-title"),r=wlfmc_l10n.labels.popup_content,a=wlfmc_l10n.labels.popup_title,n=e.find(".wlfmc-popup-header img").data("src"),r=(r=r.replace("{product_price}",o)).replace("{product_name}",i),a=(a=a.replace("{product_price}",o)).replace("{product_name}",i),e.find(".wlfmc-popup-title").html(a),e.find(".wlfmc-popup-desc").html(r),e.find(".wlfmc-popup-header img").attr("src",n)),t.each(function(){var t=w(this),o=t.closest(".wlfmc-add-to-wishlist");t.attr("data-parent-product-id",s),t.attr("data-product-id",s),o.length&&o.removeClass(function(t,e){return e.match(/wlfmc-add-to-wishlist-\S+/g).join(" ")}).addClass("wlfmc-add-to-wishlist-"+s).removeClass("exists"),o.find(".wlfmc-addtowishlist a").attr("href",o.attr("data-add-url").replace("#product_id",s)),o.find(".wlfmc-removefromwishlist a").attr("href",o.attr("data-remove-url").replace("#product_id",s)),w.each(u,function(t,e){void 0!==e&&e.product_id&&e.product_id==s&&(o.addClass("exists"),o.find(".wlfmc_delete_item").attr("data-wishlist-id",e.wishlist_id),o.find(".wlfmc_delete_item").attr("data-item-id",e.item_id))})}))}),t.on("adding_to_cart","body",function(t,e,o){void 0!==e&&void 0!==o&&e.closest(".wlfmc-wishlist-table,.wlfmc-save-for-later-table").length&&(o.wishlist_id=e.closest(".wlfmc-wishlist-table,.wlfmc-save-for-later-table").data("id"),o.wishlist_type=e.closest(".wlfmc-wishlist-table,.wlfmc-save-for-later-table").data("wishlist-type"),o.customer_id=e.closest(".wlfmc-wishlist-table,.wlfmc-save-for-later-table").data("customer-id"),o.is_owner=e.closest(".wlfmc-wishlist-table,.wlfmc-save-for-later-table").data("is-owner"),"undefined"!=typeof wc_add_to_cart_params&&(wc_add_to_cart_params.cart_redirect_after_add=wlfmc_l10n.redirect_to_cart))}),t.on("added_to_cart","body",function(t,e,o,i){if(void 0!==i&&i.closest(".wlfmc-wishlist-table").length){"undefined"!=typeof wc_add_to_cart_params&&(wc_add_to_cart_params.cart_redirect_after_add=p);var a=(m=(f=i.closest("[data-row-id]")).closest(".wlfmc-wishlist-fragment")).data("fragment-options"),n=f.data("row-id"),r=m.find(".wlfmc-wishlist-table").data("id"),s=(m.find(".wlfmc-wishlist-table").data("token"),m.find(".wlfmc-wishlist-table").data("wishlist-type"));if(i.removeClass("added"),f.find(".added_to_cart").remove(),wlfmc_l10n.remove_from_wishlist_after_add_to_cart&&a.is_user_owner){if(w(".wlfmc-wishlist-form").find('[data-row-id="'+n+'"]').remove(),"wishlist"===s&&null!=u){for(var l=u.length,c=0;c<=l-1;c++)void 0!==u[c]&&u[c].wishlist_id==r&&u[c].product_id==n&&u.splice(c,1);w.fn.WLFMC.set_products_hash(JSON.stringify(u)),w(".wlfmc-products-counter-wrapper").find('[data-row-id="'+n+'"]').remove(),w(".wlfmc-products-counter-wrapper .products-counter-number").text(u.length),w(".wlfmc-products-counter-wishlist .total-products .wlfmc-total-count").text(u.length),w(".wlfmc-add-to-wishlist.wlfmc-add-to-wishlist-"+n).removeClass("exists"),u.length&&0!==u.length&&m.find("[data-row-id]").length||(w(".wlfmc-wishlist-table-wrapper").empty(),w.fn.WLFMC.reload_fragment=!0)}if("waitlist"===s&&"undefined"!=typeof product_in_waitlist&&null!==product_in_waitlist){for(var d=product_in_waitlist.length,c=0;c<=d-1;c++)void 0!==product_in_waitlist[c]&&product_in_waitlist[c].wishlist_id==r&&product_in_waitlist[c].product_id==n&&product_in_waitlist.splice(c,1);w.fn.WLFMC.set_waitlist_hash(JSON.stringify(product_in_waitlist)),w(".wlfmc-waitlist-counter-wrapper").find('[data-row-id="'+n+'"]').remove(),w(".wlfmc-waitlist-counter-wrapper .products-counter-number").text(product_in_waitlist.length),w(".wlfmc-waitlist-counter-wrapper .total-products .wlfmc-total-count").text(product_in_waitlist.length),w(".wlfmc-add-to-waitlist.wlfmc-add-to-waitlist-"+n).removeClass("exists"),product_in_waitlist.length&&0!==product_in_waitlist.length&&m.find("[data-row-id]").length||(w(".wlfmc-wishlist-table-wrapper").empty(),w.fn.WLFMC.reload_fragment=!0)}"lists"===s&&(w.fn.WLFMC.reload_fragment=!0)}}else{var f,m;void 0!==i&&i.closest(".wlfmc-save-for-later-table").length&&(a=(m=(f=i.closest("[data-item-id]")).closest(".wlfmc-wishlist-fragment")).data("fragment-options"),s=f.data("item-id"),i.removeClass("added"),f.find(".added_to_cart").remove(),a.is_user_owner&&(w(".wlfmc-save-for-later-form").find('[data-item-id="'+s+'"]').remove(),w(".wlfmc-save-for-later-items-wrapper .save-for-later-items-wrapper tr").length||w(".wlfmc-save-for-later-table-wrapper").empty()))}}),t.on("add_to_cart_message","body",function(t,e,o){var i=w(".woocommerce-notices-wrapper .woocommerce-error,.woocommerce-notices-wrapper .woocommerce-message");o.removeClass("loading"),0===i.length?w("#wlfmc-wishlist-form").prepend(e):i.fadeOut(300,function(){w(this).closest(".woocommerce-notices-wrapper").replaceWith(e).fadeIn()})}),t.on("cart_page_refreshed","body",w.fn.WLFMC.init_handling_after_ajax),"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch?(e.on("touchstart",".wlfmc-counter-wrapper.show-list-on-hover,.wlfmc-counter-wrapper.show-list-on-click",function(t){o=!1}),e.on("touchmove",".wlfmc-counter-wrapper.show-list-on-hover,.wlfmc-counter-wrapper.show-list-on-click",function(t){o=!0}),e.on("touchend",".wlfmc-counter-wrapper.show-list-on-hover .wlfmc-counter.has-dropdown,.wlfmc-counter-wrapper.show-list-on-click  .wlfmc-counter.has-dropdown",function(t){var e=w(this).closest(".wlfmc-counter-wrapper");e.hasClass("wlfmc-first-touch")?o||w.fn.WLFMC.hide_mini_wishlist.call(w(".wlfmc-counter-wrapper"),t):(t.stopImmediatePropagation(),t.preventDefault(),w.fn.WLFMC.show_mini_wishlist.call(this,t),e.addClass("wlfmc-first-touch"))}),e.on("touchend",":not(.wlfmc-counter-wrapper.show-list-on-hover):not(.wlfmc-counter-wrapper.show-list-on-click)",function(t){0===w(t.target).closest(".wlfmc-counter-wrapper").length&&w.fn.WLFMC.hide_mini_wishlist.call(w(".wlfmc-counter-wrapper"),t)}),e.on("touchend",".wlfmc-counter-wrapper .wlfmc-counter.has-dropdown a:not(.remove_from_wishlist)",function(t){return t.stopImmediatePropagation(),t.preventDefault(),window.location.href=w(this).attr("href"),!1})):(e.on("click",".wlfmc-counter-wrapper.show-list-on-click .wlfmc-counter.has-dropdown",function(t){t.stopImmediatePropagation(),t.preventDefault();t=w(".dropdown_"+w(this).attr("data-id"))||w(this).closest(".wlfmc-counter-wrapper").find(".wlfmc-counter-dropdown");return w.fn.WLFMC.appendtoBody(t.closest(".wlfmc-counter-wrapper")),w.fn.WLFMC.prepare_mini_wishlist(t),t.toggleClass("lists-show"),!1}),t.on("click",function(t){var e=w(".wlfmc-counter-wrapper.show-list-on-click .wlfmc-counter.has-dropdown");e===t.target||e.has(t.target).length||w(".wlfmc-counter-dropdown").removeClass("lists-show")}),e.on("mouseover",".wlfmc-counter-wrapper.show-list-on-hover .wlfmc-counter-dropdown",function(t){return t.stopImmediatePropagation(),t.preventDefault(),w(this).addClass("lists-show"),!1}),e.on("mouseout",".wlfmc-counter-wrapper.show-list-on-hover .wlfmc-counter-dropdown",function(t){return t.stopImmediatePropagation(),t.preventDefault(),w(this).removeClass("lists-show"),!1}),e.on("mouseover",".wlfmc-counter-wrapper.show-list-on-hover .wlfmc-counter.has-dropdown",function(t){t.stopImmediatePropagation(),t.preventDefault();t=w(".dropdown_"+w(this).attr("data-id"))||w(this).closest(".wlfmc-counter-wrapper").find(".wlfmc-counter-dropdown");return w(t).addClass("lists-show"),w.fn.WLFMC.appendtoBody(t.closest(".wlfmc-counter-wrapper")),w.fn.WLFMC.prepare_mini_wishlist(t),!1}),e.on("mouseout",".wlfmc-counter-wrapper.show-list-on-hover .wlfmc-counter.has-dropdown",function(t){t.stopImmediatePropagation(),t.preventDefault();t=w(".dropdown_"+w(this).attr("data-id"));return w(t).removeClass("lists-show"),!1}),w(".wlfmc-counter-wrapper.show-list-on-hover .wlfmc-counter.has-dropdown").hoverIntent({interval:0,timeout:100,over:w.fn.WLFMC.show_mini_wishlist,out:w.fn.WLFMC.hide_mini_wishlist})),w.fn.WLFMC.init_prepare_qty_links(),w.fn.WLFMC.init_wishlist_popup(),w.fn.WLFMC.init_quantity(),w.fn.WLFMC.init_checkbox_handling(),w.fn.WLFMC.init_copy_wishlist_link(),w.fn.WLFMC.init_tooltip(),w.fn.WLFMC.init_components(),w.fn.WLFMC.init_popups(),w.fn.WLFMC.init_popup_checkbox_handling()}).trigger("wlfmc_init"),w(document).on("jet-filter-content-rendered",w.fn.WLFMC.reInit_wlfmc).on("jet-woo-builder-content-rendered",w.fn.WLFMC.reInit_wlfmc).on("jet-engine/listing-grid/after-load-more",w.fn.WLFMC.reInit_wlfmc).on("jet-engine/listing-grid/after-lazy-load",w.fn.WLFMC.reInit_wlfmc).on("jet-cw-loaded",w.fn.WLFMC.reInit_wlfmc),w(document).ready(w.fn.WLFMC.load_fragments),w(document).on("deContentLoaded",w.fn.WLFMC.load_fragments),w(document).on("wooco_gallery_loaded",function(t,e){e&&w('*[id^="add_to_waitlist_popup_'+e+'_"].popup_wrapper').remove()});new MutationObserver(function(t){t.forEach(function(t){0<w(".woocommerce-product-gallery__wrapper .wlfmc-top-of-image").length&&w.fn.WLFMC.init_fix_on_image_single_position(),0<w(".pp-single-product .entry-summary > .wlfmc-top-of-image").length&&0<w(".pp-single-product .entry-summary .single-product-image").length&&w(".pp-single-product").each(function(){var t=w(this).find(".wlfmc-top-of-image"),e=w(this).find(".single-product-image");0<t.length&&0<e.length&&t.appendTo(e)})})}).observe(w("body")[0],{childList:!0,subtree:!0}),w(window).on("scroll resize",function(){w(".wlfmc-counter-dropdown").each(function(){w.fn.WLFMC.prepare_mini_wishlist(w(this))})});var i,r=!0,s=wlfmc_l10n.wishlist_hash_key,l=s+"_products",c=s+"_lang";try{r="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wlfmc","test"),window.sessionStorage.removeItem("wlfmc"),window.localStorage.setItem("wlfmc","test"),window.localStorage.removeItem("wlfmc")}catch(t){r=!1}if(wlfmc_l10n.is_cache_enabled&&wlfmc_l10n.is_page_cache_enabled&&w.fn.WLFMC.table_block(),r){w(window).on("storage onstorage",function(t){l===t.originalEvent.key&&localStorage.getItem(l)!==sessionStorage.getItem(l)&&w.fn.WLFMC.load_fragments()}),w(window).on("pageshow",function(t){t.originalEvent.persisted&&w.fn.WLFMC.load_fragments()});try{if(wlfmc_l10n.is_cache_enabled)throw"Need Update wishlist data";if(wlfmc_l10n.update_wishlists_data||null!==e&&e!==localStorage.getItem(c)||localStorage.getItem(l)!==JSON.stringify(o))throw localStorage.setItem(l,""),localStorage.setItem(c,""),w.fn.WLFMC.check_products(o),"Need Update wishlist data";localStorage.getItem(l)&&(i=JSON.parse(localStorage.getItem(l)),"object"===_typeof(i)&&null!==i&&w.fn.WLFMC.check_products(i)),w.fn.WLFMC.unblock(w(".wlfmc-wishlist-table-wrapper, .wlfmc-save-for-later-table-wrapper")),w("#wlfmc-lists,#wlfmc-wishlist-form").addClass("on-first-load")}catch(t){console.log(t),w.fn.WLFMC.load_fragments()}}else w.fn.WLFMC.load_fragments();"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){w.fn.WLFMC.load_fragments()})})},{}]},{},[1]);