(()=>{var e,r={1425:()=>{jQuery(document).ready(function(e){"use strict";e(document).on("click",".cfw-refund-offer-button",function(r){r.preventDefault();const n=e(this),a=n.data("order-id"),o=n.data("bump-id"),f=n.data("item-id"),d=n.data("product-name");confirm(cfwOfferRefund.i18n.confirmRefund)&&(n.prop("disabled",!0),n.addClass("cfw-refunding"),n.text(cfwOfferRefund.i18n.processing),e.ajax({url:cfwOfferRefund.ajaxUrl,type:"POST",dataType:"json",data:{action:"cfw_admin_refund_offer",_wpnonce:cfwOfferRefund.nonce,order_id:a,bump_id:o,item_id:f}}).done(function(r){if(r.success)n.removeClass("cfw-refunding"),n.replaceWith('<span class="cfw-offer-refunded">'+cfwOfferRefund.i18n.refunded+"</span>"),r.data&&r.data.message&&alert(r.data.message),e(document).trigger("cfw_offer_refunded",{orderId:a,bumpId:o,itemId:f,productName:d});else{const e=r.data&&r.data.message?r.data.message:"An error occurred while processing the refund.";alert(e),n.prop("disabled",!1),n.removeClass("cfw-refunding"),n.text("Refund")}}).fail(function(){alert("An error occurred while processing the refund. Please try again."),n.prop("disabled",!1),n.removeClass("cfw-refunding"),n.text("Refund")}))})})},3112:()=>{}},n={};function a(e){var o=n[e];if(void 0!==o)return o.exports;var f=n[e]={exports:{}};return r[e](f,f.exports,a),f.exports}a.m=r,e=[],a.O=(r,n,o,f)=>{if(!n){var d=1/0;for(s=0;s<e.length;s++){for(var[n,o,f]=e[s],t=!0,c=0;c<n.length;c++)(!1&f||d>=f)&&Object.keys(a.O).every(e=>a.O[e](n[c]))?n.splice(c--,1):(t=!1,f<d&&(d=f));if(t){e.splice(s--,1);var i=o();void 0!==i&&(r=i)}}return r}f=f||0;for(var s=e.length;s>0&&e[s-1][2]>f;s--)e[s]=e[s-1];e[s]=[n,o,f]},a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={852:0,335:0};a.O.j=r=>0===e[r];var r=(r,n)=>{var o,f,[d,t,c]=n,i=0;if(d.some(r=>0!==e[r])){for(o in t)a.o(t,o)&&(a.m[o]=t[o]);if(c)var s=c(a)}for(r&&r(n);i<d.length;i++)f=d[i],a.o(e,f)&&e[f]&&e[f][0](),e[f]=0;return a.O(s)},n=globalThis.webpackChunkcheckout_for_woocommerce=globalThis.webpackChunkcheckout_for_woocommerce||[];n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),a.O(void 0,[335],()=>a(1425));var o=a.O(void 0,[335],()=>a(3112));o=a.O(o)})();