1!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";var t;(t=jQuery)(document).ready((function(){var i=t("body"),s="addonify-wishlist",e=t("#adfy-wl-sidebar-container"),d=t("#addonify-wishlist-table"),a=0,o="",n="",l="",r="",h="",c=i.addonifyWishlistInit(addonifyWishlistJSObject);c.init();var u={setWishlistData:function(){localStorage.setItem(s+"_"+addonifyWishlistJSObject.thisSiteUrl+"_product_ids",JSON.stringify(l))},setDefaultWishlist:function(){if(l=this.getWishlistData(),n=this.getRawWishlistData(),0===l.length){var t=new Date,i={id:0,name:addonifyWishlistJSObject.defaultWishlistName,visibility:"private",created_at:t.getTime(),product_ids:[]};return l.push(i),this.setWishlistData(l),!!this.isWishlistDataSaved()&&i}return!1},getRawWishlistData:function(){return localStorage.getItem(s+"_"+addonifyWishlistJSObject.thisSiteUrl+"_product_ids")},getWishlistData:function(){var t,i=this.getRawWishlistData();if(null===i)return[];try{t=JSON.parse(i)}catch(t){console.log(t.message)}return Array.isArray(t)?t:[]},isWishlistDataSaved:function(){return JSON.stringify(n)!==l},addToWishlist:function(t){t=parseInt(t),l=this.getWishlistData(),n=this.getRawWishlistData();var i=this.getProducts();return i.push(t),l[0].product_ids=i,this.setWishlistData(),!!this.isWishlistDataSaved()},removeFromWishlist:function(t){t=parseInt(t),l=this.getWishlistData(),n=this.getRawWishlistData();var i=this.getProducts(),s=i.indexOf(t);return-1!==s&&i.splice(s,1),l[0].product_ids=i,this.setWishlistData(),!!this.isWishlistDataSaved()},emptyWishlist:function(){return l=this.getWishlistData(),n=this.getRawWishlistData(),l[0].product_ids=[],this.setWishlistData(),!!this.isWishlistDataSaved()},isProductInWishlist:function(t){t=parseInt(t);var i=!1,s=this.getProducts();return-1!==s.indexOf(t)&&(i=s.indexOf(t)),i},getProductsCount:function(){return this.getProducts().length},getProducts:function(){var t=this.getWishlistData();if(void 0!==t[0]){var i=t[0].product_ids;return i.reverse(),i}return[]}};function f(){if(t(document).trigger("addonify_adding_to_wishlist",[{thisButton:r}]),!1!==u.isProductInWishlist(a))"1"===addonifyWishlistJSObject.removeAlreadyAddedProductFromWishlist?(h=r,W()):(c.displayModal(addonifyWishlistJSObject.alreadyInWishlistModal,{product_name:o}),addonifyWishlistUpdateButton("already-in-wishlist",r));else if(u.addToWishlist(a),u.isWishlistDataSaved()){var i=u.getProductsCount();t(document).trigger("addonify_added_to_wishlist",[{productID:a,itemsCount:i,thisButton:r,modalContentUpdateData:{product_name:o}}]);var s={action:addonifyWishlistJSObject.getGuestSidebarTableProductRowAction,product_id:a,nonce:addonifyWishlistJSObject.nonce};e.length>0&&(s.has_wishlist_sidebar=!0),d.length>0&&(s.has_wishlist_table=!0),t.post(addonifyWishlistJSObject.ajaxURL,s).done((function(t){t.success?(t.hasOwnProperty("sidebarProductRowContent")&&c.addWishlistSidebarProductRow(t.sidebarProductRowContent),t.hasOwnProperty("tableProductRowContent")&&c.addWishlistTableProductRow(t.tableProductRowContent),c.updateWishlistSidebarElements(i)):c.displayModal(addonifyWishlistJSObject.errorModal,{error_message:t.message})}))}else c.displayModal(addonifyWishlistJSObject.errorModal,{error_message:addonifyWishlistJSObject.errorAddingProductToWishlistModalMessage,product_name:o});c.hideLoader()}function W(){if(t(document).trigger("addonify_removing_from_wishlist",[{thisButton:h}]),!1!==u.isProductInWishlist(a))if(u.removeFromWishlist(a),u.isWishlistDataSaved()){var i=u.getProductsCount();t(document).trigger("addonify_removed_from_wishlist",[{productID:a,productName:o,itemsCount:i,thisButton:h,modalContentUpdateData:{product_name:o}}])}else c.displayModal(addonifyWishlistJSObject.errorModal,{error_message:addonifyWishlistJSObject.errorRemovingProductFromWishlistModalMessage,product_name:o});else c.displayModal(addonifyWishlistJSObject.alreadyInWishlistModal,{product_name:o}),addonifyWishlistUpdateButton("already-in-wishlist",h);c.hideLoader()}function y(t){a=t.data("product_id"),o=t.data("product_name")}({init:function(){null===u.getRawWishlistData()&&u.setDefaultWishlist(),"1"!==addonifyWishlistJSObject.requireLogin&&"1"!==addonifyWishlistJSObject.enabledMultiWishlist&&(u.getProducts().forEac
1h((function(i,s){var e=t('.adfy-wl-btn[data-product_id="'+i+'"]');c.updateWishlistButtons(e,"already-in-wishlist")})),"1"!==addonifyWishlistJSObject.enabledMultiWishlist&&function(){c.displayLoader();var i=u.getProducts(),s=u.getProductsCount();if(e.length>0||d.length>0){var a={action:addonifyWishlistJSObject.getGuestWishlistContent,product_ids:JSON.stringify(i),nonce:addonifyWishlistJSObject.nonce};e.length>0&&(a.has_wishlist_sidebar=!0),d.length>0&&(a.has_wishlist_table=!0),t.post(addonifyWishlistJSObject.ajaxURL,a).done((function(i){i.success?(i.hasOwnProperty("sidebarContent")&&t("#adfy-wl-sidebar-items").length>0&&t("#adfy-wl-sidebar-items").html(i.sidebarContent),i.hasOwnProperty("tableContent")&&t("#adfy-wl-content").length>0&&t("#adfy-wl-content").html(i.tableContent)):c.displayModal(addonifyWishlistJSObject.errorModal,{error_message:i.message})})),c.updateWishlistSidebarElements(s),c.updateWishlistTableElements(s)}c.hideLoader()}()),this.onAddToWishlist(),this.onRemoveFromWishlist(),this.addedToCartEventHandler(),this.undoEventsHandler()},onAddToWishlist:function(){"1"!==addonifyWishlistJSObject.enabledMultiWishlist&&i.on("click",".adfy-wl-ajax-add-to-wishlist, .adfy-wl-add-to-wishlist",(function(i){i.preventDefault(),"1"!==addonifyWishlistJSObject.isLoginRequired?addonifyWishlistJSObject.hasOwnProperty("enabledAWP")||((r=t(this)).addClass("loading"),y(r),r.hasClass("added-to-wishlist")?"1"===addonifyWishlistJSObject.removeAlreadyAddedProductFromWishlist?(h=r,W()):c.displayModal(addonifyWishlistJSObject.alreadyInWishlistModal,{product_name:o}):f(),r.removeClass("loading")):"show_popup"===addonifyWishlistJSObject.ifNotLoginAction?c.displayModal(addonifyWishlistJSObject.loginRequiredModal):window.location.href=addonifyWishlistJSObject.loginURL}))},onRemoveFromWishlist:function(){"1"!==addonifyWishlistJSObject.enabledMultiWishlist&&(t(document).on("click",".addonify-wishlist-ajax-remove-from-wishlist, .addonify-wishlist-remove-from-wishlist",(function(i){i.preventDefault(),y(h=t(this)),W()})),t(document).on("click","#addonify-wishlist__clear-all",(function(t){t.preventDefault(),c.displayModal(addonifyWishlistJSObject.confirmClearWishlistModal)})),t(document).on("click","#adfy-wl-modal-confirm-clear-wl-btn",(function(i){i.preventDefault(),c.displayLoader(),u.emptyWishlist()?(t(document).trigger("addonify_wishlist_emptied"),c.displayModal(addonifyWishlistJSObject.successModal,{success_message:addonifyWishlistJSObject.wishlistEmptiedModalMessage})):c.displayModal(addonifyWishlistJSObject.errorModal,{error_message:addonifyWishlistJSObject.errorEmptyingWishlistModalMessage}),c.hideLoader()})))},undoEventsHandler:function(){"1"!==addonifyWishlistJSObject.enabledMultiWishlist&&i.on("click","#addonify-wishlist-undo-deleted-product-link",(function(i){i.preventDefault(),r=t(this),f()}))},addedToCartEventHandler:function(){"1"!==addonifyWishlistJSObject.enabledMultiWishlist&&t(document).on("added_to_cart",(function(t,i,s,e){a=e.data("product_id"),"1"===addonifyWishlistJSObject.removeFromWishlistAfterAddedToCart&&!1!==u.isProductInWishlist(a)&&(h=e,y(e),W())}))}}).init()}))}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.