Version Description
Download this release
Release Info
Developer | NoseGraze |
Plugin | Easy Digital Downloads |
Version | 2.10.5 |
Comparing to | |
See all releases |
Code changes from version 2.10.4 to 2.10.5
- assets/js/edd-checkout-global.js +5 -12
- assets/js/edd-checkout-global.min.js +1 -1
- easy-digital-downloads.php +3 -3
- includes/admin/downloads/metabox.php +2 -2
- includes/admin/payments/payments-history.php +1 -1
- includes/class-edd-customer.php +2 -2
- includes/class-edd-db-customer-meta.php +2 -2
- includes/download-functions.php +6 -6
- includes/gateways/stripe/assets/css/build/app.min.css +1 -1
- includes/gateways/stripe/assets/css/build/app.min.css.map +1 -1
- includes/gateways/stripe/assets/css/src/frontend/payment-request-button.scss +4 -0
- includes/gateways/stripe/assets/js/build/app.min.js +1 -1
- includes/gateways/stripe/assets/js/build/app.min.js.map +1 -0
- includes/gateways/stripe/assets/js/src/frontend/payment-forms/buy-now/index.js +29 -8
- includes/gateways/stripe/assets/js/src/frontend/payment-forms/payment-request/checkout.js +47 -0
- includes/gateways/stripe/assets/js/src/frontend/payment-forms/payment-request/download.js +94 -3
- includes/gateways/stripe/edd-stripe.php +2 -2
- includes/gateways/stripe/includes/admin/admin-actions.php +24 -0
- includes/gateways/stripe/includes/functions.php +148 -27
- includes/gateways/stripe/includes/payment-actions.php +59 -32
- includes/gateways/stripe/includes/payment-methods/buy-now/functions.php +4 -0
- includes/gateways/stripe/includes/payment-methods/buy-now/shortcode.php +0 -16
- includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php +84 -47
- includes/gateways/stripe/includes/scripts.php +9 -0
- includes/gateways/stripe/includes/template-functions.php +1 -1
- includes/gateways/stripe/vendor/autoload.php +1 -1
- includes/gateways/stripe/vendor/composer/ClassLoader.php +37 -3
- includes/gateways/stripe/vendor/composer/InstalledVersions.php +315 -0
- includes/gateways/stripe/vendor/composer/autoload_classmap.php +1 -0
- includes/gateways/stripe/vendor/composer/autoload_real.php +11 -6
- includes/gateways/stripe/vendor/composer/autoload_static.php +8 -3
- includes/gateways/stripe/vendor/composer/installed.json +222 -162
- includes/gateways/stripe/vendor/composer/installed.php +56 -0
- includes/gateways/stripe/vendor/composer/installers/composer.json +41 -5
- includes/gateways/stripe/vendor/composer/installers/phpstan.neon.dist +10 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php +6 -2
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php +9 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php +7 -6
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php +9 -6
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +9 -28
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php +9 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php +32 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php +3 -2
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php +10 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php +10 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php +14 -8
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php +12 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php +29 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php +10 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/Installer.php +133 -14
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php +9 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php +18 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php +11 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php +27 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php +10 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php +37 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php +23 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php +29 -6
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php +33 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php +1 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MiaoxingInstaller.php +10 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php +54 -46
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php +12 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php +3 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php +6 -4
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php +24 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php +14 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php +1 -1
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php +11 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php +29 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/Plugin.php +12 -2
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php +9 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php +22 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php +63 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php +24 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php +10 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php +10 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +5 -3
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php +1 -2
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php +25 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php +12 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php +47 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php +9 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php +30 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php +32 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php +9 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php +10 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php +49 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php +12 -1
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/WinterInstaller.php +58 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php +1 -0
- includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php +32 -0
- includes/gateways/stripe/vendor/composer/platform_check.php +26 -0
- includes/payments/functions.php +2 -2
- languages/easy-digital-downloads.pot +43 -27
- readme.txt +14 -1
assets/js/edd-checkout-global.js
CHANGED
@@ -132,9 +132,9 @@ window.EDD_Checkout = (function($) {
|
|
132 |
|
133 |
event.preventDefault();
|
134 |
|
135 |
-
var
|
136 |
-
|
137 |
-
|
138 |
|
139 |
if (discount_code == '' || discount_code == edd_global_vars.enter_discount ) {
|
140 |
return false;
|
@@ -174,22 +174,15 @@ window.EDD_Checkout = (function($) {
|
|
174 |
|
175 |
recalculate_taxes();
|
176 |
|
177 |
-
var inputs = $('#edd_cc_fields .edd-input, #edd_cc_fields .edd-select,#edd_cc_address .edd-input, #edd_cc_address .edd-select,#edd_payment_mode_select .edd-input, #edd_payment_mode_select .edd-select');
|
178 |
-
|
179 |
if( '0.00' == discount_response.total_plain ) {
|
180 |
|
181 |
$('#edd_cc_fields,#edd_cc_address,#edd_payment_mode_select').slideUp();
|
182 |
-
|
183 |
$('input[name="edd-gateway"]').val( 'manual' );
|
184 |
|
185 |
} else {
|
186 |
|
187 |
-
|
188 |
-
var $input = $( this );
|
189 |
-
if ( ! $input.is( '.card-name, .card-address, .card-address-2' ) ) {
|
190 |
-
$input.prop( 'required', true );
|
191 |
-
}
|
192 |
-
} );
|
193 |
$('#edd_cc_fields,#edd_cc_address').slideDown();
|
194 |
|
195 |
}
|
132 |
|
133 |
event.preventDefault();
|
134 |
|
135 |
+
var discount_code = $( '#edd-discount' ).val(),
|
136 |
+
edd_discount_loader = $( '#edd-discount-loader' ),
|
137 |
+
required_inputs = $( '#edd_cc_address .edd-input, #edd_cc_address .edd-select' ).filter( '[required]' );
|
138 |
|
139 |
if (discount_code == '' || discount_code == edd_global_vars.enter_discount ) {
|
140 |
return false;
|
174 |
|
175 |
recalculate_taxes();
|
176 |
|
|
|
|
|
177 |
if( '0.00' == discount_response.total_plain ) {
|
178 |
|
179 |
$('#edd_cc_fields,#edd_cc_address,#edd_payment_mode_select').slideUp();
|
180 |
+
required_inputs.prop( 'required', false );
|
181 |
$('input[name="edd-gateway"]').val( 'manual' );
|
182 |
|
183 |
} else {
|
184 |
|
185 |
+
required_inputs.prop( 'required', true );
|
|
|
|
|
|
|
|
|
|
|
186 |
$('#edd_cc_fields,#edd_cc_address').slideDown();
|
187 |
|
188 |
}
|
assets/js/edd-checkout-global.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.EDD_Checkout=function($){"use strict";var $body,$form,$edd_cart_amount,$checkout_form_wrap;function apply_discount(event){event.preventDefault()
|
1 |
+
window.EDD_Checkout=function($){"use strict";var $body,$form,$edd_cart_amount,$checkout_form_wrap;function apply_discount(event){event.preventDefault();var discount_code=$("#edd-discount").val(),edd_discount_loader=$("#edd-discount-loader"),required_inputs=$("#edd_cc_address .edd-input, #edd_cc_address .edd-select").filter("[required]");if(""==discount_code||discount_code==edd_global_vars.enter_discount)return!1;var postData={action:"edd_apply_discount",code:discount_code,form:$("#edd_purchase_form").serialize()};return $("#edd-discount-error-wrap").html("").hide(),edd_discount_loader.show(),$.ajax({type:"POST",data:postData,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(discount_response){discount_response?"valid"==discount_response.msg?($(".edd_cart_discount").html(discount_response.html),$(".edd_cart_discount_row").show(),$(".edd_cart_amount").each(function(){$(this).text(discount_response.total),$(this).data("total",discount_response.total_plain)}),$("#edd-discount",$checkout_form_wrap).val(""),recalculate_taxes(),"0.00"==discount_response.total_plain?($("#edd_cc_fields,#edd_cc_address,#edd_payment_mode_select").slideUp(),required_inputs.prop("required",!1),$('input[name="edd-gateway"]').val("manual")):(required_inputs.prop("required",!0),$("#edd_cc_fields,#edd_cc_address").slideDown()),$body.trigger("edd_discount_applied",[discount_response])):($("#edd-discount-error-wrap").html('<span class="edd_error">'+discount_response.msg+"</span>"),$("#edd-discount-error-wrap").show(),$body.trigger("edd_discount_invalid",[discount_response])):(window.console&&window.console.log&&console.log(discount_response),$body.trigger("edd_discount_failed",[discount_response])),edd_discount_loader.hide()}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!1}function remove_discount(event){var postData={action:"edd_remove_discount",code:$(this).data("code")};return $.ajax({type:"POST",data:postData,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(discount_response){var zero="0"+edd_global_vars.decimal_separator+"00";$(".edd_cart_amount").each(function(){edd_global_vars.currency_sign+zero!=$(this).text()&&zero+edd_global_vars.currency_sign!=$(this).text()||window.location.reload(),$(this).text(discount_response.total),$(this).data("total",discount_response.total_plain)}),$(".edd_cart_discount").html(discount_response.html),discount_response.discounts||$(".edd_cart_discount_row").hide(),recalculate_taxes(),$("#edd_cc_fields,#edd_cc_address").slideDown(),$body.trigger("edd_discount_removed",[discount_response])}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!1}function update_item_quantities(event){var $this=$(this),quantity=$this.val(),key=$this.data("key"),download_id=$this.closest(".edd_cart_item").data("download-id"),options=$this.parent().find('input[name="edd-cart-download-'+key+'-options"]').val(),edd_cc_address=$("#edd_cc_address"),postData={action:"edd_update_quantity",quantity:quantity,download_id:download_id,options:options,billing_country:edd_cc_address.find("#billing_country").val(),card_state:edd_cc_address.find("#card_state").val()};return $.ajax({type:"POST",data:postData,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(response){$(".edd_cart_subtotal_amount").each(function(){$(this).text(response.subtotal)}),$(".edd_cart_tax_amount").each(function(){$(this).text(response.taxes)}),$(".edd_cart_amount").each(function(){var total=response.total,subtotal=response.subtotal;$(this).text(total);var float_total=parseFloat(total.replace(/[^0-9\.-]+/g,"")),float_subtotal=parseFloat(subtotal.replace(/[^0-9\.-]+/g,""));$(this).data("total",float_total),$(this).data("subtotal",float_subtotal),$body.trigger("edd_quantity_updated",[response])})}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!1}return{init:function(){$body=$(document.body),$form=$("#edd_purchase_form"),$edd_cart_amount=$(".edd_cart_amount"),$edd_cart_amount.text(),$checkout_form_wrap=$("#edd_checkout_form_wrap"),$body.on("edd_gateway_loaded",function(e){var form,card_number,card_cvc,card_expiry;card_number=(form=$form).find(".card-number"),card_cvc=form.find(".card-cvc"),card_expiry=form.find(".card-expiry"),card_number.length&&"function"==typeof card_number.payment&&(card_number.payment("formatCardNumber"),card_cvc.payment("formatCardCVC"),card_expiry.payment("formatCardExpiry"))}),$body.on("keyup change",".edd-do-validate .card-number",function(){var field,card_field;field=$(this),(card_field=field).validateCreditCard(function(result){var $card_type=$(".card-type");null==result.card_type?($card_type.removeClass().addClass("off card-type"),card_field.removeClass("valid"),card_field.addClass("error")):($card_type.removeClass("off"),$card_type.addClass(result.card_type.name),result.length_valid&&result.luhn_valid?(card_field.addClass("valid"),card_field.removeClass("error")):(card_field.removeClass("valid"),card_field.addClass("error")))})}),$body.on("blur change",".card-name",function(){var name_field=$(this);name_field.validateCreditCard(function(result){null!=result.card_type?(name_field.removeClass("valid").addClass("error"),$("#edd-purchase-button").attr("disabled","disabled")):(name_field.removeClass("error").addClass("valid"),$("#edd-purchase-button").removeAttr("disabled"))})}),$body.on("submit","#edd_payment_mode",function(){if(0==$("#edd-gateway option:selected").val())return alert(edd_global_vars.no_gateway),!1}),$body.on("click","#edd_payment_mode_select input",function(){$("#edd_payment_mode_select label.edd-gateway-option-selected").removeClass("edd-gateway-option-selected"),$("#edd_payment_mode_select input:checked").parent().addClass("edd-gateway-option-selected")}),$checkout_form_wrap.on("click",".edd-apply-discount",apply_discount),$checkout_form_wrap.on("keypress","#edd-discount",function(event){if("13"==event.keyCode)return!1}),$checkout_form_wrap.on("keyup","#edd-discount",function(event){"13"==event.keyCode&&$checkout_form_wrap.find(".edd-apply-discount").trigger("click")}),$body.on("click",".edd_discount_remove",remove_discount),$body.on("click",".edd_discount_link",function(e){e.preventDefault(),$(".edd_discount_link").parent().hide(),$("#edd-discount-code-wrap").show().find("#edd-discount").focus()}),$body.find("#edd-discount-code-wrap").hide(),$body.find("#edd_show_discount").show(),$body.on("change",".edd-item-quantity",update_item_quantities),$body.on("click",".edd-amazon-logout #Logout",function(e){e.preventDefault(),amazon.Login.logout(),window.location=edd_amazon.checkoutUri})},recalculate_taxes:recalculate_taxes}}(window.jQuery),window.jQuery(document).ready(EDD_Checkout.init);var ajax_tax_count=0;function recalculate_taxes(state){if("1"==edd_global_vars.taxes_enabled){var $edd_cc_address=jQuery("#edd_cc_address");state||(state=$edd_cc_address.find("#card_state").val());var postData={action:"edd_recalculate_taxes",billing_country:$edd_cc_address.find("#billing_country").val(),state:state,card_zip:$edd_cc_address.find("input[name=card_zip]").val(),nonce:jQuery("#edd-checkout-address-fields-nonce").val()};jQuery("#edd_purchase_submit [type=submit]").after('<span class="edd-loading-ajax edd-recalculate-taxes-loading edd-loading"></span>');var current_ajax_count=++ajax_tax_count;jQuery.ajax({type:"POST",data:postData,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(tax_response){if(current_ajax_count===ajax_tax_count){jQuery("#edd_checkout_cart_form").replaceWith(tax_response.html),jQuery(".edd_cart_amount").html(tax_response.total);var tax_data=new Object;tax_data.postdata=postData,tax_data.response=tax_response,jQuery("body").trigger("edd_taxes_recalculated",[tax_data])}jQuery(".edd-recalculate-taxes-loading").remove()}}).fail(function(data){window.console&&window.console.log&&(console.log(data),current_ajax_count===ajax_tax_count&&jQuery("body").trigger("edd_taxes_recalculated",[tax_data]))})}}
|
easy-digital-downloads.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: The easiest way to sell digital products with WordPress.
|
6 |
* Author: Sandhills Development, LLC
|
7 |
* Author URI: https://sandhillsdev.com
|
8 |
-
* Version: 2.10.
|
9 |
* Text Domain: easy-digital-downloads
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -25,7 +25,7 @@
|
|
25 |
* @package EDD
|
26 |
* @category Core
|
27 |
* @author Pippin Williamson
|
28 |
-
* @version 2.10.
|
29 |
*/
|
30 |
|
31 |
// Exit if accessed directly.
|
@@ -206,7 +206,7 @@ final class Easy_Digital_Downloads {
|
|
206 |
|
207 |
// Plugin version.
|
208 |
if ( ! defined( 'EDD_VERSION' ) ) {
|
209 |
-
define( 'EDD_VERSION', '2.10.
|
210 |
}
|
211 |
|
212 |
// Plugin Folder Path.
|
5 |
* Description: The easiest way to sell digital products with WordPress.
|
6 |
* Author: Sandhills Development, LLC
|
7 |
* Author URI: https://sandhillsdev.com
|
8 |
+
* Version: 2.10.5
|
9 |
* Text Domain: easy-digital-downloads
|
10 |
* Domain Path: languages
|
11 |
*
|
25 |
* @package EDD
|
26 |
* @category Core
|
27 |
* @author Pippin Williamson
|
28 |
+
* @version 2.10.5
|
29 |
*/
|
30 |
|
31 |
// Exit if accessed directly.
|
206 |
|
207 |
// Plugin version.
|
208 |
if ( ! defined( 'EDD_VERSION' ) ) {
|
209 |
+
define( 'EDD_VERSION', '2.10.5' );
|
210 |
}
|
211 |
|
212 |
// Plugin Folder Path.
|
includes/admin/downloads/metabox.php
CHANGED
@@ -399,7 +399,7 @@ add_action( 'edd_meta_box_price_fields', 'edd_render_price_field', 10 );
|
|
399 |
* @param array $args
|
400 |
* @param $post_id
|
401 |
*/
|
402 |
-
function edd_render_price_row( $key, $args
|
403 |
global $wp_filter;
|
404 |
|
405 |
$defaults = array(
|
@@ -813,7 +813,7 @@ add_action( 'edd_meta_box_files_fields', 'edd_render_files_field', 20 );
|
|
813 |
* @param int $post_id Download (Post) ID
|
814 |
* @return void
|
815 |
*/
|
816 |
-
function edd_render_file_row( $key
|
817 |
$defaults = array(
|
818 |
'name' => null,
|
819 |
'file' => null,
|
399 |
* @param array $args
|
400 |
* @param $post_id
|
401 |
*/
|
402 |
+
function edd_render_price_row( $key, $args, $post_id, $index ) {
|
403 |
global $wp_filter;
|
404 |
|
405 |
$defaults = array(
|
813 |
* @param int $post_id Download (Post) ID
|
814 |
* @return void
|
815 |
*/
|
816 |
+
function edd_render_file_row( $key, $args, $post_id, $index ) {
|
817 |
$defaults = array(
|
818 |
'name' => null,
|
819 |
'file' => null,
|
includes/admin/payments/payments-history.php
CHANGED
@@ -111,7 +111,7 @@ add_filter( 'admin_title', 'edd_view_order_details_title', 10, 2 );
|
|
111 |
* @param $context
|
112 |
* @return string
|
113 |
*/
|
114 |
-
function edd_override_edit_post_for_payment_link( $url, $post_id
|
115 |
|
116 |
$post = get_post( $post_id );
|
117 |
if( ! $post )
|
111 |
* @param $context
|
112 |
* @return string
|
113 |
*/
|
114 |
+
function edd_override_edit_post_for_payment_link( $url, $post_id, $context ) {
|
115 |
|
116 |
$post = get_post( $post_id );
|
117 |
if( ! $post )
|
includes/class-edd-customer.php
CHANGED
@@ -818,7 +818,7 @@ class EDD_Customer {
|
|
818 |
*
|
819 |
* @since 2.6
|
820 |
*/
|
821 |
-
public function add_meta( $meta_key
|
822 |
return EDD()->customer_meta->add_meta( $this->id, $meta_key, $meta_value, $unique );
|
823 |
}
|
824 |
|
@@ -832,7 +832,7 @@ class EDD_Customer {
|
|
832 |
*
|
833 |
* @since 2.6
|
834 |
*/
|
835 |
-
public function update_meta( $meta_key
|
836 |
return EDD()->customer_meta->update_meta( $this->id, $meta_key, $meta_value, $prev_value );
|
837 |
}
|
838 |
|
818 |
*
|
819 |
* @since 2.6
|
820 |
*/
|
821 |
+
public function add_meta( $meta_key, $meta_value, $unique = false ) {
|
822 |
return EDD()->customer_meta->add_meta( $this->id, $meta_key, $meta_value, $unique );
|
823 |
}
|
824 |
|
832 |
*
|
833 |
* @since 2.6
|
834 |
*/
|
835 |
+
public function update_meta( $meta_key, $meta_value, $prev_value = '' ) {
|
836 |
return EDD()->customer_meta->update_meta( $this->id, $meta_key, $meta_value, $prev_value );
|
837 |
}
|
838 |
|
includes/class-edd-db-customer-meta.php
CHANGED
@@ -92,7 +92,7 @@ class EDD_DB_Customer_Meta extends EDD_DB {
|
|
92 |
* @access private
|
93 |
* @since 2.6
|
94 |
*/
|
95 |
-
public function add_meta( $customer_id
|
96 |
$customer_id = $this->sanitize_customer_id( $customer_id );
|
97 |
if ( false === $customer_id ) {
|
98 |
return false;
|
@@ -120,7 +120,7 @@ class EDD_DB_Customer_Meta extends EDD_DB {
|
|
120 |
* @access private
|
121 |
* @since 2.6
|
122 |
*/
|
123 |
-
public function update_meta( $customer_id
|
124 |
$customer_id = $this->sanitize_customer_id( $customer_id );
|
125 |
if ( false === $customer_id ) {
|
126 |
return false;
|
92 |
* @access private
|
93 |
* @since 2.6
|
94 |
*/
|
95 |
+
public function add_meta( $customer_id, $meta_key, $meta_value, $unique = false ) {
|
96 |
$customer_id = $this->sanitize_customer_id( $customer_id );
|
97 |
if ( false === $customer_id ) {
|
98 |
return false;
|
120 |
* @access private
|
121 |
* @since 2.6
|
122 |
*/
|
123 |
+
public function update_meta( $customer_id, $meta_key, $meta_value, $prev_value = '' ) {
|
124 |
$customer_id = $this->sanitize_customer_id( $customer_id );
|
125 |
if ( false === $customer_id ) {
|
126 |
return false;
|
includes/download-functions.php
CHANGED
@@ -220,7 +220,7 @@ add_filter( 'edd_download_price', 'edd_currency_filter', 20 );
|
|
220 |
* @param string $amount_override a custom amount that over rides the 'edd_price' meta, used for variable prices
|
221 |
* @return string - the price of the download
|
222 |
*/
|
223 |
-
function edd_get_download_final_price( $download_id
|
224 |
if ( is_null( $amount_override ) ) {
|
225 |
$original_price = get_post_meta( $download_id, 'edd_price', true );
|
226 |
} else {
|
@@ -608,7 +608,7 @@ function edd_get_download_sales_stats( $download_id = 0 ) {
|
|
608 |
* @param string|null $sale_date The date of the sale
|
609 |
* @return void
|
610 |
*/
|
611 |
-
function edd_record_sale_in_log( $download_id
|
612 |
global $edd_logs;
|
613 |
|
614 |
$log_data = array(
|
@@ -641,7 +641,7 @@ function edd_record_sale_in_log( $download_id = 0, $payment_id, $price_id = fals
|
|
641 |
* @param int $price_id Price ID, if any
|
642 |
* @return void
|
643 |
*/
|
644 |
-
function edd_record_download_in_log( $download_id
|
645 |
global $edd_logs;
|
646 |
|
647 |
$log_data = array(
|
@@ -720,7 +720,7 @@ function edd_decrease_purchase_count( $download_id = 0, $quantity = 1 ) {
|
|
720 |
* @param int $amount Earnings
|
721 |
* @return bool|int
|
722 |
*/
|
723 |
-
function edd_increase_earnings( $download_id
|
724 |
$download = new EDD_Download( $download_id );
|
725 |
return $download->increase_earnings( $amount );
|
726 |
}
|
@@ -733,7 +733,7 @@ function edd_increase_earnings( $download_id = 0, $amount ) {
|
|
733 |
* @param int $amount Earnings
|
734 |
* @return bool|int
|
735 |
*/
|
736 |
-
function edd_decrease_earnings( $download_id
|
737 |
$download = new EDD_Download( $download_id );
|
738 |
return $download->decrease_earnings( $amount );
|
739 |
}
|
@@ -985,7 +985,7 @@ function edd_is_file_at_download_limit( $download_id = 0, $payment_id = 0, $file
|
|
985 |
* @param string $file_key File Key
|
986 |
* @return string - the price ID if restricted, "all" otherwise
|
987 |
*/
|
988 |
-
function edd_get_file_price_condition( $download_id
|
989 |
$download = new EDD_Download( $download_id );
|
990 |
return $download->get_file_price_condition( $file_key );
|
991 |
}
|
220 |
* @param string $amount_override a custom amount that over rides the 'edd_price' meta, used for variable prices
|
221 |
* @return string - the price of the download
|
222 |
*/
|
223 |
+
function edd_get_download_final_price( $download_id, $user_purchase_info, $amount_override = null ) {
|
224 |
if ( is_null( $amount_override ) ) {
|
225 |
$original_price = get_post_meta( $download_id, 'edd_price', true );
|
226 |
} else {
|
608 |
* @param string|null $sale_date The date of the sale
|
609 |
* @return void
|
610 |
*/
|
611 |
+
function edd_record_sale_in_log( $download_id, $payment_id, $price_id = false, $sale_date = null ) {
|
612 |
global $edd_logs;
|
613 |
|
614 |
$log_data = array(
|
641 |
* @param int $price_id Price ID, if any
|
642 |
* @return void
|
643 |
*/
|
644 |
+
function edd_record_download_in_log( $download_id, $file_id, $user_info, $ip, $payment_id, $price_id = false ) {
|
645 |
global $edd_logs;
|
646 |
|
647 |
$log_data = array(
|
720 |
* @param int $amount Earnings
|
721 |
* @return bool|int
|
722 |
*/
|
723 |
+
function edd_increase_earnings( $download_id, $amount ) {
|
724 |
$download = new EDD_Download( $download_id );
|
725 |
return $download->increase_earnings( $amount );
|
726 |
}
|
733 |
* @param int $amount Earnings
|
734 |
* @return bool|int
|
735 |
*/
|
736 |
+
function edd_decrease_earnings( $download_id, $amount ) {
|
737 |
$download = new EDD_Download( $download_id );
|
738 |
return $download->decrease_earnings( $amount );
|
739 |
}
|
985 |
* @param string $file_key File Key
|
986 |
* @return string - the price ID if restricted, "all" otherwise
|
987 |
*/
|
988 |
+
function edd_get_file_price_condition( $download_id, $file_key ) {
|
989 |
$download = new EDD_Download( $download_id );
|
990 |
return $download->get_file_price_condition( $file_key );
|
991 |
}
|
includes/gateways/stripe/assets/css/build/app.min.css
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
:root{--edds-modal-grid-unit: 1rem;--edds-modal-overlay: rgba(0, 0, 0, 0.60)}.edds-modal__overlay{z-index:9999;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.60);background:var(--edds-modal-overlay);display:flex;justify-content:center;align-items:center}.edds-modal__container{background-color:#fff;min-width:350px;max-width:90vw;max-height:90vh;box-sizing:border-box;overflow-y:auto}.admin-bar .edds-modal__container{margin-top:32px}.edds-modal__header{padding:calc(1rem * 1.5);padding:calc(var(--edds-modal-grid-unit) * 1.5);display:flex;justify-content:space-between;align-items:center;position:-webkit-sticky;position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid #eee}.edds-modal__title{text-align:left;font-size:150%;margin:0}.edds-modal__close{line-height:1;padding:1rem}.edds-modal__close:before{content:"✕"}.edds-modal__content{margin:calc(1rem * 1.5);margin:calc(var(--edds-modal-grid-unit) * 1.5)}@-webkit-keyframes eddsSlideIn{from{transform:translateY(15%)}to{transform:translateY(0)}}@keyframes eddsSlideIn{from{transform:translateY(15%)}to{transform:translateY(0)}}@-webkit-keyframes eddsSlideOut{from{transform:translateY(0)}to{transform:translateY(15%)}}@keyframes eddsSlideOut{from{transform:translateY(0)}to{transform:translateY(15%)}}.edds-modal.has-slide{display:none}.edds-modal.has-slide.is-open{display:block}.edds-modal.has-slide[aria-hidden=false] .edds-modal__container{-webkit-animation:eddsSlideIn .3s cubic-bezier(0, 0, 0.2, 1);animation:eddsSlideIn .3s cubic-bezier(0, 0, 0.2, 1)}.edds-modal.has-slide[aria-hidden=true] .edds-modal__container{-webkit-animation:eddsSlideOut .3s cubic-bezier(0, 0, 0.2, 1);animation:eddsSlideOut .3s cubic-bezier(0, 0, 0.2, 1)}.edds-modal.has-slide .edds-modal__container,.edds-modal.has-slide .edds-modal__overlay{will-change:transform}.edds-prb{margin:15px 0;display:none}.edds-prb__or{font-size:90%;text-align:center;margin:15px 0;overflow:hidden}.edds-prb__or::before,.edds-prb__or::after{background-color:rgba(0,0,0,.1);content:"";display:inline-block;height:1px;position:relative;vertical-align:middle;width:50%}.edds-prb__or::before{right:.5em;margin-left:-50%}.edds-prb__or::after{left:.5em;margin-right:-50%}.edd_download_purchase_form.loading{position:relative}.edd_download_purchase_form.loading::after{content:"";position:absolute;left:0;width:100%;height:100%;top:0;z-index:100}.edd_download_purchase_form.loading>*{opacity:.65}#edd_checkout_form_wrap.loading{position:relative}#edd_checkout_form_wrap.loading::after{content:"";position:absolute;left:0;width:100%;height:100%;top:0;z-index:100}#edd_checkout_form_wrap.loading>*{opacity:.65}#edd_checkout_form_wrap .edds-prb{margin-bottom:0}#edd_checkout_form_wrap .edds-prb__or{display:none}#edd_checkout_form_wrap .edd-card-selector-radio label{display:inline;vertical-align:middle;font-weight:normal;line-height:24px;font-size:100%;margin:0px}.edd-card-selector-radio .edd-stripe-card-radio-item{width:100%;font-size:15px;padding:8px 12px;border:1px solid transparent}.edd-card-selector-radio .edd-stripe-card-radio-item label{line-height:1;margin:0;display:flex;align-items:center}.edd-card-selector-radio .edd-stripe-card-radio-item label .add-new-card,.edd-card-selector-radio .edd-stripe-card-radio-item label .card-label{margin-left:8px}.edd-card-selector-radio .edd-stripe-card-radio-item.selected{border:1px solid #f0f0f0;background-color:#fcfcfc;border-radius:3px}.edd-card-selector-radio div.card-label{width:65%;display:inline-block}.edd-card-selector-radio span.card-is-default{font-style:italic}.edd-card-selector-radio span.card-expired{color:#f33}.edd-stripe-card-selector+.edd-stripe-new-card{margin-top:20px}#edd-stripe-manage-cards .edd-stripe-add-new-card{margin:20px 0 10px}#edd-stripe-manage-cards div.edd-stripe-card-item{list-style:none;width:100%;display:-ms-inline-grid;display:inline-grid;border:1px solid #f0f0f0;padding:5px 10px;min-height:100px;margin-bottom:10px;border-radius:3px;margin-left:0px}.edd-stripe-card-item>span{display:block}.edd-stripe-card-item .card-meta>span{color:#999;display:block}.edd-stripe-card-item .card-actions a{text-decoration:none}.edd-stripe-card-item .card-actions a.delete{color:#f33}.card-actions .edd-loading-ajax{display:inline-block;margin-right:4px}.edd-stripe-card-item .card-update-form{display:none}.edd-stripe-card-item .card-update-form label{font-weight:bold}.edd-stripe-card-item .card-update-form input{margin-bottom:3px}.edd-stripe-card-item .card-update-form select{background:#fff;border:1px solid #e4e4e4;height:40px;margin-right:3px}.edd-stripe-card-item .card-update-form select:first-of-type{margin-right:3px}.edd-stripe-card-item .card-address-fields input,.edd-stripe-card-item .card-address-fields select{width:49%;display:inline-block}.edd-stripe-add-new-card label{font-weight:bold;display:block;position:relative;line-height:100%;font-size:95%;margin:0 0 5px}.edd-stripe-add-new-card label:after{display:block;visibility:hidden;float:none;clear:both;height:0;text-indent:-9999px;content:"."}.edd-stripe-add-new-card span.edd-description{color:#666;font-size:80%;display:block;margin:0 0 5px}.edd-stripe-add-new-card input.edd-input,.edd-stripe-add-new-card textarea.edd-input{display:inline-block;width:70%}.edd-stripe-add-new-card select.edd-select{display:block;width:60%}.edd-stripe-add-new-card select.edd-select.edd-select-small{display:inline;width:auto}.edd-stripe-add-new-card input.edd-input.error,.edd-stripe-add-new-card textarea.edd-input.error{border-color:#c4554e}.edd-stripe-add-new-card>p{margin:0 0 21px}.edd-stripe-add-new-card span.edd-required-indicator{color:#b94a48;display:inline}.edd-stripe-add-new-card textarea,.edd-stripe-add-new-card input[type=text],.edd-stripe-add-new-card input[type=email],.edd-stripe-add-new-card input[type=password],.edd-stripe-add-new-card input[type=tel]{padding:4px 6px}.edd-stripe-add-new-card input[type=radio]{border:none;margin-right:5px}.edd-stripe-add-new-card input[type=checkbox]{display:inline-block;margin:0 5px 0 0}.edd-stripe-add-new-card input[type=checkbox]+label,.edd-stripe-add-new-card input[type=checkbox]+label:after{display:inline}.edd-stripe-add-new-card .edd-payment-icons{height:32px;display:block;margin:0 0 8px}.edd-stripe-add-new-card .edd-payment-icons img.payment-icon{max-height:32px;width:auto;margin:0 3px 0 0;float:left;background:none;padding:0;border:none;box-shadow:none}.edd-stripe-add-new-card #edd-payment-mode-wrap label{display:inline-block;margin:0 20px 0 0}.edd-stripe-add-new-card #edd-payment-mode-wrap .edd-payment-mode-label{font-weight:bold;display:inline-block;position:relative;margin-bottom:5px}.edd-stripe-add-new-card fieldset{border:1px solid #eee;padding:1.387em;margin:0 0 21px}.edd-stripe-add-new-card #edd_purchase_submit,.edd-stripe-add-new-card #edd_discount_code,.edd-stripe-add-new-card #edd_register_account_fields{padding:0;border:none}.edd-stripe-add-new-card fieldset fieldset{margin:0;border:none;padding:0}.edd-stripe-add-new-card #edd-login-account-wrap,.edd-stripe-add-new-card #edd-new-account-wrap,.edd-stripe-add-new-card #edd_show_discount,.edd-stripe-add-new-card .edd-cart-adjustment,.edd-stripe-add-new-card #edd_final_total_wrap{background:#fafafa;color:#666;padding:.5em 1.387em}.edd-stripe-add-new-card #edd-discount-code-wrap,.edd-stripe-add-new-card #edd_final_total_wrap,.edd-stripe-add-new-card #edd_show_discount{border:1px solid #eee}.edd-stripe-add-new-card .edd-cart-adjustment{padding:1.387em}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-input,.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{display:inline-block}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{padding:3px 12px;margin-bottom:2px}.edd-stripe-add-new-card #edd-discount-error-wrap{width:100%;display:inline-block;margin:1em 0 0}.edd-stripe-add-new-card #edd-new-account-wrap,.edd-stripe-add-new-card #edd-login-account-wrap{margin:-1.387em -1.387em 21px;border-left:none;border-right:none;border-top:none}.edd-stripe-add-new-card #edd_payment_mode_select{margin-bottom:21px}.edd-stripe-add-new-card fieldset#edd_register_fields #edd_checkout_user_info{margin-bottom:21px}.edd-stripe-add-new-card fieldset#edd_register_account_fields legend{padding-top:11px}.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_register_password,.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_login_password{margin:0}.edd-stripe-add-new-card fieldset#edd_cc_fields{border:1px solid #f0f0f0;background:#f9f9f9;position:relative}.edd-stripe-add-new-card fieldset#edd_cc_fields legend{border:none;padding:0}.edd-stripe-add-new-card fieldset p:last-child{margin-bottom:0}#edd_secure_site_wrapper{padding:4px 4px 4px 0;font-weight:bold}.edd-stripe-add-new-card span.exp-divider{display:inline}.edd-stripe-card-element.StripeElement,.edd-stripe-card-exp-element.StripeElement,.edd-stripe-card-cvc-element.StripeElement{box-sizing:border-box;padding:10px 12px;border:1px solid #ccc;background-color:#fff}.edd-stripe-card-element.StripeElement--invalid{border-color:#c4554e !important}#edd-stripe-card-errors:not(:empty){margin:20px 0 0}#edd-card-wrap{position:relative}#edd-card-details-wrap{display:flex;justify-content:space-between;flex-wrap:wrap}#edd-card-details-wrap p:empty{width:100%}#edd-card-exp-wrap,#edd-card-cvv-wrap{width:48%}#edd-stripe-card-element-wrapper{position:relative}#edd_checkout_form_wrap .edd-stripe-new-card span.card-type{background-size:32px 24px !important;width:32px;height:24px;top:50%;transform:translate3d(0, -50%, 0);right:10px}.edds-buy-now-modal{width:500px}.edds-buy-now-modal .edds-modal__close{padding:.5rem}.edds-buy-now-modal #edd_checkout_form_wrap input.edd-input,.edds-buy-now-modal #edd_checkout_form_wrap textarea.edd-input{width:100%}.edds-buy-now-modal #edd_checkout_form_wrap #edd_purchase_submit{margin-top:1.5rem;margin-bottom:0}.edds-buy-now-modal .edds-field-spacer-shim{margin-bottom:1rem}.edds-buy-now-modal .edd-alert-error{margin:20px 0}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty){margin-bottom:20px}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty) .edd-alert-error{margin:0}
|
2 |
|
3 |
/*# sourceMappingURL=app.min.css.map*/
|
1 |
+
:root{--edds-modal-grid-unit: 1rem;--edds-modal-overlay: rgba(0, 0, 0, 0.60)}.edds-modal__overlay{z-index:9999;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.60);background:var(--edds-modal-overlay);display:flex;justify-content:center;align-items:center}.edds-modal__container{background-color:#fff;min-width:350px;max-width:90vw;max-height:90vh;box-sizing:border-box;overflow-y:auto}.admin-bar .edds-modal__container{margin-top:32px}.edds-modal__header{padding:calc(1rem * 1.5);padding:calc(var(--edds-modal-grid-unit) * 1.5);display:flex;justify-content:space-between;align-items:center;position:-webkit-sticky;position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid #eee}.edds-modal__title{text-align:left;font-size:150%;margin:0}.edds-modal__close{line-height:1;padding:1rem}.edds-modal__close:before{content:"✕"}.edds-modal__content{margin:calc(1rem * 1.5);margin:calc(var(--edds-modal-grid-unit) * 1.5)}@-webkit-keyframes eddsSlideIn{from{transform:translateY(15%)}to{transform:translateY(0)}}@keyframes eddsSlideIn{from{transform:translateY(15%)}to{transform:translateY(0)}}@-webkit-keyframes eddsSlideOut{from{transform:translateY(0)}to{transform:translateY(15%)}}@keyframes eddsSlideOut{from{transform:translateY(0)}to{transform:translateY(15%)}}.edds-modal.has-slide{display:none}.edds-modal.has-slide.is-open{display:block}.edds-modal.has-slide[aria-hidden=false] .edds-modal__container{-webkit-animation:eddsSlideIn .3s cubic-bezier(0, 0, 0.2, 1);animation:eddsSlideIn .3s cubic-bezier(0, 0, 0.2, 1)}.edds-modal.has-slide[aria-hidden=true] .edds-modal__container{-webkit-animation:eddsSlideOut .3s cubic-bezier(0, 0, 0.2, 1);animation:eddsSlideOut .3s cubic-bezier(0, 0, 0.2, 1)}.edds-modal.has-slide .edds-modal__container,.edds-modal.has-slide .edds-modal__overlay{will-change:transform}.edds-prb{margin:15px 0;display:none}.edds-prb__or{font-size:90%;text-align:center;margin:15px 0;overflow:hidden}.edds-prb__or::before,.edds-prb__or::after{background-color:rgba(0,0,0,.1);content:"";display:inline-block;height:1px;position:relative;vertical-align:middle;width:50%}.edds-prb__or::before{right:.5em;margin-left:-50%}.edds-prb__or::after{left:.5em;margin-right:-50%}.edd_download_purchase_form.loading{position:relative}.edd_download_purchase_form.loading::after{content:"";position:absolute;left:0;width:100%;height:100%;top:0;z-index:100}.edd_download_purchase_form.loading>*{opacity:.65}#edd_checkout_form_wrap.loading{position:relative}#edd_checkout_form_wrap.loading::after{content:"";position:absolute;left:0;width:100%;height:100%;top:0;z-index:100}#edd_checkout_form_wrap.loading>*{opacity:.65}#edd_checkout_form_wrap:not(.edd-prb--is-active) #edd-payment-mode-wrap #edd-gateway-option-stripe-prb{display:none !important}#edd_checkout_form_wrap .edds-prb{margin-bottom:0}#edd_checkout_form_wrap .edds-prb__or{display:none}#edd_checkout_form_wrap .edd-card-selector-radio label{display:inline;vertical-align:middle;font-weight:normal;line-height:24px;font-size:100%;margin:0px}.edd-card-selector-radio .edd-stripe-card-radio-item{width:100%;font-size:15px;padding:8px 12px;border:1px solid transparent}.edd-card-selector-radio .edd-stripe-card-radio-item label{line-height:1;margin:0;display:flex;align-items:center}.edd-card-selector-radio .edd-stripe-card-radio-item label .add-new-card,.edd-card-selector-radio .edd-stripe-card-radio-item label .card-label{margin-left:8px}.edd-card-selector-radio .edd-stripe-card-radio-item.selected{border:1px solid #f0f0f0;background-color:#fcfcfc;border-radius:3px}.edd-card-selector-radio div.card-label{width:65%;display:inline-block}.edd-card-selector-radio span.card-is-default{font-style:italic}.edd-card-selector-radio span.card-expired{color:#f33}.edd-stripe-card-selector+.edd-stripe-new-card{margin-top:20px}#edd-stripe-manage-cards .edd-stripe-add-new-card{margin:20px 0 10px}#edd-stripe-manage-cards div.edd-stripe-card-item{list-style:none;width:100%;display:-ms-inline-grid;display:inline-grid;border:1px solid #f0f0f0;padding:5px 10px;min-height:100px;margin-bottom:10px;border-radius:3px;margin-left:0px}.edd-stripe-card-item>span{display:block}.edd-stripe-card-item .card-meta>span{color:#999;display:block}.edd-stripe-card-item .card-actions a{text-decoration:none}.edd-stripe-card-item .card-actions a.delete{color:#f33}.card-actions .edd-loading-ajax{display:inline-block;margin-right:4px}.edd-stripe-card-item .card-update-form{display:none}.edd-stripe-card-item .card-update-form label{font-weight:bold}.edd-stripe-card-item .card-update-form input{margin-bottom:3px}.edd-stripe-card-item .card-update-form select{background:#fff;border:1px solid #e4e4e4;height:40px;margin-right:3px}.edd-stripe-card-item .card-update-form select:first-of-type{margin-right:3px}.edd-stripe-card-item .card-address-fields input,.edd-stripe-card-item .card-address-fields select{width:49%;display:inline-block}.edd-stripe-add-new-card label{font-weight:bold;display:block;position:relative;line-height:100%;font-size:95%;margin:0 0 5px}.edd-stripe-add-new-card label:after{display:block;visibility:hidden;float:none;clear:both;height:0;text-indent:-9999px;content:"."}.edd-stripe-add-new-card span.edd-description{color:#666;font-size:80%;display:block;margin:0 0 5px}.edd-stripe-add-new-card input.edd-input,.edd-stripe-add-new-card textarea.edd-input{display:inline-block;width:70%}.edd-stripe-add-new-card select.edd-select{display:block;width:60%}.edd-stripe-add-new-card select.edd-select.edd-select-small{display:inline;width:auto}.edd-stripe-add-new-card input.edd-input.error,.edd-stripe-add-new-card textarea.edd-input.error{border-color:#c4554e}.edd-stripe-add-new-card>p{margin:0 0 21px}.edd-stripe-add-new-card span.edd-required-indicator{color:#b94a48;display:inline}.edd-stripe-add-new-card textarea,.edd-stripe-add-new-card input[type=text],.edd-stripe-add-new-card input[type=email],.edd-stripe-add-new-card input[type=password],.edd-stripe-add-new-card input[type=tel]{padding:4px 6px}.edd-stripe-add-new-card input[type=radio]{border:none;margin-right:5px}.edd-stripe-add-new-card input[type=checkbox]{display:inline-block;margin:0 5px 0 0}.edd-stripe-add-new-card input[type=checkbox]+label,.edd-stripe-add-new-card input[type=checkbox]+label:after{display:inline}.edd-stripe-add-new-card .edd-payment-icons{height:32px;display:block;margin:0 0 8px}.edd-stripe-add-new-card .edd-payment-icons img.payment-icon{max-height:32px;width:auto;margin:0 3px 0 0;float:left;background:none;padding:0;border:none;box-shadow:none}.edd-stripe-add-new-card #edd-payment-mode-wrap label{display:inline-block;margin:0 20px 0 0}.edd-stripe-add-new-card #edd-payment-mode-wrap .edd-payment-mode-label{font-weight:bold;display:inline-block;position:relative;margin-bottom:5px}.edd-stripe-add-new-card fieldset{border:1px solid #eee;padding:1.387em;margin:0 0 21px}.edd-stripe-add-new-card #edd_purchase_submit,.edd-stripe-add-new-card #edd_discount_code,.edd-stripe-add-new-card #edd_register_account_fields{padding:0;border:none}.edd-stripe-add-new-card fieldset fieldset{margin:0;border:none;padding:0}.edd-stripe-add-new-card #edd-login-account-wrap,.edd-stripe-add-new-card #edd-new-account-wrap,.edd-stripe-add-new-card #edd_show_discount,.edd-stripe-add-new-card .edd-cart-adjustment,.edd-stripe-add-new-card #edd_final_total_wrap{background:#fafafa;color:#666;padding:.5em 1.387em}.edd-stripe-add-new-card #edd-discount-code-wrap,.edd-stripe-add-new-card #edd_final_total_wrap,.edd-stripe-add-new-card #edd_show_discount{border:1px solid #eee}.edd-stripe-add-new-card .edd-cart-adjustment{padding:1.387em}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-input,.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{display:inline-block}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{padding:3px 12px;margin-bottom:2px}.edd-stripe-add-new-card #edd-discount-error-wrap{width:100%;display:inline-block;margin:1em 0 0}.edd-stripe-add-new-card #edd-new-account-wrap,.edd-stripe-add-new-card #edd-login-account-wrap{margin:-1.387em -1.387em 21px;border-left:none;border-right:none;border-top:none}.edd-stripe-add-new-card #edd_payment_mode_select{margin-bottom:21px}.edd-stripe-add-new-card fieldset#edd_register_fields #edd_checkout_user_info{margin-bottom:21px}.edd-stripe-add-new-card fieldset#edd_register_account_fields legend{padding-top:11px}.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_register_password,.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_login_password{margin:0}.edd-stripe-add-new-card fieldset#edd_cc_fields{border:1px solid #f0f0f0;background:#f9f9f9;position:relative}.edd-stripe-add-new-card fieldset#edd_cc_fields legend{border:none;padding:0}.edd-stripe-add-new-card fieldset p:last-child{margin-bottom:0}#edd_secure_site_wrapper{padding:4px 4px 4px 0;font-weight:bold}.edd-stripe-add-new-card span.exp-divider{display:inline}.edd-stripe-card-element.StripeElement,.edd-stripe-card-exp-element.StripeElement,.edd-stripe-card-cvc-element.StripeElement{box-sizing:border-box;padding:10px 12px;border:1px solid #ccc;background-color:#fff}.edd-stripe-card-element.StripeElement--invalid{border-color:#c4554e !important}#edd-stripe-card-errors:not(:empty){margin:20px 0 0}#edd-card-wrap{position:relative}#edd-card-details-wrap{display:flex;justify-content:space-between;flex-wrap:wrap}#edd-card-details-wrap p:empty{width:100%}#edd-card-exp-wrap,#edd-card-cvv-wrap{width:48%}#edd-stripe-card-element-wrapper{position:relative}#edd_checkout_form_wrap .edd-stripe-new-card span.card-type{background-size:32px 24px !important;width:32px;height:24px;top:50%;transform:translate3d(0, -50%, 0);right:10px}.edds-buy-now-modal{width:500px}.edds-buy-now-modal .edds-modal__close{padding:.5rem}.edds-buy-now-modal #edd_checkout_form_wrap input.edd-input,.edds-buy-now-modal #edd_checkout_form_wrap textarea.edd-input{width:100%}.edds-buy-now-modal #edd_checkout_form_wrap #edd_purchase_submit{margin-top:1.5rem;margin-bottom:0}.edds-buy-now-modal .edds-field-spacer-shim{margin-bottom:1rem}.edds-buy-now-modal .edd-alert-error{margin:20px 0}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty){margin-bottom:20px}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty) .edd-alert-error{margin:0}
|
2 |
|
3 |
/*# sourceMappingURL=app.min.css.map*/
|
includes/gateways/stripe/assets/css/build/app.min.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///./assets/css/src/frontend.scss"],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AAsB,iBAAiB,0CAA0C,eAAe,6HAA6H,sBAAsB,kBAAkB,sBAAsB,sBAAsB,gDAAgD,gCAAgC,oCAAoC,gBAAgB,eAAe,kBAAkB,uBAAuB,aAAa,8BAA8B,eAAe,+BAA+B,WAAW,sCAAsC,UAAU,iCAAiC,kBAAkB,4DAA4D,qCAAqC,WAAW,YAAY,QAAQ,kCAAkC,WAAW,oBAAoB,YAAY,uCAAuC,cAAc,2HAA2H,WAAW,iEAAiE,kBAAkB,gBAAgB,4CAA4C,mBAAmB,qCAAqC,cAAc,wDAAwD,mBAAmB,yEAAyE,S","file":"assets/css/build/app.min.css","sourcesContent":[":root{--edds-modal-grid-unit: 1rem;--edds-modal-overlay: rgba(0, 0, 0, 0.60)}.edds-modal__overlay{z-index:9999;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.60);background:var(--edds-modal-overlay);display:flex;justify-content:center;align-items:center}.edds-modal__container{background-color:#fff;min-width:350px;max-width:90vw;max-height:90vh;box-sizing:border-box;overflow-y:auto}.admin-bar .edds-modal__container{margin-top:32px}.edds-modal__header{padding:calc(1rem * 1.5);padding:calc(var(--edds-modal-grid-unit) * 1.5);display:flex;justify-content:space-between;align-items:center;position:-webkit-sticky;position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid #eee}.edds-modal__title{text-align:left;font-size:150%;margin:0}.edds-modal__close{line-height:1;padding:1rem}.edds-modal__close:before{content:\"✕\"}.edds-modal__content{margin:calc(1rem * 1.5);margin:calc(var(--edds-modal-grid-unit) * 1.5)}@-webkit-keyframes eddsSlideIn{from{transform:translateY(15%)}to{transform:translateY(0)}}@keyframes eddsSlideIn{from{transform:translateY(15%)}to{transform:translateY(0)}}@-webkit-keyframes eddsSlideOut{from{transform:translateY(0)}to{transform:translateY(15%)}}@keyframes eddsSlideOut{from{transform:translateY(0)}to{transform:translateY(15%)}}.edds-modal.has-slide{display:none}.edds-modal.has-slide.is-open{display:block}.edds-modal.has-slide[aria-hidden=false] .edds-modal__container{-webkit-animation:eddsSlideIn .3s cubic-bezier(0, 0, 0.2, 1);animation:eddsSlideIn .3s cubic-bezier(0, 0, 0.2, 1)}.edds-modal.has-slide[aria-hidden=true] .edds-modal__container{-webkit-animation:eddsSlideOut .3s cubic-bezier(0, 0, 0.2, 1);animation:eddsSlideOut .3s cubic-bezier(0, 0, 0.2, 1)}.edds-modal.has-slide .edds-modal__container,.edds-modal.has-slide .edds-modal__overlay{will-change:transform}.edds-prb{margin:15px 0;display:none}.edds-prb__or{font-size:90%;text-align:center;margin:15px 0;overflow:hidden}.edds-prb__or::before,.edds-prb__or::after{background-color:rgba(0,0,0,.1);content:\"\";display:inline-block;height:1px;position:relative;vertical-align:middle;width:50%}.edds-prb__or::before{right:.5em;margin-left:-50%}.edds-prb__or::after{left:.5em;margin-right:-50%}.edd_download_purchase_form.loading{position:relative}.edd_download_purchase_form.loading::after{content:\"\";position:absolute;left:0;width:100%;height:100%;top:0;z-index:100}.edd_download_purchase_form.loading>*{opacity:.65}#edd_checkout_form_wrap.loading{position:relative}#edd_checkout_form_wrap.loading::after{content:\"\";position:absolute;left:0;width:100%;height:100%;top:0;z-index:100}#edd_checkout_form_wrap.loading>*{opacity:.65}#edd_checkout_form_wrap .edds-prb{margin-bottom:0}#edd_checkout_form_wrap .edds-prb__or{display:none}#edd_checkout_form_wrap .edd-card-selector-radio label{display:inline;vertical-align:middle;font-weight:normal;line-height:24px;font-size:100%;margin:0px}.edd-card-selector-radio .edd-stripe-card-radio-item{width:100%;font-size:15px;padding:8px 12px;border:1px solid transparent}.edd-card-selector-radio .edd-stripe-card-radio-item label{line-height:1;margin:0;display:flex;align-items:center}.edd-card-selector-radio .edd-stripe-card-radio-item label .add-new-card,.edd-card-selector-radio .edd-stripe-card-radio-item label .card-label{margin-left:8px}.edd-card-selector-radio .edd-stripe-card-radio-item.selected{border:1px solid #f0f0f0;background-color:#fcfcfc;border-radius:3px}.edd-card-selector-radio div.card-label{width:65%;display:inline-block}.edd-card-selector-radio span.card-is-default{font-style:italic}.edd-card-selector-radio span.card-expired{color:#f33}.edd-stripe-card-selector+.edd-stripe-new-card{margin-top:20px}#edd-stripe-manage-cards .edd-stripe-add-new-card{margin:20px 0 10px}#edd-stripe-manage-cards div.edd-stripe-card-item{list-style:none;width:100%;display:-ms-inline-grid;display:inline-grid;border:1px solid #f0f0f0;padding:5px 10px;min-height:100px;margin-bottom:10px;border-radius:3px;margin-left:0px}.edd-stripe-card-item>span{display:block}.edd-stripe-card-item .card-meta>span{color:#999;display:block}.edd-stripe-card-item .card-actions a{text-decoration:none}.edd-stripe-card-item .card-actions a.delete{color:#f33}.card-actions .edd-loading-ajax{display:inline-block;margin-right:4px}.edd-stripe-card-item .card-update-form{display:none}.edd-stripe-card-item .card-update-form label{font-weight:bold}.edd-stripe-card-item .card-update-form input{margin-bottom:3px}.edd-stripe-card-item .card-update-form select{background:#fff;border:1px solid #e4e4e4;height:40px;margin-right:3px}.edd-stripe-card-item .card-update-form select:first-of-type{margin-right:3px}.edd-stripe-card-item .card-address-fields input,.edd-stripe-card-item .card-address-fields select{width:49%;display:inline-block}.edd-stripe-add-new-card label{font-weight:bold;display:block;position:relative;line-height:100%;font-size:95%;margin:0 0 5px}.edd-stripe-add-new-card label:after{display:block;visibility:hidden;float:none;clear:both;height:0;text-indent:-9999px;content:\".\"}.edd-stripe-add-new-card span.edd-description{color:#666;font-size:80%;display:block;margin:0 0 5px}.edd-stripe-add-new-card input.edd-input,.edd-stripe-add-new-card textarea.edd-input{display:inline-block;width:70%}.edd-stripe-add-new-card select.edd-select{display:block;width:60%}.edd-stripe-add-new-card select.edd-select.edd-select-small{display:inline;width:auto}.edd-stripe-add-new-card input.edd-input.error,.edd-stripe-add-new-card textarea.edd-input.error{border-color:#c4554e}.edd-stripe-add-new-card>p{margin:0 0 21px}.edd-stripe-add-new-card span.edd-required-indicator{color:#b94a48;display:inline}.edd-stripe-add-new-card textarea,.edd-stripe-add-new-card input[type=text],.edd-stripe-add-new-card input[type=email],.edd-stripe-add-new-card input[type=password],.edd-stripe-add-new-card input[type=tel]{padding:4px 6px}.edd-stripe-add-new-card input[type=radio]{border:none;margin-right:5px}.edd-stripe-add-new-card input[type=checkbox]{display:inline-block;margin:0 5px 0 0}.edd-stripe-add-new-card input[type=checkbox]+label,.edd-stripe-add-new-card input[type=checkbox]+label:after{display:inline}.edd-stripe-add-new-card .edd-payment-icons{height:32px;display:block;margin:0 0 8px}.edd-stripe-add-new-card .edd-payment-icons img.payment-icon{max-height:32px;width:auto;margin:0 3px 0 0;float:left;background:none;padding:0;border:none;box-shadow:none}.edd-stripe-add-new-card #edd-payment-mode-wrap label{display:inline-block;margin:0 20px 0 0}.edd-stripe-add-new-card #edd-payment-mode-wrap .edd-payment-mode-label{font-weight:bold;display:inline-block;position:relative;margin-bottom:5px}.edd-stripe-add-new-card fieldset{border:1px solid #eee;padding:1.387em;margin:0 0 21px}.edd-stripe-add-new-card #edd_purchase_submit,.edd-stripe-add-new-card #edd_discount_code,.edd-stripe-add-new-card #edd_register_account_fields{padding:0;border:none}.edd-stripe-add-new-card fieldset fieldset{margin:0;border:none;padding:0}.edd-stripe-add-new-card #edd-login-account-wrap,.edd-stripe-add-new-card #edd-new-account-wrap,.edd-stripe-add-new-card #edd_show_discount,.edd-stripe-add-new-card .edd-cart-adjustment,.edd-stripe-add-new-card #edd_final_total_wrap{background:#fafafa;color:#666;padding:.5em 1.387em}.edd-stripe-add-new-card #edd-discount-code-wrap,.edd-stripe-add-new-card #edd_final_total_wrap,.edd-stripe-add-new-card #edd_show_discount{border:1px solid #eee}.edd-stripe-add-new-card .edd-cart-adjustment{padding:1.387em}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-input,.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{display:inline-block}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{padding:3px 12px;margin-bottom:2px}.edd-stripe-add-new-card #edd-discount-error-wrap{width:100%;display:inline-block;margin:1em 0 0}.edd-stripe-add-new-card #edd-new-account-wrap,.edd-stripe-add-new-card #edd-login-account-wrap{margin:-1.387em -1.387em 21px;border-left:none;border-right:none;border-top:none}.edd-stripe-add-new-card #edd_payment_mode_select{margin-bottom:21px}.edd-stripe-add-new-card fieldset#edd_register_fields #edd_checkout_user_info{margin-bottom:21px}.edd-stripe-add-new-card fieldset#edd_register_account_fields legend{padding-top:11px}.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_register_password,.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_login_password{margin:0}.edd-stripe-add-new-card fieldset#edd_cc_fields{border:1px solid #f0f0f0;background:#f9f9f9;position:relative}.edd-stripe-add-new-card fieldset#edd_cc_fields legend{border:none;padding:0}.edd-stripe-add-new-card fieldset p:last-child{margin-bottom:0}#edd_secure_site_wrapper{padding:4px 4px 4px 0;font-weight:bold}.edd-stripe-add-new-card span.exp-divider{display:inline}.edd-stripe-card-element.StripeElement,.edd-stripe-card-exp-element.StripeElement,.edd-stripe-card-cvc-element.StripeElement{box-sizing:border-box;padding:10px 12px;border:1px solid #ccc;background-color:#fff}.edd-stripe-card-element.StripeElement--invalid{border-color:#c4554e !important}#edd-stripe-card-errors:not(:empty){margin:20px 0 0}#edd-card-wrap{position:relative}#edd-card-details-wrap{display:flex;justify-content:space-between;flex-wrap:wrap}#edd-card-details-wrap p:empty{width:100%}#edd-card-exp-wrap,#edd-card-cvv-wrap{width:48%}#edd-stripe-card-element-wrapper{position:relative}#edd_checkout_form_wrap .edd-stripe-new-card span.card-type{background-size:32px 24px !important;width:32px;height:24px;top:50%;transform:translate3d(0, -50%, 0);right:10px}.edds-buy-now-modal{width:500px}.edds-buy-now-modal .edds-modal__close{padding:.5rem}.edds-buy-now-modal #edd_checkout_form_wrap input.edd-input,.edds-buy-now-modal #edd_checkout_form_wrap textarea.edd-input{width:100%}.edds-buy-now-modal #edd_checkout_form_wrap #edd_purchase_submit{margin-top:1.5rem;margin-bottom:0}.edds-buy-now-modal .edds-field-spacer-shim{margin-bottom:1rem}.edds-buy-now-modal .edd-alert-error{margin:20px 0}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty){margin-bottom:20px}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty) .edd-alert-error{margin:0}"],"sourceRoot":""}
|
1 |
+
{"version":3,"sources":["webpack:///./assets/css/src/frontend.scss"],"names":[],"mappings":"AAAA,MAAM,6BAA6B,0CAA0C,qBAAqB,aAAa,eAAe,MAAM,OAAO,QAAQ,SAAS,+BAA+B,qCAAqC,aAAa,uBAAuB,mBAAmB,uBAAuB,sBAAsB,gBAAgB,eAAe,gBAAgB,sBAAsB,gBAAgB,kCAAkC,gBAAgB,oBAAoB,yBAAyB,gDAAgD,aAAa,8BAA8B,mBAAmB,wBAAwB,gBAAgB,MAAM,UAAU,gBAAgB,6BAA6B,mBAAmB,gBAAgB,eAAe,SAAS,mBAAmB,cAAc,aAAa,0BAA0B,YAAY,qBAAqB,wBAAwB,+CAA+C,+BAA+B,KAAK,0BAA0B,GAAG,yBAAyB,uBAAuB,KAAK,0BAA0B,GAAG,yBAAyB,gCAAgC,KAAK,wBAAwB,GAAG,2BAA2B,wBAAwB,KAAK,wBAAwB,GAAG,2BAA2B,sBAAsB,aAAa,8BAA8B,cAAc,gEAAgE,6DAA6D,qDAAqD,+DAA+D,8DAA8D,sDAAsD,wFAAwF,sBAAsB,UAAU,cAAc,aAAa,cAAc,cAAc,kBAAkB,cAAc,gBAAgB,2CAA2C,gCAAgC,WAAW,qBAAqB,WAAW,kBAAkB,sBAAsB,UAAU,sBAAsB,WAAW,iBAAiB,qBAAqB,UAAU,kBAAkB,oCAAoC,kBAAkB,2CAA2C,WAAW,kBAAkB,OAAO,WAAW,YAAY,MAAM,YAAY,sCAAsC,YAAY,gCAAgC,kBAAkB,uCAAuC,WAAW,kBAAkB,OAAO,WAAW,YAAY,MAAM,YAAY,kCAAkC,YAAY,uGAAuG,wBAAwB,kCAAkC,gBAAgB,sCAAsC,aAAa,uDAAuD,eAAe,sBA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kBAAkB,kDAAkD,WAAW,qBAAqB,eAAe,gGAAgG,8BAA8B,iBAAiB,kBAAkB,gBAAgB,kDAAkD,mBAAmB,8EAA8E,mBAAmB,qEAAqE,iBAAiB,yKAAyK,SAAS,gDAAgD,yBAAyB,mBAAmB,kBAAkB,uDAAuD,YAAY,UAAU,+CAA+C,gBAAgB,yBAAyB,sBAAsB,iBAAiB,0CAA0C,eAAe,6HAA6H,sBAAsB,kBAAkB,sBAAsB,sBAAsB,gDAAgD,gCAAgC,oCAAoC,gBAAgB,eAAe,kBAAkB,uBAAuB,aAAa,8BAA8B,eAAe,+BAA+B,WAAW,sCAAsC,UAAU,iCAAiC,kBAAkB,4DAA4D,qCAAqC,WAAW,YAAY,QAAQ,kCAAkC,WAAW,oBAAoB,YAAY,uCAAuC,cAAc,2HAA2H,WAAW,iEAAiE,kBAAkB,gBAAgB,4CAA4C,mBAAmB,qCAAqC,cAAc,wDAAwD,mBAAmB,yEAAyE,S","file":"assets/css/build/app.min.css","sourcesContent":[":root{--edds-modal-grid-unit: 1rem;--edds-modal-overlay: rgba(0, 0, 0, 0.60)}.edds-modal__overlay{z-index:9999;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.60);background:var(--edds-modal-overlay);display:flex;justify-content:center;align-items:center}.edds-modal__container{background-color:#fff;min-width:350px;max-width:90vw;max-height:90vh;box-sizing:border-box;overflow-y:auto}.admin-bar .edds-modal__container{margin-top:32px}.edds-modal__header{padding:calc(1rem * 1.5);padding:calc(var(--edds-modal-grid-unit) * 1.5);display:flex;justify-content:space-between;align-items:center;position:-webkit-sticky;position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid #eee}.edds-modal__title{text-align:left;font-size:150%;margin:0}.edds-modal__close{line-height:1;padding:1rem}.edds-modal__close:before{content:\"✕\"}.edds-modal__content{margin:calc(1rem * 1.5);margin:calc(var(--edds-modal-grid-unit) * 1.5)}@-webkit-keyframes eddsSlideIn{from{transform:translateY(15%)}to{transform:translateY(0)}}@keyframes eddsSlideIn{from{transform:translateY(15%)}to{transform:translateY(0)}}@-webkit-keyframes eddsSlideOut{from{transform:translateY(0)}to{transform:translateY(15%)}}@keyframes eddsSlideOut{from{transform:translateY(0)}to{transform:translateY(15%)}}.edds-modal.has-slide{display:none}.edds-modal.has-slide.is-open{display:block}.edds-modal.has-slide[aria-hidden=false] .edds-modal__container{-webkit-animation:eddsSlideIn .3s cubic-bezier(0, 0, 0.2, 1);animation:eddsSlideIn .3s cubic-bezier(0, 0, 0.2, 1)}.edds-modal.has-slide[aria-hidden=true] .edds-modal__container{-webkit-animation:eddsSlideOut .3s cubic-bezier(0, 0, 0.2, 1);animation:eddsSlideOut .3s cubic-bezier(0, 0, 0.2, 1)}.edds-modal.has-slide .edds-modal__container,.edds-modal.has-slide .edds-modal__overlay{will-change:transform}.edds-prb{margin:15px 0;display:none}.edds-prb__or{font-size:90%;text-align:center;margin:15px 0;overflow:hidden}.edds-prb__or::before,.edds-prb__or::after{background-color:rgba(0,0,0,.1);content:\"\";display:inline-block;height:1px;position:relative;vertical-align:middle;width:50%}.edds-prb__or::before{right:.5em;margin-left:-50%}.edds-prb__or::after{left:.5em;margin-right:-50%}.edd_download_purchase_form.loading{position:relative}.edd_download_purchase_form.loading::after{content:\"\";position:absolute;left:0;width:100%;height:100%;top:0;z-index:100}.edd_download_purchase_form.loading>*{opacity:.65}#edd_checkout_form_wrap.loading{position:relative}#edd_checkout_form_wrap.loading::after{content:\"\";position:absolute;left:0;width:100%;height:100%;top:0;z-index:100}#edd_checkout_form_wrap.loading>*{opacity:.65}#edd_checkout_form_wrap:not(.edd-prb--is-active) #edd-payment-mode-wrap #edd-gateway-option-stripe-prb{display:none !important}#edd_checkout_form_wrap .edds-prb{margin-bottom:0}#edd_checkout_form_wrap .edds-prb__or{display:none}#edd_checkout_form_wrap .edd-card-selector-radio label{display:inline;vertical-align:middle;font-weight:normal;line-height:24px;font-size:100%;margin:0px}.edd-card-selector-radio .edd-stripe-card-radio-item{width:100%;font-size:15px;padding:8px 12px;border:1px solid transparent}.edd-card-selector-radio .edd-stripe-card-radio-item label{line-height:1;margin:0;display:flex;align-items:center}.edd-card-selector-radio .edd-stripe-card-radio-item label .add-new-card,.edd-card-selector-radio .edd-stripe-card-radio-item label .card-label{margin-left:8px}.edd-card-selector-radio .edd-stripe-card-radio-item.selected{border:1px solid #f0f0f0;background-color:#fcfcfc;border-radius:3px}.edd-card-selector-radio div.card-label{width:65%;display:inline-block}.edd-card-selector-radio span.card-is-default{font-style:italic}.edd-card-selector-radio span.card-expired{color:#f33}.edd-stripe-card-selector+.edd-stripe-new-card{margin-top:20px}#edd-stripe-manage-cards .edd-stripe-add-new-card{margin:20px 0 10px}#edd-stripe-manage-cards div.edd-stripe-card-item{list-style:none;width:100%;display:-ms-inline-grid;display:inline-grid;border:1px solid #f0f0f0;padding:5px 10px;min-height:100px;margin-bottom:10px;border-radius:3px;margin-left:0px}.edd-stripe-card-item>span{display:block}.edd-stripe-card-item .card-meta>span{color:#999;display:block}.edd-stripe-card-item .card-actions a{text-decoration:none}.edd-stripe-card-item .card-actions a.delete{color:#f33}.card-actions .edd-loading-ajax{display:inline-block;margin-right:4px}.edd-stripe-card-item .card-update-form{display:none}.edd-stripe-card-item .card-update-form label{font-weight:bold}.edd-stripe-card-item .card-update-form input{margin-bottom:3px}.edd-stripe-card-item .card-update-form select{background:#fff;border:1px solid #e4e4e4;height:40px;margin-right:3px}.edd-stripe-card-item .card-update-form select:first-of-type{margin-right:3px}.edd-stripe-card-item .card-address-fields input,.edd-stripe-card-item .card-address-fields select{width:49%;display:inline-block}.edd-stripe-add-new-card label{font-weight:bold;display:block;position:relative;line-height:100%;font-size:95%;margin:0 0 5px}.edd-stripe-add-new-card label:after{display:block;visibility:hidden;float:none;clear:both;height:0;text-indent:-9999px;content:\".\"}.edd-stripe-add-new-card span.edd-description{color:#666;font-size:80%;display:block;margin:0 0 5px}.edd-stripe-add-new-card input.edd-input,.edd-stripe-add-new-card textarea.edd-input{display:inline-block;width:70%}.edd-stripe-add-new-card select.edd-select{display:block;width:60%}.edd-stripe-add-new-card select.edd-select.edd-select-small{display:inline;width:auto}.edd-stripe-add-new-card input.edd-input.error,.edd-stripe-add-new-card textarea.edd-input.error{border-color:#c4554e}.edd-stripe-add-new-card>p{margin:0 0 21px}.edd-stripe-add-new-card span.edd-required-indicator{color:#b94a48;display:inline}.edd-stripe-add-new-card textarea,.edd-stripe-add-new-card input[type=text],.edd-stripe-add-new-card input[type=email],.edd-stripe-add-new-card input[type=password],.edd-stripe-add-new-card input[type=tel]{padding:4px 6px}.edd-stripe-add-new-card input[type=radio]{border:none;margin-right:5px}.edd-stripe-add-new-card input[type=checkbox]{display:inline-block;margin:0 5px 0 0}.edd-stripe-add-new-card input[type=checkbox]+label,.edd-stripe-add-new-card input[type=checkbox]+label:after{display:inline}.edd-stripe-add-new-card .edd-payment-icons{height:32px;display:block;margin:0 0 8px}.edd-stripe-add-new-card .edd-payment-icons img.payment-icon{max-height:32px;width:auto;margin:0 3px 0 0;float:left;background:none;padding:0;border:none;box-shadow:none}.edd-stripe-add-new-card #edd-payment-mode-wrap label{display:inline-block;margin:0 20px 0 0}.edd-stripe-add-new-card #edd-payment-mode-wrap .edd-payment-mode-label{font-weight:bold;display:inline-block;position:relative;margin-bottom:5px}.edd-stripe-add-new-card fieldset{border:1px solid #eee;padding:1.387em;margin:0 0 21px}.edd-stripe-add-new-card #edd_purchase_submit,.edd-stripe-add-new-card #edd_discount_code,.edd-stripe-add-new-card #edd_register_account_fields{padding:0;border:none}.edd-stripe-add-new-card fieldset fieldset{margin:0;border:none;padding:0}.edd-stripe-add-new-card #edd-login-account-wrap,.edd-stripe-add-new-card #edd-new-account-wrap,.edd-stripe-add-new-card #edd_show_discount,.edd-stripe-add-new-card .edd-cart-adjustment,.edd-stripe-add-new-card #edd_final_total_wrap{background:#fafafa;color:#666;padding:.5em 1.387em}.edd-stripe-add-new-card #edd-discount-code-wrap,.edd-stripe-add-new-card #edd_final_total_wrap,.edd-stripe-add-new-card #edd_show_discount{border:1px solid #eee}.edd-stripe-add-new-card .edd-cart-adjustment{padding:1.387em}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-input,.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{display:inline-block}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{padding:3px 12px;margin-bottom:2px}.edd-stripe-add-new-card #edd-discount-error-wrap{width:100%;display:inline-block;margin:1em 0 0}.edd-stripe-add-new-card #edd-new-account-wrap,.edd-stripe-add-new-card #edd-login-account-wrap{margin:-1.387em -1.387em 21px;border-left:none;border-right:none;border-top:none}.edd-stripe-add-new-card #edd_payment_mode_select{margin-bottom:21px}.edd-stripe-add-new-card fieldset#edd_register_fields #edd_checkout_user_info{margin-bottom:21px}.edd-stripe-add-new-card fieldset#edd_register_account_fields legend{padding-top:11px}.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_register_password,.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_login_password{margin:0}.edd-stripe-add-new-card fieldset#edd_cc_fields{border:1px solid #f0f0f0;background:#f9f9f9;position:relative}.edd-stripe-add-new-card fieldset#edd_cc_fields legend{border:none;padding:0}.edd-stripe-add-new-card fieldset p:last-child{margin-bottom:0}#edd_secure_site_wrapper{padding:4px 4px 4px 0;font-weight:bold}.edd-stripe-add-new-card span.exp-divider{display:inline}.edd-stripe-card-element.StripeElement,.edd-stripe-card-exp-element.StripeElement,.edd-stripe-card-cvc-element.StripeElement{box-sizing:border-box;padding:10px 12px;border:1px solid #ccc;background-color:#fff}.edd-stripe-card-element.StripeElement--invalid{border-color:#c4554e !important}#edd-stripe-card-errors:not(:empty){margin:20px 0 0}#edd-card-wrap{position:relative}#edd-card-details-wrap{display:flex;justify-content:space-between;flex-wrap:wrap}#edd-card-details-wrap p:empty{width:100%}#edd-card-exp-wrap,#edd-card-cvv-wrap{width:48%}#edd-stripe-card-element-wrapper{position:relative}#edd_checkout_form_wrap .edd-stripe-new-card span.card-type{background-size:32px 24px !important;width:32px;height:24px;top:50%;transform:translate3d(0, -50%, 0);right:10px}.edds-buy-now-modal{width:500px}.edds-buy-now-modal .edds-modal__close{padding:.5rem}.edds-buy-now-modal #edd_checkout_form_wrap input.edd-input,.edds-buy-now-modal #edd_checkout_form_wrap textarea.edd-input{width:100%}.edds-buy-now-modal #edd_checkout_form_wrap #edd_purchase_submit{margin-top:1.5rem;margin-bottom:0}.edds-buy-now-modal .edds-field-spacer-shim{margin-bottom:1rem}.edds-buy-now-modal .edd-alert-error{margin:20px 0}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty){margin-bottom:20px}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty) .edd-alert-error{margin:0}"],"sourceRoot":""}
|
includes/gateways/stripe/assets/css/src/frontend/payment-request-button.scss
CHANGED
@@ -69,6 +69,10 @@
|
|
69 |
|
70 |
@include loadingState;
|
71 |
|
|
|
|
|
|
|
|
|
72 |
.edds-prb {
|
73 |
margin-bottom: 0;
|
74 |
}
|
69 |
|
70 |
@include loadingState;
|
71 |
|
72 |
+
&:not(.edd-prb--is-active) #edd-payment-mode-wrap #edd-gateway-option-stripe-prb {
|
73 |
+
display: none !important;
|
74 |
+
}
|
75 |
+
|
76 |
.edds-prb {
|
77 |
margin-bottom: 0;
|
78 |
}
|
includes/gateways/stripe/assets/js/build/app.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=59)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return r.a})),n.d(t,"e",(function(){return i.a})),n.d(t,"c",(function(){return c})),n.d(t,"g",(function(){return a})),n.d(t,"f",(function(){return u.b})),n.d(t,"i",(function(){return u.c})),n.d(t,"b",(function(){return u.a})),n.d(t,"h",(function(){return s})),n.d(t,"j",(function(){return d})),n.d(t,"d",(function(){return l})),n(25),n(26),n(27),n(28);var r=n(15),o=n(16),i=n.n(o);function c(){i()(arguments,(function(e){document.addEventListener("DOMContentLoaded",e)}))}function a(e){for(var t=[],n=e.nextElementSibling;n;)1===n.nodeType&&t.push(n),n=n.nextElementSibling;return t}var u=n(17);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(e,t,n){e.exports=n(93)},function(e,t,n){"use strict";(function(e,r){n.d(t,"c",(function(){return f})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return h})),n.d(t,"d",(function(){return y}));var o=n(3),i=n.n(o),c=n(0),a=n(56);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}n.d(t,"a",(function(){return a.a})),n.d(t,"b",(function(){return a.b})),n.d(t,"f",(function(){return a.c})),n.d(t,"h",(function(){return a.d}));var s={card:"#edd-stripe-card-element"},d={cardNumber:"#edd-stripe-card-element",cardExpiry:"#edd-stripe-card-exp-element",cardCvc:"#edd-stripe-card-cvc-element"},l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},edd_stripe_vars.elementsOptions);function f(e,t){var n;return t||(t="true"===edd_stripe_vars.elementsSplitFields?d:s),Object(c.e)(t,(function(t,r){n=function(e,t,n){var r=document.querySelector(t);if(r){l.style||(l.style=function(){var e=document.querySelector(".card-name.edd-input");if(!e)return null;var t=window.getComputedStyle(e);if(!document.getElementById("edds-stripe-element-styles")){var n=document.createElement("style");n.innerHTML="\n\t\t\t.edd-stripe-card-element.StripeElement,\n\t\t\t.edd-stripe-card-exp-element.StripeElement,\n\t\t\t.edd-stripe-card-cvc-element.StripeElement {\n\t\t\t\tbackground-color: ".concat(t.getPropertyValue("background-color"),";\n\n\t\t\t\t").concat(["top","right","bottom","left"].map((function(e){return"border-".concat(e,"-color: ").concat(t.getPropertyValue("border-".concat(e,"-color")),";\n\t\t\t\t\t\t\t border-").concat(e,"-width: ").concat(t.getPropertyValue("border-".concat(e,"-width")),";\n\t\t\t\t\t\t\t border-").concat(e,"-style: ").concat(t.getPropertyValue("border-".concat(e,"-style")),";\n\t\t\t\t\t\t\t padding-").concat(e,": ").concat(t.getPropertyValue("padding-".concat(e)),";")})).join(""),"\n\t\t\t\t").concat(["top-right","bottom-right","bottom-left","top-left"].map((function(e){return"border-".concat(e,"-radius: ").concat(t.getPropertyValue("border-top-right-radius"),";")})).join(""),"\n\t\t\t}").replace(/\s/g,""),n.id="edds-stripe-element-styles",document.body.appendChild(n)}return{base:{color:t.getPropertyValue("color"),fontFamily:t.getPropertyValue("font-family"),fontSize:t.getPropertyValue("font-size"),fontWeight:t.getPropertyValue("font-weight"),fontSmoothing:t.getPropertyValue("-webkit-font-smoothing")}}}()),"cardNumber"===n&&l.hasOwnProperty("hidePostalCode")&&delete l.hidePostalCode,delete l.i18n;var o=e.create(n,l);return o.addEventListener("change",(function(e){!function(e,t){var n=t.closest(".edd-stripe-new-card").querySelector("#edd-stripe-card-errors");if(n.innerHTML="",e.error){var r=e.error,o=r.code,i=r.message,a=window.edd_stripe_vars.elementsOptions.i18n.errorMessages,u=a[o]?a[o]:i;n.appendChild(Object(c.f)(u))}}(e,r),function(e){var t=e.brand;if(e.elementType,"cardNumber"===e.elementType){var n=document.querySelector(".card-type");"unknown"===t?n.className="card-type":n.classList.add(t)}}(e)})).mount(r),o}}(e,t,r)})),window.eddStripe.cardElement=n,n}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#edd-stripe-card-element",n=f(e,{card:t}),r=document.getElementById("edd-card-details-wrap");return r&&(r.style.display="none"),n}function h(t,n){var o=e('input[name="edd_stripe_existing_card"]:checked');return o.length>0&&"new"!==o.val()?r.resolve({id:o.val(),exists:!0}):window.eddStripe.createPaymentMethod("card",n,{billing_details:y(t)}).then((function(e){if(e.error)throw e.error;return{id:e.paymentMethod.id,exists:!1}}))}function y(e){return{name:Object(c.d)(e.querySelector(".card-name")),address:{line1:Object(c.d)(e.querySelector(".card-address")),line2:Object(c.d)(e.querySelector(".card-address-2")),city:Object(c.d)(e.querySelector(".card-city")),state:Object(c.d)(e.querySelector(".card_state")),postal_code:Object(c.d)(e.querySelector(".card-zip")),country:Object(c.d)(e.querySelector("#billing_country"))}}}}).call(this,n(5),n(24))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){(function(t){function n(e,n,r,o,i,c,a){try{var u=e[c](a),s=u.value}catch(e){return void r(e)}u.done?n(s):t.resolve(s).then(o,i)}e.exports=function(e){return function(){var r=this,o=arguments;return new t((function(t,i){var c=e.apply(r,o);function a(e){n(c,t,i,a,u,"next",e)}function u(e){n(c,t,i,a,u,"throw",e)}a(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0}).call(this,n(24))},function(e,t){e.exports=jQuery},function(e,t,n){"use strict";n.d(t,"d",(function(){return r.d})),n.d(t,"b",(function(){return r.b})),n.d(t,"a",(function(){return r.a})),n.d(t,"h",(function(){return w})),n.d(t,"g",(function(){return A})),n.d(t,"c",(function(){return C})),n.d(t,"f",(function(){return D.c})),n.d(t,"e",(function(){return D.b}));var r=n(11),o=n(3),i=n.n(o),c=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(c.a)(e,u({payment_method:t,nonce:document.getElementById("card_update_nonce_"+t).value},n)).fail((function(e){h(t,e)})).done((function(e){h(t,e,"success"),setTimeout((function(){location.reload()}),1500)}))}function d(e){e.preventDefault();var t=e.target.dataset.source,n=document.getElementById(t+"-update-form"),r=document.getElementById(t+"-card-actions"),o="block"===n.style.display;n.style.display=o?"none":"block",r.style.display=o?"block":"none"}function l(e){e.preventDefault();var t=e.target,n={};["address_city","address_country","address_line1","address_line2","address_zip","address_state","exp_month","exp_year"].forEach((function(e){var r=t.querySelector('[name="'+e+'"]');n[e]=Object(c.d)(r)}));var r=t.querySelector('input[type="submit"]');r.disabled=!0,r.value=r.dataset.loading,s("edds_update_payment_method",e.target.dataset.source,n).fail((function(e){r.disabled=!1,r.value=r.dataset.submit}))}function f(e){e.preventDefault();var t=e.target.innerText;e.target.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',s("edds_delete_payment_method",e.target.dataset.source).fail((function(n){e.target.innerText=t}))}function p(e){e.preventDefault();var t=e.target.innerText;e.target.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',s("edds_set_payment_method_default",e.target.dataset.source).fail((function(n){e.target.innerText=t}))}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"error",r=Object(c.f)(t&&t.message?t.message:edd_stripe_vars.generic_error,n);Object(c.e)(document.querySelectorAll(".edd-stripe-alert"),(function(e){e.remove()}));var o=document.getElementById(e+"_card_item");o.insertBefore(r,o.querySelector(".card-details"))}var y=n(2);function v(e){e.preventDefault();var t=document.getElementById("edd-stripe-add-new-card"),n=t.querySelector(".edd-stripe-add-new-card"),r="block"===n.style.display,o=t.querySelector("#edd-stripe-add-new-cancel");if(r&&o!==e.target){var i=document.createEvent("Event");i.initEvent("submit",!0,!0),t.dispatchEvent(i)}else n.style.display=r?"none":"block",o.style.display=r?"none":"inline-block"}function m(e){e.preventDefault();var t,n,r=e.target;if(Object(c.h)(r))try{(n=document.querySelector(".edd-stripe-add-new")).value=n.dataset.loading,n.disabled=!0,(t=r,window.eddStripe.createPaymentMethod("card",window.eddStripe.cardElement,{billing_details:Object(y.d)(t)}).then((function(e){if(e.error)throw e.error;return e.paymentMethod}))).then(b).catch((function(e){_(e),g()}))}catch(e){_(e),g()}else Object(c.j)(r)}function b(e){Object(c.a)("edds_add_payment_method",{payment_method_id:e.id,nonce:document.getElementById("edd-stripe-add-card-nonce").value}).fail(_).done((function(e){_(e,"success"),setTimeout((function(){location.reload()}),1500)}))}function g(){var e=document.querySelector(".edd-stripe-add-new");e.value=e.dataset.submit,e.disabled=!1}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error",n=Object(c.f)(e&&e.message?e.message:edd_stripe_vars.generic_error,t);Object(c.e)(document.querySelectorAll(".edd-stripe-alert"),(function(e){e.remove()})),document.querySelector(".edd-stripe-add-card-actions").insertBefore(n,document.querySelector(".edd-stripe-add-new"))}function w(){document.getElementById("edd-stripe-manage-cards")&&(Object(c.e)(document.querySelectorAll(".edd-stripe-update-card"),(function(e){e.addEventListener("click",d)})),Object(c.e)(document.querySelectorAll(".edd-stripe-cancel-update"),(function(e){e.addEventListener("click",d)})),Object(c.e)(document.querySelectorAll(".card-update-form"),(function(e){e.addEventListener("submit",l)})),Object(c.e)(document.querySelectorAll(".edd-stripe-delete-card"),(function(e){e.addEventListener("click",f)})),Object(c.e)(document.querySelectorAll(".edd-stripe-default-card"),(function(e){e.addEventListener("click",p)})),Object(y.c)(window.eddStripe.elements()),document.querySelector(".edd-stripe-add-new").addEventListener("click",v),document.getElementById("edd-stripe-add-new-cancel").addEventListener("click",v),document.getElementById("edd-stripe-add-new-card").addEventListener("submit",m),document.getElementById("card_name").required=!0)}var O=n(12),j=n(4),x=n.n(j),S=n(1),E=n.n(S);function k(e){return P.apply(this,arguments)}function P(){return(P=x()(E.a.mark((function e(t){var n,r,o,i,c;return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),n=document.getElementById("edds-update-payment-method"),q(),e.prev=3,e.next=6,Object(y.e)(n,window.eddStripe.cardElement);case 6:return r=e.sent,e.next=9,Object(y.h)(n.dataset.paymentIntent,"payment_method");case 9:return o=e.sent,e.next=12,Object(y.f)(o,{payment_method:r.id});case 12:return i=e.sent,e.next=15,L(i.id);case 15:if(!(c=e.sent).payment){e.next=20;break}window.location.reload(),e.next=21;break;case 20:throw c;case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(3),M(e.t0),T();case 27:case"end":return e.stop()}}),e,null,[[3,23]])})))).apply(this,arguments)}function L(e){return Object(c.a)("edds_complete_payment_authorization",{intent_id:e,"edds-complete-payment-authorization":document.getElementById("edds-complete-payment-authorization").value})}function q(){var e=document.getElementById("edds-update-payment-method-submit");e.value=e.dataset.loading,e.disabled=!0}function T(){var e=document.getElementById("edds-update-payment-method-submit");e.value=e.dataset.submit,e.disabled=!1}function M(e){var t=Object(c.f)(e&&e.message?e.message:edd_stripe_vars.generic_error,"error"),n=document.getElementById("edds-update-payment-method-errors");n.innerHTML="",n.appendChild(t)}function A(){document.getElementById("edds-update-payment-method")&&(Object(y.c)(window.eddStripe.elements()),document.getElementById("edds-update-payment-method").addEventListener("submit",k),Object(O.a)())}var I=n(14);function C(){Object(c.e)(document.querySelectorAll(".edds-buy-now"),(function(e){e.classList.contains("edd-free-download")||e.addEventListener("click",(function(e){var t=e.currentTarget.dataset,n=t.downloadId,o=t.nonce;if(n){e.preventDefault(),e.stopImmediatePropagation();var i=0,a=1,u=e.currentTarget.closest(".edd_download_purchase_form"),s=u.querySelector(".edd_price_option_".concat(n,":checked"));s&&(i=s.value);var d=u.querySelector('input[name="edd_download_quantity"]');d&&(a=d.value),function(e){var t=e.downloadId,n=e.priceId,o=e.quantity,i=e.nonce,a=document.querySelector("#edds-buy-now-modal-content");I.a.open("edds-buy-now",{onShow:function(){a.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',function(e,t,n,r){edd_scripts.ajaxurl;var o={download_id:e,price_id:t,quantity:n,nonce:r};return Object(c.a)("edds_add_to_cart",o)}(t,n,o,i).then((function(e){var t=e.checkout;a.innerHTML=t,window.EDD_Checkout.init();var n=document.querySelector("#edds-buy-now-modal-content .edd_cart_amount");parseFloat(n.dataset.total)>0&&(Object(r.c)(),Object(I.b)())})).fail((function(e){var t=e.message;document.querySelector("#edds-buy-now-modal-content").innerHTML=t}))},onClose:function(){Object(c.a)("edds_empty_cart")}})}({downloadId:n,priceId:i,quantity:a,nonce:o})}}))})),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,n=document.querySelector(".edd_cart_amount").dataset,r=n.total,o=n.totalCurrency;"0"!==r&&setTimeout((function(){e.value="".concat(o," - ").concat(t)}),10)}}))}var D=n(20)},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(36))},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return i}));var r=n(14),o=n(21);function i(){if("1"===edd_scripts.is_checkout){var t=document.querySelector('input[name="edd-gateway"]');t&&"stripe"===t.value&&(Object(o.c)(),Object(r.b)()),e(document.body).on("edd_gateway_loaded",(function(e,t){"stripe"===t&&(Object(o.c)(),Object(r.b)())}))}}n.d(t,"a",(function(){return o.a})),n.d(t,"b",(function(){return o.b})),n.d(t,"c",(function(){return o.c}))}).call(this,n(5))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(0);function o(){i()&&(c(!1),i().addEventListener("change",(function(e){return c(e.target.checked)})));var t=document.querySelectorAll(".edd-stripe-existing-card");if(0!==t.length){Object(r.e)(t,(function(t){return t.addEventListener("change",(function(t){return function(t){var n="new"===t.value,r=document.querySelector(".edd-stripe-new-card"),o=document.querySelector(".edd-stripe-update-billing-address-wrapper");r.style.display=n?"block":"none",o&&(o.style.display=n?"none":"block"),e(".edd-stripe-card-radio-item").removeClass("selected"),e(t).closest(".edd-stripe-card-radio-item").addClass("selected");var a={card_address:"address_line1",card_address_2:"address_line2",card_city:"address_city",card_state:"address_state",card_zip:"address_zip",billing_country:"address_country"};if(n){for(var u in a){if(!a.hasOwnProperty(u))return;var s=document.getElementById(u);s&&(s.value="",s.selected="")}window.EDD_Checkout.recalculate_taxes&&window.EDD_Checkout.recalculate_taxes(),c(!0)}else{var d=[],l=document.getElementById(t.id+"-billing-details");if(!l)return;c(!1),i()&&(i().checked=!1);var f=l.dataset;for(var p in a)if(a.hasOwnProperty(p)){var h=document.getElementById(p);if(h){var y=f[a[p]];if(h.value=y,""!==y&&d.push(y),h.required&&""===y&&(c(!0),i()&&(i().checked=!0),o&&(o.style.display="none")),"billing_country"===p){var v=document.createEvent("Event");v.initEvent("change",!0,!0),h.dispatchEvent(v)}}}e(document).ajaxSuccess((function(e,t,n){if(n&&n.data&&t&&n.data.includes("action=edd_get_shop_states")&&n.data.includes("field_name=card_state")&&t.responseText&&t.responseText.includes("card_state")){var r=document.getElementById("card_state");r&&(r.value=f.address_state,window.EDD_Checkout.recalculate_taxes&&window.EDD_Checkout.recalculate_taxes(r.value))}}));var m=document.querySelector(".edd-stripe-update-billing-address-current");if(m){m.innerText=d.join(", ");var b=f.brand,g=f.last4;document.querySelector(".edd-stripe-update-billing-address-brand").innerHTML=b,document.querySelector(".edd-stripe-update-billing-address-last4").innerHTML=g}}}(t.target)}))}));var n=document.querySelector(".edd-stripe-existing-card:checked");n||((n=document.querySelector(".edd-stripe-existing-card:first-of-type")).checked=!0);var o=document.createEvent("Event");o.initEvent("change",!0,!1),n.dispatchEvent(o)}}function i(){return document.getElementById("edd-stripe-update-billing-address")}function c(e){var t=document.querySelector(".edd-stripe-update-billing-address-wrapper");if(t){var n=Object(r.g)(t),o=document.querySelector(".edd-stripe-update-billing-address-current");n.forEach((function(t){t.style.display=e?"block":"none"})),o&&(o.style.display=e?"none":"block")}}}).call(this,n(5))},function(e,t,n){var r=n(99);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g.a}));var r=n(3),o=n.n(r);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e){return function(e){if(Array.isArray(e))return a(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 a(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(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 a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(61),n(78);var u,s,d,l,f,p=(u=["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 n=t.targetModal,r=t.triggers,o=void 0===r?[]:r,i=t.onShow,a=void 0===i?function(){}:i,u=t.onClose,s=void 0===u?function(){}:u,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,_=t.awaitCloseAnimation,w=void 0!==_&&_,O=t.awaitOpenAnimation,j=void 0!==O&&O,x=t.debugMode,S=void 0!==x&&x;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modal=document.getElementById(n),this.config={debugMode:S,disableScroll:m,openTrigger:l,closeTrigger:p,openClass:y,onShow:a,onClose:s,awaitCloseAnimation:w,awaitOpenAnimation:j,disableFocus:g},o.length>0&&this.registerTriggers.apply(this,c(o)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var t,n;return t=e,(n=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.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 n=function t(){e.modal.removeEventListener("animationend",t,!1),e.setFocusToFirstNode()};this.modal.addEventListener("animationend",n,!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 n=this.config.openClass;this.modal.addEventListener("animationend",(function e(){t.classList.remove(n),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(u);return Array.apply(void 0,c(e))}},{key:"setFocusToFirstNode",value:function(){var e=this;if(!this.config.disableFocus){var t=this.getFocusableNodes();if(0!==t.length){var n=t.filter((function(t){return!t.hasAttribute(e.config.closeTrigger)}));n.length>0&&n[0].focus(),0===n.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 n=t.indexOf(document.activeElement);e.shiftKey&&0===n&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&n===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&i(t.prototype,n),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 n in t)l(n);return!0},{init:function(e){var t=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),n=c(document.querySelectorAll("[".concat(t.openTrigger,"]"))),r=function(e,t){var n=[];return e.forEach((function(e){var r=e.attributes[t].value;void 0===n[r]&&(n[r]=[]),n[r].push(e)})),n}(n,t.openTrigger);if(!0!==t.debugMode||!1!==f(n,r))for(var o in r){var i=r[o];t.targetModal=o,t.triggers=c(i),d=new s(t)}},show:function(e,t){var n=t||{};n.targetModal=e,!0===n.debugMode&&!1===l(e)||(d&&d.removeEventListeners(),(d=new s(n)).showModal())},close:function(e){e?d.closeModalById(e):d.closeModal()}});window.MicroModal=p;var h=p;function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,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 n=v(v({},m),t);h.show(e,n)},close:function(e){h.close(e)}},g=n(12)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var r=n(8),o=n.n(r),i=n(3),c=n.n(i);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(t,n){var r={type:"POST",dataType:"json",xhrFields:{withCredentials:!0},url:window.edd_scripts&&window.edd_scripts.ajaxurl||window.ajaxurl,data:u({action:t},n)},i=e.Deferred((function(t){t.jqXHR=e.ajax(r).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)}))})),c=i.promise();return c.abort=function(){return i.jqXHR.abort(),this},c}}).call(this,n(5))},function(e,t){var n=/^(?:0|[1-9]\d*)$/;function r(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var o,i,c=Object.prototype,a=c.hasOwnProperty,u=c.toString,s=c.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 n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),p=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),c=i.length;c--;){var a=i[++r];if(!1===t(o[a],a,o))break}return e};function h(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||n.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)?u.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function m(e){return v(e)?function(e,t){var n=y(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&v(e)}(e)&&a.call(e,"callee")&&(!s.call(e,"callee")||"[object Arguments]"==u.call(e))}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,o=!!r;for(var i in e)!t&&!a.call(e,i)||o&&("length"==i||h(i,r))||n.push(i);return n}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||c))return d(e);var t,n,r=[];for(var o in Object(e))a.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e)}function b(e){return e}e.exports=function(e,t){return(y(e)?r:f)(e,"function"==typeof t?t:b)}},function(e,t,n){"use strict";(function(e){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error",n=document.createElement("p");return n.classList.add("edd-alert"),n.classList.add("edd-stripe-alert"),n.style.clear="both","error"===t?n.classList.add("edd-alert-error"):n.classList.add("edd-alert-success"),n.innerHTML=e||edd_stripe_vars.generic_error,n}function o(t){var n=t.errorType,o=t.errorMessage,i=t.errorContainer,c=t.errorContainerReplace,a=void 0===c||c,u=e(i),s=r(o,n);!0===a?u.html(s):u.before(s)}function i(t){e(t).html("")}n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}))}).call(this,n(5))},function(e,t,n){var r=n(9);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(7),o=n(45),i=n(10),c=n(46),a=n(54),u=n(84),s=o("wks"),d=r.Symbol,l=u?d:d&&d.withoutSetter||c;e.exports=function(e){return i(s,e)||(a&&i(d,e)?s[e]=d[e]:s[e]=l("Symbol."+e)),s[e]}},function(e,t,n){"use strict";n.d(t,"c",(function(){return j})),n.d(t,"b",(function(){return x.a})),n.d(t,"a",(function(){return S}));var r=n(58),o=n.n(r),i=n(3),c=n.n(i),a=n(13),u=n.n(a),s=n(4),d=n.n(s),l=n(1),f=n.n(l),p=n(0),h=(n(2),n(6));function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){var t,n=!1,r=1,o=e.querySelector('[name="download_id"]');t=parseFloat(o.value);var i=e.querySelector(".edd_price_option_".concat(t,":checked"));i&&(n=parseFloat(i.value));var c=e.querySelector('input[name="edd_download_quantity"]');return c&&(r=parseFloat(c.value)),{downloadId:t,priceId:n,quantity:r}}function b(e,t){return g.apply(this,arguments)}function g(){return(g=d()(f.a.mark((function e(t,n){var r,o,i,c,a,s,d;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=m(n),o=r.downloadId,i=r.priceId,c=r.quantity,e.prev=1,e.next=4,Object(p.a)("edds_prb_ajax_get_options",{downloadId:o,priceId:i,quantity:c});case 4:a=e.sent,s=a["display-items"],d=u()(a,["display-items"]),t.update(v({displayItems:s},d)),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),Object(p.i)({errorMessage:"",errorContainer:n,errorContainerReplace:!1});case 13:case"end":return e.stop()}}),e,null,[[1,10]])})))).apply(this,arguments)}function _(e,t,n){e.complete("success"),n.classList.remove("loading"),Object(p.i)({errorMessage:t.message,errorContainer:n,errorContainerReplace:!1}),jQuery("a.edd-add-to-cart",n).hide(),jQuery(".edd_download_quantity_wrapper",n).hide(),jQuery(".edd_price_options",n).hide(),jQuery(".edd_go_to_checkout",n).show().removeAttr("data-edd-loading")}function w(){return(w=d()(f.a.mark((function e(t,n,r){var o,i,c,a,u,s,l,y,v,b,g,w,O;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=m(n),i=o.downloadId,c=o.priceId,a=o.quantity,u=r.paymentMethod,s=r.payerEmail,l=r.payerName,e.next=5,Object(p.a)("edds_prb_ajax_process_checkout",{email:s,name:l,paymentMethod:u,downloadId:i,priceId:c,quantity:a,context:"download"});case 5:y=e.sent,v=y.intent,b=y.intent,g=b.client_secret,w=b.object,r.complete("success"),n.classList.add("loading"),O="setup_intent"===w?"confirmCardSetup":"confirmCardPayment",eddStripe[O](g,{payment_method:u.id},{handleActions:!1}).then((function(e){var t=e.error;if(t)throw t;eddStripe[O](g).then(function(){var e=d()(f.a.mark((function e(t){var o,i,c,a;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.error,e.prev=1,!o){e.next=4;break}throw o;case 4:return e.next=6,Object(h.b)(v);case 6:return i=e.sent,c=i.intent,a=i.nonce,e.next=11,Object(h.a)(c,a);case 11:window.location.replace(edd_stripe_vars.successPageUri),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(1),_(r,e.t0,n);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}())})).catch((function(e){_(r,e,n)})),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),_(r,e.t0,n);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})))).apply(this,arguments)}function O(e){var t=window.eddStripe;try{var n=S(e.dataset),r=n["display-items"],o=u()(n,["display-items"]),i=e.closest(".edd_download_purchase_form"),c=t.paymentRequest(v({requestPayerEmail:!0,displayItems:r},o)),a=t.elements().create("paymentRequestButton",{paymentRequest:c}),s=document.querySelector("#".concat(e.id));c.canMakePayment().then((function(t){t&&(!0===t.applePay&&"true"===edd_stripe_vars.isTestMode||(s.style.display="block",i.classList.add("edd-prb--is-active"),a.mount("#".concat(e.id," .edds-prb__button")),function(e,t){var n=t.querySelectorAll('.edd_price_options input[type="radio"]');Object(p.e)(n,(function(n){n.addEventListener("change",(function(){return b(e,t)}))}));var r=t.querySelector('input[name="edd_download_quantity"]');r&&r.addEventListener("change",(function(){return b(e,t)}))}(c,i)))})),c.on("paymentmethod",(function(e){!function(e,t,n){w.apply(this,arguments)}(c,i,e)}))}catch(e){Object(p.i)({errorMessage:e.message,errorContainer:purchaseLink,errorContainerReplace:!1})}}function j(){Object(p.e)(document.querySelectorAll(".edds-prb.edds-prb--download"),O)}var x=n(57);function S(e){for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var i=o()(r[n],2),c=i[0],a=i[1],u=a;try{u=JSON.parse(a)}catch(e){}t[c]=u}return t}},function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return p}));var r=n(4),o=n.n(r),i=n(1),c=n.n(i),a=n(2),u=n(0);function s(){Object(a.c)(window.eddStripe.elements()),e("#edd_purchase_form").off("submit",y),e("#edd_purchase_form").on("submit",y),e(document).off("ajaxSuccess",h),e(document).on("ajaxSuccess",h)}function d(){return(d=o()(c.a.mark((function t(){var n,r,o,i,u,s,d,h,y,b;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=e("#edd_purchase_form").serialize(),t.next=4,Object(a.e)(document.getElementById("edd_purchase_form"),window.eddStripe.cardElement);case 4:return r=t.sent,t.next=7,l(r.id,r.exists);case 7:return o=t.sent,i=o.intent,u=o.nonce,e("#edd-process-checkout-nonce").val(u),t.next=13,Object(a.f)(i,{form_data:n+="&edd-process-checkout-nonce=".concat(u)});case 13:return s=t.sent,t.next=16,f(s);case 16:return d=t.sent,h=d.intent,y=d.nonce,t.next=21,Object(a.a)(h,{},y);case 21:if("succeeded"!==(b=t.sent).status&&("canceled"!==b.status||"abandoned"!==b.cancellation_reason)){t.next=28;break}return t.next=25,p(b,y);case 25:window.location.replace(edd_stripe_vars.successPageUri),t.next=29;break;case 28:window.location.replace(edd_stripe_vars.failurePageUri);case 29:t.next=35;break;case 31:t.prev=31,t.t0=t.catch(0),m(t.t0),v();case 35:case"end":return t.stop()}}),t,null,[[0,31]])})))).apply(this,arguments)}function l(t,n){return Object(u.a)("edds_process_purchase_form",{form_data:e("#edd_purchase_form").serialize(),payment_method_id:t,payment_method_exists:n})}function f(t){var n=e("#edd_purchase_form"),r=n.serialize();if(0===n.length){var o=e("#edd-process-checkout-nonce").val();r="edd-process-checkout-nonce=".concat(o)}return Object(u.a)("edds_create_payment",{form_data:r,intent:t})}function p(t,n){var r=e("#edd_purchase_form"),o=r.serialize();if(0===r.length){var i=e("#edd-process-checkout-nonce").val();o="edd-process-checkout-nonce=".concat(i)}return n&&(o+="&edd-process-checkout-nonce=".concat(n)),Object(u.a)("edds_complete_payment",{form_data:o,intent:t})}function h(e,t,n){if(n&&n.data&&t)return n.data.includes("action=edd_process_checkout")&&n.data.includes("edd-gateway=stripe")&&t.responseText&&"success"===t.responseText.trim()?function(){return d.apply(this,arguments)}():void 0}function y(t){"stripe"===e('input[name="edd-gateway"]').val()&&e(".edd_cart_total .edd_cart_amount").data("total")>0&&(t.preventDefault(),e("#edd_purchase_form #edd_purchase_submit [type=submit]").trigger("click"))}function v(){document.querySelector("#edd_purchase_form #edd_purchase_submit [type=submit]").value=edd_global_vars.complete_purchase,e(".edd-loading-ajax").remove(),e(".edd_errors").remove(),e(".edd-error").hide(),e("#edd-purchase-button").attr("disabled",!1)}function m(t){var n=t.code,r=t.message,o=window.edd_stripe_vars.elementsOptions.i18n.errorMessages;r||(r=edd_stripe_vars.generic_error);var i=n&&o[n]?o[n]:r,c=Object(u.f)(i);e(".edd-stripe-alert").remove(),e(edd_global_vars.checkout_error_anchor).before(c),e(document.body).trigger("edd_checkout_error",[t]),window.console&&t.responseText&&window.console.error(t.responseText)}}).call(this,n(5))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(18),o=n(32),i=n(29);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=n(90).Promise},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),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r})},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){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(39),o=n(41);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(22);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(18),o=n(42),i=n(33),c=n(31),a=Object.defineProperty;t.f=r?a:function(e,t,n){if(i(e),t=c(t,!0),i(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(22);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(7),o=n(23);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(7),o=n(37).f,i=n(23),c=n(63),a=n(34),u=n(68),s=n(75);e.exports=function(e,t){var n,d,l,f,p,h=e.target,y=e.global,v=e.stat;if(n=y?r:v?r[h]||a(h,{}):(r[h]||{}).prototype)for(d in t){if(f=t[d],l=e.noTargetGet?(p=o(n,d))&&p.value:n[d],!s(y?d:h+(v?".":"#")+d,e.forced)&&void 0!==l){if(typeof f==typeof l)continue;u(f,l)}(e.sham||l&&l.sham)&&i(f,"sham",!0),c(n,d,f,e)}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(18),o=n(38),i=n(29),c=n(30),a=n(31),u=n(10),s=n(42),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=c(e),t=a(t,!0),s)try{return d(e,t)}catch(e){}if(u(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(9),o=n(40),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t){var n={}.toString;e.exports=function(e){return n.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,n){var r=n(18),o=n(9),i=n(62);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(44),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(7),o=n(34),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){var r=n(67),o=n(44);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t){e.exports={}},function(e,t,n){var r=n(10),o=n(30),i=n(73).indexOf,c=n(47);e.exports=function(e,t){var n,a=o(e),u=0,s=[];for(n in a)!r(c,n)&&r(a,n)&&s.push(n);for(;t.length>u;)r(a,n=t[u++])&&(~i(s,n)||s.push(n));return s}},function(e,t,n){var r=n(50),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(41);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(9);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t){e.exports={}},function(e,t,n){"use strict";(function(e,r){n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return y})),n.d(t,"c",(function(){return m}));var o=n(4),i=n.n(o),c=n(3),a=n.n(c),u=n(1),s=n.n(u),d=n(0);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"payment_intent",r=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_get_intent",{intent_id:t,intent_type:n,form_data:r.serialize()}).then((function(e){return e.intent}))}function h(t){var n=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_confirm_intent",{intent_id:t.id,intent_type:t.object,form_data:n.serialize()}).then((function(e){return e.intent}))}function y(t,n,o){var i=e(window.eddStripe.cardElement._parent).closest("form");if("requires_capture"!==t.status)return r.resolve(t);var c=i.serialize();return o&&(c+="&edd-process-checkout-nonce=".concat(o)),Object(d.a)("edds_capture_intent",f({intent_id:t.id,intent_type:t.object,form_data:c},n)).then((function(e){return e.intent}))}function v(t,n){var r=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_update_intent",f({intent_id:t.id,intent_type:t.object,form_data:r.serialize()},n)).then((function(e){return e.intent}))}function m(e,t){return b.apply(this,arguments)}function b(){return(b=i()(s.a.mark((function e(t,n){var r,o,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("requires_confirmation"!==t.status){e.next=7;break}return e.next=3,h(t);case 3:return r=e.sent,e.next=6,m(r);case 6:return e.abrupt("return",e.sent);case 7:if("requires_payment_method"!==t.status&&"requires_source"!==t.status){e.next=14;break}return e.next=10,v(t,n);case 10:return o=e.sent,e.next=13,m(o,n);case 13:return e.abrupt("return",e.sent);case 14:if(!("requires_action"===t.status&&"use_stripe_sdk"===t.next_action.type||"requires_source_action"===t.status&&"use_stripe_sdk"===t.next_action.type)){e.next=18;break}return c="setup_intent"===t.object?"handleCardSetup":"handleCardAction","automatic"===t.confirmation_method&&(c="handleCardPayment"),e.abrupt("return",window.eddStripe[c](t.client_secret).then(function(){var e=i()(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.error){e.next=2;break}throw t.error;case 2:return n=t.setupIntent,r=t.paymentIntent,e.next=5,m(n||r);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}).call(this,n(5),n(24))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return x}));var r,o=n(3),i=n.n(o),c=n(13),a=n.n(c),u=n(4),s=n.n(u),d=n(1),l=n.n(d),f=n(20),p=n(0),h=(n(2),n(6));function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(){r=!1;var e=document.getElementById("edd-gateway-option-stripe-prb");if(e){e.remove();var t=document.querySelectorAll(".edd-gateway-option"),n=t[0],o=n.querySelector("input");o.checked=!0,n.classList.add("edd-gateway-option-selected"),edd_load_gateway(o.value),1===t.length&&document.getElementById("edd_payment_mode_select_wrap").remove()}}function b(e){var t=document.getElementById("edds-prb-error-wrap"),n=edd_stripe_vars,r=n.checkout_agree_to_terms,o=n.checkout_agree_to_privacy,i=document.getElementById("edd_agree_to_terms");i&&(!1===i.checked?(e.preventDefault(),Object(p.i)({errorMessage:r,errorContainer:t})):Object(p.b)(t));var c=document.getElementById("edd-agree-to-privacy-policy");c&&!1===c.checked&&(!1===c.checked?(e.preventDefault(),Object(p.i)({errorMessage:o,errorContainer:t})):Object(p.b)(t))}function g(e,t){return _.apply(this,arguments)}function _(){return(_=s()(l.a.mark((function e(t,n){var r,o,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(p.a)("edds_prb_ajax_get_options");case 3:r=e.sent,o=r["display-items"],i=a()(r,["display-items"]),t.update(v({displayItems:o},i)),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),Object(p.i)({errorMessage:"",errorContainer:document.getElementById("edds-prb-checkout"),errorContainerReplace:!1});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function w(e,t,n){e.complete("success");var r=n.querySelector(".edds-prb-spinner");r&&r.parentNode.removeChild(r),n.classList.remove("loading"),Object(p.i)({errorMessage:t.message,errorContainer:document.getElementById("edds-prb-checkout"),errorContainerReplace:!1})}function O(){return(O=s()(l.a.mark((function t(n,r,o){var i,c,a,u,d,f,y,v,m,b;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i=o.paymentMethod,o.payerEmail,c=o.payerName,r.classList.add("loading"),a=document.createElement("span"),["edd-loading-ajax","edd-loading","edds-prb-spinner"].forEach((function(e){return a.classList.add(e)})),r.appendChild(a),t.next=9,Object(p.a)("edds_prb_ajax_process_checkout",{name:c,paymentMethod:i,form_data:e("#edd_purchase_form").serialize()});case 9:u=t.sent,d=u.intent,f=u.intent,y=f.client_secret,v=f.object,m=u.nonce,e("#edd-process-checkout-nonce").val(m),o.complete("success"),b="setup_intent"===v?"confirmCardSetup":"confirmCardPayment",eddStripe[b](y,{payment_method:i.id},{handleActions:!1}).then((function(e){var t=e.error;if(t)throw t;eddStripe[b](y).then(function(){var e=s()(l.a.mark((function e(t){var n,i,c,a;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.error,e.prev=1,!n){e.next=4;break}throw n;case 4:return e.next=6,Object(h.b)(d);case 6:return i=e.sent,c=i.intent,a=i.nonce,e.next=11,Object(h.a)(c,a);case 11:window.location.replace(edd_stripe_vars.successPageUri),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(1),w(o,e.t0,r);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}())})).catch((function(e){w(o,e,r)})),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(0),w(o,t.t0,r);case 24:case"end":return t.stop()}}),t,null,[[0,21]])})))).apply(this,arguments)}function j(e,t){var n=t.total_plain;!0===r&&0===n&&window.location.reload()}function x(){"1"===edd_scripts.is_checkout&&jQuery(document.body).on("edd_gateway_loaded",(function(e,t){if("stripe-prb"===t){var n=document.querySelector(".edds-prb.edds-prb--checkout");n&&(r=!0,function(e){var t=window.eddStripe,n=document.getElementById("edd_checkout_form_wrap");try{var r=Object(f.a)(e.dataset),o=r["display-items"],i=a()(r,["display-items"]),c=t.paymentRequest(v({requestPayerName:!0,displayItems:o},i)),u=t.elements().create("paymentRequestButton",{paymentRequest:c}),s=document.querySelector("#".concat(e.id));c.canMakePayment().then((function(t){return t?!0===t.applePay&&"true"===edd_stripe_vars.isTestMode?m():(s.style.display="block",n.classList.add("edd-prb--is-active"),u.mount("#".concat(e.id," .edds-prb__button")),function(e,t){var n=jQuery(document.body);n.on("edd_quantity_updated",(function(){return g(e,t)})),n.on("edd_discount_applied",(function(){return g(e,t)})),n.on("edd_discount_removed",(function(){return g(e,t)})),e.on("paymentmethod",(function(n){!function(e,t,n){O.apply(this,arguments)}(e,t,n)})),n.on("edd_discount_applied",j)}(c,n),void u.on("click",b)):m()}))}catch(e){Object(p.i)({errorMessage:e.message,errorContainer:document.querySelector("#edds-prb-checkout"),errorContainerReplace:!1})}}(n))}else r=!1}))}}).call(this,n(5))},function(e,t,n){var r=n(94),o=n(95),i=n(96),c=n(98);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t),n(60);var r=n(0),o=n(6),i=n(12),c=n(2);!function(){try{window.eddStripe=new Stripe(edd_stripe_vars.publishable_key),window.eddStripe._plugin={domReady:r.c,apiRequest:r.a,generateNotice:r.f,mountCardElement:c.g,createElementsPaymentForm:c.c,getBillingDetails:c.d,getPaymentMethod:c.e,confirmIntent:c.b,handleIntent:c.f,retrieveIntent:c.h,paymentMethods:i.a},Object(r.c)(o.d,o.h,o.g,o.c,o.f,o.e)}catch(e){alert(e.message)}}()},function(e,t,n){},function(e,t,n){var r=n(35),o=n(76);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){var r=n(7),o=n(22),i=r.document,c=o(i)&&o(i.createElement);e.exports=function(e){return c?i.createElement(e):{}}},function(e,t,n){var r=n(7),o=n(23),i=n(10),c=n(34),a=n(43),u=n(64),s=u.get,d=u.enforce,l=String(String).split("String");(e.exports=function(e,t,n,a){var u=!!a&&!!a.unsafe,s=!!a&&!!a.enumerable,f=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),d(n).source=l.join("string"==typeof t?t:"")),e!==r?(u?!f&&e[t]&&(s=!0):delete e[t],s?e[t]=n:o(e,t,n)):s?e[t]=n:c(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||a(this)}))},function(e,t,n){var r,o,i,c=n(65),a=n(7),u=n(22),s=n(23),d=n(10),l=n(66),f=n(47),p=a.WeakMap;if(c){var h=new p,y=h.get,v=h.has,m=h.set;r=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,r=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:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(7),o=n(43),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){var r=n(45),o=n(46),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(10),o=n(69),i=n(37),c=n(32);e.exports=function(e,t){for(var n=o(t),a=c.f,u=i.f,s=0;s<n.length;s++){var d=n[s];r(e,d)||a(e,d,u(t,d))}}},function(e,t,n){var r=n(70),o=n(72),i=n(52),c=n(33);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(c(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(71),o=n(7),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(7);e.exports=r},function(e,t,n){var r=n(48),o=n(51).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(30),o=n(49),i=n(74),c=function(e){return function(t,n,c){var a,u=r(t),s=o(u.length),d=i(c,s);if(e&&n!=n){for(;s>d;)if((a=u[d++])!=a)return!0}else for(;s>d;d++)if((e||d in u)&&u[d]===n)return e||d||0;return!e&&-1}};e.exports={includes:c(!0),indexOf:c(!1)}},function(e,t,n){var r=n(50),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t,n){var r=n(9),o=/#|\.prototype\./,i=function(e,t){var n=a[c(e)];return n==s||n!=u&&("function"==typeof t?r(t):!!t)},c=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},a=i.data={},u=i.NATIVE="N",s=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var r=n(18),o=n(9),i=n(77),c=n(52),a=n(38),u=n(53),s=n(39),d=Object.assign,l=Object.defineProperty;e.exports=!d||o((function(){if(r&&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={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=d({},e)[n]||"abcdefghijklmnopqrst"!=i(d({},t)).join("")}))?function(e,t){for(var n=u(e),o=arguments.length,d=1,l=c.f,f=a.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++],r&&!f.call(h,p)||(n[p]=h[p]);return n}:d},function(e,t,n){var r=n(48),o=n(51);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(35),o=n(79);r({target:"Array",stat:!0,forced:!n(89)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";var r=n(80),o=n(53),i=n(82),c=n(83),a=n(49),u=n(85),s=n(86);e.exports=function(e){var t,n,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),_=0;if(b&&(m=r(m,v>2?arguments[2]:void 0,2)),null==g||y==Array&&c(g))for(n=new y(t=a(h.length));t>_;_++)p=b?m(h[_],_):h[_],u(n,_,p);else for(f=(l=g.call(h)).next,n=new y;!(d=f.call(l)).done;_++)p=b?i(l,m,[d.value,_],!0):d.value,u(n,_,p);return n.length=_,n}},function(e,t,n){var r=n(81);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,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,n){var r=n(33);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(19),o=n(55),i=r("iterator"),c=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||c[i]===e)}},function(e,t,n){var r=n(54);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(31),o=n(32),i=n(29);e.exports=function(e,t,n){var c=r(t);c in e?o.f(e,c,i(0,n)):e[c]=n}},function(e,t,n){var r=n(87),o=n(55),i=n(19)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(88),o=n(40),i=n(19)("toStringTag"),c="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:c?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r={};r[n(19)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(19)("iterator"),o=!1;try{var i=0,c={next:function(){return{done:!!i++}},return:function(){o=!0}};c[r]=function(){return this},Array.from(c,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},function(e,t,n){(function(t,r){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,c=void 0,a=void 0,u=function(e,t){y[i]=e,y[i+1]=t,2===(i+=2)&&(a?a(v):w())},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 O(e,t){var n=arguments,r=this,o=new this.constructor(S);void 0===o[x]&&N(o);var i,c=r._state;return c?(i=n[c-1],u((function(){return B(c,o,i,r._result)}))):A(r,o,e,t),o}function j(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(S);return L(t,e),t}f?w=function(){return t.nextTick(v)}:l?(b=0,g=new l(v),_=document.createTextNode(""),g.observe(_,{characterData:!0}),w=function(){_.data=b=++b%2}):p?((m=new MessageChannel).port1.onmessage=v,w=function(){return m.port2.postMessage(0)}):w=void 0===s?function(){try{var e=n(92);return c=e.runOnLoop||e.runOnContext,function(){c(v)}}catch(e){return h()}}():h();var x=Math.random().toString(36).substring(16);function S(){}var E=new C;function k(e){try{return e.then}catch(e){return E.error=e,E}}function P(t,n,r){n.constructor===t.constructor&&r===O&&n.constructor.resolve===j?function(e,t){1===t._state?T(e,t._result):2===t._state?M(e,t._result):A(t,void 0,(function(t){return L(e,t)}),(function(t){return M(e,t)}))}(t,n):r===E?M(t,E.error):void 0===r?T(t,n):e(r)?function(e,t,n){u((function(e){var r=!1,o=function(n,o,i,c){try{n.call(o,(function(n){r||(r=!0,t!==n?L(e,n):T(e,n))}),(function(t){r||(r=!0,M(e,t))}))}catch(e){return e}}(n,t,0,0,e._label);!r&&o&&(r=!0,M(e,o))}),e)}(t,n,r):T(t,n)}function L(e,t){var n;e===t?M(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(n=t)||"object"==typeof n&&null!==n?P(e,t,k(t)):T(e,t)}function q(e){e._onerror&&e._onerror(e._result),I(e)}function T(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&u(I,e))}function M(e,t){void 0===e._state&&(e._state=2,e._result=t,u(q,e))}function A(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&u(I,e)}function I(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,c=0;c<t.length;c+=3)r=t[c],o=t[c+n],r?B(n,r,o,i):o(i);e._subscribers.length=0}}function C(){this.error=null}var D=new C;function B(t,n,r,o){var i=e(r),c=void 0,a=void 0,u=void 0,s=void 0;if(i){if((c=function(e,t){try{return e(t)}catch(e){return D.error=e,D}}(r,o))===D?(s=!0,a=c.error,c=null):u=!0,n===c)return void M(n,new TypeError("A promises callback cannot return that same promise."))}else c=o,u=!0;void 0!==n._state||(i&&u?L(n,c):s?M(n,a):1===t?T(n,c):2===t&&M(n,c))}var F=0;function N(e){e[x]=F++,e._state=void 0,e._result=void 0,e._subscribers=[]}function z(e,t){this._instanceConstructor=e,this.promise=new e(S),this.promise[x]||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?T(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&T(this.promise,this._result))):M(this.promise,new Error("Array Methods must be provided an Array"))}function R(e){this[x]=F++,this._result=this._state=void 0,this._subscribers=[],S!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof R?function(e,t){try{t((function(t){L(e,t)}),(function(t){M(e,t)}))}catch(t){M(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 V(){var e=void 0;if(void 0!==r)e=r;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 n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=R}return z.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;void 0===this._state&&n<e;n++)this._eachEntry(t[n],n)},z.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===j){var o=k(e);if(o===O&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===R){var i=new n(S);P(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},z.prototype._settledAt=function(e,t,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===e?M(r,n):this._result[t]=n),0===this._remaining&&T(r,this._result)},z.prototype._willSettleAt=function(e,t){var n=this;A(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},R.all=function(e){return new z(this,e).promise},R.race=function(e){var t=this;return o(e)?new t((function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},R.resolve=j,R.reject=function(e){var t=new this(S);return M(t,e),t},R._setScheduler=function(e){a=e},R._setAsap=function(e){u=e},R._asap=u,R.prototype={constructor:R,then:O,catch:function(e){return this.then(null,e)}},V(),R.polyfill=V,R.Promise=R,R},e.exports=o()}).call(this,n(91),n(36))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:c}catch(e){r=c}}();var u,s=[],d=!1,l=-1;function f(){d&&u&&(d=!1,u.length?s=u.concat(s):l=-1,s.length&&p())}function p(){if(!d){var e=a(f);d=!0;for(var t=s.length;t;){for(u=s,s=[];++l<t;)u&&u[l].run();l=-1,t=s.length}u=null,d=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===c||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.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 n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new h(e,t)),1!==s.length||d||a(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,n){(function(t){var n=function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),c=new x(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var a=w(c,n);if(a){if(a===l)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=d(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,c),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l={};function f(){}function p(){}function h(){}var y={};y[i]=function(){return this};var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==n&&r.call(m,i)&&(y=m);var b=h.prototype=f.prototype=Object.create(y);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var n;this._invoke=function(o,i){function c(){return new t((function(n,c){!function n(o,i,c,a){var u=d(e[o],e,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,c,a)}),(function(e){n("throw",e,c,a)})):t.resolve(l).then((function(e){s.value=e,c(s)}),(function(e){return n("throw",e,c,a)}))}a(u.arg)}(o,i,n,c)}))}return n=n?n.then(c,c):c()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=d(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function O(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function S(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=b.constructor=h,h.constructor=p,p.displayName=u(h,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,u(e,a,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},g(_.prototype),_.prototype[c]=function(){return this},e.AsyncIterator=_,e.async=function(n,r,o,i,c){void 0===c&&(c=t);var a=new _(s(n,r,o,i),c);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(b),u(b,a,"Generator"),b[i]=function(){return this},b.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,x.prototype={constructor:x,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(j),!e)for(var t in this)"t"===t.charAt(0)&&r.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 n(n,r){return c.type="throw",c.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var c=i?i.completion:{};return c.type=e,c.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(c)},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),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}}).call(this,n(24))},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(97);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0}]);
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=59)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return r.a})),n.d(t,"e",(function(){return i.a})),n.d(t,"c",(function(){return a})),n.d(t,"g",(function(){return c})),n.d(t,"f",(function(){return u.b})),n.d(t,"i",(function(){return u.c})),n.d(t,"b",(function(){return u.a})),n.d(t,"h",(function(){return s})),n.d(t,"j",(function(){return d})),n.d(t,"d",(function(){return l})),n(25),n(26),n(27),n(28);var r=n(15),o=n(16),i=n.n(o);function a(){i()(arguments,(function(e){document.addEventListener("DOMContentLoaded",e)}))}function c(e){for(var t=[],n=e.nextElementSibling;n;)1===n.nodeType&&t.push(n),n=n.nextElementSibling;return t}var u=n(17);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(e,t,n){e.exports=n(93)},function(e,t,n){"use strict";(function(e,r){n.d(t,"c",(function(){return f})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return y})),n.d(t,"d",(function(){return h}));var o=n(3),i=n.n(o),a=n(0),c=n(56);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}n.d(t,"a",(function(){return c.a})),n.d(t,"b",(function(){return c.b})),n.d(t,"f",(function(){return c.c})),n.d(t,"h",(function(){return c.d}));var s={card:"#edd-stripe-card-element"},d={cardNumber:"#edd-stripe-card-element",cardExpiry:"#edd-stripe-card-exp-element",cardCvc:"#edd-stripe-card-cvc-element"},l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},edd_stripe_vars.elementsOptions);function f(e,t){var n;return t||(t="true"===edd_stripe_vars.elementsSplitFields?d:s),Object(a.e)(t,(function(t,r){n=function(e,t,n){var r=document.querySelector(t);if(r){l.style||(l.style=function(){var e=document.querySelector(".card-name.edd-input");if(!e)return null;var t=window.getComputedStyle(e);if(!document.getElementById("edds-stripe-element-styles")){var n=document.createElement("style");n.innerHTML="\n\t\t\t.edd-stripe-card-element.StripeElement,\n\t\t\t.edd-stripe-card-exp-element.StripeElement,\n\t\t\t.edd-stripe-card-cvc-element.StripeElement {\n\t\t\t\tbackground-color: ".concat(t.getPropertyValue("background-color"),";\n\n\t\t\t\t").concat(["top","right","bottom","left"].map((function(e){return"border-".concat(e,"-color: ").concat(t.getPropertyValue("border-".concat(e,"-color")),";\n\t\t\t\t\t\t\t border-").concat(e,"-width: ").concat(t.getPropertyValue("border-".concat(e,"-width")),";\n\t\t\t\t\t\t\t border-").concat(e,"-style: ").concat(t.getPropertyValue("border-".concat(e,"-style")),";\n\t\t\t\t\t\t\t padding-").concat(e,": ").concat(t.getPropertyValue("padding-".concat(e)),";")})).join(""),"\n\t\t\t\t").concat(["top-right","bottom-right","bottom-left","top-left"].map((function(e){return"border-".concat(e,"-radius: ").concat(t.getPropertyValue("border-top-right-radius"),";")})).join(""),"\n\t\t\t}").replace(/\s/g,""),n.id="edds-stripe-element-styles",document.body.appendChild(n)}return{base:{color:t.getPropertyValue("color"),fontFamily:t.getPropertyValue("font-family"),fontSize:t.getPropertyValue("font-size"),fontWeight:t.getPropertyValue("font-weight"),fontSmoothing:t.getPropertyValue("-webkit-font-smoothing")}}}()),"cardNumber"===n&&l.hasOwnProperty("hidePostalCode")&&delete l.hidePostalCode,delete l.i18n;var o=e.create(n,l);return o.addEventListener("change",(function(e){!function(e,t){var n=t.closest(".edd-stripe-new-card").querySelector("#edd-stripe-card-errors");if(n.innerHTML="",e.error){var r=e.error,o=r.code,i=r.message,c=window.edd_stripe_vars.elementsOptions.i18n.errorMessages,u=c[o]?c[o]:i;n.appendChild(Object(a.f)(u))}}(e,r),function(e){var t=e.brand;if(e.elementType,"cardNumber"===e.elementType){var n=document.querySelector(".card-type");"unknown"===t?n.className="card-type":n.classList.add(t)}}(e)})).mount(r),o}}(e,t,r)})),window.eddStripe.cardElement=n,n}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#edd-stripe-card-element",n=f(e,{card:t}),r=document.getElementById("edd-card-details-wrap");return r&&(r.style.display="none"),n}function y(t,n){var o=e('input[name="edd_stripe_existing_card"]:checked');return o.length>0&&"new"!==o.val()?r.resolve({id:o.val(),exists:!0}):window.eddStripe.createPaymentMethod("card",n,{billing_details:h(t)}).then((function(e){if(e.error)throw e.error;return{id:e.paymentMethod.id,exists:!1}}))}function h(e){return{name:Object(a.d)(e.querySelector(".card-name")),address:{line1:Object(a.d)(e.querySelector(".card-address")),line2:Object(a.d)(e.querySelector(".card-address-2")),city:Object(a.d)(e.querySelector(".card-city")),state:Object(a.d)(e.querySelector(".card_state")),postal_code:Object(a.d)(e.querySelector(".card-zip")),country:Object(a.d)(e.querySelector("#billing_country"))}}}}).call(this,n(5),n(24))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){(function(t){function n(e,n,r,o,i,a,c){try{var u=e[a](c),s=u.value}catch(e){return void r(e)}u.done?n(s):t.resolve(s).then(o,i)}e.exports=function(e){return function(){var r=this,o=arguments;return new t((function(t,i){var a=e.apply(r,o);function c(e){n(a,t,i,c,u,"next",e)}function u(e){n(a,t,i,c,u,"throw",e)}c(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0}).call(this,n(24))},function(e,t){e.exports=jQuery},function(e,t,n){"use strict";n.d(t,"d",(function(){return r.d})),n.d(t,"b",(function(){return r.b})),n.d(t,"a",(function(){return r.a})),n.d(t,"h",(function(){return w})),n.d(t,"g",(function(){return I})),n.d(t,"c",(function(){return C})),n.d(t,"f",(function(){return D.c})),n.d(t,"e",(function(){return D.b}));var r=n(12),o=n(3),i=n.n(o),a=n(0);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(a.a)(e,u({payment_method:t,nonce:document.getElementById("card_update_nonce_"+t).value},n)).fail((function(e){y(t,e)})).done((function(e){y(t,e,"success"),setTimeout((function(){location.reload()}),1500)}))}function d(e){e.preventDefault();var t=e.target.dataset.source,n=document.getElementById(t+"-update-form"),r=document.getElementById(t+"-card-actions"),o="block"===n.style.display;n.style.display=o?"none":"block",r.style.display=o?"block":"none"}function l(e){e.preventDefault();var t=e.target,n={};["address_city","address_country","address_line1","address_line2","address_zip","address_state","exp_month","exp_year"].forEach((function(e){var r=t.querySelector('[name="'+e+'"]');n[e]=Object(a.d)(r)}));var r=t.querySelector('input[type="submit"]');r.disabled=!0,r.value=r.dataset.loading,s("edds_update_payment_method",e.target.dataset.source,n).fail((function(e){r.disabled=!1,r.value=r.dataset.submit}))}function f(e){e.preventDefault();var t=e.target.innerText;e.target.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',s("edds_delete_payment_method",e.target.dataset.source).fail((function(n){e.target.innerText=t}))}function p(e){e.preventDefault();var t=e.target.innerText;e.target.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',s("edds_set_payment_method_default",e.target.dataset.source).fail((function(n){e.target.innerText=t}))}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"error",r=Object(a.f)(t&&t.message?t.message:edd_stripe_vars.generic_error,n);Object(a.e)(document.querySelectorAll(".edd-stripe-alert"),(function(e){e.remove()}));var o=document.getElementById(e+"_card_item");o.insertBefore(r,o.querySelector(".card-details"))}var h=n(2);function v(e){e.preventDefault();var t=document.getElementById("edd-stripe-add-new-card"),n=t.querySelector(".edd-stripe-add-new-card"),r="block"===n.style.display,o=t.querySelector("#edd-stripe-add-new-cancel");if(r&&o!==e.target){var i=document.createEvent("Event");i.initEvent("submit",!0,!0),t.dispatchEvent(i)}else n.style.display=r?"none":"block",o.style.display=r?"none":"inline-block"}function m(e){e.preventDefault();var t,n,r=e.target;if(Object(a.h)(r))try{(n=document.querySelector(".edd-stripe-add-new")).value=n.dataset.loading,n.disabled=!0,(t=r,window.eddStripe.createPaymentMethod("card",window.eddStripe.cardElement,{billing_details:Object(h.d)(t)}).then((function(e){if(e.error)throw e.error;return e.paymentMethod}))).then(b).catch((function(e){_(e),g()}))}catch(e){_(e),g()}else Object(a.j)(r)}function b(e){Object(a.a)("edds_add_payment_method",{payment_method_id:e.id,nonce:document.getElementById("edd-stripe-add-card-nonce").value}).fail(_).done((function(e){_(e,"success"),setTimeout((function(){location.reload()}),1500)}))}function g(){var e=document.querySelector(".edd-stripe-add-new");e.value=e.dataset.submit,e.disabled=!1}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error",n=Object(a.f)(e&&e.message?e.message:edd_stripe_vars.generic_error,t);Object(a.e)(document.querySelectorAll(".edd-stripe-alert"),(function(e){e.remove()})),document.querySelector(".edd-stripe-add-card-actions").insertBefore(n,document.querySelector(".edd-stripe-add-new"))}function w(){document.getElementById("edd-stripe-manage-cards")&&(Object(a.e)(document.querySelectorAll(".edd-stripe-update-card"),(function(e){e.addEventListener("click",d)})),Object(a.e)(document.querySelectorAll(".edd-stripe-cancel-update"),(function(e){e.addEventListener("click",d)})),Object(a.e)(document.querySelectorAll(".card-update-form"),(function(e){e.addEventListener("submit",l)})),Object(a.e)(document.querySelectorAll(".edd-stripe-delete-card"),(function(e){e.addEventListener("click",f)})),Object(a.e)(document.querySelectorAll(".edd-stripe-default-card"),(function(e){e.addEventListener("click",p)})),Object(h.c)(window.eddStripe.elements()),document.querySelector(".edd-stripe-add-new").addEventListener("click",v),document.getElementById("edd-stripe-add-new-cancel").addEventListener("click",v),document.getElementById("edd-stripe-add-new-card").addEventListener("submit",m),document.getElementById("card_name").required=!0)}var O=n(13),j=n(4),x=n.n(j),S=n(1),E=n.n(S);function k(e){return P.apply(this,arguments)}function P(){return(P=x()(E.a.mark((function e(t){var n,r,o,i,a;return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),n=document.getElementById("edds-update-payment-method"),L(),e.prev=3,e.next=6,Object(h.e)(n,window.eddStripe.cardElement);case 6:return r=e.sent,e.next=9,Object(h.h)(n.dataset.paymentIntent,"payment_method");case 9:return o=e.sent,e.next=12,Object(h.f)(o,{payment_method:r.id});case 12:return i=e.sent,e.next=15,q(i.id);case 15:if(!(a=e.sent).payment){e.next=20;break}window.location.reload(),e.next=21;break;case 20:throw a;case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(3),T(e.t0),M();case 27:case"end":return e.stop()}}),e,null,[[3,23]])})))).apply(this,arguments)}function q(e){return Object(a.a)("edds_complete_payment_authorization",{intent_id:e,"edds-complete-payment-authorization":document.getElementById("edds-complete-payment-authorization").value})}function L(){var e=document.getElementById("edds-update-payment-method-submit");e.value=e.dataset.loading,e.disabled=!0}function M(){var e=document.getElementById("edds-update-payment-method-submit");e.value=e.dataset.submit,e.disabled=!1}function T(e){var t=Object(a.f)(e&&e.message?e.message:edd_stripe_vars.generic_error,"error"),n=document.getElementById("edds-update-payment-method-errors");n.innerHTML="",n.appendChild(t)}function I(){document.getElementById("edds-update-payment-method")&&(Object(h.c)(window.eddStripe.elements()),document.getElementById("edds-update-payment-method").addEventListener("submit",k),Object(O.a)())}var A=n(14);function C(){Object(a.e)(document.querySelectorAll(".edds-buy-now"),(function(e){e.classList.contains("edd-free-download")||e.addEventListener("click",(function(e){var t,n,o=e.currentTarget.dataset,i=o.downloadId,c=o.nonce;if(i){e.preventDefault(),e.stopImmediatePropagation();var u=0,s=1,d=e.currentTarget.closest(".edd_download_purchase_form"),l=d.querySelector(".edd_price_option_".concat(i,":checked"));l&&(u=l.value);var f=d.querySelector('input[name="edd_download_quantity"]');f&&(s=f.value),t={downloadId:i,priceId:u,quantity:s,nonce:c,addToCartForm:d},n=document.querySelector("#edds-buy-now-modal-content"),A.a.open("edds-buy-now",{onShow:function(){var e,o,i,c,u,s;n.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',(e=t.downloadId,o=t.priceId,i=t.quantity,c=t.nonce,u=t.addToCartForm,s={download_id:e,price_id:o,quantity:i,nonce:c,post_data:jQuery(u).serialize()},Object(a.a)("edds_add_to_cart",s)).then((function(e){var t=e.checkout;n.innerHTML=t,window.EDD_Checkout.init();var o=document.querySelector("#edds-buy-now-modal-content .edd_cart_amount");parseFloat(o.dataset.total)>0&&(Object(r.c)(),Object(A.b)())})).fail((function(e){var t=e.message;document.querySelector("#edds-buy-now-modal-content").innerHTML=t}))},onClose:function(){Object(a.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,n=document.querySelector(".edd_cart_amount").dataset,r=n.total,o=n.totalCurrency;"0"!==r&&setTimeout((function(){e.value="".concat(o," - ").concat(t)}),10)}}))}var D=n(20)},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(36))},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(99);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return i}));var r=n(14),o=n(21);function i(){if("1"===edd_scripts.is_checkout){var t=document.querySelector('input[name="edd-gateway"]');t&&"stripe"===t.value&&(Object(o.c)(),Object(r.b)()),e(document.body).on("edd_gateway_loaded",(function(e,t){"stripe"===t&&(Object(o.c)(),Object(r.b)())}))}}n.d(t,"a",(function(){return o.a})),n.d(t,"b",(function(){return o.b})),n.d(t,"c",(function(){return o.c}))}).call(this,n(5))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(0);function o(){i()&&(a(!1),i().addEventListener("change",(function(e){return a(e.target.checked)})));var t=document.querySelectorAll(".edd-stripe-existing-card");if(0!==t.length){Object(r.e)(t,(function(t){return t.addEventListener("change",(function(t){return function(t){var n="new"===t.value,r=document.querySelector(".edd-stripe-new-card"),o=document.querySelector(".edd-stripe-update-billing-address-wrapper");r.style.display=n?"block":"none",o&&(o.style.display=n?"none":"block"),e(".edd-stripe-card-radio-item").removeClass("selected"),e(t).closest(".edd-stripe-card-radio-item").addClass("selected");var c={card_address:"address_line1",card_address_2:"address_line2",card_city:"address_city",card_state:"address_state",card_zip:"address_zip",billing_country:"address_country"};if(n){for(var u in c){if(!c.hasOwnProperty(u))return;var s=document.getElementById(u);s&&(s.value="",s.selected="")}window.EDD_Checkout.recalculate_taxes&&window.EDD_Checkout.recalculate_taxes(),a(!0)}else{var d=[],l=document.getElementById(t.id+"-billing-details");if(!l)return;a(!1),i()&&(i().checked=!1);var f=l.dataset;for(var p in c)if(c.hasOwnProperty(p)){var y=document.getElementById(p);if(y){var h=f[c[p]];if(y.value=h,""!==h&&d.push(h),y.required&&""===h&&(a(!0),i()&&(i().checked=!0),o&&(o.style.display="none")),"billing_country"===p){var v=document.createEvent("Event");v.initEvent("change",!0,!0),y.dispatchEvent(v)}}}e(document).ajaxSuccess((function(e,t,n){if(n&&n.data&&t&&n.data.includes("action=edd_get_shop_states")&&n.data.includes("field_name=card_state")&&t.responseText&&t.responseText.includes("card_state")){var r=document.getElementById("card_state");r&&(r.value=f.address_state,window.EDD_Checkout.recalculate_taxes&&window.EDD_Checkout.recalculate_taxes(r.value))}}));var m=document.querySelector(".edd-stripe-update-billing-address-current");if(m){m.innerText=d.join(", ");var b=f.brand,g=f.last4;document.querySelector(".edd-stripe-update-billing-address-brand").innerHTML=b,document.querySelector(".edd-stripe-update-billing-address-last4").innerHTML=g}}}(t.target)}))}));var n=document.querySelector(".edd-stripe-existing-card:checked");n||((n=document.querySelector(".edd-stripe-existing-card:first-of-type")).checked=!0);var o=document.createEvent("Event");o.initEvent("change",!0,!1),n.dispatchEvent(o)}}function i(){return document.getElementById("edd-stripe-update-billing-address")}function a(e){var t=document.querySelector(".edd-stripe-update-billing-address-wrapper");if(t){var n=Object(r.g)(t),o=document.querySelector(".edd-stripe-update-billing-address-current");n.forEach((function(t){t.style.display=e?"block":"none"})),o&&(o.style.display=e?"none":"block")}}}).call(this,n(5))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g.a}));var r=n(3),o=n.n(r);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e){return function(e){if(Array.isArray(e))return c(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 c(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(61),n(78);var u,s,d,l,f,p=(u=["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 n=t.targetModal,r=t.triggers,o=void 0===r?[]:r,i=t.onShow,c=void 0===i?function(){}:i,u=t.onClose,s=void 0===u?function(){}:u,d=t.openTrigger,l=void 0===d?"data-micromodal-trigger":d,f=t.closeTrigger,p=void 0===f?"data-micromodal-close":f,y=t.openClass,h=void 0===y?"is-open":y,v=t.disableScroll,m=void 0!==v&&v,b=t.disableFocus,g=void 0!==b&&b,_=t.awaitCloseAnimation,w=void 0!==_&&_,O=t.awaitOpenAnimation,j=void 0!==O&&O,x=t.debugMode,S=void 0!==x&&x;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modal=document.getElementById(n),this.config={debugMode:S,disableScroll:m,openTrigger:l,closeTrigger:p,openClass:h,onShow:c,onClose:s,awaitCloseAnimation:w,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,n;return t=e,(n=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.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 n=function t(){e.modal.removeEventListener("animationend",t,!1),e.setFocusToFirstNode()};this.modal.addEventListener("animationend",n,!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 n=this.config.openClass;this.modal.addEventListener("animationend",(function e(){t.classList.remove(n),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(u);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 n=t.filter((function(t){return!t.hasAttribute(e.config.closeTrigger)}));n.length>0&&n[0].focus(),0===n.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 n=t.indexOf(document.activeElement);e.shiftKey&&0===n&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&n===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&i(t.prototype,n),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 n in t)l(n);return!0},{init:function(e){var t=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),n=a(document.querySelectorAll("[".concat(t.openTrigger,"]"))),r=function(e,t){var n=[];return e.forEach((function(e){var r=e.attributes[t].value;void 0===n[r]&&(n[r]=[]),n[r].push(e)})),n}(n,t.openTrigger);if(!0!==t.debugMode||!1!==f(n,r))for(var o in r){var i=r[o];t.targetModal=o,t.triggers=a(i),d=new s(t)}},show:function(e,t){var n=t||{};n.targetModal=e,!0===n.debugMode&&!1===l(e)||(d&&d.removeEventListeners(),(d=new s(n)).showModal())},close:function(e){e?d.closeModalById(e):d.closeModal()}});window.MicroModal=p;var y=p;function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={disableScroll:!0,awaitOpenAnimation:!0,awaitCloseAnimation:!0},b={setup:function(e){var t=v(v({},m),e);y.init(t)},open:function(e,t){var n=v(v({},m),t);y.show(e,n)},close:function(e){y.close(e)}},g=n(13)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var r=n(8),o=n.n(r),i=n(3),a=n.n(i);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(t,n){var r={type:"POST",dataType:"json",xhrFields:{withCredentials:!0},url:window.edd_scripts&&window.edd_scripts.ajaxurl||window.ajaxurl,data:u({action:t},n)},i=e.Deferred((function(t){t.jqXHR=e.ajax(r).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,n(5))},function(e,t){var n=/^(?:0|[1-9]\d*)$/;function r(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var o,i,a=Object.prototype,c=a.hasOwnProperty,u=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 n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),p=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var c=i[++r];if(!1===t(o[c],c,o))break}return e};function y(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||n.test(e))&&e>-1&&e%1==0&&e<t}var h=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)?u.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function m(e){return v(e)?function(e,t){var n=h(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&v(e)}(e)&&c.call(e,"callee")&&(!s.call(e,"callee")||"[object Arguments]"==u.call(e))}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,o=!!r;for(var i in e)!t&&!c.call(e,i)||o&&("length"==i||y(i,r))||n.push(i);return n}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||a))return d(e);var t,n,r=[];for(var o in Object(e))c.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e)}function b(e){return e}e.exports=function(e,t){return(h(e)?r:f)(e,"function"==typeof t?t:b)}},function(e,t,n){"use strict";(function(e){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error",n=document.createElement("p");return n.classList.add("edd-alert"),n.classList.add("edd-stripe-alert"),n.style.clear="both","error"===t?n.classList.add("edd-alert-error"):n.classList.add("edd-alert-success"),n.innerHTML=e||edd_stripe_vars.generic_error,n}function o(t){var n=t.errorType,o=t.errorMessage,i=t.errorContainer,a=t.errorContainerReplace,c=void 0===a||a,u=e(i),s=r(o,n);!0===c?u.html(s):u.before(s)}function i(t){e(t).html("")}n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}))}).call(this,n(5))},function(e,t,n){var r=n(10);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(7),o=n(45),i=n(11),a=n(46),c=n(54),u=n(84),s=o("wks"),d=r.Symbol,l=u?d:d&&d.withoutSetter||a;e.exports=function(e){return i(s,e)||(c&&i(d,e)?s[e]=d[e]:s[e]=l("Symbol."+e)),s[e]}},function(e,t,n){"use strict";n.d(t,"c",(function(){return x})),n.d(t,"b",(function(){return S.a})),n.d(t,"a",(function(){return E}));var r=n(58),o=n.n(r),i=n(3),a=n.n(i),c=n(9),u=n.n(c),s=n(4),d=n.n(s),l=n(1),f=n.n(l),p=n(0),y=(n(2),n(6));function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){var t,n=!1,r=1,o=e.querySelector('[name="download_id"]');t=parseFloat(o.value);var i=e.querySelector(".edd_price_option_".concat(t,":checked"));i&&(n=parseFloat(i.value));var a=e.querySelector('input[name="edd_download_quantity"]');return a&&(r=parseFloat(a.value)),{downloadId:t,priceId:n,quantity:r}}function b(e,t){return g.apply(this,arguments)}function g(){return(g=d()(f.a.mark((function e(t,n){var r,o,i,a,c,s,d;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=m(n),o=r.downloadId,i=r.priceId,a=r.quantity,e.prev=1,e.next=4,Object(p.a)("edds_prb_ajax_get_options",{downloadId:o,priceId:i,quantity:a});case 4:c=e.sent,s=c["display-items"],d=u()(c,["display-items"]),t.update(v({displayItems:s},d)),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),Object(p.i)({errorMessage:"",errorContainer:n,errorContainerReplace:!1});case 13:case"end":return e.stop()}}),e,null,[[1,10]])})))).apply(this,arguments)}function _(){return(_=d()(f.a.mark((function e(t,n,r){var o,i,a,c,s,d,l,y,h,b,g;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.dataset.price,i=m(r),a=i.downloadId,c=i.priceId,s=i.quantity,e.prev=2,e.next=5,Object(p.a)("edds_prb_ajax_get_options",{downloadId:a,priceId:c,quantity:s});case 5:d=e.sent,l=d["display-items"],y=u()(d,["display-items"]),h=edd_stripe_vars,b=h.is_zero_decimal,g=parseFloat(o),"false"===b&&(g=Math.round(100*g)),n.update(v(v({displayItems:l.map((function(e){return{label:e.label,amount:g}}))},y),{},{total:{label:y.total.label,amount:g}})),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),Object(p.i)({errorMessage:"",errorContainer:r,errorContainerReplace:!1});case 17:case"end":return e.stop()}}),e,null,[[2,14]])})))).apply(this,arguments)}function w(e,t,n){e.complete("success"),n.classList.remove("loading"),Object(p.i)({errorMessage:t.message,errorContainer:n,errorContainerReplace:!1}),jQuery("a.edd-add-to-cart",n).hide(),jQuery(".edd_download_quantity_wrapper",n).hide(),jQuery(".edd_price_options",n).hide(),jQuery(".edd_go_to_checkout",n).show().removeAttr("data-edd-loading")}function O(){return(O=d()(f.a.mark((function e(t,n,r){var o,i,a,c,u,s,l,h,v,b,g,_,O;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=m(n),i=o.downloadId,a=o.priceId,c=o.quantity,u=r.paymentMethod,s=r.payerEmail,l=r.payerName,e.next=5,Object(p.a)("edds_prb_ajax_process_checkout",{email:s,name:l,paymentMethod:u,downloadId:i,priceId:a,quantity:c,context:"download",post_data:jQuery(n).serialize()});case 5:h=e.sent,v=h.intent,b=h.intent,g=b.client_secret,_=b.object,r.complete("success"),n.classList.add("loading"),O="setup_intent"===_?"confirmCardSetup":"confirmCardPayment",eddStripe[O](g,{payment_method:u.id},{handleActions:!1}).then((function(e){var t=e.error;if(t)throw t;eddStripe[O](g).then(function(){var e=d()(f.a.mark((function e(t){var o,i,a,c;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.error,e.prev=1,!o){e.next=4;break}throw o;case 4:return e.next=6,Object(y.b)(v);case 6:return i=e.sent,a=i.intent,c=i.nonce,e.next=11,Object(y.a)(a,c);case 11:window.location.replace(edd_stripe_vars.successPageUri),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(1),w(r,e.t0,n);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}())})).catch((function(e){w(r,e,n)})),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),w(r,e.t0,n);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})))).apply(this,arguments)}function j(e){var t=window.eddStripe;try{var n=E(e.dataset),r=n["display-items"],o=u()(n,["display-items"]),i=e.closest(".edd_download_purchase_form"),a=t.paymentRequest(v({requestPayerEmail:!0,displayItems:r},o)),c=t.elements().create("paymentRequestButton",{paymentRequest:a}),s=document.querySelector("#".concat(e.id));a.canMakePayment().then((function(t){t&&(!0===t.applePay&&"true"===edd_stripe_vars.isTestMode||(s.style.display="block",i.classList.add("edd-prb--is-active"),c.mount("#".concat(e.id," .edds-prb__button")),function(e,t){var n=t.querySelectorAll('.edd_price_options input[type="radio"]');Object(p.e)(n,(function(n){n.addEventListener("change",(function(){return b(e,t)}))}));var r=t.querySelector('input[name="edd_download_quantity"]');r&&r.addEventListener("change",(function(){return b(e,t)})),function(e,t){var n=t.querySelector(".edd-add-to-cart");n&&new MutationObserver((function(n){n.forEach((function(n){var r=n.type,o=n.attributeName,i=n.target;"attributes"===r&&"data-price"===o&&function(e,t,n){_.apply(this,arguments)}(i,e,t)}))})).observe(n,{attributes:!0})}(e,t)}(a,i)))})),a.on("paymentmethod",(function(e){!function(e,t,n){O.apply(this,arguments)}(a,i,e)}))}catch(e){Object(p.i)({errorMessage:e.message,errorContainer:purchaseLink,errorContainerReplace:!1})}}function x(){Object(p.e)(document.querySelectorAll(".edds-prb.edds-prb--download"),j)}var S=n(57);function E(e){for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var i=o()(r[n],2),a=i[0],c=i[1],u=c;try{u=JSON.parse(c)}catch(e){}t[a]=u}return t}},function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return p}));var r=n(4),o=n.n(r),i=n(1),a=n.n(i),c=n(2),u=n(0);function s(){Object(c.c)(window.eddStripe.elements()),e("#edd_purchase_form").off("submit",h),e("#edd_purchase_form").on("submit",h),e(document).off("ajaxSuccess",y),e(document).on("ajaxSuccess",y)}function d(){return(d=o()(a.a.mark((function t(){var n,r,o,i,u,s,d,y,h,b;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=e("#edd_purchase_form").serialize(),t.next=4,Object(c.e)(document.getElementById("edd_purchase_form"),window.eddStripe.cardElement);case 4:return r=t.sent,t.next=7,l(r.id,r.exists);case 7:return o=t.sent,i=o.intent,u=o.nonce,e("#edd-process-checkout-nonce").val(u),t.next=13,Object(c.f)(i,{form_data:n+="&edd-process-checkout-nonce=".concat(u)});case 13:return s=t.sent,t.next=16,f(s);case 16:return d=t.sent,y=d.intent,h=d.nonce,t.next=21,Object(c.a)(y,{},h);case 21:if("succeeded"!==(b=t.sent).status&&("canceled"!==b.status||"abandoned"!==b.cancellation_reason)){t.next=28;break}return t.next=25,p(b,h);case 25:window.location.replace(edd_stripe_vars.successPageUri),t.next=29;break;case 28:window.location.replace(edd_stripe_vars.failurePageUri);case 29:t.next=35;break;case 31:t.prev=31,t.t0=t.catch(0),m(t.t0),v();case 35:case"end":return t.stop()}}),t,null,[[0,31]])})))).apply(this,arguments)}function l(t,n){return Object(u.a)("edds_process_purchase_form",{form_data:e("#edd_purchase_form").serialize(),payment_method_id:t,payment_method_exists:n})}function f(t){var n=e("#edd_purchase_form"),r=n.serialize();if(0===n.length){var o=e("#edd-process-checkout-nonce").val();r="edd-process-checkout-nonce=".concat(o)}return Object(u.a)("edds_create_payment",{form_data:r,intent:t})}function p(t,n){var r=e("#edd_purchase_form"),o=r.serialize();if(0===r.length){var i=e("#edd-process-checkout-nonce").val();o="edd-process-checkout-nonce=".concat(i)}return n&&(o+="&edd-process-checkout-nonce=".concat(n)),Object(u.a)("edds_complete_payment",{form_data:o,intent:t})}function y(e,t,n){if(n&&n.data&&t)return n.data.includes("action=edd_process_checkout")&&n.data.includes("edd-gateway=stripe")&&t.responseText&&"success"===t.responseText.trim()?function(){return d.apply(this,arguments)}():void 0}function h(t){"stripe"===e('input[name="edd-gateway"]').val()&&e(".edd_cart_total .edd_cart_amount").data("total")>0&&(t.preventDefault(),e("#edd_purchase_form #edd_purchase_submit [type=submit]").trigger("click"))}function v(){document.querySelector("#edd_purchase_form #edd_purchase_submit [type=submit]").value=edd_global_vars.complete_purchase,e(".edd-loading-ajax").remove(),e(".edd_errors").remove(),e(".edd-error").hide(),e("#edd-purchase-button").attr("disabled",!1)}function m(t){var n=t.code,r=t.message,o=window.edd_stripe_vars.elementsOptions.i18n.errorMessages;r||(r=edd_stripe_vars.generic_error);var i=n&&o[n]?o[n]:r,a=Object(u.f)(i);e(".edd-stripe-alert").remove(),e(edd_global_vars.checkout_error_anchor).before(a),e(document.body).trigger("edd_checkout_error",[t]),window.console&&t.responseText&&window.console.error(t.responseText)}}).call(this,n(5))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(18),o=n(32),i=n(29);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=n(90).Promise},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),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r})},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){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(39),o=n(41);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(22);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(18),o=n(42),i=n(33),a=n(31),c=Object.defineProperty;t.f=r?c:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(22);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(7),o=n(23);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(7),o=n(37).f,i=n(23),a=n(63),c=n(34),u=n(68),s=n(75);e.exports=function(e,t){var n,d,l,f,p,y=e.target,h=e.global,v=e.stat;if(n=h?r:v?r[y]||c(y,{}):(r[y]||{}).prototype)for(d in t){if(f=t[d],l=e.noTargetGet?(p=o(n,d))&&p.value:n[d],!s(h?d:y+(v?".":"#")+d,e.forced)&&void 0!==l){if(typeof f==typeof l)continue;u(f,l)}(e.sham||l&&l.sham)&&i(f,"sham",!0),a(n,d,f,e)}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(18),o=n(38),i=n(29),a=n(30),c=n(31),u=n(11),s=n(42),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=a(e),t=c(t,!0),s)try{return d(e,t)}catch(e){}if(u(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(10),o=n(40),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t){var n={}.toString;e.exports=function(e){return n.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,n){var r=n(18),o=n(10),i=n(62);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(44),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(7),o=n(34),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){var r=n(67),o=n(44);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t){e.exports={}},function(e,t,n){var r=n(11),o=n(30),i=n(73).indexOf,a=n(47);e.exports=function(e,t){var n,c=o(e),u=0,s=[];for(n in c)!r(a,n)&&r(c,n)&&s.push(n);for(;t.length>u;)r(c,n=t[u++])&&(~i(s,n)||s.push(n));return s}},function(e,t,n){var r=n(50),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(41);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(10);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t){e.exports={}},function(e,t,n){"use strict";(function(e,r){n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return m}));var o=n(4),i=n.n(o),a=n(3),c=n.n(a),u=n(1),s=n.n(u),d=n(0);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"payment_intent",r=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_get_intent",{intent_id:t,intent_type:n,form_data:r.serialize()}).then((function(e){return e.intent}))}function y(t){var n=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_confirm_intent",{intent_id:t.id,intent_type:t.object,form_data:n.serialize()}).then((function(e){return e.intent}))}function h(t,n,o){var i=e(window.eddStripe.cardElement._parent).closest("form");if("requires_capture"!==t.status)return r.resolve(t);var a=i.serialize();return o&&(a+="&edd-process-checkout-nonce=".concat(o)),Object(d.a)("edds_capture_intent",f({intent_id:t.id,intent_type:t.object,form_data:a},n)).then((function(e){return e.intent}))}function v(t,n){var r=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_update_intent",f({intent_id:t.id,intent_type:t.object,form_data:r.serialize()},n)).then((function(e){return e.intent}))}function m(e,t){return b.apply(this,arguments)}function b(){return(b=i()(s.a.mark((function e(t,n){var r,o,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("requires_confirmation"!==t.status){e.next=7;break}return e.next=3,y(t);case 3:return r=e.sent,e.next=6,m(r);case 6:return e.abrupt("return",e.sent);case 7:if("requires_payment_method"!==t.status&&"requires_source"!==t.status){e.next=14;break}return e.next=10,v(t,n);case 10:return o=e.sent,e.next=13,m(o,n);case 13:return e.abrupt("return",e.sent);case 14:if(!("requires_action"===t.status&&"use_stripe_sdk"===t.next_action.type||"requires_source_action"===t.status&&"use_stripe_sdk"===t.next_action.type)){e.next=18;break}return a="setup_intent"===t.object?"handleCardSetup":"handleCardAction","automatic"===t.confirmation_method&&(a="handleCardPayment"),e.abrupt("return",window.eddStripe[a](t.client_secret).then(function(){var e=i()(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.error){e.next=2;break}throw t.error;case 2:return n=t.setupIntent,r=t.paymentIntent,e.next=5,m(n||r);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}).call(this,n(5),n(24))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return x}));var r,o=n(3),i=n.n(o),a=n(9),c=n.n(a),u=n(4),s=n.n(u),d=n(1),l=n.n(d),f=n(20),p=n(0),y=(n(2),n(6));function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(){r=!1;var e=document.getElementById("edd-gateway-option-stripe-prb");if(e){e.remove();var t=document.querySelectorAll(".edd-gateway-option"),n=t[0],o=n.querySelector("input");o.checked=!0,n.classList.add("edd-gateway-option-selected"),edd_load_gateway(o.value),1===t.length&&document.getElementById("edd_payment_mode_select_wrap").remove()}}function b(e){var t=document.getElementById("edds-prb-error-wrap"),n=edd_stripe_vars,r=n.checkout_agree_to_terms,o=n.checkout_agree_to_privacy,i=document.getElementById("edd_agree_to_terms");i&&(!1===i.checked?(e.preventDefault(),Object(p.i)({errorMessage:r,errorContainer:t})):Object(p.b)(t));var a=document.getElementById("edd-agree-to-privacy-policy");a&&!1===a.checked&&(!1===a.checked?(e.preventDefault(),Object(p.i)({errorMessage:o,errorContainer:t})):Object(p.b)(t))}function g(e,t){return _.apply(this,arguments)}function _(){return(_=s()(l.a.mark((function e(t,n){var r,o,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(p.a)("edds_prb_ajax_get_options");case 3:r=e.sent,o=r["display-items"],i=c()(r,["display-items"]),t.update(v({displayItems:o},i)),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),Object(p.i)({errorMessage:"",errorContainer:document.getElementById("edds-prb-checkout"),errorContainerReplace:!1});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function w(e,t,n){e.complete("success");var r=n.querySelector(".edds-prb-spinner");r&&r.parentNode.removeChild(r),n.classList.remove("loading"),Object(p.i)({errorMessage:t.message,errorContainer:document.getElementById("edds-prb-checkout"),errorContainerReplace:!1})}function O(){return(O=s()(l.a.mark((function t(n,r,o){var i,a,c,u,d,f,h,v,m,b;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i=o.paymentMethod,o.payerEmail,a=o.payerName,r.classList.add("loading"),c=document.createElement("span"),["edd-loading-ajax","edd-loading","edds-prb-spinner"].forEach((function(e){return c.classList.add(e)})),r.appendChild(c),t.next=9,Object(p.a)("edds_prb_ajax_process_checkout",{name:a,paymentMethod:i,form_data:e("#edd_purchase_form").serialize()});case 9:u=t.sent,d=u.intent,f=u.intent,h=f.client_secret,v=f.object,m=u.nonce,e("#edd-process-checkout-nonce").val(m),o.complete("success"),b="setup_intent"===v?"confirmCardSetup":"confirmCardPayment",eddStripe[b](h,{payment_method:i.id},{handleActions:!1}).then((function(e){var t=e.error;if(t)throw t;eddStripe[b](h).then(function(){var e=s()(l.a.mark((function e(t){var n,i,a,c;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.error,e.prev=1,!n){e.next=4;break}throw n;case 4:return e.next=6,Object(y.b)(d);case 6:return i=e.sent,a=i.intent,c=i.nonce,e.next=11,Object(y.a)(a,c);case 11:window.location.replace(edd_stripe_vars.successPageUri),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(1),w(o,e.t0,r);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}())})).catch((function(e){w(o,e,r)})),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(0),w(o,t.t0,r);case 24:case"end":return t.stop()}}),t,null,[[0,21]])})))).apply(this,arguments)}function j(e,t){var n=t.total_plain;!0===r&&0===n&&window.location.reload()}function x(){"1"===edd_scripts.is_checkout&&jQuery(document.body).on("edd_gateway_loaded",(function(e,t){if("stripe-prb"!==t)return r=!1,void function(){var e=window,t=e.eddStripe,n=e.edd_stripe_vars;if(n&&t){var r=n.currency,o=n.country;"false"!==n.checkoutHasPaymentRequest&&t.paymentRequest({country:o,currency:r.toLowerCase(),total:{label:"Easy Digital Downloads",amount:100}}).canMakePayment().then((function(e){null===e&&m(),document.getElementById("edd_checkout_form_wrap").classList.add("edd-prb--is-active")}))}}();var n=document.querySelector(".edds-prb.edds-prb--checkout");n&&(r=!0,function(e){var t=window.eddStripe,n=document.getElementById("edd_checkout_form_wrap");try{var r=Object(f.a)(e.dataset),o=r["display-items"],i=c()(r,["display-items"]),a=t.paymentRequest(v({requestPayerName:!0,displayItems:o},i)),u=t.elements().create("paymentRequestButton",{paymentRequest:a}),s=document.querySelector("#".concat(e.id));a.canMakePayment().then((function(t){return t?!0===t.applePay&&"true"===edd_stripe_vars.isTestMode?m():(s.style.display="block",n.classList.add("edd-prb--is-active"),u.mount("#".concat(e.id," .edds-prb__button")),function(e,t){var n=jQuery(document.body);n.on("edd_quantity_updated",(function(){return g(e,t)})),n.on("edd_discount_applied",(function(){return g(e,t)})),n.on("edd_discount_removed",(function(){return g(e,t)})),e.on("paymentmethod",(function(n){!function(e,t,n){O.apply(this,arguments)}(e,t,n)})),n.on("edd_discount_applied",j)}(a,n),void u.on("click",b)):m()}))}catch(e){Object(p.i)({errorMessage:e.message,errorContainer:document.querySelector("#edds-prb-checkout"),errorContainerReplace:!1})}}(n))}))}}).call(this,n(5))},function(e,t,n){var r=n(94),o=n(95),i=n(96),a=n(98);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t),n(60);var r=n(0),o=n(6),i=n(13),a=n(2);!function(){try{window.eddStripe=new Stripe(edd_stripe_vars.publishable_key),window.eddStripe._plugin={domReady:r.c,apiRequest:r.a,generateNotice:r.f,mountCardElement:a.g,createElementsPaymentForm:a.c,getBillingDetails:a.d,getPaymentMethod:a.e,confirmIntent:a.b,handleIntent:a.f,retrieveIntent:a.h,paymentMethods:i.a},Object(r.c)(o.d,o.h,o.g,o.c,o.f,o.e)}catch(e){alert(e.message)}}()},function(e,t,n){},function(e,t,n){var r=n(35),o=n(76);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){var r=n(7),o=n(22),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(7),o=n(23),i=n(11),a=n(34),c=n(43),u=n(64),s=u.get,d=u.enforce,l=String(String).split("String");(e.exports=function(e,t,n,c){var u=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,f=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),d(n).source=l.join("string"==typeof t?t:"")),e!==r?(u?!f&&e[t]&&(s=!0):delete e[t],s?e[t]=n:o(e,t,n)):s?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||c(this)}))},function(e,t,n){var r,o,i,a=n(65),c=n(7),u=n(22),s=n(23),d=n(11),l=n(66),f=n(47),p=c.WeakMap;if(a){var y=new p,h=y.get,v=y.has,m=y.set;r=function(e,t){return m.call(y,e,t),t},o=function(e){return h.call(y,e)||{}},i=function(e){return v.call(y,e)}}else{var b=l("state");f[b]=!0,r=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:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(7),o=n(43),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){var r=n(45),o=n(46),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(11),o=n(69),i=n(37),a=n(32);e.exports=function(e,t){for(var n=o(t),c=a.f,u=i.f,s=0;s<n.length;s++){var d=n[s];r(e,d)||c(e,d,u(t,d))}}},function(e,t,n){var r=n(70),o=n(72),i=n(52),a=n(33);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(71),o=n(7),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(7);e.exports=r},function(e,t,n){var r=n(48),o=n(51).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(30),o=n(49),i=n(74),a=function(e){return function(t,n,a){var c,u=r(t),s=o(u.length),d=i(a,s);if(e&&n!=n){for(;s>d;)if((c=u[d++])!=c)return!0}else for(;s>d;d++)if((e||d in u)&&u[d]===n)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(50),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t,n){var r=n(10),o=/#|\.prototype\./,i=function(e,t){var n=c[a(e)];return n==s||n!=u&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=i.data={},u=i.NATIVE="N",s=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var r=n(18),o=n(10),i=n(77),a=n(52),c=n(38),u=n(53),s=n(39),d=Object.assign,l=Object.defineProperty;e.exports=!d||o((function(){if(r&&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={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=d({},e)[n]||"abcdefghijklmnopqrst"!=i(d({},t)).join("")}))?function(e,t){for(var n=u(e),o=arguments.length,d=1,l=a.f,f=c.f;o>d;)for(var p,y=s(arguments[d++]),h=l?i(y).concat(l(y)):i(y),v=h.length,m=0;v>m;)p=h[m++],r&&!f.call(y,p)||(n[p]=y[p]);return n}:d},function(e,t,n){var r=n(48),o=n(51);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(35),o=n(79);r({target:"Array",stat:!0,forced:!n(89)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";var r=n(80),o=n(53),i=n(82),a=n(83),c=n(49),u=n(85),s=n(86);e.exports=function(e){var t,n,d,l,f,p,y=o(e),h="function"==typeof this?this:Array,v=arguments.length,m=v>1?arguments[1]:void 0,b=void 0!==m,g=s(y),_=0;if(b&&(m=r(m,v>2?arguments[2]:void 0,2)),null==g||h==Array&&a(g))for(n=new h(t=c(y.length));t>_;_++)p=b?m(y[_],_):y[_],u(n,_,p);else for(f=(l=g.call(y)).next,n=new h;!(d=f.call(l)).done;_++)p=b?i(l,m,[d.value,_],!0):d.value,u(n,_,p);return n.length=_,n}},function(e,t,n){var r=n(81);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,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,n){var r=n(33);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(19),o=n(55),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},function(e,t,n){var r=n(54);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(31),o=n(32),i=n(29);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){var r=n(87),o=n(55),i=n(19)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(88),o=n(40),i=n(19)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r={};r[n(19)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(19)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},function(e,t,n){(function(t,r){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,c=void 0,u=function(e,t){h[i]=e,h[i+1]=t,2===(i+=2)&&(c?c(v):w())},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 y(){var e=setTimeout;return function(){return e(v,1)}}var h=new Array(1e3);function v(){for(var e=0;e<i;e+=2)(0,h[e])(h[e+1]),h[e]=void 0,h[e+1]=void 0;i=0}var m,b,g,_,w=void 0;function O(e,t){var n=arguments,r=this,o=new this.constructor(S);void 0===o[x]&&N(o);var i,a=r._state;return a?(i=n[a-1],u((function(){return B(a,o,i,r._result)}))):I(r,o,e,t),o}function j(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(S);return q(t,e),t}f?w=function(){return t.nextTick(v)}:l?(b=0,g=new l(v),_=document.createTextNode(""),g.observe(_,{characterData:!0}),w=function(){_.data=b=++b%2}):p?((m=new MessageChannel).port1.onmessage=v,w=function(){return m.port2.postMessage(0)}):w=void 0===s?function(){try{var e=n(92);return a=e.runOnLoop||e.runOnContext,function(){a(v)}}catch(e){return y()}}():y();var x=Math.random().toString(36).substring(16);function S(){}var E=new C;function k(e){try{return e.then}catch(e){return E.error=e,E}}function P(t,n,r){n.constructor===t.constructor&&r===O&&n.constructor.resolve===j?function(e,t){1===t._state?M(e,t._result):2===t._state?T(e,t._result):I(t,void 0,(function(t){return q(e,t)}),(function(t){return T(e,t)}))}(t,n):r===E?T(t,E.error):void 0===r?M(t,n):e(r)?function(e,t,n){u((function(e){var r=!1,o=function(n,o,i,a){try{n.call(o,(function(n){r||(r=!0,t!==n?q(e,n):M(e,n))}),(function(t){r||(r=!0,T(e,t))}))}catch(e){return e}}(n,t,0,0,e._label);!r&&o&&(r=!0,T(e,o))}),e)}(t,n,r):M(t,n)}function q(e,t){var n;e===t?T(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(n=t)||"object"==typeof n&&null!==n?P(e,t,k(t)):M(e,t)}function L(e){e._onerror&&e._onerror(e._result),A(e)}function M(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&u(A,e))}function T(e,t){void 0===e._state&&(e._state=2,e._result=t,u(L,e))}function I(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&u(A,e)}function A(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?B(n,r,o,i):o(i);e._subscribers.length=0}}function C(){this.error=null}var D=new C;function B(t,n,r,o){var i=e(r),a=void 0,c=void 0,u=void 0,s=void 0;if(i){if((a=function(e,t){try{return e(t)}catch(e){return D.error=e,D}}(r,o))===D?(s=!0,c=a.error,a=null):u=!0,n===a)return void T(n,new TypeError("A promises callback cannot return that same promise."))}else a=o,u=!0;void 0!==n._state||(i&&u?q(n,a):s?T(n,c):1===t?M(n,a):2===t&&T(n,a))}var F=0;function N(e){e[x]=F++,e._state=void 0,e._result=void 0,e._subscribers=[]}function z(e,t){this._instanceConstructor=e,this.promise=new e(S),this.promise[x]||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))):T(this.promise,new Error("Array Methods must be provided an Array"))}function R(e){this[x]=F++,this._result=this._state=void 0,this._subscribers=[],S!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof R?function(e,t){try{t((function(t){q(e,t)}),(function(t){T(e,t)}))}catch(t){T(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 H(){var e=void 0;if(void 0!==r)e=r;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 n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=R}return z.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;void 0===this._state&&n<e;n++)this._eachEntry(t[n],n)},z.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===j){var o=k(e);if(o===O&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===R){var i=new n(S);P(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},z.prototype._settledAt=function(e,t,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===e?T(r,n):this._result[t]=n),0===this._remaining&&M(r,this._result)},z.prototype._willSettleAt=function(e,t){var n=this;I(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},R.all=function(e){return new z(this,e).promise},R.race=function(e){var t=this;return o(e)?new t((function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},R.resolve=j,R.reject=function(e){var t=new this(S);return T(t,e),t},R._setScheduler=function(e){c=e},R._setAsap=function(e){u=e},R._asap=u,R.prototype={constructor:R,then:O,catch:function(e){return this.then(null,e)}},H(),R.polyfill=H,R.Promise=R,R},e.exports=o()}).call(this,n(91),n(36))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,s=[],d=!1,l=-1;function f(){d&&u&&(d=!1,u.length?s=u.concat(s):l=-1,s.length&&p())}function p(){if(!d){var e=c(f);d=!0;for(var t=s.length;t;){for(u=s,s=[];++l<t;)u&&u[l].run();l=-1,t=s.length}u=null,d=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new y(e,t)),1!==s.length||d||c(p)},y.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=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,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,n){(function(t){var n=function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new x(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=d(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l={};function f(){}function p(){}function y(){}var h={};h[i]=function(){return this};var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==n&&r.call(m,i)&&(h=m);var b=y.prototype=f.prototype=Object.create(h);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,c){var u=d(e[o],e,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=d(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function O(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function S(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=b.constructor=y,y.constructor=p,p.displayName=u(y,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},g(_.prototype),_.prototype[a]=function(){return this},e.AsyncIterator=_,e.async=function(n,r,o,i,a){void 0===a&&(a=t);var c=new _(s(n,r,o,i),a);return e.isGeneratorFunction(r)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},g(b),u(b,c,"Generator"),b[i]=function(){return this},b.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,x.prototype={constructor:x,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(j),!e)for(var t in this)"t"===t.charAt(0)&&r.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 n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},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),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}}).call(this,n(24))},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(97);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0}]);
|
includes/gateways/stripe/assets/js/build/app.min.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/css/src/frontend.scss","webpack:///./assets/js/src/frontend/components/index.js","webpack:///./assets/js/src/frontend/components/modal/index.js","webpack:///./assets/js/src/frontend/components/payment-methods/index.js","webpack:///./assets/js/src/frontend/index.js","webpack:///./assets/js/src/frontend/payment-forms/buy-now/index.js","webpack:///./assets/js/src/frontend/payment-forms/checkout/index.js","webpack:///./assets/js/src/frontend/payment-forms/checkout/payment-form.js","webpack:///./assets/js/src/frontend/payment-forms/index.js","webpack:///./assets/js/src/frontend/payment-forms/payment-receipt/index.js","webpack:///./assets/js/src/frontend/payment-forms/payment-receipt/payment-form.js","webpack:///./assets/js/src/frontend/payment-forms/payment-request/checkout.js","webpack:///./assets/js/src/frontend/payment-forms/payment-request/download.js","webpack:///./assets/js/src/frontend/payment-forms/payment-request/index.js","webpack:///./assets/js/src/frontend/payment-forms/profile-editor/index.js","webpack:///./assets/js/src/frontend/payment-forms/profile-editor/payment-form.js","webpack:///./assets/js/src/frontend/payment-forms/profile-editor/payment-method-actions.js","webpack:///./assets/js/src/frontend/stripe-elements/index.js","webpack:///./assets/js/src/frontend/stripe-elements/intents.js","webpack:///./assets/js/src/utils/api-request.js","webpack:///./assets/js/src/utils/dom.js","webpack:///./assets/js/src/utils/form.js","webpack:///./assets/js/src/utils/index.js","webpack:///./assets/js/src/utils/notice.js","webpack:///./assets/js/src/utils/polyfill-closest.js","webpack:///./assets/js/src/utils/polyfill-includes.js","webpack:///./assets/js/src/utils/polyfill-object-entries.js","webpack:///./assets/js/src/utils/polyfill-remove.js","webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray/index.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles/index.js","webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator/index.js","webpack:///./node_modules/@babel/runtime/helpers/defineProperty/index.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit/index.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest/index.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutProperties/index.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose/index.js","webpack:///./node_modules/@babel/runtime/helpers/slicedToArray/index.js","webpack:///./node_modules/@babel/runtime/helpers/typeof/index.js","webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray/index.js","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/core-js/internals/a-function.js","webpack:///./node_modules/core-js/internals/an-object.js","webpack:///./node_modules/core-js/internals/array-from.js","webpack:///./node_modules/core-js/internals/array-includes.js","webpack:///./node_modules/core-js/internals/call-with-safe-iteration-closing.js","webpack:///./node_modules/core-js/internals/check-correctness-of-iteration.js","webpack:///./node_modules/core-js/internals/classof-raw.js","webpack:///./node_modules/core-js/internals/classof.js","webpack:///./node_modules/core-js/internals/copy-constructor-properties.js","webpack:///./node_modules/core-js/internals/create-non-enumerable-property.js","webpack:///./node_modules/core-js/internals/create-property-descriptor.js","webpack:///./node_modules/core-js/internals/create-property.js","webpack:///./node_modules/core-js/internals/descriptors.js","webpack:///./node_modules/core-js/internals/document-create-element.js","webpack:///./node_modules/core-js/internals/enum-bug-keys.js","webpack:///./node_modules/core-js/internals/export.js","webpack:///./node_modules/core-js/internals/fails.js","webpack:///./node_modules/core-js/internals/function-bind-context.js","webpack:///./node_modules/core-js/internals/get-built-in.js","webpack:///./node_modules/core-js/internals/get-iterator-method.js","webpack:///./node_modules/core-js/internals/global.js","webpack:///./node_modules/core-js/internals/has.js","webpack:///./node_modules/core-js/internals/hidden-keys.js","webpack:///./node_modules/core-js/internals/ie8-dom-define.js","webpack:///./node_modules/core-js/internals/indexed-object.js","webpack:///./node_modules/core-js/internals/inspect-source.js","webpack:///./node_modules/core-js/internals/internal-state.js","webpack:///./node_modules/core-js/internals/is-array-iterator-method.js","webpack:///./node_modules/core-js/internals/is-forced.js","webpack:///./node_modules/core-js/internals/is-object.js","webpack:///./node_modules/core-js/internals/is-pure.js","webpack:///./node_modules/core-js/internals/iterators.js","webpack:///./node_modules/core-js/internals/native-symbol.js","webpack:///./node_modules/core-js/internals/native-weak-map.js","webpack:///./node_modules/core-js/internals/object-assign.js","webpack:///./node_modules/core-js/internals/object-define-property.js","webpack:///./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack:///./node_modules/core-js/internals/object-get-own-property-names.js","webpack:///./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack:///./node_modules/core-js/internals/object-keys-internal.js","webpack:///./node_modules/core-js/internals/object-keys.js","webpack:///./node_modules/core-js/internals/object-property-is-enumerable.js","webpack:///./node_modules/core-js/internals/own-keys.js","webpack:///./node_modules/core-js/internals/path.js","webpack:///./node_modules/core-js/internals/redefine.js","webpack:///./node_modules/core-js/internals/require-object-coercible.js","webpack:///./node_modules/core-js/internals/set-global.js","webpack:///./node_modules/core-js/internals/shared-key.js","webpack:///./node_modules/core-js/internals/shared-store.js","webpack:///./node_modules/core-js/internals/shared.js","webpack:///./node_modules/core-js/internals/to-absolute-index.js","webpack:///./node_modules/core-js/internals/to-indexed-object.js","webpack:///./node_modules/core-js/internals/to-integer.js","webpack:///./node_modules/core-js/internals/to-length.js","webpack:///./node_modules/core-js/internals/to-object.js","webpack:///./node_modules/core-js/internals/to-primitive.js","webpack:///./node_modules/core-js/internals/to-string-tag-support.js","webpack:///./node_modules/core-js/internals/uid.js","webpack:///./node_modules/core-js/internals/use-symbol-as-uid.js","webpack:///./node_modules/core-js/internals/well-known-symbol.js","webpack:///./node_modules/core-js/modules/es.array.from.js","webpack:///./node_modules/core-js/modules/es.object.assign.js","webpack:///./node_modules/es6-promise-promise/index.js","webpack:///./node_modules/es6-promise/dist/es6-promise.js","webpack:///./node_modules/lodash.foreach/index.js","webpack:///./node_modules/micromodal/dist/micromodal.es.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///(webpack)/buildin/global.js","webpack:///vertx (ignored)","webpack:///external \"jQuery\""],"names":["DEFAULT_CONFIG","disableScroll","awaitOpenAnimation","awaitCloseAnimation","setup","options","config","MicroModal","init","open","modalId","show","close","paymentMethods","getBillingFieldsToggle","toggleBillingFields","addEventListener","e","target","checked","existingPaymentMethods","document","querySelectorAll","length","forEach","existingPaymentMethod","onPaymentSourceChange","currentPaymentMethod","querySelector","paymentMethodChangeEvent","createEvent","initEvent","dispatchEvent","getElementById","isVisible","updateAddressWrapperEl","billingFieldWrappers","getNextSiblings","billingAddressPreview","wrap","style","display","paymentSource","isNew","value","newCardForm","billingAddressToggle","$","removeClass","closest","addClass","addressFieldMap","card_address","card_address_2","card_city","card_state","card_zip","billing_country","addressEl","hasOwnProperty","addressField","selected","window","EDD_Checkout","recalculate_taxes","addressString","billingDetailsEl","id","billingDetails","dataset","push","required","changeEvent","ajaxSuccess","event","xhr","data","includes","responseText","stateField","address_state","innerText","join","brand","last4","innerHTML","eddStripe","Stripe","edd_stripe_vars","publishable_key","_plugin","domReady","apiRequest","generateNotice","mountCardElement","createElementsPaymentForm","getBillingDetails","getPaymentMethod","confirmIntent","handleIntent","retrieveIntent","setupCheckout","setupProfile","setupPaymentHistory","setupBuyNow","setupDownloadPRB","setupCheckoutPRB","error","alert","message","addToCart","downloadId","priceId","quantity","nonce","addToCartForm","download_id","price_id","post_data","jQuery","serialize","emptyCart","buyNowModal","args","modalContent","modalLoading","Modal","onShow","then","checkout","totalEl","total","parseFloat","paymentForm","fail","onClose","el","classList","contains","currentTarget","preventDefault","stopImmediatePropagation","priceIdEl","quantityEl","body","on","submitButtonEl","completePurchase","i18n","amountEl","totalCurrency","setTimeout","edd_scripts","is_checkout","singleGateway","gateway","elements","off","onSubmit","watchInitialValidation","onSubmitDelay","formData","cardElement","paymentMethod","processForm","exists","initialIntent","intent","refreshedNonce","val","form_data","handledIntent","createPayment","captureIntent","finalIntent","status","cancellation_reason","completePayment","location","replace","successPageUri","failurePageUri","handleException","enableForm","paymentMethodId","paymentMethodExists","payment_method_id","payment_method_exists","trim","trigger","edd_global_vars","complete_purchase","remove","hide","attr","code","errorMessages","elementsOptions","generic_error","localizedMessage","notice","checkout_error_anchor","before","console","onAuthorizePayment","setPaymentMethod","form","input","disableForm","paymentIntent","payment_method","completeAuthorization","authorization","payment","reload","intentId","intent_id","submit","loading","disabled","container","appendChild","IS_PRB_GATEWAY","hideAndSwitchGateways","gatewayRadioEl","gateways","nextGateway","nextGatewayInput","add","edd_load_gateway","onClick","errorContainer","checkout_agree_to_terms","checkout_agree_to_privacy","termsEl","outputNotice","errorMessage","clearNotice","privacyEl","onChange","paymentRequest","checkoutForm","displayItems","paymentRequestData","update","errorContainerReplace","onPaymentMethodError","complete","spinner","parentNode","removeChild","onPaymentMethod","payerEmail","payerName","createElement","className","email","name","context","clientSecret","client_secret","intentType","object","confirmFunc","handleActions","updatedIntent","catch","onApplyDiscount","total_plain","bindEvents","$body","mount","element","parseDataset","requestPayerName","prButton","create","wrapper","canMakePayment","result","applePay","isTestMode","prbEl","getDownloadData","purchaseLink","downloadIdEl","onChangeCustomPrice","addToCartEl","price","isZeroDecimal","is_zero_decimal","amount","map","label","removeAttr","observeAddToCartChanges","observer","MutationObserver","mutations","type","attributeName","observe","attributes","priceOptionsEls","priceOption","requestPayerEmail","Object","entries","key","parsedValue","JSON","parse","paymentMethodActions","onToggleForm","onAddPaymentMethod","formFields","isFormVisible","cancelButton","submitEvent","hasValidInputs","triggerBrowserValidation","createPaymentMethod","addPaymentMethod","handleNotice","done","response","billingForm","billing_details","insertBefore","updateButton","onToggleUpdateForm","onUpdatePaymentMethod","deleteButton","onDeletePaymentMethod","setDefaultButton","onSetDefaultPaymentMethod","paymentMethodAction","action","source","cardActionsEl","updateFields","fieldName","field","fieldValueOrNull","submitButton","linkText","item","DEFAULT_ELEMENTS","DEFAULT_SPLIT_ELEMENTS","ELEMENTS_OPTIONS","createPaymentForm","elementsInstance","mountedEl","elementsSplitFields","selector","createAndMountElement","generateElementStyles","cardNameEl","inputStyles","getComputedStyle","styleTag","getPropertyValue","dir","base","color","fontFamily","fontSize","fontWeight","fontSmoothing","undefined","hidePostalCode","stripeElement","handleElementError","handleCardBrandIcon","toMount","splitFields","newCardContainer","errorsContainer","elementType","cardTypeEl","billingDetailsForm","selectedPaymentMethod","Promise","resolve","address","line1","line2","city","state","postal_code","country","retrieve","_parent","intent_type","confirm","capture","handle","confirmedIntent","next_action","cardHandler","confirmation_method","setupIntent","dataType","xhrFields","withCredentials","url","ajaxurl","deferred","Deferred","jqXHR","ajax","success","rejectWith","arguments","promise","abort","callback","siblings","sibling","nextElementSibling","nodeType","plainInputsValid","checkValidity","click","clear","errorType","$errorContainer","html","Element","prototype","matches","msMatchesSelector","webkitMatchesSelector","s","call","parentElement","String","search","start","indexOf","obj","ownProps","keys","i","resArray","Array","arr","defineProperty","configurable","enumerable","writable","CharacterData","DocumentType"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QAC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AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iFAAiF;;AAEjF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;;AAEhD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,mBAAC,CAAC,cAAO;AACzB;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC,yCAAyC,UAAc;AACxD;AACA,CAAC;AACD;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,UAAU,IAAI;AACd;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,wBAAwB;AACzC;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,uCAAuC;AACxD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA,UAAU,MAAM;AAChB,UAAU,OAAO;AACjB;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,UAAU,MAAM;AAChB;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA,UAAU,IAAI;AACd;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;AACA,UAAU,SAAS;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,YAAY,SAAS;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;AACD,oC;;;;;;;;;;;;ACjoCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,SAAS;AACpB,aAAa,aAAa;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,SAAS;AACpB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA,6BAA6B,kBAAkB,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,EAAE;AACf;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;ACpjBA;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;;AAEjD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER,+FAA+F;;AAE/F;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB,gBAAgB;AAChB;;;AAGA;AACA;AACA;AACA;;AAEA,+EAA+E,aAAa;AAC5F;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,gDAAgD;;AAEhD;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,yDAAyD;;AAEzD,yDAAyD;AACzD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA,sDAAsD;;AAEtD,gDAAgD;AAChD;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,EAAE;;AAEX;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB,cAAc,OAAO;AACrB,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc;AACd;;;AAGA;AACA;AACA,kHAAkH,eAAe,kBAAkB;AACnJ,4DAA4D,eAAe,kBAAkB;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB,cAAc;AACd;;;AAGA;AACA;AACA,sHAAsH,eAAe,kBAAkB;AACvJ,4DAA4D,eAAe,kBAAkB;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB,cAAc,MAAM;AACpB,cAAc;AACd;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA,kCAAkC;AAClC;AACA,KAAK,UAAU;;AAEf,uGAAuG;;;AAGvG,uEAAuE;;AAEvE,2FAA2F;;AAE3F;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc;AACd;;;AAGA;AACA;AACA,sCAAsC;;AAEtC,2FAA2F;;AAE3F,wDAAwD;;AAExD,qCAAqC;;AAErC;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc;AACd;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEe,yEAAU,EAAC;;;;;;;;;;;;ACxb1B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AACb,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,KAAK;AACL,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;;AAEA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,cAAc;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;AACnD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,8CAA8C,QAAQ;AACtD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA,WAAW;AACX;AACA;AACA;;AAEA,WAAW;AACX;AACA;AACA;;AAEA,WAAW;AACX;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,KAAK;;AAEL;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;AACD;AACA;AACA;AACA;AACA,EAAE,KAA0B,oBAAoB,SAAE;AAClD;;AAEA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3uBA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;;;;;ACnBA,e;;;;;;;;;;;ACAA,wB","file":"assets/js/build/app.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./assets/js/src/frontend/index.js\");\n","// extracted by mini-css-extract-plugin","export { default as Modal } from './modal';\nexport { paymentMethods } from './payment-methods';\n","/**\n * External dependencies\n */\n\n// Import Polyfills for MicroModal IE 11 support.\n// https://github.com/Ghosh/micromodal#ie-11-and-below\n// https://github.com/ghosh/Micromodal/issues/49#issuecomment-424213347\n// https://github.com/ghosh/Micromodal/issues/49#issuecomment-517916416\nimport 'core-js/modules/es.object.assign';\nimport 'core-js/modules/es.array.from';\n\nimport MicroModal from 'micromodal';\n\nconst DEFAULT_CONFIG = {\n\tdisableScroll: true,\n\tawaitOpenAnimation: true,\n\tawaitCloseAnimation: true,\n};\n\nfunction setup( options ) {\n\tconst config = {\n\t\t...DEFAULT_CONFIG,\n\t\t...options,\n\t};\n\n\tMicroModal.init( config );\n}\n\nfunction open( modalId, options ) {\n\tconst config = {\n\t\t...DEFAULT_CONFIG,\n\t\t...options,\n\t};\n\n\tMicroModal.show( modalId, config );\n}\n\nfunction close( modalId ) {\n\tMicroModal.close( modalId );\n}\n\nexport default {\n\tsetup,\n\topen,\n\tclose,\n};\n","/* global $ */\n\n/**\n * Internal dependencies.\n */\nimport { forEach, getNextSiblings } from 'utils'; // eslint-disable-line @wordpress/dependency-group\n\n/**\n *\n */\nexport function paymentMethods() {\n\t// Toggle only shows if using Full Address (for some reason).\n\tif ( getBillingFieldsToggle() ) {\n\t\t// Hide fields initially.\n\t\ttoggleBillingFields( false );\n\n\t\t/**\n\t\t * Binds change event to \"Update billing address\" toggle to show/hide address fields.\n\t\t *\n\t\t * @param {Event} e Change event.\n\t\t */\n\t\tgetBillingFieldsToggle().addEventListener( 'change', function( e ) {\n\t\t\treturn toggleBillingFields( e.target.checked );\n\t\t} );\n\t}\n\n\t// Payment method toggles.\n\tconst existingPaymentMethods = document.querySelectorAll( '.edd-stripe-existing-card' );\n\n\tif ( 0 !== existingPaymentMethods.length ) {\n\t\tforEach( existingPaymentMethods, function( existingPaymentMethod ) {\n\t\t\t/**\n\t\t\t * Binds change event to credit card toggles.\n\t\t\t *\n\t\t\t * @param {Event} e Change event.\n\t\t\t */\n\t\t\treturn existingPaymentMethod.addEventListener( 'change', function( e ) {\n\t\t\t\treturn onPaymentSourceChange( e.target );\n\t\t\t} );\n\t\t} );\n\n\t\t// Simulate change of payment method to populate current fields.\n\t\tlet currentPaymentMethod = document.querySelector( '.edd-stripe-existing-card:checked' );\n\n\t\tif ( ! currentPaymentMethod ) {\n\t\t\tcurrentPaymentMethod = document.querySelector( '.edd-stripe-existing-card:first-of-type' );\n\t\t\tcurrentPaymentMethod.checked = true;\n\t\t}\n\n\t\tconst paymentMethodChangeEvent = document.createEvent( 'Event' );\n\t\tpaymentMethodChangeEvent.initEvent( 'change', true, false );\n\t\tcurrentPaymentMethod.dispatchEvent( paymentMethodChangeEvent );\n\t}\n}\n\n/**\n * Determines if the billing fields can be toggled.\n *\n * @return {Bool} True if the toggle exists.\n */\nfunction getBillingFieldsToggle() {\n\treturn document.getElementById( 'edd-stripe-update-billing-address' );\n}\n\n/**\n * Toggles billing fields visiblity.\n *\n * Assumes the toggle control is the first item in the \"Billing Details\" fieldset.\n *\n * @param {Bool} isVisible Billing item visibility.\n */\nfunction toggleBillingFields( isVisible ) {\n\tconst updateAddressWrapperEl = document.querySelector( '.edd-stripe-update-billing-address-wrapper' );\n\n\tif ( ! updateAddressWrapperEl ) {\n\t\treturn;\n\t}\n\n\t// Find all elements after the toggle.\n\tconst billingFieldWrappers = getNextSiblings( updateAddressWrapperEl );\n\tconst billingAddressPreview = document.querySelector( '.edd-stripe-update-billing-address-current' );\n\n\tbillingFieldWrappers.forEach( function( wrap ) {\n\t\twrap.style.display = isVisible ? 'block' : 'none';\n\t} );\n\n\t// Hide address preview.\n\tif ( billingAddressPreview ) {\n\t\tbillingAddressPreview.style.display = isVisible ? 'none' : 'block';\n\t}\n}\n\n/**\n * Manages UI state when the payment source changes.\n *\n * @param {HTMLElement} paymentSource Selected payment source. (Radio element with data).\n */\nfunction onPaymentSourceChange( paymentSource ) {\n\tconst isNew = 'new' === paymentSource.value;\n\tconst newCardForm = document.querySelector( '.edd-stripe-new-card' );\n\tconst billingAddressToggle = document.querySelector( '.edd-stripe-update-billing-address-wrapper' );\n\n\t// Toggle card details field.\n\tnewCardForm.style.display = isNew ? 'block' : 'none';\n\n\tif ( billingAddressToggle ) {\n\t\tbillingAddressToggle.style.display = isNew ? 'none' : 'block';\n\t}\n\n\t// @todo don't be lazy.\n\t$( '.edd-stripe-card-radio-item' ).removeClass( 'selected' );\n\t$( paymentSource ).closest( '.edd-stripe-card-radio-item' ).addClass( 'selected' );\n\n\tconst addressFieldMap = {\n\t\tcard_address: 'address_line1',\n\t\tcard_address_2: 'address_line2',\n\t\tcard_city: 'address_city',\n\t\tcard_state: 'address_state',\n\t\tcard_zip: 'address_zip',\n\t\tbilling_country: 'address_country',\n\t};\n\n\t// New card is being used, show fields and reset them.\n\tif ( isNew ) {\n\t\t// Reset all fields.\n\t\tfor ( const addressEl in addressFieldMap ) {\n\t\t\tif ( ! addressFieldMap.hasOwnProperty( addressEl ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst addressField = document.getElementById( addressEl );\n\n\t\t\tif ( addressField ) {\n\t\t\t\taddressField.value = '';\n\t\t\t\taddressField.selected = '';\n\t\t\t}\n\t\t}\n\n\t\t// Recalculate taxes.\n\t\tif ( window.EDD_Checkout.recalculate_taxes ) {\n\t\t\twindow.EDD_Checkout.recalculate_taxes();\n\t\t}\n\n\t\t// Show billing fields.\n\t\ttoggleBillingFields( true );\n\n\t\t// Existing card is being used.\n\t\t// Ensure the billing fields are hidden, and update their values with saved information.\n\t} else {\n\t\tconst addressString = [];\n\t\tconst billingDetailsEl = document.getElementById( paymentSource.id + '-billing-details' );\n\n\t\tif ( ! billingDetailsEl ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Hide billing fields.\n\t\ttoggleBillingFields( false );\n\n\t\t// Uncheck \"Update billing address\"\n\t\tif ( getBillingFieldsToggle() ) {\n\t\t\tgetBillingFieldsToggle().checked = false;\n\t\t}\n\n\t\t// Update billing address fields with saved card values.\n\t\tconst billingDetails = billingDetailsEl.dataset;\n\n\t\tfor ( const addressEl in addressFieldMap ) {\n\t\t\tif ( ! addressFieldMap.hasOwnProperty( addressEl ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst addressField = document.getElementById( addressEl );\n\n\t\t\tif ( ! addressField ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst value = billingDetails[ addressFieldMap[ addressEl ] ];\n\n\t\t\t// Set field value.\n\t\t\taddressField.value = value;\n\n\t\t\t// Generate an address string from values.\n\t\t\tif ( '' !== value ) {\n\t\t\t\taddressString.push( value );\n\t\t\t}\n\n\t\t\t// This field is required but does not have a saved value, show all fields.\n\t\t\tif ( addressField.required && '' === value ) {\n\t\t\t\t// @todo DRY up some of this DOM usage.\n\t\t\t\ttoggleBillingFields( true );\n\n\t\t\t\tif ( getBillingFieldsToggle() ) {\n\t\t\t\t\tgetBillingFieldsToggle().checked = true;\n\t\t\t\t}\n\n\t\t\t\tif ( billingAddressToggle ) {\n\t\t\t\t\tbillingAddressToggle.style.display = 'none';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Trigger change event when the Country field is updated.\n\t\t\tif ( 'billing_country' === addressEl ) {\n\t\t\t\tconst changeEvent = document.createEvent( 'Event' );\n\t\t\t\tchangeEvent.initEvent( 'change', true, true );\n\t\t\t\taddressField.dispatchEvent( changeEvent );\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Monitor AJAX requests for address changes.\n\t\t *\n\t\t * Wait for the \"State\" field to be updated based on the \"Country\" field's\n\t\t * change event. Once there is an AJAX response fill the \"State\" field with the\n\t\t * saved card's State data and recalculate taxes.\n\t\t *\n\t\t * @since 2.7\n\t\t *\n\t\t * @param {Object} event\n\t\t * @param {Object} xhr\n\t\t * @param {Object} options\n\t\t */\n\t\t$( document ).ajaxSuccess( function( event, xhr, options ) {\n\t\t\tif ( ! options || ! options.data || ! xhr ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\toptions.data.includes( 'action=edd_get_shop_states' ) &&\n\t\t\t\toptions.data.includes( 'field_name=card_state' ) &&\n\t\t\t\t( xhr.responseText && xhr.responseText.includes( 'card_state' ) )\n\t\t\t) {\n\t\t\t\tconst stateField = document.getElementById( 'card_state' );\n\n\t\t\t\tif ( stateField ) {\n\t\t\t\t\tstateField.value = billingDetails.address_state;\n\n\t\t\t\t\t// Recalculate taxes.\n\t\t\t\t\tif ( window.EDD_Checkout.recalculate_taxes ) {\n\t\t\t\t\t\twindow.EDD_Checkout.recalculate_taxes( stateField.value );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Update address string summary.\n\t\tconst billingAddressPreview = document.querySelector( '.edd-stripe-update-billing-address-current' );\n\n\t\tif ( billingAddressPreview ) {\n\t\t\tbillingAddressPreview.innerText = addressString.join( ', ' );\n\n\t\t\tconst { brand, last4 } = billingDetails;\n\n\t\t\tdocument.querySelector( '.edd-stripe-update-billing-address-brand' ).innerHTML = brand;\n\t\t\tdocument.querySelector( '.edd-stripe-update-billing-address-last4' ).innerHTML = last4;\n\t\t}\n\t}\n}\n","/* global Stripe, edd_stripe_vars */\n\n/**\n * Internal dependencies\n */\nimport './../../../css/src/frontend.scss';\nimport { domReady, apiRequest, generateNotice } from 'utils';\n\nimport {\n\tsetupCheckout,\n\tsetupProfile,\n\tsetupPaymentHistory,\n\tsetupBuyNow,\n\tsetupDownloadPRB,\n\tsetupCheckoutPRB,\n} from 'frontend/payment-forms';\n\nimport {\n\tpaymentMethods,\n} from 'frontend/components/payment-methods';\n\nimport {\n\tmountCardElement,\n\tcreatePaymentForm as createElementsPaymentForm,\n\tgetBillingDetails,\n\tgetPaymentMethod,\n\tconfirm as confirmIntent,\n\thandle as handleIntent,\n\tretrieve as retrieveIntent,\n} from 'frontend/stripe-elements';\n// eslint-enable @wordpress/dependency-group\n\n( () => {\n\ttry {\n\t\twindow.eddStripe = new Stripe( edd_stripe_vars.publishable_key );\n\n\t\t// Alias some functionality for external plugins.\n\t\twindow.eddStripe._plugin = {\n\t\t\tdomReady,\n\t\t\tapiRequest,\n\t\t\tgenerateNotice,\n\t\t\tmountCardElement,\n\t\t\tcreateElementsPaymentForm,\n\t\t\tgetBillingDetails,\n\t\t\tgetPaymentMethod,\n\t\t\tconfirmIntent,\n\t\t\thandleIntent,\n\t\t\tretrieveIntent,\n\t\t\tpaymentMethods,\n\t\t};\n\n\t\t// Setup frontend components when DOM is ready.\n\t\tdomReady(\n\t\t\tsetupCheckout,\n\t\t\tsetupProfile,\n\t\t\tsetupPaymentHistory,\n\t\t\tsetupBuyNow,\n\t\t\tsetupDownloadPRB,\n\t\t\tsetupCheckoutPRB,\n\t\t);\n\t} catch ( error ) {\n\t\talert( error.message );\n\t}\n} )();\n","/* global jQuery, edd_scripts, edd_stripe_vars */\n\n/**\n * Internal dependencies\n */\nimport { forEach, domReady, apiRequest } from 'utils';\nimport { Modal, paymentMethods } from 'frontend/components';\nimport { paymentForm } from 'frontend/payment-forms/checkout'\n\n/**\n * Adds a Download to the Cart.\n *\n * @param {number} downloadId Download ID.\n * @param {number} priceId Download Price ID.\n * @param {number} quantity Download quantity.\n * @param {string} nonce Nonce token.\n * @param {HTMLElement} addToCartForm Add to cart form.\n *\n * @return {Promise}\n */\nfunction addToCart( downloadId, priceId, quantity, nonce, addToCartForm ) {\n\tconst data = {\n\t\tdownload_id: downloadId,\n\t\tprice_id: priceId,\n\t\tquantity: quantity,\n\t\tnonce,\n\t\tpost_data: jQuery( addToCartForm ).serialize(),\n\t};\n\n\treturn apiRequest( 'edds_add_to_cart', data );\n}\n\n/**\n * Empties the Cart.\n *\n * @return {Promise}\n */\nfunction emptyCart() {\n\treturn apiRequest( 'edds_empty_cart' );\n}\n\n/**\n * Displays the Buy Now modal.\n *\n * @param {Object} args\n * @param {number} args.downloadId Download ID.\n * @param {number} args.priceId Download Price ID.\n * @param {number} args.quantity Download quantity.\n * @param {string} args.nonce Nonce token.\n * @param {HTMLElement} args.addToCartForm Add to cart form.\n */\nfunction buyNowModal( args ) {\n\tconst modalContent = document.querySelector( '#edds-buy-now-modal-content' );\n\tconst modalLoading = '<span class=\"edd-loading-ajax edd-loading\"></span>';\n\n\t// Show modal.\n\tModal.open( 'edds-buy-now', {\n\t\t/**\n\t\t * Adds the item to the Cart when opening.\n\t\t */\n\t\tonShow() {\n\t\t\tmodalContent.innerHTML = modalLoading;\n\n\t\t\tconst {\n\t\t\t\tdownloadId,\n\t\t\t\tpriceId,\n\t\t\t\tquantity,\n\t\t\t\tnonce,\n\t\t\t\taddToCartForm,\n\t\t\t} = args;\n\n\t\t\taddToCart(\n\t\t\t\tdownloadId,\n\t\t\t\tpriceId,\n\t\t\t\tquantity,\n\t\t\t\tnonce,\n\t\t\t\taddToCartForm\n\t\t\t)\n\t\t\t\t.then( ( { checkout } ) => {\n\t\t\t\t\t// Show Checkout HTML.\n\t\t\t\t\tmodalContent.innerHTML = checkout;\n\n\t\t\t\t\t// Reinitialize core JS.\n\t\t\t\t\twindow.EDD_Checkout.init();\n\n\t\t\t\t\tconst totalEl = document.querySelector( '#edds-buy-now-modal-content .edd_cart_amount' );\n\t\t\t\t\tconst total = parseFloat( totalEl.dataset.total );\n\n\t\t\t\t\t// Reinitialize Stripe JS if a payment is required.\n\t\t\t\t\tif ( total > 0 ) {\n\t\t\t\t\t\tpaymentForm();\n\t\t\t\t\t\tpaymentMethods();\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t\t.fail( ( { message } ) => {\n\t\t\t\t\t// Show error message.\n\t\t\t\t\tdocument.querySelector( '#edds-buy-now-modal-content' ).innerHTML = message;\n\t\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Empties Cart on close.\n\t\t */\n\t\tonClose() {\n\t\t\temptyCart();\n\t\t}\n\t} );\n}\n\n// DOM ready.\nexport function setup() {\n\n\t// Find all \"Buy Now\" links on the page.\n\tforEach( document.querySelectorAll( '.edds-buy-now' ), ( el ) => {\n\n\t\t// Don't use modal if \"Free Downloads\" is active and available for this download.\n\t\t// https://easydigitaldownloads.com/downloads/free-downloads/\n\t\tif ( el.classList.contains( 'edd-free-download' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Launches \"Buy Now\" modal when clicking \"Buy Now\" link.\n\t\t *\n\t\t * @param {Object} e Click event.\n\t\t */\n\t\tel.addEventListener( 'click', ( e ) => {\n\t\t\tconst { downloadId, nonce } = e.currentTarget.dataset;\n\n\t\t\t// Stop other actions if a Download ID is found.\n\t\t\tif ( ! downloadId ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t\te.stopImmediatePropagation();\n\n\t\t\t// Gather Download information.\n\t\t\tlet priceId = 0;\n\t\t\tlet quantity = 1;\n\n\t\t\tconst addToCartForm = e.currentTarget.closest(\n\t\t\t\t'.edd_download_purchase_form'\n\t\t\t);\n\n\t\t\t// Price ID.\n\t\t\tconst priceIdEl = addToCartForm.querySelector(\n\t\t\t\t`.edd_price_option_${downloadId}:checked`\n\t\t\t);\n\n\t\t\tif ( priceIdEl ) {\n\t\t\t\tpriceId = priceIdEl.value;\n\t\t\t}\n\n\t\t\t// Quantity.\n\t\t\tconst quantityEl = addToCartForm.querySelector(\n\t\t\t\t'input[name=\"edd_download_quantity\"]'\n\t\t\t);\n\n\t\t\tif ( quantityEl ) {\n\t\t\t\tquantity = quantityEl.value;\n\t\t\t}\n\n\t\t\tbuyNowModal( {\n\t\t\t\tdownloadId,\n\t\t\t\tpriceId,\n\t\t\t\tquantity,\n\t\t\t\tnonce,\n\t\t\t\taddToCartForm\n\t\t\t} );\n\t\t} );\n\n\t} );\n\n\t/**\n\t * Replaces submit button text after validation errors.\n\t *\n\t * If there are no other items in the cart the core javascript will replace\n\t * the button text with the value for a $0 cart (usually \"Free Download\")\n\t * because the script variables were constructed when nothing was in the cart.\n\t */\n\tjQuery( document.body ).on( 'edd_checkout_error', () => {\n\t\tconst submitButtonEl = document.querySelector(\n\t\t\t'#edds-buy-now #edd-purchase-button'\n\t\t);\n\n\t\tif ( ! submitButtonEl ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { i18n: { completePurchase } } = edd_stripe_vars;\n\n\t\tconst amountEl = document.querySelector( '.edd_cart_amount' );\n\t\tconst { total, totalCurrency } = amountEl.dataset;\n\n\t\tif ( '0' === total ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// For some reason a delay is needed to override the value set by\n\t\t// https://github.com/easydigitaldownloads/easy-digital-downloads/blob/master/assets/js/edd-ajax.js#L414\n\t\tsetTimeout( () => {\n\t\t\tsubmitButtonEl.value = `${ totalCurrency } - ${ completePurchase }`;\n\t\t}, 10 );\n\t} );\n}\n","/* global $, edd_scripts */\n\n/**\n * Internal dependencies\n */\n// eslint-disable @wordpress/dependency-group\nimport { paymentMethods } from 'frontend/components';\n// eslint-enable @wordpress/dependency-group\n\nimport { paymentForm } from './payment-form.js';\n\nexport * from './payment-form.js';\n\nexport function setup() {\n\tif ( '1' !== edd_scripts.is_checkout ) {\n\t\treturn;\n\t}\n\n\t// Initial load for single gateway.\n\tconst singleGateway = document.querySelector( 'input[name=\"edd-gateway\"]' );\n\n\tif ( singleGateway && 'stripe' === singleGateway.value ) {\n\t\tpaymentForm();\n\t\tpaymentMethods();\n\t}\n\n\t// Gateway switch.\n\t$( document.body ).on( 'edd_gateway_loaded', ( e, gateway ) => {\n\t\tif ( 'stripe' !== gateway ) {\n\t\t\treturn;\n\t\t}\n\n\t\tpaymentForm();\n\t\tpaymentMethods();\n\t} );\n}\n","/* global $, edd_stripe_vars, edd_global_vars */\n\n/**\n * Internal dependencies\n */\nimport {\n\tcreatePaymentForm as createElementsPaymentForm,\n\tgetPaymentMethod,\n\tcapture as captureIntent,\n\thandle as handleIntent,\n} from 'frontend/stripe-elements'; // eslint-disable-line @wordpress/dependency-group\n\nimport { apiRequest, generateNotice } from 'utils'; // eslint-disable-line @wordpress/dependency-group\n\n/**\n * Binds Payment submission functionality.\n *\n * Resets before rebinding to avoid duplicate events\n * during gateway switching.\n */\nexport function paymentForm() {\n\t// Mount Elements.\n\tcreateElementsPaymentForm( window.eddStripe.elements() );\n\n\t// Bind form submission.\n\t// Needs to be jQuery since that is what core submits against.\n\t$( '#edd_purchase_form' ).off( 'submit', onSubmit );\n\t$( '#edd_purchase_form' ).on( 'submit', onSubmit );\n\n\t// SUPER ghetto way to watch for core form validation because no events are in place.\n\t// Called after the purchase form is submitted (via `click` or `submit`)\n\t$( document ).off( 'ajaxSuccess', watchInitialValidation );\n\t$( document ).on( 'ajaxSuccess', watchInitialValidation );\n}\n\n/**\n * Processes Stripe gateway-specific functionality after core AJAX validation has run.\n */\nasync function onSubmitDelay() {\n\ttry {\n\t\t// Form data to send to intent requests.\n\t\tlet formData = $( '#edd_purchase_form' ).serialize();\n\n\t\t// Retrieve or create a PaymentMethod.\n\t\tconst paymentMethod = await getPaymentMethod( document.getElementById( 'edd_purchase_form' ), window.eddStripe.cardElement );\n\n\t\t// Run the modified `_edds_process_purchase_form` and create an Intent.\n\t\tconst {\n\t\t\tintent: initialIntent,\n\t\t\tnonce: refreshedNonce\n\t\t} = await processForm( paymentMethod.id, paymentMethod.exists );\n\n\t\t// Update existing nonce value in DOM form data in case data is retrieved\n\t\t// again directly from the DOM.\n\t\t$( '#edd-process-checkout-nonce' ).val( refreshedNonce );\n\n\t\t// Handle any actions required by the Intent State Machine (3D Secure, etc).\n\t\tconst handledIntent = await handleIntent(\n\t\t\tinitialIntent,\n\t\t\t{\n\t\t\t\tform_data: formData += `&edd-process-checkout-nonce=${ refreshedNonce }`,\n\t\t\t}\n\t\t);\n\n\t\t// Create an EDD payment record.\n\t\tconst { intent, nonce } = await createPayment( handledIntent );\n\n\t\t// Capture any unpcaptured intents.\n\t\tconst finalIntent = await captureIntent(\n\t\t\tintent,\n\t\t\t{},\n\t\t\tnonce\n\t\t);\n\n\t\t// Attempt to transition payment status and redirect.\n\t\t// @todo Maybe confirm payment status as well? Would need to generate a custom\n\t\t// response because the private EDD_Payment properties are not available.\n\t\tif (\n\t\t\t( 'succeeded' === finalIntent.status ) ||\n\t\t\t( 'canceled' === finalIntent.status && 'abandoned' === finalIntent.cancellation_reason )\n\t\t) {\n\t\t\tawait completePayment( finalIntent, nonce );\n\n\t\t\twindow.location.replace( edd_stripe_vars.successPageUri );\n\t\t} else {\n\t\t\twindow.location.replace( edd_stripe_vars.failurePageUri );\n\t\t}\n\t} catch ( error ) {\n\t\thandleException( error );\n\t\tenableForm();\n\t}\n}\n\n/**\n * Processes the purchase form.\n *\n * Generates purchase data for the current session and\n * uses the PaymentMethod to generate an Intent based on data.\n *\n * @param {string} paymentMethodId PaymentMethod ID.\n * @param {Bool} paymentMethodExists If the PaymentMethod has already been attached to a customer.\n * @return {Promise} jQuery Promise.\n */\nexport function processForm( paymentMethodId, paymentMethodExists ) {\n\treturn apiRequest( 'edds_process_purchase_form', {\n\t\t// Send available form data.\n\t\tform_data: $( '#edd_purchase_form' ).serialize(),\n\t\tpayment_method_id: paymentMethodId,\n\t\tpayment_method_exists: paymentMethodExists,\n\t} );\n}\n\n/**\n * Complete a Payment in EDD.\n *\n * @param {object} intent Intent.\n * @return {Promise} jQuery Promise.\n */\nexport function createPayment( intent ) {\n\tconst paymentForm = $( '#edd_purchase_form' );\n\tlet formData = paymentForm.serialize();\n\n\t// Attempt to find the Checkout nonce directly.\n\tif ( paymentForm.length === 0 ) {\n\t\tconst nonce = $( '#edd-process-checkout-nonce' ).val();\n\t\tformData = `edd-process-checkout-nonce=${ nonce }`\n\t}\n\n\treturn apiRequest( 'edds_create_payment', {\n\t\tform_data: formData,\n\t\tintent,\n\t} );\n}\n\n/**\n * Complete a Payment in EDD.\n *\n * @param {object} intent Intent.\n * @param {string} refreshedNonce A refreshed nonce that might be needed if the\n * user logged in.\n * @return {Promise} jQuery Promise.\n */\nexport function completePayment( intent, refreshedNonce ) {\n\tconst paymentForm = $( '#edd_purchase_form' );\n\tlet formData = paymentForm.serialize();\n\n\t// Attempt to find the Checkout nonce directly.\n\tif ( paymentForm.length === 0 ) {\n\t\tconst nonce = $( '#edd-process-checkout-nonce' ).val();\n\t\tformData = `edd-process-checkout-nonce=${ nonce }`;\n\t}\n\n\t// Add the refreshed nonce if available.\n\tif ( refreshedNonce ) {\n\t\tformData += `&edd-process-checkout-nonce=${ refreshedNonce }`;\n\t}\n\n\treturn apiRequest( 'edds_complete_payment', {\n\t\tform_data: formData,\n\t\tintent,\n\t} );\n}\n\n\n/**\n * Listen for initial EDD core validation.\n *\n * @param {Object} event Event.\n * @param {Object} xhr AJAX request.\n * @param {Object} options Request options.\n */\nfunction watchInitialValidation( event, xhr, options ) {\n\tif ( ! options || ! options.data || ! xhr ) {\n\t\treturn;\n\t}\n\n\tif (\n\t\toptions.data.includes( 'action=edd_process_checkout' ) &&\n\t\toptions.data.includes( 'edd-gateway=stripe' ) &&\n\t\t( xhr.responseText && 'success' === xhr.responseText.trim() )\n\t) {\n\t\treturn onSubmitDelay();\n\t}\n};\n\n/**\n * EDD core listens to a a `click` event on the Checkout form submit button.\n *\n * This submit event handler captures true submissions and triggers a `click`\n * event so EDD core can take over as normoal.\n *\n * @param {Object} event submit Event.\n */\nfunction onSubmit( event ) {\n\t// Ensure we are dealing with the Stripe gateway.\n\tif ( ! (\n\t\t// Stripe is selected gateway and total is larger than 0.\n\t\t$( 'input[name=\"edd-gateway\"]' ).val() === 'stripe'\t&&\n\t\t$( '.edd_cart_total .edd_cart_amount' ).data( 'total' ) > 0\n\t) ) {\n\t\treturn;\n\t}\n\n\t// While this function is tied to the submit event, block submission.\n\tevent.preventDefault();\n\n\t// Simulate a mouse click on the Submit button.\n\t//\n\t// If the form is submitted via the \"Enter\" key we need to ensure the core\n\t// validation is run.\n\t//\n\t// When that is run and then the form is resubmitted\n\t// the click event won't do anything because the button will be disabled.\n\t$( '#edd_purchase_form #edd_purchase_submit [type=submit]' ).trigger( 'click' );\n}\n\n/**\n * Enables the Checkout form for further submissions.\n */\nfunction enableForm() {\n\t// Update button text.\n\tdocument.querySelector( '#edd_purchase_form #edd_purchase_submit [type=submit]' ).value = edd_global_vars.complete_purchase;\n\n\t// Enable form.\n\t$( '.edd-loading-ajax' ).remove();\n\t$( '.edd_errors' ).remove();\n\t$( '.edd-error' ).hide();\n\t$( '#edd-purchase-button' ).attr( 'disabled', false );\n}\n\n/**\n * Handles error output for stripe.js promises, or jQuery AJAX promises.\n *\n * @link https://github.com/easydigitaldownloads/easy-digital-downloads/blob/master/assets/js/edd-ajax.js#L390\n *\n * @param {Object} error Error data.\n */\nfunction handleException( error ) {\n\tlet { code, message } = error;\n\tconst { elementsOptions: { i18n: { errorMessages } } } = window.edd_stripe_vars;\n\n\tif ( ! message ) {\n\t\tmessage = edd_stripe_vars.generic_error;\n\t}\n\n\tconst localizedMessage = code && errorMessages[code] ? errorMessages[code] : message;\n\n\tconst notice = generateNotice( localizedMessage );\n\n\t// Hide previous messages.\n\t// @todo These should all be in a container, but that's not how core works.\n\t$( '.edd-stripe-alert' ).remove();\n\t$( edd_global_vars.checkout_error_anchor ).before( notice );\n\t$( document.body ).trigger( 'edd_checkout_error', [ error ] );\n\n\tif ( window.console && error.responseText ) {\n\t\twindow.console.error( error.responseText );\n\t}\n}\n","export { setup as setupCheckout, createPayment, completePayment } from './checkout';\nexport { setup as setupProfile } from './profile-editor';\nexport { setup as setupPaymentHistory } from './payment-receipt';\nexport { setup as setupBuyNow } from './buy-now';\nexport {\n\tsetupDownload as setupDownloadPRB,\n\tsetupCheckout as setupCheckoutPRB,\n} from './payment-request';\n","/**\n * Internal dependencies\n */\n// eslint-disable @wordpress/dependency-group\nimport { paymentMethods } from 'frontend/components/payment-methods';\n// eslint-enable @wordpress/dependency-group\n\nimport { paymentForm } from './payment-form.js';\n\nexport function setup() {\n\tif ( ! document.getElementById( 'edds-update-payment-method' ) ) {\n\t\treturn;\n\t}\n\n\tpaymentForm();\n\tpaymentMethods();\n}\n","/* global edd_stripe_vars */\n\n/**\n * Internal dependencies\n */\n// eslint-disable @wordpress/dependency-group\nimport {\n\tgetPaymentMethod,\n\tcreatePaymentForm as createElementsPaymentForm,\n\thandle as handleIntent,\n\tretrieve as retrieveIntent,\n} from 'frontend/stripe-elements';\n\nimport { generateNotice, apiRequest } from 'utils';\n// eslint-enable @wordpress/dependency-group\n\n/**\n * Binds events and sets up \"Update Payment Method\" form.\n */\nexport function paymentForm() {\n\t// Mount Elements.\n\tcreateElementsPaymentForm( window.eddStripe.elements() );\n\n\tdocument.getElementById( 'edds-update-payment-method' ).addEventListener( 'submit', onAuthorizePayment );\n}\n\n/**\n * Setup PaymentMethods.\n *\n * Moves the active item to the currently authenticating PaymentMethod.\n */\nfunction setPaymentMethod() {\n\tconst form = document.getElementById( 'edds-update-payment-method' );\n\tconst input = document.getElementById( form.dataset.paymentMethod );\n\n\t// Select the correct PaymentMethod after load.\n\tif ( input ) {\n\t\tconst changeEvent = document.createEvent( 'Event' );\n\n\t\tchangeEvent.initEvent( 'change', true, true );\n\t\tinput.checked = true;\n\t\tinput.dispatchEvent( changeEvent );\n\t}\n}\n\n/**\n * Authorize a PaymentIntent.\n *\n * @param {Event} e submtit event.\n */\nasync function onAuthorizePayment( e ) {\n\te.preventDefault();\n\n\tconst form = document.getElementById( 'edds-update-payment-method' );\n\n\tdisableForm();\n\n\ttry {\n\t\tconst paymentMethod = await getPaymentMethod( form, window.eddStripe.cardElement );\n\n\t\t// Handle PaymentIntent.\n\t\tconst intent = await retrieveIntent( form.dataset.paymentIntent, 'payment_method' );\n\n\t\tconst handledIntent = await handleIntent( intent, {\n\t\t\tpayment_method: paymentMethod.id,\n\t\t} );\n\n\t\t// Attempt to transition payment status and redirect.\n\t\tconst authorization = await completeAuthorization( handledIntent.id );\n\n\t\tif ( authorization.payment ) {\n\t\t\twindow.location.reload();\n\t\t} else {\n\t\t\tthrow authorization;\n\t\t}\n\t} catch ( error ) {\n\t\thandleException( error );\n\t\tenableForm();\n\t}\n}\n\n/**\n * Complete a Payment after the Intent has been authorized.\n *\n * @param {string} intentId Intent ID.\n * @return {Promise} jQuery Promise.\n */\nexport function completeAuthorization( intentId ) {\n\treturn apiRequest( 'edds_complete_payment_authorization', {\n\t\tintent_id: intentId,\n\t\t'edds-complete-payment-authorization': document.getElementById(\n\t\t\t'edds-complete-payment-authorization'\n\t\t).value\n\t} );\n}\n\n/**\n * Disables \"Add New\" form.\n */\nfunction disableForm() {\n\tconst submit = document.getElementById( 'edds-update-payment-method-submit' );\n\n\tsubmit.value = submit.dataset.loading;\n\tsubmit.disabled = true;\n}\n\n/**\n * Enables \"Add New\" form.\n */\nfunction enableForm() {\n\tconst submit = document.getElementById( 'edds-update-payment-method-submit' );\n\n\tsubmit.value = submit.dataset.submit;\n\tsubmit.disabled = false;\n}\n\n/**\n * Handles a notice (success or error) for authorizing a card.\n *\n * @param {Object} error Error with message to output.\n */\nexport function handleException( error ) {\n\t// Create the new notice.\n\tconst notice = generateNotice(\n\t\t( error && error.message ) ? error.message : edd_stripe_vars.generic_error,\n\t\t'error'\n\t);\n\n\tconst container = document.getElementById( 'edds-update-payment-method-errors' );\n\n\tcontainer.innerHTML = '';\n\tcontainer.appendChild( notice );\n}\n","/* global edd_scripts, jQuery */\n\n/**\n * Internal dependencies\n */\nimport { parseDataset } from './';\nimport { apiRequest, forEach, outputNotice, clearNotice } from 'utils';\nimport { handle as handleIntent } from 'frontend/stripe-elements';\nimport { createPayment, completePayment } from 'frontend/payment-forms';\n\nlet IS_PRB_GATEWAY;\n\n/**\n * Disables the \"Express Checkout\" payment gateway.\n * Switches to the next in the list.\n */\nfunction hideAndSwitchGateways() {\n\tIS_PRB_GATEWAY = false;\n\n\tconst gatewayRadioEl = document.getElementById( 'edd-gateway-option-stripe-prb' );\n\n\tif ( ! gatewayRadioEl ) {\n\t\treturn;\n\t}\n\n\t// Remove radio option.\n\tgatewayRadioEl.remove();\n\n\t// Recount available gateways and hide selector if needed.\n\tconst gateways = document.querySelectorAll( '.edd-gateway-option' );\n\tconst nextGateway = gateways[0];\n\tconst nextGatewayInput = nextGateway.querySelector( 'input' );\n\n\t// Toggle radio.\n\tnextGatewayInput.checked = true;\n\tnextGateway.classList.add( 'edd-gateway-option-selected' );\n\n\t// Load gateway.\n\tedd_load_gateway( nextGatewayInput.value );\n\n\t// Hide wrapper.\n\tif ( 1 === gateways.length ) {\n\t\tdocument.getElementById( 'edd_payment_mode_select_wrap' ).remove();\n\t}\n}\n\n/**\n * Handles the click event on the Payment Request Button.\n *\n * @param {Event} event Click event.\n */\nfunction onClick( event ) {\n\tconst errorContainer = document.getElementById( 'edds-prb-error-wrap' );\n\tconst {\n\t\tcheckout_agree_to_terms,\n\t\tcheckout_agree_to_privacy,\n\t} = edd_stripe_vars;\n\n\tconst termsEl = document.getElementById( 'edd_agree_to_terms' );\n\n\tif ( termsEl ) {\n\t\tif ( false === termsEl.checked ) {\n\t\t\tevent.preventDefault();\n\n\t\t\toutputNotice( {\n\t\t\t\terrorMessage: checkout_agree_to_terms,\n\t\t\t\terrorContainer, \n\t\t\t} );\n\t\t} else {\n\t\t\tclearNotice( errorContainer );\n\t\t}\n\t}\n\n\tconst privacyEl = document.getElementById( 'edd-agree-to-privacy-policy' );\n\n\tif ( privacyEl && false === privacyEl.checked ) {\n\t\tif ( false === privacyEl.checked ) {\n\t\t\tevent.preventDefault();\n\n\t\t\toutputNotice( {\n\t\t\t\terrorMessage: checkout_agree_to_privacy,\n\t\t\t\terrorContainer, \n\t\t\t} );\n\t\t} else {\n\t\t\tclearNotice( errorContainer );\n\t\t}\n\t}\n}\n\n/**\n * Handles changes to the purchase link form by updating the Payment Request object.\n *\n * @param {PaymentRequest} paymentRequest Payment Request object.\n * @param {HTMLElement} checkoutForm Checkout form.\n */\nasync function onChange( paymentRequest, checkoutForm ) {\n\ttry {\n\t\t// Calculate and gather price information.\n\t\tconst {\n\t\t\t'display-items': displayItems,\n\t\t\t...paymentRequestData\n\t\t} = await apiRequest( 'edds_prb_ajax_get_options' );\n\n\t\t// Update the Payment Request with server-side data.\n\t\tpaymentRequest.update( {\n\t\t\tdisplayItems,\n\t\t\t...paymentRequestData,\n\t\t} )\n\t} catch ( error ) {\n\t\toutputNotice( {\n\t\t\terrorMessage: '',\n\t\t\terrorContainer: document.getElementById( 'edds-prb-checkout' ), \n\t\t\terrorContainerReplace: false,\n\t\t} );\n\t}\n}\n\n/**\n * Handles Payment Method errors.\n *\n * @param {Object} event Payment Request event.\n * @param {Object} error Error.\n * @param {HTMLElement} purchaseLink Purchase link form.\n */\nfunction onPaymentMethodError( event, error, checkoutForm ) {\n\t// Complete the Payment Request to hide the payment sheet.\n\tevent.complete( 'success' );\n\n\t// Remove spinner.\n\tconst spinner = checkoutForm.querySelector( '.edds-prb-spinner' );\n\n\tif ( spinner ) {\n\t\tspinner.parentNode.removeChild( spinner );\n\t}\n\n\t// Release loading state.\n\tcheckoutForm.classList.remove( 'loading' );\n\n\t// Add notice.\n\toutputNotice( {\n\t\terrorMessage: error.message,\n\t\terrorContainer: document.getElementById( 'edds-prb-checkout' ), \n\t\terrorContainerReplace: false,\n\t} );\n}\n\n/**\n * Handles recieving a Payment Method from the Payment Request.\n *\n * Adds an item to the cart and processes the Checkout as if we are\n * in normal Checkout context.\n *\n * @param {PaymentRequest} paymentRequest Payment Request object.\n * @param {HTMLElement} checkoutForm Checkout form.\n * @param {Object} event paymentmethod event.\n */\nasync function onPaymentMethod( paymentRequest, checkoutForm, event ) {\n\ttry {\n\t\t// Retrieve information from the PRB event.\n\t\tconst { paymentMethod, payerEmail, payerName } = event;\n\n\t\t// Loading state. Block interaction.\n\t\tcheckoutForm.classList.add( 'loading' );\n\n\t\t// Create and append a spinner.\n\t\tconst spinner = document.createElement( 'span' );\n\t\t[ 'edd-loading-ajax', 'edd-loading', 'edds-prb-spinner' ].forEach(\n\t\t\t( className ) => spinner.classList.add( className )\n\t\t);\n\t\tcheckoutForm.appendChild( spinner );\n\n\t\tconst data = {\n\t\t\temail: payerEmail,\n\t\t\tname: payerName,\n\t\t\tpaymentMethod,\n\t\t\tcontext: 'checkout',\n\t\t};\n\t\t\t\n\t\t// Start the processing.\n\t\t//\n\t\t// Shims $_POST data to align with the standard Checkout context.\n\t\t//\n\t\t// This calls `_edds_process_purchase_form()` server-side which\n\t\t// creates and returns a PaymentIntent -- just like the first step\n\t\t// of a true Checkout.\n\t\tconst {\n\t\t\tintent,\n\t\t\tintent: {\n\t\t\t\tclient_secret: clientSecret,\n\t\t\t\tobject: intentType,\n\t\t\t},\n\t\t\tnonce: refreshedNonce,\n\t\t} = await apiRequest( 'edds_prb_ajax_process_checkout', {\n\t\t\tname: payerName,\n\t\t\tpaymentMethod,\n\t\t\tform_data: $( '#edd_purchase_form' ).serialize(),\n\t\t} );\n\n\t\t// Update existing nonce value in DOM form data in case data is retrieved\n\t\t// again directly from the DOM.\n\t\t$( '#edd-process-checkout-nonce' ).val( refreshedNonce );\n\n\t\t// Complete the Payment Request to hide the payment sheet.\n\t\tevent.complete( 'success' );\n\n\t\t// Confirm the card (SCA, etc).\n\t\tconst confirmFunc = 'setup_intent' === intentType\n\t\t\t? 'confirmCardSetup'\n\t\t\t: 'confirmCardPayment';\n\n\t\teddStripe[ confirmFunc ](\n\t\t\tclientSecret,\n\t\t\t{\n\t\t\t\tpayment_method: paymentMethod.id\n\t\t\t},\n\t\t\t{\n\t\t\t\thandleActions: false,\n\t\t\t}\n\t\t)\n\t\t\t.then( ( { error } ) => {\n\t\t\t\t// Something went wrong. Alert the Payment Request.\n\t\t\t\tif ( error ) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\n\t\t\t\t// Confirm again after the Payment Request dialog has been hidden.\n\t\t\t\t// For cards that do not require further checks this will throw a 400\n\t\t\t\t// error (in the Stripe API) and a log console error but not throw\n\t\t\t\t// an actual Exception. This can be ignored.\n\t\t\t\t//\n\t\t\t\t// https://github.com/stripe/stripe-payments-demo/issues/133#issuecomment-632593669\n\t\t\t\teddStripe[ confirmFunc ]( clientSecret )\n\t\t\t\t\t.then( async ( { error } ) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif ( error ) {\n\t\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Create an EDD Payment.\n\t\t\t\t\t\t\tconst { intent: updatedIntent, nonce } = await createPayment( intent );\n\n\t\t\t\t\t\t\t// Complete the EDD Payment with the updated PaymentIntent.\n\t\t\t\t\t\t\tawait completePayment( updatedIntent, nonce );\n\n\t\t\t\t\t\t\t// Redirect on completion.\n\t\t\t\t\t\t\twindow.location.replace( edd_stripe_vars.successPageUri );\n\n\t\t\t\t\t\t\t// Something went wrong, output a notice.\n\t\t\t\t\t\t} catch ( error ) {\n\t\t\t\t\t\t\tonPaymentMethodError( event, error, checkoutForm );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t} )\n\t\t\t.catch( ( error ) => {\n\t\t\t\tonPaymentMethodError( event, error, checkoutForm );\n\t\t\t} );\n\n\t// Something went wrong, output a notice.\n\t} catch ( error ) {\n\t\tonPaymentMethodError( event, error, checkoutForm );\n\t}\n}\n\n/**\n * Determines if a full page reload is needed when applying a discount.\n * \n * A 100% discount switches to the \"manual\" gateway, bypassing the Stripe,\n * however we are still bound to the Payment Request button and a standard\n * Purchase button is not present in the DOM to switch back to.add-new-card\n * \n * @param {Event} e edd_discount_applied event.\n * @param {Object} response Discount application response.\n * @param {int} response.total_plain Cart total after discount.\n */\nfunction onApplyDiscount( e, { total_plain: total } ) {\n\tif ( true === IS_PRB_GATEWAY && 0 === total ) {\n\t\twindow.location.reload();\n\t}\n}\n\n/**\n * Binds purchase link form events.\n *\n * @param {PaymentRequest} paymentRequest Payment Request object.\n * @param {HTMLElement} checkoutForm Checkout form.\n */\nfunction bindEvents( paymentRequest, checkoutForm ) {\n\tconst $body = jQuery( document.body );\n\n\t// Cart quantities have changed.\n\t$body.on( 'edd_quantity_updated', () => onChange( paymentRequest, checkoutForm ) );\n\n\t// Discounts have changed.\n\t$body.on( 'edd_discount_applied', () => onChange( paymentRequest, checkoutForm ) );\n\t$body.on( 'edd_discount_removed', () => onChange( paymentRequest, checkoutForm ) );\n\n\t// Handle a PaymentMethod when available.\n\tpaymentRequest.on( 'paymentmethod', ( event ) => {\n\t\tonPaymentMethod( paymentRequest, checkoutForm, event );\n\t} );\n\n\t// Handle 100% discounts that require a full gateway refresh.\n\t$body.on( 'edd_discount_applied', onApplyDiscount );\n}\n\n/**\n * Mounts Payment Request buttons (if possible).\n *\n * @param {HTMLElement} element Payment Request button mount wrapper.\n */\nfunction mount( element ) {\n\tconst { eddStripe } = window;\n\n\tconst checkoutForm = document.getElementById( 'edd_checkout_form_wrap' );\n\n\ttry {\n\t\t// Gather initial data.\n\t\tconst { 'display-items': displayItems, ...data } = parseDataset( element.dataset );\n\n\t\t// Create a Payment Request object.\n\t\tconst paymentRequest = eddStripe.paymentRequest( {\n\t\t\t// Only requested to prompt full address information collection for Apple Pay.\n\t\t\t//\n\t\t\t// On-page name fields are used to update the Easy Digital Downloads Customer.\n\t\t\t// The Payment Request's Payment Method populate the Customer's Billing Details.\n\t\t\t//\n\t\t\t// @link https://stripe.com/docs/js/payment_request/create#stripe_payment_request-options-requestPayerName\n\t\t\trequestPayerName: true,\n\t\t\tdisplayItems,\n\t\t\t...data,\n\t\t} );\n\n\t\t// Create a Payment Request button.\n\t\tconst elements = eddStripe.elements();\n\t\tconst prButton = elements.create( 'paymentRequestButton', {\n\t\t\tpaymentRequest: paymentRequest,\n\t\t} );\n\n\t\tconst wrapper = document.querySelector( `#${ element.id }` );\n\n\t\t// Check the availability of the Payment Request API.\n\t\tpaymentRequest.canMakePayment()\n\t\t\t// Attempt to mount.\n\t\t\t.then( function( result ) {\n\t\t\t\t// Hide wrapper if nothing can be mounted.\n\t\t\t\tif ( ! result ) {\n\t\t\t\t\treturn hideAndSwitchGateways();\n\t\t\t\t}\n\n\t\t\t\t// Hide wrapper if using Apple Pay but in Test Mode.\n\t\t\t\t// The verification for Connected accounts in Test Mode is not reliable.\n\t\t\t\tif ( true === result.applePay && 'true' === edd_stripe_vars.isTestMode ) {\n\t\t\t\t\treturn hideAndSwitchGateways();\n\t\t\t\t}\n\n\t\t\t\t// Mount.\n\t\t\t\twrapper.style.display = 'block';\n\t\t\t\tcheckoutForm.classList.add( 'edd-prb--is-active' );\n\t\t\t\tprButton.mount( `#${ element.id } .edds-prb__button` );\n\n\t\t\t\t// Bind variable pricing/quantity events.\n\t\t\t\tbindEvents( paymentRequest, checkoutForm );\n\n\t\t\t\t// Handle \"Terms of Service\" and \"Privacy Policy\" client validation.\n\t\t\t\tprButton.on( 'click', onClick );\n\t\t\t} );\n\t} catch ( error ) {\n\t\toutputNotice( {\n\t\t\terrorMessage: error.message,\n\t\t\terrorContainer: document.querySelector( '#edds-prb-checkout' ), \n\t\t\terrorContainerReplace: false,\n\t\t} );\n\t}\n};\n\n/**\n * Sets up Payment Request functionality for single purchase links.\n */\nexport function setup() {\n\tif ( '1' !== edd_scripts.is_checkout ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * Mounts PRB when the gateway has loaded.\n\t *\n\t * @param {Event} e Gateway loaded event.\n\t * @param {string} gateway Gateway ID.\n\t */\n\tjQuery( document.body ).on( 'edd_gateway_loaded', ( e, gateway ) => {\n\t\tif ( 'stripe-prb' !== gateway ) {\n\t\t\tIS_PRB_GATEWAY = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst prbEl = document.querySelector( '.edds-prb.edds-prb--checkout' );\n\n\t\tif ( ! prbEl ) {\n\t\t\treturn;\n\t\t}\n\n\t\tIS_PRB_GATEWAY = true;\n\n\t\tmount( prbEl );\n\t} );\n}\n","/* global edd_stripe_vars, jQuery */\n\n/**\n * Internal dependencies\n */\nimport { parseDataset } from './';\nimport { apiRequest, forEach, outputNotice } from 'utils';\nimport { handle as handleIntent } from 'frontend/stripe-elements';\nimport { createPayment, completePayment } from 'frontend/payment-forms';\n\n/**\n * Finds the Download ID, Price ID, and quantity values for single Download.\n *\n * @param {HTMLElement} purchaseLink Purchase link form.\n * @return {Object}\n */\nfunction getDownloadData( purchaseLink ) {\n\tlet downloadId, priceId = false, quantity = 1;\n\n\t// Download ID.\n\tconst downloadIdEl = purchaseLink.querySelector( '[name=\"download_id\"]' );\n\tdownloadId = parseFloat( downloadIdEl.value );\n\n\t// Price ID.\n\tconst priceIdEl = purchaseLink.querySelector(\n\t\t`.edd_price_option_${downloadId}:checked`\n\t);\n\n\tif ( priceIdEl ) {\n\t\tpriceId = parseFloat( priceIdEl.value );\n\t}\n\n\t// Quantity.\n\tconst quantityEl = purchaseLink.querySelector(\n\t\t'input[name=\"edd_download_quantity\"]'\n\t);\n\n\tif ( quantityEl ) {\n\t\tquantity = parseFloat( quantityEl.value );\n\t}\n\n\treturn {\n\t\tdownloadId,\n\t\tpriceId,\n\t\tquantity,\n\t};\n}\n\n/**\n * Handles changes to the purchase link form by updating the Payment Request object.\n *\n * @param {PaymentRequest} paymentRequest Payment Request object.\n * @param {HTMLElement} purchaseLink Purchase link form.\n */\nasync function onChange( paymentRequest, purchaseLink ) {\n\tconst { downloadId, priceId, quantity } = getDownloadData( purchaseLink );\n\n\ttry {\n\t\t// Calculate and gather price information.\n\t\tconst {\n\t\t\t'display-items': displayItems,\n\t\t\t...paymentRequestData\n\t\t} = await apiRequest( 'edds_prb_ajax_get_options', {\n\t\t\tdownloadId,\n\t\t\tpriceId,\n\t\t\tquantity,\n\t\t} )\n\n\t\t// Update the Payment Request with server-side data.\n\t\tpaymentRequest.update( {\n\t\t\tdisplayItems,\n\t\t\t...paymentRequestData,\n\t\t} )\n\t} catch ( error ) {\n\t\toutputNotice( {\n\t\t\terrorMessage: '',\n\t\t\terrorContainer: purchaseLink,\n\t\t\terrorContainerReplace: false,\n\t\t} );\n\t}\n}\n\n/**\n * Updates the Payment Request amount when the \"Custom Amount\" input changes.\n *\n * @param {HTMLElement} addToCartEl Add to cart button.\n * @param {PaymentRequest} paymentRequest Payment Request object.\n * @param {HTMLElement} purchaseLink Purchase link form.\n */\nasync function onChangeCustomPrice( addToCartEl, paymentRequest, purchaseLink ) {\n\tconst { price } = addToCartEl.dataset;\n\tconst { downloadId, priceId, quantity } = getDownloadData( purchaseLink );\n\n\ttry {\n\t\t// Calculate and gather price information.\n\t\tconst {\n\t\t\t'display-items': displayItems,\n\t\t\t...paymentRequestData\n\t\t} = await apiRequest( 'edds_prb_ajax_get_options', {\n\t\t\tdownloadId,\n\t\t\tpriceId,\n\t\t\tquantity,\n\t\t} )\n\n\t\t// Find the \"Custom Amount\" price.\n\t\tconst { is_zero_decimal: isZeroDecimal } = edd_stripe_vars;\n\t\tlet amount = parseFloat( price );\n\n\t\tif ( 'false' === isZeroDecimal ) {\n\t\t\tamount = amount * 100;\n\t\t}\n\n\t\t// Update the Payment Request with the returned server-side data.\n\t\t// Force update the `amount` in all `displayItems` and `total`.\n\t\t//\n\t\t// \"Custom Prices\" does not support quantities and Payment Requests\n\t\t// do not support taxes so the same amount applies across the board.\n\t\tpaymentRequest.update( {\n\t\t\tdisplayItems: displayItems.map( ( { label } ) => ( {\n\t\t\t\tlabel,\n\t\t\t\tamount,\n\t\t\t} ) ),\n\t\t\t...paymentRequestData,\n\t\t\ttotal: {\n\t\t\t\tlabel: paymentRequestData.total.label,\n\t\t\t\tamount,\n\t\t\t},\n\t\t} )\n\t} catch ( error ) {\n\t\toutputNotice( {\n\t\t\terrorMessage: '',\n\t\t\terrorContainer: purchaseLink,\n\t\t\terrorContainerReplace: false,\n\t\t} );\n\t}\n}\n\n/**\n * Handles Payment Method errors.\n *\n * @param {Object} event Payment Request event.\n * @param {Object} error Error.\n * @param {HTMLElement} purchaseLink Purchase link form.\n */\nfunction onPaymentMethodError( event, error, purchaseLink ) {\n\t// Complete the Payment Request to hide the payment sheet.\n\tevent.complete( 'success' );\n\n\t// Release loading state.\n\tpurchaseLink.classList.remove( 'loading' );\n\n\toutputNotice( {\n\t\terrorMessage: error.message,\n\t\terrorContainer: purchaseLink,\n\t\terrorContainerReplace: false,\n\t} );\n\n\t// Item is in the cart at this point, so change the Purchase button to Checkout.\n\t//\n\t// Using jQuery which will preserve the previously set display value in order\n\t// to provide better theme compatibility.\n\tjQuery( 'a.edd-add-to-cart', purchaseLink ).hide();\n\tjQuery( '.edd_download_quantity_wrapper', purchaseLink ).hide();\n\tjQuery( '.edd_price_options', purchaseLink ).hide();\n\tjQuery( '.edd_go_to_checkout', purchaseLink )\n\t\t.show().removeAttr( 'data-edd-loading' );\n}\n\n/**\n * Handles recieving a Payment Method from the Payment Request.\n *\n * Adds an item to the cart and processes the Checkout as if we are\n * in normal Checkout context.\n *\n * @param {PaymentRequest} paymentRequest Payment Request object.\n * @param {HTMLElement} purchaseLink Purchase link form.\n * @param {Object} event paymentmethod event.\n */\nasync function onPaymentMethod( paymentRequest, purchaseLink, event ) {\n\ttry {\n\t\t// Retrieve the latest data (price ID, quantity, etc).\n\t\tconst { downloadId, priceId, quantity } = getDownloadData( purchaseLink );\n\n\t\t// Retrieve information from the PRB event.\n\t\tconst { paymentMethod, payerEmail, payerName } = event;\n\n\t\t// Start the processing.\n\t\t//\n\t\t// Adds the single Download to the cart and then shims $_POST\n\t\t// data to align with the standard Checkout context.\n\t\t//\n\t\t// This calls `_edds_process_purchase_form()` server-side which\n\t\t// creates and returns a PaymentIntent -- just like the first step\n\t\t// of a true Checkout.\n\t\tconst {\n\t\t\tintent,\n\t\t\tintent: {\n\t\t\t\tclient_secret: clientSecret,\n\t\t\t\tobject: intentType,\n\t\t\t}\n\t\t} = await apiRequest( 'edds_prb_ajax_process_checkout', {\n\t\t\temail: payerEmail,\n\t\t\tname: payerName,\n\t\t\tpaymentMethod,\n\t\t\tdownloadId,\n\t\t\tpriceId,\n\t\t\tquantity,\n\t\t\tcontext: 'download',\n\t\t\tpost_data: jQuery( purchaseLink ).serialize(),\n\t\t} );\n\n\t\t// Complete the Payment Request to hide the payment sheet.\n\t\tevent.complete( 'success' );\n\n\t\t// Loading state. Block interaction.\n\t\tpurchaseLink.classList.add( 'loading' );\n\n\t\t// Confirm the card (SCA, etc).\n\t\tconst confirmFunc = 'setup_intent' === intentType\n\t\t\t? 'confirmCardSetup'\n\t\t\t: 'confirmCardPayment';\n\n\t\teddStripe[ confirmFunc ](\n\t\t\tclientSecret,\n\t\t\t{\n\t\t\t\tpayment_method: paymentMethod.id\n\t\t\t},\n\t\t\t{\n\t\t\t\thandleActions: false,\n\t\t\t}\n\t\t)\n\t\t\t.then( ( { error } ) => {\n\t\t\t\t// Something went wrong. Alert the Payment Request.\n\t\t\t\tif ( error ) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\n\t\t\t\t// Confirm again after the Payment Request dialog has been hidden.\n\t\t\t\t// For cards that do not require further checks this will throw a 400\n\t\t\t\t// error (in the Stripe API) and a log console error but not throw\n\t\t\t\t// an actual Exception. This can be ignored.\n\t\t\t\t//\n\t\t\t\t// https://github.com/stripe/stripe-payments-demo/issues/133#issuecomment-632593669\n\t\t\t\teddStripe[ confirmFunc ]( clientSecret )\n\t\t\t\t\t.then( async ( { error } ) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif ( error ) {\n\t\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Create an EDD Payment.\n\t\t\t\t\t\t\tconst { intent: updatedIntent, nonce } = await createPayment( intent );\n\n\t\t\t\t\t\t\t// Complete the EDD Payment with the updated PaymentIntent.\n\t\t\t\t\t\t\tawait completePayment( updatedIntent, nonce );\n\n\t\t\t\t\t\t\t// Redirect on completion.\n\t\t\t\t\t\t\twindow.location.replace( edd_stripe_vars.successPageUri );\n\n\t\t\t\t\t\t\t// Something went wrong, output a notice.\n\t\t\t\t\t\t} catch ( error ) {\n\t\t\t\t\t\t\tonPaymentMethodError( event, error, purchaseLink );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t} )\n\t\t\t.catch( ( error ) => {\n\t\t\t\tonPaymentMethodError( event, error, purchaseLink );\n\t\t\t} );\n\n\t// Something went wrong, output a notice.\n\t} catch ( error ) {\n\t\tonPaymentMethodError( event, error, purchaseLink );\n\t}\n}\n\n/**\n * Listens for changes to the \"Add to Cart\" button.\n *\n * @param {PaymentRequest} paymentRequest Payment Request object.\n * @param {HTMLElement} purchaseLink Purchase link form.\n */\nfunction observeAddToCartChanges( paymentRequest, purchaseLink ) {\n\tconst addToCartEl = purchaseLink.querySelector( '.edd-add-to-cart' );\n\n\tif ( ! addToCartEl ) {\n\t\treturn;\n\t}\n\n\tconst observer = new MutationObserver( ( mutations ) => {\n\t\tmutations.forEach( ( { type, attributeName, target } ) => {\n\t\t\tif ( type !== 'attributes' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Update the Payment Request if the price has changed.\n\t\t\t// Used for \"Custom Prices\" extension.\n\t\t\tif ( 'data-price' === attributeName ) {\n\t\t\t\tonChangeCustomPrice( target, paymentRequest, purchaseLink );\n\t\t\t}\n\t\t} );\n\t} );\n\n\tobserver.observe( addToCartEl, {\n\t\tattributes: true,\n\t} );\n}\n\n/**\n * Binds purchase link form events.\n *\n * @param {PaymentRequest} paymentRequest Payment Request object.\n * @param {HTMLElement} purchaseLink Purchase link form.\n */\nfunction bindEvents( paymentRequest, purchaseLink ) {\n\t// Price option change.\n\tconst priceOptionsEls = purchaseLink.querySelectorAll( '.edd_price_options input[type=\"radio\"]' );\n\n\tforEach( priceOptionsEls, ( priceOption ) => {\n\t\tpriceOption.addEventListener( 'change', () => onChange( paymentRequest, purchaseLink ) );\n\t} );\n\n\t// Quantity change.\n\tconst quantityEl = purchaseLink.querySelector( 'input[name=\"edd_download_quantity\"]' );\n\n\tif ( quantityEl ) {\n\t\tquantityEl.addEventListener( 'change', () => onChange( paymentRequest, purchaseLink ) );\n\t}\n\n\t// Changes to \"Add to Cart\" button.\n\tobserveAddToCartChanges( paymentRequest, purchaseLink );\n}\n\n/**\n * Mounts Payment Request buttons (if possible).\n *\n * @param {HTMLElement} element Payment Request button mount wrapper.\n */\nfunction mount( element ) {\n\tconst { eddStripe } = window;\n\n\ttry {\n\t\t// Gather initial data.\n\t\tconst { 'display-items': displayItems, ...data } = parseDataset( element.dataset );\n\n\t\t// Find the purchase link form.\n\t\tconst purchaseLink = element.closest(\n\t\t\t'.edd_download_purchase_form'\n\t\t);\n\n\t\t// Create a Payment Request object.\n\t\tconst paymentRequest = eddStripe.paymentRequest( {\n\t\t\t// Requested to prompt full address information collection for Apple Pay.\n\t\t\t//\n\t\t\t// Collected email address is used to create/update Easy Digital Downloads Customer.\n\t\t\t//\n\t\t\t// @link https://stripe.com/docs/js/payment_request/create#stripe_payment_request-options-requestPayerName\n\t\t\trequestPayerEmail: true,\n\t\t\tdisplayItems,\n\t\t\t...data,\n\t\t} );\n\n\t\t// Create a Payment Request button.\n\t\tconst elements = eddStripe.elements();\n\t\tconst prButton = elements.create( 'paymentRequestButton', {\n\t\t\tpaymentRequest: paymentRequest,\n\t\t} );\n\n\t\tconst wrapper = document.querySelector( `#${ element.id }` );\n\n\t\t// Check the availability of the Payment Request API.\n\t\tpaymentRequest.canMakePayment()\n\t\t\t// Attempt to mount.\n\t\t\t.then( function( result ) {\n\t\t\t\t// Hide wrapper if nothing can be mounted.\n\t\t\t\tif ( ! result ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Hide wrapper if using Apple Pay but in Test Mode.\n\t\t\t\t// The verification for Connected accounts in Test Mode is not reliable.\n\t\t\t\tif ( true === result.applePay && 'true' === edd_stripe_vars.isTestMode ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Mount.\n\t\t\t\twrapper.style.display = 'block';\n\t\t\t\tpurchaseLink.classList.add( 'edd-prb--is-active' );\n\t\t\t\tprButton.mount( `#${ element.id } .edds-prb__button` );\n\n\t\t\t\t// Bind variable pricing/quantity events.\n\t\t\t\tbindEvents( paymentRequest, purchaseLink );\n\t\t\t} );\n\n\t\t// Handle a PaymentMethod when available.\n\t\tpaymentRequest.on( 'paymentmethod', ( event ) => {\n\t\t\tonPaymentMethod( paymentRequest, purchaseLink, event );\n\t\t} );\n\t} catch ( error ) {\n\t\toutputNotice( {\n\t\t\terrorMessage: error.message,\n\t\t\terrorContainer: purchaseLink,\n\t\t\terrorContainerReplace: false,\n\t\t} );\n\t}\n};\n\n/**\n * Sets up Payment Request functionality for single purchase links.\n */\nexport function setup() {\n\tforEach( document.querySelectorAll( '.edds-prb.edds-prb--download' ), mount );\n}\n","/**\n * Internal dependencies\n */\nexport { setup as setupDownload } from './download.js';\nexport { setup as setupCheckout } from './checkout.js';\n\n/**\n * Parses an HTML dataset and decodes JSON values.\n *\n * @param {Object} dataset HTML data attributes.\n * @return {Object}\n */\nexport function parseDataset( dataset ) {\n\tlet data = {};\n\n\tfor ( const [ key, value ] of Object.entries( dataset ) ) {\n\t\tlet parsedValue = value;\n\n\t\ttry {\n\t\t\tparsedValue = JSON.parse( value );\n\t\t} catch ( e ) {}\n\n\t\tdata[ key ] = parsedValue;\n\t}\n\n\treturn data;\n}\n","/**\n * Internal dependencies\n */\nimport { paymentMethodActions } from './payment-method-actions.js';\nimport { paymentForm } from './payment-form.js';\n\nexport function setup() {\n\tif ( ! document.getElementById( 'edd-stripe-manage-cards' ) ) {\n\t\treturn;\n\t}\n\n\tpaymentMethodActions();\n\tpaymentForm();\n}\n","/* global edd_stripe_vars, location */\n\n/**\n * Internal dependencies.\n */\nimport {\n\tcreatePaymentForm as createElementsPaymentForm,\n\tgetBillingDetails\n} from 'frontend/stripe-elements';\n\nimport {\n\tapiRequest,\n\thasValidInputs,\n\ttriggerBrowserValidation,\n\tgenerateNotice,\n\tforEach\n} from 'utils';\n\n/**\n * Binds events and sets up \"Add New\" form.\n */\nexport function paymentForm() {\n\t// Mount Elements.\n\tcreateElementsPaymentForm( window.eddStripe.elements() );\n\n\t// Toggles and submission.\n\tdocument.querySelector( '.edd-stripe-add-new' ).addEventListener( 'click', onToggleForm );\n\tdocument.getElementById( 'edd-stripe-add-new-cancel' ).addEventListener( 'click', onToggleForm );\n\tdocument.getElementById( 'edd-stripe-add-new-card' ).addEventListener( 'submit', onAddPaymentMethod );\n\n\t// Set \"Card Name\" field as required by HTML5\n\tdocument.getElementById( 'card_name' ).required = true;\n}\n\n/**\n * Handles toggling of \"Add New\" form button and submission.\n *\n * @param {Event} e click event.\n */\nfunction onToggleForm( e ) {\n\te.preventDefault();\n\n\tconst form = document.getElementById( 'edd-stripe-add-new-card' );\n\tconst formFields = form.querySelector( '.edd-stripe-add-new-card' );\n\tconst isFormVisible = 'block' === formFields.style.display;\n\n\tconst cancelButton = form.querySelector( '#edd-stripe-add-new-cancel' );\n\n\t// Trigger a `submit` event.\n\tif ( isFormVisible && cancelButton !== e.target ) {\n\t\tconst submitEvent = document.createEvent( 'Event' );\n\n\t\tsubmitEvent.initEvent( 'submit', true, true );\n\t\tform.dispatchEvent( submitEvent );\n\t// Toggle form.\n\t} else {\n\t\tformFields.style.display = ! isFormVisible ? 'block' : 'none';\n\t\tcancelButton.style.display = ! isFormVisible ? 'inline-block' : 'none';\n\t}\n}\n\n/**\n * Adds a new Source to the Customer.\n *\n * @param {Event} e submit event.\n */\nfunction onAddPaymentMethod( e ) {\n\te.preventDefault();\n\n\tconst form = e.target;\n\n\tif ( ! hasValidInputs( form ) ) {\n\t\ttriggerBrowserValidation( form );\n\t} else {\n\t\ttry {\n\t\t\tdisableForm();\n\n\t\t\tcreatePaymentMethod( form )\n\t\t\t\t.then( addPaymentMethod )\n\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\thandleNotice( error );\n\t\t\t\t\tenableForm();\n\t\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\thandleNotice( error );\n\t\t\tenableForm();\n\t\t}\n\t}\n}\n\n/**\n * Add a PaymentMethod.\n *\n * @param {Object} paymentMethod\n */\nexport function addPaymentMethod( paymentMethod ) {\n\tapiRequest( 'edds_add_payment_method', {\n\t\tpayment_method_id: paymentMethod.id,\n\t\tnonce: document.getElementById( 'edd-stripe-add-card-nonce' ).value,\n\t} )\n\t\t/**\n\t\t * Shows an error when the API request fails.\n\t\t *\n\t\t * @param {Object} response API Request response.\n\t\t */\n\t\t.fail( handleNotice )\n\t\t/**\n\t\t * Shows a success notice and automatically redirect.\n\t\t *\n\t\t * @param {Object} response API Request response.\n\t\t */\n\t\t.done( function( response ) {\n\t\t\thandleNotice( response, 'success' );\n\n\t\t\t// Automatically redirect on success.\n\t\t\tsetTimeout( function() {\n\t\t\t\tlocation.reload();\n\t\t\t}, 1500 );\n\t\t} );\n}\n\n/**\n * Creates a PaymentMethod from a card and billing form.\n *\n * @param {HTMLElement} billingForm Form with billing fields to retrieve data from.\n * @return {Object} Stripe PaymentMethod.\n */\nfunction createPaymentMethod( billingForm ) {\n\treturn window.eddStripe\n\t\t// Create a PaymentMethod with stripe.js\n\t\t.createPaymentMethod(\n\t\t\t'card',\n\t\t\twindow.eddStripe.cardElement,\n\t\t\t{\n\t\t\t\tbilling_details: getBillingDetails( billingForm ),\n\t\t\t}\n\t\t)\n\t\t/**\n\t\t * Handles PaymentMethod creation response.\n\t\t *\n\t\t * @param {Object} result PaymentMethod creation result.\n\t\t */\n\t\t.then( function( result ) {\n\t\t\tif ( result.error ) {\n\t\t\t\tthrow result.error;\n\t\t\t}\n\n\t\t\treturn result.paymentMethod;\n\t\t} );\n}\n\n/**\n * Disables \"Add New\" form.\n */\nfunction disableForm() {\n\tconst submit = document.querySelector( '.edd-stripe-add-new' );\n\n\tsubmit.value = submit.dataset.loading;\n\tsubmit.disabled = true;\n}\n\n/**\n * Enables \"Add New\" form.\n */\nfunction enableForm() {\n\tconst submit = document.querySelector( '.edd-stripe-add-new' );\n\n\tsubmit.value = submit.dataset.submit;\n\tsubmit.disabled = false;\n}\n\n/**\n * Handles a notice (success or error) for card actions.\n *\n * @param {Object} error Error with message to output.\n * @param {string} type Notice type.\n */\nexport function handleNotice( error, type = 'error' ) {\n\t// Create the new notice.\n\tconst notice = generateNotice(\n\t\t( error && error.message ) ? error.message : edd_stripe_vars.generic_error,\n\t\ttype\n\t);\n\n\t// Hide previous notices.\n\tforEach( document.querySelectorAll( '.edd-stripe-alert' ), function( alert ) {\n\t\talert.remove();\n\t} );\n\n\t// Show new notice.\n\tdocument.querySelector( '.edd-stripe-add-card-actions' )\n\t\t.insertBefore( notice, document.querySelector( '.edd-stripe-add-new' ) );\n}\n","/* global edd_stripe_vars, location */\n\n/**\n * Internal dependencies\n */\nimport { apiRequest, generateNotice, fieldValueOrNull, forEach } from 'utils'; // eslint-disable-line @wordpress/dependency-group\n\n/**\n * Binds events for card actions.\n */\nexport function paymentMethodActions() {\n\t// Update.\n\tforEach( document.querySelectorAll( '.edd-stripe-update-card' ), function( updateButton ) {\n\t\tupdateButton.addEventListener( 'click', onToggleUpdateForm );\n\t} );\n\n\tforEach( document.querySelectorAll( '.edd-stripe-cancel-update' ), function( cancelButton ) {\n\t\tcancelButton.addEventListener( 'click', onToggleUpdateForm );\n\t} );\n\n\tforEach( document.querySelectorAll( '.card-update-form' ), function( updateButton ) {\n\t\tupdateButton.addEventListener( 'submit', onUpdatePaymentMethod );\n\t} );\n\n\t// Delete.\n\tforEach( document.querySelectorAll( '.edd-stripe-delete-card' ), function( deleteButton ) {\n\t\tdeleteButton.addEventListener( 'click', onDeletePaymentMethod );\n\t} );\n\n\t// Set Default.\n\tforEach( document.querySelectorAll( '.edd-stripe-default-card' ), function( setDefaultButton ) {\n\t\tsetDefaultButton.addEventListener( 'click', onSetDefaultPaymentMethod );\n\t} );\n}\n\n/**\n * Handle a generic Payment Method action (set default, update, delete).\n *\n * @param {string} action Payment action.\n * @param {string} paymentMethodId PaymentMethod ID.\n * @param {null|Object} data Additional AJAX data.\n * @return {Promise} jQuery Promise.\n */\nfunction paymentMethodAction( action, paymentMethodId, data = {} ) {\n\treturn apiRequest( action, {\n\t\tpayment_method: paymentMethodId,\n\t\tnonce: document.getElementById( 'card_update_nonce_' + paymentMethodId ).value,\n\t\t...data,\n\t} )\n\t\t/**\n\t\t * Shows an error when the API request fails.\n\t\t *\n\t\t * @param {Object} response API Request response.\n\t\t */\n\t\t.fail( function( response ) {\n\t\t\thandleNotice( paymentMethodId, response );\n\t\t} )\n\t\t/**\n\t\t * Shows a success notice and automatically redirect.\n\t\t *\n\t\t * @param {Object} response API Request response.\n\t\t */\n\t\t.done( function( response ) {\n\t\t\thandleNotice( paymentMethodId, response, 'success' );\n\n\t\t\t// Automatically redirect on success.\n\t\t\tsetTimeout( function() {\n\t\t\t\tlocation.reload();\n\t\t\t}, 1500 );\n\t\t} );\n}\n\n/**\n *\n * @param {Event} e\n */\nfunction onToggleUpdateForm( e ) {\n\te.preventDefault();\n\n\tconst source = e.target.dataset.source;\n\n\tconst form = document.getElementById( source + '-update-form' );\n\tconst cardActionsEl = document.getElementById( source + '-card-actions' );\n\tconst isFormVisible = 'block' === form.style.display;\n\n\tform.style.display = ! isFormVisible ? 'block' : 'none';\n\tcardActionsEl.style.display = ! isFormVisible ? 'none' : 'block';\n}\n\n/**\n *\n * @param {Event} e\n */\nfunction onUpdatePaymentMethod( e ) {\n\te.preventDefault();\n\n\tconst form = e.target;\n\tconst data = {};\n\n\t// Gather form data.\n\tconst updateFields = [\n\t\t'address_city',\n\t\t'address_country',\n\t\t'address_line1',\n\t\t'address_line2',\n\t\t'address_zip',\n\t\t'address_state',\n\t\t'exp_month',\n\t\t'exp_year',\n\t];\n\n\tupdateFields.forEach( function( fieldName ) {\n\t\tconst field = form.querySelector( '[name=\"' + fieldName + '\"]' );\n\t\tdata[ fieldName ] = fieldValueOrNull( field );\n\t} );\n\n\tconst submitButton = form.querySelector( 'input[type=\"submit\"]' );\n\n\tsubmitButton.disabled = true;\n\tsubmitButton.value = submitButton.dataset.loading;\n\n\tpaymentMethodAction( 'edds_update_payment_method', e.target.dataset.source, data )\n\t\t.fail( function( response ) {\n\t\t\tsubmitButton.disabled = false;\n\t\t\tsubmitButton.value = submitButton.dataset.submit;\n\t\t} );\n}\n\n/**\n *\n * @param {Event} e\n */\nfunction onDeletePaymentMethod( e ) {\n\te.preventDefault();\n\tconst loading = '<span class=\"edd-loading-ajax edd-loading\"></span>';\n\tconst linkText = e.target.innerText;\n\te.target.innerHTML = loading;\n\n\tpaymentMethodAction( 'edds_delete_payment_method', e.target.dataset.source )\n\t\t.fail( function( response ) {\n\t\t\te.target.innerText = linkText;\n\t\t} );\n}\n\n/**\n *\n * @param {Event} e\n */\nfunction onSetDefaultPaymentMethod( e ) {\n\te.preventDefault();\n\tconst loading = '<span class=\"edd-loading-ajax edd-loading\"></span>';\n\tconst linkText = e.target.innerText;\n\te.target.innerHTML = loading;\n\n\tpaymentMethodAction( 'edds_set_payment_method_default', e.target.dataset.source )\n\t\t.fail( function( response ) {\n\t\t\te.target.innerText = linkText;\n\t\t} );\n}\n\n/**\n * Handles a notice (success or error) for card actions.\n *\n * @param {string} paymentMethodId\n * @param {Object} error Error with message to output.\n * @param {string} type Notice type.\n */\nexport function handleNotice( paymentMethodId, error, type = 'error' ) {\n\t// Create the new notice.\n\tconst notice = generateNotice(\n\t\t( error && error.message ) ? error.message : edd_stripe_vars.generic_error,\n\t\ttype\n\t);\n\n\t// Hide previous notices.\n\tforEach( document.querySelectorAll( '.edd-stripe-alert' ), function( alert ) {\n\t\talert.remove();\n\t} );\n\n\tconst item = document.getElementById( paymentMethodId + '_card_item' );\n\n\t// Show new notice.\n\titem.insertBefore( notice, item.querySelector( '.card-details' ) );\n}\n","/* global $, edd_stripe_vars */\n\n/**\n * Internal dependencies.\n */\nimport {\n\tgenerateNotice,\n\tfieldValueOrNull,\n\tforEach\n} from 'utils'; // eslint-disable-line @wordpress/dependency-group\n\n// Intents.\nexport * from './intents.js';\n\nconst DEFAULT_ELEMENTS = {\n\t'card': '#edd-stripe-card-element',\n}\n\nconst DEFAULT_SPLIT_ELEMENTS = {\n\t'cardNumber': '#edd-stripe-card-element',\n\t'cardExpiry': '#edd-stripe-card-exp-element',\n\t'cardCvc': '#edd-stripe-card-cvc-element',\n}\n\nlet ELEMENTS_OPTIONS = { ...edd_stripe_vars.elementsOptions };\n\n/**\n * Mounts Elements based on payment form configuration.\n *\n * Assigns a `cardElement` object to the global `eddStripe` object\n * that can be used to collect card data for tokenization.\n *\n * Integrations (such as Recurring) should pass a configuration of Element\n * types and specific HTML IDs to mount based on settings and form markup\n * to avoid attempting to mount to the same `HTMLElement`.\n *\n * @since 2.8.0\n *\n * @param {Object} elementsInstance Stripe Elements instance.\n * @return {Element} The last Stripe Element to be mounted.\n */\nexport function createPaymentForm( elementsInstance, elements ) {\n\tlet mountedEl;\n\n\tif ( ! elements ) {\n\t\telements = ( 'true' === edd_stripe_vars.elementsSplitFields )\n\t\t\t? DEFAULT_SPLIT_ELEMENTS\n\t\t\t: DEFAULT_ELEMENTS;\n\t}\n\n\tforEach( elements, ( selector, element ) => {\n\t\tmountedEl = createAndMountElement( elementsInstance, selector, element );\n\t} );\n\n\t// Make at least one Element available globally.\n\twindow.eddStripe.cardElement = mountedEl;\n\n\treturn mountedEl;\n}\n\n/**\n * Generates and returns an object of styles that can be used to change the appearance\n * of the Stripe Elements iFrame based on existing form styles.\n *\n * Styles that can be applied to the current DOM are injected to the page via\n * a <style> element.\n *\n * @link https://stripe.com/docs/stripe-js/reference#the-elements-object\n *\n * @since 2.8.0\n *\n * @return {Object}\n */\nfunction generateElementStyles() {\n\t// Try to mimick existing input styles.\n\tconst cardNameEl = document.querySelector( '.card-name.edd-input' );\n\n\tif ( ! cardNameEl ) {\n\t\treturn null;\n\t}\n\n\tconst inputStyles = window.getComputedStyle( cardNameEl );\n\n\t// Inject inline CSS instead of applying to the Element so it can be overwritten.\n\tif ( ! document.getElementById( 'edds-stripe-element-styles' ) ) {\n\t\tconst styleTag = document.createElement( 'style' );\n\n\t\tstyleTag.innerHTML = `\n\t\t\t.edd-stripe-card-element.StripeElement,\n\t\t\t.edd-stripe-card-exp-element.StripeElement,\n\t\t\t.edd-stripe-card-cvc-element.StripeElement {\n\t\t\t\tbackground-color: ${ inputStyles.getPropertyValue( 'background-color' ) };\n\n\t\t\t\t${\n\t\t\t\t\t[ 'top', 'right', 'bottom', 'left' ]\n\t\t\t\t\t\t.map( ( dir ) => (\n\t\t\t\t\t\t\t`border-${ dir }-color: ${ inputStyles.getPropertyValue( `border-${ dir }-color` ) };\n\t\t\t\t\t\t\t border-${ dir }-width: ${ inputStyles.getPropertyValue( `border-${ dir }-width` ) };\n\t\t\t\t\t\t\t border-${ dir }-style: ${ inputStyles.getPropertyValue( `border-${ dir }-style` ) };\n\t\t\t\t\t\t\t padding-${ dir }: ${ inputStyles.getPropertyValue( `padding-${ dir }` ) };`\n\t\t\t\t\t\t) )\n\t\t\t\t\t\t.join( '' )\n\t\t\t\t}\n\t\t\t\t${\n\t\t\t\t\t[ 'top-right', 'bottom-right', 'bottom-left', 'top-left' ]\n\t\t\t\t\t\t.map( ( dir ) => (\n\t\t\t\t\t\t\t`border-${ dir }-radius: ${ inputStyles.getPropertyValue( 'border-top-right-radius' ) };`\n\t\t\t\t\t\t) )\n\t\t\t\t\t\t.join( '' )\n\t\t\t\t}\n\t\t\t}`\n\t\t\t\t// Remove whitespace.\n\t\t\t\t.replace( /\\s/g, '' );\n\n\t\tstyleTag.id = 'edds-stripe-element-styles';\n\n\t\tdocument.body.appendChild( styleTag );\n\t}\n\n\treturn {\n\t\tbase: {\n\t\t\tcolor: inputStyles.getPropertyValue( 'color' ),\n\t\t\tfontFamily: inputStyles.getPropertyValue( 'font-family' ),\n\t\t\tfontSize: inputStyles.getPropertyValue( 'font-size' ),\n\t\t\tfontWeight: inputStyles.getPropertyValue( 'font-weight' ),\n\t\t\tfontSmoothing: inputStyles.getPropertyValue( '-webkit-font-smoothing' ),\n\t\t},\n\t};\n}\n\n/**\n * Mounts an Elements Card to the DOM and adds event listeners to submission.\n *\n * @link https://stripe.com/docs/stripe-js/reference#the-elements-object\n *\n * @since 2.8.0\n *\n * @param {Elements} elementsInstance Stripe Elements instance.\n * @param {string} selector Selector to mount Element on.\n * @return {Element|undefined} Stripe Element.\n */\nfunction createAndMountElement( elementsInstance, selector, element ) {\n\tconst el = document.querySelector( selector );\n\n\tif ( ! el ) {\n\t\treturn undefined;\n\t}\n\n\tif ( ! ELEMENTS_OPTIONS.style ) {\n\t\tELEMENTS_OPTIONS.style = generateElementStyles();\n\t}\n\n\t// Remove hidePostalCode if not using a combined `card` Element.\n\tif ( 'cardNumber' === element && ELEMENTS_OPTIONS.hasOwnProperty( 'hidePostalCode' ) ) {\n\t\tdelete ELEMENTS_OPTIONS.hidePostalCode;\n\t}\n\n\t// Remove unused parameter from options.\n\tdelete ELEMENTS_OPTIONS.i18n;\n\n\tconst stripeElement = elementsInstance\n\t\t.create( element, ELEMENTS_OPTIONS );\n\n\tstripeElement\n\t\t.addEventListener( 'change', ( event ) => {\n\t\t\thandleElementError( event, el );\n\t\t\thandleCardBrandIcon( event );\n\t\t} )\n\t\t.mount( el );\n\n\treturn stripeElement;\n}\n\n/**\n * Mounts an Elements Card to the DOM and adds event listeners to submission.\n *\n * @since 2.7.0\n * @since 2.8.0 Deprecated\n *\n * @deprecated Use createPaymentForm() to mount specific elements.\n *\n * @param {Elements} elementsInstance Stripe Elements instance.\n * @param {string} toMount Selector to mount Element on.\n * @return {Element} Stripe Element.\n */\nexport function mountCardElement( elementsInstance, toMount = '#edd-stripe-card-element' ) {\n\tconst mountedEl = createPaymentForm( elementsInstance, {\n\t\t'card': toMount,\n\t} );\n\n\t// Hide split card details fields because any integration that is using this\n\t// directly has not properly implemented split fields.\n\tconst splitFields = document.getElementById( 'edd-card-details-wrap' );\n\n\tif ( splitFields ) {\n\t\tsplitFields.style.display = 'none';\n\t}\n\n\treturn mountedEl;\n}\n\n/**\n * Handles error output for Elements Card.\n *\n * @param {Event} event Change event on the Card Element.\n * @param {HTMLElement} el HTMLElement the Stripe Element is being mounted on.\n */\nfunction handleElementError( event, el ) {\n\tconst newCardContainer = el.closest( '.edd-stripe-new-card' );\n\tconst errorsContainer = newCardContainer.querySelector( '#edd-stripe-card-errors' );\n\n\t// Only show one error at once.\n\terrorsContainer.innerHTML = '';\n\n\tif ( event.error ) {\n\t\tconst { code, message } = event.error;\n\t\tconst { elementsOptions: { i18n: { errorMessages } } } = window.edd_stripe_vars;\n\n\t\tconst localizedMessage = errorMessages[ code ] ? errorMessages[ code ] : message;\n\n\t\terrorsContainer.appendChild( generateNotice( localizedMessage ) );\n\t}\n}\n\n/**\n * Updates card brand icon if using a split form.\n *\n * @since 2.8.0\n *\n * @param {Event} event Change event on the Card Element.\n */\nfunction handleCardBrandIcon( event ) {\n\tconst {\n\t\tbrand,\n\t\telementType,\n\t} = event;\n\n\tif ( 'cardNumber' !== event.elementType ) {\n\t\treturn;\n\t}\n\n\tconst cardTypeEl = document.querySelector( '.card-type' );\n\n\tif ( 'unknown' === brand ) {\n\t\tcardTypeEl.className = 'card-type';\n\t} else {\n\t\tcardTypeEl.classList.add( brand );\n\t}\n}\n\n/**\n * Retrieves (or creates) a PaymentMethod.\n *\n * @param {HTMLElement} billingDetailsForm Form to find data from.\n * @return {Object} PaymentMethod ID and if it previously existed.\n */\nexport function getPaymentMethod( billingDetailsForm, cardElement ) {\n\tconst selectedPaymentMethod = $( 'input[name=\"edd_stripe_existing_card\"]:checked' );\n\n\t// An existing PaymentMethod is selected.\n\tif ( selectedPaymentMethod.length > 0 && 'new' !== selectedPaymentMethod.val() ) {\n\t\treturn Promise.resolve( {\n\t\t\tid: selectedPaymentMethod.val(),\n\t\t\texists: true,\n\t\t} );\n\t}\n\n\t// Create a PaymentMethod using the Element data.\n\treturn window.eddStripe\n\t\t.createPaymentMethod(\n\t\t\t'card',\n\t\t\tcardElement,\n\t\t\t{\n\t\t\t\tbilling_details: getBillingDetails( billingDetailsForm ),\n\t\t\t}\n\t\t)\n\t\t.then( function( result ) {\n\t\t\tif ( result.error ) {\n\t\t\t\tthrow result.error;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tid: result.paymentMethod.id,\n\t\t\t\texists: false,\n\t\t\t};\n\t\t} );\n}\n\n/**\n * Retrieves billing details from the Billing Details sections of a form.\n *\n * @param {HTMLElement} form Form to find data from.\n * @return {Object} Billing details\n */\nexport function getBillingDetails( form ) {\n\treturn {\n\t\t// @todo add Phone\n\t\t// @todo add Email\n\t\tname: fieldValueOrNull( form.querySelector( '.card-name' ) ),\n\t\taddress: {\n\t\t\tline1: fieldValueOrNull( form.querySelector( '.card-address' ) ),\n\t\t\tline2: fieldValueOrNull( form.querySelector( '.card-address-2' ) ),\n\t\t\tcity: fieldValueOrNull( form.querySelector( '.card-city' ) ),\n\t\t\tstate: fieldValueOrNull( form.querySelector( '.card_state' ) ),\n\t\t\tpostal_code: fieldValueOrNull( form.querySelector( '.card-zip' ) ),\n\t\t\tcountry: fieldValueOrNull( form.querySelector( '#billing_country' ) ),\n\t\t},\n\t};\n}\n","/* global jQuery */\n\n/**\n * Internal dependencies\n */\nimport { apiRequest } from 'utils'; // eslint-disable-line @wordpress/dependency-group\n\n/**\n * Retrieve a PaymentIntent.\n *\n * @param {string} intentId Intent ID.\n * @param {string} intentType Intent type. payment_intent or setup_intent.\n * @return {Promise} jQuery Promise.\n */\nexport function retrieve( intentId, intentType = 'payment_intent' ) {\n\tconst form = $( window.eddStripe.cardElement._parent ).closest( 'form' );\n\n\treturn apiRequest( 'edds_get_intent', {\n\t\tintent_id: intentId,\n\t\tintent_type: intentType,\n\t\tform_data: form.serialize(),\n\t} )\n\t\t// Returns just the PaymentIntent object.\n\t\t.then( function( response ) {\n\t\t\treturn response.intent;\n\t\t} );\n}\n\n/**\n * Confirm a PaymentIntent.\n *\n * @param {Object} intent Stripe PaymentIntent or SetupIntent.\n * @return {Promise} jQuery Promise.\n */\nexport function confirm( intent ) {\n\tconst form = $( window.eddStripe.cardElement._parent ).closest( 'form' );\n\n\treturn apiRequest( 'edds_confirm_intent', {\n\t\tintent_id: intent.id,\n\t\tintent_type: intent.object,\n\t\tform_data: form.serialize(),\n\t} )\n\t\t// Returns just the PaymentIntent object for easier reprocessing.\n\t\t.then( function( response ) {\n\t\t\treturn response.intent;\n\t\t} );\n}\n\n/**\n * Capture a PaymentIntent.\n *\n * @param {Object} intent Stripe PaymentIntent or SetupIntent.\n * @param {Object} data Extra data to pass to the intent action.\n * @param {string} refreshedNonce A refreshed nonce that might be needed if the\n * user logged in.\n * @return {Promise} jQuery Promise.\n */\nexport function capture( intent, data, refreshedNonce ) {\n\tconst form = $( window.eddStripe.cardElement._parent ).closest( 'form' );\n\n\tif ( 'requires_capture' !== intent.status ) {\n\t\treturn Promise.resolve( intent );\n\t}\n\n\tlet formData = form.serialize();\n\n\t// Add the refreshed nonce if available.\n\tif ( refreshedNonce ) {\n\t\tformData += `&edd-process-checkout-nonce=${ refreshedNonce }`;\n\t}\n\n\treturn apiRequest( 'edds_capture_intent', {\n\t\tintent_id: intent.id,\n\t\tintent_type: intent.object,\n\t\tform_data: formData,\n\t\t...data,\n\t} )\n\t\t// Returns just the PaymentIntent object for easier reprocessing.\n\t\t.then( function( response ) {\n\t\t\treturn response.intent;\n\t\t} );\n}\n\n/**\n * Update a PaymentIntent.\n *\n * @param {Object} intent Stripe PaymentIntent or SetupIntent.\n * @param {Object} data PaymentIntent data to update.\n * @return {Promise} jQuery Promise.\n */\nexport function update( intent, data ) {\n\tconst form = $( window.eddStripe.cardElement._parent ).closest( 'form' );\n\n\treturn apiRequest( 'edds_update_intent', {\n\t\tintent_id: intent.id,\n\t\tintent_type: intent.object,\n\t\tform_data: form.serialize(),\n\t\t...data,\n\t} )\n\t\t// Returns just the PaymentIntent object for easier reprocessing.\n\t\t.then( function( response ) {\n\t\t\treturn response.intent;\n\t\t} );\n}\n\n/**\n * Determines if the PaymentIntent requires further action.\n *\n * @link https://stripe.com/docs/stripe-js/reference\n *\n * @param {Object} intent Stripe PaymentIntent or SetupIntent.\n * @param {Object} data Extra data to pass to the intent action.\n */\nexport async function handle( intent, data ) {\n\t// requires_confirmation\n\tif ( 'requires_confirmation' === intent.status ) {\n\t\t// Attempt to capture.\n\t\tconst confirmedIntent = await confirm( intent );\n\n\t\t// Run through again.\n\t\treturn await handle( confirmedIntent );\n\t}\n\n\t// requires_payment_method\n\t// @link https://stripe.com/docs/payments/intents#intent-statuses\n\tif (\n\t\t'requires_payment_method' === intent.status ||\n\t\t'requires_source' === intent.status\n\t) {\n\t\t// Attempt to update.\n\t\tconst updatedIntent = await update( intent, data );\n\n\t\t// Run through again.\n\t\treturn await handle( updatedIntent, data );\n\t}\n\n\t// requires_action\n\t// @link https://stripe.com/docs/payments/intents#intent-statuses\n\tif (\n\t\t( 'requires_action' === intent.status && 'use_stripe_sdk' === intent.next_action.type ) ||\n\t\t( 'requires_source_action' === intent.status && 'use_stripe_sdk' === intent.next_action.type )\n\t) {\n\t\tlet cardHandler = 'setup_intent' === intent.object ? 'handleCardSetup' : 'handleCardAction';\n\n\t\tif ( 'automatic' === intent.confirmation_method ) {\n\t\t\tcardHandler = 'handleCardPayment';\n\t\t}\n\n\t\treturn window.eddStripe[ cardHandler ]( intent.client_secret )\n\t\t\t.then( async ( result ) => {\n\t\t\t\tif ( result.error ) {\n\t\t\t\t\tthrow result.error;\n\t\t\t\t}\n\n\t\t\t\tconst {\n\t\t\t\t\tsetupIntent,\n\t\t\t\t\tpaymentIntent,\n\t\t\t\t} = result;\n\n\t\t\t\t// Run through again.\n\t\t\t\treturn await handle( setupIntent || paymentIntent );\n\t\t\t} );\n\t}\n\n\t// Nothing done, return Intent.\n\treturn intent;\n}\n","/* global $, edd_scripts, ajaxurl */\n\n/**\n * Sends an API request to admin-ajax.php\n *\n * @link https://github.com/WordPress/WordPress/blob/master/wp-includes/js/wp-util.js#L49\n *\n * @param {string} action AJAX action to send to admin-ajax.php\n * @param {Object} data Additional data to send to the action.\n * @return {Promise} jQuery Promise.\n */\nexport function apiRequest( action, data ) {\n\tconst options = {\n\t\ttype: 'POST',\n\t\tdataType: 'json',\n\t\txhrFields: {\n\t\t\twithCredentials: true,\n\t\t},\n\t\turl: ( window.edd_scripts && window.edd_scripts.ajaxurl ) || window.ajaxurl,\n\t\tdata: {\n\t\t\taction,\n\t\t\t...data,\n\t\t},\n\t};\n\n\tconst deferred = $.Deferred( function( deferred ) {\n\t\t// Use with PHP's wp_send_json_success() and wp_send_json_error()\n\t\tdeferred.jqXHR = $.ajax( options ).done( function( response ) {\n\t\t\t// Treat a response of 1 or 'success' as successful for backward compatibility with existing handlers.\n\t\t\tif ( response === '1' || response === 1 ) {\n\t\t\t\tresponse = { success: true };\n\t\t\t}\n\n\t\t\tif ( typeof response === 'object' && typeof response.success !== undefined ) {\n\t\t\t\tdeferred[ response.success ? 'resolveWith' : 'rejectWith' ]( this, [ response.data ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( this, [ response ] );\n\t\t\t}\n\t\t} ).fail( function() {\n\t\t\tdeferred.rejectWith( this, arguments );\n\t\t} );\n\t} );\n\n\tconst promise = deferred.promise();\n\tpromise.abort = function() {\n\t\tdeferred.jqXHR.abort();\n\t\treturn this;\n\t};\n\n\treturn promise;\n}\n","/**\n * Internal dependencies.\n */\nimport { forEach } from 'utils'; // eslint-disable-line @wordpress/dependency-group\n\n/**\n * forEach implementation that can handle anything.\n */\nexport { default as forEach } from 'lodash.foreach';\n\n/**\n * DOM ready.\n *\n * Handles multiple callbacks.\n *\n * @param {Function} Callback function to run.\n */\nexport function domReady() {\n\tforEach( arguments, ( callback ) => {\n\t\tdocument.addEventListener( 'DOMContentLoaded', callback );\n\t} );\n}\n\n/**\n * Retrieves all following siblings of an element.\n *\n * @param {HTMLElement} el Starting element.\n * @return {Array} siblings List of sibling elements.\n */\nexport function getNextSiblings( el ) {\n\tconst siblings = [];\n\tlet sibling = el.nextElementSibling;\n\n\twhile ( sibling ) {\n\t\tif ( sibling.nodeType === 1 ) {\n\t\t\tsiblings.push( sibling );\n\t\t}\n\n\t\tsibling = sibling.nextElementSibling;\n\t}\n\n\treturn siblings;\n}\n","/**\n * Internal dependencies.\n */\n/**\n * External dependencies\n */\nimport { forEach } from 'utils';\n\n/**\n * Checks is a form passes HTML5 validation.\n *\n * @param {HTMLElement} form Form to trigger validation on.\n * @return {Bool} If the form has valid inputs.\n */\nexport function hasValidInputs( form ) {\n\tlet plainInputsValid = true;\n\n\tforEach( form.querySelectorAll( 'input' ), function( input ) {\n\t\tif ( input.checkValidity && ! input.checkValidity() ) {\n\t\t\tplainInputsValid = false;\n\t\t}\n\t} );\n\n\treturn plainInputsValid;\n}\n\n/**\n * Triggers HTML5 browser validation.\n *\n * @param {HTMLElement} form Form to trigger validation on.\n */\nexport function triggerBrowserValidation( form ) {\n\tconst submit = document.createElement( 'input' );\n\tsubmit.type = 'submit';\n\tsubmit.style.display = 'none';\n\n\tform.appendChild( submit );\n\tsubmit.click();\n\tsubmit.remove();\n}\n\n/**\n * Returns an input's value, or null.\n *\n * @param {HTMLElement} field Field to retrieve value from.\n * @return {null|string} Value if the field has a value.\n */\nexport function fieldValueOrNull( field ) {\n\tif ( ! field ) {\n\t\treturn null;\n\t}\n\n\tif ( '' === field.value ) {\n\t\treturn null;\n\t}\n\n\treturn field.value;\n}\n","import './polyfill-includes.js';\nimport './polyfill-closest.js';\nimport './polyfill-object-entries.js';\nimport './polyfill-remove.js';\n\nexport * from './api-request.js';\nexport * from './dom.js';\nexport * from './notice.js';\nexport * from './form.js';\n","/* global $, edd_stripe_vars */\n\n/**\n * Generates a notice element.\n *\n * @param {string} message The notice text.\n * @param {string} type The type of notice. error or success. Default error.\n * @return {Element} HTML element containing errors.\n */\nexport function generateNotice( message, type = 'error' ) {\n\tconst notice = document.createElement( 'p' );\n\tnotice.classList.add( 'edd-alert' );\n\tnotice.classList.add( 'edd-stripe-alert' );\n\tnotice.style.clear = 'both';\n\n\tif ( 'error' === type ) {\n\t\tnotice.classList.add( 'edd-alert-error' );\n\t} else {\n\t\tnotice.classList.add( 'edd-alert-success' );\n\t}\n\n\tnotice.innerHTML = message || edd_stripe_vars.generic_error;\n\n\treturn notice;\n}\n\n/**\n * Outputs a notice.\n *\n *\n * @param {object} args Output arguments.\n * @param {string} args.errorType The type of notice. error or success\n * @param {string} args.errorMessasge The notice text.\n * @param {HTMLElement} args.errorContainer HTML element containing errors.\n * @param {bool} args.errorContainerReplace If true Appends the notice before\n * the container.\n */\nexport function outputNotice( {\n\terrorType,\n\terrorMessage,\n\terrorContainer,\n\terrorContainerReplace = true,\n} ) {\n\tconst $errorContainer = $( errorContainer );\n\tconst notice = generateNotice( errorMessage, errorType );\n\n\tif ( true === errorContainerReplace ) {\n\t\t$errorContainer.html( notice );\n\t} else {\n\t\t$errorContainer.before( notice );\n\t}\n}\n\n/**\n * Clears a notice.\n *\n * @param {HTMLElement} errorContainer HTML element containing errors.\n */\nexport function clearNotice( errorContainer ) {\n\t$( errorContainer ).html( '' );\n}\n","/// Polyfill .closest\n// @link https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill\nif ( ! Element.prototype.matches ) {\n\tElement.prototype.matches =\n\t\tElement.prototype.msMatchesSelector ||\n\t\tElement.prototype.webkitMatchesSelector;\n}\n\nif ( ! Element.prototype.closest ) {\n\tElement.prototype.closest = function( s ) {\n\t\tlet el = this;\n\n\t\tdo {\n\t\t\tif ( Element.prototype.matches.call( el, s ) ) return el;\n\n\t\t\tel = el.parentElement || el.parentNode;\n\t\t} while ( el !== null && el.nodeType === 1 );\n\n\t\treturn null;\n\t};\n}\n","// Polyfill string.contains\n// @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill\nif ( ! String.prototype.includes ) {\n\tString.prototype.includes = function( search, start ) {\n\t\t'use strict';\n\n\t\tif ( typeof start !== 'number' ) {\n\t\t\tstart = 0;\n\t\t}\n\n\t\tif ( start + search.length > this.length ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn this.indexOf( search, start ) !== -1;\n\t\t}\n\t};\n}\n","/// Polyfill Object.entries\n// @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries#Polyfill\nif ( ! Object.entries ) {\n\tObject.entries = function( obj ) {\n\t\tvar ownProps = Object.keys( obj ),\n\t\t\ti = ownProps.length,\n\t\t\tresArray = new Array( i ); // preallocate the Array\n\n\t\twhile ( i-- ) {\n\t\t\tresArray[ i ] = [ ownProps[ i ], obj[ ownProps[ i ] ] ];\n\t\t}\n\n\t\treturn resArray;\n\t};\n}\n","/// Polyfill .remove\n// @link https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove#Polyfill\n( function ( arr ) {\n\tarr.forEach( function( item ) {\n\t\tif ( item.hasOwnProperty( 'remove' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tObject.defineProperty( item, 'remove', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: true,\n\t\t\twritable: true,\n\t\t\tvalue: function remove() {\n\t\t\t\tthis.parentNode.removeChild( this );\n\t\t\t}\n\t\t} );\n\t} );\n} )( [ Element.prototype, CharacterData.prototype, DocumentType.prototype ] );\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var objectWithoutPropertiesLoose = require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayWithHoles = require(\"@babel/runtime/helpers/arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"@babel/runtime/helpers/iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"@babel/runtime/helpers/unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"@babel/runtime/helpers/nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayLikeToArray = require(\"@babel/runtime/helpers/arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","module.exports = require(\"regenerator-runtime\");\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.github.io/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n result = new C();\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var anObject = require('../internals/an-object');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line no-throw-literal\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","module.exports = {};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","module.exports = false;\n","module.exports = {};\n","var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\nvar nativeAssign = Object.assign;\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\nmodule.exports = !nativeAssign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : nativeAssign;\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.6.5',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n // eslint-disable-next-line no-undef\n && !Symbol.sham\n // eslint-disable-next-line no-undef\n && typeof Symbol.iterator == 'symbol';\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name)) {\n if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];\n else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.github.io/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n","var $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n assign: assign\n});\n","module.exports = require('es6-promise').Promise;\n","/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 3.3.1\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n return typeof x === 'function' || typeof x === 'object' && x !== null;\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nvar _isArray = undefined;\nif (!Array.isArray) {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n} else {\n _isArray = Array.isArray;\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n return function () {\n vertxNext(flush);\n };\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n _resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n _reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n _reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n _reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return _resolve(promise, value);\n }, function (reason) {\n return _reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$) {\n if (maybeThenable.constructor === promise.constructor && then$$ === then && maybeThenable.constructor.resolve === resolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$ === GET_THEN_ERROR) {\n _reject(promise, GET_THEN_ERROR.error);\n } else if (then$$ === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$)) {\n handleForeignThenable(promise, maybeThenable, then$$);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction _resolve(promise, value) {\n if (promise === value) {\n _reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction _reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n _reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n _resolve(promise, value);\n } else if (failed) {\n _reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n _reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n _resolve(promise, value);\n }, function rejectPromise(reason) {\n _reject(promise, reason);\n });\n } catch (e) {\n _reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this._input = input;\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate();\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n _reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function () {\n var length = this.length;\n var _input = this._input;\n\n for (var i = 0; this._state === PENDING && i < length; i++) {\n this._eachEntry(_input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve$$ = c.resolve;\n\n if (resolve$$ === resolve) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$) {\n return resolve$$(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n _reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = resolve;\nPromise.reject = reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}\n\npolyfill();\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\n\nreturn Promise;\n\n})));\n//# sourceMappingURL=es6-promise.map","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _([1, 2]).forEach(function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, typeof iteratee == 'function' ? iteratee : identity);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = forEach;\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar MicroModal = function () {\n\n var FOCUSABLE_ELEMENTS = ['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^=\"-\"])'];\n\n var Modal = /*#__PURE__*/function () {\n function Modal(_ref) {\n var targetModal = _ref.targetModal,\n _ref$triggers = _ref.triggers,\n triggers = _ref$triggers === void 0 ? [] : _ref$triggers,\n _ref$onShow = _ref.onShow,\n onShow = _ref$onShow === void 0 ? function () {} : _ref$onShow,\n _ref$onClose = _ref.onClose,\n onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,\n _ref$openTrigger = _ref.openTrigger,\n openTrigger = _ref$openTrigger === void 0 ? 'data-micromodal-trigger' : _ref$openTrigger,\n _ref$closeTrigger = _ref.closeTrigger,\n closeTrigger = _ref$closeTrigger === void 0 ? 'data-micromodal-close' : _ref$closeTrigger,\n _ref$openClass = _ref.openClass,\n openClass = _ref$openClass === void 0 ? 'is-open' : _ref$openClass,\n _ref$disableScroll = _ref.disableScroll,\n disableScroll = _ref$disableScroll === void 0 ? false : _ref$disableScroll,\n _ref$disableFocus = _ref.disableFocus,\n disableFocus = _ref$disableFocus === void 0 ? false : _ref$disableFocus,\n _ref$awaitCloseAnimat = _ref.awaitCloseAnimation,\n awaitCloseAnimation = _ref$awaitCloseAnimat === void 0 ? false : _ref$awaitCloseAnimat,\n _ref$awaitOpenAnimati = _ref.awaitOpenAnimation,\n awaitOpenAnimation = _ref$awaitOpenAnimati === void 0 ? false : _ref$awaitOpenAnimati,\n _ref$debugMode = _ref.debugMode,\n debugMode = _ref$debugMode === void 0 ? false : _ref$debugMode;\n\n _classCallCheck(this, Modal);\n\n // Save a reference of the modal\n this.modal = document.getElementById(targetModal); // Save a reference to the passed config\n\n this.config = {\n debugMode: debugMode,\n disableScroll: disableScroll,\n openTrigger: openTrigger,\n closeTrigger: closeTrigger,\n openClass: openClass,\n onShow: onShow,\n onClose: onClose,\n awaitCloseAnimation: awaitCloseAnimation,\n awaitOpenAnimation: awaitOpenAnimation,\n disableFocus: disableFocus\n }; // Register click events only if pre binding eventListeners\n\n if (triggers.length > 0) this.registerTriggers.apply(this, _toConsumableArray(triggers)); // pre bind functions for event listeners\n\n this.onClick = this.onClick.bind(this);\n this.onKeydown = this.onKeydown.bind(this);\n }\n /**\n * Loops through all openTriggers and binds click event\n * @param {array} triggers [Array of node elements]\n * @return {void}\n */\n\n\n _createClass(Modal, [{\n key: \"registerTriggers\",\n value: function registerTriggers() {\n var _this = this;\n\n for (var _len = arguments.length, triggers = new Array(_len), _key = 0; _key < _len; _key++) {\n triggers[_key] = arguments[_key];\n }\n\n triggers.filter(Boolean).forEach(function (trigger) {\n trigger.addEventListener('click', function (event) {\n return _this.showModal(event);\n });\n });\n }\n }, {\n key: \"showModal\",\n value: function showModal() {\n var _this2 = this;\n\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n this.activeElement = document.activeElement;\n this.modal.setAttribute('aria-hidden', 'false');\n this.modal.classList.add(this.config.openClass);\n this.scrollBehaviour('disable');\n this.addEventListeners();\n\n if (this.config.awaitOpenAnimation) {\n var handler = function handler() {\n _this2.modal.removeEventListener('animationend', handler, false);\n\n _this2.setFocusToFirstNode();\n };\n\n this.modal.addEventListener('animationend', handler, false);\n } else {\n this.setFocusToFirstNode();\n }\n\n this.config.onShow(this.modal, this.activeElement, event);\n }\n }, {\n key: \"closeModal\",\n value: function closeModal() {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var modal = this.modal;\n this.modal.setAttribute('aria-hidden', 'true');\n this.removeEventListeners();\n this.scrollBehaviour('enable');\n\n if (this.activeElement && this.activeElement.focus) {\n this.activeElement.focus();\n }\n\n this.config.onClose(this.modal, this.activeElement, event);\n\n if (this.config.awaitCloseAnimation) {\n var openClass = this.config.openClass; // <- old school ftw\n\n this.modal.addEventListener('animationend', function handler() {\n modal.classList.remove(openClass);\n modal.removeEventListener('animationend', handler, false);\n }, false);\n } else {\n modal.classList.remove(this.config.openClass);\n }\n }\n }, {\n key: \"closeModalById\",\n value: function closeModalById(targetModal) {\n this.modal = document.getElementById(targetModal);\n if (this.modal) this.closeModal();\n }\n }, {\n key: \"scrollBehaviour\",\n value: function scrollBehaviour(toggle) {\n if (!this.config.disableScroll) return;\n var body = document.querySelector('body');\n\n switch (toggle) {\n case 'enable':\n Object.assign(body.style, {\n overflow: ''\n });\n break;\n\n case 'disable':\n Object.assign(body.style, {\n overflow: 'hidden'\n });\n break;\n }\n }\n }, {\n key: \"addEventListeners\",\n value: function addEventListeners() {\n this.modal.addEventListener('touchstart', this.onClick);\n this.modal.addEventListener('click', this.onClick);\n document.addEventListener('keydown', this.onKeydown);\n }\n }, {\n key: \"removeEventListeners\",\n value: function removeEventListeners() {\n this.modal.removeEventListener('touchstart', this.onClick);\n this.modal.removeEventListener('click', this.onClick);\n document.removeEventListener('keydown', this.onKeydown);\n }\n }, {\n key: \"onClick\",\n value: function onClick(event) {\n if (event.target.hasAttribute(this.config.closeTrigger)) {\n this.closeModal(event);\n }\n }\n }, {\n key: \"onKeydown\",\n value: function onKeydown(event) {\n if (event.keyCode === 27) this.closeModal(event); // esc\n\n if (event.keyCode === 9) this.retainFocus(event); // tab\n }\n }, {\n key: \"getFocusableNodes\",\n value: function getFocusableNodes() {\n var nodes = this.modal.querySelectorAll(FOCUSABLE_ELEMENTS);\n return Array.apply(void 0, _toConsumableArray(nodes));\n }\n /**\n * Tries to set focus on a node which is not a close trigger\n * if no other nodes exist then focuses on first close trigger\n */\n\n }, {\n key: \"setFocusToFirstNode\",\n value: function setFocusToFirstNode() {\n var _this3 = this;\n\n if (this.config.disableFocus) return;\n var focusableNodes = this.getFocusableNodes(); // no focusable nodes\n\n if (focusableNodes.length === 0) return; // remove nodes on whose click, the modal closes\n // could not think of a better name :(\n\n var nodesWhichAreNotCloseTargets = focusableNodes.filter(function (node) {\n return !node.hasAttribute(_this3.config.closeTrigger);\n });\n if (nodesWhichAreNotCloseTargets.length > 0) nodesWhichAreNotCloseTargets[0].focus();\n if (nodesWhichAreNotCloseTargets.length === 0) focusableNodes[0].focus();\n }\n }, {\n key: \"retainFocus\",\n value: function retainFocus(event) {\n var focusableNodes = this.getFocusableNodes(); // no focusable nodes\n\n if (focusableNodes.length === 0) return;\n /**\n * Filters nodes which are hidden to prevent\n * focus leak outside modal\n */\n\n focusableNodes = focusableNodes.filter(function (node) {\n return node.offsetParent !== null;\n }); // if disableFocus is true\n\n if (!this.modal.contains(document.activeElement)) {\n focusableNodes[0].focus();\n } else {\n var focusedItemIndex = focusableNodes.indexOf(document.activeElement);\n\n if (event.shiftKey && focusedItemIndex === 0) {\n focusableNodes[focusableNodes.length - 1].focus();\n event.preventDefault();\n }\n\n if (!event.shiftKey && focusableNodes.length > 0 && focusedItemIndex === focusableNodes.length - 1) {\n focusableNodes[0].focus();\n event.preventDefault();\n }\n }\n }\n }]);\n\n return Modal;\n }();\n /**\n * Modal prototype ends.\n * Here on code is responsible for detecting and\n * auto binding event handlers on modal triggers\n */\n // Keep a reference to the opened modal\n\n\n var activeModal = null;\n /**\n * Generates an associative array of modals and it's\n * respective triggers\n * @param {array} triggers An array of all triggers\n * @param {string} triggerAttr The data-attribute which triggers the module\n * @return {array}\n */\n\n var generateTriggerMap = function generateTriggerMap(triggers, triggerAttr) {\n var triggerMap = [];\n triggers.forEach(function (trigger) {\n var targetModal = trigger.attributes[triggerAttr].value;\n if (triggerMap[targetModal] === undefined) triggerMap[targetModal] = [];\n triggerMap[targetModal].push(trigger);\n });\n return triggerMap;\n };\n /**\n * Validates whether a modal of the given id exists\n * in the DOM\n * @param {number} id The id of the modal\n * @return {boolean}\n */\n\n\n var validateModalPresence = function validateModalPresence(id) {\n if (!document.getElementById(id)) {\n console.warn(\"MicroModal: \\u2757Seems like you have missed %c'\".concat(id, \"'\"), 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', 'ID somewhere in your code. Refer example below to resolve it.');\n console.warn(\"%cExample:\", 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', \"<div class=\\\"modal\\\" id=\\\"\".concat(id, \"\\\"></div>\"));\n return false;\n }\n };\n /**\n * Validates if there are modal triggers present\n * in the DOM\n * @param {array} triggers An array of data-triggers\n * @return {boolean}\n */\n\n\n var validateTriggerPresence = function validateTriggerPresence(triggers) {\n if (triggers.length <= 0) {\n console.warn(\"MicroModal: \\u2757Please specify at least one %c'micromodal-trigger'\", 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', 'data attribute.');\n console.warn(\"%cExample:\", 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', \"<a href=\\\"#\\\" data-micromodal-trigger=\\\"my-modal\\\"></a>\");\n return false;\n }\n };\n /**\n * Checks if triggers and their corresponding modals\n * are present in the DOM\n * @param {array} triggers Array of DOM nodes which have data-triggers\n * @param {array} triggerMap Associative array of modals and their triggers\n * @return {boolean}\n */\n\n\n var validateArgs = function validateArgs(triggers, triggerMap) {\n validateTriggerPresence(triggers);\n if (!triggerMap) return true;\n\n for (var id in triggerMap) {\n validateModalPresence(id);\n }\n\n return true;\n };\n /**\n * Binds click handlers to all modal triggers\n * @param {object} config [description]\n * @return void\n */\n\n\n var init = function init(config) {\n // Create an config object with default openTrigger\n var options = Object.assign({}, {\n openTrigger: 'data-micromodal-trigger'\n }, config); // Collects all the nodes with the trigger\n\n var triggers = _toConsumableArray(document.querySelectorAll(\"[\".concat(options.openTrigger, \"]\"))); // Makes a mappings of modals with their trigger nodes\n\n\n var triggerMap = generateTriggerMap(triggers, options.openTrigger); // Checks if modals and triggers exist in dom\n\n if (options.debugMode === true && validateArgs(triggers, triggerMap) === false) return; // For every target modal creates a new instance\n\n for (var key in triggerMap) {\n var value = triggerMap[key];\n options.targetModal = key;\n options.triggers = _toConsumableArray(value);\n activeModal = new Modal(options); // eslint-disable-line no-new\n }\n };\n /**\n * Shows a particular modal\n * @param {string} targetModal [The id of the modal to display]\n * @param {object} config [The configuration object to pass]\n * @return {void}\n */\n\n\n var show = function show(targetModal, config) {\n var options = config || {};\n options.targetModal = targetModal; // Checks if modals and triggers exist in dom\n\n if (options.debugMode === true && validateModalPresence(targetModal) === false) return; // clear events in case previous modal wasn't close\n\n if (activeModal) activeModal.removeEventListeners(); // stores reference to active modal\n\n activeModal = new Modal(options); // eslint-disable-line no-new\n\n activeModal.showModal();\n };\n /**\n * Closes the active modal\n * @param {string} targetModal [The id of the modal to close]\n * @return {void}\n */\n\n\n var close = function close(targetModal) {\n targetModal ? activeModal.closeModalById(targetModal) : activeModal.closeModal();\n };\n\n return {\n init: init,\n show: show,\n close: close\n };\n}();\nwindow.MicroModal = MicroModal;\n\nexport default MicroModal;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/* (ignored) */","module.exports = jQuery;"],"sourceRoot":""}
|
includes/gateways/stripe/assets/js/src/frontend/payment-forms/buy-now/index.js
CHANGED
@@ -11,19 +11,20 @@ import { paymentForm } from 'frontend/payment-forms/checkout'
|
|
11 |
* Adds a Download to the Cart.
|
12 |
*
|
13 |
* @param {number} downloadId Download ID.
|
14 |
-
* @param {number} priceId Price ID.
|
15 |
-
* @param {number} quantity
|
16 |
-
* @param {string} nonce
|
|
|
17 |
*
|
18 |
* @return {Promise}
|
19 |
*/
|
20 |
-
function addToCart( downloadId, priceId, quantity, nonce ) {
|
21 |
-
const { ajaxurl } = edd_scripts;
|
22 |
const data = {
|
23 |
download_id: downloadId,
|
24 |
price_id: priceId,
|
25 |
quantity: quantity,
|
26 |
nonce,
|
|
|
27 |
};
|
28 |
|
29 |
return apiRequest( 'edds_add_to_cart', data );
|
@@ -42,8 +43,13 @@ function emptyCart() {
|
|
42 |
* Displays the Buy Now modal.
|
43 |
*
|
44 |
* @param {Object} args
|
|
|
|
|
|
|
|
|
|
|
45 |
*/
|
46 |
-
function buyNowModal(
|
47 |
const modalContent = document.querySelector( '#edds-buy-now-modal-content' );
|
48 |
const modalLoading = '<span class="edd-loading-ajax edd-loading"></span>';
|
49 |
|
@@ -55,7 +61,21 @@ function buyNowModal( { downloadId, priceId, quantity, nonce } ) {
|
|
55 |
onShow() {
|
56 |
modalContent.innerHTML = modalLoading;
|
57 |
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
.then( ( { checkout } ) => {
|
60 |
// Show Checkout HTML.
|
61 |
modalContent.innerHTML = checkout;
|
@@ -144,7 +164,8 @@ export function setup() {
|
|
144 |
downloadId,
|
145 |
priceId,
|
146 |
quantity,
|
147 |
-
nonce
|
|
|
148 |
} );
|
149 |
} );
|
150 |
|
11 |
* Adds a Download to the Cart.
|
12 |
*
|
13 |
* @param {number} downloadId Download ID.
|
14 |
+
* @param {number} priceId Download Price ID.
|
15 |
+
* @param {number} quantity Download quantity.
|
16 |
+
* @param {string} nonce Nonce token.
|
17 |
+
* @param {HTMLElement} addToCartForm Add to cart form.
|
18 |
*
|
19 |
* @return {Promise}
|
20 |
*/
|
21 |
+
function addToCart( downloadId, priceId, quantity, nonce, addToCartForm ) {
|
|
|
22 |
const data = {
|
23 |
download_id: downloadId,
|
24 |
price_id: priceId,
|
25 |
quantity: quantity,
|
26 |
nonce,
|
27 |
+
post_data: jQuery( addToCartForm ).serialize(),
|
28 |
};
|
29 |
|
30 |
return apiRequest( 'edds_add_to_cart', data );
|
43 |
* Displays the Buy Now modal.
|
44 |
*
|
45 |
* @param {Object} args
|
46 |
+
* @param {number} args.downloadId Download ID.
|
47 |
+
* @param {number} args.priceId Download Price ID.
|
48 |
+
* @param {number} args.quantity Download quantity.
|
49 |
+
* @param {string} args.nonce Nonce token.
|
50 |
+
* @param {HTMLElement} args.addToCartForm Add to cart form.
|
51 |
*/
|
52 |
+
function buyNowModal( args ) {
|
53 |
const modalContent = document.querySelector( '#edds-buy-now-modal-content' );
|
54 |
const modalLoading = '<span class="edd-loading-ajax edd-loading"></span>';
|
55 |
|
61 |
onShow() {
|
62 |
modalContent.innerHTML = modalLoading;
|
63 |
|
64 |
+
const {
|
65 |
+
downloadId,
|
66 |
+
priceId,
|
67 |
+
quantity,
|
68 |
+
nonce,
|
69 |
+
addToCartForm,
|
70 |
+
} = args;
|
71 |
+
|
72 |
+
addToCart(
|
73 |
+
downloadId,
|
74 |
+
priceId,
|
75 |
+
quantity,
|
76 |
+
nonce,
|
77 |
+
addToCartForm
|
78 |
+
)
|
79 |
.then( ( { checkout } ) => {
|
80 |
// Show Checkout HTML.
|
81 |
modalContent.innerHTML = checkout;
|
164 |
downloadId,
|
165 |
priceId,
|
166 |
quantity,
|
167 |
+
nonce,
|
168 |
+
addToCartForm
|
169 |
} );
|
170 |
} );
|
171 |
|
includes/gateways/stripe/assets/js/src/frontend/payment-forms/payment-request/checkout.js
CHANGED
@@ -373,6 +373,50 @@ function mount( element ) {
|
|
373 |
}
|
374 |
};
|
375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
/**
|
377 |
* Sets up Payment Request functionality for single purchase links.
|
378 |
*/
|
@@ -391,6 +435,9 @@ export function setup() {
|
|
391 |
if ( 'stripe-prb' !== gateway ) {
|
392 |
IS_PRB_GATEWAY = false;
|
393 |
|
|
|
|
|
|
|
394 |
return;
|
395 |
}
|
396 |
|
373 |
}
|
374 |
};
|
375 |
|
376 |
+
/**
|
377 |
+
* Performs an initial check for Payment Request support.
|
378 |
+
*
|
379 |
+
* Used when Stripe is not the default gateway (and therefore Express Checkout is not
|
380 |
+
* loaded by default) to do a "background" check of support while a different initial
|
381 |
+
* gateway is loaded.
|
382 |
+
*
|
383 |
+
* @link https://github.com/easydigitaldownloads/edd-stripe/issues/652
|
384 |
+
*/
|
385 |
+
function paymentRequestPrecheck() {
|
386 |
+
const {
|
387 |
+
eddStripe: stripe,
|
388 |
+
edd_stripe_vars: config
|
389 |
+
} = window;
|
390 |
+
|
391 |
+
if ( ! config || ! stripe ) {
|
392 |
+
return;
|
393 |
+
}
|
394 |
+
|
395 |
+
const { currency, country, checkoutHasPaymentRequest } = config;
|
396 |
+
|
397 |
+
if ( 'false' === checkoutHasPaymentRequest ) {
|
398 |
+
return;
|
399 |
+
}
|
400 |
+
|
401 |
+
stripe.paymentRequest( {
|
402 |
+
country,
|
403 |
+
currency: currency.toLowerCase(),
|
404 |
+
total: {
|
405 |
+
label: 'Easy Digital Downloads',
|
406 |
+
amount: 100,
|
407 |
+
}
|
408 |
+
} )
|
409 |
+
.canMakePayment()
|
410 |
+
.then( ( result ) => {
|
411 |
+
if ( null === result ) {
|
412 |
+
hideAndSwitchGateways();
|
413 |
+
}
|
414 |
+
|
415 |
+
const checkoutForm = document.getElementById( 'edd_checkout_form_wrap' );
|
416 |
+
checkoutForm.classList.add( 'edd-prb--is-active' );
|
417 |
+
} );
|
418 |
+
}
|
419 |
+
|
420 |
/**
|
421 |
* Sets up Payment Request functionality for single purchase links.
|
422 |
*/
|
435 |
if ( 'stripe-prb' !== gateway ) {
|
436 |
IS_PRB_GATEWAY = false;
|
437 |
|
438 |
+
// Always check for Payment Request support if Stripe is active.
|
439 |
+
paymentRequestPrecheck();
|
440 |
+
|
441 |
return;
|
442 |
}
|
443 |
|
includes/gateways/stripe/assets/js/src/frontend/payment-forms/payment-request/download.js
CHANGED
@@ -74,7 +74,62 @@ async function onChange( paymentRequest, purchaseLink ) {
|
|
74 |
} catch ( error ) {
|
75 |
outputNotice( {
|
76 |
errorMessage: '',
|
77 |
-
errorContainer: purchaseLink,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
errorContainerReplace: false,
|
79 |
} );
|
80 |
}
|
@@ -96,7 +151,7 @@ function onPaymentMethodError( event, error, purchaseLink ) {
|
|
96 |
|
97 |
outputNotice( {
|
98 |
errorMessage: error.message,
|
99 |
-
errorContainer: purchaseLink,
|
100 |
errorContainerReplace: false,
|
101 |
} );
|
102 |
|
@@ -151,6 +206,7 @@ async function onPaymentMethod( paymentRequest, purchaseLink, event ) {
|
|
151 |
priceId,
|
152 |
quantity,
|
153 |
context: 'download',
|
|
|
154 |
} );
|
155 |
|
156 |
// Complete the Payment Request to hide the payment sheet.
|
@@ -217,6 +273,38 @@ async function onPaymentMethod( paymentRequest, purchaseLink, event ) {
|
|
217 |
}
|
218 |
}
|
219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
/**
|
221 |
* Binds purchase link form events.
|
222 |
*
|
@@ -237,6 +325,9 @@ function bindEvents( paymentRequest, purchaseLink ) {
|
|
237 |
if ( quantityEl ) {
|
238 |
quantityEl.addEventListener( 'change', () => onChange( paymentRequest, purchaseLink ) );
|
239 |
}
|
|
|
|
|
|
|
240 |
}
|
241 |
|
242 |
/**
|
@@ -307,7 +398,7 @@ function mount( element ) {
|
|
307 |
} catch ( error ) {
|
308 |
outputNotice( {
|
309 |
errorMessage: error.message,
|
310 |
-
errorContainer: purchaseLink,
|
311 |
errorContainerReplace: false,
|
312 |
} );
|
313 |
}
|
74 |
} catch ( error ) {
|
75 |
outputNotice( {
|
76 |
errorMessage: '',
|
77 |
+
errorContainer: purchaseLink,
|
78 |
+
errorContainerReplace: false,
|
79 |
+
} );
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Updates the Payment Request amount when the "Custom Amount" input changes.
|
85 |
+
*
|
86 |
+
* @param {HTMLElement} addToCartEl Add to cart button.
|
87 |
+
* @param {PaymentRequest} paymentRequest Payment Request object.
|
88 |
+
* @param {HTMLElement} purchaseLink Purchase link form.
|
89 |
+
*/
|
90 |
+
async function onChangeCustomPrice( addToCartEl, paymentRequest, purchaseLink ) {
|
91 |
+
const { price } = addToCartEl.dataset;
|
92 |
+
const { downloadId, priceId, quantity } = getDownloadData( purchaseLink );
|
93 |
+
|
94 |
+
try {
|
95 |
+
// Calculate and gather price information.
|
96 |
+
const {
|
97 |
+
'display-items': displayItems,
|
98 |
+
...paymentRequestData
|
99 |
+
} = await apiRequest( 'edds_prb_ajax_get_options', {
|
100 |
+
downloadId,
|
101 |
+
priceId,
|
102 |
+
quantity,
|
103 |
+
} )
|
104 |
+
|
105 |
+
// Find the "Custom Amount" price.
|
106 |
+
const { is_zero_decimal: isZeroDecimal } = edd_stripe_vars;
|
107 |
+
let amount = parseFloat( price );
|
108 |
+
|
109 |
+
if ( 'false' === isZeroDecimal ) {
|
110 |
+
amount = Math.round( amount * 100 );
|
111 |
+
}
|
112 |
+
|
113 |
+
// Update the Payment Request with the returned server-side data.
|
114 |
+
// Force update the `amount` in all `displayItems` and `total`.
|
115 |
+
//
|
116 |
+
// "Custom Prices" does not support quantities and Payment Requests
|
117 |
+
// do not support taxes so the same amount applies across the board.
|
118 |
+
paymentRequest.update( {
|
119 |
+
displayItems: displayItems.map( ( { label } ) => ( {
|
120 |
+
label,
|
121 |
+
amount,
|
122 |
+
} ) ),
|
123 |
+
...paymentRequestData,
|
124 |
+
total: {
|
125 |
+
label: paymentRequestData.total.label,
|
126 |
+
amount,
|
127 |
+
},
|
128 |
+
} )
|
129 |
+
} catch ( error ) {
|
130 |
+
outputNotice( {
|
131 |
+
errorMessage: '',
|
132 |
+
errorContainer: purchaseLink,
|
133 |
errorContainerReplace: false,
|
134 |
} );
|
135 |
}
|
151 |
|
152 |
outputNotice( {
|
153 |
errorMessage: error.message,
|
154 |
+
errorContainer: purchaseLink,
|
155 |
errorContainerReplace: false,
|
156 |
} );
|
157 |
|
206 |
priceId,
|
207 |
quantity,
|
208 |
context: 'download',
|
209 |
+
post_data: jQuery( purchaseLink ).serialize(),
|
210 |
} );
|
211 |
|
212 |
// Complete the Payment Request to hide the payment sheet.
|
273 |
}
|
274 |
}
|
275 |
|
276 |
+
/**
|
277 |
+
* Listens for changes to the "Add to Cart" button.
|
278 |
+
*
|
279 |
+
* @param {PaymentRequest} paymentRequest Payment Request object.
|
280 |
+
* @param {HTMLElement} purchaseLink Purchase link form.
|
281 |
+
*/
|
282 |
+
function observeAddToCartChanges( paymentRequest, purchaseLink ) {
|
283 |
+
const addToCartEl = purchaseLink.querySelector( '.edd-add-to-cart' );
|
284 |
+
|
285 |
+
if ( ! addToCartEl ) {
|
286 |
+
return;
|
287 |
+
}
|
288 |
+
|
289 |
+
const observer = new MutationObserver( ( mutations ) => {
|
290 |
+
mutations.forEach( ( { type, attributeName, target } ) => {
|
291 |
+
if ( type !== 'attributes' ) {
|
292 |
+
return;
|
293 |
+
}
|
294 |
+
|
295 |
+
// Update the Payment Request if the price has changed.
|
296 |
+
// Used for "Custom Prices" extension.
|
297 |
+
if ( 'data-price' === attributeName ) {
|
298 |
+
onChangeCustomPrice( target, paymentRequest, purchaseLink );
|
299 |
+
}
|
300 |
+
} );
|
301 |
+
} );
|
302 |
+
|
303 |
+
observer.observe( addToCartEl, {
|
304 |
+
attributes: true,
|
305 |
+
} );
|
306 |
+
}
|
307 |
+
|
308 |
/**
|
309 |
* Binds purchase link form events.
|
310 |
*
|
325 |
if ( quantityEl ) {
|
326 |
quantityEl.addEventListener( 'change', () => onChange( paymentRequest, purchaseLink ) );
|
327 |
}
|
328 |
+
|
329 |
+
// Changes to "Add to Cart" button.
|
330 |
+
observeAddToCartChanges( paymentRequest, purchaseLink );
|
331 |
}
|
332 |
|
333 |
/**
|
398 |
} catch ( error ) {
|
399 |
outputNotice( {
|
400 |
errorMessage: error.message,
|
401 |
+
errorContainer: purchaseLink,
|
402 |
errorContainerReplace: false,
|
403 |
} );
|
404 |
}
|
includes/gateways/stripe/edd-stripe.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Easy Digital Downloads - Stripe Pro Payment Gateway
|
4 |
* Plugin URL: https://easydigitaldownloads.com/downloads/stripe-gateway/
|
5 |
* Description: Adds a payment gateway for Stripe.com
|
6 |
-
* Version: 2.8.
|
7 |
* Author: Sandhills Development, LLC
|
8 |
* Author URI: https://sandhillsdev.com
|
9 |
* Text Domain: edds
|
@@ -42,7 +42,7 @@ function edd_stripe_core_bootstrap() {
|
|
42 |
}
|
43 |
|
44 |
if ( ! defined( 'EDD_STRIPE_VERSION' ) ) {
|
45 |
-
define( 'EDD_STRIPE_VERSION', '2.8.
|
46 |
}
|
47 |
|
48 |
if ( ! defined( 'EDD_STRIPE_API_VERSION' ) ) {
|
3 |
* Plugin Name: Easy Digital Downloads - Stripe Pro Payment Gateway
|
4 |
* Plugin URL: https://easydigitaldownloads.com/downloads/stripe-gateway/
|
5 |
* Description: Adds a payment gateway for Stripe.com
|
6 |
+
* Version: 2.8.7
|
7 |
* Author: Sandhills Development, LLC
|
8 |
* Author URI: https://sandhillsdev.com
|
9 |
* Text Domain: edds
|
42 |
}
|
43 |
|
44 |
if ( ! defined( 'EDD_STRIPE_VERSION' ) ) {
|
45 |
+
define( 'EDD_STRIPE_VERSION', '2.8.7' );
|
46 |
}
|
47 |
|
48 |
if ( ! defined( 'EDD_STRIPE_API_VERSION' ) ) {
|
includes/gateways/stripe/includes/admin/admin-actions.php
CHANGED
@@ -167,3 +167,27 @@ function edds_stripe_connect_test_mode_toggle_redirect() {
|
|
167 |
|
168 |
}
|
169 |
add_action( 'admin_init', 'edds_stripe_connect_test_mode_toggle_redirect' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
}
|
169 |
add_action( 'admin_init', 'edds_stripe_connect_test_mode_toggle_redirect' );
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Adds a "Refund Charge in Stripe" checkbox to the refund UI.
|
173 |
+
*
|
174 |
+
* @param \EDD\Orders\Order $order
|
175 |
+
*
|
176 |
+
* @since 2.8.7
|
177 |
+
*/
|
178 |
+
function edds_show_refund_checkbox( \EDD\Orders\Order $order ) {
|
179 |
+
if ( 'stripe' !== $order->gateway ) {
|
180 |
+
return;
|
181 |
+
}
|
182 |
+
?>
|
183 |
+
<div class="edd-form-group edd-stripe-refund-transaction">
|
184 |
+
<div class="edd-form-group__control">
|
185 |
+
<input type="checkbox" id="edd-stripe-refund" name="edd-stripe-refund" class="edd-form-group__input" value="1">
|
186 |
+
<label for="edd-stripe-refund" class="edd-form-group__label">
|
187 |
+
<?php esc_html_e( 'Refund Charge in Stripe', 'easy-digital-downloads' ); ?>
|
188 |
+
</label>
|
189 |
+
</div>
|
190 |
+
</div>
|
191 |
+
<?php
|
192 |
+
}
|
193 |
+
add_action( 'edd_after_submit_refund_table', 'edds_show_refund_checkbox' );
|
includes/gateways/stripe/includes/functions.php
CHANGED
@@ -6,6 +6,8 @@
|
|
6 |
* @since unknown
|
7 |
*/
|
8 |
|
|
|
|
|
9 |
/**
|
10 |
* Returns the one true instance of EDD_Stripe
|
11 |
*
|
@@ -381,34 +383,28 @@ function edd_stripe_get_customer_key() {
|
|
381 |
* @return bool
|
382 |
*/
|
383 |
function edds_is_zero_decimal_currency() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
|
385 |
-
$
|
386 |
-
$currency = edd_get_currency();
|
387 |
-
|
388 |
-
switch( $currency ) {
|
389 |
-
|
390 |
-
case 'BIF' :
|
391 |
-
case 'CLP' :
|
392 |
-
case 'DJF' :
|
393 |
-
case 'GNF' :
|
394 |
-
case 'JPY' :
|
395 |
-
case 'KMF' :
|
396 |
-
case 'KRW' :
|
397 |
-
case 'MGA' :
|
398 |
-
case 'PYG' :
|
399 |
-
case 'RWF' :
|
400 |
-
case 'VND' :
|
401 |
-
case 'VUV' :
|
402 |
-
case 'XAF' :
|
403 |
-
case 'XOF' :
|
404 |
-
case 'XPF' :
|
405 |
-
|
406 |
-
$ret = true;
|
407 |
-
break;
|
408 |
-
|
409 |
-
}
|
410 |
-
|
411 |
-
return $ret;
|
412 |
}
|
413 |
|
414 |
/**
|
@@ -548,3 +544,128 @@ function edds_documentation_route( $type ) {
|
|
548 |
return trailingslashit( $base_url ) . $type;
|
549 |
|
550 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
* @since unknown
|
7 |
*/
|
8 |
|
9 |
+
use EDD\Orders\Order;
|
10 |
+
|
11 |
/**
|
12 |
* Returns the one true instance of EDD_Stripe
|
13 |
*
|
383 |
* @return bool
|
384 |
*/
|
385 |
function edds_is_zero_decimal_currency() {
|
386 |
+
$currency = strtolower( edd_get_currency() );
|
387 |
+
|
388 |
+
$currencies = array(
|
389 |
+
'bif',
|
390 |
+
'clp',
|
391 |
+
'djf',
|
392 |
+
'gnf',
|
393 |
+
'jpy',
|
394 |
+
'kmf',
|
395 |
+
'krw',
|
396 |
+
'mga',
|
397 |
+
'pyg',
|
398 |
+
'rwf',
|
399 |
+
'ugx',
|
400 |
+
'vnd',
|
401 |
+
'vuv',
|
402 |
+
'xaf',
|
403 |
+
'xof',
|
404 |
+
'xpf',
|
405 |
+
);
|
406 |
|
407 |
+
return in_array( $currency, $currencies, true );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
408 |
}
|
409 |
|
410 |
/**
|
544 |
return trailingslashit( $base_url ) . $type;
|
545 |
|
546 |
}
|
547 |
+
|
548 |
+
/**
|
549 |
+
* Refunds a charge made via Stripe.
|
550 |
+
*
|
551 |
+
* @since 2.8.7
|
552 |
+
*
|
553 |
+
* @param int|Order $order_id_or_object The ID or object (EDD 3.0+ only) of the order to refund.
|
554 |
+
* @param Order|null $refund_object Optional. The refund object associated with this
|
555 |
+
* charge refund. If provided, then the refund amount
|
556 |
+
* is used as the charge refund amount (for partial refunds), and
|
557 |
+
* an EDD transaction record will be inserted (EDD 3.0+ only).
|
558 |
+
*
|
559 |
+
* @throws \EDD_Stripe_Utils_Exceptions_Stripe_Object_Not_Found When attempting to call an object or method that is not available.
|
560 |
+
* @throws \Exception
|
561 |
+
*/
|
562 |
+
function edd_refund_stripe_purchase( $order_id_or_object, $refund_object = null ) {
|
563 |
+
$order_id = $order_id_or_object instanceof Order ? $order_id_or_object->id : $order_id_or_object;
|
564 |
+
|
565 |
+
edd_debug_log( sprintf(
|
566 |
+
'Processing Stripe refund for order #%d',
|
567 |
+
$order_id
|
568 |
+
) );
|
569 |
+
|
570 |
+
if ( ! is_numeric( $order_id ) ) {
|
571 |
+
throw new \Exception( __( 'Invalid order ID.', 'easy-digital-downloads' ), 400 );
|
572 |
+
}
|
573 |
+
|
574 |
+
$charge_id = edd_get_payment_transaction_id( $order_id );
|
575 |
+
|
576 |
+
if ( empty( $charge_id ) || $charge_id == $order_id ) {
|
577 |
+
$notes = edd_get_payment_notes( $order_id );
|
578 |
+
|
579 |
+
foreach ( $notes as $note ) {
|
580 |
+
if ( preg_match( '/^Stripe Charge ID: ([^\s]+)/', $note->comment_content, $match ) ) {
|
581 |
+
$charge_id = $match[1];
|
582 |
+
break;
|
583 |
+
}
|
584 |
+
}
|
585 |
+
}
|
586 |
+
|
587 |
+
// Bail if no charge ID was found.
|
588 |
+
if ( empty( $charge_id ) ) {
|
589 |
+
edd_debug_log( sprintf( 'Exiting refund of order #%d. No Stripe charge found.', $order_id ) );
|
590 |
+
|
591 |
+
return;
|
592 |
+
}
|
593 |
+
|
594 |
+
$args = array(
|
595 |
+
'charge' => $charge_id,
|
596 |
+
);
|
597 |
+
|
598 |
+
if ( $refund_object instanceof Order && $order_id_or_object instanceof Order && abs( $refund_object->total ) !== abs( $order_id_or_object->total ) ) {
|
599 |
+
$args['amount'] = abs( $refund_object->total );
|
600 |
+
if ( ! edds_is_zero_decimal_currency() ) {
|
601 |
+
$args['amount'] = round( $args['amount'] * 100, 0 );
|
602 |
+
}
|
603 |
+
|
604 |
+
edd_debug_log( sprintf(
|
605 |
+
'Processing partial Stripe refund for order #%d. Refund amount: %s; Amount sent to Stripe: %s',
|
606 |
+
$order_id_or_object->id,
|
607 |
+
edd_currency_filter( $refund_object->total, $refund_object->currency ),
|
608 |
+
$args['amount']
|
609 |
+
) );
|
610 |
+
} else {
|
611 |
+
edd_debug_log( sprintf( 'Processing full Stripe refund for order #%d.', $order_id ) );
|
612 |
+
}
|
613 |
+
|
614 |
+
/**
|
615 |
+
* Filters the refund arguments sent to Stripe.
|
616 |
+
*
|
617 |
+
* @link https://stripe.com/docs/api/refunds/create
|
618 |
+
*
|
619 |
+
* @param array $args
|
620 |
+
*/
|
621 |
+
$args = apply_filters( 'edds_create_refund_args', $args );
|
622 |
+
|
623 |
+
/**
|
624 |
+
* Filters the secondary refund arguments.
|
625 |
+
*
|
626 |
+
* @param array $sec_args
|
627 |
+
*/
|
628 |
+
$sec_args = apply_filters( 'edds_create_refund_secondary_args', array() );
|
629 |
+
|
630 |
+
$refund = edds_api_request( 'Refund', 'create', $args, $sec_args );
|
631 |
+
|
632 |
+
$amount_refunded = (float) $refund->amount;
|
633 |
+
if ( ! edds_is_zero_decimal_currency() ) {
|
634 |
+
$amount_refunded = round( $amount_refunded / 100, edd_currency_decimal_filter( 2, strtoupper( $refund->currency ) ) );
|
635 |
+
}
|
636 |
+
|
637 |
+
$order_note = sprintf(
|
638 |
+
/* translators: %1$s the amount refunded; %2$s Stripe Refund ID */
|
639 |
+
__( '%1$s refunded in Stripe. Refund ID %2$s', 'easy-digital-downloads' ),
|
640 |
+
edd_currency_filter( $amount_refunded, strtoupper( $refund->currency ) ),
|
641 |
+
$refund->id
|
642 |
+
);
|
643 |
+
|
644 |
+
edd_insert_payment_note( $order_id, $order_note );
|
645 |
+
|
646 |
+
// Add a negative transaction in EDD 3.0+.
|
647 |
+
if ( $refund_object instanceof Order && function_exists( 'edd_add_order_transaction' ) ) {
|
648 |
+
edd_add_order_transaction( array(
|
649 |
+
'object_id' => $refund_object->id,
|
650 |
+
'object_type' => 'order',
|
651 |
+
'transaction_id' => sanitize_text_field( $refund->id ),
|
652 |
+
'gateway' => 'stripe',
|
653 |
+
'status' => 'complete',
|
654 |
+
'total' => edd_negate_amount( $amount_refunded )
|
655 |
+
) );
|
656 |
+
|
657 |
+
edd_add_note( array(
|
658 |
+
'object_id' => $refund_object->id,
|
659 |
+
'object_type' => 'order',
|
660 |
+
'user_id' => is_admin() ? get_current_user_id() : 0,
|
661 |
+
'content' => $order_note
|
662 |
+
) );
|
663 |
+
}
|
664 |
+
|
665 |
+
/**
|
666 |
+
* Triggers after a refund has been processed.
|
667 |
+
*
|
668 |
+
* @param int $order_id ID of the order that was refunded.
|
669 |
+
*/
|
670 |
+
do_action( 'edds_payment_refunded', $order_id );
|
671 |
+
}
|
includes/gateways/stripe/includes/payment-actions.php
CHANGED
@@ -1239,8 +1239,6 @@ function edds_get_payment_description( $cart_details ) {
|
|
1239 |
}
|
1240 |
|
1241 |
$purchase_summary = rtrim( $purchase_summary, ', ' );
|
1242 |
-
} else {
|
1243 |
-
$purchase_summary = edd_get_purchase_summary( $purchase_data, false );
|
1244 |
}
|
1245 |
|
1246 |
// Stripe has a maximum of 999 characters in the charge description
|
@@ -1373,7 +1371,9 @@ function edds_charge_preapproved( $payment_id = 0 ) {
|
|
1373 |
}
|
1374 |
|
1375 |
/**
|
1376 |
-
* Process refund in Stripe
|
|
|
|
|
1377 |
*
|
1378 |
* @access public
|
1379 |
* @since 1.8
|
@@ -1395,46 +1395,73 @@ function edd_stripe_process_refund( $payment_id, $new_status, $old_status ) {
|
|
1395 |
return;
|
1396 |
}
|
1397 |
|
1398 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1399 |
|
1400 |
-
|
1401 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1402 |
|
1403 |
-
|
1404 |
-
|
1405 |
-
$charge_id = $match[1];
|
1406 |
-
break;
|
1407 |
-
}
|
1408 |
-
}
|
1409 |
}
|
1410 |
|
1411 |
-
|
1412 |
-
if ( empty( $
|
1413 |
return;
|
1414 |
}
|
1415 |
|
1416 |
-
|
1417 |
-
$args = apply_filters( 'edds_create_refund_args', array(
|
1418 |
-
'charge' => $charge_id,
|
1419 |
-
) );
|
1420 |
|
1421 |
-
|
|
|
1422 |
|
1423 |
-
|
|
|
1424 |
|
1425 |
-
|
1426 |
-
$
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
)
|
1432 |
-
);
|
1433 |
|
1434 |
-
|
1435 |
-
wp_die( $e->getMessage(), __( 'Error', 'easy-digital-downloads' ) , array( 'response' => 400 ) );
|
1436 |
}
|
1437 |
|
1438 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1439 |
}
|
1440 |
-
add_action( '
|
1239 |
}
|
1240 |
|
1241 |
$purchase_summary = rtrim( $purchase_summary, ', ' );
|
|
|
|
|
1242 |
}
|
1243 |
|
1244 |
// Stripe has a maximum of 999 characters in the charge description
|
1371 |
}
|
1372 |
|
1373 |
/**
|
1374 |
+
* Process refund in Stripe, in EDD 2.x
|
1375 |
+
* For EDD 3.0, see `edd_stripe_maybe_refund_charge()`
|
1376 |
+
* @see edd_stripe_maybe_refund_charge()
|
1377 |
*
|
1378 |
* @access public
|
1379 |
* @since 1.8
|
1395 |
return;
|
1396 |
}
|
1397 |
|
1398 |
+
try {
|
1399 |
+
edd_refund_stripe_purchase( $payment_id );
|
1400 |
+
} catch ( \Exception $e ) {
|
1401 |
+
wp_die( $e->getMessage(), __( 'Error', 'easy-digital-downloads' ) , array( 'response' => 400 ) );
|
1402 |
+
}
|
1403 |
+
}
|
1404 |
+
add_action( 'edd_update_payment_status', 'edd_stripe_process_refund', 200, 3 );
|
1405 |
|
1406 |
+
/**
|
1407 |
+
* If selected, refunds a charge in Stripe when creating a new refund record.
|
1408 |
+
* This handles refunds in EDD 3.0+. For EDD 2.x see `edd_stripe_process_refund()`
|
1409 |
+
* @see edd_stripe_process_refund()
|
1410 |
+
*
|
1411 |
+
* @since 2.8.7
|
1412 |
+
*
|
1413 |
+
* @param int $order_id ID of the order we're processing a refund for.
|
1414 |
+
* @param int $refund_id ID of the newly created refund record.
|
1415 |
+
* @param bool $all_refunded Whether or not this was a full refund.
|
1416 |
+
*/
|
1417 |
+
function edd_stripe_maybe_refund_charge( $order_id, $refund_id, $all_refunded ) {
|
1418 |
+
if ( ! current_user_can( 'edit_shop_payments', $order_id ) ) {
|
1419 |
+
return;
|
1420 |
+
}
|
1421 |
|
1422 |
+
if ( empty( $_POST['data'] ) ) {
|
1423 |
+
return;
|
|
|
|
|
|
|
|
|
1424 |
}
|
1425 |
|
1426 |
+
$order = edd_get_order( $order_id );
|
1427 |
+
if ( empty( $order->gateway ) || 'stripe' !== $order->gateway ) {
|
1428 |
return;
|
1429 |
}
|
1430 |
|
1431 |
+
edd_debug_log( sprintf( 'Stripe - Maybe processing refund for order #%d.', $order_id ) );
|
|
|
|
|
|
|
1432 |
|
1433 |
+
// Get our data out of the serialized string.
|
1434 |
+
parse_str( $_POST['data'], $form_data );
|
1435 |
|
1436 |
+
if ( empty( $form_data['edd-stripe-refund'] ) ) {
|
1437 |
+
edd_debug_log( 'Stripe - Exiting refund process, as checkbox was not selected.' );
|
1438 |
|
1439 |
+
edd_add_note( array(
|
1440 |
+
'object_id' => $order_id,
|
1441 |
+
'object_type' => 'order',
|
1442 |
+
'user_id' => is_admin() ? get_current_user_id() : 0,
|
1443 |
+
'content' => __( 'Charge not refunded in Stripe, as checkbox was not selected.', 'easy-digital-downloads' )
|
1444 |
+
) );
|
|
|
|
|
1445 |
|
1446 |
+
return;
|
|
|
1447 |
}
|
1448 |
|
1449 |
+
edd_debug_log( 'Stripe - Refund checkbox was selected, proceeding to refund charge.' );
|
1450 |
+
|
1451 |
+
$refund = edd_get_order( $refund_id );
|
1452 |
+
if ( empty( $refund->total ) ) {
|
1453 |
+
edd_debug_log( sprintf(
|
1454 |
+
'Stripe - Exiting refund for order #%d - refund total is empty.',
|
1455 |
+
$order_id
|
1456 |
+
) );
|
1457 |
+
|
1458 |
+
return;
|
1459 |
+
}
|
1460 |
+
|
1461 |
+
try {
|
1462 |
+
edd_refund_stripe_purchase( $order, $refund );
|
1463 |
+
} catch ( \Exception $e ) {
|
1464 |
+
edd_debug_log( sprintf( 'Exception thrown while refunding order #%d. Message: %s', $order_id, $e->getMessage() ) );
|
1465 |
+
}
|
1466 |
}
|
1467 |
+
add_action( 'edd_refund_order', 'edd_stripe_maybe_refund_charge', 10, 3 );
|
includes/gateways/stripe/includes/payment-methods/buy-now/functions.php
CHANGED
@@ -13,6 +13,10 @@
|
|
13 |
* @return boolean
|
14 |
*/
|
15 |
function edds_buy_now_is_enabled() {
|
|
|
|
|
|
|
|
|
16 |
// Check if the shop supports Buy Now.
|
17 |
$shop_supports = edd_shop_supports_buy_now();
|
18 |
|
13 |
* @return boolean
|
14 |
*/
|
15 |
function edds_buy_now_is_enabled() {
|
16 |
+
if ( false === edds_is_gateway_active() ) {
|
17 |
+
return false;
|
18 |
+
}
|
19 |
+
|
20 |
// Check if the shop supports Buy Now.
|
21 |
$shop_supports = edd_shop_supports_buy_now();
|
22 |
|
includes/gateways/stripe/includes/payment-methods/buy-now/shortcode.php
CHANGED
@@ -87,19 +87,3 @@ function edd_stripe_purchase_link_atts( $args ) {
|
|
87 |
return $args;
|
88 |
}
|
89 |
add_filter( 'edd_purchase_link_args', 'edd_stripe_purchase_link_atts', 10 );
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Disables the Buy Now button behavior if Stripe's "Buy Now" is not supported.
|
93 |
-
*
|
94 |
-
* @since 2.8
|
95 |
-
* @param string $button_behavior The current cart button behavior.
|
96 |
-
* @return string
|
97 |
-
*/
|
98 |
-
function edds_maybe_disable_buy_now_button( $button_behavior ) {
|
99 |
-
if ( ! edds_buy_now_is_enabled() ) {
|
100 |
-
return 'add_to_cart';
|
101 |
-
}
|
102 |
-
|
103 |
-
return $button_behavior;
|
104 |
-
}
|
105 |
-
add_filter( 'edd_get_download_button_behavior', 'edds_maybe_disable_buy_now_button' );
|
87 |
return $args;
|
88 |
}
|
89 |
add_filter( 'edd_purchase_link_args', 'edd_stripe_purchase_link_atts', 10 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php
CHANGED
@@ -25,59 +25,65 @@ function edds_prb_add_settings( $settings ) {
|
|
25 |
return $settings;
|
26 |
}
|
27 |
|
28 |
-
|
29 |
-
array(
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
__( 'See our %1$sdocumentation%2$s for more information.', 'easy-digital-downloads' ),
|
49 |
-
'<a href="' . esc_url( edds_documentation_route( 'stripe-express-checkout' ) ) . '" target="_blank" rel="noopener noreferrer">',
|
50 |
'</a>'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
)
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
)
|
54 |
),
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
'
|
59 |
-
'
|
60 |
-
|
61 |
-
'rel' => true,
|
62 |
),
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
__( 'Single %s', 'easy-digital-downloads' ),
|
70 |
-
edd_get_label_singular()
|
71 |
-
),
|
72 |
-
/** translators: %s Download noun */
|
73 |
-
'archive' => sprintf(
|
74 |
-
__( '%s Archive (includes <code>[downloads]</code> shortcode)', 'easy-digital-downloads' ),
|
75 |
-
edd_get_label_singular()
|
76 |
),
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
);
|
81 |
|
82 |
$position = array_search(
|
83 |
'stripe_statement_descriptor',
|
@@ -95,6 +101,37 @@ function edds_prb_add_settings( $settings ) {
|
|
95 |
}
|
96 |
add_filter( 'edd_settings_gateways', 'edds_prb_add_settings', 20 );
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
/**
|
99 |
* Force "Payment Request Buttons" to be disabled if taxes are enabled.
|
100 |
*
|
25 |
return $settings;
|
26 |
}
|
27 |
|
28 |
+
if ( true === edd_use_taxes() ) {
|
29 |
+
$prb_settings = array(
|
30 |
+
array(
|
31 |
+
'id' => 'stripe_prb_taxes',
|
32 |
+
'name' => __( 'Apple Pay/Google Pay', 'easy-digital-downloads' ),
|
33 |
+
'type' => 'edds_stripe_prb_taxes',
|
34 |
+
),
|
35 |
+
);
|
36 |
+
} else {
|
37 |
+
$prb_settings = array(
|
38 |
+
array(
|
39 |
+
'id' => 'stripe_prb',
|
40 |
+
'name' => __( 'Apple Pay/Google Pay', 'easy-digital-downloads' ),
|
41 |
+
'desc' => wp_kses(
|
42 |
+
(
|
43 |
+
sprintf(
|
44 |
+
/* translators: %1$s Opening anchor tag, do not translate. %2$s Opening anchor tag, do not translate. %3$s Closing anchor tag, do not translate. */
|
45 |
+
__( '"Express Checkout" via Apple Pay, Google Pay, or Microsoft Pay digital wallets. By using Apple Pay, you agree to %1$sStripe%3$s and %2$sApple\'s%3$s terms of service.', 'easy-digital-downloads' ),
|
46 |
+
'<a href="https://stripe.com/apple-pay/legal" target="_blank" rel="noopener noreferrer">',
|
47 |
+
'<a href="https://developer.apple.com/apple-pay/acceptable-use-guidelines-for-websites/" target="_blank" rel="noopener noreferrer">',
|
|
|
|
|
48 |
'</a>'
|
49 |
+
) . (
|
50 |
+
edd_is_test_mode()
|
51 |
+
? '<br /><strong>' . __( 'Apple Pay is not available in Test Mode.', 'easy-digital-downloads' ) . '</strong> ' . sprintf(
|
52 |
+
/* translators: %1$s Opening anchor tag, do not translate. %2$s Opening anchor tag, do not translate. */
|
53 |
+
__( 'See our %1$sdocumentation%2$s for more information.', 'easy-digital-downloads' ),
|
54 |
+
'<a href="' . esc_url( edds_documentation_route( 'stripe-express-checkout' ) ) . '" target="_blank" rel="noopener noreferrer">',
|
55 |
+
'</a>'
|
56 |
+
)
|
57 |
+
: ''
|
58 |
)
|
59 |
+
),
|
60 |
+
array(
|
61 |
+
'br' => true,
|
62 |
+
'strong' => true,
|
63 |
+
'a' => array(
|
64 |
+
'href' => true,
|
65 |
+
'target' => true,
|
66 |
+
'rel' => true,
|
67 |
+
),
|
68 |
)
|
69 |
),
|
70 |
+
'type' => 'multicheck',
|
71 |
+
'options' => array(
|
72 |
+
/** translators: %s Download noun */
|
73 |
+
'single' => sprintf(
|
74 |
+
__( 'Single %s', 'easy-digital-downloads' ),
|
75 |
+
edd_get_label_singular()
|
|
|
76 |
),
|
77 |
+
/** translators: %s Download noun */
|
78 |
+
'archive' => sprintf(
|
79 |
+
__( '%s Archive (includes <code>[downloads]</code> shortcode)', 'easy-digital-downloads' ),
|
80 |
+
edd_get_label_singular()
|
81 |
+
),
|
82 |
+
'checkout' => __( 'Checkout', 'easy-digital-downloads' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
),
|
84 |
+
)
|
85 |
+
);
|
86 |
+
}
|
|
|
87 |
|
88 |
$position = array_search(
|
89 |
'stripe_statement_descriptor',
|
101 |
}
|
102 |
add_filter( 'edd_settings_gateways', 'edds_prb_add_settings', 20 );
|
103 |
|
104 |
+
/**
|
105 |
+
* Removes multicheck options and outputs a message about "Express Checkout" incompatibility with taxes.
|
106 |
+
*
|
107 |
+
* @since 2.8.7
|
108 |
+
*/
|
109 |
+
function edd_edds_stripe_prb_taxes_callback() {
|
110 |
+
echo esc_html__(
|
111 |
+
'This feature is not available when taxes are enabled.',
|
112 |
+
'easy-digital-downloads'
|
113 |
+
) . ' ';
|
114 |
+
|
115 |
+
echo wp_kses(
|
116 |
+
sprintf(
|
117 |
+
/* translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. */
|
118 |
+
__(
|
119 |
+
'See the %1$sExpress Checkout documentation%2$s for more information.',
|
120 |
+
'easy-digital-downloads'
|
121 |
+
),
|
122 |
+
'<a href="' . esc_url( edds_documentation_route( 'stripe-express-checkout' ) ) . '#edds-prb-faqs" target="_blank" rel="noopener noreferrer">',
|
123 |
+
'</a>'
|
124 |
+
),
|
125 |
+
array(
|
126 |
+
'a' => array(
|
127 |
+
'href' => true,
|
128 |
+
'target' => true,
|
129 |
+
'rel' => true,
|
130 |
+
),
|
131 |
+
)
|
132 |
+
);
|
133 |
+
}
|
134 |
+
|
135 |
/**
|
136 |
* Force "Payment Request Buttons" to be disabled if taxes are enabled.
|
137 |
*
|
includes/gateways/stripe/includes/scripts.php
CHANGED
@@ -70,6 +70,9 @@ function edd_stripe_js( $force_load_scripts = false ) {
|
|
70 |
'publishable_key' => trim( $publishable_key ),
|
71 |
'is_ajaxed' => edd_is_ajax_enabled() ? 'true' : 'false',
|
72 |
'currency' => edd_get_currency(),
|
|
|
|
|
|
|
73 |
'locale' => edds_get_stripe_checkout_locale(),
|
74 |
'is_zero_decimal' => edds_is_zero_decimal_currency() ? 'true' : 'false',
|
75 |
'checkout' => edd_get_option( 'stripe_checkout' ) ? 'true' : 'false',
|
@@ -90,6 +93,7 @@ function edd_stripe_js( $force_load_scripts = false ) {
|
|
90 |
'elementsOptions' => edds_get_stripe_elements_options(),
|
91 |
'elementsSplitFields' => '1' === edd_get_option( 'stripe_split_payment_fields', false ) ? 'true' : 'false',
|
92 |
'isTestMode' => edd_is_test_mode() ? 'true' : 'false',
|
|
|
93 |
) );
|
94 |
|
95 |
wp_localize_script( 'edd-stripe-js', 'edd_stripe_vars', $stripe_vars );
|
@@ -126,6 +130,11 @@ add_action( 'wp_enqueue_scripts', 'edd_stripe_css', 100 );
|
|
126 |
*/
|
127 |
function edd_stripe_admin_js( $payment_id = 0 ) {
|
128 |
|
|
|
|
|
|
|
|
|
|
|
129 |
if( 'stripe' !== edd_get_payment_gateway( $payment_id ) ) {
|
130 |
return;
|
131 |
}
|
70 |
'publishable_key' => trim( $publishable_key ),
|
71 |
'is_ajaxed' => edd_is_ajax_enabled() ? 'true' : 'false',
|
72 |
'currency' => edd_get_currency(),
|
73 |
+
// @todo Replace with country code derived from Stripe Account information if available.
|
74 |
+
// @link https://github.com/easydigitaldownloads/edd-stripe/issues/654
|
75 |
+
'country' => edd_get_option( 'base_country', 'US' ),
|
76 |
'locale' => edds_get_stripe_checkout_locale(),
|
77 |
'is_zero_decimal' => edds_is_zero_decimal_currency() ? 'true' : 'false',
|
78 |
'checkout' => edd_get_option( 'stripe_checkout' ) ? 'true' : 'false',
|
93 |
'elementsOptions' => edds_get_stripe_elements_options(),
|
94 |
'elementsSplitFields' => '1' === edd_get_option( 'stripe_split_payment_fields', false ) ? 'true' : 'false',
|
95 |
'isTestMode' => edd_is_test_mode() ? 'true' : 'false',
|
96 |
+
'checkoutHasPaymentRequest' => edds_prb_is_enabled( 'checkout' ) ? 'true' : 'false',
|
97 |
) );
|
98 |
|
99 |
wp_localize_script( 'edd-stripe-js', 'edd_stripe_vars', $stripe_vars );
|
130 |
*/
|
131 |
function edd_stripe_admin_js( $payment_id = 0 ) {
|
132 |
|
133 |
+
// Bail if on EDD 3.0+.
|
134 |
+
if ( function_exists( 'edd_get_order' ) ) {
|
135 |
+
return;
|
136 |
+
}
|
137 |
+
|
138 |
if( 'stripe' !== edd_get_payment_gateway( $payment_id ) ) {
|
139 |
return;
|
140 |
}
|
includes/gateways/stripe/includes/template-functions.php
CHANGED
@@ -712,7 +712,7 @@ function edd_stripe_zip_and_country() {
|
|
712 |
$existing_cards = edd_stripe_get_existing_cards( get_current_user_id() );
|
713 |
if ( empty( $existing_cards ) ) {
|
714 |
|
715 |
-
$user_address = edd_get_customer_address(
|
716 |
|
717 |
foreach( $customer['address'] as $key => $field ) {
|
718 |
|
712 |
$existing_cards = edd_stripe_get_existing_cards( get_current_user_id() );
|
713 |
if ( empty( $existing_cards ) ) {
|
714 |
|
715 |
+
$user_address = edd_get_customer_address( get_current_user_id() );
|
716 |
|
717 |
foreach( $customer['address'] as $key => $field ) {
|
718 |
|
includes/gateways/stripe/vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit94680946e20b5dc0fd3aec2e7fc79212::getLoader();
|
includes/gateways/stripe/vendor/composer/ClassLoader.php
CHANGED
@@ -37,11 +37,13 @@ namespace Composer\Autoload;
|
|
37 |
*
|
38 |
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
-
* @see
|
41 |
-
* @see
|
42 |
*/
|
43 |
class ClassLoader
|
44 |
{
|
|
|
|
|
45 |
// PSR-4
|
46 |
private $prefixLengthsPsr4 = array();
|
47 |
private $prefixDirsPsr4 = array();
|
@@ -57,10 +59,17 @@ class ClassLoader
|
|
57 |
private $missingClasses = array();
|
58 |
private $apcuPrefix;
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
public function getPrefixes()
|
61 |
{
|
62 |
if (!empty($this->prefixesPsr0)) {
|
63 |
-
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
64 |
}
|
65 |
|
66 |
return array();
|
@@ -300,6 +309,17 @@ class ClassLoader
|
|
300 |
public function register($prepend = false)
|
301 |
{
|
302 |
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
}
|
304 |
|
305 |
/**
|
@@ -308,6 +328,10 @@ class ClassLoader
|
|
308 |
public function unregister()
|
309 |
{
|
310 |
spl_autoload_unregister(array($this, 'loadClass'));
|
|
|
|
|
|
|
|
|
311 |
}
|
312 |
|
313 |
/**
|
@@ -367,6 +391,16 @@ class ClassLoader
|
|
367 |
return $file;
|
368 |
}
|
369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
private function findFileWithExtension($class, $ext)
|
371 |
{
|
372 |
// PSR-4 lookup
|
37 |
*
|
38 |
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
+
* @see https://www.php-fig.org/psr/psr-0/
|
41 |
+
* @see https://www.php-fig.org/psr/psr-4/
|
42 |
*/
|
43 |
class ClassLoader
|
44 |
{
|
45 |
+
private $vendorDir;
|
46 |
+
|
47 |
// PSR-4
|
48 |
private $prefixLengthsPsr4 = array();
|
49 |
private $prefixDirsPsr4 = array();
|
59 |
private $missingClasses = array();
|
60 |
private $apcuPrefix;
|
61 |
|
62 |
+
private static $registeredLoaders = array();
|
63 |
+
|
64 |
+
public function __construct($vendorDir = null)
|
65 |
+
{
|
66 |
+
$this->vendorDir = $vendorDir;
|
67 |
+
}
|
68 |
+
|
69 |
public function getPrefixes()
|
70 |
{
|
71 |
if (!empty($this->prefixesPsr0)) {
|
72 |
+
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
73 |
}
|
74 |
|
75 |
return array();
|
309 |
public function register($prepend = false)
|
310 |
{
|
311 |
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
312 |
+
|
313 |
+
if (null === $this->vendorDir) {
|
314 |
+
return;
|
315 |
+
}
|
316 |
+
|
317 |
+
if ($prepend) {
|
318 |
+
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
319 |
+
} else {
|
320 |
+
unset(self::$registeredLoaders[$this->vendorDir]);
|
321 |
+
self::$registeredLoaders[$this->vendorDir] = $this;
|
322 |
+
}
|
323 |
}
|
324 |
|
325 |
/**
|
328 |
public function unregister()
|
329 |
{
|
330 |
spl_autoload_unregister(array($this, 'loadClass'));
|
331 |
+
|
332 |
+
if (null !== $this->vendorDir) {
|
333 |
+
unset(self::$registeredLoaders[$this->vendorDir]);
|
334 |
+
}
|
335 |
}
|
336 |
|
337 |
/**
|
391 |
return $file;
|
392 |
}
|
393 |
|
394 |
+
/**
|
395 |
+
* Returns the currently registered loaders indexed by their corresponding vendor directories.
|
396 |
+
*
|
397 |
+
* @return self[]
|
398 |
+
*/
|
399 |
+
public static function getRegisteredLoaders()
|
400 |
+
{
|
401 |
+
return self::$registeredLoaders;
|
402 |
+
}
|
403 |
+
|
404 |
private function findFileWithExtension($class, $ext)
|
405 |
{
|
406 |
// PSR-4 lookup
|
includes/gateways/stripe/vendor/composer/InstalledVersions.php
ADDED
@@ -0,0 +1,315 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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 |
+
|
23 |
+
class InstalledVersions
|
24 |
+
{
|
25 |
+
private static $installed = array (
|
26 |
+
'root' =>
|
27 |
+
array (
|
28 |
+
'pretty_version' => 'dev-master',
|
29 |
+
'version' => 'dev-master',
|
30 |
+
'aliases' =>
|
31 |
+
array (
|
32 |
+
),
|
33 |
+
'reference' => '3cfeb0e1146f696f5c924aea4c3ddc87a43959f8',
|
34 |
+
'name' => 'easy-digital-downloads/edd-stripe',
|
35 |
+
),
|
36 |
+
'versions' =>
|
37 |
+
array (
|
38 |
+
'composer/installers' =>
|
39 |
+
array (
|
40 |
+
'pretty_version' => 'v1.11.0',
|
41 |
+
'version' => '1.11.0.0',
|
42 |
+
'aliases' =>
|
43 |
+
array (
|
44 |
+
),
|
45 |
+
'reference' => 'ae03311f45dfe194412081526be2e003960df74b',
|
46 |
+
),
|
47 |
+
'easy-digital-downloads/edd-stripe' =>
|
48 |
+
array (
|
49 |
+
'pretty_version' => 'dev-master',
|
50 |
+
'version' => 'dev-master',
|
51 |
+
'aliases' =>
|
52 |
+
array (
|
53 |
+
),
|
54 |
+
'reference' => '3cfeb0e1146f696f5c924aea4c3ddc87a43959f8',
|
55 |
+
),
|
56 |
+
'roundcube/plugin-installer' =>
|
57 |
+
array (
|
58 |
+
'replaced' =>
|
59 |
+
array (
|
60 |
+
0 => '*',
|
61 |
+
),
|
62 |
+
),
|
63 |
+
'shama/baton' =>
|
64 |
+
array (
|
65 |
+
'replaced' =>
|
66 |
+
array (
|
67 |
+
0 => '*',
|
68 |
+
),
|
69 |
+
),
|
70 |
+
'stripe/stripe-php' =>
|
71 |
+
array (
|
72 |
+
'pretty_version' => 'v7.47.0',
|
73 |
+
'version' => '7.47.0.0',
|
74 |
+
'aliases' =>
|
75 |
+
array (
|
76 |
+
),
|
77 |
+
'reference' => 'b51656cb398d081fcee53a76f6edb8fd5c1a5306',
|
78 |
+
),
|
79 |
+
),
|
80 |
+
);
|
81 |
+
private static $canGetVendors;
|
82 |
+
private static $installedByVendor = array();
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
|
89 |
+
|
90 |
+
public static function getInstalledPackages()
|
91 |
+
{
|
92 |
+
$packages = array();
|
93 |
+
foreach (self::getInstalled() as $installed) {
|
94 |
+
$packages[] = array_keys($installed['versions']);
|
95 |
+
}
|
96 |
+
|
97 |
+
|
98 |
+
if (1 === \count($packages)) {
|
99 |
+
return $packages[0];
|
100 |
+
}
|
101 |
+
|
102 |
+
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
public static function isInstalled($packageName)
|
114 |
+
{
|
115 |
+
foreach (self::getInstalled() as $installed) {
|
116 |
+
if (isset($installed['versions'][$packageName])) {
|
117 |
+
return true;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
return false;
|
122 |
+
}
|
123 |
+
|
124 |
+
|
125 |
+
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
|
132 |
+
|
133 |
+
|
134 |
+
|
135 |
+
|
136 |
+
|
137 |
+
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
138 |
+
{
|
139 |
+
$constraint = $parser->parseConstraints($constraint);
|
140 |
+
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
141 |
+
|
142 |
+
return $provided->matches($constraint);
|
143 |
+
}
|
144 |
+
|
145 |
+
|
146 |
+
|
147 |
+
|
148 |
+
|
149 |
+
|
150 |
+
|
151 |
+
|
152 |
+
|
153 |
+
|
154 |
+
public static function getVersionRanges($packageName)
|
155 |
+
{
|
156 |
+
foreach (self::getInstalled() as $installed) {
|
157 |
+
if (!isset($installed['versions'][$packageName])) {
|
158 |
+
continue;
|
159 |
+
}
|
160 |
+
|
161 |
+
$ranges = array();
|
162 |
+
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
163 |
+
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
164 |
+
}
|
165 |
+
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
166 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
167 |
+
}
|
168 |
+
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
169 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
170 |
+
}
|
171 |
+
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
172 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
173 |
+
}
|
174 |
+
|
175 |
+
return implode(' || ', $ranges);
|
176 |
+
}
|
177 |
+
|
178 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
179 |
+
}
|
180 |
+
|
181 |
+
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
public static function getVersion($packageName)
|
186 |
+
{
|
187 |
+
foreach (self::getInstalled() as $installed) {
|
188 |
+
if (!isset($installed['versions'][$packageName])) {
|
189 |
+
continue;
|
190 |
+
}
|
191 |
+
|
192 |
+
if (!isset($installed['versions'][$packageName]['version'])) {
|
193 |
+
return null;
|
194 |
+
}
|
195 |
+
|
196 |
+
return $installed['versions'][$packageName]['version'];
|
197 |
+
}
|
198 |
+
|
199 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
200 |
+
}
|
201 |
+
|
202 |
+
|
203 |
+
|
204 |
+
|
205 |
+
|
206 |
+
public static function getPrettyVersion($packageName)
|
207 |
+
{
|
208 |
+
foreach (self::getInstalled() as $installed) {
|
209 |
+
if (!isset($installed['versions'][$packageName])) {
|
210 |
+
continue;
|
211 |
+
}
|
212 |
+
|
213 |
+
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
214 |
+
return null;
|
215 |
+
}
|
216 |
+
|
217 |
+
return $installed['versions'][$packageName]['pretty_version'];
|
218 |
+
}
|
219 |
+
|
220 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
221 |
+
}
|
222 |
+
|
223 |
+
|
224 |
+
|
225 |
+
|
226 |
+
|
227 |
+
public static function getReference($packageName)
|
228 |
+
{
|
229 |
+
foreach (self::getInstalled() as $installed) {
|
230 |
+
if (!isset($installed['versions'][$packageName])) {
|
231 |
+
continue;
|
232 |
+
}
|
233 |
+
|
234 |
+
if (!isset($installed['versions'][$packageName]['reference'])) {
|
235 |
+
return null;
|
236 |
+
}
|
237 |
+
|
238 |
+
return $installed['versions'][$packageName]['reference'];
|
239 |
+
}
|
240 |
+
|
241 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
242 |
+
}
|
243 |
+
|
244 |
+
|
245 |
+
|
246 |
+
|
247 |
+
|
248 |
+
public static function getRootPackage()
|
249 |
+
{
|
250 |
+
$installed = self::getInstalled();
|
251 |
+
|
252 |
+
return $installed[0]['root'];
|
253 |
+
}
|
254 |
+
|
255 |
+
|
256 |
+
|
257 |
+
|
258 |
+
|
259 |
+
|
260 |
+
|
261 |
+
public static function getRawData()
|
262 |
+
{
|
263 |
+
return self::$installed;
|
264 |
+
}
|
265 |
+
|
266 |
+
|
267 |
+
|
268 |
+
|
269 |
+
|
270 |
+
|
271 |
+
|
272 |
+
|
273 |
+
|
274 |
+
|
275 |
+
|
276 |
+
|
277 |
+
|
278 |
+
|
279 |
+
|
280 |
+
|
281 |
+
|
282 |
+
|
283 |
+
|
284 |
+
public static function reload($data)
|
285 |
+
{
|
286 |
+
self::$installed = $data;
|
287 |
+
self::$installedByVendor = array();
|
288 |
+
}
|
289 |
+
|
290 |
+
|
291 |
+
|
292 |
+
|
293 |
+
private static function getInstalled()
|
294 |
+
{
|
295 |
+
if (null === self::$canGetVendors) {
|
296 |
+
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
297 |
+
}
|
298 |
+
|
299 |
+
$installed = array();
|
300 |
+
|
301 |
+
if (self::$canGetVendors) {
|
302 |
+
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
303 |
+
if (isset(self::$installedByVendor[$vendorDir])) {
|
304 |
+
$installed[] = self::$installedByVendor[$vendorDir];
|
305 |
+
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
306 |
+
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
|
307 |
+
}
|
308 |
+
}
|
309 |
+
}
|
310 |
+
|
311 |
+
$installed[] = self::$installed;
|
312 |
+
|
313 |
+
return $installed;
|
314 |
+
}
|
315 |
+
}
|
includes/gateways/stripe/vendor/composer/autoload_classmap.php
CHANGED
@@ -6,4 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
9 |
);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
10 |
);
|
includes/gateways/stripe/vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -13,21 +13,26 @@ class ComposerAutoloaderInitdfbee5702addcbc9a3b31d6d120a387d
|
|
13 |
}
|
14 |
}
|
15 |
|
|
|
|
|
|
|
16 |
public static function getLoader()
|
17 |
{
|
18 |
if (null !== self::$loader) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
-
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit94680946e20b5dc0fd3aec2e7fc79212
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
13 |
}
|
14 |
}
|
15 |
|
16 |
+
/**
|
17 |
+
* @return \Composer\Autoload\ClassLoader
|
18 |
+
*/
|
19 |
public static function getLoader()
|
20 |
{
|
21 |
if (null !== self::$loader) {
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
require __DIR__ . '/platform_check.php';
|
26 |
+
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInit94680946e20b5dc0fd3aec2e7fc79212', 'loadClassLoader'), true, true);
|
28 |
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit94680946e20b5dc0fd3aec2e7fc79212', 'loadClassLoader'));
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
+
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit94680946e20b5dc0fd3aec2e7fc79212::getInitializer($loader));
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
includes/gateways/stripe/vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
@@ -28,11 +28,16 @@ class ComposerStaticInitdfbee5702addcbc9a3b31d6d120a387d
|
|
28 |
),
|
29 |
);
|
30 |
|
|
|
|
|
|
|
|
|
31 |
public static function getInitializer(ClassLoader $loader)
|
32 |
{
|
33 |
return \Closure::bind(function () use ($loader) {
|
34 |
-
$loader->prefixLengthsPsr4 =
|
35 |
-
$loader->prefixDirsPsr4 =
|
|
|
36 |
|
37 |
}, null, ClassLoader::class);
|
38 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit94680946e20b5dc0fd3aec2e7fc79212
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
28 |
),
|
29 |
);
|
30 |
|
31 |
+
public static $classMap = array (
|
32 |
+
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
33 |
+
);
|
34 |
+
|
35 |
public static function getInitializer(ClassLoader $loader)
|
36 |
{
|
37 |
return \Closure::bind(function () use ($loader) {
|
38 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit94680946e20b5dc0fd3aec2e7fc79212::$prefixLengthsPsr4;
|
39 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit94680946e20b5dc0fd3aec2e7fc79212::$prefixDirsPsr4;
|
40 |
+
$loader->classMap = ComposerStaticInit94680946e20b5dc0fd3aec2e7fc79212::$classMap;
|
41 |
|
42 |
}, null, ClassLoader::class);
|
43 |
}
|
includes/gateways/stripe/vendor/composer/installed.json
CHANGED
@@ -1,163 +1,223 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
"
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
},
|
11 |
-
|
12 |
-
"
|
13 |
-
"
|
14 |
-
"
|
15 |
-
"
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
"
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
"
|
33 |
-
"
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
{
|
48 |
-
"
|
49 |
-
|
50 |
-
|
51 |
-
}
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
"
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
"
|
63 |
-
"
|
64 |
-
"
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
"
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
"
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
"grav",
|
80 |
-
"installer",
|
81 |
-
"joomla",
|
82 |
-
"kohana",
|
83 |
-
"laravel",
|
84 |
-
"lithium",
|
85 |
-
"magento",
|
86 |
-
"mako",
|
87 |
-
"mediawiki",
|
88 |
-
"modulework",
|
89 |
-
"moodle",
|
90 |
-
"phpbb",
|
91 |
-
"piwik",
|
92 |
-
"ppi",
|
93 |
-
"puppet",
|
94 |
-
"roundcube",
|
95 |
-
"shopware",
|
96 |
-
"silverstripe",
|
97 |
-
"symfony",
|
98 |
-
"typo3",
|
99 |
-
"wordpress",
|
100 |
-
"zend",
|
101 |
-
"zikula"
|
102 |
-
]
|
103 |
-
},
|
104 |
-
{
|
105 |
-
"name": "stripe/stripe-php",
|
106 |
-
"version": "v7.47.0",
|
107 |
-
"version_normalized": "7.47.0.0",
|
108 |
-
"source": {
|
109 |
-
"type": "git",
|
110 |
-
"url": "https://github.com/stripe/stripe-php.git",
|
111 |
-
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306"
|
112 |
-
},
|
113 |
-
"dist": {
|
114 |
-
"type": "zip",
|
115 |
-
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/b51656cb398d081fcee53a76f6edb8fd5c1a5306",
|
116 |
-
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306",
|
117 |
-
"shasum": ""
|
118 |
-
},
|
119 |
-
"require": {
|
120 |
-
"ext-curl": "*",
|
121 |
-
"ext-json": "*",
|
122 |
-
"ext-mbstring": "*",
|
123 |
-
"php": ">=5.6.0"
|
124 |
-
},
|
125 |
-
"require-dev": {
|
126 |
-
"friendsofphp/php-cs-fixer": "2.16.1",
|
127 |
-
"php-coveralls/php-coveralls": "^2.1",
|
128 |
-
"phpunit/phpunit": "^5.7",
|
129 |
-
"squizlabs/php_codesniffer": "^3.3",
|
130 |
-
"symfony/process": "~3.4"
|
131 |
-
},
|
132 |
-
"time": "2020-08-13T22:35:56+00:00",
|
133 |
-
"type": "library",
|
134 |
-
"extra": {
|
135 |
-
"branch-alias": {
|
136 |
-
"dev-master": "2.0-dev"
|
137 |
-
}
|
138 |
-
},
|
139 |
-
"installation-source": "dist",
|
140 |
-
"autoload": {
|
141 |
-
"psr-4": {
|
142 |
-
"Stripe\\": "lib/"
|
143 |
-
}
|
144 |
-
},
|
145 |
-
"notification-url": "https://packagist.org/downloads/",
|
146 |
-
"license": [
|
147 |
-
"MIT"
|
148 |
-
],
|
149 |
-
"authors": [
|
150 |
-
{
|
151 |
-
"name": "Stripe and contributors",
|
152 |
-
"homepage": "https://github.com/stripe/stripe-php/contributors"
|
153 |
-
}
|
154 |
-
],
|
155 |
-
"description": "Stripe PHP Library",
|
156 |
-
"homepage": "https://stripe.com/",
|
157 |
-
"keywords": [
|
158 |
-
"api",
|
159 |
-
"payment processing",
|
160 |
-
"stripe"
|
161 |
-
]
|
162 |
-
}
|
163 |
-
]
|
1 |
+
{
|
2 |
+
"packages": [
|
3 |
+
{
|
4 |
+
"name": "composer/installers",
|
5 |
+
"version": "v1.11.0",
|
6 |
+
"version_normalized": "1.11.0.0",
|
7 |
+
"source": {
|
8 |
+
"type": "git",
|
9 |
+
"url": "https://github.com/composer/installers.git",
|
10 |
+
"reference": "ae03311f45dfe194412081526be2e003960df74b"
|
11 |
+
},
|
12 |
+
"dist": {
|
13 |
+
"type": "zip",
|
14 |
+
"url": "https://api.github.com/repos/composer/installers/zipball/ae03311f45dfe194412081526be2e003960df74b",
|
15 |
+
"reference": "ae03311f45dfe194412081526be2e003960df74b",
|
16 |
+
"shasum": ""
|
17 |
+
},
|
18 |
+
"require": {
|
19 |
+
"composer-plugin-api": "^1.0 || ^2.0"
|
20 |
+
},
|
21 |
+
"replace": {
|
22 |
+
"roundcube/plugin-installer": "*",
|
23 |
+
"shama/baton": "*"
|
24 |
+
},
|
25 |
+
"require-dev": {
|
26 |
+
"composer/composer": "1.6.* || ^2.0",
|
27 |
+
"composer/semver": "^1 || ^3",
|
28 |
+
"phpstan/phpstan": "^0.12.55",
|
29 |
+
"phpstan/phpstan-phpunit": "^0.12.16",
|
30 |
+
"symfony/phpunit-bridge": "^4.2 || ^5",
|
31 |
+
"symfony/process": "^2.3"
|
32 |
+
},
|
33 |
+
"time": "2021-04-28T06:42:17+00:00",
|
34 |
+
"type": "composer-plugin",
|
35 |
+
"extra": {
|
36 |
+
"class": "Composer\\Installers\\Plugin",
|
37 |
+
"branch-alias": {
|
38 |
+
"dev-main": "1.x-dev"
|
39 |
+
}
|
40 |
+
},
|
41 |
+
"installation-source": "dist",
|
42 |
+
"autoload": {
|
43 |
+
"psr-4": {
|
44 |
+
"Composer\\Installers\\": "src/Composer/Installers"
|
45 |
+
}
|
46 |
+
},
|
47 |
+
"notification-url": "https://packagist.org/downloads/",
|
48 |
+
"license": [
|
49 |
+
"MIT"
|
50 |
+
],
|
51 |
+
"authors": [
|
52 |
+
{
|
53 |
+
"name": "Kyle Robinson Young",
|
54 |
+
"email": "kyle@dontkry.com",
|
55 |
+
"homepage": "https://github.com/shama"
|
56 |
+
}
|
57 |
+
],
|
58 |
+
"description": "A multi-framework Composer library installer",
|
59 |
+
"homepage": "https://composer.github.io/installers/",
|
60 |
+
"keywords": [
|
61 |
+
"Craft",
|
62 |
+
"Dolibarr",
|
63 |
+
"Eliasis",
|
64 |
+
"Hurad",
|
65 |
+
"ImageCMS",
|
66 |
+
"Kanboard",
|
67 |
+
"Lan Management System",
|
68 |
+
"MODX Evo",
|
69 |
+
"MantisBT",
|
70 |
+
"Mautic",
|
71 |
+
"Maya",
|
72 |
+
"OXID",
|
73 |
+
"Plentymarkets",
|
74 |
+
"Porto",
|
75 |
+
"RadPHP",
|
76 |
+
"SMF",
|
77 |
+
"Starbug",
|
78 |
+
"Thelia",
|
79 |
+
"Whmcs",
|
80 |
+
"WolfCMS",
|
81 |
+
"agl",
|
82 |
+
"aimeos",
|
83 |
+
"annotatecms",
|
84 |
+
"attogram",
|
85 |
+
"bitrix",
|
86 |
+
"cakephp",
|
87 |
+
"chef",
|
88 |
+
"cockpit",
|
89 |
+
"codeigniter",
|
90 |
+
"concrete5",
|
91 |
+
"croogo",
|
92 |
+
"dokuwiki",
|
93 |
+
"drupal",
|
94 |
+
"eZ Platform",
|
95 |
+
"elgg",
|
96 |
+
"expressionengine",
|
97 |
+
"fuelphp",
|
98 |
+
"grav",
|
99 |
+
"installer",
|
100 |
+
"itop",
|
101 |
+
"joomla",
|
102 |
+
"known",
|
103 |
+
"kohana",
|
104 |
+
"laravel",
|
105 |
+
"lavalite",
|
106 |
+
"lithium",
|
107 |
+
"magento",
|
108 |
+
"majima",
|
109 |
+
"mako",
|
110 |
+
"mediawiki",
|
111 |
+
"miaoxing",
|
112 |
+
"modulework",
|
113 |
+
"modx",
|
114 |
+
"moodle",
|
115 |
+
"osclass",
|
116 |
+
"phpbb",
|
117 |
+
"piwik",
|
118 |
+
"ppi",
|
119 |
+
"processwire",
|
120 |
+
"puppet",
|
121 |
+
"pxcms",
|
122 |
+
"reindex",
|
123 |
+
"roundcube",
|
124 |
+
"shopware",
|
125 |
+
"silverstripe",
|
126 |
+
"sydes",
|
127 |
+
"sylius",
|
128 |
+
"symfony",
|
129 |
+
"tastyigniter",
|
130 |
+
"typo3",
|
131 |
+
"wordpress",
|
132 |
+
"yawik",
|
133 |
+
"zend",
|
134 |
+
"zikula"
|
135 |
+
],
|
136 |
+
"support": {
|
137 |
+
"issues": "https://github.com/composer/installers/issues",
|
138 |
+
"source": "https://github.com/composer/installers/tree/v1.11.0"
|
139 |
+
},
|
140 |
+
"funding": [
|
141 |
+
{
|
142 |
+
"url": "https://packagist.com",
|
143 |
+
"type": "custom"
|
144 |
+
},
|
145 |
+
{
|
146 |
+
"url": "https://github.com/composer",
|
147 |
+
"type": "github"
|
148 |
+
},
|
149 |
+
{
|
150 |
+
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
151 |
+
"type": "tidelift"
|
152 |
+
}
|
153 |
+
],
|
154 |
+
"install-path": "./installers"
|
155 |
},
|
156 |
+
{
|
157 |
+
"name": "stripe/stripe-php",
|
158 |
+
"version": "v7.47.0",
|
159 |
+
"version_normalized": "7.47.0.0",
|
160 |
+
"source": {
|
161 |
+
"type": "git",
|
162 |
+
"url": "https://github.com/stripe/stripe-php.git",
|
163 |
+
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306"
|
164 |
+
},
|
165 |
+
"dist": {
|
166 |
+
"type": "zip",
|
167 |
+
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/b51656cb398d081fcee53a76f6edb8fd5c1a5306",
|
168 |
+
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306",
|
169 |
+
"shasum": ""
|
170 |
+
},
|
171 |
+
"require": {
|
172 |
+
"ext-curl": "*",
|
173 |
+
"ext-json": "*",
|
174 |
+
"ext-mbstring": "*",
|
175 |
+
"php": ">=5.6.0"
|
176 |
+
},
|
177 |
+
"require-dev": {
|
178 |
+
"friendsofphp/php-cs-fixer": "2.16.1",
|
179 |
+
"php-coveralls/php-coveralls": "^2.1",
|
180 |
+
"phpunit/phpunit": "^5.7",
|
181 |
+
"squizlabs/php_codesniffer": "^3.3",
|
182 |
+
"symfony/process": "~3.4"
|
183 |
+
},
|
184 |
+
"time": "2020-08-13T22:35:56+00:00",
|
185 |
+
"type": "library",
|
186 |
+
"extra": {
|
187 |
+
"branch-alias": {
|
188 |
+
"dev-master": "2.0-dev"
|
189 |
+
}
|
190 |
+
},
|
191 |
+
"installation-source": "dist",
|
192 |
+
"autoload": {
|
193 |
+
"psr-4": {
|
194 |
+
"Stripe\\": "lib/"
|
195 |
+
}
|
196 |
+
},
|
197 |
+
"notification-url": "https://packagist.org/downloads/",
|
198 |
+
"license": [
|
199 |
+
"MIT"
|
200 |
+
],
|
201 |
+
"authors": [
|
202 |
+
{
|
203 |
+
"name": "Stripe and contributors",
|
204 |
+
"homepage": "https://github.com/stripe/stripe-php/contributors"
|
205 |
+
}
|
206 |
+
],
|
207 |
+
"description": "Stripe PHP Library",
|
208 |
+
"homepage": "https://stripe.com/",
|
209 |
+
"keywords": [
|
210 |
+
"api",
|
211 |
+
"payment processing",
|
212 |
+
"stripe"
|
213 |
+
],
|
214 |
+
"support": {
|
215 |
+
"issues": "https://github.com/stripe/stripe-php/issues",
|
216 |
+
"source": "https://github.com/stripe/stripe-php/tree/v7.47.0"
|
217 |
+
},
|
218 |
+
"install-path": "../stripe/stripe-php"
|
219 |
+
}
|
220 |
+
],
|
221 |
+
"dev": false,
|
222 |
+
"dev-package-names": []
|
223 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/gateways/stripe/vendor/composer/installed.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php return array (
|
2 |
+
'root' =>
|
3 |
+
array (
|
4 |
+
'pretty_version' => 'dev-master',
|
5 |
+
'version' => 'dev-master',
|
6 |
+
'aliases' =>
|
7 |
+
array (
|
8 |
+
),
|
9 |
+
'reference' => '3cfeb0e1146f696f5c924aea4c3ddc87a43959f8',
|
10 |
+
'name' => 'easy-digital-downloads/edd-stripe',
|
11 |
+
),
|
12 |
+
'versions' =>
|
13 |
+
array (
|
14 |
+
'composer/installers' =>
|
15 |
+
array (
|
16 |
+
'pretty_version' => 'v1.11.0',
|
17 |
+
'version' => '1.11.0.0',
|
18 |
+
'aliases' =>
|
19 |
+
array (
|
20 |
+
),
|
21 |
+
'reference' => 'ae03311f45dfe194412081526be2e003960df74b',
|
22 |
+
),
|
23 |
+
'easy-digital-downloads/edd-stripe' =>
|
24 |
+
array (
|
25 |
+
'pretty_version' => 'dev-master',
|
26 |
+
'version' => 'dev-master',
|
27 |
+
'aliases' =>
|
28 |
+
array (
|
29 |
+
),
|
30 |
+
'reference' => '3cfeb0e1146f696f5c924aea4c3ddc87a43959f8',
|
31 |
+
),
|
32 |
+
'roundcube/plugin-installer' =>
|
33 |
+
array (
|
34 |
+
'replaced' =>
|
35 |
+
array (
|
36 |
+
0 => '*',
|
37 |
+
),
|
38 |
+
),
|
39 |
+
'shama/baton' =>
|
40 |
+
array (
|
41 |
+
'replaced' =>
|
42 |
+
array (
|
43 |
+
0 => '*',
|
44 |
+
),
|
45 |
+
),
|
46 |
+
'stripe/stripe-php' =>
|
47 |
+
array (
|
48 |
+
'pretty_version' => 'v7.47.0',
|
49 |
+
'version' => '7.47.0.0',
|
50 |
+
'aliases' =>
|
51 |
+
array (
|
52 |
+
),
|
53 |
+
'reference' => 'b51656cb398d081fcee53a76f6edb8fd5c1a5306',
|
54 |
+
),
|
55 |
+
),
|
56 |
+
);
|
includes/gateways/stripe/vendor/composer/installers/composer.json
CHANGED
@@ -8,9 +8,11 @@
|
|
8 |
"Aimeos",
|
9 |
"AGL",
|
10 |
"AnnotateCms",
|
|
|
11 |
"Bitrix",
|
12 |
"CakePHP",
|
13 |
"Chef",
|
|
|
14 |
"CodeIgniter",
|
15 |
"concrete5",
|
16 |
"Craft",
|
@@ -19,35 +21,61 @@
|
|
19 |
"Dolibarr",
|
20 |
"Drupal",
|
21 |
"Elgg",
|
|
|
|
|
|
|
22 |
"FuelPHP",
|
23 |
"Grav",
|
24 |
"Hurad",
|
25 |
"ImageCMS",
|
|
|
26 |
"Joomla",
|
|
|
|
|
27 |
"Kohana",
|
|
|
28 |
"Laravel",
|
|
|
29 |
"Lithium",
|
30 |
"Magento",
|
|
|
31 |
"Mako",
|
|
|
32 |
"Mautic",
|
|
|
|
|
33 |
"MODX Evo",
|
34 |
"MediaWiki",
|
|
|
35 |
"OXID",
|
|
|
36 |
"MODULEWork",
|
37 |
"Moodle",
|
38 |
"Piwik",
|
|
|
39 |
"phpBB",
|
|
|
40 |
"PPI",
|
41 |
"Puppet",
|
|
|
|
|
|
|
|
|
42 |
"Roundcube",
|
43 |
"shopware",
|
44 |
"SilverStripe",
|
45 |
"SMF",
|
|
|
|
|
|
|
46 |
"symfony",
|
|
|
47 |
"Thelia",
|
48 |
"TYPO3",
|
|
|
49 |
"WolfCMS",
|
50 |
"WordPress",
|
|
|
51 |
"Zend",
|
52 |
"Zikula"
|
53 |
],
|
@@ -62,10 +90,13 @@
|
|
62 |
"autoload": {
|
63 |
"psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
|
64 |
},
|
|
|
|
|
|
|
65 |
"extra": {
|
66 |
"class": "Composer\\Installers\\Plugin",
|
67 |
"branch-alias": {
|
68 |
-
"dev-
|
69 |
}
|
70 |
},
|
71 |
"replace": {
|
@@ -73,13 +104,18 @@
|
|
73 |
"roundcube/plugin-installer": "*"
|
74 |
},
|
75 |
"require": {
|
76 |
-
"composer-plugin-api": "^1.0"
|
77 |
},
|
78 |
"require-dev": {
|
79 |
-
"composer/composer": "1.0
|
80 |
-
"
|
|
|
|
|
|
|
|
|
81 |
},
|
82 |
"scripts": {
|
83 |
-
"test": "phpunit"
|
|
|
84 |
}
|
85 |
}
|
8 |
"Aimeos",
|
9 |
"AGL",
|
10 |
"AnnotateCms",
|
11 |
+
"Attogram",
|
12 |
"Bitrix",
|
13 |
"CakePHP",
|
14 |
"Chef",
|
15 |
+
"Cockpit",
|
16 |
"CodeIgniter",
|
17 |
"concrete5",
|
18 |
"Craft",
|
21 |
"Dolibarr",
|
22 |
"Drupal",
|
23 |
"Elgg",
|
24 |
+
"Eliasis",
|
25 |
+
"ExpressionEngine",
|
26 |
+
"eZ Platform",
|
27 |
"FuelPHP",
|
28 |
"Grav",
|
29 |
"Hurad",
|
30 |
"ImageCMS",
|
31 |
+
"iTop",
|
32 |
"Joomla",
|
33 |
+
"Kanboard",
|
34 |
+
"Known",
|
35 |
"Kohana",
|
36 |
+
"Lan Management System",
|
37 |
"Laravel",
|
38 |
+
"Lavalite",
|
39 |
"Lithium",
|
40 |
"Magento",
|
41 |
+
"majima",
|
42 |
"Mako",
|
43 |
+
"MantisBT",
|
44 |
"Mautic",
|
45 |
+
"Maya",
|
46 |
+
"MODX",
|
47 |
"MODX Evo",
|
48 |
"MediaWiki",
|
49 |
+
"Miaoxing",
|
50 |
"OXID",
|
51 |
+
"osclass",
|
52 |
"MODULEWork",
|
53 |
"Moodle",
|
54 |
"Piwik",
|
55 |
+
"pxcms",
|
56 |
"phpBB",
|
57 |
+
"Plentymarkets",
|
58 |
"PPI",
|
59 |
"Puppet",
|
60 |
+
"Porto",
|
61 |
+
"ProcessWire",
|
62 |
+
"RadPHP",
|
63 |
+
"ReIndex",
|
64 |
"Roundcube",
|
65 |
"shopware",
|
66 |
"SilverStripe",
|
67 |
"SMF",
|
68 |
+
"Starbug",
|
69 |
+
"SyDES",
|
70 |
+
"Sylius",
|
71 |
"symfony",
|
72 |
+
"TastyIgniter",
|
73 |
"Thelia",
|
74 |
"TYPO3",
|
75 |
+
"WHMCS",
|
76 |
"WolfCMS",
|
77 |
"WordPress",
|
78 |
+
"YAWIK",
|
79 |
"Zend",
|
80 |
"Zikula"
|
81 |
],
|
90 |
"autoload": {
|
91 |
"psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
|
92 |
},
|
93 |
+
"autoload-dev": {
|
94 |
+
"psr-4": { "Composer\\Installers\\Test\\": "tests/Composer/Installers/Test" }
|
95 |
+
},
|
96 |
"extra": {
|
97 |
"class": "Composer\\Installers\\Plugin",
|
98 |
"branch-alias": {
|
99 |
+
"dev-main": "1.x-dev"
|
100 |
}
|
101 |
},
|
102 |
"replace": {
|
104 |
"roundcube/plugin-installer": "*"
|
105 |
},
|
106 |
"require": {
|
107 |
+
"composer-plugin-api": "^1.0 || ^2.0"
|
108 |
},
|
109 |
"require-dev": {
|
110 |
+
"composer/composer": "1.6.* || ^2.0",
|
111 |
+
"composer/semver": "^1 || ^3",
|
112 |
+
"symfony/phpunit-bridge": "^4.2 || ^5",
|
113 |
+
"phpstan/phpstan": "^0.12.55",
|
114 |
+
"symfony/process": "^2.3",
|
115 |
+
"phpstan/phpstan-phpunit": "^0.12.16"
|
116 |
},
|
117 |
"scripts": {
|
118 |
+
"test": "SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 vendor/bin/simple-phpunit",
|
119 |
+
"phpstan": "vendor/bin/phpstan analyse"
|
120 |
}
|
121 |
}
|
includes/gateways/stripe/vendor/composer/installers/phpstan.neon.dist
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
parameters:
|
2 |
+
level: 5
|
3 |
+
paths:
|
4 |
+
- src
|
5 |
+
- tests
|
6 |
+
excludes_analyse:
|
7 |
+
- tests/Composer/Installers/Test/PolyfillTestCase.php
|
8 |
+
|
9 |
+
includes:
|
10 |
+
- vendor/phpstan/phpstan-phpunit/extension.neon
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
CHANGED
@@ -31,14 +31,18 @@ class AsgardInstaller extends BaseInstaller
|
|
31 |
|
32 |
protected function inflectPluginVars($vars)
|
33 |
{
|
34 |
-
$vars['name'] =
|
|
|
|
|
35 |
|
36 |
return $vars;
|
37 |
}
|
38 |
|
39 |
protected function inflectThemeVars($vars)
|
40 |
{
|
41 |
-
$vars['name'] =
|
|
|
|
|
42 |
|
43 |
return $vars;
|
44 |
}
|
31 |
|
32 |
protected function inflectPluginVars($vars)
|
33 |
{
|
34 |
+
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
35 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
36 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
37 |
|
38 |
return $vars;
|
39 |
}
|
40 |
|
41 |
protected function inflectThemeVars($vars)
|
42 |
{
|
43 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
44 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
45 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
46 |
|
47 |
return $vars;
|
48 |
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class AttogramInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
CHANGED
@@ -74,8 +74,8 @@ abstract class BaseInstaller
|
|
74 |
/**
|
75 |
* For an installer to override to modify the vars per installer.
|
76 |
*
|
77 |
-
* @param array $vars
|
78 |
-
* @return array
|
79 |
*/
|
80 |
public function inflectPackageVars($vars)
|
81 |
{
|
@@ -85,7 +85,7 @@ abstract class BaseInstaller
|
|
85 |
/**
|
86 |
* Gets the installer's locations
|
87 |
*
|
88 |
-
* @return array
|
89 |
*/
|
90 |
public function getLocations()
|
91 |
{
|
@@ -95,8 +95,8 @@ abstract class BaseInstaller
|
|
95 |
/**
|
96 |
* Replace vars in a path
|
97 |
*
|
98 |
-
* @param string
|
99 |
-
* @param array
|
100 |
* @return string
|
101 |
*/
|
102 |
protected function templatePath($path, array $vars = array())
|
@@ -121,11 +121,12 @@ abstract class BaseInstaller
|
|
121 |
* @param string $name
|
122 |
* @param string $type
|
123 |
* @param string $vendor = NULL
|
124 |
-
* @return string
|
125 |
*/
|
126 |
protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
|
127 |
{
|
128 |
foreach ($paths as $path => $names) {
|
|
|
129 |
if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
|
130 |
return $path;
|
131 |
}
|
74 |
/**
|
75 |
* For an installer to override to modify the vars per installer.
|
76 |
*
|
77 |
+
* @param array<string, string> $vars This will normally receive array{name: string, vendor: string, type: string}
|
78 |
+
* @return array<string, string>
|
79 |
*/
|
80 |
public function inflectPackageVars($vars)
|
81 |
{
|
85 |
/**
|
86 |
* Gets the installer's locations
|
87 |
*
|
88 |
+
* @return array<string, string> map of package types => install path
|
89 |
*/
|
90 |
public function getLocations()
|
91 |
{
|
95 |
/**
|
96 |
* Replace vars in a path
|
97 |
*
|
98 |
+
* @param string $path
|
99 |
+
* @param array<string, string> $vars
|
100 |
* @return string
|
101 |
*/
|
102 |
protected function templatePath($path, array $vars = array())
|
121 |
* @param string $name
|
122 |
* @param string $type
|
123 |
* @param string $vendor = NULL
|
124 |
+
* @return string|false
|
125 |
*/
|
126 |
protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
|
127 |
{
|
128 |
foreach ($paths as $path => $names) {
|
129 |
+
$names = (array) $names;
|
130 |
if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
|
131 |
return $path;
|
132 |
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
CHANGED
@@ -6,9 +6,9 @@ use Composer\Util\Filesystem;
|
|
6 |
|
7 |
/**
|
8 |
* Installer for Bitrix Framework. Supported types of extensions:
|
9 |
-
* - `bitrix-module` — copy the module to directory `bitrix/modules
|
10 |
-
* - `bitrix-component` — copy the component to directory `bitrix/components
|
11 |
-
* - `bitrix-template` — copy the template to directory `bitrix/templates
|
12 |
*
|
13 |
* You can set custom path to directory with Bitrix kernel in `composer.json`:
|
14 |
*
|
@@ -26,9 +26,12 @@ use Composer\Util\Filesystem;
|
|
26 |
class BitrixInstaller extends BaseInstaller
|
27 |
{
|
28 |
protected $locations = array(
|
29 |
-
'module' => '{$bitrix_dir}/modules/{$name}/',
|
30 |
-
'component' => '{$bitrix_dir}/components/{$name}/',
|
31 |
-
'theme' => '{$bitrix_dir}/templates/{$name}/',
|
|
|
|
|
|
|
32 |
);
|
33 |
|
34 |
/**
|
6 |
|
7 |
/**
|
8 |
* Installer for Bitrix Framework. Supported types of extensions:
|
9 |
+
* - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
|
10 |
+
* - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
|
11 |
+
* - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
|
12 |
*
|
13 |
* You can set custom path to directory with Bitrix kernel in `composer.json`:
|
14 |
*
|
26 |
class BitrixInstaller extends BaseInstaller
|
27 |
{
|
28 |
protected $locations = array(
|
29 |
+
'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
30 |
+
'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
31 |
+
'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
32 |
+
'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/',
|
33 |
+
'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/',
|
34 |
+
'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/',
|
35 |
);
|
36 |
|
37 |
/**
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
namespace Composer\Installers;
|
3 |
|
4 |
use Composer\DependencyResolver\Pool;
|
5 |
-
use Composer\
|
6 |
|
7 |
class CakePHPInstaller extends BaseInstaller
|
8 |
{
|
@@ -50,35 +50,16 @@ class CakePHPInstaller extends BaseInstaller
|
|
50 |
*/
|
51 |
protected function matchesCakeVersion($matcher, $version)
|
52 |
{
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
} else {
|
57 |
-
$multiClass = 'Composer\Package\LinkConstraint\MultiConstraint';
|
58 |
-
$constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint';
|
59 |
}
|
60 |
|
61 |
-
$
|
62 |
-
if (
|
63 |
-
|
64 |
-
if (!$repos) {
|
65 |
-
return false;
|
66 |
-
}
|
67 |
-
$cake3 = new $multiClass(array(
|
68 |
-
new $constraintClass($matcher, $version),
|
69 |
-
new $constraintClass('!=', '9999999-dev'),
|
70 |
-
));
|
71 |
-
$pool = new Pool('dev');
|
72 |
-
$pool->addRepository($repos);
|
73 |
-
$packages = $pool->whatProvides('cakephp/cakephp');
|
74 |
-
foreach ($packages as $package) {
|
75 |
-
$installed = new $constraintClass('=', $package->getVersion());
|
76 |
-
if ($cake3->matches($installed)) {
|
77 |
-
return true;
|
78 |
-
break;
|
79 |
-
}
|
80 |
-
}
|
81 |
}
|
82 |
-
|
|
|
83 |
}
|
84 |
}
|
2 |
namespace Composer\Installers;
|
3 |
|
4 |
use Composer\DependencyResolver\Pool;
|
5 |
+
use Composer\Semver\Constraint\Constraint;
|
6 |
|
7 |
class CakePHPInstaller extends BaseInstaller
|
8 |
{
|
50 |
*/
|
51 |
protected function matchesCakeVersion($matcher, $version)
|
52 |
{
|
53 |
+
$repositoryManager = $this->composer->getRepositoryManager();
|
54 |
+
if (! $repositoryManager) {
|
55 |
+
return false;
|
|
|
|
|
|
|
56 |
}
|
57 |
|
58 |
+
$repos = $repositoryManager->getLocalRepository();
|
59 |
+
if (!$repos) {
|
60 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
+
|
63 |
+
return $repos->findPackage('cakephp/cakephp', new Constraint($matcher, $version)) !== null;
|
64 |
}
|
65 |
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class CiviCrmInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'ext' => 'ext/{$name}/'
|
8 |
+
);
|
9 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class CockpitInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'cockpit/modules/addons/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format module name.
|
12 |
+
*
|
13 |
+
* Strip `module-` prefix from package name.
|
14 |
+
*
|
15 |
+
* {@inheritDoc}
|
16 |
+
*/
|
17 |
+
public function inflectPackageVars($vars)
|
18 |
+
{
|
19 |
+
if ($vars['type'] == 'cockpit-module') {
|
20 |
+
return $this->inflectModuleVars($vars);
|
21 |
+
}
|
22 |
+
|
23 |
+
return $vars;
|
24 |
+
}
|
25 |
+
|
26 |
+
public function inflectModuleVars($vars)
|
27 |
+
{
|
28 |
+
$vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
|
29 |
+
|
30 |
+
return $vars;
|
31 |
+
}
|
32 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
CHANGED
@@ -4,9 +4,10 @@ namespace Composer\Installers;
|
|
4 |
class Concrete5Installer extends BaseInstaller
|
5 |
{
|
6 |
protected $locations = array(
|
7 |
-
'
|
|
|
8 |
'package' => 'packages/{$name}/',
|
9 |
-
'theme' => 'themes/{$name}/',
|
10 |
'update' => 'updates/{$name}/',
|
11 |
);
|
12 |
}
|
4 |
class Concrete5Installer extends BaseInstaller
|
5 |
{
|
6 |
protected $locations = array(
|
7 |
+
'core' => 'concrete/',
|
8 |
+
'block' => 'application/blocks/{$name}/',
|
9 |
'package' => 'packages/{$name}/',
|
10 |
+
'theme' => 'application/themes/{$name}/',
|
11 |
'update' => 'updates/{$name}/',
|
12 |
);
|
13 |
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class DecibelInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
/** @var array */
|
7 |
+
protected $locations = array(
|
8 |
+
'app' => 'app/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class DframeInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
protected $locations = array(
|
8 |
+
'module' => 'modules/{$vendor}/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
CHANGED
@@ -4,13 +4,19 @@ namespace Composer\Installers;
|
|
4 |
class DrupalInstaller extends BaseInstaller
|
5 |
{
|
6 |
protected $locations = array(
|
7 |
-
'core'
|
8 |
-
'module'
|
9 |
-
'theme'
|
10 |
-
'library'
|
11 |
-
'profile'
|
12 |
-
'
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
);
|
16 |
}
|
4 |
class DrupalInstaller extends BaseInstaller
|
5 |
{
|
6 |
protected $locations = array(
|
7 |
+
'core' => 'core/',
|
8 |
+
'module' => 'modules/{$name}/',
|
9 |
+
'theme' => 'themes/{$name}/',
|
10 |
+
'library' => 'libraries/{$name}/',
|
11 |
+
'profile' => 'profiles/{$name}/',
|
12 |
+
'database-driver' => 'drivers/lib/Drupal/Driver/Database/{$name}/',
|
13 |
+
'drush' => 'drush/{$name}/',
|
14 |
+
'custom-theme' => 'themes/custom/{$name}/',
|
15 |
+
'custom-module' => 'modules/custom/{$name}/',
|
16 |
+
'custom-profile' => 'profiles/custom/{$name}/',
|
17 |
+
'drupal-multisite' => 'sites/{$name}/',
|
18 |
+
'console' => 'console/{$name}/',
|
19 |
+
'console-language' => 'console/language/{$name}/',
|
20 |
+
'config' => 'config/sync/',
|
21 |
);
|
22 |
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class EliasisInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'component' => 'components/{$name}/',
|
8 |
+
'module' => 'modules/{$name}/',
|
9 |
+
'plugin' => 'plugins/{$name}/',
|
10 |
+
'template' => 'templates/{$name}/',
|
11 |
+
);
|
12 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\Package\PackageInterface;
|
5 |
+
|
6 |
+
class ExpressionEngineInstaller extends BaseInstaller
|
7 |
+
{
|
8 |
+
|
9 |
+
protected $locations = array();
|
10 |
+
|
11 |
+
private $ee2Locations = array(
|
12 |
+
'addon' => 'system/expressionengine/third_party/{$name}/',
|
13 |
+
'theme' => 'themes/third_party/{$name}/',
|
14 |
+
);
|
15 |
+
|
16 |
+
private $ee3Locations = array(
|
17 |
+
'addon' => 'system/user/addons/{$name}/',
|
18 |
+
'theme' => 'themes/user/{$name}/',
|
19 |
+
);
|
20 |
+
|
21 |
+
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
22 |
+
{
|
23 |
+
|
24 |
+
$version = "{$frameworkType}Locations";
|
25 |
+
$this->locations = $this->$version;
|
26 |
+
|
27 |
+
return parent::getInstallPath($package, $frameworkType);
|
28 |
+
}
|
29 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class EzPlatformInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'meta-assets' => 'web/assets/ezplatform/',
|
8 |
+
'assets' => 'web/assets/ezplatform/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/Installer.php
CHANGED
@@ -1,13 +1,19 @@
|
|
1 |
<?php
|
|
|
2 |
namespace Composer\Installers;
|
3 |
|
4 |
-
use Composer\
|
|
|
5 |
use Composer\Installer\LibraryInstaller;
|
|
|
6 |
use Composer\Package\PackageInterface;
|
7 |
use Composer\Repository\InstalledRepositoryInterface;
|
|
|
|
|
8 |
|
9 |
class Installer extends LibraryInstaller
|
10 |
{
|
|
|
11 |
/**
|
12 |
* Package types to installer class map
|
13 |
*
|
@@ -16,65 +22,128 @@ class Installer extends LibraryInstaller
|
|
16 |
private $supportedTypes = array(
|
17 |
'aimeos' => 'AimeosInstaller',
|
18 |
'asgard' => 'AsgardInstaller',
|
|
|
19 |
'agl' => 'AglInstaller',
|
20 |
'annotatecms' => 'AnnotateCmsInstaller',
|
21 |
'bitrix' => 'BitrixInstaller',
|
22 |
'bonefish' => 'BonefishInstaller',
|
23 |
'cakephp' => 'CakePHPInstaller',
|
24 |
'chef' => 'ChefInstaller',
|
|
|
25 |
'ccframework' => 'ClanCatsFrameworkInstaller',
|
|
|
26 |
'codeigniter' => 'CodeIgniterInstaller',
|
27 |
'concrete5' => 'Concrete5Installer',
|
28 |
'craft' => 'CraftInstaller',
|
29 |
'croogo' => 'CroogoInstaller',
|
|
|
30 |
'dokuwiki' => 'DokuWikiInstaller',
|
31 |
'dolibarr' => 'DolibarrInstaller',
|
|
|
32 |
'drupal' => 'DrupalInstaller',
|
33 |
'elgg' => 'ElggInstaller',
|
|
|
|
|
|
|
|
|
34 |
'fuel' => 'FuelInstaller',
|
35 |
'fuelphp' => 'FuelphpInstaller',
|
36 |
'grav' => 'GravInstaller',
|
37 |
'hurad' => 'HuradInstaller',
|
|
|
38 |
'imagecms' => 'ImageCMSInstaller',
|
|
|
39 |
'joomla' => 'JoomlaInstaller',
|
|
|
40 |
'kirby' => 'KirbyInstaller',
|
|
|
41 |
'kodicms' => 'KodiCMSInstaller',
|
42 |
'kohana' => 'KohanaInstaller',
|
|
|
43 |
'laravel' => 'LaravelInstaller',
|
|
|
44 |
'lithium' => 'LithiumInstaller',
|
45 |
'magento' => 'MagentoInstaller',
|
|
|
|
|
46 |
'mako' => 'MakoInstaller',
|
|
|
47 |
'mautic' => 'MauticInstaller',
|
48 |
'mediawiki' => 'MediaWikiInstaller',
|
49 |
-
'
|
|
|
50 |
'modulework' => 'MODULEWorkInstaller',
|
|
|
51 |
'modxevo' => 'MODXEvoInstaller',
|
52 |
'moodle' => 'MoodleInstaller',
|
53 |
'october' => 'OctoberInstaller',
|
|
|
54 |
'oxid' => 'OxidInstaller',
|
|
|
|
|
55 |
'phpbb' => 'PhpBBInstaller',
|
56 |
'pimcore' => 'PimcoreInstaller',
|
57 |
'piwik' => 'PiwikInstaller',
|
|
|
58 |
'ppi' => 'PPIInstaller',
|
59 |
'puppet' => 'PuppetInstaller',
|
|
|
|
|
|
|
|
|
60 |
'redaxo' => 'RedaxoInstaller',
|
|
|
|
|
61 |
'roundcube' => 'RoundcubeInstaller',
|
62 |
'shopware' => 'ShopwareInstaller',
|
|
|
63 |
'silverstripe' => 'SilverStripeInstaller',
|
64 |
'smf' => 'SMFInstaller',
|
|
|
|
|
|
|
65 |
'symfony1' => 'Symfony1Installer',
|
|
|
66 |
'thelia' => 'TheliaInstaller',
|
67 |
'tusk' => 'TuskInstaller',
|
68 |
'typo3-cms' => 'TYPO3CmsInstaller',
|
69 |
'typo3-flow' => 'TYPO3FlowInstaller',
|
|
|
|
|
70 |
'whmcs' => 'WHMCSInstaller',
|
|
|
71 |
'wolfcms' => 'WolfCMSInstaller',
|
72 |
'wordpress' => 'WordPressInstaller',
|
|
|
73 |
'zend' => 'ZendInstaller',
|
74 |
'zikula' => 'ZikulaInstaller',
|
75 |
'prestashop' => 'PrestashopInstaller'
|
76 |
);
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
/**
|
79 |
* {@inheritDoc}
|
80 |
*/
|
@@ -97,14 +166,23 @@ class Installer extends LibraryInstaller
|
|
97 |
|
98 |
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
|
99 |
{
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
|
104 |
-
|
|
|
105 |
|
106 |
-
|
107 |
-
$this->io->write(sprintf('Deleting %s - %s', $installPath, $this->filesystem->removeDirectory($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
|
108 |
}
|
109 |
|
110 |
/**
|
@@ -126,23 +204,20 @@ class Installer extends LibraryInstaller
|
|
126 |
/**
|
127 |
* Finds a supported framework type if it exists and returns it
|
128 |
*
|
129 |
-
* @param string
|
130 |
-
* @return string
|
131 |
*/
|
132 |
protected function findFrameworkType($type)
|
133 |
{
|
134 |
-
$frameworkType = false;
|
135 |
-
|
136 |
krsort($this->supportedTypes);
|
137 |
|
138 |
foreach ($this->supportedTypes as $key => $val) {
|
139 |
if ($key === substr($type, 0, strlen($key))) {
|
140 |
-
|
141 |
-
break;
|
142 |
}
|
143 |
}
|
144 |
|
145 |
-
return
|
146 |
}
|
147 |
|
148 |
/**
|
@@ -175,4 +250,48 @@ class Installer extends LibraryInstaller
|
|
175 |
{
|
176 |
return $this->io;
|
177 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
}
|
1 |
<?php
|
2 |
+
|
3 |
namespace Composer\Installers;
|
4 |
|
5 |
+
use Composer\Composer;
|
6 |
+
use Composer\Installer\BinaryInstaller;
|
7 |
use Composer\Installer\LibraryInstaller;
|
8 |
+
use Composer\IO\IOInterface;
|
9 |
use Composer\Package\PackageInterface;
|
10 |
use Composer\Repository\InstalledRepositoryInterface;
|
11 |
+
use Composer\Util\Filesystem;
|
12 |
+
use React\Promise\PromiseInterface;
|
13 |
|
14 |
class Installer extends LibraryInstaller
|
15 |
{
|
16 |
+
|
17 |
/**
|
18 |
* Package types to installer class map
|
19 |
*
|
22 |
private $supportedTypes = array(
|
23 |
'aimeos' => 'AimeosInstaller',
|
24 |
'asgard' => 'AsgardInstaller',
|
25 |
+
'attogram' => 'AttogramInstaller',
|
26 |
'agl' => 'AglInstaller',
|
27 |
'annotatecms' => 'AnnotateCmsInstaller',
|
28 |
'bitrix' => 'BitrixInstaller',
|
29 |
'bonefish' => 'BonefishInstaller',
|
30 |
'cakephp' => 'CakePHPInstaller',
|
31 |
'chef' => 'ChefInstaller',
|
32 |
+
'civicrm' => 'CiviCrmInstaller',
|
33 |
'ccframework' => 'ClanCatsFrameworkInstaller',
|
34 |
+
'cockpit' => 'CockpitInstaller',
|
35 |
'codeigniter' => 'CodeIgniterInstaller',
|
36 |
'concrete5' => 'Concrete5Installer',
|
37 |
'craft' => 'CraftInstaller',
|
38 |
'croogo' => 'CroogoInstaller',
|
39 |
+
'dframe' => 'DframeInstaller',
|
40 |
'dokuwiki' => 'DokuWikiInstaller',
|
41 |
'dolibarr' => 'DolibarrInstaller',
|
42 |
+
'decibel' => 'DecibelInstaller',
|
43 |
'drupal' => 'DrupalInstaller',
|
44 |
'elgg' => 'ElggInstaller',
|
45 |
+
'eliasis' => 'EliasisInstaller',
|
46 |
+
'ee3' => 'ExpressionEngineInstaller',
|
47 |
+
'ee2' => 'ExpressionEngineInstaller',
|
48 |
+
'ezplatform' => 'EzPlatformInstaller',
|
49 |
'fuel' => 'FuelInstaller',
|
50 |
'fuelphp' => 'FuelphpInstaller',
|
51 |
'grav' => 'GravInstaller',
|
52 |
'hurad' => 'HuradInstaller',
|
53 |
+
'tastyigniter' => 'TastyIgniterInstaller',
|
54 |
'imagecms' => 'ImageCMSInstaller',
|
55 |
+
'itop' => 'ItopInstaller',
|
56 |
'joomla' => 'JoomlaInstaller',
|
57 |
+
'kanboard' => 'KanboardInstaller',
|
58 |
'kirby' => 'KirbyInstaller',
|
59 |
+
'known' => 'KnownInstaller',
|
60 |
'kodicms' => 'KodiCMSInstaller',
|
61 |
'kohana' => 'KohanaInstaller',
|
62 |
+
'lms' => 'LanManagementSystemInstaller',
|
63 |
'laravel' => 'LaravelInstaller',
|
64 |
+
'lavalite' => 'LavaLiteInstaller',
|
65 |
'lithium' => 'LithiumInstaller',
|
66 |
'magento' => 'MagentoInstaller',
|
67 |
+
'majima' => 'MajimaInstaller',
|
68 |
+
'mantisbt' => 'MantisBTInstaller',
|
69 |
'mako' => 'MakoInstaller',
|
70 |
+
'maya' => 'MayaInstaller',
|
71 |
'mautic' => 'MauticInstaller',
|
72 |
'mediawiki' => 'MediaWikiInstaller',
|
73 |
+
'miaoxing' => 'MiaoxingInstaller',
|
74 |
+
'microweber' => 'MicroweberInstaller',
|
75 |
'modulework' => 'MODULEWorkInstaller',
|
76 |
+
'modx' => 'ModxInstaller',
|
77 |
'modxevo' => 'MODXEvoInstaller',
|
78 |
'moodle' => 'MoodleInstaller',
|
79 |
'october' => 'OctoberInstaller',
|
80 |
+
'ontowiki' => 'OntoWikiInstaller',
|
81 |
'oxid' => 'OxidInstaller',
|
82 |
+
'osclass' => 'OsclassInstaller',
|
83 |
+
'pxcms' => 'PxcmsInstaller',
|
84 |
'phpbb' => 'PhpBBInstaller',
|
85 |
'pimcore' => 'PimcoreInstaller',
|
86 |
'piwik' => 'PiwikInstaller',
|
87 |
+
'plentymarkets'=> 'PlentymarketsInstaller',
|
88 |
'ppi' => 'PPIInstaller',
|
89 |
'puppet' => 'PuppetInstaller',
|
90 |
+
'radphp' => 'RadPHPInstaller',
|
91 |
+
'phifty' => 'PhiftyInstaller',
|
92 |
+
'porto' => 'PortoInstaller',
|
93 |
+
'processwire' => 'ProcessWireInstaller',
|
94 |
'redaxo' => 'RedaxoInstaller',
|
95 |
+
'redaxo5' => 'Redaxo5Installer',
|
96 |
+
'reindex' => 'ReIndexInstaller',
|
97 |
'roundcube' => 'RoundcubeInstaller',
|
98 |
'shopware' => 'ShopwareInstaller',
|
99 |
+
'sitedirect' => 'SiteDirectInstaller',
|
100 |
'silverstripe' => 'SilverStripeInstaller',
|
101 |
'smf' => 'SMFInstaller',
|
102 |
+
'starbug' => 'StarbugInstaller',
|
103 |
+
'sydes' => 'SyDESInstaller',
|
104 |
+
'sylius' => 'SyliusInstaller',
|
105 |
'symfony1' => 'Symfony1Installer',
|
106 |
+
'tao' => 'TaoInstaller',
|
107 |
'thelia' => 'TheliaInstaller',
|
108 |
'tusk' => 'TuskInstaller',
|
109 |
'typo3-cms' => 'TYPO3CmsInstaller',
|
110 |
'typo3-flow' => 'TYPO3FlowInstaller',
|
111 |
+
'userfrosting' => 'UserFrostingInstaller',
|
112 |
+
'vanilla' => 'VanillaInstaller',
|
113 |
'whmcs' => 'WHMCSInstaller',
|
114 |
+
'winter' => 'WinterInstaller',
|
115 |
'wolfcms' => 'WolfCMSInstaller',
|
116 |
'wordpress' => 'WordPressInstaller',
|
117 |
+
'yawik' => 'YawikInstaller',
|
118 |
'zend' => 'ZendInstaller',
|
119 |
'zikula' => 'ZikulaInstaller',
|
120 |
'prestashop' => 'PrestashopInstaller'
|
121 |
);
|
122 |
|
123 |
+
/**
|
124 |
+
* Installer constructor.
|
125 |
+
*
|
126 |
+
* Disables installers specified in main composer extra installer-disable
|
127 |
+
* list
|
128 |
+
*
|
129 |
+
* @param IOInterface $io
|
130 |
+
* @param Composer $composer
|
131 |
+
* @param string $type
|
132 |
+
* @param Filesystem|null $filesystem
|
133 |
+
* @param BinaryInstaller|null $binaryInstaller
|
134 |
+
*/
|
135 |
+
public function __construct(
|
136 |
+
IOInterface $io,
|
137 |
+
Composer $composer,
|
138 |
+
$type = 'library',
|
139 |
+
Filesystem $filesystem = null,
|
140 |
+
BinaryInstaller $binaryInstaller = null
|
141 |
+
) {
|
142 |
+
parent::__construct($io, $composer, $type, $filesystem,
|
143 |
+
$binaryInstaller);
|
144 |
+
$this->removeDisabledInstallers();
|
145 |
+
}
|
146 |
+
|
147 |
/**
|
148 |
* {@inheritDoc}
|
149 |
*/
|
166 |
|
167 |
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
|
168 |
{
|
169 |
+
$installPath = $this->getPackageBasePath($package);
|
170 |
+
$io = $this->io;
|
171 |
+
$outputStatus = function () use ($io, $installPath) {
|
172 |
+
$io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
|
173 |
+
};
|
174 |
+
|
175 |
+
$promise = parent::uninstall($repo, $package);
|
176 |
+
|
177 |
+
// Composer v2 might return a promise here
|
178 |
+
if ($promise instanceof PromiseInterface) {
|
179 |
+
return $promise->then($outputStatus);
|
180 |
}
|
181 |
|
182 |
+
// If not, execute the code right away as parent::uninstall executed synchronously (composer v1, or v2 without async)
|
183 |
+
$outputStatus();
|
184 |
|
185 |
+
return null;
|
|
|
186 |
}
|
187 |
|
188 |
/**
|
204 |
/**
|
205 |
* Finds a supported framework type if it exists and returns it
|
206 |
*
|
207 |
+
* @param string $type
|
208 |
+
* @return string|false
|
209 |
*/
|
210 |
protected function findFrameworkType($type)
|
211 |
{
|
|
|
|
|
212 |
krsort($this->supportedTypes);
|
213 |
|
214 |
foreach ($this->supportedTypes as $key => $val) {
|
215 |
if ($key === substr($type, 0, strlen($key))) {
|
216 |
+
return substr($type, 0, strlen($key));
|
|
|
217 |
}
|
218 |
}
|
219 |
|
220 |
+
return false;
|
221 |
}
|
222 |
|
223 |
/**
|
250 |
{
|
251 |
return $this->io;
|
252 |
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Look for installers set to be disabled in composer's extra config and
|
256 |
+
* remove them from the list of supported installers.
|
257 |
+
*
|
258 |
+
* Globals:
|
259 |
+
* - true, "all", and "*" - disable all installers.
|
260 |
+
* - false - enable all installers (useful with
|
261 |
+
* wikimedia/composer-merge-plugin or similar)
|
262 |
+
*
|
263 |
+
* @return void
|
264 |
+
*/
|
265 |
+
protected function removeDisabledInstallers()
|
266 |
+
{
|
267 |
+
$extra = $this->composer->getPackage()->getExtra();
|
268 |
+
|
269 |
+
if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) {
|
270 |
+
// No installers are disabled
|
271 |
+
return;
|
272 |
+
}
|
273 |
+
|
274 |
+
// Get installers to disable
|
275 |
+
$disable = $extra['installer-disable'];
|
276 |
+
|
277 |
+
// Ensure $disabled is an array
|
278 |
+
if (!is_array($disable)) {
|
279 |
+
$disable = array($disable);
|
280 |
+
}
|
281 |
+
|
282 |
+
// Check which installers should be disabled
|
283 |
+
$all = array(true, "all", "*");
|
284 |
+
$intersect = array_intersect($all, $disable);
|
285 |
+
if (!empty($intersect)) {
|
286 |
+
// Disable all installers
|
287 |
+
$this->supportedTypes = array();
|
288 |
+
} else {
|
289 |
+
// Disable specified installers
|
290 |
+
foreach ($disable as $key => $installer) {
|
291 |
+
if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
|
292 |
+
unset($this->supportedTypes[$installer]);
|
293 |
+
}
|
294 |
+
}
|
295 |
+
}
|
296 |
+
}
|
297 |
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ItopInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'extension' => 'extensions/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
*
|
6 |
+
* Installer for kanboard plugins
|
7 |
+
*
|
8 |
+
* kanboard.net
|
9 |
+
*
|
10 |
+
* Class KanboardInstaller
|
11 |
+
* @package Composer\Installers
|
12 |
+
*/
|
13 |
+
class KanboardInstaller extends BaseInstaller
|
14 |
+
{
|
15 |
+
protected $locations = array(
|
16 |
+
'plugin' => 'plugins/{$name}/',
|
17 |
+
);
|
18 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class KnownInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'IdnoPlugins/{$name}/',
|
8 |
+
'theme' => 'Themes/{$name}/',
|
9 |
+
'console' => 'ConsolePlugins/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class LanManagementSystemInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
|
8 |
+
protected $locations = array(
|
9 |
+
'plugin' => 'plugins/{$name}/',
|
10 |
+
'template' => 'templates/{$name}/',
|
11 |
+
'document-template' => 'documents/templates/{$name}/',
|
12 |
+
'userpanel-module' => 'userpanel/modules/{$name}/',
|
13 |
+
);
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Format package name to CamelCase
|
17 |
+
*/
|
18 |
+
public function inflectPackageVars($vars)
|
19 |
+
{
|
20 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
21 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
22 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
23 |
+
|
24 |
+
return $vars;
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class LavaLiteInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'package' => 'packages/{$vendor}/{$name}/',
|
8 |
+
'theme' => 'public/themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Plugin/theme installer for majima
|
6 |
+
* @author David Neustadt
|
7 |
+
*/
|
8 |
+
class MajimaInstaller extends BaseInstaller
|
9 |
+
{
|
10 |
+
protected $locations = array(
|
11 |
+
'plugin' => 'plugins/{$name}/',
|
12 |
+
);
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Transforms the names
|
16 |
+
* @param array $vars
|
17 |
+
* @return array
|
18 |
+
*/
|
19 |
+
public function inflectPackageVars($vars)
|
20 |
+
{
|
21 |
+
return $this->correctPluginName($vars);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Change hyphenated names to camelcase
|
26 |
+
* @param array $vars
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
private function correctPluginName($vars)
|
30 |
+
{
|
31 |
+
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
32 |
+
return strtoupper($matches[0][1]);
|
33 |
+
}, $vars['name']);
|
34 |
+
$vars['name'] = ucfirst($camelCasedName);
|
35 |
+
return $vars;
|
36 |
+
}
|
37 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\DependencyResolver\Pool;
|
5 |
+
|
6 |
+
class MantisBTInstaller extends BaseInstaller
|
7 |
+
{
|
8 |
+
protected $locations = array(
|
9 |
+
'plugin' => 'plugins/{$name}/',
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name to CamelCase
|
14 |
+
*/
|
15 |
+
public function inflectPackageVars($vars)
|
16 |
+
{
|
17 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
18 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
19 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
20 |
+
|
21 |
+
return $vars;
|
22 |
+
}
|
23 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php
CHANGED
@@ -1,22 +1,45 @@
|
|
1 |
<?php
|
2 |
namespace Composer\Installers;
|
3 |
|
|
|
|
|
4 |
class MauticInstaller extends BaseInstaller
|
5 |
{
|
6 |
protected $locations = array(
|
7 |
-
'plugin'
|
8 |
-
'theme'
|
|
|
9 |
);
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
/**
|
12 |
* Format package name of mautic-plugins to CamelCase
|
13 |
*/
|
14 |
public function inflectPackageVars($vars)
|
15 |
{
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
}
|
21 |
|
22 |
return $vars;
|
1 |
<?php
|
2 |
namespace Composer\Installers;
|
3 |
|
4 |
+
use Composer\Package\PackageInterface;
|
5 |
+
|
6 |
class MauticInstaller extends BaseInstaller
|
7 |
{
|
8 |
protected $locations = array(
|
9 |
+
'plugin' => 'plugins/{$name}/',
|
10 |
+
'theme' => 'themes/{$name}/',
|
11 |
+
'core' => 'app/',
|
12 |
);
|
13 |
|
14 |
+
private function getDirectoryName()
|
15 |
+
{
|
16 |
+
$extra = $this->package->getExtra();
|
17 |
+
if (!empty($extra['install-directory-name'])) {
|
18 |
+
return $extra['install-directory-name'];
|
19 |
+
}
|
20 |
+
|
21 |
+
return $this->toCamelCase($this->package->getPrettyName());
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param string $packageName
|
26 |
+
*
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
private function toCamelCase($packageName)
|
30 |
+
{
|
31 |
+
return str_replace(' ', '', ucwords(str_replace('-', ' ', basename($packageName))));
|
32 |
+
}
|
33 |
+
|
34 |
/**
|
35 |
* Format package name of mautic-plugins to CamelCase
|
36 |
*/
|
37 |
public function inflectPackageVars($vars)
|
38 |
{
|
39 |
+
|
40 |
+
if ($vars['type'] == 'mautic-plugin' || $vars['type'] == 'mautic-theme') {
|
41 |
+
$directoryName = $this->getDirectoryName();
|
42 |
+
$vars['name'] = $directoryName;
|
43 |
}
|
44 |
|
45 |
return $vars;
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MayaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format package name.
|
12 |
+
*
|
13 |
+
* For package type maya-module, cut off a trailing '-module' if present.
|
14 |
+
*
|
15 |
+
*/
|
16 |
+
public function inflectPackageVars($vars)
|
17 |
+
{
|
18 |
+
if ($vars['type'] === 'maya-module') {
|
19 |
+
return $this->inflectModuleVars($vars);
|
20 |
+
}
|
21 |
+
|
22 |
+
return $vars;
|
23 |
+
}
|
24 |
+
|
25 |
+
protected function inflectModuleVars($vars)
|
26 |
+
{
|
27 |
+
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
28 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
29 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
30 |
+
|
31 |
+
return $vars;
|
32 |
+
}
|
33 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php
CHANGED
@@ -4,6 +4,7 @@ namespace Composer\Installers;
|
|
4 |
class MediaWikiInstaller extends BaseInstaller
|
5 |
{
|
6 |
protected $locations = array(
|
|
|
7 |
'extension' => 'extensions/{$name}/',
|
8 |
'skin' => 'skins/{$name}/',
|
9 |
);
|
4 |
class MediaWikiInstaller extends BaseInstaller
|
5 |
{
|
6 |
protected $locations = array(
|
7 |
+
'core' => 'core/',
|
8 |
'extension' => 'extensions/{$name}/',
|
9 |
'skin' => 'skins/{$name}/',
|
10 |
);
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MiaoxingInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class MiaoxingInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
protected $locations = array(
|
8 |
+
'plugin' => 'plugins/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
CHANGED
@@ -4,12 +4,12 @@ namespace Composer\Installers;
|
|
4 |
class MicroweberInstaller extends BaseInstaller
|
5 |
{
|
6 |
protected $locations = array(
|
7 |
-
'module'
|
8 |
-
'module-skin' => 'userfiles/modules/{$
|
9 |
-
'template'
|
10 |
-
'element'
|
11 |
-
'vendor'
|
12 |
-
'components'
|
13 |
);
|
14 |
|
15 |
/**
|
@@ -22,89 +22,97 @@ class MicroweberInstaller extends BaseInstaller
|
|
22 |
*/
|
23 |
public function inflectPackageVars($vars)
|
24 |
{
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
|
|
|
50 |
return $vars;
|
51 |
}
|
52 |
|
53 |
protected function inflectTemplateVars($vars)
|
54 |
{
|
55 |
-
$vars['
|
56 |
-
$vars['
|
57 |
|
58 |
return $vars;
|
59 |
}
|
60 |
|
61 |
protected function inflectTemplatesVars($vars)
|
62 |
{
|
63 |
-
$vars['
|
64 |
-
$vars['
|
65 |
|
66 |
return $vars;
|
67 |
}
|
68 |
|
69 |
protected function inflectCoreVars($vars)
|
70 |
{
|
71 |
-
$vars['
|
72 |
-
$vars['
|
73 |
-
$vars['
|
74 |
|
75 |
return $vars;
|
76 |
}
|
77 |
|
78 |
protected function inflectModuleVars($vars)
|
79 |
{
|
80 |
-
$vars['
|
81 |
-
$vars['
|
82 |
|
83 |
return $vars;
|
84 |
}
|
85 |
|
86 |
protected function inflectModulesVars($vars)
|
87 |
{
|
88 |
-
$vars['
|
89 |
-
$vars['
|
90 |
|
91 |
return $vars;
|
92 |
}
|
93 |
|
94 |
protected function inflectSkinVars($vars)
|
95 |
{
|
96 |
-
$vars['
|
97 |
-
$vars['
|
98 |
|
99 |
return $vars;
|
100 |
}
|
101 |
|
102 |
protected function inflectElementVars($vars)
|
103 |
{
|
104 |
-
$vars['
|
105 |
-
$vars['
|
106 |
-
$vars['
|
107 |
-
$vars['
|
108 |
|
109 |
return $vars;
|
110 |
}
|
4 |
class MicroweberInstaller extends BaseInstaller
|
5 |
{
|
6 |
protected $locations = array(
|
7 |
+
'module' => 'userfiles/modules/{$install_item_dir}/',
|
8 |
+
'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
|
9 |
+
'template' => 'userfiles/templates/{$install_item_dir}/',
|
10 |
+
'element' => 'userfiles/elements/{$install_item_dir}/',
|
11 |
+
'vendor' => 'vendor/{$install_item_dir}/',
|
12 |
+
'components' => 'components/{$install_item_dir}/'
|
13 |
);
|
14 |
|
15 |
/**
|
22 |
*/
|
23 |
public function inflectPackageVars($vars)
|
24 |
{
|
25 |
+
|
26 |
+
|
27 |
+
if ($this->package->getTargetDir()) {
|
28 |
+
$vars['install_item_dir'] = $this->package->getTargetDir();
|
29 |
+
} else {
|
30 |
+
$vars['install_item_dir'] = $vars['name'];
|
31 |
+
if ($vars['type'] === 'microweber-template') {
|
32 |
+
return $this->inflectTemplateVars($vars);
|
33 |
+
}
|
34 |
+
if ($vars['type'] === 'microweber-templates') {
|
35 |
+
return $this->inflectTemplatesVars($vars);
|
36 |
+
}
|
37 |
+
if ($vars['type'] === 'microweber-core') {
|
38 |
+
return $this->inflectCoreVars($vars);
|
39 |
+
}
|
40 |
+
if ($vars['type'] === 'microweber-adapter') {
|
41 |
+
return $this->inflectCoreVars($vars);
|
42 |
+
}
|
43 |
+
if ($vars['type'] === 'microweber-module') {
|
44 |
+
return $this->inflectModuleVars($vars);
|
45 |
+
}
|
46 |
+
if ($vars['type'] === 'microweber-modules') {
|
47 |
+
return $this->inflectModulesVars($vars);
|
48 |
+
}
|
49 |
+
if ($vars['type'] === 'microweber-skin') {
|
50 |
+
return $this->inflectSkinVars($vars);
|
51 |
+
}
|
52 |
+
if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
|
53 |
+
return $this->inflectElementVars($vars);
|
54 |
+
}
|
55 |
}
|
56 |
|
57 |
+
|
58 |
return $vars;
|
59 |
}
|
60 |
|
61 |
protected function inflectTemplateVars($vars)
|
62 |
{
|
63 |
+
$vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']);
|
64 |
+
$vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']);
|
65 |
|
66 |
return $vars;
|
67 |
}
|
68 |
|
69 |
protected function inflectTemplatesVars($vars)
|
70 |
{
|
71 |
+
$vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']);
|
72 |
+
$vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']);
|
73 |
|
74 |
return $vars;
|
75 |
}
|
76 |
|
77 |
protected function inflectCoreVars($vars)
|
78 |
{
|
79 |
+
$vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']);
|
80 |
+
$vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']);
|
81 |
+
$vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']);
|
82 |
|
83 |
return $vars;
|
84 |
}
|
85 |
|
86 |
protected function inflectModuleVars($vars)
|
87 |
{
|
88 |
+
$vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']);
|
89 |
+
$vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']);
|
90 |
|
91 |
return $vars;
|
92 |
}
|
93 |
|
94 |
protected function inflectModulesVars($vars)
|
95 |
{
|
96 |
+
$vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']);
|
97 |
+
$vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']);
|
98 |
|
99 |
return $vars;
|
100 |
}
|
101 |
|
102 |
protected function inflectSkinVars($vars)
|
103 |
{
|
104 |
+
$vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']);
|
105 |
+
$vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']);
|
106 |
|
107 |
return $vars;
|
108 |
}
|
109 |
|
110 |
protected function inflectElementVars($vars)
|
111 |
{
|
112 |
+
$vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']);
|
113 |
+
$vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']);
|
114 |
+
$vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']);
|
115 |
+
$vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']);
|
116 |
|
117 |
return $vars;
|
118 |
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* An installer to handle MODX specifics when installing packages.
|
6 |
+
*/
|
7 |
+
class ModxInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
protected $locations = array(
|
10 |
+
'extra' => 'core/packages/{$name}/'
|
11 |
+
);
|
12 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
CHANGED
@@ -18,8 +18,10 @@ class MoodleInstaller extends BaseInstaller
|
|
18 |
'cachestore' => 'cache/stores/{$name}/',
|
19 |
'cachelock' => 'cache/locks/{$name}/',
|
20 |
'calendartype' => 'calendar/type/{$name}/',
|
|
|
21 |
'format' => 'course/format/{$name}/',
|
22 |
'coursereport' => 'course/report/{$name}/',
|
|
|
23 |
'datafield' => 'mod/data/field/{$name}/',
|
24 |
'datapreset' => 'mod/data/preset/{$name}/',
|
25 |
'editor' => 'lib/editor/{$name}/',
|
@@ -45,6 +47,7 @@ class MoodleInstaller extends BaseInstaller
|
|
45 |
'report' => 'report/{$name}/',
|
46 |
'repository' => 'repository/{$name}/',
|
47 |
'scormreport' => 'mod/scorm/report/{$name}/',
|
|
|
48 |
'theme' => 'theme/{$name}/',
|
49 |
'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
|
50 |
'profilefield' => 'user/profile/field/{$name}/',
|
18 |
'cachestore' => 'cache/stores/{$name}/',
|
19 |
'cachelock' => 'cache/locks/{$name}/',
|
20 |
'calendartype' => 'calendar/type/{$name}/',
|
21 |
+
'fileconverter' => 'files/converter/{$name}/',
|
22 |
'format' => 'course/format/{$name}/',
|
23 |
'coursereport' => 'course/report/{$name}/',
|
24 |
+
'customcertelement' => 'mod/customcert/element/{$name}/',
|
25 |
'datafield' => 'mod/data/field/{$name}/',
|
26 |
'datapreset' => 'mod/data/preset/{$name}/',
|
27 |
'editor' => 'lib/editor/{$name}/',
|
47 |
'report' => 'report/{$name}/',
|
48 |
'repository' => 'repository/{$name}/',
|
49 |
'scormreport' => 'mod/scorm/report/{$name}/',
|
50 |
+
'search' => 'search/engine/{$name}/',
|
51 |
'theme' => 'theme/{$name}/',
|
52 |
'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
|
53 |
'profilefield' => 'user/profile/field/{$name}/',
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php
CHANGED
@@ -6,7 +6,7 @@ class OctoberInstaller extends BaseInstaller
|
|
6 |
protected $locations = array(
|
7 |
'module' => 'modules/{$name}/',
|
8 |
'plugin' => 'plugins/{$vendor}/{$name}/',
|
9 |
-
'theme' => 'themes/{$name}/'
|
10 |
);
|
11 |
|
12 |
/**
|
@@ -32,15 +32,17 @@ class OctoberInstaller extends BaseInstaller
|
|
32 |
|
33 |
protected function inflectPluginVars($vars)
|
34 |
{
|
35 |
-
$vars['name'] = preg_replace('
|
|
|
36 |
|
37 |
return $vars;
|
38 |
}
|
39 |
|
40 |
protected function inflectThemeVars($vars)
|
41 |
{
|
42 |
-
$vars['name'] = preg_replace('
|
|
|
43 |
|
44 |
return $vars;
|
45 |
}
|
46 |
-
}
|
6 |
protected $locations = array(
|
7 |
'module' => 'modules/{$name}/',
|
8 |
'plugin' => 'plugins/{$vendor}/{$name}/',
|
9 |
+
'theme' => 'themes/{$vendor}-{$name}/'
|
10 |
);
|
11 |
|
12 |
/**
|
32 |
|
33 |
protected function inflectPluginVars($vars)
|
34 |
{
|
35 |
+
$vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']);
|
36 |
+
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
|
37 |
|
38 |
return $vars;
|
39 |
}
|
40 |
|
41 |
protected function inflectThemeVars($vars)
|
42 |
{
|
43 |
+
$vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);
|
44 |
+
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
|
45 |
|
46 |
return $vars;
|
47 |
}
|
48 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class OntoWikiInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'extension' => 'extensions/{$name}/',
|
8 |
+
'theme' => 'extensions/themes/{$name}/',
|
9 |
+
'translation' => 'extensions/translations/{$name}/',
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name to lower case and remove ".ontowiki" suffix
|
14 |
+
*/
|
15 |
+
public function inflectPackageVars($vars)
|
16 |
+
{
|
17 |
+
$vars['name'] = strtolower($vars['name']);
|
18 |
+
$vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']);
|
19 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
20 |
+
$vars['name'] = preg_replace('/-translation$/', '', $vars['name']);
|
21 |
+
|
22 |
+
return $vars;
|
23 |
+
}
|
24 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
|
5 |
+
class OsclassInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
|
8 |
+
protected $locations = array(
|
9 |
+
'plugin' => 'oc-content/plugins/{$name}/',
|
10 |
+
'theme' => 'oc-content/themes/{$name}/',
|
11 |
+
'language' => 'oc-content/languages/{$name}/',
|
12 |
+
);
|
13 |
+
|
14 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
CHANGED
@@ -18,7 +18,7 @@ class OxidInstaller extends BaseInstaller
|
|
18 |
*
|
19 |
* @param PackageInterface $package
|
20 |
* @param string $frameworkType
|
21 |
-
* @return
|
22 |
*/
|
23 |
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
24 |
{
|
18 |
*
|
19 |
* @param PackageInterface $package
|
20 |
* @param string $frameworkType
|
21 |
+
* @return string
|
22 |
*/
|
23 |
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
24 |
{
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PhiftyInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'bundle' => 'bundles/{$name}/',
|
8 |
+
'library' => 'libraries/{$name}/',
|
9 |
+
'framework' => 'frameworks/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PlentymarketsInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => '{$name}/'
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Remove hyphen, "plugin" and format to camelcase
|
12 |
+
* @param array $vars
|
13 |
+
*
|
14 |
+
* @return array
|
15 |
+
*/
|
16 |
+
public function inflectPackageVars($vars)
|
17 |
+
{
|
18 |
+
$vars['name'] = explode("-", $vars['name']);
|
19 |
+
foreach ($vars['name'] as $key => $name) {
|
20 |
+
$vars['name'][$key] = ucfirst($vars['name'][$key]);
|
21 |
+
if (strcasecmp($name, "Plugin") == 0) {
|
22 |
+
unset($vars['name'][$key]);
|
23 |
+
}
|
24 |
+
}
|
25 |
+
$vars['name'] = implode("",$vars['name']);
|
26 |
+
|
27 |
+
return $vars;
|
28 |
+
}
|
29 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/Plugin.php
CHANGED
@@ -8,10 +8,20 @@ use Composer\Plugin\PluginInterface;
|
|
8 |
|
9 |
class Plugin implements PluginInterface
|
10 |
{
|
|
|
11 |
|
12 |
public function activate(Composer $composer, IOInterface $io)
|
13 |
{
|
14 |
-
$installer = new Installer($io, $composer);
|
15 |
-
$composer->getInstallationManager()->addInstaller($installer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
}
|
17 |
}
|
8 |
|
9 |
class Plugin implements PluginInterface
|
10 |
{
|
11 |
+
private $installer;
|
12 |
|
13 |
public function activate(Composer $composer, IOInterface $io)
|
14 |
{
|
15 |
+
$this->installer = new Installer($io, $composer);
|
16 |
+
$composer->getInstallationManager()->addInstaller($this->installer);
|
17 |
+
}
|
18 |
+
|
19 |
+
public function deactivate(Composer $composer, IOInterface $io)
|
20 |
+
{
|
21 |
+
$composer->getInstallationManager()->removeInstaller($this->installer);
|
22 |
+
}
|
23 |
+
|
24 |
+
public function uninstall(Composer $composer, IOInterface $io)
|
25 |
+
{
|
26 |
}
|
27 |
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PortoInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'container' => 'app/Containers/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class ProcessWireInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
protected $locations = array(
|
8 |
+
'module' => 'site/modules/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name to CamelCase
|
13 |
+
*/
|
14 |
+
public function inflectPackageVars($vars)
|
15 |
+
{
|
16 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
17 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
18 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
19 |
+
|
20 |
+
return $vars;
|
21 |
+
}
|
22 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PxcmsInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'app/Modules/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name.
|
13 |
+
*
|
14 |
+
* @param array $vars
|
15 |
+
*
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public function inflectPackageVars($vars)
|
19 |
+
{
|
20 |
+
if ($vars['type'] === 'pxcms-module') {
|
21 |
+
return $this->inflectModuleVars($vars);
|
22 |
+
}
|
23 |
+
|
24 |
+
if ($vars['type'] === 'pxcms-theme') {
|
25 |
+
return $this->inflectThemeVars($vars);
|
26 |
+
}
|
27 |
+
|
28 |
+
return $vars;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* For package type pxcms-module, cut off a trailing '-plugin' if present.
|
33 |
+
*
|
34 |
+
* return string
|
35 |
+
*/
|
36 |
+
protected function inflectModuleVars($vars)
|
37 |
+
{
|
38 |
+
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
|
39 |
+
$vars['name'] = str_replace('module-', '', $vars['name']); // strip out module-
|
40 |
+
$vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module
|
41 |
+
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
|
42 |
+
$vars['name'] = ucwords($vars['name']); // make module name camelcased
|
43 |
+
|
44 |
+
return $vars;
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
/**
|
49 |
+
* For package type pxcms-module, cut off a trailing '-plugin' if present.
|
50 |
+
*
|
51 |
+
* return string
|
52 |
+
*/
|
53 |
+
protected function inflectThemeVars($vars)
|
54 |
+
{
|
55 |
+
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
|
56 |
+
$vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme-
|
57 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme
|
58 |
+
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
|
59 |
+
$vars['name'] = ucwords($vars['name']); // make module name camelcased
|
60 |
+
|
61 |
+
return $vars;
|
62 |
+
}
|
63 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class RadPHPInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'bundle' => 'src/{$name}/'
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format package name to CamelCase
|
12 |
+
*/
|
13 |
+
public function inflectPackageVars($vars)
|
14 |
+
{
|
15 |
+
$nameParts = explode('/', $vars['name']);
|
16 |
+
foreach ($nameParts as &$value) {
|
17 |
+
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
18 |
+
$value = str_replace(array('-', '_'), ' ', $value);
|
19 |
+
$value = str_replace(' ', '', ucwords($value));
|
20 |
+
}
|
21 |
+
$vars['name'] = implode('/', $nameParts);
|
22 |
+
return $vars;
|
23 |
+
}
|
24 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ReIndexInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'theme' => 'themes/{$name}/',
|
8 |
+
'plugin' => 'plugins/{$name}/'
|
9 |
+
);
|
10 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class Redaxo5Installer extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'addon' => 'redaxo/src/addons/{$name}/',
|
8 |
+
'bestyle-plugin' => 'redaxo/src/addons/be_style/plugins/{$name}/'
|
9 |
+
);
|
10 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
CHANGED
@@ -11,7 +11,9 @@ class ShopwareInstaller extends BaseInstaller
|
|
11 |
'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
|
12 |
'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
|
13 |
'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
|
14 |
-
'theme' => 'templates/{$name}/'
|
|
|
|
|
15 |
);
|
16 |
|
17 |
/**
|
@@ -23,9 +25,9 @@ class ShopwareInstaller extends BaseInstaller
|
|
23 |
{
|
24 |
if ($vars['type'] === 'shopware-theme') {
|
25 |
return $this->correctThemeName($vars);
|
26 |
-
} else {
|
27 |
-
return $this->correctPluginName($vars);
|
28 |
}
|
|
|
|
|
29 |
}
|
30 |
|
31 |
/**
|
11 |
'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
|
12 |
'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
|
13 |
'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
|
14 |
+
'theme' => 'templates/{$name}/',
|
15 |
+
'plugin' => 'custom/plugins/{$name}/',
|
16 |
+
'frontend-theme' => 'themes/Frontend/{$name}/',
|
17 |
);
|
18 |
|
19 |
/**
|
25 |
{
|
26 |
if ($vars['type'] === 'shopware-theme') {
|
27 |
return $this->correctThemeName($vars);
|
|
|
|
|
28 |
}
|
29 |
+
|
30 |
+
return $this->correctPluginName($vars);
|
31 |
}
|
32 |
|
33 |
/**
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php
CHANGED
@@ -28,9 +28,8 @@ class SilverStripeInstaller extends BaseInstaller
|
|
28 |
&& version_compare($package->getVersion(), '2.999.999') < 0
|
29 |
) {
|
30 |
return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
|
31 |
-
} else {
|
32 |
-
return parent::getInstallPath($package, $frameworkType);
|
33 |
}
|
34 |
|
|
|
35 |
}
|
36 |
}
|
28 |
&& version_compare($package->getVersion(), '2.999.999') < 0
|
29 |
) {
|
30 |
return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
|
|
|
|
|
31 |
}
|
32 |
|
33 |
+
return parent::getInstallPath($package, $frameworkType);
|
34 |
}
|
35 |
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class SiteDirectInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
protected $locations = array(
|
8 |
+
'module' => 'modules/{$vendor}/{$name}/',
|
9 |
+
'plugin' => 'plugins/{$vendor}/{$name}/'
|
10 |
+
);
|
11 |
+
|
12 |
+
public function inflectPackageVars($vars)
|
13 |
+
{
|
14 |
+
return $this->parseVars($vars);
|
15 |
+
}
|
16 |
+
|
17 |
+
protected function parseVars($vars)
|
18 |
+
{
|
19 |
+
$vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor'];
|
20 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
21 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
22 |
+
|
23 |
+
return $vars;
|
24 |
+
}
|
25 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class StarbugInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
'custom-module' => 'app/modules/{$name}/',
|
10 |
+
'custom-theme' => 'app/themes/{$name}/'
|
11 |
+
);
|
12 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class SyDESInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'app/modules/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format module name.
|
13 |
+
*
|
14 |
+
* Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
|
15 |
+
*
|
16 |
+
* {@inerhitDoc}
|
17 |
+
*/
|
18 |
+
public function inflectPackageVars($vars)
|
19 |
+
{
|
20 |
+
if ($vars['type'] == 'sydes-module') {
|
21 |
+
return $this->inflectModuleVars($vars);
|
22 |
+
}
|
23 |
+
|
24 |
+
if ($vars['type'] === 'sydes-theme') {
|
25 |
+
return $this->inflectThemeVars($vars);
|
26 |
+
}
|
27 |
+
|
28 |
+
return $vars;
|
29 |
+
}
|
30 |
+
|
31 |
+
public function inflectModuleVars($vars)
|
32 |
+
{
|
33 |
+
$vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']);
|
34 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
35 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
36 |
+
|
37 |
+
return $vars;
|
38 |
+
}
|
39 |
+
|
40 |
+
protected function inflectThemeVars($vars)
|
41 |
+
{
|
42 |
+
$vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']);
|
43 |
+
$vars['name'] = strtolower($vars['name']);
|
44 |
+
|
45 |
+
return $vars;
|
46 |
+
}
|
47 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class SyliusInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'theme' => 'themes/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* An installer to handle TAO extensions.
|
6 |
+
*/
|
7 |
+
class TaoInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
const EXTRA_TAO_EXTENSION_NAME = 'tao-extension-name';
|
10 |
+
|
11 |
+
protected $locations = array(
|
12 |
+
'extension' => '{$name}'
|
13 |
+
);
|
14 |
+
|
15 |
+
public function inflectPackageVars($vars)
|
16 |
+
{
|
17 |
+
$extra = $this->package->getExtra();
|
18 |
+
|
19 |
+
if (array_key_exists(self::EXTRA_TAO_EXTENSION_NAME, $extra)) {
|
20 |
+
$vars['name'] = $extra[self::EXTRA_TAO_EXTENSION_NAME];
|
21 |
+
return $vars;
|
22 |
+
}
|
23 |
+
|
24 |
+
$vars['name'] = str_replace('extension-', '', $vars['name']);
|
25 |
+
$vars['name'] = str_replace('-', ' ', $vars['name']);
|
26 |
+
$vars['name'] = lcfirst(str_replace(' ', '', ucwords($vars['name'])));
|
27 |
+
|
28 |
+
return $vars;
|
29 |
+
}
|
30 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class TastyIgniterInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
protected $locations = array(
|
8 |
+
'extension' => 'extensions/{$vendor}/{$name}/',
|
9 |
+
'theme' => 'themes/{$name}/',
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name.
|
14 |
+
*
|
15 |
+
* Cut off leading 'ti-ext-' or 'ti-theme-' if present.
|
16 |
+
* Strip vendor name of characters that is not alphanumeric or an underscore
|
17 |
+
*
|
18 |
+
*/
|
19 |
+
public function inflectPackageVars($vars)
|
20 |
+
{
|
21 |
+
if ($vars['type'] === 'tastyigniter-extension') {
|
22 |
+
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
|
23 |
+
$vars['name'] = preg_replace('/^ti-ext-/', '', $vars['name']);
|
24 |
+
}
|
25 |
+
|
26 |
+
if ($vars['type'] === 'tastyigniter-theme') {
|
27 |
+
$vars['name'] = preg_replace('/^ti-theme-/', '', $vars['name']);
|
28 |
+
}
|
29 |
+
|
30 |
+
return $vars;
|
31 |
+
}
|
32 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class UserFrostingInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'sprinkle' => 'app/sprinkles/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class VanillaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'plugins/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class VgmcpInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'bundle' => 'src/{$vendor}/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/'
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name.
|
13 |
+
*
|
14 |
+
* For package type vgmcp-bundle, cut off a trailing '-bundle' if present.
|
15 |
+
*
|
16 |
+
* For package type vgmcp-theme, cut off a trailing '-theme' if present.
|
17 |
+
*
|
18 |
+
*/
|
19 |
+
public function inflectPackageVars($vars)
|
20 |
+
{
|
21 |
+
if ($vars['type'] === 'vgmcp-bundle') {
|
22 |
+
return $this->inflectPluginVars($vars);
|
23 |
+
}
|
24 |
+
|
25 |
+
if ($vars['type'] === 'vgmcp-theme') {
|
26 |
+
return $this->inflectThemeVars($vars);
|
27 |
+
}
|
28 |
+
|
29 |
+
return $vars;
|
30 |
+
}
|
31 |
+
|
32 |
+
protected function inflectPluginVars($vars)
|
33 |
+
{
|
34 |
+
$vars['name'] = preg_replace('/-bundle$/', '', $vars['name']);
|
35 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
36 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
37 |
+
|
38 |
+
return $vars;
|
39 |
+
}
|
40 |
+
|
41 |
+
protected function inflectThemeVars($vars)
|
42 |
+
{
|
43 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
44 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
45 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
46 |
+
|
47 |
+
return $vars;
|
48 |
+
}
|
49 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
CHANGED
@@ -5,6 +5,17 @@ namespace Composer\Installers;
|
|
5 |
class WHMCSInstaller extends BaseInstaller
|
6 |
{
|
7 |
protected $locations = array(
|
8 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
);
|
10 |
}
|
5 |
class WHMCSInstaller extends BaseInstaller
|
6 |
{
|
7 |
protected $locations = array(
|
8 |
+
'addons' => 'modules/addons/{$vendor}_{$name}/',
|
9 |
+
'fraud' => 'modules/fraud/{$vendor}_{$name}/',
|
10 |
+
'gateways' => 'modules/gateways/{$vendor}_{$name}/',
|
11 |
+
'notifications' => 'modules/notifications/{$vendor}_{$name}/',
|
12 |
+
'registrars' => 'modules/registrars/{$vendor}_{$name}/',
|
13 |
+
'reports' => 'modules/reports/{$vendor}_{$name}/',
|
14 |
+
'security' => 'modules/security/{$vendor}_{$name}/',
|
15 |
+
'servers' => 'modules/servers/{$vendor}_{$name}/',
|
16 |
+
'social' => 'modules/social/{$vendor}_{$name}/',
|
17 |
+
'support' => 'modules/support/{$vendor}_{$name}/',
|
18 |
+
'templates' => 'templates/{$vendor}_{$name}/',
|
19 |
+
'includes' => 'includes/{$vendor}_{$name}/'
|
20 |
);
|
21 |
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/WinterInstaller.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class WinterInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
'plugin' => 'plugins/{$vendor}/{$name}/',
|
9 |
+
'theme' => 'themes/{$name}/'
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name.
|
14 |
+
*
|
15 |
+
* For package type winter-plugin, cut off a trailing '-plugin' if present.
|
16 |
+
*
|
17 |
+
* For package type winter-theme, cut off a trailing '-theme' if present.
|
18 |
+
*
|
19 |
+
*/
|
20 |
+
public function inflectPackageVars($vars)
|
21 |
+
{
|
22 |
+
if ($vars['type'] === 'winter-module') {
|
23 |
+
return $this->inflectModuleVars($vars);
|
24 |
+
}
|
25 |
+
|
26 |
+
if ($vars['type'] === 'winter-plugin') {
|
27 |
+
return $this->inflectPluginVars($vars);
|
28 |
+
}
|
29 |
+
|
30 |
+
if ($vars['type'] === 'winter-theme') {
|
31 |
+
return $this->inflectThemeVars($vars);
|
32 |
+
}
|
33 |
+
|
34 |
+
return $vars;
|
35 |
+
}
|
36 |
+
|
37 |
+
protected function inflectModuleVars($vars)
|
38 |
+
{
|
39 |
+
$vars['name'] = preg_replace('/^wn-|-module$/', '', $vars['name']);
|
40 |
+
|
41 |
+
return $vars;
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function inflectPluginVars($vars)
|
45 |
+
{
|
46 |
+
$vars['name'] = preg_replace('/^wn-|-plugin$/', '', $vars['name']);
|
47 |
+
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
|
48 |
+
|
49 |
+
return $vars;
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function inflectThemeVars($vars)
|
53 |
+
{
|
54 |
+
$vars['name'] = preg_replace('/^wn-|-theme$/', '', $vars['name']);
|
55 |
+
|
56 |
+
return $vars;
|
57 |
+
}
|
58 |
+
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php
CHANGED
@@ -7,5 +7,6 @@ class WordPressInstaller extends BaseInstaller
|
|
7 |
'plugin' => 'wp-content/plugins/{$name}/',
|
8 |
'theme' => 'wp-content/themes/{$name}/',
|
9 |
'muplugin' => 'wp-content/mu-plugins/{$name}/',
|
|
|
10 |
);
|
11 |
}
|
7 |
'plugin' => 'wp-content/plugins/{$name}/',
|
8 |
'theme' => 'wp-content/themes/{$name}/',
|
9 |
'muplugin' => 'wp-content/mu-plugins/{$name}/',
|
10 |
+
'dropin' => 'wp-content/{$name}/',
|
11 |
);
|
12 |
}
|
includes/gateways/stripe/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: cbleek
|
5 |
+
* Date: 25.03.16
|
6 |
+
* Time: 20:55
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace Composer\Installers;
|
10 |
+
|
11 |
+
|
12 |
+
class YawikInstaller extends BaseInstaller
|
13 |
+
{
|
14 |
+
protected $locations = array(
|
15 |
+
'module' => 'module/{$name}/',
|
16 |
+
);
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Format package name to CamelCase
|
20 |
+
* @param array $vars
|
21 |
+
*
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function inflectPackageVars($vars)
|
25 |
+
{
|
26 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
27 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
28 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
29 |
+
|
30 |
+
return $vars;
|
31 |
+
}
|
32 |
+
}
|
includes/gateways/stripe/vendor/composer/platform_check.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// platform_check.php @generated by Composer
|
4 |
+
|
5 |
+
$issues = array();
|
6 |
+
|
7 |
+
if (!(PHP_VERSION_ID >= 50600)) {
|
8 |
+
$issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.';
|
9 |
+
}
|
10 |
+
|
11 |
+
if ($issues) {
|
12 |
+
if (!headers_sent()) {
|
13 |
+
header('HTTP/1.1 500 Internal Server Error');
|
14 |
+
}
|
15 |
+
if (!ini_get('display_errors')) {
|
16 |
+
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
17 |
+
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
|
18 |
+
} elseif (!headers_sent()) {
|
19 |
+
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
trigger_error(
|
23 |
+
'Composer detected issues in your platform: ' . implode(' ', $issues),
|
24 |
+
E_USER_ERROR
|
25 |
+
);
|
26 |
+
}
|
includes/payments/functions.php
CHANGED
@@ -388,11 +388,11 @@ function edd_delete_purchase( $payment_id = 0, $update_customer = true, $delete_
|
|
388 |
* when refunding or deleting a purchase
|
389 |
*
|
390 |
* @since 1.0.8.1
|
391 |
-
* @param int $download_id Download (Post) ID
|
392 |
* @param int $payment_id Payment ID
|
393 |
* @return void
|
394 |
*/
|
395 |
-
function edd_undo_purchase( $download_id
|
396 |
|
397 |
/**
|
398 |
* In 2.5.7, a bug was found that $download_id was an incorrect usage. Passing it in
|
388 |
* when refunding or deleting a purchase
|
389 |
*
|
390 |
* @since 1.0.8.1
|
391 |
+
* @param int $download_id Download (Post) ID. This should be passed as `false`.
|
392 |
* @param int $payment_id Payment ID
|
393 |
* @return void
|
394 |
*/
|
395 |
+
function edd_undo_purchase( $download_id, $payment_id ) {
|
396 |
|
397 |
/**
|
398 |
* In 2.5.7, a bug was found that $download_id was an incorrect usage. Passing it in
|
languages/easy-digital-downloads.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Easy Digital Downloads package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Easy Digital Downloads 2.10.
|
6 |
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
|
7 |
-
"POT-Creation-Date: 2021-05-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -98,7 +98,7 @@ msgstr ""
|
|
98 |
#: includes/error-tracking.php:40 includes/gateways/functions.php:232
|
99 |
#: includes/gateways/manual.php:33 includes/gateways/paypal-standard.php:168
|
100 |
#: includes/gateways/stripe/includes/admin/upgrade-functions.php:57
|
101 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
102 |
#: includes/process-download.php:303 includes/process-download.php:894
|
103 |
#: includes/query-filters.php:48 includes/user-functions.php:895
|
104 |
#: includes/user-functions.php:920 includes/user-functions.php:973
|
@@ -4448,7 +4448,7 @@ msgid "Main"
|
|
4448 |
msgstr ""
|
4449 |
|
4450 |
#: includes/admin/settings/register-settings.php:1451
|
4451 |
-
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:
|
4452 |
#: includes/install.php:92 templates/widget-cart-checkout.php:6
|
4453 |
#: templates/widget-cart-empty.php:7
|
4454 |
msgid "Checkout"
|
@@ -5735,7 +5735,7 @@ msgid "Go back"
|
|
5735 |
msgstr ""
|
5736 |
|
5737 |
#: includes/checkout/template.php:963
|
5738 |
-
#: includes/gateways/stripe/includes/scripts.php:
|
5739 |
msgid "Next"
|
5740 |
msgstr ""
|
5741 |
|
@@ -7206,6 +7206,11 @@ msgstr ""
|
|
7206 |
msgid "Yes"
|
7207 |
msgstr ""
|
7208 |
|
|
|
|
|
|
|
|
|
|
|
7209 |
#: includes/gateways/stripe/includes/admin/admin-filters.php:84
|
7210 |
msgid "Process"
|
7211 |
msgstr ""
|
@@ -7482,7 +7487,7 @@ msgid "Webhook URL: %s"
|
|
7482 |
msgstr ""
|
7483 |
|
7484 |
#: includes/gateways/stripe/includes/admin/settings.php:102
|
7485 |
-
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:
|
7486 |
#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor
|
7487 |
#. tag, do not translate.
|
7488 |
#. translators: %1$s Opening anchor tag, do not translate. %2$s Opening anchor
|
@@ -7762,6 +7767,15 @@ msgid ""
|
|
7762 |
"be completed. Please click the link below to take finalize your purchase"
|
7763 |
msgstr ""
|
7764 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7765 |
#: includes/gateways/stripe/includes/gateway-actions.php:17
|
7766 |
#: includes/gateways/stripe/includes/gateway-actions.php:26
|
7767 |
#: includes/gateways/stripe/includes/gateway-actions.php:35
|
@@ -7936,9 +7950,8 @@ msgstr ""
|
|
7936 |
msgid "Unable to create payment."
|
7937 |
msgstr ""
|
7938 |
|
7939 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7940 |
-
|
7941 |
-
msgid "Charge refunded in Stripe. Refund ID %s"
|
7942 |
msgstr ""
|
7943 |
|
7944 |
#: includes/gateways/stripe/includes/payment-methods/buy-now/ajax.php:19
|
@@ -7952,11 +7965,12 @@ msgstr ""
|
|
7952 |
msgid "Please enter a valid email address"
|
7953 |
msgstr ""
|
7954 |
|
7955 |
-
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:
|
|
|
7956 |
msgid "Apple Pay/Google Pay"
|
7957 |
msgstr ""
|
7958 |
|
7959 |
-
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:
|
7960 |
#. translators: %1$s Opening anchor tag, do not translate. %2$s Opening anchor
|
7961 |
#. tag, do not translate. %3$s Closing anchor tag, do not translate.
|
7962 |
msgid ""
|
@@ -7965,22 +7979,28 @@ msgid ""
|
|
7965 |
"%2$sApple's%3$s terms of service."
|
7966 |
msgstr ""
|
7967 |
|
7968 |
-
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:
|
7969 |
-
msgid "This feature is not available when taxes are enabled."
|
7970 |
-
msgstr ""
|
7971 |
-
|
7972 |
-
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:46
|
7973 |
msgid "Apple Pay is not available in Test Mode."
|
7974 |
msgstr ""
|
7975 |
|
7976 |
-
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:
|
7977 |
msgid "Single %s"
|
7978 |
msgstr ""
|
7979 |
|
7980 |
-
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:
|
7981 |
msgid "%s Archive (includes <code>[downloads]</code> shortcode)"
|
7982 |
msgstr ""
|
7983 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7984 |
#: includes/gateways/stripe/includes/payment-methods/payment-request/apple-pay.php:28
|
7985 |
msgid "Apple Pay domain verification error."
|
7986 |
msgstr ""
|
@@ -8016,32 +8036,28 @@ msgstr ""
|
|
8016 |
msgid "To finalize your preapproved purchase, please confirm your payment method."
|
8017 |
msgstr ""
|
8018 |
|
8019 |
-
#: includes/gateways/stripe/includes/scripts.php:
|
8020 |
msgid ""
|
8021 |
"Stripe publishable key missing. Please enter your publishable key in "
|
8022 |
"Settings."
|
8023 |
msgstr ""
|
8024 |
|
8025 |
-
#: includes/gateways/stripe/includes/scripts.php:
|
8026 |
msgid "Please fill out all required fields to continue your purchase."
|
8027 |
msgstr ""
|
8028 |
|
8029 |
-
#: includes/gateways/stripe/includes/scripts.php:
|
8030 |
msgid "Please agree to the terms to complete your purchase."
|
8031 |
msgstr ""
|
8032 |
|
8033 |
-
#: includes/gateways/stripe/includes/scripts.php:
|
8034 |
msgid "Please agree to the privacy policy to complete your purchase."
|
8035 |
msgstr ""
|
8036 |
|
8037 |
-
#: includes/gateways/stripe/includes/scripts.php:
|
8038 |
msgid "Unable to complete your request. Please try again."
|
8039 |
msgstr ""
|
8040 |
|
8041 |
-
#: includes/gateways/stripe/includes/scripts.php:140
|
8042 |
-
msgid "Refund Charge in Stripe"
|
8043 |
-
msgstr ""
|
8044 |
-
|
8045 |
#: includes/gateways/stripe/includes/template-functions.php:102
|
8046 |
msgid "Adding new payment methods is currently unavailable."
|
8047 |
msgstr ""
|
2 |
# This file is distributed under the same license as the Easy Digital Downloads package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Easy Digital Downloads 2.10.5\n"
|
6 |
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
|
7 |
+
"POT-Creation-Date: 2021-05-20 13:19:09+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
98 |
#: includes/error-tracking.php:40 includes/gateways/functions.php:232
|
99 |
#: includes/gateways/manual.php:33 includes/gateways/paypal-standard.php:168
|
100 |
#: includes/gateways/stripe/includes/admin/upgrade-functions.php:57
|
101 |
+
#: includes/gateways/stripe/includes/payment-actions.php:1401
|
102 |
#: includes/process-download.php:303 includes/process-download.php:894
|
103 |
#: includes/query-filters.php:48 includes/user-functions.php:895
|
104 |
#: includes/user-functions.php:920 includes/user-functions.php:973
|
4448 |
msgstr ""
|
4449 |
|
4450 |
#: includes/admin/settings/register-settings.php:1451
|
4451 |
+
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:82
|
4452 |
#: includes/install.php:92 templates/widget-cart-checkout.php:6
|
4453 |
#: templates/widget-cart-empty.php:7
|
4454 |
msgid "Checkout"
|
5735 |
msgstr ""
|
5736 |
|
5737 |
#: includes/checkout/template.php:963
|
5738 |
+
#: includes/gateways/stripe/includes/scripts.php:81
|
5739 |
msgid "Next"
|
5740 |
msgstr ""
|
5741 |
|
7206 |
msgid "Yes"
|
7207 |
msgstr ""
|
7208 |
|
7209 |
+
#: includes/gateways/stripe/includes/admin/admin-actions.php:187
|
7210 |
+
#: includes/gateways/stripe/includes/scripts.php:149
|
7211 |
+
msgid "Refund Charge in Stripe"
|
7212 |
+
msgstr ""
|
7213 |
+
|
7214 |
#: includes/gateways/stripe/includes/admin/admin-filters.php:84
|
7215 |
msgid "Process"
|
7216 |
msgstr ""
|
7487 |
msgstr ""
|
7488 |
|
7489 |
#: includes/gateways/stripe/includes/admin/settings.php:102
|
7490 |
+
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:53
|
7491 |
#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor
|
7492 |
#. tag, do not translate.
|
7493 |
#. translators: %1$s Opening anchor tag, do not translate. %2$s Opening anchor
|
7767 |
"be completed. Please click the link below to take finalize your purchase"
|
7768 |
msgstr ""
|
7769 |
|
7770 |
+
#: includes/gateways/stripe/includes/functions.php:571
|
7771 |
+
msgid "Invalid order ID."
|
7772 |
+
msgstr ""
|
7773 |
+
|
7774 |
+
#: includes/gateways/stripe/includes/functions.php:639
|
7775 |
+
#. translators: %1$s the amount refunded; %2$s Stripe Refund ID
|
7776 |
+
msgid "%1$s refunded in Stripe. Refund ID %2$s"
|
7777 |
+
msgstr ""
|
7778 |
+
|
7779 |
#: includes/gateways/stripe/includes/gateway-actions.php:17
|
7780 |
#: includes/gateways/stripe/includes/gateway-actions.php:26
|
7781 |
#: includes/gateways/stripe/includes/gateway-actions.php:35
|
7950 |
msgid "Unable to create payment."
|
7951 |
msgstr ""
|
7952 |
|
7953 |
+
#: includes/gateways/stripe/includes/payment-actions.php:1443
|
7954 |
+
msgid "Charge not refunded in Stripe, as checkbox was not selected."
|
|
|
7955 |
msgstr ""
|
7956 |
|
7957 |
#: includes/gateways/stripe/includes/payment-methods/buy-now/ajax.php:19
|
7965 |
msgid "Please enter a valid email address"
|
7966 |
msgstr ""
|
7967 |
|
7968 |
+
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:32
|
7969 |
+
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:40
|
7970 |
msgid "Apple Pay/Google Pay"
|
7971 |
msgstr ""
|
7972 |
|
7973 |
+
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:45
|
7974 |
#. translators: %1$s Opening anchor tag, do not translate. %2$s Opening anchor
|
7975 |
#. tag, do not translate. %3$s Closing anchor tag, do not translate.
|
7976 |
msgid ""
|
7979 |
"%2$sApple's%3$s terms of service."
|
7980 |
msgstr ""
|
7981 |
|
7982 |
+
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:51
|
|
|
|
|
|
|
|
|
7983 |
msgid "Apple Pay is not available in Test Mode."
|
7984 |
msgstr ""
|
7985 |
|
7986 |
+
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:74
|
7987 |
msgid "Single %s"
|
7988 |
msgstr ""
|
7989 |
|
7990 |
+
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:79
|
7991 |
msgid "%s Archive (includes <code>[downloads]</code> shortcode)"
|
7992 |
msgstr ""
|
7993 |
|
7994 |
+
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:110
|
7995 |
+
msgid "This feature is not available when taxes are enabled."
|
7996 |
+
msgstr ""
|
7997 |
+
|
7998 |
+
#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:118
|
7999 |
+
#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor
|
8000 |
+
#. tag, do not translate.
|
8001 |
+
msgid "See the %1$sExpress Checkout documentation%2$s for more information."
|
8002 |
+
msgstr ""
|
8003 |
+
|
8004 |
#: includes/gateways/stripe/includes/payment-methods/payment-request/apple-pay.php:28
|
8005 |
msgid "Apple Pay domain verification error."
|
8006 |
msgstr ""
|
8036 |
msgid "To finalize your preapproved purchase, please confirm your payment method."
|
8037 |
msgstr ""
|
8038 |
|
8039 |
+
#: includes/gateways/stripe/includes/scripts.php:86
|
8040 |
msgid ""
|
8041 |
"Stripe publishable key missing. Please enter your publishable key in "
|
8042 |
"Settings."
|
8043 |
msgstr ""
|
8044 |
|
8045 |
+
#: includes/gateways/stripe/includes/scripts.php:87
|
8046 |
msgid "Please fill out all required fields to continue your purchase."
|
8047 |
msgstr ""
|
8048 |
|
8049 |
+
#: includes/gateways/stripe/includes/scripts.php:88
|
8050 |
msgid "Please agree to the terms to complete your purchase."
|
8051 |
msgstr ""
|
8052 |
|
8053 |
+
#: includes/gateways/stripe/includes/scripts.php:89
|
8054 |
msgid "Please agree to the privacy policy to complete your purchase."
|
8055 |
msgstr ""
|
8056 |
|
8057 |
+
#: includes/gateways/stripe/includes/scripts.php:90
|
8058 |
msgid "Unable to complete your request. Please try again."
|
8059 |
msgstr ""
|
8060 |
|
|
|
|
|
|
|
|
|
8061 |
#: includes/gateways/stripe/includes/template-functions.php:102
|
8062 |
msgid "Adding new payment methods is currently unavailable."
|
8063 |
msgstr ""
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Tags: ecommerce, sell, checkout, payments, stripe
|
|
7 |
Requires at least: 4.4
|
8 |
Tested up to: 5.7.1
|
9 |
Requires PHP: 5.3
|
10 |
-
Stable Tag: 2.10.
|
11 |
License: GNU Version 2 or Any Later Version
|
12 |
|
13 |
Sell your digital products the simple way. Easily build an online store complete with a cart system, checkout forms, reports, coupons, and more!
|
@@ -247,6 +247,19 @@ Yes, through the use of our commercial addon called [Recurring Payments](https:/
|
|
247 |
11. Google Pay checkout
|
248 |
|
249 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
= 2.10.4, May 4, 2021 =
|
251 |
* Security Fix: Reflected XSS.
|
252 |
|
7 |
Requires at least: 4.4
|
8 |
Tested up to: 5.7.1
|
9 |
Requires PHP: 5.3
|
10 |
+
Stable Tag: 2.10.5
|
11 |
License: GNU Version 2 or Any Later Version
|
12 |
|
13 |
Sell your digital products the simple way. Easily build an online store complete with a cart system, checkout forms, reports, coupons, and more!
|
247 |
11. Google Pay checkout
|
248 |
|
249 |
== Changelog ==
|
250 |
+
= 2.10.5, May 20, 2021 =
|
251 |
+
* Fix: Unexpected checkout fields may become required when they weren't before, after a discount code is applied.
|
252 |
+
* Fix: Deprecation notices in PHP 8.
|
253 |
+
* New: Stripe - Added UGX to zero decimal currency list.
|
254 |
+
* Improvement: Stripe - The Express Checkout gateway option is now completely hidden until eligibility is confirmed, whereas before it was shown and then hidden if determined to be ineligible. This should remove the sudden "flash" of the gateway option disappearing.
|
255 |
+
* Improvement: Stripe - Express Checkout settings are now disabled if taxes are enabled for the store.
|
256 |
+
* Fix: Stripe - The "Buy Now" modal visible on the page if Buy Now is enabled but the Stripe gateway isn't active.
|
257 |
+
* Fix: Stripe - Incorrect get_current_user() function usage.
|
258 |
+
* Fix: Stripe - Express Checkout not using custom price (from the Custom Prices add-on).
|
259 |
+
* Fix: Stripe - Undefined variable $purchase_data when making purchase that only contains fees.
|
260 |
+
* Dev: Stripe - Update refund logic to use new refunds API in EDD 3.0.
|
261 |
+
* Dev: Stripe - Remove composer/installer version lock.
|
262 |
+
|
263 |
= 2.10.4, May 4, 2021 =
|
264 |
* Security Fix: Reflected XSS.
|
265 |
|