(()=>{"use strict";var e,t,o;e=jQuery,t=function(){e.ajax({method:"POST",url:repetito.ajax_url,accepts:"application/json",data:{nonce:repetito.nonce,action:"repetito_apply_reload"},success:function(t){var o=e('#repetito, div[class*="repetito-fee"]');0==t.data.show?o.hide():o.show()}})},(o=new MutationObserver((function(t){o.disconnect(),t.forEach((function(t){t.addedNodes.length&&e(t.addedNodes).find('input[data-name="repetito_fee"]').each((function(t,o){var a=wc.wcSettings.getSetting("repetito/div","").replace("{NAME}",repetito_l10n.name).replace("{DESC}",repetito_l10n.desc).replace("{DESC_LONG}",repetito_l10n.desc_long);e(o).parent().after(a)}))})),o.observe(document.body,{childList:!0,subtree:!0})}))).observe(document.body,{childList:!0,subtree:!0}),repetito.ajax_url&&t(),e(document).on("change",'input[data-name="repetito_fee"], input[name="repetito_fee"]',(function(){var t=!0===e(this).prop("checked")?1:0;e.ajax({method:"POST",url:repetito.ajax_url,accepts:"application/json",data:{nonce:repetito.nonce,action:"repetito_apply_fee",applyFee:t},success:function(t){e("body").trigger("update_checkout"),wp.data.dispatch("wc/store/cart").invalidateResolutionForStore()}})})),e(document).on("updated_checkout",(function(){t()}))})();
//# sourceMappingURL=repetito.js.map