2023-03-17 22:34:04 +00:00
|
|
|
!function(e){var t={};function d(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,d),n.l=!0,n.exports}d.m=e,d.c=t,d.d=function(e,t,a){d.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.t=function(e,t){if(1&t&&(e=d(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(d.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)d.d(a,n,function(t){return e[t]}.bind(null,n));return a},d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,"a",t),t},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d.p="",d(d.s=231)}({1:function(e,t){e.exports=jQuery},13:function(e,t,d){"use strict";(function(e){d.d(t,"a",(function(){return a})),d.d(t,"b",(function(){return o}));var a=function(e){var t,d=e;switch(e){case"amex":d="americanexpress",t=32;break;default:t=50}return"\n <svg\n width=".concat(t,"\n height=",32,'\n class="payment-icon icon-').concat(d,'"\n role="img"\n >\n <use\n href="#icon-').concat(d,'"\n xlink:href="#icon-').concat(d,'">\n </use>\n </svg>')},n=0;function o(t){if("1"==edd_global_vars.taxes_enabled){var d=e("#edd_cc_address"),a=d.find("#billing_country").val(),o=d.find("#card_address").val(),r=d.find("#card_address_2").val(),c=d.find("#card_city").val(),i=d.find("#card_state").val();t||(t=i);var l={action:"edd_recalculate_taxes",card_address:o,card_address_2:r,card_city:c,card_zip:d.find("#card_zip").val(),state:t,billing_country:a,nonce:e("#edd-checkout-address-fields-nonce").val(),current_page:edd_global_vars.current_page},s=e("#edd_purchase_submit [type=submit]");s.siblings(".edd-loading-ajax.edd-recalculate-taxes-loading").length||s.after('<span class="edd-loading-ajax edd-recalculate-taxes-loading edd-loading"></span>');var u=++n;return e.ajax({type:"POST",data:l,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(t){if(u===n){t.html&&e("#edd_checkout_cart_form").replaceWith(t.html),e(".edd_cart_amount").html(t.total);var d=new Object;d.postdata=l,d.response=t,e("body").trigger("edd_taxes_recalculated",[d])}e(".edd-recalculate-taxes-loading").remove()}}).fail((function(t){window.console&&window.console.log&&(console.log(t),u===n&&e("body").trigger("edd_taxes_recalculated",[tax_data]))}))}}}).call(this,d(1))},231:function(e,t,d){"use strict";d.r(t),d(232);var a=d(13);window.recalculate_taxes=a.b,window.EDD_Checkout=function(e){var t,d,n;function o(d){d.preventDefault();var o=e("#edd-discount").val(),r=e("#edd-discount-loader"),c=e("#edd_cc_address .edd-input, #edd_cc_address .edd-select").filter("[required]");if(""==o||o==edd_global_vars.enter_discount)return!1;var i={action:"edd_apply_discount",code:o,form:e("#edd_purchase_form").serialize(),current_page:edd_global_vars.current_page};return e("#edd-discount-error-wrap").html("").hide(),r.show(),e.ajax({type:"POST",data:i,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(d){d?"valid"==d.msg?(e(".edd_cart_discount").html(d.html),e(".edd_cart_discount_row").show(),e(".edd_cart_amount").each((function(){e(this).text(d.total),e(this).data("total",d.total_plain)})),e("#edd-discount",n).val(""),Object(a.b)(),"0.00"==d.total_plain?(e("#edd_cc_fields,#edd_cc_address,#edd_payment_mode_select").slideUp(),c.prop("required",!1),e('input[name="edd-gateway"]').val("manual")):(c.prop("required",!0),e("#edd_cc_fields,#edd_cc_address").slideDown()),t.trigger("edd_discount_applied",[d])):(e("#edd-discount-error-wrap").html('<span class="edd_error">'+d.msg+"</span>"),e("#edd-discount-error-wrap").show(),t.trigger("edd_discount_invalid",[d])):(window.console&&window.console.log&&console.log(d),t.trigger("edd_discount_failed",[d])),r.hide()}}).fail((function(e){
|