(function(e){e&&e(function(){var t=e(`#buymecoffee-deactivate-modal`),n=``,r=window.buymecoffee_deactivate||{},i=r.plugin_basename||`buy-me-coffee/buy-me-coffee.php`,a=!1;if(!t.length)return;function o(e){var t=e.getAttribute(`href`)||``;if(!t||t.indexOf(`action=deactivate`)===-1)return!1;try{t=decodeURIComponent(t)}catch{return!1}return t.indexOf(`plugin=`+i)!==-1||t.indexOf(i)!==-1}function s(e){n=e,t.fadeIn(120),t.find(`.bmc-deactivate-dialog`).attr(`tabindex`,`-1`).trigger(`focus`)}function c(){t.fadeOut(100)}function l(){n&&(window.location.href=n)}function u(){return{action:`buymecoffee_deactivation_feedback`,nonce:r.nonce||``,reasons:t.find(`input[name="bmc_reason[]"]:checked`).map(function(){return this.value}).get(),feature_missing:e.trim(e(`#bmc-field-feature`).val()||``),other_details:e.trim(e(`#bmc-field-other`).val()||``)}}e(`a`).filter(function(){return o(this)}).on(`click.buymecoffeeDeactivate`,function(e){e.preventDefault(),s(this.href)}),t.on(`change`,`input[name="bmc_reason[]"]`,function(){var n=e(this).data(`show`);t.find(`.bmc-deactivate-error`).hide(),n&&e(`#`+n).toggle(this.checked)}),t.on(`click`,`.bmc-deactivate-overlay, #bmc-cancel-deactivate`,function(e){e.preventDefault(),c()}),t.on(`click`,`#bmc-skip-deactivate`,function(e){e.preventDefault(),l()}),t.on(`click`,`#bmc-submit-deactivate`,function(n){var i=e(this),o=i.text();if(n.preventDefault(),!t.find(`input[name="bmc_reason[]"]:checked`).length){t.find(`.bmc-deactivate-error`).show();return}a||(a=!0,i.prop(`disabled`,!0).text(`Submitting...`),e.ajax({url:r.ajax_url||window.ajaxurl||`/wp-admin/admin-ajax.php`,method:`POST`,data:u()}).always(function(){i.prop(`disabled`,!1).text(o),l()}))}),e(document).on(`keydown.buymecoffeeDeactivate`,function(e){e.key===`Escape`&&t.is(`:visible`)&&c()})})})(window.jQuery);