!function(t){function e(){t(".better-payment-user-dashboard-sidebar").fadeOut(500),t(".better-payment .bp-overlay").fadeOut()}t(document).on("change",".better-payment .payment-form-layout-3 .payment-method-checkbox input",function(){if(this.checked){t(".better-payment .payment-form-layout-3 .payment-method-checkbox").removeClass("active"),t(this).parent().addClass("active"),t(".better-payment .payment-form-layout-3 .payment-method-checkbox input").removeAttr("checked"),t(this).attr("checked",!0);let e="better-payment-paypal-bt",a="better-payment-stripe-bt",n="better-payment-paystack-bt",o=t(this).hasClass("layout-payment-method-paypal")?e:a;o=t(this).hasClass("layout-payment-method-paystack")?n:o,t(".better-payment ."+e+", .better-payment ."+a+", .better-payment ."+n).addClass("is-hidden"),t(".better-payment ."+o).removeClass("is-hidden")}}),t(document).on("change",".better-payment .payment-form-layout-1 .payment-method-checkbox input, .better-payment .payment-form-layout-2 .payment-method-checkbox input, .better-payment .payment-method-item input",function(e){if(this.checked){let e="better-payment-paypal-bt",a="better-payment-stripe-bt",n="better-payment-paystack-bt",o=t(this).hasClass("layout-payment-method-paypal")?e:a;o=t(this).hasClass("layout-payment-method-paystack")?n:o,t(".better-payment ."+e+", .better-payment ."+a+", .better-payment ."+n).addClass("is-hidden"),t(".better-payment ."+o).removeClass("is-hidden")}}),t(document).on("click",".better-payment .bp-modal-button",function(e){e.preventDefault();let a=t(this).attr("data-targetwrap");t("."+a+" .modal").addClass("is-active")}),t(document).on("click",".better-payment .modal-background, .better-payment .modal-close, .better-payment .delete, .better-payment .bp-modal .cancel-button",function(e){e.preventDefault();let a=t(this).closest(".bp-modal .modal");t(a).removeClass("is-active")}),t(document).on("click",".better-payment .user-dashboard-sidebar .bp--sidebar-nav",function(a){a.preventDefault();let n=t(this),o=n.data("tab");t(".better-payment .user-dashboard-sidebar .bp--sidebar-nav").removeClass("active"),t(".better-payment .bp--tab-conetnt-wrapper").addClass("d-none").fadeOut(),n.addClass("active"),t(`.better-payment .${o}-tab-wrapper`).fadeIn(500).removeClass("d-none"),window.innerWidth<768&&t(a.target).closest(".bp--sidebar-nav-list").length&&e()}),t(document).on("click",".better-payment .bp-view_all-btn",function(e){e.preventDefault(),t(".better-payment .bp--sidebar-nav.subscriptions-tab").click()}),t(".better-payment .bp-dashboard-hamburger").on("click",function(e){t(".better-payment-user-dashboard-sidebar").fadeIn(500),t(".better-payment .bp-overlay").fadeIn(500)}),t(".better-payment .bp-overlay").on("click",function(t){".better-payment-user-dashboard-sidebar"!==t.target&&e()}),t(document).on("click",".bp-transaction_data-copy_btn",function(){!function(){const e=t(".bp-transaction_id"),a=t(".bp-transaction_data-copy_btn");if(e.length){const n=t.trim(e.text());navigator.clipboard.writeText(n),a.css("stroke","#6B59EE");const o="copy-tooltip-style";let r=t("#"+o);r.length||(r=t("\n \n \n ${t.outerHTML}\n \n \n `),n.close(),e.contentWindow.focus(),setTimeout(()=>{e.contentWindow.print(),setTimeout(()=>document.body.removeChild(e),1e3)},300)}()})}(jQuery);