laipower/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/assets/js/build/paymentelements.min.js

1 line
57 KiB
JavaScript

!function(e){var t={};function r(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,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=110)}([function(e,t,r){"use strict";r.d(t,"a",(function(){return n.a})),r.d(t,"f",(function(){return i.a})),r.d(t,"d",(function(){return a})),r.d(t,"h",(function(){return u})),r.d(t,"g",(function(){return c.b})),r.d(t,"j",(function(){return c.c})),r.d(t,"b",(function(){return c.a})),r.d(t,"i",(function(){return s})),r.d(t,"k",(function(){return d})),r.d(t,"e",(function(){return l})),r.d(t,"c",(function(){return f})),r(32),r(33),r(34),r(35);var n=r(19),o=r(20),i=r.n(o);function a(){i()(arguments,(function(e){document.addEventListener("DOMContentLoaded",e)}))}function u(e){for(var t=[],r=e.nextElementSibling;r;)1===r.nodeType&&t.push(r),r=r.nextElementSibling;return t}var c=r(21);function s(e){var t=!0;return i()(e.querySelectorAll("input"),(function(e){e.checkValidity&&!e.checkValidity()&&(t=!1)})),t}function d(e){var t=document.createElement("input");t.type="submit",t.style.display="none",e.appendChild(t),t.click(),t.remove()}function l(e){return e?""===e.value?null:e.value:null}function f(e,t){"true"===edd_stripe_vars.debuggingEnabled&&console.log("EDD Stripe - Debugging","\n","*".repeat(e.length+5),"\n",e,"\n","*".repeat(e.length+5),"\n",JSON.stringify(t,null,4))}r(7)},function(e,t,r){var n=r(66)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t,r){var n=r(36);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){(function(t){function r(e,r,n,o,i,a,u){try{var c=e[a](u),s=c.value}catch(e){return void n(e)}c.done?r(s):t.resolve(s).then(o,i)}e.exports=function(e){return function(){var n=this,o=arguments;return new t((function(t,i){var a=e.apply(n,o);function u(e){r(a,t,i,u,c,"next",e)}function c(e){r(a,t,i,u,c,"throw",e)}u(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports}).call(this,r(22))},function(e,t){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){(function(t){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||Function("return this")()}).call(this,r(38))},function(e,t){e.exports=jQuery},function(e,t,r){"use strict";function n(e){return null===e?window.eddStripe:!e in window.eddStripe?"":window.eddStripe[e]}function o(e,t,r){if(window.eddStripe[e]=t,r)return window.eddStripe[e]}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}))},,function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){"use strict";(function(e){r.d(t,"c",(function(){return s})),r.d(t,"e",(function(){return p})),r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return y})),r.d(t,"d",(function(){return m}));var n=r(3),o=r.n(n),i=r(1),a=r.n(i),u=r(31),c=r(0);function s(){Object(u.a)(),!1!==window.eddStripe.elementMounted&&(window.eddStripe.paymentMethodType="",window.eddStripe.intentFingerprint="",window.eddStripe.intentType="",window.eddStripe.intentId="",h(),e(document).off("click","#edd_purchase_form #edd_purchase_submit [type=submit]"),document.getElementById("edd-purchase-button").addEventListener("click",function(){var t=o()(a.a.mark((function t(r){var n,o,i,c,s,l,h,g,w,_,S,j,O,x,P,E,k;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("stripe"===e('input[name="edd-gateway"]').val()&&e(".edd_cart_total .edd_cart_amount").data("total")>0){t.next=2;break}return t.abrupt("return");case 2:if(m()){t.next=4;break}return t.abrupt("return",!1);case 4:if(r.preventDefault(),p(),n=Object(u.b)(document.getElementById("edd_purchase_form")),o="","apple_pay"!==window.eddStripe.paymentMethodType){t.next=14;break}return t.next=11,b(n);case 11:i=t.sent,c=i.paymentMethod.id,o=c;case 14:return t.prev=14,t.next=17,d(o);case 17:return s=t.sent,l=s.token,h=s.client_secret,g=s.intent_type,w=s.intent_fingerprint,_=s.intent_id,window.eddStripe.intentType=g,window.eddStripe.intentFingerprint=w,window.eddStripe.intentId=_,e("#edd-process-checkout-nonce").val(l),S="PaymentIntent"===g?"confirmPayment":"confirmSetup",j={clientSecret:h,confirmParams:{},redirect:"if_required"},"apple_pay"===window.eddStripe.paymentMethodType?j.confirmParams.payment_method=o:(j.elements=window.eddStripe.configuredElement,j.confirmParams.payment_method_data={billing_details:n}),t.next=32,window.eddStripe[S](j);case 32:if(O=t.sent,!(x=O.error)){t.next=38;break}return v(x),y(),t.abrupt("return",!1);case 38:return t.next=40,f();case 40:P=t.sent,E=P.intent,k=P.nonce,e("#edd-process-checkout-nonce").val(k),"succeeded"===E.status?window.location.replace(edd_stripe_vars.successPageUri):window.location.replace(edd_stripe_vars.failurePageUri),t.next=52;break;case 47:return t.prev=47,t.t0=t.catch(14),v(t.t0),y(),t.abrupt("return",!1);case 52:case"end":return t.stop()}}),t,null,[[14,47]])})));return function(_x){return t.apply(this,arguments)}}()))}function d(e){return l.apply(this,arguments)}function l(){return(l=o()(a.a.mark((function t(r){var n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e("#edd-process-stripe-token"),t.abrupt("return",Object(c.a)("edds_process_purchase_form",{form_data:e("#edd_purchase_form").serialize(),timestamp:n.length?n.data("timestamp"):"",token:n.length?n.data("token"):"",intent_type:window.eddStripe.intentType,intent_id:window.eddStripe.intentId,intent_fingerprint:window.eddStripe.intentFingerprint,payment_method_id:r}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function f(){var t=e("#edd_purchase_form"),r=e("#edd-process-stripe-token"),n=t.serialize();if(0===t.length){var o=e("#edd-process-checkout-nonce").val();n="edd-process-checkout-nonce=".concat(o)}return Object(c.a)("edds_create_and_complete_order",{form_data:n,timestamp:r.length?r.data("timestamp"):"",token:r.length?r.data("token"):"",intent_id:window.eddStripe.intentId,intent_type:window.eddStripe.intentType})}function p(){window.eddStripe.paymentElement.update({readOnly:!0});var t=e("#edd-purchase-button");e(".edd-loading-ajax").length||t.parent().append('<span class="edd-loading-ajax edd-loading"></span>'),t.attr("data-edd-button-state","updating"),t.prop("disabled","disabled"),t.prop("readonly","readonly"),e(".edd_errors").remove(),e(".edd-error").hide(),e("#edd-stripe-payment-errors").remove(),e(".edd-stripe-alert").remove()}function h(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];window.eddStripe.paymentElement.update({readOnly:!1});var r=e("#edd-purchase-button");r.attr("data-edd-button-state","disabled"),r.prop("disabled","disabled"),r.prop("readonly","readonly"),e(".edd-loading-ajax").remove(),t&&(e(".edd_errors").remove(),e(".edd-error").hide(),e("#edd-stripe-payment-errors").remove(),e(".edd-stripe-alert").remove())}function y(){window.eddStripe.paymentElement.update({readOnly:!1});var t=e("#edd-purchase-button");t.attr("data-edd-button-state","ready"),t.prop("disabled",""),t.prop("readonly",""),e(".edd-loading-ajax").remove(),e(".edd_errors").remove(),e(".edd-error").hide()}function v(t){console.log(t);var r=t.code,n=t.message,o=(t.type,window.edd_stripe_vars.elementsCustomizations.i18n.errorMessages);n||(n=edd_stripe_vars.generic_error);var i=r&&o[r]?o[r]:n,a=Object(c.g)(i);r&&"incomplete"!==r&&Object(c.a)("edds_payment_elements_rate_limit_tick"),e(".edd-stripe-alert").remove(),e(edd_global_vars.checkout_error_anchor).before(a),e(document.body).trigger("edd_checkout_error",[t]),"incomplete"===r&&e(".edd-stripe-alert").removeClass("edd-alert-error").addClass("edd-alert-warn"),window.console&&t.responseText&&window.console.error(t.responseText),h(!1)}function m(){var e=document.getElementById("edd_purchase_form");return"function"!=typeof e.checkValidity||!1!==e.checkValidity()||(e.reportValidity(),h(),!1)}function b(e){return window.eddStripe.createPaymentMethod({elements:window.eddStripe.configuredElement,params:{billing_details:e}}).then((function(e){var t=e.error,r=e.paymentMethod;return t&&v(t),{paymentMethod:r}})).catch((function(e){return v(e),y(),!1}))}}).call(this,r(6))},,,function(e,t,r){var n=r(9);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,r){var n=r(5),o=r(48),i=r(10),a=r(49),u=r(57),c=r(90),s=o("wks"),d=n.Symbol,l=c?d:d&&d.withoutSetter||a;e.exports=function(e){return i(s,e)||(u&&i(d,e)?s[e]=d[e]:s[e]=l("Symbol."+e)),s[e]}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,r){var n=r(14),o=r(26),i=r(23);e.exports=n?function(e,t,r){return o.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},,function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return s}));var n=r(4),o=r.n(n),i=r(2),a=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(t,r){var n={type:"POST",dataType:"json",xhrFields:{withCredentials:!0},url:window.edd_scripts&&window.edd_scripts.ajaxurl||window.ajaxurl,data:c({action:t},r)},i=e.Deferred((function(t){t.jqXHR=e.ajax(n).done((function(e){"1"!==e&&1!==e||(e={success:!0}),"object"===o()(e)&&void 0!==o()(e.success)?t[e.success?"resolveWith":"rejectWith"](this,[e.data]):t.rejectWith(this,[e])})).fail((function(){t.rejectWith(this,arguments)}))})),a=i.promise();return a.abort=function(){return i.jqXHR.abort(),this},a}}).call(this,r(6))},function(e,t){var r=/^(?:0|[1-9]\d*)$/;function n(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););return e}var o,i,a=Object.prototype,u=a.hasOwnProperty,c=a.toString,s=a.propertyIsEnumerable,d=(o=Object.keys,i=Object,function(e){return o(i(e))});var l,f=(l=function(e,t){return e&&p(e,t,m)},function(e,t){if(null==e)return e;if(!v(e))return l(e,t);for(var r=e.length,n=-1,o=Object(e);++n<r&&!1!==t(o[n],n,o););return e}),p=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var u=i[++n];if(!1===t(o[u],u,o))break}return e};function h(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||r.test(e))&&e>-1&&e%1==0&&e<t}var y=Array.isArray;function v(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function m(e){return v(e)?function(e,t){var r=y(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&v(e)}(e)&&u.call(e,"callee")&&(!s.call(e,"callee")||"[object Arguments]"==c.call(e))}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,o=!!n;for(var i in e)!t&&!u.call(e,i)||o&&("length"==i||h(i,n))||r.push(i);return r}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||a))return d(e);var t,r,n=[];for(var o in Object(e))u.call(e,o)&&"constructor"!=o&&n.push(o);return n}(e)}function b(e){return e}e.exports=function(e,t){return(y(e)?n:f)(e,"function"==typeof t?t:b)}},function(e,t,r){"use strict";(function(e){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error",r=document.createElement("p");return r.classList.add("edd-alert"),r.classList.add("edd-stripe-alert"),r.style.clear="both","error"===t?r.classList.add("edd-alert-error"):r.classList.add("edd-alert-success"),r.innerHTML=e||edd_stripe_vars.generic_error,r}function o(t){var r=t.errorType,o=t.errorMessage,i=t.errorContainer,a=t.errorContainerReplace,u=void 0===a||a,c=e(i),s=n(o,r);!0===u?c.html(s):c.before(s)}function i(t){e(t).html("")}r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return i}))}).call(this,r(6))},function(e,t,r){e.exports=r(63).Promise},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(42),o=r(44);e.exports=function(e){return n(o(e))}},function(e,t,r){var n=r(16);e.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){var n=r(14),o=r(45),i=r(27),a=r(25),u=Object.defineProperty;t.f=n?u:function(e,t,r){if(i(e),t=a(t,!0),i(r),o)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(16);e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,r){var n=r(5),o=r(17);e.exports=function(e,t){try{o(n,e,t)}catch(r){n[e]=t}return t}},,,function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return y})),r.d(t,"b",(function(){return S}));var n=r(3),o=r.n(n),i=r(2),a=r.n(i),u=r(1),c=r.n(u),s=r(0),d=r(7),l=r(11);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h=p({},edd_stripe_vars.elementsCustomizations);function y(){if(window.eddStripe.elementMounted=!1,document.querySelector(Object(d.a)("elementsTarget"))){var t=g(),r=function(){e("#edd-stripe-payment-element").before('\t<label id="edds-sample-label" for="edds-sample-input" class="edd-label"><input type="text" name="edds-sample-input" class="edd-input" id="edds-sample-input" readonly /></label>');var t,r=document.querySelector("#edds-sample-input"),n=document.querySelector("#edds-sample-input",":focus"),o=document.querySelector("#edds-sample-input",":hover"),i=window.getComputedStyle(r),a=window.getComputedStyle(n),u=window.getComputedStyle(o),c=h.theme,s=p(p({},{colorText:i.getPropertyValue("color"),colorBackground:i.getPropertyValue("background-color"),borderRadius:i.getPropertyValue("border-radius"),colorIconTab:i.getPropertyValue("color")}),h.variables),l={borderTop:i.getPropertyValue("border-top"),borderRight:i.getPropertyValue("border-right"),borderBottom:i.getPropertyValue("border-bottom"),borderLeft:i.getPropertyValue("border-left"),backgroundColor:i.getPropertyValue("background-color"),borderRadius:i.getPropertyValue("border-radius"),borderColor:i.getPropertyValue("border-color")},f={borderTop:u.getPropertyValue("border-top"),borderRight:u.getPropertyValue("border-right"),borderBottom:u.getPropertyValue("border-bottom"),borderLeft:u.getPropertyValue("border-left"),backgroundColor:u.getPropertyValue("background-color"),borderRadius:u.getPropertyValue("border-radius"),borderColor:u.getPropertyValue("border-color")},y={borderTop:a.getPropertyValue("border-top"),borderRight:a.getPropertyValue("border-right"),borderBottom:a.getPropertyValue("border-bottom"),borderLeft:a.getPropertyValue("border-left"),backgroundColor:a.getPropertyValue("background-color"),borderRadius:a.getPropertyValue("border-radius"),borderColor:a.getPropertyValue("border-color")},v=document.querySelector("#edds-sample-label"),m=window.getComputedStyle(v),b={".Input":l,".Input:focus":y,".Input:hover":f,".Label":{fontSize:m.getPropertyValue("font-size"),fontWeight:m.getPropertyValue("font-weight"),fontFamily:m.getPropertyValue("font-family"),color:m.getPropertyValue("color")},".CheckboxInput":{borderTop:i.getPropertyValue("border-top"),borderRight:i.getPropertyValue("border-top"),borderBottom:i.getPropertyValue("border-top"),borderLeft:i.getPropertyValue("border-top"),borderRadius:i.getPropertyValue("border-radius"),backgroundColor:i.getPropertyValue("background-color")},".CheckboxInput:hover":{borderTop:u.getPropertyValue("border-top"),borderRight:u.getPropertyValue("border-top"),borderBottom:u.getPropertyValue("border-top"),borderLeft:u.getPropertyValue("border-top")},".CodeInput":l,".CodeInput:focus":y},g=document.querySelector(".edd-gateway-option:not(.edd-gateway-option-selected)");if(null!==g&&!1===Object(d.a)("singleGateway")){var w=document.querySelector(".edd-gateway-option-selected"),_=window.getComputedStyle(g),S=window.getComputedStyle(w);t={".Tab":{border:_.getPropertyValue("border"),backgroundColor:_.getPropertyValue("background-color"),borderRadius:_.getPropertyValue("border-radius")},".Tab--selected":{border:S.getPropertyValue("border"),backgroundColor:S.getPropertyValue("background-color"),borderRadius:S.getPropertyValue("border-radius")},".Tab:hover":{border:S.getPropertyValue("border"),backgroundColor:S.getPropertyValue("background-color"),borderRadius:S.getPropertyValue("border-radius")}}}else t={".Tab":l,".Tab--selected":{borderTop:a.getPropertyValue("border-top"),borderRight:a.getPropertyValue("border-right"),borderBottom:a.getPropertyValue("border-bottom"),borderLeft:a.getPropertyValue("border-left"),backgroundColor:"#fff",borderRadius:a.getPropertyValue("border-radius"),borderColor:a.getPropertyValue("border-color")},".Tab:hover":y};e("#edds-sample-label").remove();var j=p(p({},b),t);return Object.keys(h.rules).forEach((function(e){var t={};j[e]&&(t=j[e]),j[e]=p(p({},t),h.rules[e])})),{theme:c,labels:h.labels,variables:s,rules:j}}(),n=[];h.fonts.length&&h.fonts.forEach((function(e){return n.push(e)}));var o={mode:"payment",amount:t,locale:edd_stripe_vars.locale,currency:edd_stripe_vars.currency.toLowerCase(),loader:"always",appearance:r,fonts:n};h.paymentMethodTypes.length?o.payment_method_types=h.paymentMethodTypes:o.automatic_payment_methods={enabled:!0},Object(s.c)("Stripe.elements() creation options",o);var i=window.eddStripe.elements(o);window.eddStripe.configuredElement=i;var a={defaultValues:{billingDetails:S(document.getElementById("edd_purchase_form"))},fields:{billingDetails:{name:"auto",email:"never",phone:"never",address:"never"}},layout:h.layout,wallets:h.wallets,business:{name:edd_stripe_vars.store_name}},u={};"true"===h.cartHasSubscription&&(u={terms:{card:"always"}});var c=p(p({},a),u);Object(s.c)("element.create() options",c);var l=i.create("payment",c);window.eddStripe.paymentElement=l,l.mount(Object(d.a)("elementsTarget")),l.on("ready",(function(){setTimeout(v,500)})),window.eddStripe.elementMounted=!0}}function v(){var e=jQuery(window),t=jQuery(document);e.keydown((function(e){if(13==e.keyCode)return e.preventDefault(),!1})),e.on("edd_quantity_updated",(function(){return m("quantity updated")})),e.on("edd_discount_applied",(function(){return m("discount applied")})),e.on("edd_discount_removed",(function(){return m("discount removed")})),e.on("edd_taxes_recalculated",(function(){return m("taxes recalcluated")})),t.on("change",":input[required]",(function(){w()})),t.on("change","#edd_cc_address .edd-input, #edd_cc_address .edd-select",(function(){setTimeout((function(){w()}),300)})),window.eddStripe.paymentElement.on("change",(function(e){Object(l.e)(),!0===e.complete?(window.eddStripe.elementComplete=!0,window.eddStripe.paymentMethodType=e.value.type,Object(l.b)()):(window.eddStripe.elementComplete=!1,Object(l.a)())}))}function m(_x){return b.apply(this,arguments)}function b(){return(b=o()(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=g())||Object(l.b)(),window.eddStripe.configuredElement.update({amount:r}),!0===window.eddStripe.elementComplete&&Object(l.b)();case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){var e,t;return e=jQuery(".edd_cart_total .edd_cart_amount"),t=parseFloat(e.data("total")),"false"===edd_stripe_vars.is_zero_decimal&&(t=Math.round(100*t)),t}function w(){return _.apply(this,arguments)}function _(){return(_=o()(c.a.mark((function e(){var t,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=jQuery("#edd_purchase_form")[0],(r=S(t)).address.country&&window.eddStripe.configuredElement.update({locale:r.address.country}),window.eddStripe.paymentElement.update({defaultValues:{billingDetails:r}}),!0===window.eddStripe.elementComplete&&Object(l.d)()&&Object(l.b)();case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e){var t=Object(s.e)(e.querySelector("#edd-email"));return null===t&&(t=Object(s.e)(e.querySelector("#edd_email"))),{email:t,phone:Object(s.e)(e.querySelector(".edd-phone")),address:{line1:Object(s.e)(e.querySelector("#card_address")),line2:Object(s.e)(e.querySelector("#card_address_2")),city:Object(s.e)(e.querySelector("#card_city")),state:Object(s.e)(e.querySelector("#card_state")),postal_code:Object(s.e)(e.querySelector("#card_zip")),country:Object(s.e)(e.querySelector("#billing_country"))}}}}).call(this,r(6))},function(e,t){String.prototype.includes||(String.prototype.includes=function(e,t){"use strict";return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)})},function(e,t){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null})},function(e,t){Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n})},function(e,t){[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}))},function(e,t,r){var n=r(4).default,o=r(37);e.exports=function(e){var t=o(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(4).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n=r(5),o=r(40).f,i=r(17),a=r(69),u=r(28),c=r(74),s=r(81);e.exports=function(e,t){var r,d,l,f,p,h=e.target,y=e.global,v=e.stat;if(r=y?n:v?n[h]||u(h,{}):(n[h]||{}).prototype)for(d in t){if(f=t[d],l=e.noTargetGet?(p=o(r,d))&&p.value:r[d],!s(y?d:h+(v?".":"#")+d,e.forced)&&void 0!==l){if(typeof f==typeof l)continue;c(f,l)}(e.sham||l&&l.sham)&&i(f,"sham",!0),a(r,d,f,e)}}},function(e,t,r){var n=r(14),o=r(41),i=r(23),a=r(24),u=r(25),c=r(10),s=r(45),d=Object.getOwnPropertyDescriptor;t.f=n?d:function(e,t){if(e=a(e),t=u(t,!0),s)try{return d(e,t)}catch(e){}if(c(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:n},function(e,t,r){var n=r(9),o=r(43),i="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(14),o=r(9),i=r(68);e.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(47),o=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return o.call(e)}),e.exports=n.inspectSource},function(e,t,r){var n=r(5),o=r(28),i=n["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,r){var n=r(73),o=r(47);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++r+n).toString(36)}},function(e,t){e.exports={}},function(e,t,r){var n=r(10),o=r(24),i=r(79).indexOf,a=r(50);e.exports=function(e,t){var r,u=o(e),c=0,s=[];for(r in u)!n(a,r)&&n(u,r)&&s.push(r);for(;t.length>c;)n(u,r=t[c++])&&(~i(s,r)||s.push(r));return s}},function(e,t,r){var n=r(53),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(44);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(9);e.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},function(e,t){e.exports={}},function(e,t,r){"use strict";(function(e){r.d(t,"b",(function(){return i}));var n=r(11),o=r(7);function i(){if(Object(o.b)("elementsTarget","#edd-stripe-payment-element"),"1"===edd_scripts.is_checkout){var t=document.querySelector('input[name="edd-gateway"]');window.eddStripe.isBuyNow=!1,t&&"stripe"===t.value?(Object(o.b)("singleGateway",!0),Object(n.c)()):(Object(o.b)("singleGateway",!1),e(document.body).on("edd_gateway_loaded",(function(e,t){"stripe"===t&&Object(n.c)()})))}}r.d(t,"a",(function(){return n.c}))}).call(this,r(6))},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var n=r(2),o=r.n(n);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,void 0):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r(67),r(84);var c,s,d,l,f,p=(c=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],s=function(){function e(t){var r=t.targetModal,n=t.triggers,o=void 0===n?[]:n,i=t.onShow,u=void 0===i?function(){}:i,c=t.onClose,s=void 0===c?function(){}:c,d=t.openTrigger,l=void 0===d?"data-micromodal-trigger":d,f=t.closeTrigger,p=void 0===f?"data-micromodal-close":f,h=t.openClass,y=void 0===h?"is-open":h,v=t.disableScroll,m=void 0!==v&&v,b=t.disableFocus,g=void 0!==b&&b,w=t.awaitCloseAnimation,_=void 0!==w&&w,S=t.awaitOpenAnimation,j=void 0!==S&&S,O=t.debugMode,x=void 0!==O&&O;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modal=document.getElementById(r),this.config={debugMode:x,disableScroll:m,openTrigger:l,closeTrigger:p,openClass:y,onShow:u,onClose:s,awaitCloseAnimation:_,awaitOpenAnimation:j,disableFocus:g},o.length>0&&this.registerTriggers.apply(this,a(o)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var t,r;return t=e,(r=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];r.filter(Boolean).forEach((function(t){t.addEventListener("click",(function(t){return e.showModal(t)}))}))}},{key:"showModal",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation){var r=function t(){e.modal.removeEventListener("animationend",t,!1),e.setFocusToFirstNode()};this.modal.addEventListener("animationend",r,!1)}else this.setFocusToFirstNode();this.config.onShow(this.modal,this.activeElement,t)}},{key:"closeModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,e),this.config.awaitCloseAnimation){var r=this.config.openClass;this.modal.addEventListener("animationend",(function e(){t.classList.remove(r),t.removeEventListener("animationend",e,!1)}),!1)}else t.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(e){this.modal=document.getElementById(e),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(e){if(this.config.disableScroll){var t=document.querySelector("body");switch(e){case"enable":Object.assign(t.style,{overflow:""});break;case"disable":Object.assign(t.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(e){e.target.hasAttribute(this.config.closeTrigger)&&this.closeModal(e)}},{key:"onKeydown",value:function(e){27===e.keyCode&&this.closeModal(e),9===e.keyCode&&this.retainFocus(e)}},{key:"getFocusableNodes",value:function(){var e=this.modal.querySelectorAll(c);return Array.apply(void 0,a(e))}},{key:"setFocusToFirstNode",value:function(){var e=this;if(!this.config.disableFocus){var t=this.getFocusableNodes();if(0!==t.length){var r=t.filter((function(t){return!t.hasAttribute(e.config.closeTrigger)}));r.length>0&&r[0].focus(),0===r.length&&t[0].focus()}}}},{key:"retainFocus",value:function(e){var t=this.getFocusableNodes();if(0!==t.length)if(t=t.filter((function(e){return null!==e.offsetParent})),this.modal.contains(document.activeElement)){var r=t.indexOf(document.activeElement);e.shiftKey&&0===r&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&r===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&i(t.prototype,r),e}(),d=null,l=function(e){if(!document.getElementById(e))return console.warn("MicroModal: ❗Seems like you have missed %c'".concat(e,"'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<div class="modal" id="'.concat(e,'"></div>')),!1},f=function(e,t){if(function(e){e.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>'))}(e),!t)return!0;for(var r in t)l(r);return!0},{init:function(e){var t=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),r=a(document.querySelectorAll("[".concat(t.openTrigger,"]"))),n=function(e,t){var r=[];return e.forEach((function(e){var n=e.attributes[t].value;void 0===r[n]&&(r[n]=[]),r[n].push(e)})),r}(r,t.openTrigger);if(!0!==t.debugMode||!1!==f(r,n))for(var o in n){var i=n[o];t.targetModal=o,t.triggers=a(i),d=new s(t)}},show:function(e,t){var r=t||{};r.targetModal=e,!0===r.debugMode&&!1===l(e)||(d&&d.removeEventListeners(),(d=new s(r)).showModal())},close:function(e){e?d.closeModalById(e):d.closeModal()}});window.MicroModal=p;var h=p;function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var m={disableScroll:!0,awaitOpenAnimation:!0,awaitCloseAnimation:!0},b={setup:function(e){var t=v(v({},m),e);h.init(t)},open:function(e,t){var r=v(v({},m),t);h.show(e,r)},close:function(e){h.close(e)}}},function(e,t,r){(function(t,n){var o;o=function(){"use strict";function e(e){return"function"==typeof e}var o=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,a=void 0,u=void 0,c=function(e,t){y[i]=e,y[i+1]=t,2===(i+=2)&&(u?u(v):_())},s="undefined"!=typeof window?window:void 0,d=s||{},l=d.MutationObserver||d.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){var e=setTimeout;return function(){return e(v,1)}}var y=new Array(1e3);function v(){for(var e=0;e<i;e+=2)(0,y[e])(y[e+1]),y[e]=void 0,y[e+1]=void 0;i=0}var m,b,g,w,_=void 0;function S(e,t){var r=arguments,n=this,o=new this.constructor(x);void 0===o[O]&&N(o);var i,a=n._state;return a?(i=r[a-1],c((function(){return F(a,o,i,n._result)}))):A(n,o,e,t),o}function j(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(x);return T(t,e),t}f?_=function(){return t.nextTick(v)}:l?(b=0,g=new l(v),w=document.createTextNode(""),g.observe(w,{characterData:!0}),_=function(){w.data=b=++b%2}):p?((m=new MessageChannel).port1.onmessage=v,_=function(){return m.port2.postMessage(0)}):_=void 0===s?function(){try{var e=r(65);return a=e.runOnLoop||e.runOnContext,function(){a(v)}}catch(e){return h()}}():h();var O=Math.random().toString(36).substring(16);function x(){}var P=new q;function E(e){try{return e.then}catch(e){return P.error=e,P}}function k(t,r,n){r.constructor===t.constructor&&n===S&&r.constructor.resolve===j?function(e,t){1===t._state?M(e,t._result):2===t._state?C(e,t._result):A(t,void 0,(function(t){return T(e,t)}),(function(t){return C(e,t)}))}(t,r):n===P?C(t,P.error):void 0===n?M(t,r):e(n)?function(e,t,r){c((function(e){var n=!1,o=function(r,o,i,a){try{r.call(o,(function(r){n||(n=!0,t!==r?T(e,r):M(e,r))}),(function(t){n||(n=!0,C(e,t))}))}catch(e){return e}}(r,t,0,0,e._label);!n&&o&&(n=!0,C(e,o))}),e)}(t,r,n):M(t,r)}function T(e,t){var r;e===t?C(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(r=t)||"object"==typeof r&&null!==r?k(e,t,E(t)):M(e,t)}function L(e){e._onerror&&e._onerror(e._result),V(e)}function M(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&c(V,e))}function C(e,t){void 0===e._state&&(e._state=2,e._result=t,c(L,e))}function A(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=r,o[i+2]=n,0===i&&e._state&&c(V,e)}function V(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)n=t[a],o=t[a+r],n?F(r,n,o,i):o(i);e._subscribers.length=0}}function q(){this.error=null}var I=new q;function F(t,r,n,o){var i=e(n),a=void 0,u=void 0,c=void 0,s=void 0;if(i){if((a=function(e,t){try{return e(t)}catch(e){return I.error=e,I}}(n,o))===I?(s=!0,u=a.error,a=null):c=!0,r===a)return void C(r,new TypeError("A promises callback cannot return that same promise."))}else a=o,c=!0;void 0!==r._state||(i&&c?T(r,a):s?C(r,u):1===t?M(r,a):2===t&&C(r,a))}var D=0;function N(e){e[O]=D++,e._state=void 0,e._result=void 0,e._subscribers=[]}function R(e,t){this._instanceConstructor=e,this.promise=new e(x),this.promise[O]||N(this.promise),o(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?M(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&M(this.promise,this._result))):C(this.promise,new Error("Array Methods must be provided an Array"))}function B(e){this[O]=D++,this._result=this._state=void 0,this._subscribers=[],x!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof B?function(e,t){try{t((function(t){T(e,t)}),(function(t){C(e,t)}))}catch(t){C(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}function G(){var e=void 0;if(void 0!==n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=B}return R.prototype._enumerate=function(){for(var e=this.length,t=this._input,r=0;void 0===this._state&&r<e;r++)this._eachEntry(t[r],r)},R.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===j){var o=E(e);if(o===S&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(r===B){var i=new r(x);k(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},R.prototype._settledAt=function(e,t,r){var n=this.promise;void 0===n._state&&(this._remaining--,2===e?C(n,r):this._result[t]=r),0===this._remaining&&M(n,this._result)},R.prototype._willSettleAt=function(e,t){var r=this;A(e,void 0,(function(e){return r._settledAt(1,t,e)}),(function(e){return r._settledAt(2,t,e)}))},B.all=function(e){return new R(this,e).promise},B.race=function(e){var t=this;return o(e)?new t((function(r,n){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(r,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},B.resolve=j,B.reject=function(e){var t=new this(x);return C(t,e),t},B._setScheduler=function(e){u=e},B._setAsap=function(e){c=e},B._asap=c,B.prototype={constructor:B,then:S,catch:function(e){return this.then(null,e)}},G(),B.polyfill=G,B.Promise=B,B},e.exports=o()}).call(this,r(64),r(38))},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,s=[],d=!1,l=-1;function f(){d&&c&&(d=!1,c.length?s=c.concat(s):l=-1,s.length&&p())}function p(){if(!d){var e=u(f);d=!0;for(var t=s.length;t;){for(c=s,s=[];++l<t;)c&&c[l].run();l=-1,t=s.length}c=null,d=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new h(e,t)),1!==s.length||d||u(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){},function(e,t,r){(function(t){var n=r(4).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",d=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),a=new T(n||[]);return u(i,"_invoke",{value:x(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var y={};function v(){}function m(){}function b(){}var g={};f(g,s,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(L([])));_&&_!==i&&a.call(_,s)&&(g=_);var S=b.prototype=v.prototype=Object.create(g);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){var r;u(this,"_invoke",{value:function(o,i){function u(){return new t((function(r,u){!function r(o,i,u,c){var s=h(e[o],e,i);if("throw"!==s.type){var d=s.arg,l=d.value;return l&&"object"==n(l)&&a.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(l).then((function(e){d.value=e,u(d)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}(o,i,r,u)}))}return r=r?r.then(u,u):u()}})}function x(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=P(a,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function P(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,P(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=h(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,y;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,y):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(a.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:M}}function M(){return{value:void 0,done:!0}}return m.prototype=b,u(S,"constructor",{value:b,configurable:!0}),u(b,"constructor",{value:m,configurable:!0}),m.displayName=f(b,l,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,f(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},r.awrap=function(e){return{__await:e}},j(O.prototype),f(O.prototype,d,(function(){return this})),r.AsyncIterator=O,r.async=function(e,n,o,i,a){void 0===a&&(a=t);var u=new O(p(e,n,o,i),a);return r.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},j(S),f(S,l,"Generator"),f(S,s,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=L,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:L(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),y}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}).call(this,r(22))},function(e,t,r){var n=r(39),o=r(82);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,r){var n=r(5),o=r(16),i=n.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,r){var n=r(5),o=r(17),i=r(10),a=r(28),u=r(46),c=r(70),s=c.get,d=c.enforce,l=String(String).split("String");(e.exports=function(e,t,r,u){var c=!!u&&!!u.unsafe,s=!!u&&!!u.enumerable,f=!!u&&!!u.noTargetGet;"function"==typeof r&&("string"!=typeof t||i(r,"name")||o(r,"name",t),d(r).source=l.join("string"==typeof t?t:"")),e!==n?(c?!f&&e[t]&&(s=!0):delete e[t],s?e[t]=r:o(e,t,r)):s?e[t]=r:a(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||u(this)}))},function(e,t,r){var n,o,i,a=r(71),u=r(5),c=r(16),s=r(17),d=r(10),l=r(72),f=r(50),p=u.WeakMap;if(a){var h=new p,y=h.get,v=h.has,m=h.set;n=function(e,t){return m.call(h,e,t),t},o=function(e){return y.call(h,e)||{}},i=function(e){return v.call(h,e)}}else{var b=l("state");f[b]=!0,n=function(e,t){return s(e,b,t),t},o=function(e){return d(e,b)?e[b]:{}},i=function(e){return d(e,b)}}e.exports={set:n,get:o,has:i,enforce:function(e){return i(e)?o(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},function(e,t,r){var n=r(5),o=r(46),i=n.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,r){var n=r(48),o=r(49),i=n("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){e.exports=!1},function(e,t,r){var n=r(10),o=r(75),i=r(40),a=r(26);e.exports=function(e,t){for(var r=o(t),u=a.f,c=i.f,s=0;s<r.length;s++){var d=r[s];n(e,d)||u(e,d,c(t,d))}}},function(e,t,r){var n=r(76),o=r(78),i=r(55),a=r(27);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(a(e)),r=i.f;return r?t.concat(r(e)):t}},function(e,t,r){var n=r(77),o=r(5),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e])||i(o[e]):n[e]&&n[e][t]||o[e]&&o[e][t]}},function(e,t,r){var n=r(5);e.exports=n},function(e,t,r){var n=r(51),o=r(54).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},function(e,t,r){var n=r(24),o=r(52),i=r(80),a=function(e){return function(t,r,a){var u,c=n(t),s=o(c.length),d=i(a,s);if(e&&r!=r){for(;s>d;)if((u=c[d++])!=u)return!0}else for(;s>d;d++)if((e||d in c)&&c[d]===r)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,r){var n=r(53),o=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?o(r+t,0):i(r,t)}},function(e,t,r){var n=r(9),o=/#|\.prototype\./,i=function(e,t){var r=u[a(e)];return r==s||r!=c&&("function"==typeof t?n(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},u=i.data={},c=i.NATIVE="N",s=i.POLYFILL="P";e.exports=i},function(e,t,r){"use strict";var n=r(14),o=r(9),i=r(83),a=r(55),u=r(41),c=r(56),s=r(42),d=Object.assign,l=Object.defineProperty;e.exports=!d||o((function(){if(n&&1!==d({b:1},d(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=d({},e)[r]||"abcdefghijklmnopqrst"!=i(d({},t)).join("")}))?function(e,t){for(var r=c(e),o=arguments.length,d=1,l=a.f,f=u.f;o>d;)for(var p,h=s(arguments[d++]),y=l?i(h).concat(l(h)):i(h),v=y.length,m=0;v>m;)p=y[m++],n&&!f.call(h,p)||(r[p]=h[p]);return r}:d},function(e,t,r){var n=r(51),o=r(54);e.exports=Object.keys||function(e){return n(e,o)}},function(e,t,r){var n=r(39),o=r(85);n({target:"Array",stat:!0,forced:!r(95)((function(e){Array.from(e)}))},{from:o})},function(e,t,r){"use strict";var n=r(86),o=r(56),i=r(88),a=r(89),u=r(52),c=r(91),s=r(92);e.exports=function(e){var t,r,d,l,f,p,h=o(e),y="function"==typeof this?this:Array,v=arguments.length,m=v>1?arguments[1]:void 0,b=void 0!==m,g=s(h),w=0;if(b&&(m=n(m,v>2?arguments[2]:void 0,2)),null==g||y==Array&&a(g))for(r=new y(t=u(h.length));t>w;w++)p=b?m(h[w],w):h[w],c(r,w,p);else for(f=(l=g.call(h)).next,r=new y;!(d=f.call(l)).done;w++)p=b?i(l,m,[d.value,w],!0):d.value,c(r,w,p);return r.length=w,r}},function(e,t,r){var n=r(87);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,r){var n=r(27);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){var n=r(15),o=r(58),i=n("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},function(e,t,r){var n=r(57);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,r){"use strict";var n=r(25),o=r(26),i=r(23);e.exports=function(e,t,r){var a=n(t);a in e?o.f(e,a,i(0,r)):e[a]=r}},function(e,t,r){var n=r(93),o=r(58),i=r(15)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[n(e)]}},function(e,t,r){var n=r(94),o=r(43),i=r(15)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=n?o:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:a?o(t):"Object"==(n=o(t))&&"function"==typeof t.callee?"Arguments":n}},function(e,t,r){var n={};n[r(15)("toStringTag")]="z",e.exports="[object z]"===String(n)},function(e,t,r){var n=r(15)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},,,,,,,,,,,function(e,t,r){},,,,function(e,t,r){"use strict";r.r(t),r(106);var n=r(0),o=r(59),i=r(62);function a(){Object(n.f)(document.querySelectorAll(".edds-buy-now"),(function(e){e.classList.contains("edd-free-download")||e.addEventListener("click",(function(e){window.eddStripe.activeBuyNow=e;var t,r,a=e.currentTarget.dataset,u=a.downloadId,c=a.nonce,s=e.currentTarget.dataset.token.length?e.currentTarget.dataset.token:"",d=e.currentTarget.dataset.timestamp.length?e.currentTarget.dataset.timestamp:"";if(u){e.preventDefault(),e.stopImmediatePropagation();var l=null,f=1,p=e.currentTarget.closest(".edd_download_purchase_form"),h=p.querySelector(".edd_price_option_".concat(u,":checked"));h&&(l=h.value);var y=p.querySelector('input[name="edd_download_quantity"]');y&&(f=y.value),t={downloadId:u,priceId:l,quantity:f,nonce:c,addToCartForm:p,timestamp:d,token:s},r=document.querySelector("#edds-buy-now-modal-content"),i.a.open("edds-buy-now",{onShow:function(){var e,i,a,u,c,s,d,l;r.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',(e=t.downloadId,i=t.priceId,a=t.quantity,u=t.nonce,c=t.addToCartForm,s=t.timestamp,d=t.token,l={download_id:e,price_id:i,quantity:a,nonce:u,post_data:jQuery(c).serialize(),timestamp:s,token:d},Object(n.a)("edds_add_to_cart",l)).then((function(e){var t=e.checkout;window.eddStripe.isBuyNow=!0,r.innerHTML=t;var n=document.querySelector("#edds-buy-now-modal-content #edd-purchase-button");n.length&&(n.value=edd_stripe_vars.formLoadingText),window.EDD_Checkout.init(),document.querySelector("#edds-buy-now-modal-content .edd_cart_amount").dataset.total>0&&(window.eddStripe.singleGateway=!0,Object(o.a)())})).fail((function(e){var t=e.message;document.querySelector("#edds-buy-now-modal-content").innerHTML=t}))},onClose:function(){window.eddStripe.intentId="",window.eddStripe.clientSecret="",window.eddStripe.intentType="",window.eddStripe.intentFingerprint="",Object(n.a)("edds_empty_cart")}})}}))})),jQuery(document.body).on("edd_checkout_error",(function(){var e=document.querySelector("#edds-buy-now #edd-purchase-button");if(e){var t=edd_stripe_vars.i18n.completePurchase,r=document.querySelector(".edd_cart_amount").dataset,n=r.total,o=r.totalCurrency;"0"!==n&&setTimeout((function(){e.value="".concat(o," - ").concat(t)}),10)}}))}var u=r(31);!function(){try{window.eddStripe=new Stripe(edd_stripe_vars.publishable_key,{betas:["elements_enable_deferred_intent_beta_1"]}),window.eddStripe._plugin={domReady:n.d,apiRequest:n.a,generateNotice:n.g,createAndMountElement:u.a,getBillingDetails:u.b},Object(n.d)(o.b,a)}catch(e){alert(e.message)}}()}]);