2023-03-17 22:34:04 +00:00
|
|
|
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(n,o,function(t){return e[t]}.bind(null,o));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=208)}({1:function(e,t){e.exports=jQuery},177:function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return n}));var n=function(){e.post(ajaxurl,{action:"edd_recapture_remote_install"},(function(e){e.success||!confirm(e.data.error)?window.location.href="https://recapture.io/register":location.reload()}))}}).call(this,a(1))},208:function(e,t,a){"use strict";a.r(t),function(e,t){var n=a(177),o=(a(209),{init:function(){this.general(),this.misc(),this.gateways(),this.emails()},general:function(){var t,a=e(".edd-color-picker");a.length&&a.wpColorPicker(),window.formfield="",e(document.body).on("click",".edd_settings_upload_button",(function(a){a.preventDefault();var n=e(this);window.formfield=e(n.data("input")),t||((t=wp.media.frames.file_frame=wp.media({title:n.data("uploader_title"),library:{type:"image"},button:{text:n.data("uploader_button_text")},multiple:!1})).on("menu:render:default",(function(e){e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.unset("playlist"),e.unset("video-playlist"),e.set({})})),t.on("select",(function(){t.state().get("selection").each((function(e,t){e=e.toJSON(),window.formfield.val(e.url)}))}))),t.open()})),window.formfield=""},misc:function(){var t=e('select[name="edd_settings[download_method]"]'),a=t.parent().parent().next(),n=e('input[name="edd_settings[allow_tracking]"]');"direct"===t.val()&&(a.css("opacity","0.4"),a.find("input").prop("checked",!1).prop("disabled",!0)),t.on("change",(function(){"direct"===e(this).val()?(a.css("opacity","0.4"),a.find("input").prop("checked",!1).prop("disabled",!0)):(a.find("input").prop("disabled",!1),a.css("opacity","1"))})),n.on("change",(function(){e(".allow_tracking.edd-heart").toggleClass("edd-hidden")}))},gateways:function(){e('#edd-payment-gateways input[type="checkbox"]').on("change",(function(){var t=e(this).data("gateway-key"),a=e("#edd_settings\\[default_gateway\\]"),n=a.find('option[value="'+t+'"]');n.prop("disabled",(function(e,t){return!t})),n.prop("selected")&&n.prop("selected",!1),a.trigger("chosen:updated")}))},emails:function(){e("#edd-recapture-connect").on("click",(function(t){t.preventDefault(),e(this).html(edd_vars.wait+' <span class="edd-loading"></span>'),document.body.style.cursor="wait",Object(n.a)()}));var t=e('select[name="edd_settings[email_summary_recipient]"]'),a=t.val(),o=e('textarea[name="edd_settings[email_summary_custom_recipients]"]').parents("tr"),d=e("#edd-send-test-summary-save-changes-notice"),c=e("#edd-send-test-summary"),s=e("#edd-send-test-summary-notice");t.on("change",(function(){o.toggleClass("hidden"),c.removeClass("hidden updated-message"),s.empty(),d.empty(),a!==t.val()&&(c.addClass("hidden"),d.html('<div class="notice notice-info"><p>'+edd_vars.test_email_save_changes+"</p></div>"))})),c.on("click",(function(t){t.preventDefault(),e.ajax({type:"GET",dataType:"json",url:ajaxurl,data:{action:"edd_send_test_email_summary"},beforeSend:function(){s.empty(),c.addClass("updating-message").prop("disabled",!0)},success:function(e){"error"==e.status?s.html('<div class="updated '+e.status+'"><p>'+e.message+"</p></div>"):(c.addClass("updated-message"),setTimeout((function(){c.remo
|