PageSourceSearch

https://extraordinarybananapudding.com/wp-content/plugins/wp-cafe/…/js/wpc-popup.js?ver=a239838d7831cda995aa

js extraordinarybananapudding.com collected 2026-10-09 00:41:48 UTC 4,593 bytes, 1 lines download raw bytes

1(()=>{"use strict";!function(){if(void 0!==window.wpc_obj){var t=window.jQuery,e="#popup_wrapper",a=".wpc_variation_popup_content",o=!1,n=!1;window.wpc_add_to_cart=c,document.addEventListener("click",function(n){var r=n.target.closest(".customize_button");if(r&&(n.preventDefault(),!o)){var i=parseInt(r.dataset.product_id,10);if(i){c();var d=document.querySelector(a);if(d){d.innerHTML="";var s=new FormData;s.append("action","variaion_product_popup_content"),s.append("product_id",i),s.append("wpc_action","variation_popup"),s.append("security",wpc_obj.product_popup_nonce),o=!0,r.classList.add("loading"),fetch(wpc_obj.ajax_url,{method:"POST",body:s}).then(function(t){return t.text()}).then(function(a){var o;try{o=JSON.parse(a)}catch(t){return}if(o&&!1!==o.success){var n,r;try{n=JSON.parse(o.data.data)}catch(t){n=o.data.data}if((r=document.querySelector(e))&&(r.style.removeProperty("display"),"none"===getComputedStyle(r).display&&(r.style.display="block"),r.style.opacity="0",r.style.transition="opacity 300ms ease",r.offsetWidth,requestAnimationFrame(function(){r.style.opacity="1"})),d.innerHTML=n,t){var c=t(d).find(".variations_form");c.length&&"function"==typeof t.fn.wc_variation_form&&(c.each(function(){t(this).wc_variation_form()}),c.trigger("check_variations"),c.trigger("reset_image")),void 0!==t.fn.wc_product_gallery&&t(d).find(".woocommerce-product-gallery").each(function(){t(this).wc_product_gallery()}),t(document).trigger("wpcafe:modal_opened",[{$modal:t(d),product_id:i}])}}}).catch(function(){}).finally(function(){o=!1,r.classList.remove("loading")})}}}}),document.addEventListener("click",function(t){t.target.closest(e+" .wpc-close")&&(t.preventDefault(),i())}),document.addEventListener("mouseup",function(t){var a=document.querySelector(e);if(a&&null!==a.offsetParent){var o=document.querySelector(".wpc-popup-wrap");
1o&&o!==t.target&&!o.contains(t.target)&&i()}})}function r(e){var a=e.target.closest("form.cart");if(a){var o={};new FormData(a).forEach(function(t,e){o[e]=t});var n=parseInt(o.variation_id,10)||0,r=a.classList.contains("variations_form");if(r&&n<=0){e.preventDefault();var c=a.querySelector(".wc-no-matching-variations");window.alert((c&&c.textContent||"Please select an option").trim())}else{var i=a.querySelector(".single_add_to_cart_button"),d=o.product_id||o["add-to-cart"]||a.dataset.product_id||i&&i.value;if(r||d){var s,u,p=a.querySelector(".button");r?(s=window.wpc_obj&&wpc_obj.ajax_url||"/wp-admin/admin-ajax.php",u=Object.assign({},o,{action:"wpcafe_popup_add_to_cart",security:window.wpc_obj&&wpc_obj.product_popup_nonce||"",product_id:o.product_id||a.dataset.product_id,variation_id:n,quantity:o.quantity||1})):(s="/?wc-ajax=add_to_cart","undefined"!=typeof wc_add_to_cart_params&&wc_add_to_cart_params.wc_ajax_url&&(s=wc_add_to_cart_params.wc_ajax_url.replace("%%endpoint%%","add_to_cart")),u=Object.assign({},o,{product_id:d,quantity:o.quantity||1,variation_id:n>0?n:0})),delete u["add-to-cart"],e.preventDefault(),p&&(p.classList.remove("added"),p.classList.add("loading"));var l=new URLSearchParams;Object.keys(u).forEach(function(t){void 0!==u[t]&&null!==u[t]&&l.append(t,u[t])}),fetch(s,{method:"POST",body:l}).then(function(t){return t.json()}).then(function(e){if(e){var o=!1===e.success?e.data||{}:e;if(o.error&&o.product_url)window.location=o.product_url;else if(!1!==e.success){var n=e.fragments||e.data&&e.data.fragments;n&&Object.keys(n).forEach(function(t){var e=n[t];document.querySelectorAll(t).forEach(function(t){t.insertAdjacentHTML("beforebegin",e),t.remove()})}),t&&(t(document.body).trigger("wc_fragment_refresh"),t(document.body).trigger("added_to_cart",[n,e.cart_hash||e.data&&e.data.cart_hash,t(a)])),p&&(p.classList.remove("loading"),p.classList.add("added"));var r=a.closest("#product_popup"),c=r&&r.querySelector(".wpc-close");c&&c.click()}else window.alert(o.message||"Could not add to cart.")}}).catch(function(){}).finally(function(){p&&p.classList.remove("loading")})}}}}function c(){n||(n=!0,document.addEventListener("submit",r))}function i(){!function(t,e){if(t)if("none"!==getComputedStyle(t).display){t.style.transition="opacity 200ms ease",t.style.opacity="1",t.offsetWidth,requestAnimationFrame(function(){t.style.opacity="0"});var a=!1,o=function(n){(!n||n.target===t&&"opacity"===n.propertyName)&&(a||(a=!0,t.style.display="none",t.removeEventListener("transitionend",o),e&&e()))};t.addEventListener("transitionend",o),setTimeout(o,260)}else e&&e();else e&&e()}(document.querySelector(e),function(){var t=document.querySelector(a);t&&(t.innerHTML="",t.removeAttribute("style"))})}}()})();

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.