!function(){"use strict";var e={d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{cartTotalsInit:function(){return n}});const o=".shipping-calculator-button",n=e=>{const t=e||window?.diviModuleCartTotalsData;if(Array.isArray(t))t.forEach((({selector:e})=>{const t=document.querySelector(e);t instanceof HTMLElement&&i(t)}));else{document.querySelectorAll(".et_pb_wc_cart_totals").forEach((e=>{e instanceof HTMLElement&&i(e)}))}},i=e=>{const t=e.querySelectorAll(o);if(!t.length)return;t.forEach((e=>{const t=e.cloneNode(!0);e.parentNode&&e.parentNode.replaceChild(t,e)}));e.querySelectorAll(o).forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault(),r(e)}))})),l(e)},r=e=>{const t=e.nextElementSibling;if(!(t instanceof HTMLElement&&t.classList.contains("shipping-calculator-form")))return;const{jQuery:o}=window;if(void 0!==o&&o)o(t).slideToggle("fast");else{const e="none"!==t.style.display&&"none"!==window.getComputedStyle(t).display;t.style.display=e?"none":"block"}if(e instanceof HTMLElement){const t="true"===e.getAttribute("aria-expanded");e.setAttribute("aria-expanded",String(!t))}},l=e=>{const{jQuery:t}=window;if(void 0===window.wc_country_select_params||void 0===t||!t)return;const o=e.querySelectorAll(".woocommerce-shipping-calculator");if(o.length)try{t(o).trigger("wc_country_select_init")}catch(e){console.warn("Failed to initialize WooCommerce country select:",e)}};"diviModuleCartTotalsInit"in window||Object.defineProperty(window,"diviModuleCartTotalsInit",{value:n,writable:!1}),"diviModuleCartTotalsReinit"in window||Object.defineProperty(window,"diviModuleCartTotalsReinit",{value:n,writable:!1}),((window.divi=window.divi||{}).moduleLibrary=window.divi.moduleLibrary||{}).moduleLibraryScriptWoocommerceCartTotals=t}();