From 3bebc428ece0f33b0d1dd13a1c45bca2e1b1bd6c Mon Sep 17 00:00:00 2001 From: cleitonaguiarandrade Date: Wed, 30 Mar 2022 16:45:48 -0300 Subject: [PATCH 01/44] Changed total approved rule and corrected total amount in Abstract Notification with the difference due to rounding --- includes/MPUseful.php | 28 +++++++++++++++++++ includes/module/checkouts/CustomCheckout.php | 18 +++--------- .../notification/AbstractNotification.php | 16 ++++++----- .../module/notification/IpnNotification.php | 11 +++++++- 4 files changed, 51 insertions(+), 22 deletions(-) diff --git a/includes/MPUseful.php b/includes/MPUseful.php index c02e7fc0..00fcc32b 100644 --- a/includes/MPUseful.php +++ b/includes/MPUseful.php @@ -292,4 +292,32 @@ public function getRound() return $round; } + + + /** + * Get corrected total amount + * + * @return bool + */ + public function getCorrectedTotal($cart) + { + $strDiscount = Configuration::get('MERCADOPAGO_CUSTOM_DISCOUNT'); + + $shipping = (float) $cart->getOrderTotal(true, 5); + $products = (float) $cart->getOrderTotal(true, 4); + $cartTotal = (float) $cart->getOrderTotal(); + + $discount = $products * ((float) $strDiscount / 100); + $products = ($discount != 0) ? $products - $discount : $products; + + + $subtotal = $products + $shipping; + $difference = $cartTotal - $subtotal - $discount; + $amount = $subtotal + $difference; + + return [ + "amount" => $amount, + "discount" => $strDiscount + ]; + } } diff --git a/includes/module/checkouts/CustomCheckout.php b/includes/module/checkouts/CustomCheckout.php index 278a76e9..114e3986 100644 --- a/includes/module/checkouts/CustomCheckout.php +++ b/includes/module/checkouts/CustomCheckout.php @@ -93,32 +93,22 @@ public function getCustomCheckout($cart) } } + $correctedTotal = $this->mpuseful->getCorrectedTotal($cart); + $site_id = Configuration::get('MERCADOPAGO_SITE_ID'); - $strDiscount = Configuration::get('MERCADOPAGO_CUSTOM_DISCOUNT'); $walletButton = Configuration::get('MERCADOPAGO_CUSTOM_WALLET_BUTTON'); $redirect = $this->payment->context->link->getModuleLink($this->payment->name, 'custom'); $public_key = $this->payment->mercadopago->getPublicKey(); - $shipping = (float) $cart->getOrderTotal(true, 5); - $products = (float) $cart->getOrderTotal(true, 4); - $cartTotal = (float) $cart->getOrderTotal(); - - $discount = $products * ((float) $strDiscount / 100); - $products = ($discount != 0) ? $products - $discount : $products; - - $subtotal = $products + $shipping; - $difference = $cartTotal - $subtotal - $discount; - $amount = $subtotal + $difference; - $checkoutInfo = array( "debit" => $debit, "credit" => $credit, - "amount" => $amount, + "amount" => $correctedTotal['amount'], "site_id" => $site_id, "wallet_button" => $walletButton, "version" => MP_VERSION, "redirect" => $redirect, - "discount" => $strDiscount, + "discount" => $correctedTotal['discount'], "public_key" => $public_key, "assets_ext_min" => $this->assets_ext_min, "terms_url" => $this->mpuseful->getTermsAndPoliciesLink($site_id), diff --git a/includes/module/notification/AbstractNotification.php b/includes/module/notification/AbstractNotification.php index 1f7ad456..350950ed 100644 --- a/includes/module/notification/AbstractNotification.php +++ b/includes/module/notification/AbstractNotification.php @@ -44,6 +44,7 @@ class AbstractNotification public $ps_order_state; public $order_state_lang; public $customer_secure_key; + public $mpuseful; public function __construct($transaction_id) { @@ -53,6 +54,7 @@ public function __construct($transaction_id) $this->ps_order_state = new PSOrderState(); $this->ps_order_state_lang = new PSOrderStateLang(); $this->transaction_id = $transaction_id; + $this->mpuseful = MPUseful::getInstance(); $this->amount = 0; $this->pending = 0; @@ -125,7 +127,7 @@ public function createOrder($cart, $custom_create_order = false) $this->module->validateOrder( $cart->id, $this->order_state, - $this->total, + $cart->getOrderTotal(), "Mercado Pago", null, array(), @@ -536,14 +538,14 @@ public static function getNotificationResponse($message, $code) */ public function getTotal($cart) { - $total = (float) $cart->getOrderTotal(); - $localization = Configuration::get('MERCADOPAGO_SITE_ID'); + $correctedTotal = $this->mpuseful->getCorrectedTotal($cart); + $localization = Configuration::get('MERCADOPAGO_SITE_ID'); - if ($localization == 'MCO' || $localization == 'MLC') { - return Tools::ps_round($total, 2); - } + if ($localization == 'MCO' || $localization == 'MLC') { + return Tools::ps_round($correctedTotal['amount'], 0); + } - return $total; + return Tools::ps_round($correctedTotal['amount'], 2); } /** diff --git a/includes/module/notification/IpnNotification.php b/includes/module/notification/IpnNotification.php index b290947d..22b9517c 100644 --- a/includes/module/notification/IpnNotification.php +++ b/includes/module/notification/IpnNotification.php @@ -152,7 +152,16 @@ public function verifyPayments($payments) $this->payments_data['payments_status'][] = $this->status; if ($this->status == 'approved') { - $this->approved += $payment_info['transaction_amount']; + + $total_paid = $payment_info['transaction_details']['total_paid_amount']; + $coupon_amount = $payment_info['coupon_amount']; + + if($coupon_amount > 0 && $coupon_amount!==null){ + $total_paid += $coupon_amount; + } + + $this->approved += $total_paid; + } elseif ($this->status == 'in_process' || $this->status == 'pending' || $this->status == 'authorized') { $this->pending += $payment_info['transaction_amount']; } From c7771c35daaee0e1d0dd6b42ed44afbf36592260 Mon Sep 17 00:00:00 2001 From: cleitonaguiarandrade Date: Thu, 31 Mar 2022 18:55:13 -0300 Subject: [PATCH 02/44] Fixed indentation --- bin/validate_zip.php | 4 ++-- .../module/notification/AbstractNotification.php | 6 +++--- includes/module/notification/IpnNotification.php | 14 ++++++-------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/bin/validate_zip.php b/bin/validate_zip.php index 5445b9b0..04b8fe8c 100755 --- a/bin/validate_zip.php +++ b/bin/validate_zip.php @@ -68,7 +68,7 @@ case 'Details': case 'Structure': // do nothing - break; + break; default: if (is_array($reports)) { @@ -87,7 +87,7 @@ } } } - break; + break; } } diff --git a/includes/module/notification/AbstractNotification.php b/includes/module/notification/AbstractNotification.php index 350950ed..d35ab615 100644 --- a/includes/module/notification/AbstractNotification.php +++ b/includes/module/notification/AbstractNotification.php @@ -541,9 +541,9 @@ public function getTotal($cart) $correctedTotal = $this->mpuseful->getCorrectedTotal($cart); $localization = Configuration::get('MERCADOPAGO_SITE_ID'); - if ($localization == 'MCO' || $localization == 'MLC') { - return Tools::ps_round($correctedTotal['amount'], 0); - } + if ($localization == 'MCO' || $localization == 'MLC') { + return Tools::ps_round($correctedTotal['amount'], 0); + } return Tools::ps_round($correctedTotal['amount'], 2); } diff --git a/includes/module/notification/IpnNotification.php b/includes/module/notification/IpnNotification.php index 22b9517c..10d357fd 100644 --- a/includes/module/notification/IpnNotification.php +++ b/includes/module/notification/IpnNotification.php @@ -152,16 +152,14 @@ public function verifyPayments($payments) $this->payments_data['payments_status'][] = $this->status; if ($this->status == 'approved') { + $total_paid = $payment_info['transaction_details']['total_paid_amount']; + $coupon_amount = $payment_info['coupon_amount']; - $total_paid = $payment_info['transaction_details']['total_paid_amount']; - $coupon_amount = $payment_info['coupon_amount']; - - if($coupon_amount > 0 && $coupon_amount!==null){ - $total_paid += $coupon_amount; - } - - $this->approved += $total_paid; + if ($coupon_amount > 0 && $coupon_amount!==null) { + $total_paid += $coupon_amount; + } + $this->approved += $total_paid; } elseif ($this->status == 'in_process' || $this->status == 'pending' || $this->status == 'authorized') { $this->pending += $payment_info['transaction_amount']; } From 0e508883aa1b17841a17566fb1f4c7c233a99173 Mon Sep 17 00:00:00 2001 From: cleitonaguiarandrade Date: Fri, 1 Apr 2022 10:16:59 -0300 Subject: [PATCH 03/44] Fixed errors found by validator --- controllers/index.php | 1 + includes/module/notification/index.php | 1 + mails/index.php | 2 +- sql/index.php | 1 + upgrade/index.php | 1 + views/index.php | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/controllers/index.php b/controllers/index.php index d3de807b..acf8643a 100644 --- a/controllers/index.php +++ b/controllers/index.php @@ -26,6 +26,7 @@ * Don't forget to prefix your containers with your own identifier * to avoid any conflicts with others containers. */ + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); diff --git a/includes/module/notification/index.php b/includes/module/notification/index.php index d3de807b..acf8643a 100644 --- a/includes/module/notification/index.php +++ b/includes/module/notification/index.php @@ -26,6 +26,7 @@ * Don't forget to prefix your containers with your own identifier * to avoid any conflicts with others containers. */ + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); diff --git a/mails/index.php b/mails/index.php index 195fab22..0995d0ec 100644 --- a/mails/index.php +++ b/mails/index.php @@ -1,5 +1,5 @@ Date: Fri, 1 Apr 2022 10:19:41 -0300 Subject: [PATCH 04/44] Fixed errors found by validator --- includes/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/index.php b/includes/index.php index d3de807b..acf8643a 100644 --- a/includes/index.php +++ b/includes/index.php @@ -26,6 +26,7 @@ * Don't forget to prefix your containers with your own identifier * to avoid any conflicts with others containers. */ + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); From c2eee14c95b32e85635fffbf17e205dbabec964a Mon Sep 17 00:00:00 2001 From: cleitonaguiarandrade Date: Fri, 1 Apr 2022 18:28:33 -0300 Subject: [PATCH 05/44] Corrected function get corrected total to get the cupom based on the checkout type --- includes/MPUseful.php | 41 +++++++++++++++---- includes/module/checkouts/CustomCheckout.php | 3 +- .../notification/AbstractNotification.php | 6 +-- .../module/notification/IpnNotification.php | 20 +++++++-- .../notification/WebhookNotification.php | 4 +- 5 files changed, 56 insertions(+), 18 deletions(-) diff --git a/includes/MPUseful.php b/includes/MPUseful.php index 00fcc32b..51ad39cb 100644 --- a/includes/MPUseful.php +++ b/includes/MPUseful.php @@ -1,4 +1,5 @@ getDiscountByCheckoutType($checkout); + $shipping = (float) $cart->getOrderTotal(true, 5); $products = (float) $cart->getOrderTotal(true, 4); @@ -320,4 +322,29 @@ public function getCorrectedTotal($cart) "discount" => $strDiscount ]; } + + + /** + * Get discount based on checkout type + * + * @return int + */ + private function getDiscountByCheckoutType($checkout) + { + + switch ($checkout) { + case 'credit_card': + case 'wallet_button': + return Configuration::get('MERCADOPAGO_CUSTOM_DISCOUNT'); + + case 'ticket': + return Configuration::get('MERCADOPAGO_TICKET_DISCOUNT'); + + case 'pix': + return Configuration::get('MERCADOPAGO_PIX_DISCOUNT'); + + default: + return (int) 0; + } + } } diff --git a/includes/module/checkouts/CustomCheckout.php b/includes/module/checkouts/CustomCheckout.php index 114e3986..6548b101 100644 --- a/includes/module/checkouts/CustomCheckout.php +++ b/includes/module/checkouts/CustomCheckout.php @@ -93,8 +93,7 @@ public function getCustomCheckout($cart) } } - $correctedTotal = $this->mpuseful->getCorrectedTotal($cart); - + $correctedTotal = $this->mpuseful->getCorrectedTotal($cart, 'credit_card'); $site_id = Configuration::get('MERCADOPAGO_SITE_ID'); $walletButton = Configuration::get('MERCADOPAGO_CUSTOM_WALLET_BUTTON'); $redirect = $this->payment->context->link->getModuleLink($this->payment->name, 'custom'); diff --git a/includes/module/notification/AbstractNotification.php b/includes/module/notification/AbstractNotification.php index d35ab615..e803cb91 100644 --- a/includes/module/notification/AbstractNotification.php +++ b/includes/module/notification/AbstractNotification.php @@ -534,11 +534,11 @@ public static function getNotificationResponse($message, $code) } /** - * @return mixed + * @return float */ - public function getTotal($cart) + public function getTotal($cart, $checkout) { - $correctedTotal = $this->mpuseful->getCorrectedTotal($cart); + $correctedTotal = $this->mpuseful->getCorrectedTotal($cart, $checkout); $localization = Configuration::get('MERCADOPAGO_SITE_ID'); if ($localization == 'MCO' || $localization == 'MLC') { diff --git a/includes/module/notification/IpnNotification.php b/includes/module/notification/IpnNotification.php index 10d357fd..fa3902cf 100644 --- a/includes/module/notification/IpnNotification.php +++ b/includes/module/notification/IpnNotification.php @@ -1,4 +1,5 @@ verifyWebhook($cart); - $this->total = $this->getTotal($cart); + + $preference = $this->getWalletButtonPreference(); + $checkout = 'pro'; + + if ($preference) { + $checkout = 'wallet_button'; + } + + + $this->total = $this->getTotal($cart, $checkout); $orderId = $this->getOrderId($cart); if ($orderId != 0) { @@ -79,13 +89,15 @@ public function receiveNotification($cart) public function createStandardOrder($cart) { $preference = $this->getWalletButtonPreference(); + $checkout = 'pro'; if ($preference) { + $checkout = 'wallet_button'; $preference->setCartRule($cart, Configuration::get('MERCADOPAGO_CUSTOM_DISCOUNT')); } $this->getOrderId($cart); - $this->total = $this->getTotal($cart); + $this->total = $this->getTotal($cart, $checkout); $this->status = 'pending'; $this->pending += $this->total; $this->validateOrderState(); @@ -93,7 +105,7 @@ public function createStandardOrder($cart) if ($this->order_id == 0 && $this->amount >= $this->total && $this->status != 'rejected') { $this->createOrder($cart, true); } - + if ($preference) { $preference->disableCartRule(); } @@ -155,7 +167,7 @@ public function verifyPayments($payments) $total_paid = $payment_info['transaction_details']['total_paid_amount']; $coupon_amount = $payment_info['coupon_amount']; - if ($coupon_amount > 0 && $coupon_amount!==null) { + if ($coupon_amount > 0 && $coupon_amount !== null) { $total_paid += $coupon_amount; } diff --git a/includes/module/notification/WebhookNotification.php b/includes/module/notification/WebhookNotification.php index 592d43d6..bf7425e1 100644 --- a/includes/module/notification/WebhookNotification.php +++ b/includes/module/notification/WebhookNotification.php @@ -48,7 +48,7 @@ public function __construct($transaction_id, $payment) public function receiveNotification($cart) { $this->verifyWebhook($cart); - $this->total = $this->getTotal($cart); + $this->total = $this->getTotal($cart, $this->payment['metadata']['checkout_type']); $orderId = Order::getOrderByCartId($cart->id); if ($orderId != 0) { @@ -74,7 +74,7 @@ public function receiveNotification($cart) */ public function createCustomOrder($cart) { - $this->total = $this->getTotal($cart); + $this->total = $this->getTotal($cart, $this->payment['metadata']['checkout_type']); $this->verifyCustomPayment(); $this->validateOrderState(); From 48e274f85f6085e22877141253767a924600fb1f Mon Sep 17 00:00:00 2001 From: cleitonaguiarandrade Date: Fri, 1 Apr 2022 18:32:03 -0300 Subject: [PATCH 06/44] Removed blank line before file comment --- includes/MPUseful.php | 1 - 1 file changed, 1 deletion(-) diff --git a/includes/MPUseful.php b/includes/MPUseful.php index 51ad39cb..19fc378c 100644 --- a/includes/MPUseful.php +++ b/includes/MPUseful.php @@ -1,5 +1,4 @@ Date: Mon, 4 Apr 2022 17:08:51 -0300 Subject: [PATCH 07/44] feat: added preference and chekout_type as class properties --- includes/MPUseful.php | 3 -- .../notification/AbstractNotification.php | 11 ++-- .../module/notification/IpnNotification.php | 53 +++++++++++-------- .../notification/WebhookNotification.php | 7 ++- 4 files changed, 43 insertions(+), 31 deletions(-) diff --git a/includes/MPUseful.php b/includes/MPUseful.php index 19fc378c..a5d86c94 100644 --- a/includes/MPUseful.php +++ b/includes/MPUseful.php @@ -303,7 +303,6 @@ public function getCorrectedTotal($cart, $checkout) { $strDiscount = $this->getDiscountByCheckoutType($checkout); - $shipping = (float) $cart->getOrderTotal(true, 5); $products = (float) $cart->getOrderTotal(true, 4); $cartTotal = (float) $cart->getOrderTotal(); @@ -311,7 +310,6 @@ public function getCorrectedTotal($cart, $checkout) $discount = $products * ((float) $strDiscount / 100); $products = ($discount != 0) ? $products - $discount : $products; - $subtotal = $products + $shipping; $difference = $cartTotal - $subtotal - $discount; $amount = $subtotal + $difference; @@ -330,7 +328,6 @@ public function getCorrectedTotal($cart, $checkout) */ private function getDiscountByCheckoutType($checkout) { - switch ($checkout) { case 'credit_card': case 'wallet_button': diff --git a/includes/module/notification/AbstractNotification.php b/includes/module/notification/AbstractNotification.php index e803cb91..29e807b7 100644 --- a/includes/module/notification/AbstractNotification.php +++ b/includes/module/notification/AbstractNotification.php @@ -45,6 +45,7 @@ class AbstractNotification public $order_state_lang; public $customer_secure_key; public $mpuseful; + public $checkout; public function __construct($transaction_id) { @@ -534,21 +535,25 @@ public static function getNotificationResponse($message, $code) } /** + * Get order total + * * @return float */ public function getTotal($cart, $checkout) { - $correctedTotal = $this->mpuseful->getCorrectedTotal($cart, $checkout); - $localization = Configuration::get('MERCADOPAGO_SITE_ID'); + $correctedTotal = $this->mpuseful->getCorrectedTotal($cart, $checkout); + $localization = Configuration::get('MERCADOPAGO_SITE_ID'); if ($localization == 'MCO' || $localization == 'MLC') { return Tools::ps_round($correctedTotal['amount'], 0); } - return Tools::ps_round($correctedTotal['amount'], 2); + return Tools::ps_round($correctedTotal['amount'], 2); } /** + * Generate notification logs + * * @param string $method * @return void */ diff --git a/includes/module/notification/IpnNotification.php b/includes/module/notification/IpnNotification.php index fa3902cf..7beb2593 100644 --- a/includes/module/notification/IpnNotification.php +++ b/includes/module/notification/IpnNotification.php @@ -33,11 +33,15 @@ class IpnNotification extends AbstractNotification { public $merchant_order; + public $preference; public function __construct($transaction_id, $merchant_order = null) { parent::__construct($transaction_id); + $this->merchant_order = $merchant_order; + $this->preference = $this->getPreference(); + $this->checkout = $this->getCheckoutType(); } /** @@ -50,15 +54,7 @@ public function receiveNotification($cart) { $this->verifyWebhook($cart); - $preference = $this->getWalletButtonPreference(); - $checkout = 'pro'; - - if ($preference) { - $checkout = 'wallet_button'; - } - - - $this->total = $this->getTotal($cart, $checkout); + $this->total = $this->getTotal($cart, $this->checkout); $orderId = $this->getOrderId($cart); if ($orderId != 0) { @@ -88,16 +84,14 @@ public function receiveNotification($cart) */ public function createStandardOrder($cart) { - $preference = $this->getWalletButtonPreference(); - $checkout = 'pro'; + $isWalletButton = (bool) $this->checkout === 'wallet_button'; - if ($preference) { - $checkout = 'wallet_button'; - $preference->setCartRule($cart, Configuration::get('MERCADOPAGO_CUSTOM_DISCOUNT')); + if ($isWalletButton) { + $this->preference->setCartRule($cart, Configuration::get('MERCADOPAGO_CUSTOM_DISCOUNT')); } $this->getOrderId($cart); - $this->total = $this->getTotal($cart, $checkout); + $this->total = $this->getTotal($cart, $this->checkout); $this->status = 'pending'; $this->pending += $this->total; $this->validateOrderState(); @@ -106,23 +100,36 @@ public function createStandardOrder($cart) $this->createOrder($cart, true); } - if ($preference) { - $preference->disableCartRule(); + if ($isWalletButton) { + $this->preference->disableCartRule(); } } /** - * Get Wallet Button Preference + * Get Preference + * + * @return mixed + */ + public function getPreference() + { + return $this->mercadopago->getPreference($this->merchant_order['preference_id']); + } + + /** + * Get Preference * * @return mixed */ - public function getWalletButtonPreference() + public function getCheckoutType() { - $preferenceCheckout = $this->mercadopago->getPreference($this->merchant_order['preference_id']); - $checkout_type = isset($preferenceCheckout['metadata']['checkout_type']) ? $preferenceCheckout['metadata']['checkout_type'] : null; - $preference = new WalletButtonPreference(); + $checkout = 'pro'; + $checkoutType = isset($this->preference['metadata']['checkout_type']) ? $this->preference['metadata']['checkout_type'] : false; + + if ($checkoutType && $checkoutType === 'wallet_button') { + $checkout = 'wallet_button'; + } - return $checkout_type == 'wallet_button' ? $preference : false; + return $checkout; } /** diff --git a/includes/module/notification/WebhookNotification.php b/includes/module/notification/WebhookNotification.php index bf7425e1..97435cc3 100644 --- a/includes/module/notification/WebhookNotification.php +++ b/includes/module/notification/WebhookNotification.php @@ -36,7 +36,9 @@ class WebhookNotification extends AbstractNotification public function __construct($transaction_id, $payment) { parent::__construct($transaction_id); + $this->payment = $payment; + $this->checkout = $payment['metadata']['checkout_type']; } /** @@ -48,7 +50,8 @@ public function __construct($transaction_id, $payment) public function receiveNotification($cart) { $this->verifyWebhook($cart); - $this->total = $this->getTotal($cart, $this->payment['metadata']['checkout_type']); + + $this->total = $this->getTotal($cart, $this->checkout); $orderId = Order::getOrderByCartId($cart->id); if ($orderId != 0) { @@ -74,7 +77,7 @@ public function receiveNotification($cart) */ public function createCustomOrder($cart) { - $this->total = $this->getTotal($cart, $this->payment['metadata']['checkout_type']); + $this->total = $this->getTotal($cart, $this->checkout); $this->verifyCustomPayment(); $this->validateOrderState(); From 94ac2fde19dcfbdd61ddfba4216235ae16d24bb2 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Mon, 4 Apr 2022 18:33:57 -0300 Subject: [PATCH 08/44] feat: added preference and chekout_type as class properties --- .../module/notification/IpnNotification.php | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/includes/module/notification/IpnNotification.php b/includes/module/notification/IpnNotification.php index 7beb2593..e9716071 100644 --- a/includes/module/notification/IpnNotification.php +++ b/includes/module/notification/IpnNotification.php @@ -34,14 +34,16 @@ class IpnNotification extends AbstractNotification { public $merchant_order; public $preference; + public $isWalletButton; - public function __construct($transaction_id, $merchant_order = null) + public function __construct($transaction_id, $merchant_order) { parent::__construct($transaction_id); $this->merchant_order = $merchant_order; - $this->preference = $this->getPreference(); $this->checkout = $this->getCheckoutType(); + $this->isWalletButton = $this->checkout === 'wallet_button'; + $this->preference = $this->getCheckoutPreference(); } /** @@ -84,9 +86,7 @@ public function receiveNotification($cart) */ public function createStandardOrder($cart) { - $isWalletButton = (bool) $this->checkout === 'wallet_button'; - - if ($isWalletButton) { + if ($this->isWalletButton) { $this->preference->setCartRule($cart, Configuration::get('MERCADOPAGO_CUSTOM_DISCOUNT')); } @@ -100,19 +100,23 @@ public function createStandardOrder($cart) $this->createOrder($cart, true); } - if ($isWalletButton) { + if ($this->isWalletButton) { $this->preference->disableCartRule(); } } /** - * Get Preference + * Get Checkout Preference * * @return mixed */ - public function getPreference() + public function getCheckoutPreference() { - return $this->mercadopago->getPreference($this->merchant_order['preference_id']); + if ($this->isWalletButton) { + return new WalletButtonPreference(); + } + + return new StandardPreference(); } /** @@ -122,8 +126,10 @@ public function getPreference() */ public function getCheckoutType() { + $preference = $this->mercadopago->getPreference($this->merchant_order['preference_id']); + $checkout = 'pro'; - $checkoutType = isset($this->preference['metadata']['checkout_type']) ? $this->preference['metadata']['checkout_type'] : false; + $checkoutType = isset($preference['metadata']['checkout_type']) ? $preference['metadata']['checkout_type'] : false; if ($checkoutType && $checkoutType === 'wallet_button') { $checkout = 'wallet_button'; From d829e1cb7e055df51d1a7695d7dceca22755c04b Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Tue, 5 Apr 2022 08:27:21 -0300 Subject: [PATCH 09/44] feat: fixed husky --- .husky/_/husky.sh | 31 + controllers/front/notification.php | 6 +- includes/MPUseful.php | 2 +- .../notification/AbstractNotification.php | 6 +- .../notification/WebhookNotification.php | 6 +- package-lock.json | 3224 +---------------- package.json | 2 +- 7 files changed, 58 insertions(+), 3219 deletions(-) create mode 100644 .husky/_/husky.sh diff --git a/.husky/_/husky.sh b/.husky/_/husky.sh new file mode 100644 index 00000000..6809ccca --- /dev/null +++ b/.husky/_/husky.sh @@ -0,0 +1,31 @@ +#!/bin/sh +if [ -z "$husky_skip_init" ]; then + debug () { + if [ "$HUSKY_DEBUG" = "1" ]; then + echo "husky (debug) - $1" + fi + } + + readonly hook_name="$(basename "$0")" + debug "starting $hook_name..." + + if [ "$HUSKY" = "0" ]; then + debug "HUSKY env variable is set to 0, skipping hook" + exit 0 + fi + + if [ -f ~/.huskyrc ]; then + debug "sourcing ~/.huskyrc" + . ~/.huskyrc + fi + + export readonly husky_skip_init=1 + sh -e "$0" "$@" + exitCode="$?" + + if [ $exitCode != 0 ]; then + echo "husky - $hook_name hook exited with code $exitCode (error)" + fi + + exit $exitCode +fi diff --git a/controllers/front/notification.php b/controllers/front/notification.php index 506dcc69..9e8d7c0d 100644 --- a/controllers/front/notification.php +++ b/controllers/front/notification.php @@ -18,9 +18,9 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @author PrestaShop SA - * @copyright 2007-2022 PrestaShop SA - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * @author PrestaShop SA + * @copyright 2007-2022 PrestaShop SA + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA * * Don't forget to prefix your containers with your own identifier diff --git a/includes/MPUseful.php b/includes/MPUseful.php index a5d86c94..68e78d80 100644 --- a/includes/MPUseful.php +++ b/includes/MPUseful.php @@ -286,6 +286,7 @@ public function getRound() { $round = false; $localization = Configuration::get('MERCADOPAGO_SITE_ID'); + if ($localization == 'MCO' || $localization == 'MLC') { $round = true; } @@ -320,7 +321,6 @@ public function getCorrectedTotal($cart, $checkout) ]; } - /** * Get discount based on checkout type * diff --git a/includes/module/notification/AbstractNotification.php b/includes/module/notification/AbstractNotification.php index 29e807b7..1f308c5f 100644 --- a/includes/module/notification/AbstractNotification.php +++ b/includes/module/notification/AbstractNotification.php @@ -18,9 +18,9 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @author PrestaShop SA - * @copyright 2007-2022 PrestaShop SA - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * @author PrestaShop SA + * @copyright 2007-2022 PrestaShop SA + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA * * Don't forget to prefix your containers with your own identifier diff --git a/includes/module/notification/WebhookNotification.php b/includes/module/notification/WebhookNotification.php index 97435cc3..1e252995 100644 --- a/includes/module/notification/WebhookNotification.php +++ b/includes/module/notification/WebhookNotification.php @@ -18,9 +18,9 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @author PrestaShop SA - * @copyright 2007-2022 PrestaShop SA - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * @author PrestaShop SA + * @copyright 2007-2022 PrestaShop SA + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA * * Don't forget to prefix your containers with your own identifier diff --git a/package-lock.json b/package-lock.json index ec580746..bb682a85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,3191 +1,6 @@ { - "name": "cart-prestashop-7", - "lockfileVersion": 2, "requires": true, - "packages": { - "": { - "devDependencies": { - "husky": "^7.0.0", - "jshint": "^2.13.1", - "minify": "^7.0.2", - "stylelint": "^13.13.1", - "stylelint-config-standard": "^22.0.0" - }, - "engines": { - "node": ">=14.17.3", - "npm": ">=6.14.13" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", - "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", - "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.0.tgz", - "integrity": "sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.0", - "@babel/helper-compilation-targets": "^7.15.0", - "@babel/helper-module-transforms": "^7.15.0", - "@babel/helpers": "^7.14.8", - "@babel/parser": "^7.15.0", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@babel/generator": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.0.tgz", - "integrity": "sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/generator/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz", - "integrity": "sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.16.6", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz", - "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==", - "dev": true, - "dependencies": { - "@babel/helper-get-function-arity": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/types": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz", - "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz", - "integrity": "sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz", - "integrity": "sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz", - "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz", - "integrity": "sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-simple-access": "^7.14.8", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.9", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz", - "integrity": "sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz", - "integrity": "sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==", - "dev": true, - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz", - "integrity": "sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.14.8" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz", - "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz", - "integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==", - "dev": true, - "dependencies": { - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", - "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/template": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", - "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.14.5", - "@babel/types": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.0.tgz", - "integrity": "sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.0", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", - "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.14.9", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@stylelint/postcss-css-in-js": { - "version": "0.37.2", - "resolved": "https://registry.npmjs.org/@stylelint/postcss-css-in-js/-/postcss-css-in-js-0.37.2.tgz", - "integrity": "sha512-nEhsFoJurt8oUmieT8qy4nk81WRHmJynmVwn/Vts08PL9fhgIsMhk1GId5yAN643OzqEEb5S/6At2TZW7pqPDA==", - "dev": true, - "dependencies": { - "@babel/core": ">=7.9.0" - } - }, - "node_modules/@stylelint/postcss-markdown": { - "version": "0.36.2", - "resolved": "https://registry.npmjs.org/@stylelint/postcss-markdown/-/postcss-markdown-0.36.2.tgz", - "integrity": "sha512-2kGbqUVJUGE8dM+bMzXG/PYUWKkjLIkRLWNh39OaADkiabDRdw8ATFCgbMz5xdIcvwspPAluSL7uY+ZiTWdWmQ==", - "dev": true, - "dependencies": { - "remark": "^13.0.0", - "unist-util-find-all-after": "^3.0.2" - } - }, - "node_modules/@types/mdast": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.7.tgz", - "integrity": "sha512-YwR7OK8aPmaBvMMUi+pZXBNoW2unbVbfok4YRqGMJBe1dpDlzpRkJrYEYmvjxgs5JhuQmKfDexrN98u941Zasg==", - "dev": true, - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", - "dev": true - }, - "node_modules/@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true - }, - "node_modules/@types/unist": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", - "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==", - "dev": true - }, - "node_modules/ajv": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", - "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/autoprefixer": { - "version": "9.8.6", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz", - "integrity": "sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==", - "dev": true, - "dependencies": { - "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001109", - "colorette": "^1.2.1", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.32", - "postcss-value-parser": "^4.1.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - } - }, - "node_modules/bail": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", - "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", - "dev": true - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.16.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.7.tgz", - "integrity": "sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA==", - "dev": true, - "dependencies": { - "caniuse-lite": "^1.0.30001248", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.793", - "escalade": "^3.1.1", - "node-releases": "^1.1.73" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camel-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", - "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", - "dev": true, - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001249", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001249.tgz", - "integrity": "sha512-vcX4U8lwVXPdqzPWi6cAJ3FnQaqXbBqy/GZseKNQzRj37J7qZdGcBtxq/QLFNLLlfsoXLUdHw8Iwenri86Tagw==", - "dev": true - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/character-entities": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", - "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", - "dev": true - }, - "node_modules/character-entities-legacy": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", - "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", - "dev": true - }, - "node_modules/character-reference-invalid": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", - "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", - "dev": true - }, - "node_modules/clean-css": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.1.5.tgz", - "integrity": "sha512-9dr/cU/LjMpU57PXlSvDkVRh0rPxJBXiBtD0+SgYt8ahTCsXtfKjCkNYgIoTC6mBg8CFr5EKhW3DKCaGMUbUfQ==", - "dev": true, - "dependencies": { - "source-map": "~0.6.0" - }, - "engines": { - "node": ">= 10.0" - } - }, - "node_modules/cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", - "dev": true, - "dependencies": { - "exit": "0.1.2", - "glob": "^7.1.1" - }, - "engines": { - "node": ">=0.2.5" - } - }, - "node_modules/clone-regexp": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-2.2.0.tgz", - "integrity": "sha512-beMpP7BOtTipFuW8hrJvREQ2DrRu3BE7by0ZpibtfBA+qfHYvMGTc2Yb1JMYPKg/JUw0CHYvpg796aNTSW9z7Q==", - "dev": true, - "dependencies": { - "is-regexp": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/colorette": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", - "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", - "dev": true - }, - "node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "node_modules/console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "dependencies": { - "date-now": "^0.1.4" - } - }, - "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "node_modules/cosmiconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", - "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", - "dev": true, - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/css-b64-images": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/css-b64-images/-/css-b64-images-0.2.5.tgz", - "integrity": "sha1-QgBdgyBLK0pdk7axpWRBM7WSegI=", - "dev": true, - "bin": { - "css-b64-images": "bin/css-b64-images" - }, - "engines": { - "node": "*" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "dev": true, - "dependencies": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decamelize-keys/node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, - "dependencies": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - } - }, - "node_modules/dom-serializer/node_modules/domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", - "dev": true - }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true - }, - "node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "node_modules/domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", - "dev": true, - "dependencies": { - "domelementtype": "1" - } - }, - "node_modules/domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "node_modules/dot-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", - "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.3.802", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.802.tgz", - "integrity": "sha512-dXB0SGSypfm3iEDxrb5n/IVKeX4uuTnFHdve7v+yKJqNpEP0D4mjFJ8e1znmSR+OOVlVC+kDO6f2kAkTFXvJBg==", - "dev": true - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", - "dev": true - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/execall": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/execall/-/execall-2.0.0.tgz", - "integrity": "sha512-0FU2hZ5Hh6iQnarpRtQurM/aAvp3RIbfvgLHrcqJYzhXyV2KFruhuChf9NC6waAhiUR7FFtlugkI4p7f2Fqlow==", - "dev": true, - "dependencies": { - "clone-regexp": "^2.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", - "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", - "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", - "dev": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "dev": true, - "dependencies": { - "global-prefix": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dev": true, - "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/globjoin": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", - "integrity": "sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM=", - "dev": true - }, - "node_modules/gonzales-pe": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz", - "integrity": "sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "gonzales": "bin/gonzales.js" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/html-minifier-terser": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz", - "integrity": "sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==", - "dev": true, - "dependencies": { - "camel-case": "^4.1.1", - "clean-css": "^4.2.3", - "commander": "^4.1.1", - "he": "^1.2.0", - "param-case": "^3.0.3", - "relateurl": "^0.2.7", - "terser": "^4.6.3" - }, - "bin": { - "html-minifier-terser": "cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/html-minifier-terser/node_modules/clean-css": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", - "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", - "dev": true, - "dependencies": { - "source-map": "~0.6.0" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/html-minifier-terser/node_modules/terser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", - "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", - "dev": true, - "dependencies": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/html-minifier-terser/node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/html-tags": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz", - "integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", - "dev": true, - "dependencies": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - } - }, - "node_modules/husky": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.1.tgz", - "integrity": "sha512-gceRaITVZ+cJH9sNHqx5tFwbzlLCVxtVZcusME8JYQ8Edy5mpGDOqD8QBCdMhpyo9a+JXddnujQ4rpY2Ff9SJA==", - "dev": true, - "bin": { - "husky": "lib/bin.js" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/import-lazy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", - "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/is-alphabetical": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", - "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", - "dev": true - }, - "node_modules/is-alphanumerical": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", - "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", - "dev": true, - "dependencies": { - "is-alphabetical": "^1.0.0", - "is-decimal": "^1.0.0" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/is-core-module": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", - "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - } - }, - "node_modules/is-decimal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", - "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", - "dev": true - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-hexadecimal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", - "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", - "dev": true - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-regexp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz", - "integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/jshint": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.1.tgz", - "integrity": "sha512-vymzfR3OysF5P774x6zYv0bD4EpH6NWRxpq54wO9mA9RuY49yb1teKSICkLx2Ryx+mfzlVVNNbTBtsRtg78t7g==", - "dev": true, - "dependencies": { - "cli": "~1.0.0", - "console-browserify": "1.1.x", - "exit": "0.1.x", - "htmlparser2": "3.8.x", - "lodash": "~4.17.21", - "minimatch": "~3.0.2", - "shelljs": "0.3.x", - "strip-json-comments": "1.0.x" - }, - "bin": { - "jshint": "bin/jshint" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/known-css-properties": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.21.0.tgz", - "integrity": "sha512-sZLUnTqimCkvkgRS+kbPlYW5o8q5w1cu+uIisKpEWkj31I8mx8kNG162DwRav8Zirkva6N5uoFsm9kzK4mUXjw==", - "dev": true - }, - "node_modules/lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/longest-streak": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", - "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", - "dev": true - }, - "node_modules/lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/map-obj": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", - "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/mathml-tag-names": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz", - "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==", - "dev": true - }, - "node_modules/mdast-util-from-markdown": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", - "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", - "dev": true, - "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-to-string": "^2.0.0", - "micromark": "~2.11.0", - "parse-entities": "^2.0.0", - "unist-util-stringify-position": "^2.0.0" - } - }, - "node_modules/mdast-util-to-markdown": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", - "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", - "dev": true, - "dependencies": { - "@types/unist": "^2.0.0", - "longest-streak": "^2.0.0", - "mdast-util-to-string": "^2.0.0", - "parse-entities": "^2.0.0", - "repeat-string": "^1.0.0", - "zwitch": "^1.0.0" - } - }, - "node_modules/mdast-util-to-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", - "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", - "dev": true - }, - "node_modules/meow": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", - "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", - "dev": true, - "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize": "^1.2.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromark": { - "version": "2.11.4", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", - "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", - "dev": true, - "dependencies": { - "debug": "^4.0.0", - "parse-entities": "^2.0.0" - } - }, - "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/minify": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/minify/-/minify-7.0.2.tgz", - "integrity": "sha512-qWFzieSULBAKTLbTqaXY5OLFbFNuEa1b0M+piLkpgJ6pHrMyvvCw6H7WM5/d+HJIwgUCLMI0uEAAyhawAF6cbA==", - "dev": true, - "dependencies": { - "clean-css": "^5.0.1", - "css-b64-images": "~0.2.5", - "debug": "^4.1.0", - "html-minifier-terser": "^5.1.1", - "terser": "^5.3.2", - "try-to-catch": "^3.0.0" - }, - "bin": { - "minify": "bin/minify.js" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "node_modules/minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", - "dev": true, - "dependencies": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/minimist-options/node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "dev": true, - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, - "node_modules/node-releases": { - "version": "1.1.74", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.74.tgz", - "integrity": "sha512-caJBVempXZPepZoZAPCWRTNxYQ+xtG/KAi4ozTA5A+nJ7IU+kLQCbqaUjb5Rwy14M9upBWiQ4NutcmW04LJSRw==", - "dev": true - }, - "node_modules/normalize-package-data": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", - "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", - "dev": true, - "dependencies": { - "hosted-git-info": "^4.0.1", - "resolve": "^1.20.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-selector": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz", - "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=", - "dev": true - }, - "node_modules/num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/param-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", - "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", - "dev": true, - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", - "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", - "dev": true, - "dependencies": { - "character-entities": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "character-reference-invalid": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-hexadecimal": "^1.0.0" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pascal-case": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", - "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/postcss": { - "version": "7.0.36", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", - "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", - "dev": true, - "dependencies": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/postcss-html": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/postcss-html/-/postcss-html-0.36.0.tgz", - "integrity": "sha512-HeiOxGcuwID0AFsNAL0ox3mW6MHH5cstWN1Z3Y+n6H+g12ih7LHdYxWwEA/QmrebctLjo79xz9ouK3MroHwOJw==", - "dev": true, - "dependencies": { - "htmlparser2": "^3.10.0" - } - }, - "node_modules/postcss-html/node_modules/entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, - "node_modules/postcss-html/node_modules/htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dev": true, - "dependencies": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, - "node_modules/postcss-html/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/postcss-html/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "node_modules/postcss-html/node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/postcss-less": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-3.1.4.tgz", - "integrity": "sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA==", - "dev": true, - "dependencies": { - "postcss": "^7.0.14" - }, - "engines": { - "node": ">=6.14.4" - } - }, - "node_modules/postcss-media-query-parser": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", - "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=", - "dev": true - }, - "node_modules/postcss-resolve-nested-selector": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", - "integrity": "sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4=", - "dev": true - }, - "node_modules/postcss-safe-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.2.tgz", - "integrity": "sha512-Uw6ekxSWNLCPesSv/cmqf2bY/77z11O7jZGPax3ycZMFU/oi2DMH9i89AdHc1tRwFg/arFoEwX0IS3LCUxJh1g==", - "dev": true, - "dependencies": { - "postcss": "^7.0.26" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/postcss-sass": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.4.4.tgz", - "integrity": "sha512-BYxnVYx4mQooOhr+zer0qWbSPYnarAy8ZT7hAQtbxtgVf8gy+LSLT/hHGe35h14/pZDTw1DsxdbrwxBN++H+fg==", - "dev": true, - "dependencies": { - "gonzales-pe": "^4.3.0", - "postcss": "^7.0.21" - } - }, - "node_modules/postcss-scss": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.1.1.tgz", - "integrity": "sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA==", - "dev": true, - "dependencies": { - "postcss": "^7.0.6" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", - "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-syntax": { - "version": "0.36.2", - "resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz", - "integrity": "sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==", - "dev": true - }, - "node_modules/postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", - "dev": true - }, - "node_modules/postcss/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss/node_modules/chalk/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/postcss/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/postcss/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss/node_modules/supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "node_modules/quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/read-pkg/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, - "dependencies": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/remark": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/remark/-/remark-13.0.0.tgz", - "integrity": "sha512-HDz1+IKGtOyWN+QgBiAT0kn+2s6ovOxHyPAFGKVE81VSzJ+mq7RwHFledEvB5F1p4iJvOah/LOKdFuzvRnNLCA==", - "dev": true, - "dependencies": { - "remark-parse": "^9.0.0", - "remark-stringify": "^9.0.0", - "unified": "^9.1.0" - } - }, - "node_modules/remark-parse": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", - "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", - "dev": true, - "dependencies": { - "mdast-util-from-markdown": "^0.8.0" - } - }, - "node_modules/remark-stringify": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-9.0.1.tgz", - "integrity": "sha512-mWmNg3ZtESvZS8fv5PTvaPckdL4iNlCHTt8/e/8oN08nArHRHjNZMKzA/YW3+p7/lYqIw4nx1XsjCBo/AxNChg==", - "dev": true, - "dependencies": { - "mdast-util-to-markdown": "^0.6.0" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/shelljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", - "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", - "dev": true, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", - "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==", - "dev": true - }, - "node_modules/specificity": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz", - "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==", - "dev": true, - "bin": { - "specificity": "bin/specificity" - } - }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "dependencies": { - "min-indent": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", - "dev": true, - "bin": { - "strip-json-comments": "cli.js" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/style-search": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", - "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=", - "dev": true - }, - "node_modules/stylelint": { - "version": "13.13.1", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.13.1.tgz", - "integrity": "sha512-Mv+BQr5XTUrKqAXmpqm6Ddli6Ief+AiPZkRsIrAoUKFuq/ElkUh9ZMYxXD0iQNZ5ADghZKLOWz1h7hTClB7zgQ==", - "dev": true, - "dependencies": { - "@stylelint/postcss-css-in-js": "^0.37.2", - "@stylelint/postcss-markdown": "^0.36.2", - "autoprefixer": "^9.8.6", - "balanced-match": "^2.0.0", - "chalk": "^4.1.1", - "cosmiconfig": "^7.0.0", - "debug": "^4.3.1", - "execall": "^2.0.0", - "fast-glob": "^3.2.5", - "fastest-levenshtein": "^1.0.12", - "file-entry-cache": "^6.0.1", - "get-stdin": "^8.0.0", - "global-modules": "^2.0.0", - "globby": "^11.0.3", - "globjoin": "^0.1.4", - "html-tags": "^3.1.0", - "ignore": "^5.1.8", - "import-lazy": "^4.0.0", - "imurmurhash": "^0.1.4", - "known-css-properties": "^0.21.0", - "lodash": "^4.17.21", - "log-symbols": "^4.1.0", - "mathml-tag-names": "^2.1.3", - "meow": "^9.0.0", - "micromatch": "^4.0.4", - "normalize-selector": "^0.2.0", - "postcss": "^7.0.35", - "postcss-html": "^0.36.0", - "postcss-less": "^3.1.4", - "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^4.0.2", - "postcss-sass": "^0.4.4", - "postcss-scss": "^2.1.1", - "postcss-selector-parser": "^6.0.5", - "postcss-syntax": "^0.36.2", - "postcss-value-parser": "^4.1.0", - "resolve-from": "^5.0.0", - "slash": "^3.0.0", - "specificity": "^0.4.1", - "string-width": "^4.2.2", - "strip-ansi": "^6.0.0", - "style-search": "^0.1.0", - "sugarss": "^2.0.0", - "svg-tags": "^1.0.0", - "table": "^6.6.0", - "v8-compile-cache": "^2.3.0", - "write-file-atomic": "^3.0.3" - }, - "bin": { - "stylelint": "bin/stylelint.js" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/stylelint-config-recommended": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-5.0.0.tgz", - "integrity": "sha512-c8aubuARSu5A3vEHLBeOSJt1udOdS+1iue7BmJDTSXoCBmfEQmmWX+59vYIj3NQdJBY6a/QRv1ozVFpaB9jaqA==", - "dev": true - }, - "node_modules/stylelint-config-standard": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-22.0.0.tgz", - "integrity": "sha512-uQVNi87SHjqTm8+4NIP5NMAyY/arXrBgimaaT7skvRfE9u3JKXRK9KBkbr4pVmeciuCcs64kAdjlxfq6Rur7Hw==", - "dev": true, - "dependencies": { - "stylelint-config-recommended": "^5.0.0" - } - }, - "node_modules/stylelint/node_modules/balanced-match": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", - "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", - "dev": true - }, - "node_modules/stylelint/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/sugarss": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-2.0.0.tgz", - "integrity": "sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ==", - "dev": true, - "dependencies": { - "postcss": "^7.0.2" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/svg-tags": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", - "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", - "dev": true - }, - "node_modules/table": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", - "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/terser": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", - "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", - "dev": true, - "dependencies": { - "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.19" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/terser/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/trim-newlines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/trough": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", - "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", - "dev": true - }, - "node_modules/try-to-catch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/try-to-catch/-/try-to-catch-3.0.0.tgz", - "integrity": "sha512-eIm6ZXwR35jVF8By/HdbbkcaCDTBI5PpCPkejRKrYp0jyf/DbCCcRhHD7/O9jtFI3ewsqo9WctFEiJTS6i+CQA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", - "dev": true - }, - "node_modules/type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/unified": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", - "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", - "dev": true, - "dependencies": { - "bail": "^1.0.0", - "extend": "^3.0.0", - "is-buffer": "^2.0.0", - "is-plain-obj": "^2.0.0", - "trough": "^1.0.0", - "vfile": "^4.0.0" - } - }, - "node_modules/unist-util-find-all-after": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-3.0.2.tgz", - "integrity": "sha512-xaTC/AGZ0rIM2gM28YVRAFPIZpzbpDtU3dRmp7EXlNVA8ziQc4hY3H7BHXM1J49nEmiqc3svnqMReW+PGqbZKQ==", - "dev": true, - "dependencies": { - "unist-util-is": "^4.0.0" - } - }, - "node_modules/unist-util-is": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", - "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", - "dev": true - }, - "node_modules/unist-util-stringify-position": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", - "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", - "dev": true, - "dependencies": { - "@types/unist": "^2.0.2" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/vfile": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", - "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", - "dev": true, - "dependencies": { - "@types/unist": "^2.0.0", - "is-buffer": "^2.0.0", - "unist-util-stringify-position": "^2.0.0", - "vfile-message": "^2.0.0" - } - }, - "node_modules/vfile-message": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", - "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", - "dev": true, - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-stringify-position": "^2.0.0" - } - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/zwitch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", - "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", - "dev": true - } - }, + "lockfileVersion": 1, "dependencies": { "@babel/code-frame": { "version": "7.14.5", @@ -3831,9 +646,9 @@ } }, "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, "cosmiconfig": { @@ -4485,9 +1300,9 @@ "dev": true }, "jshint": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.1.tgz", - "integrity": "sha512-vymzfR3OysF5P774x6zYv0bD4EpH6NWRxpq54wO9mA9RuY49yb1teKSICkLx2Ryx+mfzlVVNNbTBtsRtg78t7g==", + "version": "2.13.4", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.4.tgz", + "integrity": "sha512-HO3bosL84b2qWqI0q+kpT/OpRJwo0R4ivgmxaO848+bo10rc50SkPnrtwSFXttW0ym4np8jbJvLwk5NziB7jIw==", "dev": true, "requires": { "cli": "~1.0.0", @@ -4496,7 +1311,6 @@ "htmlparser2": "3.8.x", "lodash": "~4.17.21", "minimatch": "~3.0.2", - "shelljs": "0.3.x", "strip-json-comments": "1.0.x" } }, @@ -4712,9 +1526,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "minimist-options": { @@ -5340,12 +2154,6 @@ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, - "shelljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", - "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", - "dev": true - }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -5423,12 +2231,6 @@ "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==", "dev": true }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, "string-width": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", @@ -5440,6 +2242,12 @@ "strip-ansi": "^6.0.0" } }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, "strip-ansi": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", diff --git a/package.json b/package.json index d2d1f034..c4c5bbe5 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "devDependencies": { "husky": "^7.0.0", - "jshint": "^2.13.1", + "jshint": "^2.13.4", "minify": "^7.0.2", "stylelint": "^13.13.1", "stylelint-config-standard": "^22.0.0" From 18ce9c2b311eb460157d7051137f214b6dc68e6f Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Tue, 5 Apr 2022 08:37:51 -0300 Subject: [PATCH 10/44] feat: update package json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index c4c5bbe5..e7f2585f 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "engineStrict": true, "scripts": { + "php": "npm run php:lint && npm run php:fix", "php:lint": "composer phpcs", "php:fix": "composer phpcbf", "build:js": "node -e 'require(\"./scripts.js\").minifyFiles(\"js\")'", From 0a166d83464ad6219d59380044d2e7b44896a5e9 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Tue, 5 Apr 2022 08:45:01 -0300 Subject: [PATCH 11/44] feat: update composer --- composer.lock | 116 +++++++++++++++++++++++++------------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/composer.lock b/composer.lock index a8bffb74..7f5585c7 100644 --- a/composer.lock +++ b/composer.lock @@ -401,16 +401,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.1", + "version": "7.4.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79" + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", "shasum": "" }, "require": { @@ -505,7 +505,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.1" + "source": "https://github.com/guzzle/guzzle/tree/7.4.2" }, "funding": [ { @@ -521,7 +521,7 @@ "type": "tidelift" } ], - "time": "2021-12-06T18:43:05+00:00" + "time": "2022-03-20T14:16:28+00:00" }, { "name": "guzzlehttp/promises", @@ -609,16 +609,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.1.0", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72" + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", "shasum": "" }, "require": { @@ -642,7 +642,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, "autoload": { @@ -704,7 +704,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.1.0" + "source": "https://github.com/guzzle/psr7/tree/2.2.1" }, "funding": [ { @@ -720,7 +720,7 @@ "type": "tidelift" } ], - "time": "2021-10-06T17:43:30+00:00" + "time": "2022-03-20T21:55:58+00:00" }, { "name": "php-cs-fixer/diff", @@ -828,20 +828,20 @@ }, { "name": "psr/container", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", "autoload": { @@ -870,9 +870,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "psr/event-dispatcher", @@ -1236,16 +1236,16 @@ }, { "name": "symfony/console", - "version": "v5.4.5", + "version": "v5.4.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d8111acc99876953f52fe16d4c50eb60940d49ad" + "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d8111acc99876953f52fe16d4c50eb60940d49ad", - "reference": "d8111acc99876953f52fe16d4c50eb60940d49ad", + "url": "https://api.github.com/repos/symfony/console/zipball/900275254f0a1a2afff1ab0e11abd5587a10e1d6", + "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6", "shasum": "" }, "require": { @@ -1315,7 +1315,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.5" + "source": "https://github.com/symfony/console/tree/v5.4.7" }, "funding": [ { @@ -1331,20 +1331,20 @@ "type": "tidelift" } ], - "time": "2022-02-24T12:45:35+00:00" + "time": "2022-03-31T17:09:19+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.0", + "version": "v2.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { @@ -1382,7 +1382,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1" }, "funding": [ { @@ -1398,7 +1398,7 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/event-dispatcher", @@ -1487,16 +1487,16 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.0", + "version": "v2.5.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "66bea3b09be61613cd3b4043a65a8ec48cfa6d2a" + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/66bea3b09be61613cd3b4043a65a8ec48cfa6d2a", - "reference": "66bea3b09be61613cd3b4043a65a8ec48cfa6d2a", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", "shasum": "" }, "require": { @@ -1546,7 +1546,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.1" }, "funding": [ { @@ -1562,20 +1562,20 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/filesystem", - "version": "v5.4.6", + "version": "v5.4.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "d53a45039974952af7f7ebc461ccdd4295e29440" + "reference": "3a4442138d80c9f7b600fb297534ac718b61d37f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/d53a45039974952af7f7ebc461ccdd4295e29440", - "reference": "d53a45039974952af7f7ebc461ccdd4295e29440", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3a4442138d80c9f7b600fb297534ac718b61d37f", + "reference": "3a4442138d80c9f7b600fb297534ac718b61d37f", "shasum": "" }, "require": { @@ -1610,7 +1610,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.6" + "source": "https://github.com/symfony/filesystem/tree/v5.4.7" }, "funding": [ { @@ -1626,7 +1626,7 @@ "type": "tidelift" } ], - "time": "2022-03-02T12:42:23+00:00" + "time": "2022-04-01T12:33:59+00:00" }, { "name": "symfony/finder", @@ -2398,16 +2398,16 @@ }, { "name": "symfony/process", - "version": "v5.4.5", + "version": "v5.4.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "95440409896f90a5f85db07a32b517ecec17fa4c" + "reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/95440409896f90a5f85db07a32b517ecec17fa4c", - "reference": "95440409896f90a5f85db07a32b517ecec17fa4c", + "url": "https://api.github.com/repos/symfony/process/zipball/38a44b2517b470a436e1c944bf9b9ba3961137fb", + "reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb", "shasum": "" }, "require": { @@ -2440,7 +2440,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.5" + "source": "https://github.com/symfony/process/tree/v5.4.7" }, "funding": [ { @@ -2456,26 +2456,26 @@ "type": "tidelift" } ], - "time": "2022-01-30T18:16:22+00:00" + "time": "2022-03-18T16:18:52+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.0", + "version": "v2.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" + "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c", + "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" + "symfony/deprecation-contracts": "^2.1|^3" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -2523,7 +2523,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.1" }, "funding": [ { @@ -2539,7 +2539,7 @@ "type": "tidelift" } ], - "time": "2021-11-04T16:48:04+00:00" + "time": "2022-03-13T20:07:29+00:00" }, { "name": "symfony/stopwatch", @@ -2698,5 +2698,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } From 683bf25419b1567bebbfd21e5cb1e74cba6b34b8 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Tue, 5 Apr 2022 08:47:16 -0300 Subject: [PATCH 12/44] feat: added preference and chekout_type as class properties --- includes/MPUseful.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/MPUseful.php b/includes/MPUseful.php index 68e78d80..9cb603da 100644 --- a/includes/MPUseful.php +++ b/includes/MPUseful.php @@ -326,7 +326,7 @@ public function getCorrectedTotal($cart, $checkout) * * @return int */ - private function getDiscountByCheckoutType($checkout) + public function getDiscountByCheckoutType($checkout) { switch ($checkout) { case 'credit_card': From de767268f23d0134078a1a5605de8ae4ad3d490a Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Tue, 5 Apr 2022 15:56:41 -0300 Subject: [PATCH 13/44] Release v4.10.1 --- CHANGELOG.md | 14 ++++++++++++++ README.md | 2 +- mercadopago.php | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff96497c..5b2cad41 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.10.1] - 2022-04-XX + +### Added +- Added compatibility with Mercado Pago discounts + +### Updated +- Updated npm packages +- Updated composer packages + +### Fixed +- Fixed validateOrder on createOrder method using cart total instead of payments total sum +- Fixed Wallet Button discount value to avoid fraud status +- Fixed round to MLC and MCO on notification getTotal method + ## [4.10.0] - 2022-03-21 ### Added diff --git a/README.md b/README.md index 5d1b474b..e7d7015b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

-# Prestashop 1.6.x & 1.7.x - Mercado Pago Module (v4.10.0) +# Prestashop 1.6.x & 1.7.x - Mercado Pago Module (v4.10.1) With the official module of Mercado Pago you will have an integration, hundreds of solutions and thousands of sales. Maximize your conversions and make your customers return to your store by increasing their confidence in the shopping experience. diff --git a/mercadopago.php b/mercadopago.php index dd56333e..472e6934 100644 --- a/mercadopago.php +++ b/mercadopago.php @@ -24,7 +24,7 @@ * International Registered Trademark & Property of MercadoPago */ -define('MP_VERSION', '4.10.0'); +define('MP_VERSION', '4.10.1'); define('MP_ROOT_URL', dirname(__FILE__)); if (!defined('_PS_VERSION_')) { @@ -73,7 +73,7 @@ public function __construct() $this->bootstrap = true; //Always update, because prestashop doesn't accept version coming from another variable (MP_VERSION) - $this->version = '4.10.0'; + $this->version = '4.10.1'; $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); parent::__construct(); From 1673715ffa0ff04a134382b72fabe5e6993d2fb8 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Tue, 5 Apr 2022 15:59:33 -0300 Subject: [PATCH 14/44] feat: update changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b2cad41..0042dfb2 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed validateOrder on createOrder method using cart total instead of payments total sum -- Fixed Wallet Button discount value to avoid fraud status - Fixed round to MLC and MCO on notification getTotal method ## [4.10.0] - 2022-03-21 From ec35842175074ac4d67972710133b2b4cbbd05a7 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Tue, 5 Apr 2022 16:00:14 -0300 Subject: [PATCH 15/44] feat: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0042dfb2..5b2cad41 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed validateOrder on createOrder method using cart total instead of payments total sum +- Fixed Wallet Button discount value to avoid fraud status - Fixed round to MLC and MCO on notification getTotal method ## [4.10.0] - 2022-03-21 From 94c4f3a904d43a88e57277964bb1948349f5a6f8 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Wed, 6 Apr 2022 09:16:20 -0300 Subject: [PATCH 16/44] feat: update coupon_amount --- includes/module/notification/IpnNotification.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/includes/module/notification/IpnNotification.php b/includes/module/notification/IpnNotification.php index e9716071..48d4c043 100644 --- a/includes/module/notification/IpnNotification.php +++ b/includes/module/notification/IpnNotification.php @@ -178,12 +178,8 @@ public function verifyPayments($payments) if ($this->status == 'approved') { $total_paid = $payment_info['transaction_details']['total_paid_amount']; - $coupon_amount = $payment_info['coupon_amount']; - - if ($coupon_amount > 0 && $coupon_amount !== null) { - $total_paid += $coupon_amount; - } - + $coupon_amount = isset($payment_info['coupon_amount']) ? $payment_info['coupon_amount'] : (int) 0; + $total_paid += $coupon_amount; $this->approved += $total_paid; } elseif ($this->status == 'in_process' || $this->status == 'pending' || $this->status == 'authorized') { $this->pending += $payment_info['transaction_amount']; From 6610eeded3ccaade443464e267e1df530b5d9f7d Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Tue, 12 Apr 2022 15:16:25 -0300 Subject: [PATCH 17/44] feat: improvements --- includes/MPUseful.php | 2 +- includes/module/notification/IpnNotification.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/MPUseful.php b/includes/MPUseful.php index 9cb603da..b8f1db47 100644 --- a/includes/MPUseful.php +++ b/includes/MPUseful.php @@ -340,7 +340,7 @@ public function getDiscountByCheckoutType($checkout) return Configuration::get('MERCADOPAGO_PIX_DISCOUNT'); default: - return (int) 0; + return 0.00; } } } diff --git a/includes/module/notification/IpnNotification.php b/includes/module/notification/IpnNotification.php index 48d4c043..17d50b77 100644 --- a/includes/module/notification/IpnNotification.php +++ b/includes/module/notification/IpnNotification.php @@ -177,10 +177,8 @@ public function verifyPayments($payments) $this->payments_data['payments_status'][] = $this->status; if ($this->status == 'approved') { - $total_paid = $payment_info['transaction_details']['total_paid_amount']; - $coupon_amount = isset($payment_info['coupon_amount']) ? $payment_info['coupon_amount'] : (int) 0; - $total_paid += $coupon_amount; - $this->approved += $total_paid; + $coupon_amount = isset($payment_info['coupon_amount']) ? $payment_info['coupon_amount'] : 0.00; + $this->approved += $payment_info['transaction_details']['total_paid_amount'] + $coupon_amount; } elseif ($this->status == 'in_process' || $this->status == 'pending' || $this->status == 'authorized') { $this->pending += $payment_info['transaction_amount']; } From c30a0d1fe1c748a7c8f00a45856dce93a6e68263 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Mon, 18 Apr 2022 16:07:03 -0300 Subject: [PATCH 18/44] feat: updated wallet button rounded values --- includes/MPUseful.php | 9 ++++++-- includes/module/checkouts/CustomCheckout.php | 8 +++++-- .../preference/AbstractStandardPreference.php | 21 ++++++++++++++----- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/includes/MPUseful.php b/includes/MPUseful.php index b8f1db47..e9d49b7e 100644 --- a/includes/MPUseful.php +++ b/includes/MPUseful.php @@ -294,7 +294,6 @@ public function getRound() return $round; } - /** * Get corrected total amount * @@ -315,9 +314,15 @@ public function getCorrectedTotal($cart, $checkout) $difference = $cartTotal - $subtotal - $discount; $amount = $subtotal + $difference; + $amountWithRound = Tools::ps_round($amount, 2); + $amountDifference = $amountWithRound - $amount; + return [ "amount" => $amount, - "discount" => $strDiscount + "discount" => $discount, + "str_discount" => $strDiscount, + "amount_with_round" => $amountWithRound, + "amount_difference" => $amountDifference, ]; } diff --git a/includes/module/checkouts/CustomCheckout.php b/includes/module/checkouts/CustomCheckout.php index 6548b101..b7803feb 100644 --- a/includes/module/checkouts/CustomCheckout.php +++ b/includes/module/checkouts/CustomCheckout.php @@ -80,9 +80,11 @@ public function getCustomCheckoutPS17($cart) public function getCustomCheckout($cart) { $this->loadJsCustom(); + $debit = array(); $credit = array(); $tarjetas = $this->payment->mercadopago->getPaymentMethods(); + foreach ($tarjetas as $tarjeta) { if (Configuration::get($tarjeta['config']) != "") { if ($tarjeta['type'] == 'credit_card') { @@ -93,12 +95,14 @@ public function getCustomCheckout($cart) } } - $correctedTotal = $this->mpuseful->getCorrectedTotal($cart, 'credit_card'); $site_id = Configuration::get('MERCADOPAGO_SITE_ID'); $walletButton = Configuration::get('MERCADOPAGO_CUSTOM_WALLET_BUTTON'); $redirect = $this->payment->context->link->getModuleLink($this->payment->name, 'custom'); $public_key = $this->payment->mercadopago->getPublicKey(); + $correctedTotal = $this->mpuseful->getCorrectedTotal($cart, 'credit_card'); + MPLog::generate('CUSTOM Total info ' . json_encode($correctedTotal)); + $checkoutInfo = array( "debit" => $debit, "credit" => $credit, @@ -107,7 +111,7 @@ public function getCustomCheckout($cart) "wallet_button" => $walletButton, "version" => MP_VERSION, "redirect" => $redirect, - "discount" => $correctedTotal['discount'], + "discount" => $correctedTotal['str_discount'], "public_key" => $public_key, "assets_ext_min" => $this->assets_ext_min, "terms_url" => $this->mpuseful->getTermsAndPoliciesLink($site_id), diff --git a/includes/module/preference/AbstractStandardPreference.php b/includes/module/preference/AbstractStandardPreference.php index 6230483d..ef62f741 100644 --- a/includes/module/preference/AbstractStandardPreference.php +++ b/includes/module/preference/AbstractStandardPreference.php @@ -50,20 +50,31 @@ public function __construct() */ public function buildPreferencePayload($cart, $discount = 0) { - $payloadParent = $this->getCommonPreference($cart); - $amount = $this->mpuseful->getTheTotalDiscounted($cart, $discount); $items = $this->getCartItems($cart); + $payloadParent = $this->getCommonPreference($cart); + $totalInfo = $this->mpuseful->getCorrectedTotal($cart, 'wallet_button'); + + MPLog::generate('Total info ' . json_encode($totalInfo)); - $dicountPerItem = array( + $discountPerItem = array( 'id' => 'discount', 'title' => 'Discount', 'quantity' => 1, - 'unit_price' => $this->mpuseful->getRound() ? Tools::ps_round(-$amount) : -$amount, + 'unit_price' => $this->mpuseful->getRound() ? Tools::ps_round(-$totalInfo['discount']) : Tools::ps_round(-$totalInfo['discount'], 2), 'category_id' => Configuration::get('MERCADOPAGO_STORE_CATEGORY'), 'description' => 'Discount provided by store', ); + array_push($items, $discountPerItem); - array_push($items, $dicountPerItem); + $amountDifferenceItem = array( + 'id' => 'difference', + 'title' => 'Difference', + 'quantity' => 1, + 'unit_price' => $this->mpuseful->getRound() ? Tools::ps_round($totalInfo['amount_difference']) : Tools::ps_round($totalInfo['amount_difference'], 2), + 'category_id' => Configuration::get('MERCADOPAGO_STORE_CATEGORY'), + 'description' => 'Difference provided by store', + ); + array_push($items, $amountDifferenceItem); $payloadAdditional = array( 'items' => $items, From d864ba058d5acaedead9470be1363bdeb13cc4a1 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Mon, 18 Apr 2022 16:18:19 -0300 Subject: [PATCH 19/44] feat: updated wallet button rounded values --- includes/MPUseful.php | 19 ++++++++++--------- .../preference/AbstractStandardPreference.php | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/includes/MPUseful.php b/includes/MPUseful.php index e9d49b7e..5e863d0d 100644 --- a/includes/MPUseful.php +++ b/includes/MPUseful.php @@ -301,28 +301,29 @@ public function getRound() */ public function getCorrectedTotal($cart, $checkout) { + $round = $this->getRound(); $strDiscount = $this->getDiscountByCheckoutType($checkout); - $shipping = (float) $cart->getOrderTotal(true, 5); - $products = (float) $cart->getOrderTotal(true, 4); + $shipping = (float) $cart->getOrderTotal(true, 5); + $products = (float) $cart->getOrderTotal(true, 4); $cartTotal = (float) $cart->getOrderTotal(); $discount = $products * ((float) $strDiscount / 100); $products = ($discount != 0) ? $products - $discount : $products; - $subtotal = $products + $shipping; + $subtotal = $products + $shipping; $difference = $cartTotal - $subtotal - $discount; - $amount = $subtotal + $difference; + $amount = $subtotal + $difference; - $amountWithRound = Tools::ps_round($amount, 2); + $amountWithRound = Tools::ps_round($amount, 2); $amountDifference = $amountWithRound - $amount; return [ - "amount" => $amount, - "discount" => $discount, - "str_discount" => $strDiscount, + "amount" => $amount, + "discount" => $round ? Tools::ps_round($discount) : Tools::ps_round($discount, 2), + "str_discount" => $strDiscount, "amount_with_round" => $amountWithRound, - "amount_difference" => $amountDifference, + "amount_difference" => $round ? Tools::ps_round($amountDifference) : Tools::ps_round($amountDifference, 2), ]; } diff --git a/includes/module/preference/AbstractStandardPreference.php b/includes/module/preference/AbstractStandardPreference.php index ef62f741..c9076104 100644 --- a/includes/module/preference/AbstractStandardPreference.php +++ b/includes/module/preference/AbstractStandardPreference.php @@ -60,7 +60,7 @@ public function buildPreferencePayload($cart, $discount = 0) 'id' => 'discount', 'title' => 'Discount', 'quantity' => 1, - 'unit_price' => $this->mpuseful->getRound() ? Tools::ps_round(-$totalInfo['discount']) : Tools::ps_round(-$totalInfo['discount'], 2), + 'unit_price' => -$totalInfo['discount'], 'category_id' => Configuration::get('MERCADOPAGO_STORE_CATEGORY'), 'description' => 'Discount provided by store', ); @@ -70,7 +70,7 @@ public function buildPreferencePayload($cart, $discount = 0) 'id' => 'difference', 'title' => 'Difference', 'quantity' => 1, - 'unit_price' => $this->mpuseful->getRound() ? Tools::ps_round($totalInfo['amount_difference']) : Tools::ps_round($totalInfo['amount_difference'], 2), + 'unit_price' => $totalInfo['amount_difference'], 'category_id' => Configuration::get('MERCADOPAGO_STORE_CATEGORY'), 'description' => 'Difference provided by store', ); From bdf7f0bda0776daf07a41f65664a8ad49382571e Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Mon, 18 Apr 2022 16:25:43 -0300 Subject: [PATCH 20/44] feat: updated wallet button rounded values --- .../preference/AbstractStandardPreference.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/module/preference/AbstractStandardPreference.php b/includes/module/preference/AbstractStandardPreference.php index c9076104..01a02922 100644 --- a/includes/module/preference/AbstractStandardPreference.php +++ b/includes/module/preference/AbstractStandardPreference.php @@ -57,20 +57,20 @@ public function buildPreferencePayload($cart, $discount = 0) MPLog::generate('Total info ' . json_encode($totalInfo)); $discountPerItem = array( - 'id' => 'discount', - 'title' => 'Discount', - 'quantity' => 1, - 'unit_price' => -$totalInfo['discount'], + 'id' => 'discount', + 'title' => 'Discount', + 'quantity' => 1, + 'unit_price' => -$totalInfo['discount'], 'category_id' => Configuration::get('MERCADOPAGO_STORE_CATEGORY'), 'description' => 'Discount provided by store', ); array_push($items, $discountPerItem); $amountDifferenceItem = array( - 'id' => 'difference', - 'title' => 'Difference', - 'quantity' => 1, - 'unit_price' => $totalInfo['amount_difference'], + 'id' => 'difference', + 'title' => 'Difference', + 'quantity' => 1, + 'unit_price' => $totalInfo['amount_difference'], 'category_id' => Configuration::get('MERCADOPAGO_STORE_CATEGORY'), 'description' => 'Difference provided by store', ); From d2b4f37724ccc645a3ac914487513053bcf63940 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Tue, 19 Apr 2022 08:50:59 -0300 Subject: [PATCH 21/44] feat: updated wallet button rounded values --- .../preference/AbstractStandardPreference.php | 59 ++++++++++--------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/includes/module/preference/AbstractStandardPreference.php b/includes/module/preference/AbstractStandardPreference.php index 01a02922..9134554c 100644 --- a/includes/module/preference/AbstractStandardPreference.php +++ b/includes/module/preference/AbstractStandardPreference.php @@ -50,41 +50,42 @@ public function __construct() */ public function buildPreferencePayload($cart, $discount = 0) { - $items = $this->getCartItems($cart); + $items = $this->getCartItems($cart); $payloadParent = $this->getCommonPreference($cart); - $totalInfo = $this->mpuseful->getCorrectedTotal($cart, 'wallet_button'); - MPLog::generate('Total info ' . json_encode($totalInfo)); + if ($discount != 0) { + $totalInfo = $this->mpuseful->getCorrectedTotal($cart, 'wallet_button'); - $discountPerItem = array( - 'id' => 'discount', - 'title' => 'Discount', - 'quantity' => 1, - 'unit_price' => -$totalInfo['discount'], - 'category_id' => Configuration::get('MERCADOPAGO_STORE_CATEGORY'), - 'description' => 'Discount provided by store', - ); - array_push($items, $discountPerItem); + $discountPerItem = array( + 'id' => 'discount', + 'title' => 'Discount', + 'quantity' => 1, + 'unit_price' => -$totalInfo['discount'], + 'category_id' => Configuration::get('MERCADOPAGO_STORE_CATEGORY'), + 'description' => 'Discount provided by store', + ); + array_push($items, $discountPerItem); - $amountDifferenceItem = array( - 'id' => 'difference', - 'title' => 'Difference', - 'quantity' => 1, - 'unit_price' => $totalInfo['amount_difference'], - 'category_id' => Configuration::get('MERCADOPAGO_STORE_CATEGORY'), - 'description' => 'Difference provided by store', - ); - array_push($items, $amountDifferenceItem); + $amountDifferenceItem = array( + 'id' => 'difference', + 'title' => 'Difference', + 'quantity' => 1, + 'unit_price' => $totalInfo['amount_difference'], + 'category_id' => Configuration::get('MERCADOPAGO_STORE_CATEGORY'), + 'description' => 'Difference provided by store', + ); + array_push($items, $amountDifferenceItem); + } $payloadAdditional = array( - 'items' => $items, - 'payer' => $this->getCustomerData($cart), - 'shipments' => $this->getShipment($cart), - 'back_urls' => $this->getBackUrls($cart), - 'payment_methods' => $this->getPaymentOptions(), - 'auto_return' => $this->getAutoReturn(), - 'binary_mode' => $this->getBinaryMode(), - 'expires' => $this->getExpirationStatus(), + 'items' => $items, + 'payer' => $this->getCustomerData($cart), + 'shipments' => $this->getShipment($cart), + 'back_urls' => $this->getBackUrls($cart), + 'payment_methods' => $this->getPaymentOptions(), + 'auto_return' => $this->getAutoReturn(), + 'binary_mode' => $this->getBinaryMode(), + 'expires' => $this->getExpirationStatus(), 'expiration_date_to' => $this->getExpirationDate(), ); From 5475efbab795410b9b2131a66962693b86a4c2f2 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Tue, 19 Apr 2022 08:53:15 -0300 Subject: [PATCH 22/44] feat: updated wallet button rounded values --- includes/module/checkouts/CustomCheckout.php | 34 +++++++++----------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/includes/module/checkouts/CustomCheckout.php b/includes/module/checkouts/CustomCheckout.php index b7803feb..12434bfb 100644 --- a/includes/module/checkouts/CustomCheckout.php +++ b/includes/module/checkouts/CustomCheckout.php @@ -81,8 +81,8 @@ public function getCustomCheckout($cart) { $this->loadJsCustom(); - $debit = array(); - $credit = array(); + $debit = array(); + $credit = array(); $tarjetas = $this->payment->mercadopago->getPaymentMethods(); foreach ($tarjetas as $tarjeta) { @@ -95,26 +95,24 @@ public function getCustomCheckout($cart) } } - $site_id = Configuration::get('MERCADOPAGO_SITE_ID'); - $walletButton = Configuration::get('MERCADOPAGO_CUSTOM_WALLET_BUTTON'); - $redirect = $this->payment->context->link->getModuleLink($this->payment->name, 'custom'); - $public_key = $this->payment->mercadopago->getPublicKey(); - + $site_id = Configuration::get('MERCADOPAGO_SITE_ID'); + $walletButton = Configuration::get('MERCADOPAGO_CUSTOM_WALLET_BUTTON'); + $redirect = $this->payment->context->link->getModuleLink($this->payment->name, 'custom'); + $public_key = $this->payment->mercadopago->getPublicKey(); $correctedTotal = $this->mpuseful->getCorrectedTotal($cart, 'credit_card'); - MPLog::generate('CUSTOM Total info ' . json_encode($correctedTotal)); $checkoutInfo = array( - "debit" => $debit, - "credit" => $credit, - "amount" => $correctedTotal['amount'], - "site_id" => $site_id, - "wallet_button" => $walletButton, - "version" => MP_VERSION, - "redirect" => $redirect, - "discount" => $correctedTotal['str_discount'], - "public_key" => $public_key, + "debit" => $debit, + "credit" => $credit, + "amount" => $correctedTotal['amount'], + "site_id" => $site_id, + "wallet_button" => $walletButton, + "version" => MP_VERSION, + "redirect" => $redirect, + "discount" => $correctedTotal['str_discount'], + "public_key" => $public_key, "assets_ext_min" => $this->assets_ext_min, - "terms_url" => $this->mpuseful->getTermsAndPoliciesLink($site_id), + "terms_url" => $this->mpuseful->getTermsAndPoliciesLink($site_id), ); return $checkoutInfo; From 275a7ae545b44364bc052da88e464d38a7c5c767 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Tue, 19 Apr 2022 10:33:20 -0300 Subject: [PATCH 23/44] feat: updated webhook notification --- includes/module/notification/WebhookNotification.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/module/notification/WebhookNotification.php b/includes/module/notification/WebhookNotification.php index 1e252995..75f22f82 100644 --- a/includes/module/notification/WebhookNotification.php +++ b/includes/module/notification/WebhookNotification.php @@ -101,7 +101,7 @@ public function verifyCustomPayment() $this->payments_data['payments_status'] = $this->status; if ($this->status == 'approved') { - $this->approved += $this->payment['transaction_amount']; + $this->approved += $this->payment['transaction_details']['total_paid_amount']; } elseif ($this->status == 'in_process' || $this->status == 'pending' || $this->status == 'authorized') { $this->pending += $this->payment['transaction_amount']; } From 8a44f4b596876f29d090d79041c9a256a4937251 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Thu, 21 Apr 2022 11:18:10 -0300 Subject: [PATCH 24/44] fix: added reduce on itens to retrieve and send total difference on preference --- includes/MPUseful.php | 11 +++-------- includes/module/preference/AbstractPreference.php | 11 ++++++----- .../module/preference/AbstractStandardPreference.php | 10 +++++++++- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/includes/MPUseful.php b/includes/MPUseful.php index 5e863d0d..dbc174c5 100644 --- a/includes/MPUseful.php +++ b/includes/MPUseful.php @@ -29,13 +29,8 @@ class MPUseful { - const SEPARATOR = '|'; - public function __construct() - { - } - /** * Instance the class * @@ -53,7 +48,7 @@ public static function getinstance() /** * Get default sponsor_id * - * @param [string] $country + * @param string $country * @return void */ public function getCountryConfigs($country) @@ -159,7 +154,7 @@ public function getModalLink($localization) /** * Get seller protect link * - * @param [string] $country + * @param string $country * @return string */ public function setSellerProtectLink($country) @@ -315,7 +310,7 @@ public function getCorrectedTotal($cart, $checkout) $difference = $cartTotal - $subtotal - $discount; $amount = $subtotal + $difference; - $amountWithRound = Tools::ps_round($amount, 2); + $amountWithRound = $round ? Tools::ps_round($amount) : Tools::ps_round($amount, 2); $amountDifference = $amountWithRound - $amount; return [ diff --git a/includes/module/preference/AbstractPreference.php b/includes/module/preference/AbstractPreference.php index 0203604a..f71bdf4b 100644 --- a/includes/module/preference/AbstractPreference.php +++ b/includes/module/preference/AbstractPreference.php @@ -115,10 +115,10 @@ public function getCartItems($cart, $custom = false, $percent = null) $items = array(); $products = $cart->getProducts(); - //verify country for round + // Verify country for round $round = $this->mpuseful->getRound(); - //Products + // Products foreach ($products as $product) { $image = Image::getCover($product['id_product']); $image_product = new Product($product['id_product'], false, Context::getContext()->language->id); @@ -148,7 +148,7 @@ public function getCartItems($cart, $custom = false, $percent = null) $items[] = $item; } - //Wrapping cost + // Wrapping cost $wrapping_cost = (float) $cart->getOrderTotal(true, Cart::ONLY_WRAPPING); if ($wrapping_cost > 0) { if ($custom != true) { @@ -166,7 +166,7 @@ public function getCartItems($cart, $custom = false, $percent = null) $items[] = $item; } - //Discounts + // Discounts $discounts = (float) $cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS); if ($discounts > 0) { if ($custom != true) { @@ -184,7 +184,7 @@ public function getCartItems($cart, $custom = false, $percent = null) $items[] = $item; } - //Shipping cost + // Shipping cost $shipping_cost = (float) $cart->getOrderTotal(true, Cart::ONLY_SHIPPING); if ($shipping_cost > 0) { if ($custom != true) { @@ -211,6 +211,7 @@ function ($accumulator, $item) { return $accumulator; } ); + $itemsTotal = $round ? Tools::ps_round($itemsTotal) : Tools::ps_round($itemsTotal, 2); $priceDiff = $cartTotal - $itemsTotal; diff --git a/includes/module/preference/AbstractStandardPreference.php b/includes/module/preference/AbstractStandardPreference.php index 9134554c..a38c90b8 100644 --- a/includes/module/preference/AbstractStandardPreference.php +++ b/includes/module/preference/AbstractStandardPreference.php @@ -66,11 +66,19 @@ public function buildPreferencePayload($cart, $discount = 0) ); array_push($items, $discountPerItem); + $itemsAmount = array_reduce( + $items, + function ($accumulator, $item) { + $accumulator += $item['unit_price'] * $item['quantity']; + return $accumulator; + } + ); + $amountDifferenceItem = array( 'id' => 'difference', 'title' => 'Difference', 'quantity' => 1, - 'unit_price' => $totalInfo['amount_difference'], + 'unit_price' => $totalInfo['amount_with_round'] - $itemsAmount, 'category_id' => Configuration::get('MERCADOPAGO_STORE_CATEGORY'), 'description' => 'Difference provided by store', ); From 11db617975469e7ce1fed1717309401ea2dc3bf6 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Fri, 22 Apr 2022 10:04:05 -0300 Subject: [PATCH 25/44] feat: update ticket ci validation and js --- views/js/custom-card.min.js | 2 +- views/js/ticket.js | 179 ++++++++++++++------------ views/js/ticket.min.js | 54 ++++---- views/templates/hook/seven/ticket.tpl | 4 +- views/templates/hook/six/ticket.tpl | 4 +- 5 files changed, 128 insertions(+), 115 deletions(-) diff --git a/views/js/custom-card.min.js b/views/js/custom-card.min.js index 496865c5..2bf63385 100644 --- a/views/js/custom-card.min.js +++ b/views/js/custom-card.min.js @@ -25,4 +25,4 @@ * Don't forget to prefix your containers with your own identifier * to avoid any conflicts with others containers. */ -!function(){var e={},t={site_id:"",public_key:""},n="",d=null,o=null,r=null,i=!1;function c(){return document.getElementById("amount").value}function l(){document.querySelector(".mp-text-cft").innerHTML="",document.querySelector(".mp-text-tea").innerHTML=""}function a(){s(),l(),document.getElementById("id-card-number").style.background="no-repeat #fff",document.getElementById("id-card-expiration").value="",document.getElementById("id-doc-number").value="",document.getElementById("id-security-code").value="",document.getElementById("id-card-holder-name").value=""}function m(e){for(var t=p(),n=e.cause||e,d=0;d-1&&(-1===r.value||""===r.value)){var i=t.querySelectorAll('small[data-main="#'+r.id+'"]');i.length>0&&(i[0].style.display="block"),r.classList.add("mp-form-control-error"),e=!0}}return e}(),n=function(){var t=!1;if(e.issuer){var n=document.getElementById("id-issuers-options");-1!==n.value&&""!==n.value||(n.classList.add("mp-form-control-error"),t=!0)}if(e.cardholder_name){var d=document.getElementById("id-card-holder-name");-1!==d.value&&""!==d.value||(d.classList.add("mp-form-control-error"),t=!0)}if(e.cardholder_identification_type){var o=document.getElementById("id-docType");-1!==o.value&&""!==o.value||(o.classList.add("mp-form-control-error"),t=!0)}if(e.cardholder_identification_number){var r=document.getElementById("id-doc-number");-1!==r.value&&""!==r.value||(r.classList.add("mp-form-control-error"),document.getElementById("mp-error-324").style.display="inline-block",t=!0)}return t}();return!t&&!n||(u(),!1)}window.initializeCustom=function(u){t.site_id=u.site_id,t.public_key=u.public_key,n=u.ps_version,d=new MercadoPago(t.public_key),o=d.cardForm({amount:c(),autoMount:!0,processingMode:"aggregator",form:{id:"mp_custom_checkout",cardNumber:{id:"id-card-number"},cardholderName:{id:"id-card-holder-name"},cardExpirationMonth:{id:"id-card-expiration-month"},cardExpirationYear:{id:"id-card-expiration-year"},securityCode:{id:"id-security-code"},installments:{id:"id-installments"},identificationType:{id:"id-docType"},identificationNumber:{id:"id-doc-number"},issuer:{id:"id-issuers-options"}},callbacks:{onFormMounted:function(e){if(e)return console.warn("Form Mounted handling error: ",e)},onIdentificationTypesReceived:function(e,t){if(e)return console.warn("identificationTypes handling error: ",e)},onPaymentMethodsReceived:function(t,n){if(t)return console.warn("paymentMethods handling error: ",t);var o,i,c,m=n[0].payment_type_id;a(),o=n[0].thumbnail,(i=document.getElementById("id-card-number")).style.background="url("+o+") 98% 50% no-repeat #fff",i.style.backgroundSize="auto 24px",c=n[0].settings[0].security_code.length,r=c,function(e){document.querySelector("#payment_type_id").value=e}(m),"debit_card"===m?document.getElementById("id-installments").setAttribute("disabled","disabled"):document.getElementById("id-installments").removeAttribute("disabled"),function(t){e={issuer:!1,cardholder_name:!1,cardholder_identification_type:!1,cardholder_identification_number:!1};for(var n=0;n-1&&(-1===r.value||""===r.value)){var i=t.querySelectorAll('small[data-main="#'+r.id+'"]');i.length>0&&(i[0].style.display="block"),r.classList.add("mp-form-control-error"),e=!0}}return e}(),n=function(){var t=!1;if(e.issuer){var n=document.getElementById("id-issuers-options");-1!==n.value&&""!==n.value||(n.classList.add("mp-form-control-error"),t=!0)}if(e.cardholder_name){var d=document.getElementById("id-card-holder-name");-1!==d.value&&""!==d.value||(d.classList.add("mp-form-control-error"),t=!0)}if(e.cardholder_identification_type){var o=document.getElementById("id-docType");-1!==o.value&&""!==o.value||(o.classList.add("mp-form-control-error"),t=!0)}if(e.cardholder_identification_number){var r=document.getElementById("id-doc-number");-1!==r.value&&""!==r.value||(r.classList.add("mp-form-control-error"),document.getElementById("mp-error-324").style.display="inline-block",t=!0)}return t}();return!t&&!n||(u(),!1)}window.initializeCustom=function(u){t.site_id=u.site_id,t.public_key=u.public_key,n=u.ps_version,d=new MercadoPago(t.public_key),o=d.cardForm({amount:c(),autoMount:!0,processingMode:"aggregator",form:{id:"mp_custom_checkout",cardNumber:{id:"id-card-number"},cardholderName:{id:"id-card-holder-name"},cardExpirationMonth:{id:"id-card-expiration-month"},cardExpirationYear:{id:"id-card-expiration-year"},securityCode:{id:"id-security-code"},installments:{id:"id-installments"},identificationType:{id:"id-docType"},identificationNumber:{id:"id-doc-number"},issuer:{id:"id-issuers-options"}},callbacks:{onFormMounted:function(e){if(e)return console.warn("Form Mounted handling error: ",e)},onIdentificationTypesReceived:function(e,t){if(e)return console.warn("identificationTypes handling error: ",e)},onPaymentMethodsReceived:function(t,n){if(t)return console.warn("paymentMethods handling error: ",t);var o,i,c,m=n[0].payment_type_id;a(),o=n[0].thumbnail,(i=document.getElementById("id-card-number")).style.background="url("+o+") 98% 50% no-repeat #fff",i.style.backgroundSize="auto 24px",c=n[0].settings[0].security_code.length,r=c,function(e){document.querySelector("#payment_type_id").value=e}(m),"debit_card"===m?document.getElementById("id-installments").setAttribute("disabled","disabled"):document.getElementById("id-installments").removeAttribute("disabled"),function(t){e={issuer:!1,cardholder_name:!1,cardholder_identification_type:!1,cardholder_identification_number:!1};for(var n=0;n -* @copyright 2007-2022 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -* -* Don't forget to prefix your containers with your own identifier -* to avoid any conflicts with others containers. -*/ + * 2007-2022 PrestaShop + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@prestashop.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade PrestaShop to newer + * versions in the future. If you wish to customize PrestaShop for your + * needs please refer to http://www.prestashop.com for more information. + * + * @author PrestaShop SA + * @copyright 2007-2022 PrestaShop SA + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + * + * Don't forget to prefix your containers with your own identifier + * to avoid any conflicts with others containers. + */ /* eslint no-return-assign: 0 */ @@ -32,14 +32,16 @@ var mercadoPagoDocnumber = 'CPF'; var sellerTicket = { - site_id: '' + site_id: '', + ps_version: '', }; /** * Validate site_id */ - window.mpValidateSiteId = function (siteIdTicket) { - sellerTicket.site_id = siteIdTicket; + window.mpValidateSellerInfo = function (siteId, psVersion) { + sellerTicket.site_id = siteId; + sellerTicket.ps_version = psVersion; }; /** @@ -95,29 +97,25 @@ * Handler form submit * @return {bool} */ - window.mercadoPagoFormHandlerTicket = function (psVersion) { - if (document.forms.mp_ticket_checkout !== undefined) { - document.forms.mp_ticket_checkout.onsubmit = function () { + window.mercadoPagoFormHandlerTicket = function () { + var ticketForm = getFormTicket(); + + if (ticketForm !== undefined) { + ticketForm.onsubmit = function () { if (sellerTicket.site_id === 'MLB') { - if (validateInputs() && validateDocumentNumber()) { - disableFinishOrderButton(psVersion); - return true; - } else { + if (!validateInputs() || !validateDocumentNumber()) { return false; } } if (sellerTicket.site_id === 'MLU') { - if (validateDocumentNumber()) { - disableFinishOrderButton(psVersion); - return true; - } else { + if (!validateDocumentNumber()) { return false; } } - disableFinishOrderButton(psVersion); - return true; + disableFinishOrderButton(); + ticketForm.submit(); }; } }; @@ -125,14 +123,14 @@ /** * Get form */ - function getFormTicket () { + function getFormTicket() { return document.querySelector('#mp_ticket_checkout'); } /** * Get condition terms input on PS17 */ - function getConditionTerms () { + function getConditionTerms() { var terms = document.getElementById('conditions_to_approve[terms-and-conditions]'); if (typeof terms === 'object' && terms !== null) { terms.checked = false; @@ -144,11 +142,11 @@ * Disable finish order button * @param {string} psVersion */ - function disableFinishOrderButton (psVersion) { - if (psVersion === 'six') { + function disableFinishOrderButton() { + if (sellerTicket.ps_version === 'six') { var sixButton = document.getElementById('mp-ticket-finish-order'); sixButton.setAttribute('disabled', 'disabled'); - } else if (psVersion === 'seven') { + } else if (sellerTicket.ps_version === 'seven') { var sevenButton = document.getElementById('payment-confirmation').childNodes[1].childNodes[1]; sevenButton.setAttribute('disabled', 'disabled'); } @@ -157,7 +155,7 @@ /** * Validate if all inputs are valid */ - function validateInputs () { + function validateInputs() { var form = getFormTicket(); var formInputs = form.querySelectorAll('[data-checkout]'); var small = form.querySelectorAll('.mp-erro-febraban'); @@ -179,7 +177,10 @@ // Focus on the element with error for (var j = 0; j < formInputs.length; j++) { var focusElement = formInputs[j]; - if (focusElement.parentNode.style.display !== 'none' && (focusElement.value === -1 || focusElement.value === '')) { + if ( + focusElement.parentNode.style.display !== 'none' && + (focusElement.value === -1 || focusElement.value === '') + ) { focusElement.focus(); getConditionTerms(); return false; @@ -190,10 +191,10 @@ } /** - * Validate document number - * @return {bool} - */ - function validateDocumentNumber () { + * Validate document number + * @return {bool} + */ + function validateDocumentNumber() { var docnumberInput = document.getElementById('mp_doc_number'); var docnumberError = document.getElementById('mp_error_docnumber'); var docnumberValidate = false; @@ -225,7 +226,7 @@ * @param {string} docnumber * @return {bool} */ - function validateDocTypeMLB (docnumber) { + function validateDocTypeMLB(docnumber) { if (mercadoPagoDocnumber === 'CPF') { return validateCPF(docnumber); } else { @@ -238,7 +239,7 @@ * @param {string} docnumber * @return {bool} */ - function validateDocTypeMLU (docnumber) { + function validateDocTypeMLU(docnumber) { if (docnumber !== '') { return validateCI(docnumber); } else { @@ -251,7 +252,7 @@ * @param {string} strCPF * @return {bool} */ - function validateCPF (strCPF) { + function validateCPF(strCPF) { var Soma; var Resto; @@ -267,7 +268,7 @@ } Resto = (Soma * 10) % 11; - if ((Resto === 10) || (Resto === 11)) { + if (Resto === 10 || Resto === 11) { Resto = 0; } if (Resto !== parseInt(strCPF.substring(9, 10))) { @@ -280,7 +281,7 @@ } Resto = (Soma * 10) % 11; - if ((Resto === 10) || (Resto === 11)) { + if (Resto === 10 || Resto === 11) { Resto = 0; } if (Resto !== parseInt(strCPF.substring(10, 11))) { @@ -295,7 +296,7 @@ * @param {string} strCNPJ * @return {bool} */ - function validateCNPJ (strCNPJ) { + function validateCNPJ(strCNPJ) { strCNPJ = strCNPJ.replace(/[^\d]+/g, ''); if (strCNPJ === '') { @@ -306,16 +307,18 @@ return false; } - if (strCNPJ === '00000000000000' || - strCNPJ === '11111111111111' || - strCNPJ === '22222222222222' || - strCNPJ === '33333333333333' || - strCNPJ === '44444444444444' || - strCNPJ === '55555555555555' || - strCNPJ === '66666666666666' || - strCNPJ === '77777777777777' || - strCNPJ === '88888888888888' || - strCNPJ === '99999999999999') { + if ( + strCNPJ === '00000000000000' || + strCNPJ === '11111111111111' || + strCNPJ === '22222222222222' || + strCNPJ === '33333333333333' || + strCNPJ === '44444444444444' || + strCNPJ === '55555555555555' || + strCNPJ === '66666666666666' || + strCNPJ === '77777777777777' || + strCNPJ === '88888888888888' || + strCNPJ === '99999999999999' + ) { return false; } @@ -324,6 +327,7 @@ var digitos = strCNPJ.substring(tamanho); var soma = 0; var pos = tamanho - 7; + for (var i = tamanho; i >= 1; i--) { soma += numeros.charAt(tamanho - i) * pos--; if (pos < 2) { @@ -331,7 +335,7 @@ } } - var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; + var resultado = soma % 11 < 2 ? 0 : 11 - (soma % 11); if (resultado.toString() !== digitos.charAt(0)) { return false; @@ -341,13 +345,16 @@ numeros = strCNPJ.substring(0, tamanho); soma = 0; pos = tamanho - 7; + for (i = tamanho; i >= 1; i--) { soma += numeros.charAt(tamanho - i) * pos--; if (pos < 2) { pos = 9; } } - resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; + + resultado = soma % 11 < 2 ? 0 : 11 - (soma % 11); + if (resultado.toString() !== digitos.charAt(1)) { return false; } @@ -360,25 +367,31 @@ * @param {string} docNumber * @return {bool} */ - function validateCI (docNumber) { + function validateCI(ci) { var x = 0; - var y = 0; - var docCI = 0; - var dig = docNumber[docNumber.length - 1]; + var digitValidation = null; + + ci = ci.replace(/\D/g, ''); + var digit = Number(ci[ci.length - 1]); + + ci = ci.replace(/[0-9]$/, ''); - if (docNumber.length <= 6) { - for (y = docNumber.length; y < 7; y++) { - docNumber = '0' + docNumber; + if (ci.length <= 6) { + for (var i = ci.length; i < 7; i++) { + ci = '0' + ci; } } - for (y = 0; y < 7; y++) { - x += (parseInt('2987634'[y]) * parseInt(docNumber[y])) % 10; + + for (var j = 0; j < 7; j++) { + x += (parseInt('2987634'[j]) * parseInt(ci[j])) % 10; } + if (x % 10 === 0) { - docCI = 0; + digitValidation = 0; } else { - docCI = 10 - x % 10; + digitValidation = 10 - (x % 10); } - return (dig === docCI); + + return digit === digitValidation; } })(); diff --git a/views/js/ticket.min.js b/views/js/ticket.min.js index e6b59439..91252b26 100644 --- a/views/js/ticket.min.js +++ b/views/js/ticket.min.js @@ -1,28 +1,28 @@ /** -* 2007-2022 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2022 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -* -* Don't forget to prefix your containers with your own identifier -* to avoid any conflicts with others containers. -*/ -!function(){var e="CPF",t={site_id:""};function n(){var e=document.getElementById("conditions_to_approve[terms-and-conditions]");if("object"==typeof e&&null!==e)return e.checked=!1,!1}function r(e){if("six"===e)document.getElementById("mp-ticket-finish-order").setAttribute("disabled","disabled");else if("seven"===e){document.getElementById("payment-confirmation").childNodes[1].childNodes[1].setAttribute("disabled","disabled")}}function l(){var r,l=document.getElementById("mp_doc_number"),o=document.getElementById("mp_error_docnumber"),i=!1;return"MLB"===t.site_id&&(r=l.value,i="CPF"===e?function(e){var t,n;if(t=0,"00000000000"===(e=e.replace(/[.-\s]/g,"")))return!1;for(var r=1;r<=9;r++)t+=parseInt(e.substring(r-1,r))*(11-r);if(10!=(n=10*t%11)&&11!==n||(n=0),n!==parseInt(e.substring(9,10)))return!1;t=0;for(var l=1;l<=10;l++)t+=parseInt(e.substring(l-1,l))*(12-l);return 10!=(n=10*t%11)&&11!==n||(n=0),n===parseInt(e.substring(10,11))}(r):function(e){if(""===(e=e.replace(/[^\d]+/g,"")))return!1;if(14!==e.length)return!1;if("00000000000000"===e||"11111111111111"===e||"22222222222222"===e||"33333333333333"===e||"44444444444444"===e||"55555555555555"===e||"66666666666666"===e||"77777777777777"===e||"88888888888888"===e||"99999999999999"===e)return!1;for(var t=e.length-2,n=e.substring(0,t),r=e.substring(t),l=0,o=t-7,i=t;i>=1;i--)l+=n.charAt(t-i)*o--,o<2&&(o=9);var s=l%11<2?0:11-l%11;if(s.toString()!==r.charAt(0))return!1;for(t+=1,n=e.substring(0,t),l=0,o=t-7,i=t;i>=1;i--)l+=n.charAt(t-i)*o--,o<2&&(o=9);return(s=l%11<2?0:11-l%11).toString()===r.charAt(1)}(r)),"MLU"===t.site_id&&(i=function(e){return""!==e&&function(e){var t=0,n=0,r=0,l=e[e.length-1];if(e.length<=6)for(n=e.length;n<7;n++)e="0"+e;for(n=0;n<7;n++)t+=parseInt("2987634"[n])*parseInt(e[n])%10;r=t%10==0?0:10-t%10;return l===r}(e)}(l.value)),i?(o.style.display="none",l.classList.remove("mp-form-control-error"),i=!0):(o.style.display="block",l.classList.add("mp-form-control-error"),l.focus(),n()),i}window.mpValidateSiteId=function(e){t.site_id=e},window.validateDocumentInputs=function(){if("MLB"===t.site_id){var n=document.getElementById("mp_box_lastname"),r=document.getElementById("mp_box_firstname"),l=document.getElementById("mp_firstname_label"),o=document.getElementById("mp_socialname_label"),i=document.getElementById("mp_cpf_label"),s=document.getElementById("mp_cnpj_label"),a=document.getElementById("mp_doc_number"),d=document.querySelectorAll('input[type=radio][name="mercadopago_ticket[docType]"]');s.style.display="none",o.style.display="none";for(var c=function(){"CPF"===this.value?(i.style.display="table-cell",n.style.display="block",l.style.display="table-cell",s.style.display="none",o.style.display="none",r.classList.add("col-md-4"),r.classList.remove("col-md-8"),a.setAttribute("maxlength","14"),a.setAttribute("onkeyup","maskInput(this, mcpf)"),e="CPF"):(i.style.display="none",n.style.display="none",l.style.display="none",s.style.display="table-cell",o.style.display="table-cell",r.classList.add("col-md-8"),r.classList.remove("col-md-4"),a.setAttribute("maxlength","18"),a.setAttribute("onkeyup","maskInput(this, mcnpj)"),e="CNPJ")},u=0;u + * @copyright 2007-2022 PrestaShop SA + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + * + * Don't forget to prefix your containers with your own identifier + * to avoid any conflicts with others containers. + */ +!function(){var e="CPF",t={site_id:"",ps_version:""};function n(){return document.querySelector("#mp_ticket_checkout")}function r(){var e=document.getElementById("conditions_to_approve[terms-and-conditions]");if("object"==typeof e&&null!==e)return e.checked=!1,!1}function l(){var n,l=document.getElementById("mp_doc_number"),o=document.getElementById("mp_error_docnumber"),s=!1;return"MLB"===t.site_id&&(n=l.value,s="CPF"===e?function(e){var t,n;if(t=0,"00000000000"===(e=e.replace(/[.-\s]/g,"")))return!1;for(var r=1;r<=9;r++)t+=parseInt(e.substring(r-1,r))*(11-r);if(10!=(n=10*t%11)&&11!==n||(n=0),n!==parseInt(e.substring(9,10)))return!1;t=0;for(var l=1;l<=10;l++)t+=parseInt(e.substring(l-1,l))*(12-l);return 10!=(n=10*t%11)&&11!==n||(n=0),n===parseInt(e.substring(10,11))}(n):function(e){if(""===(e=e.replace(/[^\d]+/g,"")))return!1;if(14!==e.length)return!1;if("00000000000000"===e||"11111111111111"===e||"22222222222222"===e||"33333333333333"===e||"44444444444444"===e||"55555555555555"===e||"66666666666666"===e||"77777777777777"===e||"88888888888888"===e||"99999999999999"===e)return!1;for(var t=e.length-2,n=e.substring(0,t),r=e.substring(t),l=0,o=t-7,s=t;s>=1;s--)l+=n.charAt(t-s)*o--,o<2&&(o=9);var i=l%11<2?0:11-l%11;if(i.toString()!==r.charAt(0))return!1;for(t+=1,n=e.substring(0,t),l=0,o=t-7,s=t;s>=1;s--)l+=n.charAt(t-s)*o--,o<2&&(o=9);return(i=l%11<2?0:11-l%11).toString()===r.charAt(1)}(n)),"MLU"===t.site_id&&(s=function(e){return""!==e&&function(e){var t=0,n=null;e=e.replace(/\D/g,"");var r=Number(e[e.length-1]);if((e=e.replace(/[0-9]$/,"")).length<=6)for(var l=e.length;l<7;l++)e="0"+e;for(var o=0;o<7;o++)t+=parseInt("2987634"[o])*parseInt(e[o])%10;n=t%10==0?0:10-t%10;return r===n}(e)}(l.value)),s?(o.style.display="none",l.classList.remove("mp-form-control-error"),s=!0):(o.style.display="block",l.classList.add("mp-form-control-error"),l.focus(),r()),s}window.mpValidateSellerInfo=function(e,n){t.site_id=e,t.ps_version=n},window.validateDocumentInputs=function(){if("MLB"===t.site_id){var n=document.getElementById("mp_box_lastname"),r=document.getElementById("mp_box_firstname"),l=document.getElementById("mp_firstname_label"),o=document.getElementById("mp_socialname_label"),s=document.getElementById("mp_cpf_label"),i=document.getElementById("mp_cnpj_label"),a=document.getElementById("mp_doc_number"),d=document.querySelectorAll('input[type=radio][name="mercadopago_ticket[docType]"]');i.style.display="none",o.style.display="none";for(var c=function(){"CPF"===this.value?(s.style.display="table-cell",n.style.display="block",l.style.display="table-cell",i.style.display="none",o.style.display="none",r.classList.add("col-md-4"),r.classList.remove("col-md-8"),a.setAttribute("maxlength","14"),a.setAttribute("onkeyup","maskInput(this, mcpf)"),e="CPF"):(s.style.display="none",n.style.display="none",l.style.display="none",i.style.display="table-cell",o.style.display="table-cell",r.classList.add("col-md-8"),r.classList.remove("col-md-4"),a.setAttribute("maxlength","18"),a.setAttribute("onkeyup","maskInput(this, mcnpj)"),e="CNPJ")},u=0;u diff --git a/views/templates/hook/six/ticket.tpl b/views/templates/hook/six/ticket.tpl index 0fa928ae..92e30673 100644 --- a/views/templates/hook/six/ticket.tpl +++ b/views/templates/hook/six/ticket.tpl @@ -375,8 +375,8 @@ window.onload = loadTicket(); function loadTicket() { var site_id = '{$site_id|escape:"javascript":"UTF-8"}'; - mpValidateSiteId(site_id); + mpValidateSellerInfo(site_id, 'six'); validateDocumentInputs(); - mercadoPagoFormHandlerTicket('six'); + mercadoPagoFormHandlerTicket(); } From fa2fde6a633ea6b478104f236beffe4046f3f873 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Mon, 25 Apr 2022 11:01:30 -0300 Subject: [PATCH 26/44] feat: update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b2cad41..2439e383 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed validateOrder on createOrder method using cart total instead of payments total sum - Fixed Wallet Button discount value to avoid fraud status -- Fixed round to MLC and MCO on notification getTotal method +- Fixed round to MLC (Chile) and MCO (Colombia) on notification getTotal method +- Fixed checkout ticket validation to MLU (Uruguay) ## [4.10.0] - 2022-03-21 From eb87c3b779e9047908c4435a8c30d8acb70519d1 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Mon, 25 Apr 2022 15:23:07 -0300 Subject: [PATCH 27/44] feat: update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2439e383..1cdcd073 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [4.10.1] - 2022-04-XX +## [4.10.1] - 2022-04-25 ### Added - Added compatibility with Mercado Pago discounts From 873ae697435f2b28ae77c6e00e44b3bfeb6d7aa7 Mon Sep 17 00:00:00 2001 From: DouglasCorreiaMeli Date: Wed, 18 May 2022 18:00:14 -0300 Subject: [PATCH 28/44] fix get costumer fields when create preference --- controllers/front/standard.php | 90 +++++-- .../module/checkouts/StandardCheckout.php | 15 -- includes/module/checkouts/TicketCheckout.php | 4 +- .../module/preference/AbstractPreference.php | 35 +-- .../preference/AbstractStandardPreference.php | 55 +++-- views/templates/hook/seven/standard.tpl | 224 ++++++++++-------- views/templates/hook/seven/ticket.tpl | 4 +- views/templates/hook/six/standard.tpl | 41 ++-- views/templates/hook/six/ticket.tpl | 4 +- 9 files changed, 267 insertions(+), 205 deletions(-) diff --git a/controllers/front/standard.php b/controllers/front/standard.php index a5593768..28e037b6 100644 --- a/controllers/front/standard.php +++ b/controllers/front/standard.php @@ -41,51 +41,101 @@ public function __construct() * * @return void */ - public function postProcess() + public function initContent() { $preference = new StandardPreference(); try { $preference->verifyModuleParameters(); + $createPreference = $this->createPreference($preference, $this->context->cart); + $checkoutType = $this->getCheckoutType($createPreference); - //modal checkout - if ($preference->settings['MERCADOPAGO_STANDARD_MODAL'] != "") { - $this->standardModalCheckout($preference); - return; + if ($createPreference && $checkoutType) { + if ($checkoutType == 'modal') { + $this->getResponse($createPreference, 200); + } + + Tools::redirectLink($createPreference['init_point']); } - //redirect checkout - $this->standardRedirectCheckout($this->context->cart, $preference); + $this->redirectError($preference, Tools::displayError()); + } catch (Exception $e) { MPLog::generate('Exception Message: ' . $e->getMessage()); + $this->redirectError($preference, Tools::displayError()); } } /** - * @param $cart + * Get checkout type + * * @param StandardPreference $preference - * @throws Exception + * + * @return mixed */ - public function standardRedirectCheckout($cart, StandardPreference $preference) - { + public function getCheckoutType($preference) { + $checkoutType = isset($preference['metadata']['checkout_type']) ? $preference['metadata']['checkout_type'] : false; + + if ($checkoutType) { + return $checkoutType === 'modal' ? 'modal' : 'redirect'; + } + + return false; + } + + /** + * Create a Standard Preference + * + * @param StandardPreference $preference + * @param Cart $cart + * + * @return mixed + */ + public function createPreference($preference, $cart) { $createPreference = $preference->createPreference($cart); + if (is_array($createPreference) && array_key_exists('init_point', $createPreference)) { - $preference->saveCreatePreferenceData($cart, $createPreference['notification_url']); - Tools::redirectLink($createPreference['init_point']); + $preference->saveCreatePreferenceData( + $cart, + $createPreference['notification_url'] + ); + + return $createPreference; } - $preference->redirectError(); + return false; } /** + * Get response with preference + * * @param StandardPreference $preference + * @param integer $code */ - public function standardModalCheckout(StandardPreference $preference) + public function getResponse($preference, $code) { - $back_url = Tools::getValue('back_url'); - if (isset($back_url)) { - Tools::redirectLink($back_url); - } + header('Content-type: application/json'); + $response = array( + 'code' => $code, + 'preference' => $preference, + ); + + echo Tools::jsonEncode($response); + http_response_code($code); + exit(); + } - $preference->redirectError(); + /** + * Redirect to checkout with error + * + * @param StandardPreference $preference + * @param string $errorMessage + * + * @return void + */ + public function redirectError($preference, $errorMessage) + { + $this->context->cookie->__set('redirect_message', $errorMessage); + $preference->deleteCartRule(); + Tools::redirect('index.php?controller=order&step=3&typeReturn=failure'); } } diff --git a/includes/module/checkouts/StandardCheckout.php b/includes/module/checkouts/StandardCheckout.php index 4e5cf0f2..226a7c65 100644 --- a/includes/module/checkouts/StandardCheckout.php +++ b/includes/module/checkouts/StandardCheckout.php @@ -105,19 +105,6 @@ public function getStandard($cart) $site_id = Configuration::get('MERCADOPAGO_SITE_ID'); $modal = Configuration::get('MERCADOPAGO_STANDARD_MODAL'); $redirect = $this->payment->context->link->getModuleLink($this->payment->name, 'standard'); - $preference_id = ""; - $modal_link = ""; - - if ($modal != "") { - $preference = new StandardPreference(); - $createPreference = $preference->createPreference($cart); - - if (is_array($createPreference) && array_key_exists('init_point', $createPreference)) { - $preference_id = $createPreference['id']; - $preference->saveCreatePreferenceData($cart, $createPreference['notification_url']); - $modal_link = $this->payment->mpuseful->getModalLink(Configuration::get('MERCADOPAGO_SITE_ID')); - } - } $informations = array( "count" => $count, @@ -126,8 +113,6 @@ public function getStandard($cart) "ticket" => $ticket, "modal" => $modal, "redirect" => $redirect, - "modal_link" => $modal_link, - "preference" => $preference_id, "public_key" => $this->payment->mercadopago->getPublicKey(), "installments" => Configuration::get('MERCADOPAGO_INSTALLMENTS'), "terms_url" => $this->mpuseful->getTermsAndPoliciesLink($site_id), diff --git a/includes/module/checkouts/TicketCheckout.php b/includes/module/checkouts/TicketCheckout.php index 0bda03eb..10aff485 100644 --- a/includes/module/checkouts/TicketCheckout.php +++ b/includes/module/checkouts/TicketCheckout.php @@ -99,7 +99,7 @@ public function getTicketCheckout($cart) $site_id = Configuration::get('MERCADOPAGO_SITE_ID'); $address = new Address((int) $cart->id_address_invoice); - $customer = Context::getContext()->customer->getFields(); + $context = Context::getContext(); $discount = Configuration::get('MERCADOPAGO_TICKET_DISCOUNT'); $redirect = $this->payment->context->link->getModuleLink($this->payment->name, 'ticket'); @@ -108,7 +108,7 @@ public function getTicketCheckout($cart) "site_id" => $site_id, "address" => $address, "version" => MP_VERSION, - "customer" => $customer, + "context" => $context, "redirect" => $redirect, "discount" => $discount, "module_dir" => $this->payment->path, diff --git a/includes/module/preference/AbstractPreference.php b/includes/module/preference/AbstractPreference.php index f71bdf4b..d6b662f3 100644 --- a/includes/module/preference/AbstractPreference.php +++ b/includes/module/preference/AbstractPreference.php @@ -315,22 +315,25 @@ public function getCustomerEmail() */ public function getCustomCustomerData($cart) { - $customer_fields = Context::getContext()->customer->getFields(); - $address_invoice = new Address((int) $cart->id_address_invoice); - - $customer_data = array( - 'first_name' => $customer_fields['firstname'], - 'last_name' => $customer_fields['lastname'], - 'phone' => array( - 'area_code' => '-', - 'number' => $address_invoice->phone, - ), - 'address' => array( - 'zip_code' => $address_invoice->postcode, - 'street_name' => $this->buildStreetName($address_invoice), - 'street_number' => '-', - ), - ); + $customer = Context::getContext()->customer; + if ( !(empty($customer->firstname) && empty($customer->lastname)) ) { + $customer_fields = $customer->getFields(); + $address_invoice = new Address((int) $cart->id_address_invoice); + + $customer_data = array( + 'first_name' => $customer_fields['firstname'], + 'last_name' => $customer_fields['lastname'], + 'phone' => array( + 'area_code' => '-', + 'number' => $address_invoice->phone, + ), + 'address' => array( + 'zip_code' => $address_invoice->postcode, + 'street_name' => $this->buildStreetName($address_invoice), + 'street_number' => '-', + ), + ); + } return $customer_data; } diff --git a/includes/module/preference/AbstractStandardPreference.php b/includes/module/preference/AbstractStandardPreference.php index a38c90b8..bfb4e66a 100644 --- a/includes/module/preference/AbstractStandardPreference.php +++ b/includes/module/preference/AbstractStandardPreference.php @@ -108,33 +108,36 @@ function ($accumulator, $item) { */ public function getCustomerData($cart) { - $customerFields = Context::getContext()->customer->getFields(); - $addressInvoice = new Address((int) $cart->id_address_invoice); + $customer = Context::getContext()->customer; + if ( !(empty($customer->firstname) && empty($customer->lastname)) ) { + $customerFields = $customer->getFields(); + $addressInvoice = new Address((int) $cart->id_address_invoice); - $customerData = array( - 'email' => $customerFields['email'], - 'first_name' => $customerFields['firstname'], - 'last_name' => $customerFields['lastname'], - 'phone' => array( - 'area_code' => '', - 'number' => $addressInvoice->phone, - ), - 'identification' => array( - 'type' => '', - 'number' => '', - ), - 'address' => array( - 'zip_code' => $addressInvoice->postcode, - 'street_name' => $addressInvoice->address1 . ' - ' . - $addressInvoice->address2 . ' - ' . - $addressInvoice->city . ' - ' . - $addressInvoice->country, - 'street_number' => '', - 'city' => $addressInvoice->city, - 'federal_unit' => '', - ), - 'date_created' => date('c', strtotime($customerFields['date_add'])), - ); + $customerData = array( + 'email' => $customerFields['email'], + 'first_name' => $customerFields['firstname'], + 'last_name' => $customerFields['lastname'], + 'phone' => array( + 'area_code' => '', + 'number' => $addressInvoice->phone, + ), + 'identification' => array( + 'type' => '', + 'number' => '', + ), + 'address' => array( + 'zip_code' => $addressInvoice->postcode, + 'street_name' => $addressInvoice->address1 . ' - ' . + $addressInvoice->address2 . ' - ' . + $addressInvoice->city . ' - ' . + $addressInvoice->country, + 'street_number' => '', + 'city' => $addressInvoice->city, + 'federal_unit' => '', + ), + 'date_created' => date('c', strtotime($customerFields['date_add'])), + ); + } return $customerData; } diff --git a/views/templates/hook/seven/standard.tpl b/views/templates/hook/seven/standard.tpl index fa70ad41..261b9b45 100644 --- a/views/templates/hook/seven/standard.tpl +++ b/views/templates/hook/seven/standard.tpl @@ -1,122 +1,140 @@ {* -* 2007-2022 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2022 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} + * 2007-2022 PrestaShop + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@prestashop.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade PrestaShop to newer + * versions in the future. If you wish to customize PrestaShop for your + * needs please refer to http://www.prestashop.com for more information. + * + * @author PrestaShop SA + * @copyright 2007-2022 PrestaShop SA + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + *} -
-
- {if count($credit) != 0} -
-
-

- {l s='Credit card' mod='mercadopago'} - - {l s='Up to' mod='mercadopago'} {$installments|escape:'html':'UTF-8'} {l s='installments' mod='mercadopago'} - -

+ +
+ {if count($credit) != 0} +
+
+

+ {l s='Credit card' mod='mercadopago'} + + {l s='Up to' mod='mercadopago'} {$installments|escape:'html':'UTF-8'} {l s='installments' mod='mercadopago'} + +

-
- {foreach $credit as $tarjeta} -
- -
- {/foreach} +
+ {foreach $credit as $tarjeta} +
+ +
+ {/foreach} +
-
- {/if} + {/if} - {if count($debit) != 0} -
-
-

{l s='Debit card' mod='mercadopago'}

-
- {foreach $debit as $tarjeta} -
- -
- {/foreach} + {if count($debit) != 0} +
+
+

{l s='Debit card' mod='mercadopago'}

+
+ {foreach $debit as $tarjeta} +
+ +
+ {/foreach} +
-
- {/if} + {/if} - {if count($ticket) != 0} -
-
-

{l s='Wire transfer' mod='mercadopago'}

-
- {foreach $ticket as $tarjeta} -
- -
- {/foreach} + {if count($ticket) != 0} +
+
+

{l s='Wire transfer' mod='mercadopago'}

+
+ {foreach $ticket as $tarjeta} +
+ +
+ {/foreach} +
-
- {/if} + {/if} - {if $modal != true && $preference == ""} -
-
- -

{l s='We take you to our site to complete the payment' mod='mercadopago'}

+ {if $modal != true} +
+
+ +

{l s='We take you to our site to complete the payment' mod='mercadopago'}

+
-
- {/if} + {/if} -
- +
+ +
-
+ - {if $modal == true && $preference != ""} - + + + {if $count == 0} + {/if} - -{if $count == 0} - -{/if} + {if $modal == true} + -{/if} + var mp = new MercadoPago('{$public_key|escape:"html":"UTF-8"}'); + mp.checkout(mp_button); + + return false; + } + window.location.href = 'index.php?controller=order&step=3&typeReturn=failure'; + }); + }; + }); + + {/if} diff --git a/views/templates/hook/seven/ticket.tpl b/views/templates/hook/seven/ticket.tpl index 6e6f122b..148078cd 100644 --- a/views/templates/hook/seven/ticket.tpl +++ b/views/templates/hook/seven/ticket.tpl @@ -113,7 +113,7 @@ name="mercadopago_ticket[firstname]" type="text" class="form-control mp-form-control" - value="{$customer['firstname']|escape:'html':'UTF-8'}" + value="{$context->customer->firstname|escape:'html':'UTF-8'}" autocomplete="off" data-checkout="mp_firstname" /> @@ -131,7 +131,7 @@ name="mercadopago_ticket[lastname]" type="text" class="form-control mp-form-control" - value="{$customer['lastname']|escape:'html':'UTF-8'}" + value="{$context->customer->lastname|escape:'html':'UTF-8'}" autocomplete="off" data-checkout="mp_lastname" /> diff --git a/views/templates/hook/six/standard.tpl b/views/templates/hook/six/standard.tpl index 2b53a488..7c6f0513 100644 --- a/views/templates/hook/six/standard.tpl +++ b/views/templates/hook/six/standard.tpl @@ -86,34 +86,37 @@ {/if}
- {if $modal == true && $preference != ""} + {if $modal == true}
{/if} -{if $modal == true && $preference != ""} +{if $modal == true} diff --git a/views/templates/hook/six/ticket.tpl b/views/templates/hook/six/ticket.tpl index 92e30673..5329e339 100644 --- a/views/templates/hook/six/ticket.tpl +++ b/views/templates/hook/six/ticket.tpl @@ -119,7 +119,7 @@ class="form-control mp-form-control" type="text" name="mercadopago_ticket[firstname]" - value="{$customer['firstname']|escape:'html':'UTF-8'}" + value="{$context->customer->firstname|escape:'html':'UTF-8'}" autocomplete="off" data-checkout="mp_firstname" /> @@ -137,7 +137,7 @@ class="form-control mp-form-control" name="mercadopago_ticket[lastname]" type="text" - value="{$customer['lastname']|escape:'html':'UTF-8'}" + value="{$context->customer->lastname|escape:'html':'UTF-8'}" autocomplete="off" data-checkout="mp_lastname" /> From 75e54ae6d748f0761f52295dd27b3f0eb26012ed Mon Sep 17 00:00:00 2001 From: DouglasCorreiaMeli Date: Wed, 18 May 2022 18:33:20 -0300 Subject: [PATCH 29/44] fix customer data return --- includes/module/preference/AbstractPreference.php | 3 +-- includes/module/preference/AbstractStandardPreference.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/module/preference/AbstractPreference.php b/includes/module/preference/AbstractPreference.php index d6b662f3..9e459ec2 100644 --- a/includes/module/preference/AbstractPreference.php +++ b/includes/module/preference/AbstractPreference.php @@ -333,9 +333,8 @@ public function getCustomCustomerData($cart) 'street_number' => '-', ), ); + return $customer_data; } - - return $customer_data; } /** diff --git a/includes/module/preference/AbstractStandardPreference.php b/includes/module/preference/AbstractStandardPreference.php index bfb4e66a..6649cd35 100644 --- a/includes/module/preference/AbstractStandardPreference.php +++ b/includes/module/preference/AbstractStandardPreference.php @@ -137,9 +137,8 @@ public function getCustomerData($cart) ), 'date_created' => date('c', strtotime($customerFields['date_add'])), ); + return $customerData; } - - return $customerData; } /** From 678c291676609ec3bf4f0a93cb5a71c99789e546 Mon Sep 17 00:00:00 2001 From: sleaof Date: Tue, 31 May 2022 09:23:57 -0300 Subject: [PATCH 30/44] feat: standard adjustments on click event --- controllers/front/standard.php | 22 ++++++++++++++++--- .../module/preference/AbstractPreference.php | 2 +- .../preference/AbstractStandardPreference.php | 2 +- views/templates/hook/six/standard.tpl | 6 ++++- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/controllers/front/standard.php b/controllers/front/standard.php index 28e037b6..65f42e9a 100644 --- a/controllers/front/standard.php +++ b/controllers/front/standard.php @@ -1,4 +1,5 @@ getResponse($createPreference, 200); + $this->standardModalCheckout($preference); } Tools::redirectLink($createPreference['init_point']); } $this->redirectError($preference, Tools::displayError()); - } catch (Exception $e) { MPLog::generate('Exception Message: ' . $e->getMessage()); $this->redirectError($preference, Tools::displayError()); @@ -72,7 +73,8 @@ public function initContent() * * @return mixed */ - public function getCheckoutType($preference) { + public function getCheckoutType($preference) + { $checkoutType = isset($preference['metadata']['checkout_type']) ? $preference['metadata']['checkout_type'] : false; if ($checkoutType) { @@ -90,7 +92,8 @@ public function getCheckoutType($preference) { * * @return mixed */ - public function createPreference($preference, $cart) { + public function createPreference($preference, $cart) + { $createPreference = $preference->createPreference($cart); if (is_array($createPreference) && array_key_exists('init_point', $createPreference)) { @@ -105,6 +108,19 @@ public function createPreference($preference, $cart) { return false; } + /** + * @param StandardPreference $preference + */ + public function standardModalCheckout($preference) + { + $backUrl = Tools::getValue('back_url'); + if (isset($backUrl)) { + Tools::redirectLink($backUrl); + } + + $preference->redirectError(); + } + /** * Get response with preference * diff --git a/includes/module/preference/AbstractPreference.php b/includes/module/preference/AbstractPreference.php index 9e459ec2..9b17a80f 100644 --- a/includes/module/preference/AbstractPreference.php +++ b/includes/module/preference/AbstractPreference.php @@ -316,7 +316,7 @@ public function getCustomerEmail() public function getCustomCustomerData($cart) { $customer = Context::getContext()->customer; - if ( !(empty($customer->firstname) && empty($customer->lastname)) ) { + if (!(empty($customer->firstname) && empty($customer->lastname))) { $customer_fields = $customer->getFields(); $address_invoice = new Address((int) $cart->id_address_invoice); diff --git a/includes/module/preference/AbstractStandardPreference.php b/includes/module/preference/AbstractStandardPreference.php index 6649cd35..12f259e1 100644 --- a/includes/module/preference/AbstractStandardPreference.php +++ b/includes/module/preference/AbstractStandardPreference.php @@ -109,7 +109,7 @@ function ($accumulator, $item) { public function getCustomerData($cart) { $customer = Context::getContext()->customer; - if ( !(empty($customer->firstname) && empty($customer->lastname)) ) { + if (!(empty($customer->firstname) && empty($customer->lastname))) { $customerFields = $customer->getFields(); $addressInvoice = new Address((int) $cart->id_address_invoice); diff --git a/views/templates/hook/six/standard.tpl b/views/templates/hook/six/standard.tpl index 7c6f0513..da090947 100644 --- a/views/templates/hook/six/standard.tpl +++ b/views/templates/hook/six/standard.tpl @@ -91,12 +91,16 @@ {/if} + + {if $modal == true}