From 96d14e3a08868ffa36da26f437804e9883789996 Mon Sep 17 00:00:00 2001 From: Edgaras Date: Fri, 20 Sep 2024 19:58:19 +0300 Subject: [PATCH] Release 3.1.3 --- README.md | 8 + assets/css/admin.css | 32 +- assets/css/checkout.css | 14 +- assets/js/admin/management.js | 58 +- assets/js/frontend/blocks/README.md | 4 +- .../js/frontend/blocks/build/index.asset.php | 2 +- assets/js/frontend/blocks/build/index.js | 2 +- assets/js/frontend/blocks/package-lock.json | 5077 +++++++---------- assets/js/frontend/blocks/package.json | 3 +- assets/js/frontend/blocks/webpack.config.js | 83 +- assets/js/frontend/checkout.js | 108 +- changelog.txt | 40 +- .../admin/class-wc-wallee-admin-document.php | 42 +- .../admin/class-wc-wallee-admin-notices.php | 17 +- ...class-wc-wallee-admin-order-completion.php | 52 +- .../class-wc-wallee-admin-order-void.php | 30 +- .../admin/class-wc-wallee-admin-refund.php | 75 +- .../class-wc-wallee-admin-settings-page.php | 213 +- .../class-wc-wallee-admin-transaction.php | 77 +- includes/admin/class-wc-wallee-admin.php | 98 +- includes/class-wc-wallee-autoloader.php | 36 +- includes/class-wc-wallee-blocks-support.php | 174 +- includes/class-wc-wallee-cron.php | 17 +- .../class-wc-wallee-customer-document.php | 40 +- includes/class-wc-wallee-download-helper.php | 27 +- includes/class-wc-wallee-email.php | 92 +- includes/class-wc-wallee-gateway.php | 212 +- includes/class-wc-wallee-helper.php | 144 +- includes/class-wc-wallee-integration.php | 19 +- includes/class-wc-wallee-migration.php | 479 +- includes/class-wc-wallee-order-reference.php | 20 +- includes/class-wc-wallee-return-handler.php | 33 +- includes/class-wc-wallee-unique-id.php | 21 +- includes/class-wc-wallee-webhook-handler.php | 62 +- .../class-wc-wallee-entity-abstract.php | 59 +- ...ass-wc-wallee-entity-attribute-options.php | 36 +- .../class-wc-wallee-entity-completion-job.php | 55 +- ...-wc-wallee-entity-method-configuration.php | 55 +- .../class-wc-wallee-entity-refund-job.php | 93 +- .../class-wc-wallee-entity-resource-type.php | 23 +- .../class-wc-wallee-entity-token-info.php | 33 +- ...lass-wc-wallee-entity-transaction-info.php | 67 +- .../class-wc-wallee-entity-void-job.php | 65 +- ...e-exception-invalid-transaction-amount.php | 12 +- ...ass-wc-wallee-packages-coupon-discount.php | 119 +- .../class-wc-wallee-provider-abstract.php | 13 +- .../class-wc-wallee-provider-currency.php | 17 +- ...allee-provider-label-description-group.php | 17 +- ...s-wc-wallee-provider-label-description.php | 17 +- .../class-wc-wallee-provider-language.php | 17 +- ...s-wc-wallee-provider-payment-connector.php | 17 +- ...lass-wc-wallee-provider-payment-method.php | 17 +- .../class-wc-wallee-service-abstract.php | 31 +- .../class-wc-wallee-service-line-item.php | 203 +- .../class-wc-wallee-service-manual-task.php | 19 +- ...wc-wallee-service-method-configuration.php | 29 +- .../class-wc-wallee-service-refund.php | 31 +- .../service/class-wc-wallee-service-token.php | 11 +- .../class-wc-wallee-service-transaction.php | 273 +- .../class-wc-wallee-service-webhook.php | 107 +- .../class-wc-wallee-webhook-abstract.php | 16 +- ...-wc-wallee-webhook-delivery-indication.php | 24 +- .../class-wc-wallee-webhook-entity.php | 12 +- .../class-wc-wallee-webhook-manual-task.php | 14 +- ...wc-wallee-webhook-method-configuration.php | 14 +- ...-wallee-webhook-order-related-abstract.php | 22 +- .../class-wc-wallee-webhook-refund.php | 30 +- .../class-wc-wallee-webhook-request.php | 39 +- .../class-wc-wallee-webhook-token-version.php | 14 +- .../webhook/class-wc-wallee-webhook-token.php | 14 +- ...-wallee-webhook-transaction-completion.php | 48 +- ...-wc-wallee-webhook-transaction-invoice.php | 28 +- ...ass-wc-wallee-webhook-transaction-void.php | 75 +- .../class-wc-wallee-webhook-transaction.php | 38 +- ...e-webhook-delivery-indication-strategy.php | 112 + ...wc-wallee-webhook-manual-task-strategy.php | 53 + ...-webhook-method-configuration-strategy.php | 53 + ...lass-wc-wallee-webhook-refund-strategy.php | 156 + .../class-wc-wallee-webhook-strategy-base.php | 68 + ...s-wc-wallee-webhook-strategy-interface.php | 45 + ...ass-wc-wallee-webhook-strategy-manager.php | 162 + ...class-wc-wallee-webhook-token-strategy.php | 54 + ...-wallee-webhook-token-version-strategy.php | 54 + ...ebhook-transaction-completion-strategy.php | 284 + ...e-webhook-transaction-invoice-strategy.php | 104 + ...wc-wallee-webhook-transaction-strategy.php | 203 + ...llee-webhook-transaction-void-strategy.php | 161 + languages/woo-wallee-de_DE.mo | Bin 15091 -> 15302 bytes languages/woo-wallee-de_DE.po | 4 + languages/woo-wallee.pot | 6 +- readme.txt | 30 +- views/admin-notices/manual-tasks.php | 11 +- views/admin-notices/migration-failed.php | 9 +- views/admin-notices/plugin-deactivated.php | 8 +- .../admin-notices/round-subtotal-warning.php | 9 +- woocommerce-wallee.php | 544 +- 96 files changed, 6473 insertions(+), 4892 deletions(-) create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-delivery-indication-strategy.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-manual-task-strategy.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-method-configuration-strategy.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-refund-strategy.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-strategy-base.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-strategy-interface.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-strategy-manager.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-token-strategy.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-token-version-strategy.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-transaction-completion-strategy.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-transaction-invoice-strategy.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-transaction-strategy.php create mode 100644 includes/webhook/strategies/class-wc-wallee-webhook-transaction-void-strategy.php diff --git a/README.md b/README.md index 8518896..582eb80 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,11 @@ ____________________________________________________________________________ ## License Please see the [license file](https://github.com/wallee-payment/woocommerce/blob/3.1.3/LICENSE) for more information. + +## Privacy Policy + +Please see the [wallee privacy policies site](https://en.wallee.com/legal/privacy-policy) for more information. + +## Terms of Use + +Please see the [wallee terms of use site](https://en.wallee.com/legal/agb) for more information. diff --git a/assets/css/admin.css b/assets/css/admin.css index a31c317..3e65424 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1,22 +1,28 @@ /** - * wallee WooCommerce + * Plugin Name: Wallee + * Author: wallee AG + * Text Domain: wallee + * Domain Path: /languages/ * - * This WooCommerce plugin enables to process payments with wallee (https://www.wallee.com). + * Wallee + * This plugin will add support for all Wallee payments methods and connect the Wallee servers to your WooCommerce webshop (https://www.wallee.com). * - * @author wallee AG (https://www.wallee.com) - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Software License (ASL 2.0) + * @category Class + * @package Wallee + * @author wallee AG (https://www.wallee.com) + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Software License (ASL 2.0) */ /* Icons for status */ @font-face { - font-family: 'woocommerce-wallee'; - src: url('../font/woocommerce-wallee.eot?8310684'); - src: url('../font/woocommerce-wallee.eot?8310684#iefix') format('embedded-opentype'), - url('../font/woocommerce-wallee.woff2?8310684') format('woff2'), - url('../font/woocommerce-wallee.woff?8310684') format('woff'), - url('../font/woocommerce-wallee.ttf?8310684') format('truetype'), - url('../font/woocommerce-wallee.svg?8310684#woocommerce-wallee') format('svg'); - font-weight: normal; - font-style: normal; + font-family: 'woocommerce-wallee'; + src: url('../font/woocommerce-wallee.eot?8310684'); + src: url('../font/woocommerce-wallee.eot?8310684#iefix') format('embedded-opentype'), + url('../font/woocommerce-wallee.woff2?8310684') format('woff2'), + url('../font/woocommerce-wallee.woff?8310684') format('woff'), + url('../font/woocommerce-wallee.ttf?8310684') format('truetype'), + url('../font/woocommerce-wallee.svg?8310684#woocommerce-wallee') format('svg'); + font-weight: normal; + font-style: normal; } /* Status Icons */ diff --git a/assets/css/checkout.css b/assets/css/checkout.css index cf41b59..bad821f 100644 --- a/assets/css/checkout.css +++ b/assets/css/checkout.css @@ -1,10 +1,16 @@ /** - * wallee WooCommerce + * Plugin Name: Wallee + * Author: wallee AG + * Text Domain: wallee + * Domain Path: /languages/ * - * This WooCommerce plugin enables to process payments with wallee (https://www.wallee.com). + * Wallee + * This plugin will add support for all Wallee payments methods and connect the Wallee servers to your WooCommerce webshop (https://www.wallee.com). * - * @author wallee AG (https://www.wallee.com) - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Software License (ASL 2.0) + * @category Class + * @package Wallee + * @author wallee AG (https://www.wallee.com) + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Software License (ASL 2.0) */ /* Order button disabled */ #place_order.wallee-disabled{ diff --git a/assets/js/admin/management.js b/assets/js/admin/management.js index c29c7c3..b712b0c 100644 --- a/assets/js/admin/management.js +++ b/assets/js/admin/management.js @@ -9,11 +9,11 @@ */ jQuery( - function($) { + function ($) { var wc_wallee_management = { - init : function() { + init : function () { this.handle_refund_button(); this.show_refund_states(); $( '#woocommerce-order-items' ).off( 'click.woo-wallee' ); @@ -83,17 +83,17 @@ jQuery( ); }, - handle_refund_button : function() { + handle_refund_button : function () { if ($( 'span#wallee-remove-refund' ).length > 0) { $( 'div.wc-order-bulk-actions' ).find( 'button.refund-items' ) .remove(); } }, - show_refund_states : function() { + show_refund_states : function () { $( 'tbody#order_refunds div.wallee-refund-status' ) .each( - function() { + function () { var id = $( this ).data( 'refund-id' ); var state = $( this ).data( 'refund-state' ); var refund_thumb = $( @@ -114,7 +114,7 @@ jQuery( }, - show_completion : function(event) { + show_completion : function (event) { var self = event.data.self; $( 'div.refund-actions' ).children().remove(); @@ -122,7 +122,7 @@ jQuery( $( 'div.wc-order-add-item' ).children( 'button.wallee-completion-button' ).each( - function(key, value) { + function (key, value) { $( value ).show(); $( 'div.refund-actions' ).prepend( $( value ) ); } @@ -180,7 +180,7 @@ jQuery( $( 'div.wc-order-refund-items' ).slideDown(); $( 'div.wc-order-item-bulk-edit' ).remove(); $( '#woocommerce-order-items' ).find( 'input.quantity' ).each( - function() { + function () { $( this ).closest( 'td.quantity' ).find( 'input.refund_order_item_qty' ).val( @@ -190,7 +190,7 @@ jQuery( ) $( '#woocommerce-order-items' ).find( 'input.line_total' ).each( - function() { + function () { $( this ).closest( 'td.line_cost' ).find( 'input.refund_line_total' @@ -212,7 +212,7 @@ jQuery( } ) $( '#woocommerce-order-items' ).find( 'input.line_tax' ).each( - function() { + function () { $( this ).closest( 'td.line_tax' ).find( 'input.refund_line_tax' @@ -246,20 +246,20 @@ jQuery( return false; }, - cancel_completion : function() { + cancel_completion : function () { location.reload(); return false; }, - update_taxes_for_line_items : function() { + update_taxes_for_line_items : function () { var initial_amount = $( this ).data( 'wallee-initial-amount' ); var current_amount = $( this ).val(); $( this ) .closest( 'tr' ) .find( 'input.refund_line_tax' ) .each( - function() { + function () { var initial_tax = $( this ).data( 'wallee-initial-tax' ); @@ -288,7 +288,7 @@ jQuery( ); }, - execute_completion : function() { + execute_completion : function () { $( '#woocommerce-order-items' ).block( { @@ -309,7 +309,7 @@ jQuery( var refund_amount = $( 'input#refund_amount' ).val(); $( '.refund input.refund_order_item_qty' ).each( - function(index, item) { + function (index, item) { if ($( item ).closest( 'tr' ).data( 'order_item_id' )) { if (item.value) { line_item_qtys[$( item ).closest( 'tr' ).data( @@ -321,7 +321,7 @@ jQuery( ); $( '.refund input.refund_line_total' ) .each( - function(index, item) { + function (index, item) { if ($( item ).closest( 'tr' ).data( 'order_item_id' )) { @@ -336,7 +336,7 @@ jQuery( ); $( '.refund input.refund_line_tax' ) .each( - function(index, item) { + function (index, item) { if ($( item ).closest( 'tr' ).data( 'order_item_id' )) { @@ -385,8 +385,7 @@ jQuery( $.post( woocommerce_admin_meta_boxes.ajax_url, data, - function( - response) { + function ( response ) { if (true === response.success) { window.alert( response.data.message ); @@ -407,13 +406,13 @@ jQuery( return false; }, - show_void : function() { + show_void : function () { $( 'div.refund-actions' ).children().remove(); $( 'div.wc-order-add-item' ).children( 'button.wallee-void-button' ) .each( - function(key, value) { + function (key, value) { $( value ).show(); $( 'div.refund-actions' ).prepend( $( value ) ); } @@ -458,13 +457,13 @@ jQuery( return false; }, - cancel_void : function() { + cancel_void : function () { location.reload(); return false; }, - execute_void : function() { + execute_void : function () { $( '#woocommerce-order-items' ).block( { @@ -489,8 +488,7 @@ jQuery( $.post( woocommerce_admin_meta_boxes.ajax_url, data, - function( - response) { + function ( response ) { if (true === response.success) { window.alert( response.data.message ); @@ -508,7 +506,7 @@ jQuery( return false; }, - update_order : function() { + update_order : function () { $( '#woocommerce-order-items' ).block( { @@ -529,7 +527,7 @@ jQuery( $.post( woocommerce_admin_meta_boxes.ajax_url, data, - function(response) { + function (response) { if (true === response.success) { window.location.href = window.location.href; @@ -543,11 +541,11 @@ jQuery( return false; }, - restrict_refund_inputs : function(event) { + restrict_refund_inputs : function (event) { var self = event.data.self; $( '#woocommerce-order-items' ).find( 'input.line_total' ).each( - function() { + function () { $( this ).closest( 'td.line_cost' ).find( 'input.refund_line_total' @@ -566,7 +564,7 @@ jQuery( } ) $( '#woocommerce-order-items' ).find( 'input.line_tax' ).each( - function() { + function () { $( this ).closest( 'td.line_tax' ).find( 'input.refund_line_tax' diff --git a/assets/js/frontend/blocks/README.md b/assets/js/frontend/blocks/README.md index 97d07d5..0e93e22 100644 --- a/assets/js/frontend/blocks/README.md +++ b/assets/js/frontend/blocks/README.md @@ -39,10 +39,12 @@ How to modify this project ========================== If you need to modify the source code of this project, you need to build the project. Everything needed is already configured in the package.json file. -If you have not done it before, you need to fist install the dependencies needed by the project by running: +If you have not done it before, you need to first install the dependencies needed by the project by running: `npm install` +Please notice that you need at least npm version 10 or up. + After you have saved your changes, build the project by running: `npm run build` diff --git a/assets/js/frontend/blocks/build/index.asset.php b/assets/js/frontend/blocks/build/index.asset.php index 1d1fbd0..1a75397 100644 --- a/assets/js/frontend/blocks/build/index.asset.php +++ b/assets/js/frontend/blocks/build/index.asset.php @@ -1 +1 @@ - array('@woocommerce/blocks-registry', 'react', 'wp-polyfill'), 'version' => '62bb6a74015c35f7df1a'); + array('@woocommerce/blocks-registry', 'react', 'wp-polyfill'), 'version' => '7f92f9325421ea216f54'); diff --git a/assets/js/frontend/blocks/build/index.js b/assets/js/frontend/blocks/build/index.js index c4f8c62..e33f2eb 100644 --- a/assets/js/frontend/blocks/build/index.js +++ b/assets/js/frontend/blocks/build/index.js @@ -1 +1 @@ -(()=>{"use strict";const e=window.React,t=function({paymentMethodConfigurationId:t,eventRegistration:n}){const{onCheckoutSuccess:o,onCheckoutValidation:i}=n,[r,a]=(0,e.useState)(!0),c=`payment-method-${t}`;let s=window.IframeCheckoutHandler(t);const l=(0,e.useCallback)((()=>{s.create(c),a(!1)}),[t,c]);return(0,e.useEffect)((()=>{document.getElementById(c)&&l();const e=o((()=>new Promise((e=>{s.submit(),setTimeout((function(){e(!1)}),3e4)})))),t=i((()=>{let e=new Promise((e=>{s.setValidationCallback((t=>{void 0!==t.success?e(t.success):(console.error("Validation was not successful"),e(!1))}))}));return s.validate(),e}));return()=>{e(),t()}}),[l,c,o,i]),(0,e.createElement)("div",null,r&&(0,e.createElement)("div",null,"Loading payment method..."),(0,e.createElement)("div",{id:c}))},n=function({paymentMethodConfigurationId:t,eventRegistration:n}){const{onCheckoutSuccess:o}=n;(0,e.useEffect)((()=>{const e=o((()=>new Promise(((e,n)=>{window.LightboxCheckoutHandler.startPayment(t,(function(t,o){!t||t.error?n(t):e(t)}))})).catch((e=>{console.error(e),alert("An error occurred during the initialization of the payment lightbox.")}))));return()=>{e()}}),[o,t])};function o({label:t,src:n,alt:o,width:i}){return(0,e.createElement)("div",null," ",t," ",(0,e.createElement)("img",{src:n,alt:o,width:i})," ")}const i=window.wc.wcBlocksRegistry;jQuery((function(r){const a=wp.apiFetch.nonceEndpoint;r.post(a,{action:"get_payment_methods"},(function(c){c.map((function(c){let s;s="iframe"===c.integration_mode?(0,e.createElement)(t,{paymentMethodConfigurationId:c.configuration_id}):(0,e.createElement)(n,{paymentMethodConfigurationId:c.configuration_id});let l=function(e){const t=e.match(/src="([^"]+)"/),n=e.match(/alt="([^"]*)"/),o=e.match(/width="([^"]+)"/);return{src:t?t[1]:"",alt:n?n[1]:"",width:o?o[1]:""}}(c.icon),u={name:c.name,label:(0,e.createElement)(o,{label:c.label,...l}),content:s,edit:(0,e.createElement)("div",null,c.description),ariaLabel:c.ariaLabel,supports:{features:c.supports},canMakePayment:async e=>{let t=(e=>{const t=JSON.stringify(e);let n=0;for(let e=0;e{const t=sessionStorage.getItem(e);if(!t)return null;const n=JSON.parse(t);return(new Date).getTime()>n.expiry?(sessionStorage.removeItem(e),null):n.value})(n);if("iframe"===c.integration_mode){let e=document.getElementById("paymentForm_"+c.configuration_id);e&&(e.src=e.src)}return null!==o?o:await async function(){try{return new Promise(((e,t)=>{r.post(a,{action:"is_payment_method_available",payment_method:c.name,configuration_id:c.configuration_id},(function(t){((e,t,n)=>{const o={value:t,expiry:(new Date).getTime()+36e5};sessionStorage.setItem(e,JSON.stringify(o))})(n,t),e(t)})).fail((function(e){t(!1)}))}))}catch(e){return console.error("Error:",e),!1}}()}};(0,i.registerPaymentMethod)(u)}))})).fail((function(e){console.error("Error getting payment methods. ",e)}))}))})(); \ No newline at end of file +(()=>{"use strict";const e=window.React,t=function({paymentMethodConfigurationId:t,eventRegistration:n}){const{onCheckoutSuccess:o,onCheckoutValidation:i}=n,[a,r]=(0,e.useState)(!0),c=`payment-method-${t}`;let s=window.IframeCheckoutHandler(t);const l=(0,e.useCallback)((()=>{s.create(c),r(!1)}),[t,c]);return(0,e.useEffect)((()=>{document.getElementById(c)&&l();const e=o((()=>new Promise((e=>{s.submit(),setTimeout((function(){e(!1)}),3e4)})))),t=i((()=>{let e=new Promise((e=>{s.setValidationCallback((t=>{void 0!==t.success?e(t.success):(console.error("Validation was not successful"),e(!1))}))}));return s.validate(),e}));return()=>{e(),t()}}),[l,c,o,i]),(0,e.createElement)("div",null,a&&(0,e.createElement)("div",null,"Loading payment method..."),(0,e.createElement)("div",{id:c}))},n=function({paymentMethodConfigurationId:t,eventRegistration:n}){const{onCheckoutSuccess:o}=n;(0,e.useEffect)((()=>{const e=o((()=>new Promise(((e,n)=>{window.LightboxCheckoutHandler.startPayment(t,(function(t,o){!t||t.error?n(t):e(t)}))})).catch((e=>{console.error(e),alert("An error occurred during the initialization of the payment lightbox.")}))));return()=>{e()}}),[o,t])};function o({label:t,src:n,alt:o,width:i}){return(0,e.createElement)("div",null," ",t," ",(0,e.createElement)("img",{src:n,alt:o,width:i})," ")}const i=window.wc.wcBlocksRegistry;jQuery((function(a){const r=e=>{const t=JSON.stringify(e);let n=0;for(let e=0;e{let t=r(e),n=l.name+"-"+l.configuration_id+"-"+t,o=(e=>{const t=sessionStorage.getItem(e);if(!t)return null;const n=JSON.parse(t);return(new Date).getTime()>n.expiry?(sessionStorage.removeItem(e),null):n.value})(n);if("iframe"===l.integration_mode){let e=document.getElementById("paymentForm_"+l.configuration_id);e&&(e.src=e.src)}return null!==o?o:await async function(){try{return new Promise(((e,t)=>{const o=document.querySelector("#billing-fields"),i={};o&&o.querySelectorAll("input, select").forEach((e=>{i[e.id]=e.value}));const u=r(i);a.post(c,{action:"is_payment_method_available",payment_method:l.name,configuration_id:l.configuration_id,wallee_nonce:s,formHash:u},(function(t){((e,t)=>{const n={value:t,expiry:(new Date).getTime()+36e5};sessionStorage.setItem(e,JSON.stringify(n))})(n,t),e(t)})).fail((function(e){console.error("Error:",e),t(!1)}))}))}catch(e){return console.error("Error:",e),!1}}()}};(0,i.registerPaymentMethod)(d)}))})).fail((function(e){console.error("Error getting payment methods. ",e)}))}))})(); \ No newline at end of file diff --git a/assets/js/frontend/blocks/package-lock.json b/assets/js/frontend/blocks/package-lock.json index 864d4fb..144e731 100644 --- a/assets/js/frontend/blocks/package-lock.json +++ b/assets/js/frontend/blocks/package-lock.json @@ -9,73 +9,65 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "react": "^18.2.0" + "react": "^18.2.0", + "util": "^0.12.5" }, "devDependencies": { "@woocommerce/eslint-plugin": "^2.2.0", "@wordpress/scripts": "^25.3.0" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", - "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.4.tgz", + "integrity": "sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz", - "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz", + "integrity": "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.7", - "@babel/parser": "^7.23.6", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-module-transforms": "^7.25.2", + "@babel/helpers": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.2", + "@babel/types": "^7.25.2", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -91,9 +83,9 @@ } }, "node_modules/@babel/eslint-parser": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.23.3.tgz", - "integrity": "sha512-9bTuNlyx7oSstodm1cR1bECj4fkiknsDa1YniISkJemMY3DGhJNYBECbe6QD/q54mp2J8VO66jW3/7uP//iFCw==", + "version": "7.25.1", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.25.1.tgz", + "integrity": "sha512-Y956ghgTT4j7rKesabkh5WeqgSFZVFwaPR0IWFm7KFHFmmJ4afbG49SmfW4S+GyRPx0Dy5jxEWA5t0rpxfElWg==", "dev": true, "dependencies": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", @@ -105,7 +97,7 @@ }, "peerDependencies": { "@babel/core": "^7.11.0", - "eslint": "^7.5.0 || ^8.0.0" + "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys": { @@ -118,14 +110,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.6.tgz", + "integrity": "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==", "dev": true, "dependencies": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", + "@babel/types": "^7.25.6", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -133,38 +125,39 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", - "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", + "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz", - "integrity": "sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz", + "integrity": "sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA==", "dev": true, "dependencies": { - "@babel/types": "^7.22.15" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", - "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz", + "integrity": "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", - "browserslist": "^4.22.2", + "@babel/compat-data": "^7.25.2", + "@babel/helper-validator-option": "^7.24.8", + "browserslist": "^4.23.1", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -173,19 +166,17 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.7.tgz", - "integrity": "sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-member-expression-to-functions": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.4.tgz", + "integrity": "sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-member-expression-to-functions": "^7.24.8", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/helper-replace-supers": "^7.25.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/traverse": "^7.25.4", "semver": "^6.3.1" }, "engines": { @@ -196,12 +187,12 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz", - "integrity": "sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.2.tgz", + "integrity": "sha512-+wqVGP+DFmqwFD3EH6TMTfUNeqDehV3E/dl+Sd54eaXqm17tEUNbEIn4sVivVowbvUpOtIGxdo3GoXyDH9N/9g==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-annotate-as-pure": "^7.24.7", "regexpu-core": "^5.3.1", "semver": "^6.3.1" }, @@ -213,9 +204,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", - "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", + "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", "dev": true, "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", @@ -228,75 +219,42 @@ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", - "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz", + "integrity": "sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==", "dev": true, "dependencies": { - "@babel/types": "^7.23.0" + "@babel/traverse": "^7.24.8", + "@babel/types": "^7.24.8" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", "dev": true, "dependencies": { - "@babel/types": "^7.22.15" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz", + "integrity": "sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.2" }, "engines": { "node": ">=6.9.0" @@ -306,35 +264,35 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", - "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", + "integrity": "sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", + "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz", - "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.0.tgz", + "integrity": "sha512-NhavI2eWEIz/H9dbrG0TuOicDhNexze43i5z7lEqwYm0WEZVTwnPpA0EafUTP7+6/W79HWIP2cTe3Z5NiSTVpw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-wrap-function": "^7.22.20" + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-wrap-function": "^7.25.0", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -344,14 +302,14 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", - "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.0.tgz", + "integrity": "sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.22.15", - "@babel/helper-optimise-call-expression": "^7.22.5" + "@babel/helper-member-expression-to-functions": "^7.24.8", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -361,115 +319,108 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", - "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", + "integrity": "sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", - "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", + "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz", - "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.0.tgz", + "integrity": "sha512-s6Q1ebqutSiZnEjaofc/UKDyC4SbzV5n5SrA2Gq8UawLycr3i04f1dX4OzoQVnexm6aOCh37SQNYlJ/8Ku+PMQ==", "dev": true, "dependencies": { - "@babel/helper-function-name": "^7.22.5", - "@babel/template": "^7.22.15", - "@babel/types": "^7.22.19" + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.8.tgz", - "integrity": "sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.6.tgz", + "integrity": "sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==", "dev": true, "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6" + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", - "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz", + "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", "dev": true, + "dependencies": { + "@babel/types": "^7.25.6" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -477,13 +428,44 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.25.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.3.tgz", + "integrity": "sha512-wUrcsxZg6rqBXG05HG1FPYgsP6EvwF4WpBbxIpWIIYnH8wG0gzx3yZY3dtEHas4sTAOGkbTsc9EGPxwff8lRoA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/traverse": "^7.25.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.0.tgz", + "integrity": "sha512-Bm4bH2qsX880b/3ziJ8KD711LT7z4u8CFudmjqle65AZj/HNUFhEf90dqYv6O86buWvSBmeQDjv0Tn2aF/bIBA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz", - "integrity": "sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.0.tgz", + "integrity": "sha512-lXwdNZtTmeVOOFtwM/WDe7yg1PL8sYhRk/XH0FzbR2HDQ0xC+EnQ/JHeoMYSavtU115tnUk0q9CDyq8si+LMAA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -493,14 +475,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.23.3.tgz", - "integrity": "sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz", + "integrity": "sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.23.3" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -510,13 +492,13 @@ } }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.7.tgz", - "integrity": "sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.0.tgz", + "integrity": "sha512-tggFrk1AIShG/RUQbEwt2Tr/E+ObkfwrPjR6BjbRvsx24+PSjK8zrq0GWPNCjo8qpRx4DuJzlcvWJqlm+0h3kw==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -613,12 +595,12 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.23.3.tgz", - "integrity": "sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.6.tgz", + "integrity": "sha512-aABl0jHw9bZ2karQ/uUD6XP4u0SG22SJrOHFoL6XB1R7dTovOP4TzTlsxOYC5yQ1pdscVK2JTUnF6QL3ARoAiQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -628,12 +610,12 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.23.3.tgz", - "integrity": "sha512-pawnE0P9g10xgoP7yKr6CK63K2FMsTE+FZidZO/1PwRdzmAPVs+HS1mAURUsgaoxammTJvULUdIkEK0gOcU2tA==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz", + "integrity": "sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -667,12 +649,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", - "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -784,12 +766,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", - "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.4.tgz", + "integrity": "sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -815,12 +797,12 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz", - "integrity": "sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz", + "integrity": "sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -830,15 +812,15 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.7.tgz", - "integrity": "sha512-PdxEpL71bJp1byMG0va5gwQcXHxuEYC/BgI/e88mGTtohbZN28O5Yit0Plkkm/dBzCF/BxmbNcses1RH1T+urA==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.4.tgz", + "integrity": "sha512-jz8cV2XDDTqjKPwVPJBIjORVEmSGYhdRa8e5k5+vN+uwcjSrSxUaebBRa4ko1jqNF2uxyg8G6XYk30Jv285xzg==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.20", - "@babel/plugin-syntax-async-generators": "^7.8.4" + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-remap-async-to-generator": "^7.25.0", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/traverse": "^7.25.4" }, "engines": { "node": ">=6.9.0" @@ -848,14 +830,14 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz", - "integrity": "sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.7.tgz", + "integrity": "sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.20" + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-remap-async-to-generator": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -865,12 +847,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz", - "integrity": "sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz", + "integrity": "sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -880,12 +862,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz", - "integrity": "sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.0.tgz", + "integrity": "sha512-yBQjYoOjXlFv9nlXb3f1casSHOZkWr29NX+zChVanLg5Nc157CrbEX9D7hxxtTpuFy7Q0YzmmWfJxzvps4kXrQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -895,13 +877,13 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.23.3.tgz", - "integrity": "sha512-uM+AN8yCIjDPccsKGlw271xjJtGii+xQIF/uMPS8H15L12jZTsLfF4o5vNO7d/oUguOyfdikHGc/yi9ge4SGIg==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.4.tgz", + "integrity": "sha512-nZeZHyCWPfjkdU5pA/uHiTaDAFUEqkpzf1YoQT2NeSynCGYq9rxfyI3XpQbfx/a0hSnFH6TGlEXvae5Vi7GD8g==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-class-features-plugin": "^7.25.4", + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -911,13 +893,13 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz", - "integrity": "sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz", + "integrity": "sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, "engines": { @@ -928,18 +910,16 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.8.tgz", - "integrity": "sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.4.tgz", + "integrity": "sha512-oexUfaQle2pF/b6E0dwsxQtAol9TLSO88kQvym6HHBWFliV2lGdrPieX+WgMRLSJDVzdYywk7jXbLPuO2KLTLg==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", - "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-replace-supers": "^7.25.0", + "@babel/traverse": "^7.25.4", "globals": "^11.1.0" }, "engines": { @@ -950,13 +930,13 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz", - "integrity": "sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz", + "integrity": "sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/template": "^7.22.15" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/template": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -966,12 +946,12 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz", - "integrity": "sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.8.tgz", + "integrity": "sha512-36e87mfY8TnRxc7yc6M9g9gOB7rKgSahqkIKwLpz4Ppk2+zC2Cy1is0uwtuSG6AE4zlTOUa+7JGz9jCJGLqQFQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -981,13 +961,13 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.23.3.tgz", - "integrity": "sha512-vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz", + "integrity": "sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -997,12 +977,12 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.23.3.tgz", - "integrity": "sha512-RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz", + "integrity": "sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1011,13 +991,29 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.0.tgz", + "integrity": "sha512-YLpb4LlYSc3sCUa35un84poXoraOiQucUTTu8X1j18JV+gNa8E0nyUf/CjZ171IRGr4jEguF+vzJU66QZhn29g==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.0", + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz", - "integrity": "sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz", + "integrity": "sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { @@ -1028,13 +1024,13 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz", - "integrity": "sha512-5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz", + "integrity": "sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ==", "dev": true, "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1044,12 +1040,12 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz", - "integrity": "sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz", + "integrity": "sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { @@ -1060,13 +1056,13 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz", - "integrity": "sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz", + "integrity": "sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1076,14 +1072,14 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz", - "integrity": "sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw==", + "version": "7.25.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.1.tgz", + "integrity": "sha512-TVVJVdW9RKMNgJJlLtHsKDTydjZAbwIsn6ySBPQaEAUU5+gVvlJt/9nRmqVbsV/IBanRjzWoaAQKLoamWVOUuA==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-compilation-targets": "^7.24.8", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/traverse": "^7.25.1" }, "engines": { "node": ">=6.9.0" @@ -1093,12 +1089,12 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz", - "integrity": "sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz", + "integrity": "sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { @@ -1109,12 +1105,12 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz", - "integrity": "sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.2.tgz", + "integrity": "sha512-HQI+HcTbm9ur3Z2DkO+jgESMAMcYLuN/A7NRw9juzxAezN9AvqvUTnpKP/9kkYANz6u7dFlAyOu44ejuGySlfw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1124,12 +1120,12 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz", - "integrity": "sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz", + "integrity": "sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { @@ -1140,12 +1136,12 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz", - "integrity": "sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz", + "integrity": "sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1155,13 +1151,13 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.3.tgz", - "integrity": "sha512-vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz", + "integrity": "sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1171,14 +1167,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz", - "integrity": "sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz", + "integrity": "sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5" + "@babel/helper-module-transforms": "^7.24.8", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-simple-access": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1188,15 +1184,15 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.3.tgz", - "integrity": "sha512-ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.0.tgz", + "integrity": "sha512-YPJfjQPDXxyQWg/0+jHKj1llnY5f/R6a0p/vP4lPymxLu7Lvl4k2WMitqi08yxwQcCVUUdG9LCUj4TNEgAp3Jw==", "dev": true, "dependencies": { - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-transforms": "^7.25.0", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -1206,13 +1202,13 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.23.3.tgz", - "integrity": "sha512-zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz", + "integrity": "sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1222,13 +1218,13 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", - "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz", + "integrity": "sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1238,12 +1234,12 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.23.3.tgz", - "integrity": "sha512-YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz", + "integrity": "sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1253,12 +1249,12 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz", - "integrity": "sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz", + "integrity": "sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { @@ -1269,12 +1265,12 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz", - "integrity": "sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz", + "integrity": "sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { @@ -1285,16 +1281,15 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz", - "integrity": "sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz", + "integrity": "sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.23.3", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.23.3" + "@babel/plugin-transform-parameters": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1304,13 +1299,13 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz", - "integrity": "sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz", + "integrity": "sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-replace-supers": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1320,12 +1315,12 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz", - "integrity": "sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz", + "integrity": "sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { @@ -1336,13 +1331,13 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz", - "integrity": "sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.8.tgz", + "integrity": "sha512-5cTOLSMs9eypEy8JUVvIKOu6NgvbJMnpG62VpIHrTmROdQ+L5mDAaI40g25k5vXti55JWNX5jCkq3HZxXBQANw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, "engines": { @@ -1353,12 +1348,12 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz", - "integrity": "sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.7.tgz", + "integrity": "sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1368,13 +1363,13 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz", - "integrity": "sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.4.tgz", + "integrity": "sha512-ao8BG7E2b/URaUQGqN3Tlsg+M3KlHY6rJ1O1gXAEUnZoyNQnvKyH87Kfg+FoxSeyWUB8ISZZsC91C44ZuBFytw==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-class-features-plugin": "^7.25.4", + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1384,14 +1379,14 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz", - "integrity": "sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz", + "integrity": "sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { @@ -1402,12 +1397,12 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz", - "integrity": "sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz", + "integrity": "sha512-EMi4MLQSHfd2nrCqQEWxFdha2gBCqU4ZcCng4WBGZ5CJL4bBRW0ptdqqDdeirGZcpALazVVNJqRmsO8/+oNCBA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1417,12 +1412,12 @@ } }, "node_modules/@babel/plugin-transform-react-constant-elements": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.23.3.tgz", - "integrity": "sha512-zP0QKq/p6O42OL94udMgSfKXyse4RyJ0JqbQ34zDAONWjyrEsghYEyTSK5FIpmXmCpB55SHokL1cRRKHv8L2Qw==", + "version": "7.25.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.25.1.tgz", + "integrity": "sha512-SLV/giH/V4SmloZ6Dt40HjTGTAIkxn33TVIHxNGNvo8ezMhrxBkzisj4op1KZYPIOHFLqhv60OHvX+YRu4xbmQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1432,12 +1427,12 @@ } }, "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.23.3.tgz", - "integrity": "sha512-GnvhtVfA2OAtzdX58FJxU19rhoGeQzyVndw3GgtdECQvQFXPEZIOVULHVZGAYmOgmqjXpVpfocAbSjh99V/Fqw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.24.7.tgz", + "integrity": "sha512-H/Snz9PFxKsS1JLI4dJLtnJgCJRoo0AUm3chP6NYr+9En1JMKloheEiLIhlp5MDVznWo+H3AAC1Mc8lmUEpsgg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1447,16 +1442,16 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.23.4.tgz", - "integrity": "sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.2.tgz", + "integrity": "sha512-KQsqEAVBpU82NM/B/N9j9WOdphom1SZH3R+2V7INrQUH+V9EBFwZsEJl8eBIVeQE62FxJCc70jzEZwqU7RcVqA==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-jsx": "^7.23.3", - "@babel/types": "^7.23.4" + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/plugin-syntax-jsx": "^7.24.7", + "@babel/types": "^7.25.2" }, "engines": { "node": ">=6.9.0" @@ -1466,12 +1461,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-development": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.22.5.tgz", - "integrity": "sha512-bDhuzwWMuInwCYeDeMzyi7TaBgRQei6DqxhbyniL7/VG4RSS7HtSL2QbY4eESy1KJqlWt8g3xeEBGPuo+XqC8A==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.24.7.tgz", + "integrity": "sha512-QG9EnzoGn+Qar7rxuW+ZOsbWOt56FvvI93xInqsZDC5fsekx1AlIO4KIJ5M+D0p0SqSH156EpmZyXq630B8OlQ==", "dev": true, "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.22.5" + "@babel/plugin-transform-react-jsx": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1481,13 +1476,13 @@ } }, "node_modules/@babel/plugin-transform-react-pure-annotations": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.23.3.tgz", - "integrity": "sha512-qMFdSS+TUhB7Q/3HVPnEdYJDQIk57jkntAwSuz9xfSE4n+3I+vHYCli3HoHawN1Z3RfCz/y1zXA/JXjG6cVImQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.24.7.tgz", + "integrity": "sha512-PLgBVk3fzbmEjBJ/u8kFzOqS9tUeDjiaWud/rRym/yjCo/M9cASPlnrd2ZmmZpQT40fOOrvR8jh+n8jikrOhNA==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1497,12 +1492,12 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.23.3.tgz", - "integrity": "sha512-KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz", + "integrity": "sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.7", "regenerator-transform": "^0.15.2" }, "engines": { @@ -1513,12 +1508,12 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.23.3.tgz", - "integrity": "sha512-QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz", + "integrity": "sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1528,16 +1523,16 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.7.tgz", - "integrity": "sha512-fa0hnfmiXc9fq/weK34MUV0drz2pOL/vfKWvN7Qw127hiUPabFCUMgAbYWcchRzMJit4o5ARsK/s+5h0249pLw==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.25.4.tgz", + "integrity": "sha512-8hsyG+KUYGY0coX6KUCDancA0Vw225KJ2HJO0yCNr1vq5r+lJTleDaJf0K7iOhjw4SWhu03TMBzYTJ9krmzULQ==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "babel-plugin-polyfill-corejs2": "^0.4.7", - "babel-plugin-polyfill-corejs3": "^0.8.7", - "babel-plugin-polyfill-regenerator": "^0.5.4", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.8", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.10.6", + "babel-plugin-polyfill-regenerator": "^0.6.1", "semver": "^6.3.1" }, "engines": { @@ -1548,12 +1543,12 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz", - "integrity": "sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz", + "integrity": "sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1563,13 +1558,13 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz", - "integrity": "sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz", + "integrity": "sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1579,12 +1574,12 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.23.3.tgz", - "integrity": "sha512-HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz", + "integrity": "sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1594,12 +1589,12 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz", - "integrity": "sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz", + "integrity": "sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1609,12 +1604,12 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz", - "integrity": "sha512-4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.8.tgz", + "integrity": "sha512-adNTUpDCVnmAE58VEqKlAA6ZBlNkMnWD0ZcW76lyNFN3MJniyGFZfNwERVk8Ap56MCnXztmDr19T4mPTztcuaw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1624,15 +1619,16 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.6.tgz", - "integrity": "sha512-6cBG5mBvUu4VUD04OHKnYzbuHNP8huDsD3EDqqpIpsswTDoqHCjLoHb6+QgsV1WsT2nipRqCPgxD3LXnEO7XfA==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.2.tgz", + "integrity": "sha512-lBwRvjSmqiMYe/pS0+1gggjJleUJi7NzjvQ1Fkqtt69hBa/0t1YuW/MLQMAPixfwaQOHUXsd6jeU3Z+vdGv3+A==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.23.6", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-typescript": "^7.23.3" + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-create-class-features-plugin": "^7.25.0", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/plugin-syntax-typescript": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1642,12 +1638,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz", - "integrity": "sha512-OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz", + "integrity": "sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1657,13 +1653,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.23.3.tgz", - "integrity": "sha512-KcLIm+pDZkWZQAFJ9pdfmh89EwVfmNovFBcXko8szpBeF8z68kWIPeKlmSOkT9BXJxs2C0uk+5LxoxIv62MROA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz", + "integrity": "sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1673,13 +1669,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.23.3.tgz", - "integrity": "sha512-wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz", + "integrity": "sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1689,13 +1685,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.23.3.tgz", - "integrity": "sha512-W7lliA/v9bNR83Qc3q1ip9CQMZ09CcHDbHfbLRDNuAhn1Mvkr1ZNF7hPmztMQvtTGVLJ9m8IZqWsTkXOml8dbw==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.4.tgz", + "integrity": "sha512-qesBxiWkgN1Q+31xUE9RcMk79eOXXDCv6tfyGMRSs4RGlioSg2WVyQAm07k726cSE56pa+Kb0y9epX2qaXzTvA==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.25.2", + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1705,26 +1701,28 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.8.tgz", - "integrity": "sha512-lFlpmkApLkEP6woIKprO6DO60RImpatTQKtz4sUcDjVcK8M8mQ4sZsuxaTMNOZf0sqAq/ReYW1ZBHnOQwKpLWA==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.23.5", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.7", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.4.tgz", + "integrity": "sha512-W9Gyo+KmcxjGahtt3t9fb14vFRWvPpu5pT6GBlovAK6BTBcxgjfVMSQCfJl4oi35ODrxP6xx2Wr8LNST57Mraw==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.25.4", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-validator-option": "^7.24.8", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.3", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.0", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.0", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.7", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.0", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.23.3", - "@babel/plugin-syntax-import-attributes": "^7.23.3", + "@babel/plugin-syntax-import-assertions": "^7.24.7", + "@babel/plugin-syntax-import-attributes": "^7.24.7", "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", @@ -1736,59 +1734,60 @@ "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.23.3", - "@babel/plugin-transform-async-generator-functions": "^7.23.7", - "@babel/plugin-transform-async-to-generator": "^7.23.3", - "@babel/plugin-transform-block-scoped-functions": "^7.23.3", - "@babel/plugin-transform-block-scoping": "^7.23.4", - "@babel/plugin-transform-class-properties": "^7.23.3", - "@babel/plugin-transform-class-static-block": "^7.23.4", - "@babel/plugin-transform-classes": "^7.23.8", - "@babel/plugin-transform-computed-properties": "^7.23.3", - "@babel/plugin-transform-destructuring": "^7.23.3", - "@babel/plugin-transform-dotall-regex": "^7.23.3", - "@babel/plugin-transform-duplicate-keys": "^7.23.3", - "@babel/plugin-transform-dynamic-import": "^7.23.4", - "@babel/plugin-transform-exponentiation-operator": "^7.23.3", - "@babel/plugin-transform-export-namespace-from": "^7.23.4", - "@babel/plugin-transform-for-of": "^7.23.6", - "@babel/plugin-transform-function-name": "^7.23.3", - "@babel/plugin-transform-json-strings": "^7.23.4", - "@babel/plugin-transform-literals": "^7.23.3", - "@babel/plugin-transform-logical-assignment-operators": "^7.23.4", - "@babel/plugin-transform-member-expression-literals": "^7.23.3", - "@babel/plugin-transform-modules-amd": "^7.23.3", - "@babel/plugin-transform-modules-commonjs": "^7.23.3", - "@babel/plugin-transform-modules-systemjs": "^7.23.3", - "@babel/plugin-transform-modules-umd": "^7.23.3", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", - "@babel/plugin-transform-new-target": "^7.23.3", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4", - "@babel/plugin-transform-numeric-separator": "^7.23.4", - "@babel/plugin-transform-object-rest-spread": "^7.23.4", - "@babel/plugin-transform-object-super": "^7.23.3", - "@babel/plugin-transform-optional-catch-binding": "^7.23.4", - "@babel/plugin-transform-optional-chaining": "^7.23.4", - "@babel/plugin-transform-parameters": "^7.23.3", - "@babel/plugin-transform-private-methods": "^7.23.3", - "@babel/plugin-transform-private-property-in-object": "^7.23.4", - "@babel/plugin-transform-property-literals": "^7.23.3", - "@babel/plugin-transform-regenerator": "^7.23.3", - "@babel/plugin-transform-reserved-words": "^7.23.3", - "@babel/plugin-transform-shorthand-properties": "^7.23.3", - "@babel/plugin-transform-spread": "^7.23.3", - "@babel/plugin-transform-sticky-regex": "^7.23.3", - "@babel/plugin-transform-template-literals": "^7.23.3", - "@babel/plugin-transform-typeof-symbol": "^7.23.3", - "@babel/plugin-transform-unicode-escapes": "^7.23.3", - "@babel/plugin-transform-unicode-property-regex": "^7.23.3", - "@babel/plugin-transform-unicode-regex": "^7.23.3", - "@babel/plugin-transform-unicode-sets-regex": "^7.23.3", + "@babel/plugin-transform-arrow-functions": "^7.24.7", + "@babel/plugin-transform-async-generator-functions": "^7.25.4", + "@babel/plugin-transform-async-to-generator": "^7.24.7", + "@babel/plugin-transform-block-scoped-functions": "^7.24.7", + "@babel/plugin-transform-block-scoping": "^7.25.0", + "@babel/plugin-transform-class-properties": "^7.25.4", + "@babel/plugin-transform-class-static-block": "^7.24.7", + "@babel/plugin-transform-classes": "^7.25.4", + "@babel/plugin-transform-computed-properties": "^7.24.7", + "@babel/plugin-transform-destructuring": "^7.24.8", + "@babel/plugin-transform-dotall-regex": "^7.24.7", + "@babel/plugin-transform-duplicate-keys": "^7.24.7", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.0", + "@babel/plugin-transform-dynamic-import": "^7.24.7", + "@babel/plugin-transform-exponentiation-operator": "^7.24.7", + "@babel/plugin-transform-export-namespace-from": "^7.24.7", + "@babel/plugin-transform-for-of": "^7.24.7", + "@babel/plugin-transform-function-name": "^7.25.1", + "@babel/plugin-transform-json-strings": "^7.24.7", + "@babel/plugin-transform-literals": "^7.25.2", + "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", + "@babel/plugin-transform-member-expression-literals": "^7.24.7", + "@babel/plugin-transform-modules-amd": "^7.24.7", + "@babel/plugin-transform-modules-commonjs": "^7.24.8", + "@babel/plugin-transform-modules-systemjs": "^7.25.0", + "@babel/plugin-transform-modules-umd": "^7.24.7", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", + "@babel/plugin-transform-new-target": "^7.24.7", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", + "@babel/plugin-transform-numeric-separator": "^7.24.7", + "@babel/plugin-transform-object-rest-spread": "^7.24.7", + "@babel/plugin-transform-object-super": "^7.24.7", + "@babel/plugin-transform-optional-catch-binding": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.8", + "@babel/plugin-transform-parameters": "^7.24.7", + "@babel/plugin-transform-private-methods": "^7.25.4", + "@babel/plugin-transform-private-property-in-object": "^7.24.7", + "@babel/plugin-transform-property-literals": "^7.24.7", + "@babel/plugin-transform-regenerator": "^7.24.7", + "@babel/plugin-transform-reserved-words": "^7.24.7", + "@babel/plugin-transform-shorthand-properties": "^7.24.7", + "@babel/plugin-transform-spread": "^7.24.7", + "@babel/plugin-transform-sticky-regex": "^7.24.7", + "@babel/plugin-transform-template-literals": "^7.24.7", + "@babel/plugin-transform-typeof-symbol": "^7.24.8", + "@babel/plugin-transform-unicode-escapes": "^7.24.7", + "@babel/plugin-transform-unicode-property-regex": "^7.24.7", + "@babel/plugin-transform-unicode-regex": "^7.24.7", + "@babel/plugin-transform-unicode-sets-regex": "^7.25.4", "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.7", - "babel-plugin-polyfill-corejs3": "^0.8.7", - "babel-plugin-polyfill-regenerator": "^0.5.4", - "core-js-compat": "^3.31.0", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.10.6", + "babel-plugin-polyfill-regenerator": "^0.6.1", + "core-js-compat": "^3.37.1", "semver": "^6.3.1" }, "engines": { @@ -1813,17 +1812,17 @@ } }, "node_modules/@babel/preset-react": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.23.3.tgz", - "integrity": "sha512-tbkHOS9axH6Ysf2OUEqoSZ6T3Fa2SrNH6WTWSPBboxKzdxNc9qOICeLXkNG0ZEwbQ1HY8liwOce4aN/Ceyuq6w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.24.7.tgz", + "integrity": "sha512-AAH4lEkpmzFWrGVlHaxJB7RLH21uPQ9+He+eFLWHmF9IuFQVugz8eAsamaW0DXRrTfco5zj1wWtpdcXJUOfsag==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.15", - "@babel/plugin-transform-react-display-name": "^7.23.3", - "@babel/plugin-transform-react-jsx": "^7.22.15", - "@babel/plugin-transform-react-jsx-development": "^7.22.5", - "@babel/plugin-transform-react-pure-annotations": "^7.23.3" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "@babel/plugin-transform-react-display-name": "^7.24.7", + "@babel/plugin-transform-react-jsx": "^7.24.7", + "@babel/plugin-transform-react-jsx-development": "^7.24.7", + "@babel/plugin-transform-react-pure-annotations": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1833,16 +1832,16 @@ } }, "node_modules/@babel/preset-typescript": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.23.3.tgz", - "integrity": "sha512-17oIGVlqz6CchO9RFYn5U6ZpWRZIngayYCtrPRSgANSwC2V1Jb+iP74nVxzzXJte8b8BYxrL1yY96xfhTBrNNQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz", + "integrity": "sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.15", - "@babel/plugin-syntax-jsx": "^7.23.3", - "@babel/plugin-transform-modules-commonjs": "^7.23.3", - "@babel/plugin-transform-typescript": "^7.23.3" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "@babel/plugin-syntax-jsx": "^7.24.7", + "@babel/plugin-transform-modules-commonjs": "^7.24.7", + "@babel/plugin-transform-typescript": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1858,9 +1857,9 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.8.tgz", - "integrity": "sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz", + "integrity": "sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -1870,33 +1869,30 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz", - "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.6", - "@babel/types": "^7.23.6", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", + "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.6", + "@babel/parser": "^7.25.6", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1905,13 +1901,13 @@ } }, "node_modules/@babel/types": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", - "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", + "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1950,17 +1946,17 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.20.1.tgz", - "integrity": "sha512-oeJK41dcdqkvdZy/HctKklJNkt/jh+av3PZARrZEl+fs/8HaHeeYoAvEwOV0u5I6bArTF17JEsTZMY359e/nfQ==", + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.36.1.tgz", + "integrity": "sha512-922xqFsTpHs6D0BUiG4toiyPOMc8/jafnWKxz1KWgS4XzKPy2qXf1Pe6UFuNSCQqt6tOuhAWXBNuuyUhJmw9Vg==", "dev": true, "dependencies": { - "comment-parser": "1.3.0", + "comment-parser": "1.3.1", "esquery": "^1.4.0", - "jsdoc-type-pratt-parser": "~2.2.3" + "jsdoc-type-pratt-parser": "~3.1.0" }, "engines": { - "node": "^12 || ^14 || ^16 || ^17" + "node": "^14 || ^16 || ^17 || ^18 || ^19" } }, "node_modules/@eslint-community/eslint-utils": { @@ -1979,9 +1975,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -2056,9 +2052,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2083,6 +2079,7 @@ "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^2.0.2", @@ -2107,9 +2104,10 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", "dev": true }, "node_modules/@istanbuljs/load-nyc-config": { @@ -2137,58 +2135,6 @@ "node": ">=6" } }, - "node_modules/@istanbuljs/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@istanbuljs/load-nyc-config/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" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@istanbuljs/load-nyc-config/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/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -2394,6 +2340,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "dependencies": { "glob": "^7.1.3" @@ -2837,57 +2784,57 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", - "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -2895,9 +2842,9 @@ } }, "node_modules/@leichtgewicht/ip-codec": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", - "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", + "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", "dev": true }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { @@ -2945,19 +2892,17 @@ } }, "node_modules/@pmmmwh/react-refresh-webpack-plugin": { - "version": "0.5.11", - "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.11.tgz", - "integrity": "sha512-7j/6vdTym0+qZ6u4XbSAxrWBGYSdCfTzySkj7WAFgDLmSyWlOrWvpyzxlFh5jtw9dn0oL/jtW+06XfFiisN3JQ==", + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.15.tgz", + "integrity": "sha512-LFWllMA55pzB9D34w/wXUCf8+c+IYKuJDgxiZ3qMhl64KRMBHYM1I3VdGaD2BV5FNPV2/S2596bppxHbv2ZydQ==", "dev": true, "dependencies": { - "ansi-html-community": "^0.0.8", - "common-path-prefix": "^3.0.0", + "ansi-html": "^0.0.9", "core-js-pure": "^3.23.3", "error-stack-parser": "^2.0.6", - "find-up": "^5.0.0", "html-entities": "^2.1.0", "loader-utils": "^2.0.4", - "schema-utils": "^3.0.0", + "schema-utils": "^4.2.0", "source-map": "^0.7.3" }, "engines": { @@ -2969,7 +2914,7 @@ "sockjs-client": "^1.4.0", "type-fest": ">=0.17.0 <5.0.0", "webpack": ">=4.43.0 <6.0.0", - "webpack-dev-server": "3.x || 4.x", + "webpack-dev-server": "3.x || 4.x || 5.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, @@ -2995,15 +2940,21 @@ } }, "node_modules/@polka/url": { - "version": "1.0.0-next.24", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.24.tgz", - "integrity": "sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==", + "version": "1.0.0-next.25", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", + "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", + "dev": true + }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", "dev": true }, "node_modules/@sideway/address": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", - "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", + "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", "dev": true, "dependencies": { "@hapi/hoek": "^9.0.0" @@ -3347,9 +3298,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", - "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", "dev": true, "dependencies": { "@babel/types": "^7.20.7" @@ -3393,26 +3344,6 @@ "@types/node": "*" } }, - "node_modules/@types/eslint": { - "version": "8.56.2", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.2.tgz", - "integrity": "sha512-uQDwm1wFHmbBbCZCqAlq6Do9LYwByNZHWzXppSnay9SuwJ+VRbjkbLABer54kcPnMSlG6Fdiy2yaFXm/z9Z5gw==", - "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -3432,9 +3363,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.41", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz", - "integrity": "sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==", + "version": "4.19.5", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz", + "integrity": "sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==", "dev": true, "dependencies": { "@types/node": "*", @@ -3469,9 +3400,9 @@ "dev": true }, "node_modules/@types/http-proxy": { - "version": "1.17.14", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.14.tgz", - "integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==", + "version": "1.17.15", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.15.tgz", + "integrity": "sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==", "dev": true, "dependencies": { "@types/node": "*" @@ -3532,12 +3463,12 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz", - "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==", + "version": "22.5.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.4.tgz", + "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", "dev": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "node_modules/@types/node-forge": { @@ -3567,16 +3498,10 @@ "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", "dev": true }, - "node_modules/@types/prop-types": { - "version": "15.7.11", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", - "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==", - "dev": true - }, "node_modules/@types/qs": { - "version": "6.9.11", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.11.tgz", - "integrity": "sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==", + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", "dev": true }, "node_modules/@types/range-parser": { @@ -3585,42 +3510,16 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", "dev": true }, - "node_modules/@types/react": { - "version": "17.0.75", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.75.tgz", - "integrity": "sha512-MSA+NzEzXnQKrqpO63CYqNstFjsESgvJAdAyyJ1n6ZQq/GLgf6nOfIKwk+Twuz0L1N6xPe+qz5xRCJrbhMaLsw==", - "dev": true, - "dependencies": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - }, - "node_modules/@types/react-dom": { - "version": "17.0.25", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.25.tgz", - "integrity": "sha512-urx7A7UxkZQmThYA4So0NelOVjx3V4rNFVJwp0WZlbIK5eM4rNJDiN3R/E9ix0MBh6kAEojk/9YL+Te6D9zHNA==", - "dev": true, - "dependencies": { - "@types/react": "^17" - } - }, "node_modules/@types/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", "dev": true }, - "node_modules/@types/scheduler": { - "version": "0.16.8", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", - "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", - "dev": true - }, "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "node_modules/@types/send": { @@ -3643,14 +3542,14 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz", - "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==", + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dev": true, "dependencies": { "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" + "@types/node": "*", + "@types/send": "*" } }, "node_modules/@types/sockjs": { @@ -3681,9 +3580,9 @@ "dev": true }, "node_modules/@types/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-Hm/T0kV3ywpJyMGNbsItdivRhYNCQQf1IIsYsXnoVPES4t+FMLyDe0/K+Ea7ahWtMtSNb22ZdY7MIyoD9rqARg==", + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.17.5.tgz", + "integrity": "sha512-TU+fZFBTBcXj/GpDpDaBmgWk/gn96kMZ+uocaFUlV2f8a6WdMzzI44QBCmGcCiYR0Y6ZlNRiyUyKKt5nl/lbzQ==", "dev": true, "dependencies": { "source-map": "^0.6.1" @@ -3699,9 +3598,9 @@ } }, "node_modules/@types/webpack": { - "version": "4.41.38", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.38.tgz", - "integrity": "sha512-oOW7E931XJU1mVfCnxCVgv8GLFL768pDO5u2Gzk82i8yTIgX6i7cntyZOkZYb/JtYM8252SN9bQp9tgkVDSsRw==", + "version": "4.41.39", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.39.tgz", + "integrity": "sha512-otxUJvoi6FbBq/64gGH34eblpKLgdi+gf08GaAh8Bx6So0ZZic028Ev/SUxD22gbthMKCkeeiXEat1kHLDJfYg==", "dev": true, "dependencies": { "@types/node": "*", @@ -3733,9 +3632,9 @@ } }, "node_modules/@types/ws": { - "version": "8.5.10", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", - "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", + "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", "dev": true, "dependencies": { "@types/node": "*" @@ -3800,26 +3699,11 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/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/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -3827,31 +3711,6 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/eslint-plugin/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/@typescript-eslint/experimental-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.62.0.tgz", - "integrity": "sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, "node_modules/@typescript-eslint/parser": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", @@ -3963,26 +3822,11 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/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/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -3990,12 +3834,6 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/typescript-estree/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/@typescript-eslint/utils": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", @@ -4022,26 +3860,11 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@typescript-eslint/utils/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/@typescript-eslint/utils/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -4049,12 +3872,6 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/utils/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/@typescript-eslint/visitor-keys": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", @@ -4079,9 +3896,9 @@ "dev": true }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", @@ -4101,9 +3918,9 @@ "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { @@ -4124,15 +3941,15 @@ "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { @@ -4160,28 +3977,28 @@ "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/leb128": "1.11.6", @@ -4189,24 +4006,24 @@ } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", @@ -4215,12 +4032,12 @@ } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -4261,34 +4078,39 @@ } }, "node_modules/@woocommerce/eslint-plugin": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@woocommerce/eslint-plugin/-/eslint-plugin-2.2.0.tgz", - "integrity": "sha512-Y++rzAnZL6IHaOrcuTsDvd409ry//waq/Q5+rLTGzYrMxaVB4EfcQIN72skK8bWihoebSnp3bk+WQvW5wXtJTw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@woocommerce/eslint-plugin/-/eslint-plugin-2.3.0.tgz", + "integrity": "sha512-2TZOWyFI3HiM1bI06NQNMGpOp9PmzwrgdD5Fwv7x37RYcKgy9FDx5WPT4PF+8yr3L31QbRaavyJvr2Lp65Nwww==", "dev": true, "dependencies": { - "@typescript-eslint/parser": "^5.14.0", - "@wordpress/eslint-plugin": "^11.0.0", - "eslint-plugin-react-hooks": "^4.3.0", - "eslint-plugin-testing-library": "^5.1.0", - "requireindex": "^1.2.0" + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", + "@wordpress/eslint-plugin": "14.7.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-testing-library": "^5.11.1", + "prettier": "npm:wp-prettier@^2.8.5" + }, + "engines": { + "node": "^20.11.1", + "pnpm": "^9.1.0" } }, "node_modules/@wordpress/babel-plugin-import-jsx-pragma": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-3.2.0.tgz", - "integrity": "sha512-XK3Sdpi9MWoy5qPHnRroY/ypX0VtT5yI5809u5As1P/3k4vlXNw8USH4lJ+rkurAOVqqN5mFlf2XAL9AkpfXyg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-4.41.0.tgz", + "integrity": "sha512-hYxj2Uobxk86ctlfaJou9v13XqXZ30yx4ZwRNu5cH5/LWXe2MIXBTPv7dUk6wqN/qFOjsFvP9jCB0NsW6MnkrA==", "dev": true, "engines": { - "node": ">=12" + "node": ">=14" }, "peerDependencies": { "@babel/core": "^7.12.9" } }, "node_modules/@wordpress/babel-preset-default": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-6.17.0.tgz", - "integrity": "sha512-mBB1KHWT2vN+maKIPYLQSxhhAzW6CNwYiJNRSNaNBALie9TULe7etrnwoZ1eqPVsuYvBlXB4XKcPaSm3/FW+qQ==", + "version": "7.42.0", + "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.42.0.tgz", + "integrity": "sha512-AWSxWuEuzazt/nWomKiaVhYQeXuqxTniPCKhvks58wB3P4UXvSe3hRnO+nujz20IuxIk2xHT6x47HgpDZy30jw==", "dev": true, "dependencies": { "@babel/core": "^7.16.0", @@ -4297,30 +4119,30 @@ "@babel/preset-env": "^7.16.0", "@babel/preset-typescript": "^7.16.0", "@babel/runtime": "^7.16.0", - "@wordpress/babel-plugin-import-jsx-pragma": "^3.2.0", - "@wordpress/browserslist-config": "^4.1.2", - "@wordpress/element": "^4.13.0", - "@wordpress/warning": "^2.15.0", - "browserslist": "^4.17.6", - "core-js": "^3.19.1" + "@wordpress/babel-plugin-import-jsx-pragma": "^4.41.0", + "@wordpress/browserslist-config": "^5.41.0", + "@wordpress/warning": "^2.58.0", + "browserslist": "^4.21.10", + "core-js": "^3.31.0", + "react": "^18.3.0" }, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/@wordpress/base-styles": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-4.40.0.tgz", - "integrity": "sha512-A+HiyES4YjfbFhJAGrhCLB3QWomgWZR9wkgG7K9l6DD70/9Vd7t+go7jI1HJ1c9qGfBV0rmdQf/qNn89Aai1cg==", + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-4.49.0.tgz", + "integrity": "sha512-yFRYqNtd26ULZ0oAHhCu/IcaA0XHI3E7kRCKajZqUvyRQj7YprXnpD3o0/pnwvF6ZFTXzCX8pXHjUc2TIv97ig==", "dev": true }, "node_modules/@wordpress/browserslist-config": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-4.1.3.tgz", - "integrity": "sha512-M4WQ0C4zCfMWyCmK40git3rfPdNkRwg5boGjoTL4LSdhrY+rtchFAtfOHS9KovAZ5ZzTB0gyZsCu/QKZlPClog==", + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-5.41.0.tgz", + "integrity": "sha512-J7ejzzDpPZddVIiq2YiK8J/pNTJDy3X1s+5ZtwkwklCxBMZJurxf9pEhtbaf7us0Q6c1j8Ubv7Fpx3lqk2ypxA==", "dev": true, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/@wordpress/dependency-extraction-webpack-plugin": { @@ -4339,92 +4161,23 @@ "webpack": "^4.8.3 || ^5.0.0" } }, - "node_modules/@wordpress/element": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-4.20.0.tgz", - "integrity": "sha512-Ou7EoGtGe4FUL6fKALINXJLKoSfyWTBJzkJfN2HzSgM1wira9EuWahl8MQN0HAUaWeOoDqMKPvnglfS+kC8JLA==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.16.0", - "@types/react": "^17.0.37", - "@types/react-dom": "^17.0.11", - "@wordpress/escape-html": "^2.22.0", - "change-case": "^4.1.2", - "is-plain-object": "^5.0.0", - "react": "^17.0.2", - "react-dom": "^17.0.2" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@wordpress/element/node_modules/react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "dev": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@wordpress/element/node_modules/react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", - "dev": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" - }, - "peerDependencies": { - "react": "17.0.2" - } - }, - "node_modules/@wordpress/element/node_modules/scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", - "dev": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "node_modules/@wordpress/escape-html": { - "version": "2.49.0", - "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.49.0.tgz", - "integrity": "sha512-JmVm6IWr5EhXU5m7LCwMOiSv90qJU1l8Q2xlBCQ+0bIPcWRjsHX9pFKDOJvQ6D55W/CTGO1GQk50uolktTeTtw==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.16.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/@wordpress/eslint-plugin": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-11.1.0.tgz", - "integrity": "sha512-NNIgJQqibdj5BsctkhCqjYt5NAs8eGBnuMSTnbhYCuUrs/PF3iF+jwY4OEOBOSlr00KyM9BfDxr9/5EWG8PmOw==", + "version": "14.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-14.7.0.tgz", + "integrity": "sha512-UpK+FC7BPIBdOKien9hNlloju252zNiYgJkuSHFNA/RgSkkF993in1PYbf0/ppsTtF2VwbOyFxy2uCHCvJFAEw==", "dev": true, "dependencies": { "@babel/eslint-parser": "^7.16.0", "@typescript-eslint/eslint-plugin": "^5.3.0", "@typescript-eslint/parser": "^5.3.0", - "@wordpress/babel-preset-default": "^6.7.0", - "@wordpress/prettier-config": "^1.1.3", + "@wordpress/babel-preset-default": "^7.18.0", + "@wordpress/prettier-config": "^2.17.0", "cosmiconfig": "^7.0.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jest": "^25.2.3", - "eslint-plugin-jsdoc": "^37.0.3", + "eslint-plugin-jest": "^27.2.1", + "eslint-plugin-jsdoc": "^39.6.9", "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-playwright": "^0.8.0", "eslint-plugin-prettier": "^3.3.0", "eslint-plugin-react": "^7.27.0", "eslint-plugin-react-hooks": "^4.3.0", @@ -4432,8 +4185,8 @@ "requireindex": "^1.2.0" }, "engines": { - "node": ">=12", - "npm": ">=6.9" + "node": ">=14", + "npm": ">=6.14.4" }, "peerDependencies": { "@babel/core": ">=7", @@ -4511,9 +4264,9 @@ } }, "node_modules/@wordpress/npm-package-json-lint-config": { - "version": "4.34.0", - "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-4.34.0.tgz", - "integrity": "sha512-mknDw+d5HIfx/1DyrhkbLJNu8XsmUEjc1SsYSgF2XCP20/khpO7YOi0LWn9uQ2QXWZrlhMc7JKSSOcTs0aLphQ==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-4.43.0.tgz", + "integrity": "sha512-XSb7AdDC7yGTBVYeRM4oqmOygEB+/+tk7lobLIGDmlZJs+M3F/NUvQq0Vcas1pojq2fyPYTUwOlu81ga33fNwQ==", "dev": true, "engines": { "node": ">=14" @@ -4523,12 +4276,12 @@ } }, "node_modules/@wordpress/postcss-plugins-preset": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@wordpress/postcss-plugins-preset/-/postcss-plugins-preset-4.33.0.tgz", - "integrity": "sha512-RqKNf8XQTdae0cXO11l6mBw+A3IOEO9dd4sD70g15e4IltrbwuxqwOT5k9muNteUszTCOQKgWgD8gp1KM2/lvQ==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@wordpress/postcss-plugins-preset/-/postcss-plugins-preset-4.42.0.tgz", + "integrity": "sha512-5xmKF7IUsqS5JcmJlHKHq7RaR6ZpaLj3n9c+X0X0/Oo7ZCIGp6WeDQngx13sH4NJoKXrZ9g4n1rbzhEKeo/Wtg==", "dev": true, "dependencies": { - "@wordpress/base-styles": "^4.40.0", + "@wordpress/base-styles": "^4.49.0", "autoprefixer": "^10.2.5" }, "engines": { @@ -4539,12 +4292,12 @@ } }, "node_modules/@wordpress/prettier-config": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-1.4.0.tgz", - "integrity": "sha512-uvrgUAhRnOvIysXjcXH9VDsrKLqH9r3BfdGoy+WFLSHFnTfdMhW7bdDQXl4F4UIUuefUwGi+ZvT/rChg9zoBkQ==", + "version": "2.25.13", + "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-2.25.13.tgz", + "integrity": "sha512-iz58o0X91E24j0VFtzwn5qG84w+s4VlRCuZWa/lPL6pfGtOSw30c60wCrYKCA1IWIIAWdpRAYfEh7errPyKiPQ==", "dev": true, "engines": { - "node": ">=12" + "node": ">=14" }, "peerDependencies": { "prettier": ">=2" @@ -4624,143 +4377,6 @@ "react-dom": "^18.0.0" } }, - "node_modules/@wordpress/scripts/node_modules/@es-joy/jsdoccomment": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.36.1.tgz", - "integrity": "sha512-922xqFsTpHs6D0BUiG4toiyPOMc8/jafnWKxz1KWgS4XzKPy2qXf1Pe6UFuNSCQqt6tOuhAWXBNuuyUhJmw9Vg==", - "dev": true, - "dependencies": { - "comment-parser": "1.3.1", - "esquery": "^1.4.0", - "jsdoc-type-pratt-parser": "~3.1.0" - }, - "engines": { - "node": "^14 || ^16 || ^17 || ^18 || ^19" - } - }, - "node_modules/@wordpress/scripts/node_modules/@wordpress/babel-plugin-import-jsx-pragma": { - "version": "4.32.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-4.32.0.tgz", - "integrity": "sha512-ie6p5VpUxTNMPQrHdCYEPddTzmDeFTQjFi3qq17set9WbRAMaOZ8jqQhSxms0NJi8Xa6wZM9TR2ZABAlg+FTeA==", - "dev": true, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@babel/core": "^7.12.9" - } - }, - "node_modules/@wordpress/scripts/node_modules/@wordpress/babel-preset-default": { - "version": "7.33.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.33.0.tgz", - "integrity": "sha512-/OonEa67xJdIn0ADWEd7AJtLhIGlYALKyc17RxTmI2Ojs0zLIQNbgAv1D/cuVguo0UKK9zsMZ9MBkhSKLF9A9Q==", - "dev": true, - "dependencies": { - "@babel/core": "^7.16.0", - "@babel/plugin-transform-react-jsx": "^7.16.0", - "@babel/plugin-transform-runtime": "^7.16.0", - "@babel/preset-env": "^7.16.0", - "@babel/preset-typescript": "^7.16.0", - "@babel/runtime": "^7.16.0", - "@wordpress/babel-plugin-import-jsx-pragma": "^4.32.0", - "@wordpress/browserslist-config": "^5.32.0", - "@wordpress/warning": "^2.49.0", - "browserslist": "^4.21.10", - "core-js": "^3.31.0", - "react": "^18.2.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@wordpress/scripts/node_modules/@wordpress/browserslist-config": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-5.32.0.tgz", - "integrity": "sha512-LrL4Zg/abXYfVwwbx1caugz4J1GUL+6WNqVF1MZQVDm6CHdlpTEQOvvr/KEi9mN1UY2YoTlxZtUxzvNRTo2Fsg==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@wordpress/scripts/node_modules/@wordpress/eslint-plugin": { - "version": "14.12.0", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-14.12.0.tgz", - "integrity": "sha512-RJDYbdOl3IdunpqYA3A1ask1nYO/KcAhyxTwCFBcXJdi++LtlwUJJNlo+qdXzRFDcqT2QjrpszUJJV9zAL6/Hw==", - "dev": true, - "dependencies": { - "@babel/eslint-parser": "^7.16.0", - "@typescript-eslint/eslint-plugin": "^5.3.0", - "@typescript-eslint/parser": "^5.3.0", - "@wordpress/babel-preset-default": "^7.23.0", - "@wordpress/prettier-config": "^2.22.0", - "cosmiconfig": "^7.0.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jest": "^27.2.1", - "eslint-plugin-jsdoc": "^39.6.9", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-prettier": "^3.3.0", - "eslint-plugin-react": "^7.27.0", - "eslint-plugin-react-hooks": "^4.3.0", - "globals": "^13.12.0", - "requireindex": "^1.2.0" - }, - "engines": { - "node": ">=14", - "npm": ">=6.14.4" - }, - "peerDependencies": { - "@babel/core": ">=7", - "eslint": ">=8", - "prettier": ">=2", - "typescript": ">=4" - }, - "peerDependenciesMeta": { - "prettier": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/@wordpress/scripts/node_modules/@wordpress/eslint-plugin/node_modules/eslint-plugin-jest": { - "version": "27.6.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.3.tgz", - "integrity": "sha512-+YsJFVH6R+tOiO3gCJon5oqn4KWc+mDq2leudk8mrp8RFubLOo9CVyi3cib4L7XMpxExmkmBZQTPDYVBzgpgOA==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "^5.10.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0", - "eslint": "^7.0.0 || ^8.0.0", - "jest": "*" - }, - "peerDependenciesMeta": { - "@typescript-eslint/eslint-plugin": { - "optional": true - }, - "jest": { - "optional": true - } - } - }, - "node_modules/@wordpress/scripts/node_modules/@wordpress/prettier-config": { - "version": "2.25.13", - "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-2.25.13.tgz", - "integrity": "sha512-iz58o0X91E24j0VFtzwn5qG84w+s4VlRCuZWa/lPL6pfGtOSw30c60wCrYKCA1IWIIAWdpRAYfEh7errPyKiPQ==", - "dev": true, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "prettier": ">=2" - } - }, "node_modules/@wordpress/scripts/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -4819,63 +4435,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/@wordpress/scripts/node_modules/comment-parser": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", - "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", - "dev": true, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@wordpress/scripts/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@wordpress/scripts/node_modules/eslint-plugin-jsdoc": { - "version": "39.9.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.9.1.tgz", - "integrity": "sha512-Rq2QY6BZP2meNIs48aZ3GlIlJgBqFCmR55+UBvaDkA3ZNQ0SvQXOs2QKkubakEijV8UbIVbVZKsOVN8G3MuqZw==", - "dev": true, - "dependencies": { - "@es-joy/jsdoccomment": "~0.36.1", - "comment-parser": "1.3.1", - "debug": "^4.3.4", - "escape-string-regexp": "^4.0.0", - "esquery": "^1.4.0", - "semver": "^7.3.8", - "spdx-expression-parse": "^3.0.1" - }, - "engines": { - "node": "^14 || ^16 || ^17 || ^18 || ^19" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/@wordpress/scripts/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@wordpress/scripts/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4891,27 +4450,6 @@ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, - "node_modules/@wordpress/scripts/node_modules/jsdoc-type-pratt-parser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz", - "integrity": "sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw==", - "dev": true, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@wordpress/scripts/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/@wordpress/scripts/node_modules/meow": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/meow/-/meow-6.1.1.tgz", @@ -4937,18 +4475,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@wordpress/scripts/node_modules/meow/node_modules/type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@wordpress/scripts/node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -5017,13 +4543,10 @@ } }, "node_modules/@wordpress/scripts/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -5044,9 +4567,9 @@ } }, "node_modules/@wordpress/scripts/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", "dev": true, "engines": { "node": ">=10" @@ -5055,12 +4578,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@wordpress/scripts/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/@wordpress/scripts/node_modules/yargs-parser": { "version": "18.1.3", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", @@ -5075,9 +4592,9 @@ } }, "node_modules/@wordpress/stylelint-config": { - "version": "21.32.0", - "resolved": "https://registry.npmjs.org/@wordpress/stylelint-config/-/stylelint-config-21.32.0.tgz", - "integrity": "sha512-cmrzU55alv+OZu1fXBC2eZGgJIUwyD47TSDDP7l0o9yF6D/w0am7FxC9ungk/S2uK1oatN05nIPsFSTkuHQSzg==", + "version": "21.41.0", + "resolved": "https://registry.npmjs.org/@wordpress/stylelint-config/-/stylelint-config-21.41.0.tgz", + "integrity": "sha512-2wxFu8ICeRGF3Lxz7H7o2SU1u6pTI4mjuog39DgtCNb+v+f6yhgREDuNQEeti3Svb0rjj63AJ7r2CqLZk+EQIQ==", "dev": true, "dependencies": { "stylelint-config-recommended": "^6.0.0", @@ -5091,9 +4608,9 @@ } }, "node_modules/@wordpress/warning": { - "version": "2.49.0", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.49.0.tgz", - "integrity": "sha512-W2Nj9Nj0o2udPLf8jfGijRff3lzQgPOiLZcN4LFUPT6yyb9MxvNIg7ZVTBJL2TB78+KQKGrIH4ERjV5WyDRoEQ==", + "version": "2.58.0", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.58.0.tgz", + "integrity": "sha512-9bZlORhyMY2nbWozeyC5kqJsFzEPP4DCLhGmjtbv+YWGHttUrxUZEfrKdqO+rUODA8rP5zeIly1nCQOUnkw4Lg==", "dev": true, "engines": { "node": ">=12" @@ -5132,9 +4649,9 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -5165,10 +4682,10 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "dev": true, "peerDependencies": { "acorn": "^8" @@ -5193,12 +4710,12 @@ } }, "node_modules/adm-zip": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz", - "integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==", + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.16.tgz", + "integrity": "sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==", "dev": true, "engines": { - "node": ">=6.0" + "node": ">=12.0" } }, "node_modules/agent-base": { @@ -5256,15 +4773,15 @@ } }, "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -5301,6 +4818,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ansi-html": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.9.tgz", + "integrity": "sha512-ozbS3LuenHVxNRh/wdnN16QapUHzauqSomAl1jwwJRRsGwFwtj644lIhxfWu0Fy0acCij2+AEgHvjscq3dlVXg==", + "dev": true, + "engines": [ + "node >= 0.8.0" + ], + "bin": { + "ansi-html": "bin/ansi-html" + } + }, "node_modules/ansi-html-community": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", @@ -5357,12 +4886,12 @@ } }, "node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", "dev": true, "dependencies": { - "dequal": "^2.0.3" + "deep-equal": "^2.0.5" } }, "node_modules/arr-union": { @@ -5375,13 +4904,16 @@ } }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5394,15 +4926,16 @@ "dev": true }, "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -5430,17 +4963,38 @@ "node": ">=0.10.0" } }, + "node_modules/array.prototype.findlast": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array.prototype.findlastindex": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", - "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -5486,30 +5040,34 @@ } }, "node_modules/array.prototype.tosorted": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.2.tgz", - "integrity": "sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" }, "engines": { @@ -5543,15 +5101,6 @@ "node": ">=8" } }, - "node_modules/asynciterator.prototype": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", - "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.3" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -5559,9 +5108,9 @@ "dev": true }, "node_modules/autoprefixer": { - "version": "10.4.17", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz", - "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==", + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", "dev": true, "funding": [ { @@ -5578,11 +5127,11 @@ } ], "dependencies": { - "browserslist": "^4.22.2", - "caniuse-lite": "^1.0.30001578", + "browserslist": "^4.23.3", + "caniuse-lite": "^1.0.30001646", "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "postcss-value-parser": "^4.2.0" }, "bin": { @@ -5596,10 +5145,12 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -5608,9 +5159,9 @@ } }, "node_modules/axe-core": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz", - "integrity": "sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.0.tgz", + "integrity": "sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==", "dev": true, "engines": { "node": ">=4" @@ -5626,12 +5177,12 @@ } }, "node_modules/axobject-query": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", - "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", "dev": true, - "dependencies": { - "dequal": "^2.0.3" + "engines": { + "node": ">= 0.4" } }, "node_modules/babel-jest": { @@ -5795,13 +5346,13 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.8", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.8.tgz", - "integrity": "sha512-OtIuQfafSzpo/LhnJaykc0R/MMnuLSSVjVYy9mHArIZ9qTCSZ6TpWCuEKZYVoN//t8HqBNScHrOtCrIK5IaGLg==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", + "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", "dev": true, "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.5.0", + "@babel/helper-define-polyfill-provider": "^0.6.2", "semver": "^6.3.1" }, "peerDependencies": { @@ -5809,64 +5360,51 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.7.tgz", - "integrity": "sha512-KyDvZYxAzkC0Aj2dAPyDzi2Ym15e5JKZSK+maI7NAwSqofvuFglbSsxE7wUOvTg9oFVnHMzVzBKcqEb4PJgtOA==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.4", - "core-js-compat": "^3.33.1" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3/node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.4.tgz", - "integrity": "sha512-QcJMILQCu2jm5TFPGA3lCpJJTeEP+mqeXooG/NZbg/h5FTFi6V0+99ahlRsW8/kRLyb24LZVCCiclDedhLKcBA==", + "version": "0.10.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz", + "integrity": "sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.22.6", - "@babel/helper-plugin-utils": "^7.22.5", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2" + "@babel/helper-define-polyfill-provider": "^0.6.2", + "core-js-compat": "^3.38.0" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.5.tgz", - "integrity": "sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", + "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.5.0" + "@babel/helper-define-polyfill-provider": "^0.6.2" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -5930,12 +5468,15 @@ } }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/bl": { @@ -5950,13 +5491,13 @@ } }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dev": true, "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -5964,7 +5505,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -6036,12 +5577,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -6054,9 +5595,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", - "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", "dev": true, "funding": [ { @@ -6073,10 +5614,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" @@ -6133,52 +5674,6 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", - "dev": true, - "peer": true, - "dependencies": { - "semver": "^7.0.0" - } - }, - "node_modules/builtins/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, - "peer": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/builtins/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "peer": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/builtins/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, - "peer": true - }, "node_modules/bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -6189,14 +5684,18 @@ } }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", - "dev": true, + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6211,16 +5710,6 @@ "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": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -6272,9 +5761,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001579", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz", - "integrity": "sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==", + "version": "1.0.30001657", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001657.tgz", + "integrity": "sha512-DPbJAlP8/BAXy3IgiWmZKItubb3TYGP0WscQQlVGIfT4s/YlFYVuJgyOsQNP7rJRChx/qdMeLJQJP0Sgg2yjNA==", "dev": true, "funding": [ { @@ -6291,17 +5780,6 @@ } ] }, - "node_modules/capital-case": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz", - "integrity": "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -6316,26 +5794,6 @@ "node": ">=4" } }, - "node_modules/change-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-4.1.2.tgz", - "integrity": "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==", - "dev": true, - "dependencies": { - "camel-case": "^4.1.2", - "capital-case": "^1.0.4", - "constant-case": "^3.0.4", - "dot-case": "^3.0.4", - "header-case": "^2.0.4", - "no-case": "^3.0.4", - "param-case": "^3.0.4", - "pascal-case": "^3.1.2", - "path-case": "^3.0.4", - "sentence-case": "^3.0.4", - "snake-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/char-regex": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", @@ -6433,16 +5891,10 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -6455,6 +5907,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -6478,9 +5933,9 @@ "dev": true }, "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", "dev": true, "engines": { "node": ">=6.0" @@ -6502,9 +5957,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.0.tgz", + "integrity": "sha512-N1NGmowPlGBLsOZLPvm48StN04V4YvQRL0i6b7ctrVY3epjP/ct7hFLOItz6pDIvRjwpfPxi52a2UWV2ziir8g==", "dev": true }, "node_modules/clean-webpack-plugin": { @@ -6550,18 +6005,6 @@ "node": ">=0.10.0" } }, - "node_modules/clone-deep/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -6627,20 +6070,14 @@ } }, "node_modules/comment-parser": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.0.tgz", - "integrity": "sha512-hRpmWIKgzd81vn0ydoWoyPoALEOnF4wt8yKD35Ib1D6XC2siLiYaiqfGkYrunuKdsXGwpBpHU3+9r+RVw2NZfA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", + "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", "dev": true, "engines": { "node": ">= 12.0.0" } }, - "node_modules/common-path-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", - "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", - "dev": true - }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -6713,17 +6150,6 @@ "node": ">=0.8" } }, - "node_modules/constant-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", - "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case": "^2.0.2" - } - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -6752,9 +6178,9 @@ "dev": true }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "dev": true, "engines": { "node": ">= 0.6" @@ -6790,34 +6216,6 @@ "webpack": "^5.1.0" } }, - "node_modules/copy-webpack-plugin/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "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" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/copy-webpack-plugin/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, "node_modules/copy-webpack-plugin/node_modules/array-union": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz", @@ -6850,31 +6248,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/copy-webpack-plugin/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/copy-webpack-plugin/node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/copy-webpack-plugin/node_modules/slash": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", @@ -6888,9 +6261,9 @@ } }, "node_modules/core-js": { - "version": "3.35.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.35.1.tgz", - "integrity": "sha512-IgdsbxNyMskrTFxa9lWHyMwAJU5gXOPP+1yO+K59d50VLVAIDAbs7gIv705KzALModfK3ZrSZTPNpC0PQgIZuw==", + "version": "3.38.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.38.1.tgz", + "integrity": "sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==", "dev": true, "hasInstallScript": true, "funding": { @@ -6899,12 +6272,12 @@ } }, "node_modules/core-js-compat": { - "version": "3.35.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.35.1.tgz", - "integrity": "sha512-sftHa5qUJY3rs9Zht1WEnmkvXputCyDBczPnr7QDgL8n3qrF3CMXY4VPSYtOLLiOUJcah2WNXREd48iOl6mQIw==", + "version": "3.38.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.1.tgz", + "integrity": "sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==", "dev": true, "dependencies": { - "browserslist": "^4.22.2" + "browserslist": "^4.23.3" }, "funding": { "type": "opencollective", @@ -6912,9 +6285,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.35.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.35.1.tgz", - "integrity": "sha512-zcIdi/CL3MWbBJYo5YCeVAAx+Sy9yJE9I3/u9LkFABwbeaPhTMRWraM8mYFp9jW5Z50hOy7FVzCc8dCrpZqtIQ==", + "version": "3.38.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.38.1.tgz", + "integrity": "sha512-BY8Etc1FZqdw1glX0XNOq2FDwfrg/VGqoZOZCdaL+UmdaqDwQwYXkMJT4t6In+zfEfOJDcM9T0KdbBeJg8KKCQ==", "dev": true, "hasInstallScript": true, "funding": { @@ -6993,25 +6366,25 @@ } }, "node_modules/css-functions-list": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.1.tgz", - "integrity": "sha512-Nj5YcaGgBtuUmn1D7oHqPW0c9iui7xsTsj5lIX8ZgevdfhmjFfKB3r8moHJtNJnctnYXJyYX5I1pp90HM4TPgQ==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz", + "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==", "dev": true, "engines": { "node": ">=12 || >=16" } }, "node_modules/css-loader": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.9.1.tgz", - "integrity": "sha512-OzABOh0+26JKFdMzlK6PY1u5Zx8+Ck7CVRlcGNZoY9qwJjdfu2VWFuprTIpPW+Av5TZTVViYWcFQaEEQURLknQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.11.0.tgz", + "integrity": "sha512-CTJ+AEQJjq5NzLga5pE39qdiSV56F8ywCIsqNIRF0r7BDgWsN25aazToqAFg7ZrtA/U016xudB3ffgweORxX7g==", "dev": true, "dependencies": { "icss-utils": "^5.1.0", "postcss": "^8.4.33", - "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.4", - "postcss-modules-scope": "^3.1.1", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", "postcss-modules-values": "^4.0.0", "postcss-value-parser": "^4.2.0", "semver": "^7.5.4" @@ -7024,29 +6397,23 @@ "url": "https://opencollective.com/webpack" }, "peerDependencies": { + "@rspack/core": "0.x || 1.x", "webpack": "^5.0.0" - } - }, - "node_modules/css-loader/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" + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } } }, "node_modules/css-loader/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -7054,12 +6421,6 @@ "node": ">=10" } }, - "node_modules/css-loader/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/css-select": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", @@ -7234,12 +6595,6 @@ "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", "dev": true }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true - }, "node_modules/cwd": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.10.0.tgz", @@ -7273,6 +6628,57 @@ "node": ">=10" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/debounce": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", @@ -7280,9 +6686,9 @@ "dev": true }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -7342,6 +6748,38 @@ "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", "dev": true }, + "node_modules/deep-equal": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", + "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.5", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.2", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -7379,17 +6817,19 @@ } }, "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", - "dev": true, + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-lazy-prop": { @@ -7491,15 +6931,6 @@ "node": ">= 0.8" } }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -7662,16 +7093,6 @@ "url": "https://github.com/fb55/domutils?sponsor=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/duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", @@ -7685,9 +7106,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.640", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.640.tgz", - "integrity": "sha512-z/6oZ/Muqk4BaE7P69bXhUhpJbUM9ZJeka43ZwxsDshKtePns4mhBlh8bU5+yrnOnz3fhG82XLzGUXazOmsWnA==", + "version": "1.5.14", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.14.tgz", + "integrity": "sha512-bEfPECb3fJ15eaDnu9LEJ2vPGD6W1vt7vZleSVyFhYuMIKm3vz/g9lt7IvEzgdwj58RjbPKUF2rXTCN/UW47tQ==", "dev": true }, "node_modules/emittery": { @@ -7736,9 +7157,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -7761,9 +7182,9 @@ } }, "node_modules/envinfo": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.11.0.tgz", - "integrity": "sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz", + "integrity": "sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==", "dev": true, "bin": { "envinfo": "dist/cli.js" @@ -7791,50 +7212,57 @@ } }, "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -7843,43 +7271,97 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-iterator-helpers": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz", - "integrity": "sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==", + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", "dev": true, "dependencies": { - "asynciterator.prototype": "^1.0.0", "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-iterator-helpers": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", + "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.1", - "es-set-tostringtag": "^2.0.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", + "internal-slot": "^1.0.7", "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.0.1" + "safe-array-concat": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/es-module-lexer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", - "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", "dev": true }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -7912,9 +7394,9 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "engines": { "node": ">=6" @@ -7967,16 +7449,16 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -8054,9 +7536,9 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.9.0.tgz", + "integrity": "sha512-McVbYmwA3NEKwRQY5g4aWMdcZE5xZxV8i8l7CqJSrameuGSQJtSWaL/LxTEzSKKaCcOhlpDR8XEfYXWPrdo/ZQ==", "dev": true, "dependencies": { "debug": "^3.2.7" @@ -8080,26 +7562,27 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", - "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz", + "integrity": "sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==", "dev": true, "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.3", + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", "array.prototype.flat": "^1.3.2", "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.0", - "is-core-module": "^2.13.1", + "eslint-module-utils": "^2.9.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.1", - "object.values": "^1.1.7", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", "semver": "^6.3.1", "tsconfig-paths": "^3.15.0" }, @@ -8132,19 +7615,20 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "25.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.7.0.tgz", - "integrity": "sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==", + "version": "27.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", + "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "^5.0.0" + "@typescript-eslint/utils": "^5.10.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^4.0.0 || ^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0", + "eslint": "^7.0.0 || ^8.0.0", + "jest": "*" }, "peerDependenciesMeta": { "@typescript-eslint/eslint-plugin": { @@ -8156,22 +7640,21 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "37.9.7", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-37.9.7.tgz", - "integrity": "sha512-8alON8yYcStY94o0HycU2zkLKQdcS+qhhOUNQpfONHHwvI99afbmfpYuPqf6PbLz5pLZldG3Te5I0RbAiTN42g==", + "version": "39.9.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.9.1.tgz", + "integrity": "sha512-Rq2QY6BZP2meNIs48aZ3GlIlJgBqFCmR55+UBvaDkA3ZNQ0SvQXOs2QKkubakEijV8UbIVbVZKsOVN8G3MuqZw==", "dev": true, "dependencies": { - "@es-joy/jsdoccomment": "~0.20.1", - "comment-parser": "1.3.0", - "debug": "^4.3.3", + "@es-joy/jsdoccomment": "~0.36.1", + "comment-parser": "1.3.1", + "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.4.0", - "regextras": "^0.8.0", - "semver": "^7.3.5", + "semver": "^7.3.8", "spdx-expression-parse": "^3.0.1" }, "engines": { - "node": "^12 || ^14 || ^16 || ^17" + "node": "^14 || ^16 || ^17 || ^18 || ^19" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" @@ -8189,26 +7672,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-plugin-jsdoc/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/eslint-plugin-jsdoc/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, "bin": { "semver": "bin/semver.js" }, @@ -8216,55 +7684,34 @@ "node": ">=10" } }, - "node_modules/eslint-plugin-jsdoc/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/eslint-plugin-jsx-a11y": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz", - "integrity": "sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.0.tgz", + "integrity": "sha512-ySOHvXX8eSN6zz8Bywacm7CvGNhUtdjvqfQDVe6020TUK34Cywkw7m0KsCCk1Qtm9G1FayfTN1/7mMYnYO2Bhg==", "dev": true, "dependencies": { - "@babel/runtime": "^7.23.2", - "aria-query": "^5.3.0", - "array-includes": "^3.1.7", + "aria-query": "~5.1.3", + "array-includes": "^3.1.8", "array.prototype.flatmap": "^1.3.2", "ast-types-flow": "^0.0.8", - "axe-core": "=4.7.0", - "axobject-query": "^3.2.1", + "axe-core": "^4.10.0", + "axobject-query": "^4.1.0", "damerau-levenshtein": "^1.0.8", "emoji-regex": "^9.2.2", - "es-iterator-helpers": "^1.0.15", - "hasown": "^2.0.0", + "es-iterator-helpers": "^1.0.19", + "hasown": "^2.0.2", "jsx-ast-utils": "^3.3.5", "language-tags": "^1.0.9", "minimatch": "^3.1.2", - "object.entries": "^1.1.7", - "object.fromentries": "^2.0.7" + "object.fromentries": "^2.0.8", + "safe-regex-test": "^1.0.3", + "string.prototype.includes": "^2.0.0" }, "engines": { "node": ">=4.0" }, "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" - } - }, - "node_modules/eslint-plugin-playwright": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-0.8.0.tgz", - "integrity": "sha512-9uJH25m6H3jwU5O7bHD5M8cLx46L72EnIUe3dZqTox6M+WzOFzeUWaDJHHCdLGXZ8XlAU4mbCZnP7uhjKepfRA==", - "dev": true, - "peerDependencies": { - "eslint": ">=7", - "eslint-plugin-jest": ">=24" - }, - "peerDependenciesMeta": { - "eslint-plugin-jest": { - "optional": true - } + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" } }, "node_modules/eslint-plugin-prettier": { @@ -8289,39 +7736,41 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.33.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz", - "integrity": "sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==", + "version": "7.35.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.35.2.tgz", + "integrity": "sha512-Rbj2R9zwP2GYNcIak4xoAMV57hrBh3hTaR0k7hVjwCQgryE/pw5px4b13EYjduOI0hfXyZhwBxaGpOTbWSGzKQ==", "dev": true, "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flatmap": "^1.3.1", - "array.prototype.tosorted": "^1.1.1", + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", + "array.prototype.flatmap": "^1.3.2", + "array.prototype.tosorted": "^1.1.4", "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.0.12", + "es-iterator-helpers": "^1.0.19", "estraverse": "^5.3.0", + "hasown": "^2.0.2", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", - "object.entries": "^1.1.6", - "object.fromentries": "^2.0.6", - "object.hasown": "^1.1.2", - "object.values": "^1.1.6", + "object.entries": "^1.1.8", + "object.fromentries": "^2.0.8", + "object.values": "^1.2.0", "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.4", + "resolve": "^2.0.0-next.5", "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.8" + "string.prototype.matchall": "^4.0.11", + "string.prototype.repeat": "^1.0.0" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" } }, "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", - "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", "dev": true, "engines": { "node": ">=10" @@ -8506,6 +7955,22 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -8542,6 +8007,51 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -8633,9 +8143,9 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -8814,17 +8324,17 @@ "dev": true }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dev": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -8957,6 +8467,12 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-uri": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", + "dev": true + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -8967,9 +8483,9 @@ } }, "node_modules/fastq": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -9044,9 +8560,9 @@ } }, "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==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -9221,19 +8737,16 @@ } }, "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "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": "^6.0.0", + "locate-path": "^5.0.0", "path-exists": "^4.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/flat": { @@ -9263,6 +8776,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "dependencies": { "glob": "^7.1.3" @@ -9275,15 +8789,15 @@ } }, "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.8.tgz", + "integrity": "sha512-xgrmBhBToVKay1q2Tao5LI26B83UhrB/vM1avwVSDzt8rx3rO6AizBAaF46EgksTVr+rFTQaqZZ9MVBfUe4nig==", "dev": true, "funding": [ { @@ -9304,7 +8818,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, "dependencies": { "is-callable": "^1.1.3" } @@ -9391,9 +8904,9 @@ } }, "node_modules/fs-monkey": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.5.tgz", - "integrity": "sha512-8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.6.tgz", + "integrity": "sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg==", "dev": true }, "node_modules/fs.realpath": { @@ -9420,7 +8933,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -9471,16 +8983,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", - "dev": true, + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { + "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -9519,13 +9034,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -9538,6 +9054,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -9610,12 +9127,13 @@ } }, "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, "dependencies": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -9654,7 +9172,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -9723,22 +9240,20 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -9750,7 +9265,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -9759,12 +9273,11 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -9774,10 +9287,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -9785,16 +9297,6 @@ "node": ">= 0.4" } }, - "node_modules/header-case": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", - "integrity": "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==", - "dev": true, - "dependencies": { - "capital-case": "^1.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -9898,9 +9400,9 @@ } }, "node_modules/html-entities": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.4.0.tgz", - "integrity": "sha512-igBTJcNNNhvZFRtm8uA6xMY6xYleeDwn3PeBCkDz7tHttv4F2hsDI2aPgNERWzvRcNYHNT3ymRaQzllmXj4YsQ==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz", + "integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==", "dev": true, "funding": [ { @@ -10078,9 +9580,9 @@ ] }, "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -10099,9 +9601,9 @@ } }, "node_modules/immutable": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", - "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", "dev": true }, "node_modules/import-fresh": { @@ -10139,9 +9641,9 @@ } }, "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, "dependencies": { "pkg-dir": "^4.2.0", @@ -10179,6 +9681,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, "dependencies": { "once": "^1.3.0", @@ -10188,8 +9691,7 @@ "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 + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ini": { "version": "1.3.8", @@ -10198,12 +9700,12 @@ "dev": true }, "node_modules/internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2", + "es-errors": "^1.3.0", "hasown": "^2.0.0", "side-channel": "^1.0.4" }, @@ -10221,9 +9723,9 @@ } }, "node_modules/ipaddr.js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz", - "integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", + "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", "dev": true, "engines": { "node": ">= 10" @@ -10238,15 +9740,32 @@ "node": ">=8" } }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10323,7 +9842,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -10332,12 +9850,30 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10425,7 +9961,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -10449,18 +9984,21 @@ } }, "node_modules/is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, "engines": { "node": ">= 0.4" @@ -10548,10 +10086,13 @@ } }, "node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, "engines": { "node": ">=0.10.0" } @@ -10579,21 +10120,27 @@ } }, "node_modules/is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10642,12 +10189,11 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", - "dev": true, + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dependencies": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -10675,10 +10221,13 @@ } }, "node_modules/is-weakmap": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -10696,13 +10245,16 @@ } }, "node_modules/is-weakset": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", - "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10798,18 +10350,6 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-report/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/istanbul-lib-report/node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", @@ -10826,13 +10366,10 @@ } }, "node_modules/istanbul-lib-report/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -10852,12 +10389,6 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-report/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/istanbul-lib-source-maps": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", @@ -10882,9 +10413,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -12337,29 +11868,14 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">=8" - } - }, - "node_modules/jest-snapshot/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": ">=8" } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -12379,12 +11895,6 @@ "node": ">=8" } }, - "node_modules/jest-snapshot/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/jest-util": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", @@ -12686,14 +12196,14 @@ } }, "node_modules/joi": { - "version": "17.12.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.0.tgz", - "integrity": "sha512-HSLsmSmXz+PV9PYoi3p7cgIbj06WnEBNT28n+bbBNcPZXZFqCzzvGqpTBPujx/Z0nh1+KNQPDrNgdmQ8dq0qYw==", + "version": "17.13.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz", + "integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==", "dev": true, "dependencies": { "@hapi/hoek": "^9.3.0", "@hapi/topo": "^5.1.0", - "@sideway/address": "^4.1.4", + "@sideway/address": "^4.1.5", "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } @@ -12717,9 +12227,9 @@ } }, "node_modules/jsdoc-type-pratt-parser": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-2.2.5.tgz", - "integrity": "sha512-2a6eRxSxp1BW040hFvaJxhsCMI9lT8QB8t14t+NY5tC5rckIR0U9cr2tjOeaFirmEOy6MHvmJnY7zTBHq431Lw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz", + "integrity": "sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw==", "dev": true, "engines": { "node": ">=12.0.0" @@ -12892,9 +12402,9 @@ "dev": true }, "node_modules/language-subtag-registry": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", - "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", + "version": "0.3.23", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", + "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", "dev": true }, "node_modules/language-tags": { @@ -12910,9 +12420,9 @@ } }, "node_modules/launch-editor": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.1.tgz", - "integrity": "sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.8.2.tgz", + "integrity": "sha512-eF5slEUZXmi6WvFzI3dYcv+hA24/iKnROf24HztcURJpSz9RBmBgz5cNCVOeguouf1llrwy6Yctl4C4HM+xI8g==", "dev": true, "dependencies": { "picocolors": "^1.0.0", @@ -12998,18 +12508,15 @@ } }, "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "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": "^5.0.0" + "p-locate": "^4.1.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/lodash": { @@ -13145,15 +12652,6 @@ "loose-envify": "cli.js" } }, - "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": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -13452,12 +12950,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -13516,12 +13014,13 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "2.7.7", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.7.tgz", - "integrity": "sha512-+0n11YGyRavUR3IlaOzJ0/4Il1avMvJ1VJfhWfCn24ITQXhRr1gghbhhrda6tgtNcpZaWKdSuwKq20Jb7fnlyw==", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.1.tgz", + "integrity": "sha512-+Vyi+GCCOHnrJ2VPS+6aPoXN2k2jgUzDRhTFLjjTBn23qyXJXkjUWQgTL+mXpF5/A8ixLdCc6kWsoeOjKGejKQ==", "dev": true, "dependencies": { - "schema-utils": "^4.0.0" + "schema-utils": "^4.0.0", + "tapable": "^2.2.1" }, "engines": { "node": ">= 12.13.0" @@ -13534,59 +13033,6 @@ "webpack": "^5.0.0" } }, - "node_modules/mini-css-extract-plugin/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "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" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/mini-css-extract-plugin/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/mini-css-extract-plugin/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/mini-css-extract-plugin/node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -13747,16 +13193,6 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "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-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -13815,9 +13251,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "node_modules/normalize-package-data": { @@ -13835,26 +13271,11 @@ "node": ">=10" } }, - "node_modules/normalize-package-data/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/normalize-package-data/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -13862,12 +13283,6 @@ "node": ">=10" } }, - "node_modules/normalize-package-data/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/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -13914,36 +13329,36 @@ "dev": true }, "node_modules/npm-package-json-lint": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-7.1.0.tgz", - "integrity": "sha512-ypcMpag32TCP89zzLSS+7vjeR2QY613WzmO2upcJgKNWlcswDz8cdb80urbBNHkhSPI40ex3nsKrRDH/WhMYOg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-8.0.0.tgz", + "integrity": "sha512-44xqAKoV0nXnBYYLGUhMItGZb5tW3cLoW3UZxcsaCOX/YAkECrzOQA5F48oAA51vVE5CqAnsJB2CFvtolzMA3Q==", "dev": true, "peer": true, "dependencies": { "ajv": "^6.12.6", "ajv-errors": "^1.0.1", "chalk": "^4.1.2", - "cosmiconfig": "^8.2.0", + "cosmiconfig": "^8.3.6", "debug": "^4.3.4", "globby": "^11.1.0", - "ignore": "^5.2.4", + "ignore": "^5.3.1", "is-plain-obj": "^3.0.0", - "jsonc-parser": "^3.2.0", + "jsonc-parser": "^3.2.1", "log-symbols": "^4.1.0", "meow": "^9.0.0", "plur": "^4.0.0", - "semver": "^7.5.4", + "semver": "^7.6.2", "slash": "^3.0.0", "strip-json-comments": "^3.1.1", - "type-fest": "^4.3.3", - "validate-npm-package-name": "^5.0.0" + "type-fest": "^4.20.0", + "validate-npm-package-name": "^5.0.1" }, "bin": { "npmPkgJsonLint": "dist/cli.js" }, "engines": { - "node": ">=16.0.0", - "npm": ">=8.0.0" + "node": ">=18.0.0", + "npm": ">=9.0.0" } }, "node_modules/npm-package-json-lint/node_modules/ansi-styles": { @@ -14057,34 +13472,18 @@ } }, "node_modules/npm-package-json-lint/node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", "dev": true, "peer": true }, - "node_modules/npm-package-json-lint/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, - "peer": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/npm-package-json-lint/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "peer": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -14106,9 +13505,9 @@ } }, "node_modules/npm-package-json-lint/node_modules/type-fest": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.9.0.tgz", - "integrity": "sha512-KS/6lh/ynPGiHD/LnAobrEFq3Ad4pBzOlJ1wAnJx9N4EYoqFhMfLIBjUT2UEx4wg5ZE+cC1ob6DCSpppVo+rtg==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.26.0.tgz", + "integrity": "sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==", "dev": true, "peer": true, "engines": { @@ -14118,13 +13517,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/npm-package-json-lint/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, - "peer": true - }, "node_modules/npm-packlist": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-3.0.0.tgz", @@ -14168,9 +13560,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "version": "2.2.12", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.12.tgz", + "integrity": "sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w==", "dev": true }, "node_modules/object-assign": { @@ -14189,10 +13581,29 @@ "dev": true }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -14225,28 +13636,29 @@ } }, "node_modules/object.entries": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", - "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", + "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -14256,39 +13668,28 @@ } }, "node_modules/object.groupby": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", - "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1" - } - }, - "node_modules/object.hasown": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.3.tgz", - "integrity": "sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", "dev": true, "dependencies": { - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.4" } }, "node_modules/object.values": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", - "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -14375,17 +13776,17 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -14401,33 +13802,30 @@ } }, "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "p-try": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "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": "^3.0.2" + "p-limit": "^2.2.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/p-map": { @@ -14461,16 +13859,6 @@ "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", @@ -14525,26 +13913,6 @@ "node": ">= 0.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-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", - "integrity": "sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==", - "dev": true, - "dependencies": { - "dot-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", @@ -14606,9 +13974,9 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "dev": true }, "node_modules/picomatch": { @@ -14650,77 +14018,25 @@ "pinkie": "^2.0.0" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/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/pkg-dir/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": ">=0.10.0" } }, - "node_modules/pkg-dir/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==", + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 6" } }, - "node_modules/pkg-dir/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==", + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "dependencies": { - "p-limit": "^2.2.0" + "find-up": "^4.0.0" }, "engines": { "node": ">=8" @@ -14741,10 +14057,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { - "version": "8.4.33", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", - "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "version": "8.4.45", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.45.tgz", + "integrity": "sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==", "dev": true, "funding": [ { @@ -14762,8 +14086,8 @@ ], "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -14886,26 +14210,11 @@ "webpack": "^5.0.0" } }, - "node_modules/postcss-loader/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/postcss-loader/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -14913,12 +14222,6 @@ "node": ">=10" } }, - "node_modules/postcss-loader/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/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", @@ -15024,9 +14327,9 @@ } }, "node_modules/postcss-modules-extract-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", + "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", "dev": true, "engines": { "node": "^10 || ^12 || >= 14" @@ -15036,9 +14339,9 @@ } }, "node_modules/postcss-modules-local-by-default": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.4.tgz", - "integrity": "sha512-L4QzMnOdVwRm1Qb8m4x8jsZzKAaPAgrUF1r/hjDR2Xj7R+8Zsf97jAlSQzWtKx5YNiNGN8QxmPFIc/sh+RQl+Q==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz", + "integrity": "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==", "dev": true, "dependencies": { "icss-utils": "^5.0.0", @@ -15053,9 +14356,9 @@ } }, "node_modules/postcss-modules-scope": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.1.tgz", - "integrity": "sha512-uZgqzdTleelWjzJY+Fhti6F3C9iF1JR/dODLs/JDefozYcKTBCdD8BIl6nNPbTbcLnGrk56hzwZC2DaGNvYjzA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz", + "integrity": "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==", "dev": true, "dependencies": { "postcss-selector-parser": "^6.0.4" @@ -15264,9 +14567,9 @@ } }, "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": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz", + "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==", "dev": true }, "node_modules/postcss-safe-parser": { @@ -15312,9 +14615,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.15", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", - "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, "dependencies": { "cssesc": "^3.0.0", @@ -15371,16 +14674,16 @@ } }, "node_modules/prettier": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", - "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", + "name": "wp-prettier", + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.8.5.tgz", + "integrity": "sha512-gkphzYtVksWV6D7/V530bTehKkhrABUru/Gy4reOLOHJoKH4i9lcE1SxqU2VDxC3gCOx/Nk9alZmWk6xL/IBCw==", "dev": true, - "peer": true, "bin": { - "prettier": "bin/prettier.cjs" + "prettier": "bin-prettier.js" }, "engines": { - "node": ">=14" + "node": ">=10.13.0" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -15551,10 +14854,28 @@ "node": ">=10.18.1" } }, + "node_modules/puppeteer-core/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/puppeteer-core/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "dependencies": { "glob": "^7.1.3" @@ -15656,9 +14977,9 @@ } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "dependencies": { "bytes": "3.1.2", @@ -15692,9 +15013,9 @@ } }, "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -15703,17 +15024,17 @@ } }, "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dev": true, "peer": true, "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "^18.2.0" + "react": "^18.3.1" } }, "node_modules/react-is": { @@ -15763,58 +15084,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "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" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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", @@ -15912,15 +15181,16 @@ } }, "node_modules/reflect.getprototypeof": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz", - "integrity": "sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", + "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.1", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", "globalthis": "^1.0.3", "which-builtin-type": "^1.1.3" }, @@ -15965,14 +15235,15 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -15998,15 +15269,6 @@ "node": ">=4" } }, - "node_modules/regextras": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.8.0.tgz", - "integrity": "sha512-k519uI04Z3SaY0fLX843MRXnDeG2+vHOFsyhiPZvNLe7r8rD2YNRjq4BQLZZ0oAr2NrtvZlICsXysGNFPGa3CQ==", - "dev": true, - "engines": { - "node": ">=0.1.14" - } - }, "node_modules/regjsparser": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", @@ -16153,6 +15415,7 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "dependencies": { "glob": "^7.1.3" @@ -16217,14 +15480,20 @@ "tslib": "^2.1.0" } }, + "node_modules/rxjs/node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "dev": true + }, "node_modules/safe-array-concat": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", - "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", - "get-intrinsic": "^1.2.2", + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -16256,13 +15525,13 @@ ] }, "node_modules/safe-regex-test": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz", - "integrity": "sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", - "get-intrinsic": "^1.2.2", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, "engines": { @@ -16279,9 +15548,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.70.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.70.0.tgz", - "integrity": "sha512-uUxNQ3zAHeAx5nRFskBnrWzDUJrrvpCPD5FNAoRvTi0WwremlheES3tg+56PaVtCs5QDRX5CBLxxKMDJMEa1WQ==", + "version": "1.78.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.78.0.tgz", + "integrity": "sha512-AaIqGSrjo5lA2Yg7RvFZrlXDBCp3nV4XP73GrLGvdRWWwk+8H3l0SDvq/5bA4eF+0RFPLuWUk3E+P1U/YqnpsQ==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -16346,9 +15615,9 @@ } }, "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dev": true, "peer": true, "dependencies": { @@ -16356,23 +15625,58 @@ } }, "node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", + "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" }, "engines": { - "node": ">= 10.13.0" + "node": ">= 12.13.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" } }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/schema-utils/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/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -16446,17 +15750,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/sentence-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz", - "integrity": "sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, "node_modules/serialize-javascript": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", @@ -16560,30 +15853,31 @@ } }, "node_modules/set-function-length": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", - "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", - "dev": true, + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dependencies": { - "define-data-property": "^1.1.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "dependencies": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -16662,14 +15956,18 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -16760,16 +16058,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/snake-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", - "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", - "dev": true, - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/sockjs": { "version": "0.3.24", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", @@ -16791,9 +16079,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -16861,9 +16149,9 @@ } }, "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==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", "dev": true }, "node_modules/spdx-expression-parse": { @@ -16877,9 +16165,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", - "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", "dev": true }, "node_modules/spdy": { @@ -16961,6 +16249,18 @@ "node": ">= 0.8" } }, + "node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dev": true, + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -17003,35 +16303,62 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/string.prototype.includes": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.0.tgz", + "integrity": "sha512-E34CkBgyeqNDcrbU76cDjL5JLcVrtSdYq0MEh/B10r17pRP4ciHLwTgnuLV8Ay6cgEMLkcBkFCKyFZ43YldYzg==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "node_modules/string.prototype.matchall": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", - "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", + "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "regexp.prototype.flags": "^1.5.0", - "set-function-name": "^2.0.0", - "side-channel": "^1.0.4" + "internal-slot": "^1.0.7", + "regexp.prototype.flags": "^1.5.2", + "set-function-name": "^2.0.2", + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "node_modules/string.prototype.repeat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", + "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -17041,28 +16368,31 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -17282,6 +16612,15 @@ "node": ">=6" } }, + "node_modules/stylelint/node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/stylelint/node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -17411,9 +16750,9 @@ "dev": true }, "node_modules/table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", + "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", "dev": true, "dependencies": { "ajv": "^8.0.1", @@ -17427,15 +16766,15 @@ } }, "node_modules/table/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -17502,9 +16841,9 @@ } }, "node_modules/terser": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.27.0.tgz", - "integrity": "sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==", + "version": "5.31.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz", + "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -17553,6 +16892,24 @@ } } }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -17643,9 +17000,9 @@ } }, "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, "dependencies": { "psl": "^1.1.33", @@ -17733,9 +17090,9 @@ } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "node_modules/tsutils": { @@ -17753,12 +17110,6 @@ "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -17806,29 +17157,30 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -17838,16 +17190,17 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -17857,14 +17210,20 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -17880,9 +17239,9 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, "peer": true, "bin": { @@ -17925,9 +17284,9 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true }, "node_modules/unicode-canonical-property-names-ecmascript": { @@ -17989,9 +17348,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", "dev": true, "funding": [ { @@ -18008,8 +17367,8 @@ } ], "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -18018,24 +17377,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/upper-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", - "integrity": "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/upper-case-first": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", - "integrity": "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -18072,6 +17413,24 @@ } } }, + "node_modules/url-loader/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -18082,6 +17441,18 @@ "requires-port": "^1.0.0" } }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -18143,14 +17514,11 @@ } }, "node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", + "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", "dev": true, "peer": true, - "dependencies": { - "builtins": "^5.0.0" - }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -18215,9 +17583,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -18246,34 +17614,33 @@ } }, "node_modules/webpack": { - "version": "5.89.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", - "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", "dev": true, "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -18293,9 +17660,9 @@ } }, "node_modules/webpack-bundle-analyzer": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.1.tgz", - "integrity": "sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==", + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz", + "integrity": "sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==", "dev": true, "dependencies": { "@discoveryjs/json-ext": "0.5.7", @@ -18306,7 +17673,6 @@ "escape-string-regexp": "^4.0.0", "gzip-size": "^6.0.0", "html-escaper": "^2.0.2", - "is-plain-object": "^5.0.0", "opener": "^1.5.2", "picocolors": "^1.0.0", "sirv": "^2.0.3", @@ -18320,10 +17686,13 @@ } }, "node_modules/webpack-bundle-analyzer/node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, "engines": { "node": ">=0.4.0" } @@ -18456,9 +17825,9 @@ } }, "node_modules/webpack-dev-middleware": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz", - "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", + "integrity": "sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==", "dev": true, "dependencies": { "colorette": "^2.0.10", @@ -18478,63 +17847,10 @@ "webpack": "^4.0.0 || ^5.0.0" } }, - "node_modules/webpack-dev-middleware/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "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" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/webpack-dev-middleware/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/webpack-dev-middleware/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/webpack-dev-middleware/node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/webpack-dev-server": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz", - "integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==", + "version": "4.15.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.2.tgz", + "integrity": "sha512-0XavAZbNJ5sDrCbkpWL8mia0o5WPOd2YGtxrEiZkBK9FjLppIUK2TgxK6qGD2P3hUXTJNNPVibrerKcx5WkR1g==", "dev": true, "dependencies": { "@types/bonjour": "^3.5.9", @@ -18565,7 +17881,7 @@ "serve-index": "^1.9.1", "sockjs": "^0.3.24", "spdy": "^4.0.2", - "webpack-dev-middleware": "^5.3.1", + "webpack-dev-middleware": "^5.3.4", "ws": "^8.13.0" }, "bin": { @@ -18590,44 +17906,11 @@ } } }, - "node_modules/webpack-dev-server/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "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" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/webpack-dev-server/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/webpack-dev-server/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/webpack-dev-server/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "dependencies": { "glob": "^7.1.3" @@ -18639,29 +17922,10 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/webpack-dev-server/node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/webpack-dev-server/node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, "engines": { "node": ">=10.0.0" @@ -18707,18 +17971,6 @@ "node": ">=6" } }, - "node_modules/webpack-merge/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/webpack-merge/node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -18749,6 +18001,24 @@ "node": ">=10.13.0" } }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", @@ -18842,13 +18112,13 @@ } }, "node_modules/which-builtin-type": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", - "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.4.tgz", + "integrity": "sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==", "dev": true, "dependencies": { - "function.prototype.name": "^1.1.5", - "has-tostringtag": "^1.0.0", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", "is-async-function": "^2.0.0", "is-date-object": "^1.0.5", "is-finalizationregistry": "^1.0.2", @@ -18857,8 +18127,8 @@ "is-weakref": "^1.0.2", "isarray": "^2.0.5", "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.9" + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -18868,31 +18138,33 @@ } }, "node_modules/which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "dependencies": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", - "dev": true, + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -18907,6 +18179,15 @@ "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", "dev": true }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -18976,9 +18257,9 @@ } }, "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "dev": true, "engines": { "node": ">=8.3.0" diff --git a/assets/js/frontend/blocks/package.json b/assets/js/frontend/blocks/package.json index 3990b8e..e3cf300 100644 --- a/assets/js/frontend/blocks/package.json +++ b/assets/js/frontend/blocks/package.json @@ -25,6 +25,7 @@ "@wordpress/scripts": "^25.3.0" }, "dependencies": { - "react": "^18.2.0" + "react": "^18.2.0", + "util": "^0.12.5" } } diff --git a/assets/js/frontend/blocks/webpack.config.js b/assets/js/frontend/blocks/webpack.config.js index c510538..cecb1f5 100644 --- a/assets/js/frontend/blocks/webpack.config.js +++ b/assets/js/frontend/blocks/webpack.config.js @@ -2,51 +2,56 @@ const defaultConfig = require( '@wordpress/scripts/config/webpack.config' ); const DependencyExtractionWebpackPlugin = require( '@wordpress/dependency-extraction-webpack-plugin' ); const requestToExternal = ( request ) => { - const wcDepMap = { - '@woocommerce/components': [ 'window', 'wc', 'components' ], - '@woocommerce/csv-export': [ 'window', 'wc', 'csvExport' ], - '@woocommerce/currency': [ 'window', 'wc', 'currency' ], - '@woocommerce/date': [ 'window', 'wc', 'date' ], - '@woocommerce/navigation': [ 'window', 'wc', 'navigation' ], - '@woocommerce/number': [ 'window', 'wc', 'number' ], - '@woocommerce/settings': [ 'window', 'wc', 'wcSettings' ], - '@woocommerce/tracks': [ 'window', 'wc', 'tracks' ], - '@woocommerce/blocks-registry': ['wc', 'wcBlocksRegistry'], - }; + const wcDepMap = { + '@woocommerce/components': [ 'window', 'wc', 'components' ], + '@woocommerce/csv-export': [ 'window', 'wc', 'csvExport' ], + '@woocommerce/currency': [ 'window', 'wc', 'currency' ], + '@woocommerce/date': [ 'window', 'wc', 'date' ], + '@woocommerce/navigation': [ 'window', 'wc', 'navigation' ], + '@woocommerce/number': [ 'window', 'wc', 'number' ], + '@woocommerce/settings': [ 'window', 'wc', 'wcSettings' ], + '@woocommerce/tracks': [ 'window', 'wc', 'tracks' ], + '@woocommerce/blocks-registry': ['wc', 'wcBlocksRegistry'], + }; - if ( wcDepMap[ request ] ) { - return wcDepMap[ request ]; - } + if ( wcDepMap[ request ] ) { + return wcDepMap[ request ]; + } }; const requestToHandle = ( request ) => { - const wcHandleMap = { - '@woocommerce/components': 'wc-components', - '@woocommerce/csv-export': 'wc-csv', - '@woocommerce/currency': 'wc-currency', - '@woocommerce/date': 'wc-date', - '@woocommerce/navigation': 'wc-navigation', - '@woocommerce/number': 'wc-number', - '@woocommerce/settings': 'wc-settings', - '@woocommerce/tracks': 'wc-tracks', - }; + const wcHandleMap = { + '@woocommerce/components': 'wc-components', + '@woocommerce/csv-export': 'wc-csv', + '@woocommerce/currency': 'wc-currency', + '@woocommerce/date': 'wc-date', + '@woocommerce/navigation': 'wc-navigation', + '@woocommerce/number': 'wc-number', + '@woocommerce/settings': 'wc-settings', + '@woocommerce/tracks': 'wc-tracks', + }; - if ( wcHandleMap[ request ] ) { - return wcHandleMap[ request ]; - } + if ( wcHandleMap[ request ] ) { + return wcHandleMap[ request ]; + } }; module.exports = { - ...defaultConfig, - plugins: [ - ...defaultConfig.plugins.filter( - ( plugin ) => - plugin.constructor.name !== 'DependencyExtractionWebpackPlugin' - ), - new DependencyExtractionWebpackPlugin( { - injectPolyfill: true, - requestToExternal, - requestToHandle, - } ), - ], + ...defaultConfig, + plugins: [ + ...defaultConfig.plugins.filter( + ( plugin ) => + plugin.constructor.name !== 'DependencyExtractionWebpackPlugin' + ), + new DependencyExtractionWebpackPlugin( { + injectPolyfill: true, + requestToExternal, + requestToHandle, + } ), + ], + resolve: { + fallback: { + util: require.resolve("util/") + } + } }; diff --git a/assets/js/frontend/checkout.js b/assets/js/frontend/checkout.js index 177d12d..3bda670 100644 --- a/assets/js/frontend/checkout.js +++ b/assets/js/frontend/checkout.js @@ -33,7 +33,7 @@ jQuery( /** * This function gets interesting info for testing */ - info : function() { + info : function () { var versions = window.wallee_js_params.versions || {}; var info = [ {library: 'integration', version: window.wallee_js_params.integration}, @@ -42,10 +42,10 @@ jQuery( {library: 'woocommerce', version: versions.woocommerce || null}, {library: 'woo-wallee', version: versions.wallee || null}, ]; - console.table(info, []); + console.table( info, [] ); }, - init : function() { + init : function () { // Payment methods. this.$checkout_form.off( 'click.woo-wallee' ).on( 'click.woo-wallee', @@ -83,15 +83,15 @@ jQuery( window.wc_wallee_checkout = this; }, - check_form_data_change : function() { + check_form_data_change : function () { var $required_inputs = this.$checkout_form.find( '.address-field.validate-required' ).find( 'input, select' ); var current = ''; var complete = true; if ( $required_inputs.length ) { $required_inputs.each( - function() { + function () { if ( ! $( this ).is( ':visible' )) { - return true; + return true; } if ( ! $( this ).val()) { complete = false; @@ -118,7 +118,7 @@ jQuery( }, - payment_method_click : function(event) { + payment_method_click : function (event) { var self = event.data.self; var current_method = self.get_selected_payment_method(); if ( ! self.is_supported_method( current_method )) { @@ -141,7 +141,7 @@ jQuery( } }, - handle_description_for_empty_iframe : function(method_id) { + handle_description_for_empty_iframe : function (method_id) { var current_method = this.get_selected_payment_method(); if ( ! this.is_supported_method( current_method )) { @@ -167,10 +167,10 @@ jQuery( if ( required_inputs.length ) { required_inputs.each( - function() { + function () { if ( $( this ).find( ':input' ).val() === '' ) { - has_full_address = false; - return false; + has_full_address = false; + return false; } } ); @@ -194,7 +194,7 @@ jQuery( } }, - handle_place_order_button_status: function(method_id){ + handle_place_order_button_status: function (method_id) { if ( ! this.payment_methods[method_id].button_active) { this.disable_place_order_button(); } else { @@ -202,12 +202,12 @@ jQuery( } }, - enable_place_order_button: function(){ + enable_place_order_button: function () { this.$order_button.removeAttr( 'disabled' ); this.$order_button.removeClass( 'wallee-disabled' ); }, - disable_place_order_button: function(){ + disable_place_order_button: function () { this.$order_button.prop( 'disabled', true ); this.$order_button.addClass( 'wallee-disabled' ); }, @@ -216,15 +216,15 @@ jQuery( * This function handle the success function of Place Order in WooCommerce * @version <=7.4.1 */ - register_ajax_prefilter : function() { + register_ajax_prefilter : function () { var self = this; $.ajaxPrefilter( "json", - function(options, originalOptions, jqXHR) { + function (options, originalOptions, jqXHR) { if (options.url === wc_checkout_params.checkout_url && self.is_supported_method( self.get_selected_payment_method() )) { var original_success = options.success; - options.success = function(data, textStatus, jqXHR) { + options.success = function (data, textStatus, jqXHR) { $( window ).unbind( "beforeunload" ); if ('success' === data.result) { if (self.process_order_created( data, textStatus, jqXHR )) { @@ -235,9 +235,9 @@ jQuery( original_success( data, textStatus,jqXHR ); } else if (typeof original_success != "undefined" && original_success.constructor === Array) { original_success.forEach( - function(original_function) { + function (original_function) { if (typeof original_function == 'function') { - original_function( data, textStatus, jqXHR ); + original_function ( data, textStatus, jqXHR ); } } ); @@ -248,7 +248,7 @@ jQuery( ); $.ajaxPrefilter( - function(options, originalOptions, jqXHR) { + function (options, originalOptions, jqXHR) { var target = wc_checkout_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'update_order_review' ); if (options.url === target) { // no updates on invalid fields. @@ -268,7 +268,7 @@ jQuery( * This function handle the success function of Place Order in WooCommerce * @version >=7.5.0 */ - register_window_fetch_prefilter : function() { + register_window_fetch_prefilter : function () { var {fetch: origFetch} = window; var self = this; @@ -276,16 +276,20 @@ jQuery( var response = await origFetch(url, options); /* work with the cloned response in a separate promise chain -- could use the same chain with `await`. */ - if (url === wc_checkout_params.checkout_url && self.is_supported_method( self.get_selected_payment_method() )) { - response - .clone() - .json() - .then(body => { - if (body.result !== undefined && 'success' === body.result){ - self.process_order_created(body); - } - }) - .catch(err => console.error(err)); + if (url === wc_checkout_params.checkout_url + && self.is_supported_method( self.get_selected_payment_method() )) { + response + .clone() + .json() + .then( + body => { + if (body.result !== undefined && 'success' === body.result) { + self.process_order_created( body ); + } + } + ) + .catch( err => console.error( err ) ); + } /* the original response can be resolved unmodified: */ @@ -293,15 +297,15 @@ jQuery( }; }, - is_supported_method : function(method_id) { + is_supported_method : function (method_id) { return method_id && (method_id.indexOf( 'wallee_' ) === 0); }, - get_selected_payment_method : function() { + get_selected_payment_method : function () { return this.$checkout_form.find( 'input[name="payment_method"]:checked' ).val(); }, - register_method : function(method_id, configuration_id, container_id) { + register_method : function (method_id, configuration_id, container_id) { if (typeof window.IframeCheckoutHandler == 'undefined') { this.payment_methods[method_id] = { height : 0, @@ -333,36 +337,36 @@ jQuery( configuration_id : configuration_id, container_id : tmp_container_id, handler : window.IframeCheckoutHandler( configuration_id ), - button_active : true, + button_active : true, height : 0 }; this.payment_methods[method_id].handler.setValidationCallback( - function(validation_result) { + function (validation_result) { self.process_validation( method_id, validation_result ); } ); this.payment_methods[method_id].handler.setHeightChangeCallback( - function(height) { + function (height) { self.payment_methods[method_id].height = height; self.handle_description_for_empty_iframe( method_id ); } ); this.payment_methods[method_id].handler.setInitializeCallback( - function(){ + function () { self.$checkout_form.unblock(); } ); this.payment_methods[method_id].handler.setEnableSubmitCallback( - function(){ + function () { self.payment_methods[method_id].button_active = true; self.handle_place_order_button_status( method_id ); } ); this.payment_methods[method_id].handler.setDisableSubmitCallback( - function(){ + function () { self.payment_methods[method_id].button_active = false; self.handle_place_order_button_status( method_id ); } @@ -379,7 +383,7 @@ jQuery( this.$checkout_form.off( 'submit.wallee' ) .on( 'submit.wallee', - function(){ + function () { var method_id = self.get_selected_payment_method(); return self.process_submit( method_id ); } @@ -388,14 +392,14 @@ jQuery( this.$checkout_form.off( 'checkout_place_order_' + method_id + '.wallee' ) .on( 'checkout_place_order_' + method_id + '.wallee', - function(){ + function () { return self.process_submit( method_id ); } ); } }, - process_submit : function(method_id){ + process_submit : function (method_id) { if ( ! this.is_supported_method( method_id )) { return true; } @@ -406,10 +410,10 @@ jQuery( if ( required_inputs.length ) { required_inputs.each( - function() { + function () { if ( $( this ).find( ':input' ).val() === '' ) { - has_full_address = false; - return false; + has_full_address = false; + return false; } } ); @@ -443,7 +447,7 @@ jQuery( url: window.location.href, data: new URLSearchParams( new FormData( form[0] ) ).toString(), dataType: 'json', - success: function( result ) { + success: function ( result ) { self.validated = false; if (typeof result.wallee == 'undefined') { window.location.reload(); @@ -452,7 +456,7 @@ jQuery( self.payment_methods[self.get_selected_payment_method()].handler.submit(); return true; }, - error: function( jqXHR, textStatus, errorThrown ) { + error: function ( jqXHR, textStatus, errorThrown ) { window.location.reload(); } } @@ -463,7 +467,7 @@ jQuery( } }, - process_order_created : function(data, textStatus, jqXHR) { + process_order_created : function (data, textStatus, jqXHR) { var self = this; // handle lightbox integration. if (wallee_js_params.integration && wallee_js_params.integration === self.integrations.LIGHTBOX ) { @@ -508,7 +512,7 @@ jQuery( } }, - process_validation : function(method_id, validation_result) { + process_validation : function (method_id, validation_result) { if (validation_result.success) { this.validated = true; this.$checkout_form.submit(); @@ -533,7 +537,7 @@ jQuery( }, // We emulate the woocommerce submit_error function, as it is not callable from outside. - submit_error: function( error_message ) { + submit_error: function ( error_message ) { var self = this; var formatted_message = '
' + this.format_error_messages( error_message ) + '
'; $( '.woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message' ).remove(); @@ -549,7 +553,7 @@ jQuery( $( document.body ).trigger( 'checkout_error' ); }, - format_error_messages : function(messages) { + format_error_messages : function (messages) { var formatted_message; if (typeof messages == 'object') { formatted_message = messages.join( "\n" ); diff --git a/changelog.txt b/changelog.txt index 0eac0a1..4a39fdc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -804,6 +804,42 @@ Tested against: - [Tested Against] Woocommerce 9.1.4 - [Tested Against] PHP SDK 4.5.0 -= 3.1.3 - Sep 20 2024 = -- [Hotfix] Rolledback to version 3.0.11 += 3.0.12 - Aug 21 2024 = +- [Feature] Implemented the Webhook Signing Mechanism +- [Tested Against] PHP 8.0 and PHP 7.4 +- [Tested Against] Wordpress 6.6 +- [Tested Against] Woocommerce 9.1.4 +- [Tested Against] PHP SDK 4.5.0 + += 3.1.0 - Sept 12 2024 = +- [Feature] Add privacy policy URL +- [Feature] Adhere to WP code standards +- [Feature] Add Support for WC 9.2.x +- [Bugfix] Fix for error when renewing subscriptions +- [Bugfix] Fix for deferred payments status being incorrect +- [Tested Against] PHP 8.2 and PHP 7.4 +- [Tested Against] Wordpress 6.6 +- [Tested Against] Woocommerce 9.1.4 & Woocommerce 9.2.1 +- [Tested Against] PHP SDK 4.5.0 + += 3.1.1 - Sept 13 2024 = +- [Bugfix] Added migrations for 3.1.0 changes. +- [Tested Against] PHP 8.2 +- [Tested Against] Wordpress 6.6 +- [Tested Against] Woocommerce 9.3.1 +- [Tested Against] PHP SDK 4.5.0 + += 3.1.2 - Sept 13 2024 = +- [Bugfix] Fixed installation error. +- [Tested Against] PHP 8.2 +- [Tested Against] Wordpress 6.6 +- [Tested Against] Woocommerce 9.3.1 +- [Tested Against] PHP SDK 4.5.0 + += 3.1.3 - Sept 20 2024 = +- [Bugfix] Enchanced plugin performance on Checkout page. +- [Tested Against] PHP 8.2 +- [Tested Against] Wordpress 6.6 +- [Tested Against] Woocommerce 9.3.1 +- [Tested Against] PHP SDK 4.5.0 diff --git a/includes/admin/class-wc-wallee-admin-document.php b/includes/admin/class-wc-wallee-admin-document.php index 229484a..a31a668 100644 --- a/includes/admin/class-wc-wallee-admin-document.php +++ b/includes/admin/class-wc-wallee-admin-document.php @@ -1,7 +1,9 @@ $order->get_id(), - 'refer' => 'overview', + 'post' => $order->get_id(), + 'refer' => 'overview', 'wallee_admin' => 'download_invoice', ), admin_url( 'post.php' ) @@ -97,8 +98,8 @@ public static function add_buttons_to_overview( WC_Order $order ) { $url = wp_nonce_url( add_query_arg( array( - 'post' => $order->get_id(), - 'refer' => 'overview', + 'post' => $order->get_id(), + 'refer' => 'overview', 'wallee_admin' => 'download_packing', ), admin_url( 'post.php' ) @@ -113,6 +114,7 @@ public static function add_buttons_to_overview( WC_Order $order ) { /** * Add WC Meta boxes. + * * @see: https://woo.com/document/high-performance-order-storage/#section-8 */ public static function add_meta_box() { @@ -136,8 +138,8 @@ public static function add_meta_box() { /** * Output the metabox. * - * @param WP_Post|WP_Order $post_or_order_object - * This object is provided by woocommerce when using its screen. + * @param WP_Post|WP_Order $post_or_order_object The post or object. + * This object is provided by woocommerce when using its screen. */ public static function output( $post_or_order_object ) { $order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object; @@ -170,8 +172,8 @@ public static function output( $post_or_order_object ) { wp_nonce_url( add_query_arg( array( - 'post' => $order->get_id(), - 'refer' => 'edit', + 'post' => $order->get_id(), + 'refer' => 'edit', 'wallee_admin' => 'download_invoice', ), admin_url( 'post.php' ) @@ -223,14 +225,14 @@ public static function download_document() { } // sanitize data and verify nonce. - $action = isset( $_GET['wallee_admin'] ) ? sanitize_key( $_GET['wallee_admin'] ) : null; - $nonce = isset( $_GET['nonce'] ) ? sanitize_key( $_GET['nonce'] ) : null; + $action = isset( $_GET['wallee_admin'] ) ? sanitize_key( wp_unslash( $_GET['wallee_admin'] ) ) : null; + $nonce = isset( $_GET['nonce'] ) ? sanitize_key( wp_unslash( $_GET['nonce'] ) ) : null; if ( ! wp_verify_nonce( $nonce, $action ) ) { wp_die( 'Invalid request.' ); } // validate allowed user roles. - $user = wp_get_current_user(); + $user = wp_get_current_user(); $allowed_roles = apply_filters( 'wc_wallee_allowed_roles_to_download_documents', array( @@ -242,7 +244,7 @@ public static function download_document() { wp_die( 'Access denied' ); } - $order_id = isset( $_GET['post'] ) ? intval( $_GET['post'] ) : null; + $order_id = isset( $_GET['post'] ) ? intval( wp_unslash( $_GET['post'] ) ) : null; try { switch ( $action ) { case 'download_invoice': @@ -258,13 +260,13 @@ public static function download_document() { wp_die( esc_html__( 'Could not fetch the document from wallee.', 'woo-wallee' ) . ' ' . esc_textarea( $cleaned ) ); } - $refer = isset( $_GET['refer'] ); + $refer = isset( $_GET['refer'] ) ? sanitize_key( wp_unslash( $_GET['refer'] ) ) : 0; if ( 'edit' === $refer ) { wp_safe_redirect( add_query_arg( array( - 'post' => $order_id, + 'post' => $order_id, 'action' => 'edit', ), admin_url( 'post.php' ) @@ -289,7 +291,7 @@ public static function download_document() { * @return bool */ private static function is_download_request() { - return ( isset( $_GET['post'] ) && isset( $_GET['wallee_admin'] ) && isset( $_GET['nonce'] ) ); + return ( isset( $_GET['post'] ) && isset( $_GET['wallee_admin'] ) && isset( $_GET['nonce'] ) ); // phpcs:ignore } } diff --git a/includes/admin/class-wc-wallee-admin-notices.php b/includes/admin/class-wc-wallee-admin-notices.php index 31b2e91..ca18498 100644 --- a/includes/admin/class-wc-wallee-admin-notices.php +++ b/includes/admin/class-wc-wallee-admin-notices.php @@ -1,7 +1,9 @@ get_base_gateway_url(); - $space_id = get_option( WooCommerce_Wallee::CK_SPACE_ID ); + $space_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_ID ); if ( ! empty( $space_id ) ) { $manual_task_url .= '/s/' . $space_id . '/manual-task/list'; } @@ -80,8 +81,8 @@ public static function round_subtotal_notices() { $screen = get_current_screen(); if ( 'woocommerce_page_wc-settings' === $screen->id ) { if ( wc_tax_enabled() && ( 'yes' === get_option( 'woocommerce_tax_round_at_subtotal' ) ) ) { - if ( 'yes' === get_option( WooCommerce_Wallee::CK_ENFORCE_CONSISTENCY ) ) { - $error_message = __( "'WooCommerce > Settings > Wallee > Enforce Consistency' and 'WooCommerce > Settings > Tax > Rounding' are both enabled. Please disable at least one of them.", 'woo-wallee' ); + if ( 'yes' === get_option( WooCommerce_Wallee::WALLEE_CK_ENFORCE_CONSISTENCY ) ) { + $error_message = esc_html__( "'WooCommerce > Settings > Wallee > Enforce Consistency' and 'WooCommerce > Settings > Tax > Rounding' are both enabled. Please disable at least one of them.", 'woo-wallee' ); WooCommerce_Wallee::instance()->log( $error_message, WC_Log_Levels::ERROR ); require_once WC_WALLEE_ABSPATH . '/views/admin-notices/round-subtotal-warning.php'; } diff --git a/includes/admin/class-wc-wallee-admin-order-completion.php b/includes/admin/class-wc-wallee-admin-order-completion.php index 9bbe3e1..115b983 100644 --- a/includes/admin/class-wc-wallee-admin-order-completion.php +++ b/includes/admin/class-wc-wallee-admin-order-completion.php @@ -1,7 +1,9 @@ 0, + 'qty' => 0, 'completion_total' => 0, - 'completion_tax' => array(), + 'completion_tax' => array(), ); } foreach ( $line_item_qtys as $item_id => $qty ) { @@ -146,7 +146,7 @@ public static function execute_completion() { foreach ( $item['completion_tax'] as $rate_id => $amount ) { $percent = WC_Tax::get_rate_percent( $rate_id ); - $rate = rtrim( $percent, '%' ); + $rate = rtrim( $percent, '%' ); $tax_amount = $item['completion_total'] * $rate / 100; if ( wc_format_decimal( $tax_amount, wc_get_price_decimals() ) !== wc_format_decimal( $amount, wc_get_price_decimals() ) ) { @@ -196,7 +196,7 @@ public static function execute_completion() { $completion_job->set_restock( $restock_not_completed_items ); $completion_job->set_space_id( $transaction_info->get_space_id() ); $completion_job->set_transaction_id( $transaction_info->get_transaction_id() ); - $completion_job->set_state( WC_Wallee_Entity_Completion_Job::STATE_CREATED ); + $completion_job->set_state( WC_Wallee_Entity_Completion_Job::WALLEE_STATE_CREATED ); $completion_job->set_order_id( $order_id ); $completion_job->set_amount( $completion_amount ); $completion_job->save(); @@ -213,8 +213,8 @@ public static function execute_completion() { } try { - //the order id is saved for later use - //e.g. use the order id to check if the order has a discount applied to it + // the order id is saved for later use + // e.g. use the order id to check if the order has a discount applied to it. WC()->session->set( 'wallee_order_id', $order_id ); self::update_line_items( $current_completion_id ); self::send_completion( $current_completion_id ); @@ -248,7 +248,7 @@ protected static function update_line_items( $completion_job_id ) { // Reload void job. $completion_job = WC_Wallee_Entity_Completion_Job::load_by_id( $completion_job_id ); - if ( $completion_job->get_state() !== WC_Wallee_Entity_Completion_Job::STATE_CREATED ) { + if ( $completion_job->get_state() !== WC_Wallee_Entity_Completion_Job::WALLEE_STATE_CREATED ) { // Already updated in the meantime. WC_Wallee_Helper::instance()->rollback_database_transaction(); return; @@ -264,12 +264,12 @@ protected static function update_line_items( $completion_job_id ) { $completion_job->get_transaction_id(), $line_items ); - $completion_job->set_state( WC_Wallee_Entity_Completion_Job::STATE_ITEMS_UPDATED ); + $completion_job->set_state( WC_Wallee_Entity_Completion_Job::WALLEE_STATE_ITEMS_UPDATED ); $completion_job->save(); WC_Wallee_Helper::instance()->commit_database_transaction(); } catch ( \Wallee\Sdk\ApiException $e ) { if ( $e->getResponseObject() instanceof \Wallee\Sdk\Model\ClientError ) { - $completion_job->set_state( WC_Wallee_Entity_Completion_Job::STATE_DONE ); + $completion_job->set_state( WC_Wallee_Entity_Completion_Job::WALLEE_STATE_DONE ); $completion_job->save(); WC_Wallee_Helper::instance()->commit_database_transaction(); } else { @@ -302,7 +302,7 @@ protected static function send_completion( $completion_job_id ) { // Reload void job. $completion_job = WC_Wallee_Entity_Completion_Job::load_by_id( $completion_job_id ); - if ( $completion_job->get_state() !== WC_Wallee_Entity_Completion_Job::STATE_ITEMS_UPDATED ) { + if ( $completion_job->get_state() !== WC_Wallee_Entity_Completion_Job::WALLEE_STATE_ITEMS_UPDATED ) { // Already sent in the meantime. WC_Wallee_Helper::instance()->rollback_database_transaction(); return; @@ -315,12 +315,12 @@ protected static function send_completion( $completion_job_id ) { $completion_job->get_transaction_id() ); $completion_job->set_completion_id( $completion->getId() ); - $completion_job->set_state( WC_Wallee_Entity_Completion_Job::STATE_SENT ); + $completion_job->set_state( WC_Wallee_Entity_Completion_Job::WALLEE_STATE_SENT ); $completion_job->save(); WC_Wallee_Helper::instance()->commit_database_transaction(); } catch ( \Wallee\Sdk\ApiException $e ) { if ( $e->getResponseObject() instanceof \Wallee\Sdk\Model\ClientError ) { - $completion_job->set_state( WC_Wallee_Entity_Completion_Job::STATE_DONE ); + $completion_job->set_state( WC_Wallee_Entity_Completion_Job::WALLEE_STATE_DONE ); $completion_job->save(); WC_Wallee_Helper::instance()->commit_database_transaction(); } else { @@ -351,10 +351,10 @@ public static function update_for_order( WC_Order $order ) { $transaction_info = WC_Wallee_Entity_Transaction_Info::load_by_order_id( $order->get_id() ); $completion_job = WC_Wallee_Entity_Completion_Job::load_running_completion_for_transaction( $transaction_info->get_space_id(), $transaction_info->get_transaction_id() ); - if ( $completion_job->get_state() === WC_Wallee_Entity_Completion_Job::STATE_CREATED ) { + if ( $completion_job->get_state() === WC_Wallee_Entity_Completion_Job::WALLEE_STATE_CREATED ) { self::update_line_items( $completion_job->get_id() ); self::send_completion( $completion_job->get_id() ); - } elseif ( $completion_job->get_state() === WC_Wallee_Entity_Completion_Job::STATE_ITEMS_UPDATED ) { + } elseif ( $completion_job->get_state() === WC_Wallee_Entity_Completion_Job::WALLEE_STATE_ITEMS_UPDATED ) { self::send_completion( $completion_job->get_id() ); } } @@ -371,7 +371,7 @@ public static function update_completions() { self::update_line_items( $id ); self::send_completion( $id ); } catch ( Exception $e ) { - /* translators: %1$d: id of transaction, %2$s: error message */ + /* translators: %d: id of transaction, %s: error message */ $message = sprintf( __( 'Error updating completion job with id %1$d: %2$s', 'woo-wallee' ), $id, $e->getMessage() ); WooCommerce_Wallee::instance()->log( $message, WC_Log_Levels::ERROR ); } diff --git a/includes/admin/class-wc-wallee-admin-order-void.php b/includes/admin/class-wc-wallee-admin-order-void.php index 246ef5f..9e97685 100644 --- a/includes/admin/class-wc-wallee-admin-order-void.php +++ b/includes/admin/class-wc-wallee-admin-order-void.php @@ -1,7 +1,9 @@ start_database_transaction(); $transaction_info = WC_Wallee_Entity_Transaction_Info::load_by_order_id( $order_id ); @@ -135,7 +135,7 @@ public static function execute_void() { $void_job->set_restock( $restock_void_items ); $void_job->set_space_id( $transaction_info->get_space_id() ); $void_job->set_transaction_id( $transaction_info->get_transaction_id() ); - $void_job->set_state( WC_Wallee_Entity_Void_Job::STATE_CREATED ); + $void_job->set_state( WC_Wallee_Entity_Void_Job::WALLEE_STATE_CREATED ); $void_job->set_order_id( $order_id ); $void_job->save(); $current_void_id = $void_job->get_id(); @@ -180,7 +180,7 @@ protected static function send_void( $void_job_id ) { WC_Wallee_Helper::instance()->lock_by_transaction_id( $void_job->get_space_id(), $void_job->get_transaction_id() ); // Reload void job. $void_job = WC_Wallee_Entity_Void_Job::load_by_id( $void_job_id ); - if ( $void_job->get_state() !== WC_Wallee_Entity_Void_Job::STATE_CREATED ) { + if ( $void_job->get_state() !== WC_Wallee_Entity_Void_Job::WALLEE_STATE_CREATED ) { // Already sent in the meantime. WC_Wallee_Helper::instance()->rollback_database_transaction(); return; @@ -190,12 +190,12 @@ protected static function send_void( $void_job_id ) { $void = $void_service->voidOnline( $void_job->get_space_id(), $void_job->get_transaction_id() ); $void_job->set_void_id( $void->getId() ); - $void_job->set_state( WC_Wallee_Entity_Void_Job::STATE_SENT ); + $void_job->set_state( WC_Wallee_Entity_Void_Job::WALLEE_STATE_SENT ); $void_job->save(); WC_Wallee_Helper::instance()->commit_database_transaction(); } catch ( \Wallee\Sdk\ApiException $e ) { if ( $e->getResponseObject() instanceof \Wallee\Sdk\Model\ClientError ) { - $void_job->set_state( WC_Wallee_Entity_Void_Job::STATE_DONE ); + $void_job->set_state( WC_Wallee_Entity_Void_Job::WALLEE_STATE_DONE ); $void_job->save(); WC_Wallee_Helper::instance()->commit_database_transaction(); } else { @@ -223,9 +223,9 @@ protected static function send_void( $void_job_id ) { */ public static function update_for_order( WC_Order $order ) { $transaction_info = WC_Wallee_Entity_Transaction_Info::load_by_order_id( $order->get_id() ); - $void_job = WC_Wallee_Entity_Void_Job::load_running_void_for_transaction( $transaction_info->get_space_id(), $transaction_info->get_transaction_id() ); + $void_job = WC_Wallee_Entity_Void_Job::load_running_void_for_transaction( $transaction_info->get_space_id(), $transaction_info->get_transaction_id() ); - if ( $void_job->get_state() === WC_Wallee_Entity_Void_Job::STATE_CREATED ) { + if ( $void_job->get_state() === WC_Wallee_Entity_Void_Job::WALLEE_STATE_CREATED ) { self::send_void( $void_job->get_id() ); } } @@ -241,7 +241,7 @@ public static function update_voids() { try { self::send_void( $id ); } catch ( Exception $e ) { - /* translators: %1$d: id, %2$s: message */ + /* translators: %d: id, %s: message */ $message = sprintf( __( 'Error updating void job with id %1$d: %2$s', 'woo-wallee' ), $id, $e->getMessage() ); WooCommerce_Wallee::instance()->log( $message, WC_Log_Levels::ERROR ); } diff --git a/includes/admin/class-wc-wallee-admin-refund.php b/includes/admin/class-wc-wallee-admin-refund.php index 517dc4f..56f1297 100644 --- a/includes/admin/class-wc-wallee-admin-refund.php +++ b/includes/admin/class-wc-wallee-admin-refund.php @@ -1,7 +1,9 @@ get_id() ); - if ( ! in_array( $transaction_info->get_state(), self::$refundable_states ) ) { + if ( ! in_array( $transaction_info->get_state(), self::$refundable_states, true ) ) { echo ''; } else { $existing_refund_job = WC_Wallee_Entity_Refund_Job::load_running_refund_for_transaction( @@ -104,11 +103,11 @@ public static function render_refund_button_state( WC_Order $order ) { $transaction_info->get_transaction_id() ); if ( $existing_refund_job->get_id() > 0 ) { - echo '' . esc_html( __( 'There is a refund in progress.', 'woo-wallee' ) ) . ''; - echo ''; - echo ''; + printf( '%s', esc_html( esc_html__( 'There is a refund in progress.', 'woo-wallee' ) ) ); + printf( '', esc_html( esc_html__( 'Update', 'woo-wallee' ) ) ); + printf( '' ); } - echo ''; + printf( '' ); } } } @@ -139,27 +138,27 @@ public static function render_refund_states( $order_id ) { * @return void */ public static function store_refund_in_globals( $refund, $request_args ) { - $GLOBALS['wallee_refund_id'] = $refund->get_id(); + $GLOBALS['wallee_refund_id'] = $refund->get_id(); $GLOBALS['wallee_refund_request_args'] = $request_args; } /** * Executes refund. * - * @param WC_Order $order wc_order. + * @param WC_Order $order wc_order. * @param WC_Order_Refund $refund refund. * @return void * @throws Exception Exception. */ public static function execute_refund( WC_Order $order, WC_Order_Refund $refund ) { $current_refund_job_id = null; - $transaction_info = null; - $refund_service = WC_Wallee_Service_Refund::instance(); + $transaction_info = null; + $refund_service = WC_Wallee_Service_Refund::instance(); try { WC_Wallee_Helper::instance()->start_database_transaction(); $transaction_info = WC_Wallee_Entity_Transaction_Info::load_by_order_id( $order->get_id() ); if ( ! $transaction_info->get_id() ) { - throw new Exception( __( 'Could not load corresponding transaction', 'woo-wallee' ) ); + throw new Exception( esc_html__( 'Could not load corresponding transaction', 'woo-wallee' ) ); } WC_Wallee_Helper::instance()->lock_by_transaction_id( $transaction_info->get_space_id(), $transaction_info->get_transaction_id() ); @@ -168,10 +167,10 @@ public static function execute_refund( WC_Order $order, WC_Order_Refund $refund $transaction_info->get_space_id(), $transaction_info->get_transaction_id() ) > 0 ) { - throw new Exception( __( 'Please wait until the pending refund is processed.', 'woo-wallee' ) ); + throw new Exception( esc_html__( 'Please wait until the pending refund is processed.', 'woo-wallee' ) ); } - $refund_create = $refund_service->create( $order, $refund ); - $refund_job = self::create_refund_job( $order, $refund, $refund_create ); + $refund_create = $refund_service->create( $order, $refund ); + $refund_job = self::create_refund_job( $order, $refund, $refund_create ); $current_refund_job_id = $refund_job->get_id(); $refund->add_meta_data( '_wallee_refund_job_id', $refund_job->get_id() ); @@ -199,7 +198,7 @@ protected static function send_refund( $refund_job_id ) { // Reload void job. $refund_job = WC_Wallee_Entity_Refund_Job::load_by_id( $refund_job_id ); - if ( $refund_job->get_state() != WC_Wallee_Entity_Refund_Job::STATE_CREATED ) { + if ( $refund_job->get_state() != WC_Wallee_Entity_Refund_Job::WALLEE_STATE_CREATED ) { // Already sent in the meantime. WC_Wallee_Helper::instance()->rollback_database_transaction(); return; @@ -207,36 +206,38 @@ protected static function send_refund( $refund_job_id ) { try { $refund_service = WC_Wallee_Service_Refund::instance(); $executed_refund = $refund_service->refund( $refund_job->get_space_id(), $refund_job->get_refund() ); - $refund_job->set_state( WC_Wallee_Entity_Refund_Job::STATE_SENT ); + $refund_job->set_state( WC_Wallee_Entity_Refund_Job::WALLEE_STATE_SENT ); if ( $executed_refund->getState() == \Wallee\Sdk\Model\RefundState::PENDING ) { - $refund_job->set_state( WC_Wallee_Entity_Refund_Job::STATE_PENDING ); + $refund_job->set_state( WC_Wallee_Entity_Refund_Job::WALLEE_STATE_PENDING ); } $refund_job->save(); WC_Wallee_Helper::instance()->commit_database_transaction(); } catch ( \Wallee\Sdk\ApiException $e ) { + $error_message = $e->getMessage(); if ( $e->getResponseObject() instanceof \Wallee\Sdk\Model\ClientError ) { $refund_job->set_failure_reason( array( 'en-US' => $e->getResponseObject()->getMessage(), ) ); - $refund_job->set_state( WC_Wallee_Entity_Refund_Job::STATE_FAILURE ); + $refund_job->set_state( WC_Wallee_Entity_Refund_Job::WALLEE_STATE_FAILURE ); $refund_job->save(); WC_Wallee_Helper::instance()->commit_database_transaction(); } else { $refund_job->save(); WC_Wallee_Helper::instance()->commit_database_transaction(); - WooCommerce_Wallee::instance()->log( 'Error sending refund. ' . $e->getMessage(), WC_Log_Levels::INFO ); + WooCommerce_Wallee::instance()->log( 'Error sending refund. ' . $error_message, WC_Log_Levels::INFO ); /* translators: %s: message */ - throw new Exception( sprintf( __( 'There has been an error while sending the refund to the gateway. Error: %s', 'woo-wallee' ), $e->getMessage() ) ); + throw new Exception( sprintf( esc_html__( 'There has been an error while sending the refund to the gateway. Error: %s', 'woo-wallee' ), esc_html( $error_message ) ) ); } } catch ( Exception $e ) { $refund_job->save(); + $error_message = $e->getMessage(); WC_Wallee_Helper::instance()->commit_database_transaction(); - WooCommerce_Wallee::instance()->log( 'Error sending refund. ' . $e->getMessage(), WC_Log_Levels::INFO ); + WooCommerce_Wallee::instance()->log( 'Error sending refund. ' . $error_message, WC_Log_Levels::INFO ); /* translators: %s: message */ - throw new Exception( sprintf( __( 'There has been an error while sending the refund to the gateway. Error: %s', 'woo-wallee' ), $e->getMessage() ) ); + throw new Exception( sprintf( esc_html__( 'There has been an error while sending the refund to the gateway. Error: %s', 'woo-wallee' ), esc_html( $error_message ) ) ); } } @@ -249,9 +250,9 @@ protected static function send_refund( $refund_job_id ) { public static function update_for_order( WC_Order $order ) { $transaction_info = WC_Wallee_Entity_Transaction_Info::load_by_order_id( $order->get_id() ); - $refund_job = WC_Wallee_Entity_Refund_Job::load_running_refund_for_transaction( $transaction_info->get_space_id(), $transaction_info->get_transaction_id() ); + $refund_job = WC_Wallee_Entity_Refund_Job::load_running_refund_for_transaction( $transaction_info->get_space_id(), $transaction_info->get_transaction_id() ); - if ( $refund_job->get_state() == WC_Wallee_Entity_Refund_Job::STATE_CREATED ) { + if ( $refund_job->get_state() == WC_Wallee_Entity_Refund_Job::WALLEE_STATE_CREATED ) { self::send_refund( $refund_job->get_id() ); } } @@ -267,8 +268,8 @@ public static function update_refunds() { try { self::send_refund( $id ); } catch ( Exception $e ) { - /* translators: %1$d: id, %2$s: message */ - $message = sprintf( __( 'Error updating refund job with id %1$d: %2$s', 'woo-wallee' ), $id, $e->getMessage() ); + /* translators: %d: id, %s: message */ + $message = sprintf( esc_html__( 'Error updating refund job with id %1$d: %2$s', 'woo-wallee' ), $id, $e->getMessage() ); WooCommerce_Wallee::instance()->log( $message, WC_Log_Levels::ERROR ); } } @@ -277,15 +278,15 @@ public static function update_refunds() { /** * Creates a new refund job for the given order and refund. * - * @param WC_Order $order wc_order. - * @param WC_Order_Refund $refund refund. + * @param WC_Order $order wc_order. + * @param WC_Order_Refund $refund refund. * @param \Wallee\Sdk\Model\RefundCreate $refund_create refund_create. * @return WC_Wallee_Entity_Refund_Job */ private static function create_refund_job( WC_Order $order, WC_Order_Refund $refund, \Wallee\Sdk\Model\RefundCreate $refund_create ) { $transaction_info = WC_Wallee_Entity_Transaction_Info::load_by_order_id( $order->get_id() ); - $refund_job = new WC_Wallee_Entity_Refund_Job(); - $refund_job->set_state( WC_Wallee_Entity_Refund_Job::STATE_CREATED ); + $refund_job = new WC_Wallee_Entity_Refund_Job(); + $refund_job->set_state( WC_Wallee_Entity_Refund_Job::WALLEE_STATE_CREATED ); $refund_job->set_wc_refund_id( $refund->get_id() ); $refund_job->set_order_id( $order->get_id() ); $refund_job->set_space_id( $transaction_info->get_space_id() ); diff --git a/includes/admin/class-wc-wallee-admin-settings-page.php b/includes/admin/class-wc-wallee-admin-settings-page.php index a159162..aed3d72 100644 --- a/includes/admin/class-wc-wallee-admin-settings-page.php +++ b/includes/admin/class-wc-wallee-admin-settings-page.php @@ -1,7 +1,9 @@ id = 'wallee'; + $this->id = 'wallee'; $this->label = 'wallee'; add_filter( @@ -100,7 +99,6 @@ public function settings_tab() { public function save() { $settings = $this->get_settings(); WC_Admin_Settings::save_fields( $settings ); - } /** @@ -111,8 +109,8 @@ public function save() { */ public function update_settings() { WC_Wallee_Helper::instance()->reset_api_client(); - $user_id = get_option( WooCommerce_Wallee::CK_APP_USER_ID ); - $user_key = get_option( WooCommerce_Wallee::CK_APP_USER_KEY ); + $user_id = get_option( WooCommerce_Wallee::WALLEE_CK_APP_USER_ID ); + $user_key = get_option( WooCommerce_Wallee::WALLEE_CK_APP_USER_KEY ); if ( ! ( empty( $user_id ) || empty( $user_key ) ) ) { $error_message = ''; try { @@ -120,7 +118,7 @@ public function update_settings() { } catch ( \Exception $e ) { WooCommerce_Wallee::instance()->log( $e->getMessage(), WC_Log_Levels::ERROR ); WooCommerce_Wallee::instance()->log( $e->getTraceAsString(), WC_Log_Levels::DEBUG ); - $error_message = __( 'Could not update payment method configuration.', 'woo-wallee' ); + $error_message = esc_html__( 'Could not update payment method configuration.', 'woo-wallee' ); WC_Admin_Settings::add_error( $error_message ); } try { @@ -128,7 +126,7 @@ public function update_settings() { } catch ( \Exception $e ) { WooCommerce_Wallee::instance()->log( $e->getMessage(), WC_Log_Levels::ERROR ); WooCommerce_Wallee::instance()->log( $e->getTraceAsString(), WC_Log_Levels::DEBUG ); - $error_message = __( 'Could not install webhooks, please check if the feature is active in your space.', 'woo-wallee' ); + $error_message = esc_html__( 'Could not install webhooks, please check if the feature is active in your space.', 'woo-wallee' ); WC_Admin_Settings::add_error( $error_message ); } try { @@ -136,7 +134,7 @@ public function update_settings() { } catch ( \Exception $e ) { WooCommerce_Wallee::instance()->log( $e->getMessage(), WC_Log_Levels::ERROR ); WooCommerce_Wallee::instance()->log( $e->getTraceAsString(), WC_Log_Levels::DEBUG ); - $error_message = __( 'Could not update the manual task list.', 'woo-wallee' ); + $error_message = esc_html__( 'Could not update the manual task list.', 'woo-wallee' ); WC_Admin_Settings::add_error( $error_message ); } try { @@ -149,20 +147,19 @@ public function update_settings() { } if ( wc_tax_enabled() && ( 'yes' === get_option( 'woocommerce_tax_round_at_subtotal' ) ) ) { - if ( 'yes' === get_option( WooCommerce_Wallee::CK_ENFORCE_CONSISTENCY ) ) { - $error_message = __( "'WooCommerce > Settings > Wallee > Enforce Consistency' and 'WooCommerce > Settings > Tax > Rounding' are both enabled. Please disable at least one of them.", 'woo-wallee' ); + if ( 'yes' === get_option( WooCommerce_Wallee::WALLEE_CK_ENFORCE_CONSISTENCY ) ) { + $error_message = esc_html__( "'WooCommerce > Settings > Wallee > Enforce Consistency' and 'WooCommerce > Settings > Tax > Rounding' are both enabled. Please disable at least one of them.", 'woo-wallee' ); WC_Admin_Settings::add_error( $error_message ); WooCommerce_Wallee::instance()->log( $error_message, WC_Log_Levels::ERROR ); } } if ( ! empty( $error_message ) ) { - $error_message = __( 'Please check your credentials and grant the application user the necessary rights (Account Admin) for your space.', 'woo-wallee' ); + $error_message = esc_html__( 'Please check your credentials and grant the application user the necessary rights (Account Admin) for your space.', 'woo-wallee' ); WC_Admin_Settings::add_error( $error_message ); } WC_Wallee_Helper::instance()->delete_provider_transients(); } - } /** @@ -187,186 +184,186 @@ public function get_settings() { $settings = array( array( 'links' => array( - 'https://plugin-documentation.wallee.com/wallee-payment/woocommerce/3.1.3/docs/en/documentation.html' => __( 'Documentation', 'woo-wallee' ), - 'https://app-wallee.com/user/signup' => __( 'Sign Up', 'woo-wallee' ), + 'https://plugin-documentation.wallee.com/wallee-payment/woocommerce/3.1.3/docs/en/documentation.html' => esc_html__( 'Documentation', 'woo-wallee' ), + 'https://app-wallee.com/user/signup' => esc_html__( 'Sign Up', 'woo-wallee' ), ), 'type' => 'wallee_links', ), array( - 'title' => __( 'General Settings', 'woo-wallee' ), + 'title' => esc_html__( 'General Settings', 'woo-wallee' ), 'desc' => - __( + esc_html__( 'Enter your application user credentials and space id, if you don\'t have an account already sign up above.', 'woo-wallee' ), 'type' => 'title', - 'id' => 'general_options', + 'id' => 'general_options', ), array( - 'title' => __( 'Space Id', 'woo-wallee' ), - 'id' => WooCommerce_Wallee::CK_SPACE_ID, - 'type' => 'text', - 'css' => 'min-width:300px;', - 'desc' => __( '(required)', 'woo-wallee' ), + 'title' => esc_html__( 'Space Id', 'woo-wallee' ), + 'id' => WooCommerce_Wallee::WALLEE_CK_SPACE_ID, + 'type' => 'text', + 'css' => 'min-width:300px;', + 'desc' => esc_html__( '(required)', 'woo-wallee' ), ), array( - 'title' => __( 'User Id', 'woo-wallee' ), - 'desc_tip' => __( 'The user needs to have full permissions in the space this shop is linked to.', 'woo-wallee' ), - 'id' => WooCommerce_Wallee::CK_APP_USER_ID, - 'type' => 'text', - 'css' => 'min-width:300px;', - 'desc' => __( '(required)', 'woo-wallee' ), + 'title' => esc_html__( 'User Id', 'woo-wallee' ), + 'desc_tip' => esc_html__( 'The user needs to have full permissions in the space this shop is linked to.', 'woo-wallee' ), + 'id' => WooCommerce_Wallee::WALLEE_CK_APP_USER_ID, + 'type' => 'text', + 'css' => 'min-width:300px;', + 'desc' => esc_html__( '(required)', 'woo-wallee' ), ), array( - 'title' => __( 'Authentication Key', 'woo-wallee' ), - 'id' => WooCommerce_Wallee::CK_APP_USER_KEY, - 'type' => 'password', - 'css' => 'min-width:300px;', - 'desc' => __( '(required)', 'woo-wallee' ), + 'title' => esc_html__( 'Authentication Key', 'woo-wallee' ), + 'id' => WooCommerce_Wallee::WALLEE_CK_APP_USER_KEY, + 'type' => 'password', + 'css' => 'min-width:300px;', + 'desc' => esc_html__( '(required)', 'woo-wallee' ), ), array( 'type' => 'sectionend', - 'id' => 'general_options', + 'id' => 'general_options', ), array( - 'title' => __( 'Email Options', 'woo-wallee' ), - 'type' => 'title', - 'id' => 'email_options', + 'title' => esc_html__( 'Email Options', 'woo-wallee' ), + 'type' => 'title', + 'id' => 'email_options', ), array( - 'title' => __( 'Send Order Email', 'woo-wallee' ), - 'desc' => __( 'Send the order email of WooCommerce.', 'woo-wallee' ), - 'id' => WooCommerce_Wallee::CK_SHOP_EMAIL, - 'type' => 'checkbox', + 'title' => esc_html__( 'Send Order Email', 'woo-wallee' ), + 'desc' => esc_html__( 'Send the order email of WooCommerce.', 'woo-wallee' ), + 'id' => WooCommerce_Wallee::WALLEE_CK_SHOP_EMAIL, + 'type' => 'checkbox', 'default' => 'yes', - 'css' => 'min-width:300px;', + 'css' => 'min-width:300px;', ), array( 'type' => 'sectionend', - 'id' => 'email_options', + 'id' => 'email_options', ), array( - 'title' => __( 'Document Options', 'woo-wallee' ), - 'type' => 'title', - 'id' => 'document_options', + 'title' => esc_html__( 'Document Options', 'woo-wallee' ), + 'type' => 'title', + 'id' => 'document_options', ), array( - 'title' => __( 'Invoice Download', 'woo-wallee' ), - 'desc' => __( 'Allow customers to download the invoice.', 'woo-wallee' ), - 'id' => WooCommerce_Wallee::CK_CUSTOMER_INVOICE, - 'type' => 'checkbox', + 'title' => esc_html__( 'Invoice Download', 'woo-wallee' ), + 'desc' => esc_html__( 'Allow customers to download the invoice.', 'woo-wallee' ), + 'id' => WooCommerce_Wallee::WALLEE_CK_CUSTOMER_INVOICE, + 'type' => 'checkbox', 'default' => 'yes', - 'css' => 'min-width:300px;', + 'css' => 'min-width:300px;', ), array( - 'title' => __( 'Packing Slip Download', 'woo-wallee' ), - 'desc' => __( 'Allow customers to download the packing slip.', 'woo-wallee' ), - 'id' => WooCommerce_Wallee::CK_CUSTOMER_PACKING, - 'type' => 'checkbox', + 'title' => esc_html__( 'Packing Slip Download', 'woo-wallee' ), + 'desc' => esc_html__( 'Allow customers to download the packing slip.', 'woo-wallee' ), + 'id' => WooCommerce_Wallee::WALLEE_CK_CUSTOMER_PACKING, + 'type' => 'checkbox', 'default' => 'yes', - 'css' => 'min-width:300px;', + 'css' => 'min-width:300px;', ), array( 'type' => 'sectionend', - 'id' => 'document_options', + 'id' => 'document_options', ), array( - 'title' => __( 'Space View Options', 'woo-wallee' ), - 'type' => 'title', - 'id' => 'space_view_options', + 'title' => esc_html__( 'Space View Options', 'woo-wallee' ), + 'type' => 'title', + 'id' => 'space_view_options', ), array( - 'title' => __( 'Space View Id', 'woo-wallee' ), - 'desc_tip' => __( 'The Space View Id allows to control the styling of the payment form and the payment page within the space.', 'woo-wallee' ), - 'id' => WooCommerce_Wallee::CK_SPACE_VIEW_ID, - 'type' => 'number', - 'css' => 'min-width:300px;', + 'title' => esc_html__( 'Space View Id', 'woo-wallee' ), + 'desc_tip' => esc_html__( 'The Space View Id allows to control the styling of the payment form and the payment page within the space.', 'woo-wallee' ), + 'id' => WooCommerce_Wallee::WALLEE_CK_SPACE_VIEW_ID, + 'type' => 'number', + 'css' => 'min-width:300px;', ), array( 'type' => 'sectionend', - 'id' => 'space_view_options', + 'id' => 'space_view_options', ), array( - 'title' => __( 'Integration Options', 'woo-wallee' ), - 'type' => 'title', - 'id' => 'integration_options', + 'title' => esc_html__( 'Integration Options', 'woo-wallee' ), + 'type' => 'title', + 'id' => 'integration_options', ), array( - 'title' => __( 'Integration Type', 'woo-wallee' ), - 'desc_tip' => __( 'The integration type controls how the payment form is integrated into the WooCommerce checkout. The Lightbox integration type offers better performance but with a less compelling checkout experience.', 'woo-wallee' ), - 'id' => WooCommerce_Wallee::CK_INTEGRATION, - 'type' => 'select', - 'css' => 'min-width:300px;', - 'default' => WC_Wallee_Integration::IFRAME, - 'options' => array( - WC_Wallee_Integration::IFRAME => $this->format_display_string( __( 'iframe', 'woo-wallee' ) ), - WC_Wallee_Integration::LIGHTBOX => $this->format_display_string( __( 'lightbox', 'woo-wallee' ) ), + 'title' => esc_html__( 'Integration Type', 'woo-wallee' ), + 'desc_tip' => esc_html__( 'The integration type controls how the payment form is integrated into the WooCommerce checkout. The Lightbox integration type offers better performance but with a less compelling checkout experience.', 'woo-wallee' ), + 'id' => WooCommerce_Wallee::WALLEE_CK_INTEGRATION, + 'type' => 'select', + 'css' => 'min-width:300px;', + 'default' => WC_Wallee_Integration::WALLEE_IFRAME, + 'options' => array( + WC_Wallee_Integration::WALLEE_IFRAME => $this->format_display_string( esc_html__( 'iframe', 'woo-wallee' ) ), + WC_Wallee_Integration::WALLEE_LIGHTBOX => $this->format_display_string( esc_html__( 'lightbox', 'woo-wallee' ) ), ), ), array( 'type' => 'sectionend', - 'id' => 'integration_options', + 'id' => 'integration_options', ), array( - 'title' => __( 'Line Items Options', 'woo-wallee' ), - 'type' => 'title', - 'id' => 'line_items_options', + 'title' => esc_html__( 'Line Items Options', 'woo-wallee' ), + 'type' => 'title', + 'id' => 'line_items_options', ), array( - 'title' => __( 'Enforce Consistency', 'woo-wallee' ), - 'desc' => __( 'Require that the transaction line items total is matching the order total.', 'woo-wallee' ), - 'id' => WooCommerce_Wallee::CK_ENFORCE_CONSISTENCY, - 'type' => 'checkbox', + 'title' => esc_html__( 'Enforce Consistency', 'woo-wallee' ), + 'desc' => esc_html__( 'Require that the transaction line items total is matching the order total.', 'woo-wallee' ), + 'id' => WooCommerce_Wallee::WALLEE_CK_ENFORCE_CONSISTENCY, + 'type' => 'checkbox', 'default' => 'yes', - 'css' => 'min-width:300px;', + 'css' => 'min-width:300px;', ), array( 'type' => 'sectionend', - 'id' => 'line_items_options', + 'id' => 'line_items_options', ), array( - 'title' => __( 'Reference Options', 'woo-wallee' ), - 'type' => 'title', - 'id' => 'reference_options', + 'title' => esc_html__( 'Reference Options', 'woo-wallee' ), + 'type' => 'title', + 'id' => 'reference_options', ), array( - 'title' => __( 'Order Reference Type', 'woo-wallee' ), - 'desc_tip' => __( 'Choose which order reference is sent.', 'woo-wallee' ), - 'id' => WooCommerce_Wallee::CK_ORDER_REFERENCE, - 'type' => 'select', - 'css' => 'min-width:300px;', - 'default' => WC_Wallee_Order_Reference::ORDER_ID, - 'options' => array( - WC_Wallee_Order_Reference::ORDER_ID => $this->format_display_string( __( 'order_id', 'woo-wallee' ) ), - WC_Wallee_Order_Reference::ORDER_NUMBER => $this->format_display_string( __( 'order_number', 'woo-wallee' ) ), + 'title' => esc_html__( 'Order Reference Type', 'woo-wallee' ), + 'desc_tip' => esc_html__( 'Choose which order reference is sent.', 'woo-wallee' ), + 'id' => WooCommerce_Wallee::WALLEE_CK_ORDER_REFERENCE, + 'type' => 'select', + 'css' => 'min-width:300px;', + 'default' => WC_Wallee_Order_Reference::WALLEE_ORDER_ID, + 'options' => array( + WC_Wallee_Order_Reference::WALLEE_ORDER_ID => $this->format_display_string( esc_html__( 'order_id', 'woo-wallee' ) ), + WC_Wallee_Order_Reference::WALLEE_ORDER_NUMBER => $this->format_display_string( esc_html__( 'order_number', 'woo-wallee' ) ), ), ), array( 'type' => 'sectionend', - 'id' => 'reference_options', + 'id' => 'reference_options', ), ); diff --git a/includes/admin/class-wc-wallee-admin-transaction.php b/includes/admin/class-wc-wallee-admin-transaction.php index 8c62747..22bb175 100644 --- a/includes/admin/class-wc-wallee-admin-transaction.php +++ b/includes/admin/class-wc-wallee-admin-transaction.php @@ -1,7 +1,9 @@ ID ) || 'shop_order' != $post->post_type ) { + return; + } $screen = class_exists( '\Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController' ) && wc_get_container()->get( \Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled() ? wc_get_page_screen_id( 'shop-order' ) @@ -64,8 +67,8 @@ public static function add_meta_box() { /** * Output the metabox. * - * @param WP_Post|WP_Order $post_or_order_object - * This object is provided by woocommerce when using its screen. + * @param WP_Post|WP_Order $post_or_order_object the post or order object. + * This object is provided by woocommerce when using its screen. */ public static function output( $post_or_order_object ) { $order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object; @@ -99,43 +102,43 @@ public static function output( $post_or_order_object ) { get_image() ) ) : ?> - +
- + - - + + get_order_id() != null ) : ?> - - - - get_order_id() ); ?> - + + + + get_order_id() ); ?> + get_failure_reason() != null ) : ?> - + - - get_failure_reason() ); ?> + + get_failure_reason() ); ?> - + - get_authorization_amount(), array( 'currency' => $transaction_info->get_currency() ) ); ?> + get_authorization_amount(), array( 'currency' => $transaction_info->get_currency() ) ); ?> @@ -184,25 +187,25 @@ public static function output( $post_or_order_object ) { protected static function get_transaction_state( WC_Wallee_Entity_Transaction_Info $transaction_info ) { switch ( $transaction_info->get_state() ) { case \Wallee\Sdk\Model\TransactionState::AUTHORIZED: - return __( 'Authorized', 'woo-wallee' ); + return esc_html__( 'Authorized', 'woo-wallee' ); case \Wallee\Sdk\Model\TransactionState::COMPLETED: - return __( 'Completed', 'woo-wallee' ); + return esc_html__( 'Completed', 'woo-wallee' ); case \Wallee\Sdk\Model\TransactionState::CONFIRMED: - return __( 'Confirmed', 'woo-wallee' ); + return esc_html__( 'Confirmed', 'woo-wallee' ); case \Wallee\Sdk\Model\TransactionState::DECLINE: - return __( 'Decline', 'woo-wallee' ); + return esc_html__( 'Decline', 'woo-wallee' ); case \Wallee\Sdk\Model\TransactionState::FAILED: - return __( 'Failed', 'woo-wallee' ); + return esc_html__( 'Failed', 'woo-wallee' ); case \Wallee\Sdk\Model\TransactionState::FULFILL: - return __( 'Fulfill', 'woo-wallee' ); + return esc_html__( 'Fulfill', 'woo-wallee' ); case \Wallee\Sdk\Model\TransactionState::PENDING: - return __( 'Pending', 'woo-wallee' ); + return esc_html__( 'Pending', 'woo-wallee' ); case \Wallee\Sdk\Model\TransactionState::PROCESSING: - return __( 'Processing', 'woo-wallee' ); + return esc_html__( 'Processing', 'woo-wallee' ); case \Wallee\Sdk\Model\TransactionState::VOIDED: - return __( 'Voided', 'woo-wallee' ); + return esc_html__( 'Voided', 'woo-wallee' ); default: - return __( 'Unknown State', 'woo-wallee' ); + return esc_html__( 'Unknown State', 'woo-wallee' ); } } @@ -225,7 +228,7 @@ protected static function get_transaction_url( WC_Wallee_Entity_Transaction_Info */ protected static function get_grouped_charge_attempt_labels( WC_Wallee_Entity_Transaction_Info $info ) { try { - $label_description_provider = WC_Wallee_Provider_Label_Description::instance(); + $label_description_provider = WC_Wallee_Provider_Label_Description::instance(); $label_description_group_provider = WC_Wallee_Provider_Label_Description_Group::instance(); $labels_by_group_id = array(); @@ -234,7 +237,7 @@ protected static function get_grouped_charge_attempt_labels( WC_Wallee_Entity_Tr if ( $descriptor && $descriptor->getCategory() == \Wallee\Sdk\Model\LabelDescriptorCategory::HUMAN ) { $labels_by_group_id[ $descriptor->getGroup() ][] = array( 'descriptor' => $descriptor, - 'value' => $value, + 'value' => $value, ); } } diff --git a/includes/admin/class-wc-wallee-admin.php b/includes/admin/class-wc-wallee-admin.php index 3595b42..bcb8a3f 100644 --- a/includes/admin/class-wc-wallee-admin.php +++ b/includes/admin/class-wc-wallee-admin.php @@ -1,7 +1,9 @@ get_id() ); - if ( $transaction_info->get_state() == \Wallee\Sdk\Model\TransactionState::AUTHORIZED ) { + if ( $transaction_info->get_state() === \Wallee\Sdk\Model\TransactionState::AUTHORIZED ) { if ( WC_Wallee_Entity_Completion_Job::count_running_completion_for_transaction( $transaction_info->get_space_id(), $transaction_info->get_transaction_id() @@ -200,8 +197,7 @@ public function render_authorized_action_buttons( WC_Order $order ) { echo ''; } else { echo ''; - echo ''; + echo ''; } } } @@ -210,7 +206,7 @@ public function render_authorized_action_buttons( WC_Order $order ) { /** * Remove unwanted order actions * - * @param array $actions actions. + * @param array $actions actions. * @param WC_Order $order order. * @return array */ @@ -242,14 +238,14 @@ public function loaded() { * Enqueue the script and css files */ public function enque_script_and_css() { - $screen = get_current_screen(); + $screen = get_current_screen(); $post_type = $screen ? $screen->post_type : ''; if ( 'shop_order' == $post_type ) { wp_enqueue_style( 'woo-wallee-admin-styles', WooCommerce_Wallee::instance()->plugin_url() . '/assets/css/admin.css', array(), - 1 + true ); wp_enqueue_script( 'wallee-admin-js', @@ -258,12 +254,13 @@ public function enque_script_and_css() { 'jquery', 'wc-admin-meta-boxes', ), - 1 + true, + true ); $localize = array( - 'i18n_do_void' => __( 'Are you sure you wish to process this void? This action cannot be undone.', 'woo-wallee' ), - 'i18n_do_completion' => __( 'Are you sure you wish to process this completion? This action cannot be undone.', 'woo-wallee' ), + 'i18n_do_void' => esc_html__( 'Are you sure you wish to process this void? This action cannot be undone.', 'woo-wallee' ), + 'i18n_do_completion' => esc_html__( 'Are you sure you wish to process this completion? This action cannot be undone.', 'woo-wallee' ), ); wp_localize_script( 'wallee-admin-js', 'wallee_admin_js_params', $localize ); } @@ -291,17 +288,15 @@ public function update_order() { check_ajax_referer( 'order-item', 'security' ); - if ( ! current_user_can( 'edit_shop_orders' ) ) { + if ( ! current_user_can( 'edit_shop_orders' ) ) {// phpcs:ignore wp_die( -1 ); } if ( ! isset( $_POST['order_id'] ) ) { return; - } else { - $order_id = sanitize_key( wp_unslash( $_POST['order_id'] ) ); } - $order_id = absint( $order_id ); - $order = WC_Order_Factory::get_order( $order_id ); + $order_id = absint( sanitize_key( wp_unslash( $_POST['order_id'] ) ) ); + $order = WC_Order_Factory::get_order( $order_id ); try { do_action( 'wallee_update_running_jobs', $order ); } catch ( Exception $e ) { @@ -334,7 +329,7 @@ public function add_settings( $integrations ) { public function plugin_action_links( $links ) { $action_links = array( 'settings' => '' . esc_html__( 'Settings', 'woo-wallee' ) . '', + esc_html__( 'View Settings', 'woo-wallee' ) . '">' . esc_html__( 'Settings', 'woo-wallee' ) . '', ); return array_merge( $action_links, $links ); @@ -346,7 +341,7 @@ public function plugin_action_links( $links ) { * @param mixed $product product. * @param mixed $data_storage data storage. */ - public function store_attribute_options( $product, $data_storage ) { + public function store_attribute_options( $product, $data_storage ) { //phpcs:ignore global $wallee_attributes_options; if ( ! empty( $wallee_attributes_options ) ) { $product->add_meta_data( '_wallee_attribute_options', $wallee_attributes_options, true ); @@ -357,39 +352,52 @@ public function store_attribute_options( $product, $data_storage ) { * Display attribute options edit screen */ public function display_attribute_options_edit() { - if ( ! isset( $_GET['edit'] ) ) { + if ( ! isset( $_GET['edit'] ) ) {// phpcs:ignore return; } else { - $edit = esc_url_raw( wp_unslash( $_GET['edit'] ) ); + $edit = esc_url_raw( wp_unslash( $_GET['edit'] ) );// phpcs:ignore } - $edit = absint( $edit ); - $checked = false; + $edit = absint( $edit ); + $checked = false; $attribute_options = WC_Wallee_Entity_Attribute_Options::load_by_attribute_id( $edit ); if ( $attribute_options->get_id() > 0 && $attribute_options->get_send() ) { $checked = true; } - echo ' + echo esc_html( + ' - + - -

' . esc_html__( 'Should this product attribute be sent to wallee as line item attribute?', 'woo-wallee' ) . '

+ +

' + ) . esc_html__( 'Should this product attribute be sent to wallee as line item attribute?', 'woo-wallee' ) . esc_html( + '

- '; + ' + ); } /** * Display attribute options add screen */ public function display_attribute_options_add() { - echo '
- -

' . esc_html__( 'Should this product attribute be sent to wallee as line item attribute?', 'woo-wallee' ) . '

-
'; + echo esc_html( + '
+ +

' + ) . esc_html__( 'Should this product attribute be sent to wallee as line item attribute?', 'woo-wallee' ) . + esc_html( + '

+
' + ); } - - } WC_Wallee_Admin::instance(); diff --git a/includes/class-wc-wallee-autoloader.php b/includes/class-wc-wallee-autoloader.php index 543ea30..865ccc4 100644 --- a/includes/class-wc-wallee-autoloader.php +++ b/includes/class-wc-wallee-autoloader.php @@ -1,7 +1,9 @@ include_path . 'provider/'; } elseif ( strpos( $class, 'wc_wallee_webhook' ) === 0 ) { - $path = $this->include_path . 'webhook/'; + if ( strpos( $class, 'strategy' ) !== false ) { + $path = $this->include_path . 'webhook/strategies/'; + } else { + $path = $this->include_path . 'webhook/'; + } } elseif ( strpos( $class, 'wc_wallee_exception' ) === 0 ) { $path = $this->include_path . 'exception/'; } elseif ( strpos( $class, 'wc_wallee_admin' ) === 0 ) { @@ -101,8 +105,6 @@ public function autoload( $class ) { if ( empty( $path ) || ! $this->load_file( $path . $file ) ) { $this->load_file( $this->include_path . $file ); } - - $this->load_file( $this->include_path . $file ); } } diff --git a/includes/class-wc-wallee-blocks-support.php b/includes/class-wc-wallee-blocks-support.php index 5144e7b..7c084dc 100644 --- a/includes/class-wc-wallee-blocks-support.php +++ b/includes/class-wc-wallee-blocks-support.php @@ -1,5 +1,20 @@ settings['space_id'] = get_option( WooCommerce_Wallee::CK_SPACE_ID ); + $this->settings['space_id'] = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_ID ); } /** @@ -41,8 +56,8 @@ public function is_active() { * @return array */ public function get_payment_method_script_handles() { - $dependencies = []; - $version = '1'; + $dependencies = array(); + $version = '4'; wp_register_script( 'WooCommerce_Wallee_blocks_support', @@ -52,7 +67,15 @@ public function get_payment_method_script_handles() { true ); - return [ 'WooCommerce_Wallee_blocks_support' ]; + wp_localize_script( + 'WooCommerce_Wallee_blocks_support', + 'wallee_block_params', + array( + 'wallee_nonce' => wp_create_nonce( 'wallee_nonce_block' ), + ) + ); + + return array( 'WooCommerce_Wallee_blocks_support' ); } /** @@ -61,10 +84,10 @@ public function get_payment_method_script_handles() { * @return array */ public function get_payment_method_data() { - return [ - 'title' => 'Wallee', + return array( + 'title' => 'Wallee', 'description' => 'Wallee description', - ]; + ); } /** @@ -75,28 +98,40 @@ public function get_payment_method_data() { * * @return void */ - static public function get_payment_methods() { + public static function get_payment_methods() { + + $paymentMethods = WC()->session->get( 'wallee_payments_list' ); + if ($paymentMethods) { + return wp_send_json( array_values( $paymentMethods ) ); + } + if ( ! isset( $_POST['wallee_nonce'] ) || ! wp_verify_nonce( $_POST['wallee_nonce'], 'wallee_nonce_block' ) ) { //phpcs:ignore + wp_send_json_error( 'Invalid request', 403 ); + } $payment_gateways = WC()->payment_gateways()->payment_gateways(); // From all the payment gateways, only use the ones provided by this module. - $payment_plugin = array_filter($payment_gateways, fn($key) => str_contains($key, "wallee_"), ARRAY_FILTER_USE_KEY); + $payment_plugin = array_filter( $payment_gateways, fn( $key ) => str_contains( $key, 'wallee_' ), ARRAY_FILTER_USE_KEY ); // Build the list with the keys expected by WooCommerce Blocks registering functionality. - $payments_list = array_map(function(WC_Wallee_Gateway $payment_gateway) { - return [ - 'name' => $payment_gateway->id, - 'label' => $payment_gateway->get_title(), - 'ariaLabel' => $payment_gateway->get_title(), - 'description' => $payment_gateway->get_description(), - 'configuration_id' => $payment_gateway->get_payment_configuration_id(), - 'integration_mode' => (get_option( WooCommerce_Wallee::CK_INTEGRATION ) == WC_Wallee_Integration::LIGHTBOX ) ? 'lightbox' : 'iframe', - 'supports' => $payment_gateway->supports, - 'icon' => $payment_gateway->get_icon(), - ]; - }, $payment_plugin); + $payments_list = array_map( + function ( WC_Wallee_Gateway $payment_gateway ) { + return array( + 'name' => $payment_gateway->id, + 'label' => $payment_gateway->get_title(), + 'ariaLabel' => $payment_gateway->get_title(), + 'description' => $payment_gateway->get_description(), + 'configuration_id' => $payment_gateway->get_payment_configuration_id(), + 'integration_mode' => ( get_option( WooCommerce_Wallee::WALLEE_CK_INTEGRATION ) == WC_Wallee_Integration::WALLEE_LIGHTBOX ) ? 'lightbox' : 'iframe', + 'supports' => $payment_gateway->supports, + 'icon' => $payment_gateway->get_icon(), + ); + }, + $payment_plugin + ); + WC()->session->set( 'wallee_payments_list', $payments_list ); // Send the list back to the requester in a JSON. - wp_send_json(array_values($payments_list)); + wp_send_json( array_values( $payments_list ) ); } /** @@ -108,14 +143,27 @@ static public function get_payment_methods() { * * @return void */ - static public function is_payment_method_available() { - if (empty($_POST['payment_method']) || empty($_POST['configuration_id'])) { - wp_send_json(FALSE); + public static function is_payment_method_available() { + + if ( ! isset( $_POST['wallee_nonce'] ) || ! wp_verify_nonce( $_POST['wallee_nonce'], 'wallee_nonce_block' ) ) { //phpcs:ignore + wp_send_json_error( 'Invalid nonce', 403 ); } - $configuration_id = $_POST['configuration_id']; - $available_payment_methods = WC_Wallee_Service_Transaction::instance()->get_possible_payment_methods_for_cart(); - wp_send_json(in_array($configuration_id, $available_payment_methods)); + if ( empty( $_POST['payment_method'] ) || empty( $_POST['configuration_id'] ) ) { //phpcs:ignore + wp_send_json( false ); + } + + $configuration_id = isset( $_POST['configuration_id'] ) ? absint( sanitize_key( wp_unslash( $_POST['configuration_id'] ) ) ) : null; //phpcs:ignore + + $cacheHash = $_POST['formHash'] ?? null; + $available_payment_methods = WC()->session->get( $cacheHash ); + + if (!$available_payment_methods) { + $available_payment_methods = WC_Wallee_Service_Transaction::instance()->get_possible_payment_methods_for_cart(); + WC()->session->set( $cacheHash, $available_payment_methods ); + } + + wp_send_json( in_array( $configuration_id, $available_payment_methods ) ); } /** @@ -130,47 +178,51 @@ static public function is_payment_method_available() { * * @return void */ - static public function enqueue_portal_scripts() { - $transaction_service = WC_Wallee_Service_Transaction::instance(); - $transaction = $transaction_service->get_transaction_from_session(); - - if (( get_option( WooCommerce_Wallee::CK_INTEGRATION ) == WC_Wallee_Integration::LIGHTBOX )) { - // Ask the portal for the lighbox's javascript file - $js_url = $transaction_service->get_lightbox_url_for_transaction( $transaction ); - } - else { - // Ask the portal for the iframe's javascript file - $js_url = $transaction_service->get_javascript_url_for_transaction( $transaction ); + public static function enqueue_portal_scripts() { + + try { + $transaction_service = WC_Wallee_Service_Transaction::instance(); + $transaction = $transaction_service->get_transaction_from_session(); + + if ( get_option( WooCommerce_Wallee::WALLEE_CK_INTEGRATION ) == WC_Wallee_Integration::WALLEE_LIGHTBOX ) { + // Ask the portal for the lighbox's javascript file. + $js_url = $transaction_service->get_lightbox_url_for_transaction( $transaction ); + } else { + // Ask the portal for the iframe's javascript file. + $js_url = $transaction_service->get_javascript_url_for_transaction( $transaction ); + } + + // Add the JS URL to the response. + wp_enqueue_script( + 'wallee-remote-checkout-js', + $js_url, + array( + 'jquery', + ), + 1, + true + ); + } catch ( Exception $e ) { + WooCommerce_Wallee::instance()->log( $e->getMessage(), WC_Log_Levels::DEBUG ); } - - // Add the JS URL to the response. - wp_enqueue_script( - 'wallee-remote-checkout-js', - $js_url, - array( - 'jquery', - ), - 1, - true - ); } /** - * Processes the payment for an order. - * - * This method is a wrapper around the process_payment_transaction method of the payment gateway. + * Processes the payment for an order. + * + * This method is a wrapper around the process_payment_transaction method of the payment gateway. * This method is called by the woocommerce_rest_checkout_process_payment_with_context hook when a transaction need to be * processed, trigged by the WooCommerce Blocks checkout block. In here, we call the process transaction function that * we have in the payment gateway, adding the parameters that are needed, like the space_id. - * - * @param PaymentContext $context The payment context containing the necessary information to process the payment. - * @param PaymentResult $result A reference to the PaymentResult object to store the results of the payment processing. * - * @return void + * @param PaymentContext $context The payment context containing the necessary information to process the payment. + * @param PaymentResult $result A reference to the PaymentResult object to store the results of the payment processing. + * + * @return void * * @see woocommerce_rest_checkout_process_payment_with_context hook. */ - static public function process_payment( PaymentContext $context, PaymentResult &$result ) { + public static function process_payment( PaymentContext $context, PaymentResult &$result ) { if ( $result->status ) { return; } @@ -182,14 +234,14 @@ static public function process_payment( PaymentContext $context, PaymentResult & $payment_method_object->validate_fields(); // We call here the payment processor from our gateway. - $space_id = get_option( WooCommerce_Wallee::CK_SPACE_ID ); + $space_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_ID ); $transaction_service = WC_Wallee_Service_Transaction::instance(); $transaction = $transaction_service->get_transaction_from_session(); $transaction_id = $transaction->getId(); - [$gateway_result, $transaction] = $payment_method_object->process_payment_transaction( $context->order, $transaction_id, $space_id, TRUE, $transaction_service ); + [$gateway_result, $transaction] = $payment_method_object->process_payment_transaction( $context->order, $transaction_id, $space_id, true, $transaction_service ); // Build the result object, which will be sent back to the browser's JS that invoked the process in the checkout. - $result->set_status( isset( $gateway_result['result'] ) && 'success' === $gateway_result['result'] ? 'success' : 'failure' ); + $result->set_status( isset( $gateway_result['result'] ) && 'success' == $gateway_result['result'] ? 'success' : 'failure' ); $result->set_payment_details( array_merge( $result->payment_details, $gateway_result ) ); $result->set_redirect_url( $gateway_result['redirect'] ); } diff --git a/includes/class-wc-wallee-cron.php b/includes/class-wc-wallee-cron.php index fc801e7..7fb22d8 100644 --- a/includes/class-wc-wallee-cron.php +++ b/includes/class-wc-wallee-cron.php @@ -1,7 +1,9 @@ 300, - 'display' => __( 'Every Five Minutes' ), + 'display' => esc_html__( 'Every Five Minutes' ), ); return $schedules; } diff --git a/includes/class-wc-wallee-customer-document.php b/includes/class-wc-wallee-customer-document.php index d52ec98..d59731c 100644 --- a/includes/class-wc-wallee-customer-document.php +++ b/includes/class-wc-wallee-customer-document.php @@ -1,7 +1,9 @@ get_state(), array( \Wallee\Sdk\Model\TransactionState::COMPLETED, \Wallee\Sdk\Model\TransactionState::FULFILL, \Wallee\Sdk\Model\TransactionState::DECLINE, - ) + ), + true ) ) { $invoice = true; } - if ( get_option( WooCommerce_Wallee::CK_CUSTOMER_PACKING ) == 'yes' && $transaction_info->get_state() == \Wallee\Sdk\Model\TransactionState::FULFILL ) { + if ( get_option( WooCommerce_Wallee::WALLEE_CK_CUSTOMER_PACKING ) == 'yes' + && $transaction_info->get_state() == \Wallee\Sdk\Model\TransactionState::FULFILL + ) { $packing = true; } if ( $invoice || $packing ) { ?>

- + getTitle() . '.pdf"' ); - header( 'Content-Description: ' . $document->getTitle() ); - // phpcs:ignore - echo base64_decode( $document->getData() ); + header( 'Content-Disposition: attachment; filename="' . esc_html( $document->getTitle() ) . '.pdf"' ); + header( 'Content-Description: ' . esc_html( $document->getTitle() ) ); + + $data_safe = base64_decode( $document->getData() ); + echo $data_safe; // phpcs:ignore exit(); } } diff --git a/includes/class-wc-wallee-email.php b/includes/class-wc-wallee-email.php index 229aa29..4314bf0 100644 --- a/includes/class-wc-wallee-email.php +++ b/includes/class-wc-wallee-email.php @@ -1,7 +1,9 @@ emails; foreach ( $notifications_all as $new_action ) { add_action( @@ -260,43 +260,45 @@ public static function add_email_actions( $actions ) { } } - if(class_exists('PLLWC')){ - add_filter( 'pllwc_order_email_actions', function ( $actions ){ - $all = array( - 'woocommerce_order_status_postfi-redirected_to_processing', - 'woocommerce_order_status_postfi-redirected_to_completed', - 'woocommerce_order_status_postfi-redirected_to_on-hold', - 'woocommerce_order_status_postfi-redirected_to_postfinancecheckout-waiting', - 'woocommerce_order_status_postfi-redirected_to_postfinancecheckout-manual', - 'woocommerce_order_status_postfi-manual_to_cancelled', - 'woocommerce_order_status_postfi-waiting_to_cancelled', - 'woocommerce_order_status_postfi-manual_to_processing', - 'woocommerce_order_status_postfi-waiting_to_processing', - 'woocommerce_order_status_postfi-redirected_to_processing_notification', - 'woocommerce_order_status_postfi-redirected_to_completed_notification', - 'woocommerce_order_status_postfi-redirected_to_on-hold_notification', - 'woocommerce_order_status_postfi-redirected_to_postfinancecheckout-waiting_notification', - 'woocommerce_order_status_postfi-redirected_to_postfinancecheckout-manual_notification', - ); + if ( class_exists( 'PLLWC' ) ) { + add_filter( + 'pllwc_order_email_actions', + function ( $actions ) { + $all = array( + 'woocommerce_order_status_postfi-redirected_to_processing', + 'woocommerce_order_status_postfi-redirected_to_completed', + 'woocommerce_order_status_postfi-redirected_to_on-hold', + 'woocommerce_order_status_postfi-redirected_to_postfinancecheckout-waiting', + 'woocommerce_order_status_postfi-redirected_to_postfinancecheckout-manual', + 'woocommerce_order_status_postfi-manual_to_cancelled', + 'woocommerce_order_status_postfi-waiting_to_cancelled', + 'woocommerce_order_status_postfi-manual_to_processing', + 'woocommerce_order_status_postfi-waiting_to_processing', + 'woocommerce_order_status_postfi-redirected_to_processing_notification', + 'woocommerce_order_status_postfi-redirected_to_completed_notification', + 'woocommerce_order_status_postfi-redirected_to_on-hold_notification', + 'woocommerce_order_status_postfi-redirected_to_postfinancecheckout-waiting_notification', + 'woocommerce_order_status_postfi-redirected_to_postfinancecheckout-manual_notification', + ); - $customers = array( - 'woocommerce_order_status_postfi-manual_to_processing_notification', - 'woocommerce_order_status_postfi-waiting_to_processing_notification', - 'woocommerce_order_status_on-hold_to_processing_notification', - 'woocommerce_order_status_postfi-manual_to_cancelled_notification', - 'woocommerce_order_status_postfi-waiting_to_cancelled_notifcation', - ); + $customers = array( + 'woocommerce_order_status_postfi-manual_to_processing_notification', + 'woocommerce_order_status_postfi-waiting_to_processing_notification', + 'woocommerce_order_status_on-hold_to_processing_notification', + 'woocommerce_order_status_postfi-manual_to_cancelled_notification', + 'woocommerce_order_status_postfi-waiting_to_cancelled_notifcation', + ); - $actions = array_merge( $actions, $all, $customers); - return $actions; - }); + $actions = array_merge( $actions, $all, $customers ); + return $actions; + } + ); } - + $actions = array_merge( $actions, $to_add ); return $actions; } - /** * Check Germanized pay email trigger. * @@ -311,7 +313,7 @@ public static function check_germanized_pay_email_trigger( $order_id, $order = f $gateway = wc_get_payment_gateway_by_order( $order ); if ( $gateway instanceof WC_Wallee_Gateway ) { - $send = get_option( WooCommerce_Wallee::CK_SHOP_EMAIL, 'yes' ); + $send = get_option( WooCommerce_Wallee::WALLEE_CK_SHOP_EMAIL, 'yes' ); if ( 'yes' !== $send ) { return; } @@ -397,7 +399,7 @@ public static function germanized_send_order_confirmation( $email_sent, $order_i } $gateway = wc_get_payment_gateway_by_order( $order ); if ( $gateway instanceof WC_Wallee_Gateway ) { - $send = get_option( WooCommerce_Wallee::CK_SHOP_EMAIL, 'yes' ); + $send = get_option( WooCommerce_Wallee::WALLEE_CK_SHOP_EMAIL, 'yes' ); if ( 'yes' !== $send ) { return true; } diff --git a/includes/class-wc-wallee-gateway.php b/includes/class-wc-wallee-gateway.php index 232af1e..4b89c86 100644 --- a/includes/class-wc-wallee-gateway.php +++ b/includes/class-wc-wallee-gateway.php @@ -1,7 +1,9 @@ payment_method_configuration_id = $method->get_value('configuration_id'); + $this->payment_method_configuration_id = $method->get_value( 'configuration_id' ); $this->wle_payment_method_configuration_id = $method->get_id(); $this->id = 'wallee_' . $method->get_id(); $this->has_fields = false; @@ -155,6 +164,7 @@ public function get_title() { if ( ! is_null( $translated ) ) { $title = $translated; } + //phpcs:ignore return apply_filters( 'woocommerce_gateway_title', $title, $this->id ); } @@ -165,12 +175,13 @@ public function get_title() { */ public function get_description() { $description = ''; - if ( 'yes' == $this->wle_show_description ) { + if ( 'yes' === $this->wle_show_description ) { $translated = WC_Wallee_Helper::instance()->translate( $this->wle_translated_description ); if ( ! is_null( $translated ) ) { $description = $translated; } } + //phpcs:ignore return apply_filters( 'woocommerce_gateway_description', $description, $this->id ); } @@ -181,15 +192,15 @@ public function get_description() { */ public function get_icon() { $icon = ''; - if ( 'yes' == $this->wle_show_icon ) { + if ( 'yes' === $this->wle_show_icon ) { $space_id = $this->get_payment_method_configuration()->get_space_id(); - $space_view_id = get_option( WooCommerce_Wallee::CK_SPACE_VIEW_ID ); + $space_view_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_VIEW_ID ); $language = WC_Wallee_Helper::instance()->get_cleaned_locale(); $url = WC_Wallee_Helper::instance()->get_resource_url( $this->wle_image_base, $this->wle_image, $language, $space_id, $space_view_id ); $icon = '' . esc_attr( $this->get_title() ) . ''; } - + //phpcs:ignore return apply_filters( 'woocommerce_gateway_icon', $icon, $this->id ); } @@ -208,38 +219,38 @@ public function get_payment_configuration_id() { public function init_form_fields() { $this->form_fields = array( 'enabled' => array( - 'title' => __( 'Enable/Disable', 'woocommerce' ), + 'title' => esc_html__( 'Enable/Disable', 'woocommerce' ), 'type' => 'checkbox', /* translators: %s: method title */ - 'label' => sprintf( __( 'Enable %s', 'woo-wallee' ), $this->method_title ), + 'label' => sprintf( esc_html__( 'Enable %s', 'woo-wallee' ), $this->method_title ), 'default' => 'yes', ), 'title_value' => array( - 'title' => __( 'Title', 'woocommerce' ), + 'title' => esc_html__( 'Title', 'woocommerce' ), 'type' => 'info', 'value' => $this->get_title(), - 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-wallee' ), + 'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woo-wallee' ), ), 'description_value' => array( - 'title' => __( 'Description', 'woocommerce' ), + 'title' => esc_html__( 'Description', 'woocommerce' ), 'type' => 'info', - 'value' => ! empty( $this->get_description() ) ? esc_attr( $this->get_description() ) : __( '[not set]', 'woo-wallee' ), - 'description' => __( 'Payment method description that the customer will see on your checkout.', 'woo-wallee' ), + 'value' => ! empty( $this->get_description() ) ? esc_attr( $this->get_description() ) : esc_html__( '[not set]', 'woo-wallee' ), + 'description' => esc_html__( 'Payment method description that the customer will see on your checkout.', 'woo-wallee' ), ), 'show_description' => array( - 'title' => __( 'Show description', 'woo-wallee' ), + 'title' => esc_html__( 'Show description', 'woo-wallee' ), 'type' => 'checkbox', - 'label' => __( 'Yes', 'woo-wallee' ), + 'label' => esc_html__( 'Yes', 'woo-wallee' ), 'default' => 'yes', - 'description' => __( "Show the payment method's description on the checkout page.", 'woo-wallee' ), + 'description' => esc_html__( "Show the payment method's description on the checkout page.", 'woo-wallee' ), 'desc_tip' => true, ), 'show_icon' => array( - 'title' => __( 'Show method image', 'woo-wallee' ), + 'title' => esc_html__( 'Show method image', 'woo-wallee' ), 'type' => 'checkbox', - 'label' => __( 'Yes', 'woo-wallee' ), + 'label' => esc_html__( 'Yes', 'woo-wallee' ), 'default' => 'yes', - 'description' => __( "Show the payment method's image on the checkout page.", 'woo-wallee' ), + 'description' => esc_html__( "Show the payment method's image on the checkout page.", 'woo-wallee' ), 'desc_tip' => true, ), ); @@ -270,8 +281,8 @@ public function generate_info_html( $key, $data ) { ?> - - get_tooltip_html( $data ); ?> + + get_tooltip_html( $data ) ); ?> @@ -297,9 +308,7 @@ public function generate_info_html( $key, $data ) { * @param string|null $value Posted Value. * @return void */ - public function validate_info_field( $key, $value ) { - return; - } + public function validate_info_field( $key, $value ) {} /** * Check if the gateway is available for use. @@ -316,36 +325,46 @@ public function is_available() { // It's not possible to support the rounding on subtotal level and still get valid tax rates and amounts. // Therefore the payment methods are disabled, if this option is active. if ( wc_tax_enabled() && ( 'yes' === get_option( 'woocommerce_tax_round_at_subtotal' ) ) ) { - if ( 'yes' === get_option( WooCommerce_Wallee::CK_ENFORCE_CONSISTENCY ) ) { - $error_message = __( "'WooCommerce > Settings > Wallee > Enforce Consistency' and 'WooCommerce > Settings > Tax > Rounding' are both enabled. Please disable at least one of them.", 'woo-wallee' ); + if ( 'yes' === get_option( WooCommerce_Wallee::WALLEE_CK_ENFORCE_CONSISTENCY ) ) { + $error_message = esc_html__( "'WooCommerce > Settings > Wallee > Enforce Consistency' and 'WooCommerce > Settings > Tax > Rounding' are both enabled. Please disable at least one of them.", 'woo-wallee' ); WooCommerce_Wallee::instance()->log( $error_message, WC_Log_Levels::ERROR ); return false; } } - // It is possbile this function is called in the wordpress admin section. There is not a cart, so all active methods are available. + // It is possbile this function is called in the WordPress admin section. There is not a cart, so all active methods are available. // If it is not a checkout page the method is availalbe. Some plugins check this, on non checkout pages, without a cart available. // The active gateways are available during order total caluclation, as other plugins could need them. - if ( apply_filters( 'wc_wallee_is_method_available', is_admin() || ! is_checkout() || ( isset( $GLOBALS['_wc_wallee_calculating'] ) && $GLOBALS['_wc_wallee_calculating'] ), $this ) ) { - return $this->get_payment_method_configuration()->get_state() == WC_Wallee_Entity_Method_Configuration::STATE_ACTIVE; + if ( + apply_filters( + 'wallee_is_method_available', + is_admin() + || ! is_checkout() + || ( isset( $GLOBALS['_wallee_calculating'] ) + && $GLOBALS['_wallee_calculating'] + ), + $this + ) + ) {//phpcs:ignore + return $this->get_payment_method_configuration()->get_state() == WC_Wallee_Entity_Method_Configuration::WALLEE_STATE_ACTIVE; } global $wp; - if (is_checkout() && isset($wp->query_vars['order-received'])) { + if ( is_checkout() && isset( $wp->query_vars['order-received'] ) ) { // Sometimes, when the Thank you page is loaded, there are new attemps to get // gateways availability. In this particular case, we retrieve the availability // information from the session, so the plugin does not have to ask the portal // for this information, creating an unused transaction in the process. - $gateway_available = WC()->session->get('wallee_payment_gateways'); - if (!empty($gateway_available[$this->wle_payment_method_configuration_id])) { - return $gateway_available[$this->wle_payment_method_configuration_id]; - } - else { + $gateway_available = WC()->session->get( 'wallee_payment_gateways' ); + if ( ! empty( $gateway_available[ $this->wle_payment_method_configuration_id ] ) ) { + return $gateway_available[ $this->wle_payment_method_configuration_id ]; + } else { + return false; } } - if ( apply_filters( 'wc_wallee_is_order_pay_endpoint', is_checkout_pay_page() ) ) { + if ( apply_filters( 'wc_wallee_is_order_pay_endpoint', is_checkout_pay_page() ) ) { //phpcs:ignore // We have to use the order and not the cart for this endpoint. $order = WC_Order_Factory::get_order( $wp->query_vars['order-pay'] ); if ( ! $order ) { @@ -397,9 +416,9 @@ public function is_available() { } // Store the availability information in the session. - $gateway_available = WC()->session->get('wallee_payment_gateways'); - $gateway_available[$this->wle_payment_method_configuration_id] = true; - $gateway_available = WC()->session->set('wallee_payment_gateways', $gateway_available); + $gateway_available = WC()->session->get( 'wallee_payment_gateways' ); + $gateway_available[ $this->wle_payment_method_configuration_id ] = true; + $gateway_available = WC()->session->set( 'wallee_payment_gateways', $gateway_available ); return true; } @@ -423,7 +442,7 @@ public function payment_fields() { $transaction_service = WC_Wallee_Service_Transaction::instance(); $woocommerce_data = get_plugin_data( WP_PLUGIN_DIR . '/woocommerce/woocommerce.php', false, false ); try { - if ( apply_filters( 'wc_wallee_is_order_pay_endpoint', is_checkout_pay_page() ) ) { + if ( apply_filters( 'wc_wallee_is_order_pay_endpoint', is_checkout_pay_page() ) ) { //phpcs:ignore global $wp; $order = WC_Order_Factory::get_order( $wp->query_vars['order-pay'] ); if ( ! $order ) { @@ -435,8 +454,12 @@ public function payment_fields() { } if ( ! wp_script_is( 'wallee-remote-checkout-js', 'enqueued' ) ) { $ajax_url = $transaction_service->get_javascript_url_for_transaction( $transaction ); - //!isset($wp->query_vars['order-pay'])->If you're not in the "re-pay" checkout. - if (( get_option( WooCommerce_Wallee::CK_INTEGRATION ) == WC_Wallee_Integration::LIGHTBOX ) && (is_checkout() && !isset($wp->query_vars['order-pay']))) { + // !isset($wp->query_vars['order-pay'])->If you're not in the "re-pay" checkout. + if ( + ( get_option( WooCommerce_Wallee::WALLEE_CK_INTEGRATION ) == WC_Wallee_Integration::WALLEE_LIGHTBOX ) + && ( is_checkout() + && ! isset( $wp->query_vars['order-pay'] ) ) + ) { $ajax_url = $transaction_service->get_lightbox_url_for_transaction( $transaction ); } wp_enqueue_script( @@ -461,16 +484,15 @@ public function payment_fields() { ); global $wp_version; $localize = array( - 'i18n_not_complete' => __( 'Please fill out all required fields.', 'woo-wallee' ), - 'integration' => get_option( WooCommerce_Wallee::CK_INTEGRATION ), - 'versions' => [ + 'i18n_not_complete' => esc_html__( 'Please fill out all required fields.', 'woo-wallee' ), + 'integration' => get_option( WooCommerce_Wallee::WALLEE_CK_INTEGRATION ), + 'versions' => array( 'wordpress' => $wp_version, 'woocommerce' => $woocommerce_data['Version'], 'wallee' => WC_WALLEE_VERSION, - ] + ), ); wp_localize_script( 'wallee-checkout-js', 'wallee_js_params', $localize ); - //wp_add_inline_script( 'wallee-checkout-js', 'jQuery(document).ready (function (){ wc_wallee_checkout.init(); });' ); } $transaction_nonce = hash_hmac( 'sha256', $transaction->getLinkedSpaceId() . '-' . $transaction->getId(), NONCE_KEY ); @@ -487,13 +509,12 @@ public function payment_fields() { class="wallee-method-configuration" style="display: none;" data-method-id="id ); ?>" data-configuration-id="get_payment_method_configuration()->get_configuration_id() ); ?>" - data-container-id="payment-form-id ); ?>" data-description-available="get_description() ) ); ?>"> + data-container-id="payment-form-id ); ?>" data-description-available="get_description() ) ); //phpcs:ignore ?>"> log( $e->getMessage(), WC_Log_Levels::DEBUG ); } - } /** @@ -513,26 +534,26 @@ public function validate_fields() { */ public function process_payment( $order_id ) { + $space_id = ''; + $transaction_id = ''; + $transaction_nonce = ''; + if ( isset( $_POST[ 'wallee-space-id-' . $this->id ] ) ) { $space_id = sanitize_text_field( wp_unslash( $_POST[ 'wallee-space-id-' . $this->id ] ) ); - } else { - $space_id = ''; } + if ( isset( $_POST[ 'wallee-transaction-id-' . $this->id ] ) ) { $transaction_id = sanitize_text_field( wp_unslash( $_POST[ 'wallee-transaction-id-' . $this->id ] ) ); - } else { - $transaction_id = ''; } + if ( isset( $_POST[ 'wallee-transaction-nonce-' . $this->id ] ) ) { $transaction_nonce = sanitize_text_field( wp_unslash( $_POST[ 'wallee-transaction-nonce-' . $this->id ] ) ); - } else { - $transaction_nonce = ''; } $is_order_pay_endpoint = apply_filters( 'wc_wallee_is_order_pay_endpoint', is_checkout_pay_page() ); if ( hash_hmac( 'sha256', $space_id . '-' . $transaction_id, NONCE_KEY ) != $transaction_nonce ) { - WC()->session->set( 'wallee_failure_message', __( 'The checkout timed out, please try again.', 'woo-wallee' ) ); + WC()->session->set( 'wallee_failure_message', esc_html__( 'The checkout timed out, please try again.', 'woo-wallee' ) ); WC()->session->set( 'reload_checkout', true ); return array( 'result' => 'failure', @@ -541,8 +562,8 @@ public function process_payment( $order_id ) { $existing = WC_Wallee_Entity_Transaction_Info::load_by_order_id( $order_id ); if ( $existing->get_id() ) { - if ( $existing->get_space_id() != $space_id && $existing->get_transaction_id() != $transaction_id ) { - WC()->session->set( 'wallee_failure_message', __( 'There was an issue, while processing your order. Please try again or use another payment method.', 'woo-wallee' ) ); + if ( $existing->get_space_id() !== $space_id && $existing->get_transaction_id() != $transaction_id ) { + WC()->session->set( 'wallee_failure_message', esc_html__( 'There was an issue, while processing your order. Please try again or use another payment method.', 'woo-wallee' ) ); WC()->session->set( 'reload_checkout', true ); return array( 'result' => 'failure', @@ -557,7 +578,7 @@ public function process_payment( $order_id ) { try { $transaction_service = WC_Wallee_Service_Transaction::instance(); - [$result, $transaction] = $this->process_payment_transaction($order, $transaction_id, $space_id, $is_order_pay_endpoint, $transaction_service); + [ $result, $transaction ] = $this->process_payment_transaction( $order, $transaction_id, $space_id, $is_order_pay_endpoint, $transaction_service ); if ( $no_iframe ) { $result = array( @@ -567,7 +588,7 @@ public function process_payment( $order_id ) { return $result; } - if ( apply_filters( 'wc_wallee_gateway_result_send_json', $is_order_pay_endpoint, $order_id ) ) { + if ( apply_filters( 'wc_wallee_gateway_result_send_json', $is_order_pay_endpoint, $order_id ) ) { //phpcs:ignore wp_send_json( $result ); exit; } else { @@ -582,7 +603,7 @@ public function process_payment( $order_id ) { 'result' => 'failure', 'reload' => 'true', ); - if ( apply_filters( 'wc_wallee_gateway_result_send_json', $is_order_pay_endpoint, $order_id ) ) { + if ( apply_filters( 'wc_wallee_gateway_result_send_json', $is_order_pay_endpoint, $order_id ) ) { //phpcs:ignore wp_send_json( $result ); exit; } @@ -594,23 +615,23 @@ public function process_payment( $order_id ) { } /** - * Processes the payment transaction. - * - * Handles the transaction processing for an order by interacting with the transaction service. It updates - * the order's metadata based on the transaction state and handles the session cleanup post-transaction. - * If the transaction is in a PENDING state, it confirms the transaction and updates the transaction info - * in the order. It also sets up the redirect URL upon successful payment and returns the result and transaction. - * - * @param WC_Order $order The WooCommerce order object. - * @param int $transaction_id The ID of the transaction. - * @param int $space_id The space ID associated with the transaction. - * @param bool $is_order_pay_endpoint Flag to determine if the order is being paid for at the order-pay endpoint. - * @param WC_Wallee_Service_Transaction $transaction_service The transaction service instance. - * @return array An array containing the result of the transaction and the transaction object. - * - * @throws Throwable Throws an exception if there is an issue processing the transaction. - */ - public function process_payment_transaction($order, $transaction_id, $space_id, $is_order_pay_endpoint, $transaction_service) { + * Processes the payment transaction. + * + * Handles the transaction processing for an order by interacting with the transaction service. It updates + * the order's metadata based on the transaction state and handles the session cleanup post-transaction. + * If the transaction is in a PENDING state, it confirms the transaction and updates the transaction info + * in the order. It also sets up the redirect URL upon successful payment and returns the result and transaction. + * + * @param WC_Order $order The WooCommerce order object. + * @param int $transaction_id The ID of the transaction. + * @param int $space_id The space ID associated with the transaction. + * @param bool $is_order_pay_endpoint Flag to determine if the order is being paid for at the order-pay endpoint. + * @param WC_Wallee_Service_Transaction $transaction_service The transaction service instance. + * @return array An array containing the result of the transaction and the transaction object. + * + * @throws Throwable Throws an exception if there is an issue processing the transaction. + */ + public function process_payment_transaction( $order, $transaction_id, $space_id, $is_order_pay_endpoint, $transaction_service ) { try { $transaction = $transaction_service->get_transaction( $space_id, $transaction_id ); @@ -629,18 +650,17 @@ public function process_payment_transaction($order, $transaction_id, $space_id, WC()->session->set( 'wallee_space_id', null ); WC()->session->set( 'wallee_transaction_id', null ); - //now is mandatory to send the redirect property in the json response + // now it is mandatory to send the redirect property in the json response. $gateway = wc_get_payment_gateway_by_order( $order ); - $url = apply_filters( 'wc_wallee_success_url', $gateway->get_return_url( $order ), $order ); + $url = apply_filters( 'wc_wallee_success_url', $gateway->get_return_url( $order ), $order ); //phpcs:ignore $result = array( 'result' => 'success', 'wallee' => 'true', - 'redirect' => $url + 'redirect' => $url, ); - return [$result, $transaction]; - } - catch ( Throwable $e ) { + return array( $result, $transaction ); + } catch ( Throwable $e ) { throw $e; } } @@ -658,7 +678,7 @@ public function process_payment_transaction($order, $transaction_id, $space_id, */ public function process_refund( $order_id, $amount = null, $reason = '' ) { if ( ! isset( $GLOBALS['wallee_refund_id'] ) ) { - return new WP_Error( 'wallee_error', __( 'There was a problem creating the refund.', 'woo-wallee' ) ); + return new WP_Error( 'wallee_error', esc_html__( 'There was a problem creating the refund.', 'woo-wallee' ) ); } $refund = WC_Order_Factory::get_order( $GLOBALS['wallee_refund_id'] ); $order = WC_Order_Factory::get_order( $order_id ); @@ -674,12 +694,12 @@ public function process_refund( $order_id, $amount = null, $reason = '' ) { $wait = 0; while ( $wait < 5 ) { $refund_job = WC_Wallee_Entity_Refund_Job::load_by_id( $refund_job_id ); - if ( $refund_job->get_state() == WC_Wallee_Entity_Refund_Job::STATE_FAILURE ) { + if ( $refund_job->get_state() == WC_Wallee_Entity_Refund_Job::WALLEE_STATE_FAILURE ) { return new WP_Error( 'wallee_error', $refund_job->get_failure_reason() ); - } elseif ( $refund_job->get_state() == WC_Wallee_Entity_Refund_Job::STATE_SUCCESS ) { + } elseif ( $refund_job->get_state() == WC_Wallee_Entity_Refund_Job::WALLEE_STATE_SUCCESS ) { return true; } - $wait++; + ++$wait; sleep( 1 ); } return true; diff --git a/includes/class-wc-wallee-helper.php b/includes/class-wc-wallee-helper.php index 52c5b19..2361a74 100644 --- a/includes/class-wc-wallee-helper.php +++ b/includes/class-wc-wallee-helper.php @@ -1,7 +1,9 @@ api_client ) { - $user_id = get_option( WooCommerce_Wallee::CK_APP_USER_ID ); - $user_key = get_option( WooCommerce_Wallee::CK_APP_USER_KEY ); + $user_id = get_option( WooCommerce_Wallee::WALLEE_CK_APP_USER_ID ); + $user_key = get_option( WooCommerce_Wallee::WALLEE_CK_APP_USER_KEY ); if ( ! empty( $user_id ) && ! empty( $user_key ) ) { $this->api_client = new \Wallee\Sdk\ApiClient( $user_id, $user_key ); $this->api_client->setBasePath( rtrim( $this->get_base_gateway_url(), '/' ) . '/api' ); - foreach (self::getDefaultHeaderData() as $key => $value) { - $this->api_client->addDefaultHeader($key, $value); + foreach ( self::get_default_header_data() as $key => $value ) { + $this->api_client->addDefaultHeader( $key, $value ); } } else { - throw new Exception( __( 'The API access data is incomplete.', 'woo-wallee' ) ); + throw new Exception( esc_html__( 'The API access data is incomplete.', 'woo-wallee' ) ); } } return $this->api_client; @@ -124,7 +125,7 @@ public function get_base_gateway_url() { * @return mixed|null */ public function translate( $translated_string, $language = null ) { - if ( null == $language ) { + if ( empty( $language ) ) { $language = $this->get_cleaned_locale(); } if ( isset( $translated_string[ $language ] ) ) { @@ -132,7 +133,6 @@ public function translate( $translated_string, $language = null ) { } try { - /* @var WC_Wallee_Provider_Language $language_provider */ $language_provider = WC_Wallee_Provider_Language::instance(); $primary_language = $language_provider->find_primary( $language ); if ( $primary_language && isset( $translated_string[ $primary_language->getIetfCode() ] ) ) { @@ -190,7 +190,6 @@ public function get_resource_url( $base, $path, $language = null, $space_id = nu * @return int */ public function get_currency_fraction_digits( $currency_code ) { - /* @var WC_Wallee_Provider_Currency $currency_provider */ $currency_provider = WC_Wallee_Provider_Currency::instance(); $currency = $currency_provider->find( $currency_code ); if ( $currency ) { @@ -204,18 +203,19 @@ public function get_currency_fraction_digits( $currency_code ) { * Get total amount including tax. * * @param array $line_items line items. - * @param bool $excludeDiscounts exclude discounts. + * @param bool $exclude_discounts exclude discounts. * @return int */ - public function get_total_amount_including_tax( array $line_items, bool $excludeDiscounts = false) { + public function get_total_amount_including_tax( array $line_items, bool $exclude_discounts = false ) { $sum = 0; - /** @var \Wallee\Sdk\Model\LineItemCreate $line_item */ foreach ( $line_items as $line_item ) { $type = $line_item->getType(); $name = $line_item->getName(); - if ( $excludeDiscounts && $type === \Wallee\Sdk\Model\LineItemType::DISCOUNT && strpos( $name, WC_Wallee_Packages_Coupon_Discount::COUPON ) !== false ) { - //convert negative values to positive in order to be able to subtract it + if ( $exclude_discounts && \Wallee\Sdk\Model\LineItemType::DISCOUNT === $type + && strpos( $name, WC_Wallee_Packages_Coupon_Discount::WALLEE_COUPON ) !== false + ) { + // convert negative values to positive in order to be able to subtract it. $sum -= abs( $line_item->getAmountIncludingTax() ); } else { $sum += abs( $line_item->getAmountIncludingTax() ); @@ -234,26 +234,26 @@ public function get_total_amount_including_tax( array $line_items, bool $exclude * @throws WC_Wallee_Exception_Invalid_Transaction_Amount WC_Wallee_Exception_Invalid_Transaction_Amount. */ public function cleanup_line_items( array $line_items, $expected_sum, $currency ) { - //ensure that the effective sum coincides with the total discounted by the coupons - $has_coupons = apply_filters( 'wc_wallee_packages_coupon_has_coupon_discounts_applied', $currency ); + // ensure that the effective sum coincides with the total discounted by the coupons. + $has_coupons = apply_filters( 'wc_wallee_packages_coupon_has_coupon_discounts_applied', $currency ); //phpcs:ignore $effective_sum = $this->round_amount( $this->get_total_amount_including_tax( $line_items, $has_coupons ), $currency ); $rounded_expected_sum = $this->round_amount( $expected_sum, $currency ); if ( $has_coupons ) { - $result = apply_filters( 'wc_wallee_packages_coupon_process_line_items_with_coupons', $line_items, $expected_sum, $currency ); + $result = apply_filters( 'wc_wallee_packages_coupon_process_line_items_with_coupons', $line_items, $expected_sum, $currency ); //phpcs:ignore $line_items = $result['line_items_cleaned']; $effective_sum = $result['effective_sum']; $rounded_expected_sum = $this->round_amount( $expected_sum, $currency ); } $inconsistent_amount = $rounded_expected_sum - $effective_sum; - if ( 0 != $inconsistent_amount ) { - $enforce_consistency = get_option( WooCommerce_Wallee::CK_ENFORCE_CONSISTENCY ); + if ( 0 !== (int) $inconsistent_amount ) { + $enforce_consistency = get_option( WooCommerce_Wallee::WALLEE_CK_ENFORCE_CONSISTENCY ); switch ( $enforce_consistency ) { case 'no': $line_item = new \Wallee\Sdk\Model\LineItemCreate(); $line_item->setAmountIncludingTax( $this->round_amount( $inconsistent_amount, $currency ) ); - $line_item->setName( __( 'Adjustment', 'woo-wallee' ) ); + $line_item->setName( esc_html__( 'Adjustment', 'woo-wallee' ) ); $line_item->setQuantity( 1 ); $line_item->setSku( 'adjustment' ); $line_item->setUniqueId( 'adjustment' ); @@ -262,7 +262,7 @@ public function cleanup_line_items( array $line_items, $expected_sum, $currency $line_items[] = $line_item; break; default: - throw new WC_Wallee_Exception_Invalid_Transaction_Amount( $effective_sum, $rounded_expected_sum ); + throw new WC_Wallee_Exception_Invalid_Transaction_Amount( esc_html( $effective_sum ), esc_html( $rounded_expected_sum ) ); } } return $this->ensure_unique_ids( $line_items ); @@ -289,7 +289,7 @@ public function ensure_unique_ids( array $line_items ) { if ( isset( $unique_ids[ $unique_id ] ) ) { $backup = $unique_id; $unique_id = $unique_id . '_' . $unique_ids[ $unique_id ]; - $unique_ids[ $backup ] ++; + ++$unique_ids[ $backup ]; } else { $unique_ids[ $unique_id ] = 1; } @@ -373,27 +373,30 @@ public function destroy_current_cart_id() { public function lock_by_transaction_id( $space_id, $transaction_id ) { global $wpdb; - $data_array = array( - 'locked_at' => gmdate( 'Y-m-d H:i:s' ), - ); - $type_array = array( - '%s', + $locked_at = gmdate( 'Y-m-d H:i:s' ); + $table_transaction_info = $wpdb->prefix . 'wallee_transaction_info'; + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $wpdb->query( + $wpdb->prepare( + "SELECT * FROM $table_transaction_info WHERE transaction_id = %d and space_id = %d FOR UPDATE", + $transaction_id, + $space_id + ) ); - $wpdb->query( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'wc_wallee_transaction_info WHERE transaction_id = %d and space_id = %d FOR UPDATE', $transaction_id, $space_id ) ); - - $wpdb->update( - $wpdb->prefix . 'wc_wallee_transaction_info', - $data_array, - array( - 'transaction_id' => $transaction_id, - 'space_id' => $space_id, - ), - $type_array, - array( - '%d', - '%d', + + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $wpdb->query( + $wpdb->prepare( + "UPDATE $table_transaction_info + SET locked_at = %s + WHERE transaction_id = %d AND space_id = %d", + $locked_at, + $transaction_id, + $space_id ) ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. } @@ -445,7 +448,6 @@ public function get_clean_locale_for_string( $language_string, $use_default ) { return null; } return $language->getIetfCode(); - } @@ -457,7 +459,7 @@ public function get_clean_locale_for_string( $language_string, $use_default ) { */ public function try_to_parse_date( $date_string ) { $date_of_birth = false; - $custom_date_of_birth_format = apply_filters( 'wc_wallee_custom_date_of_birth_format', '' ); + $custom_date_of_birth_format = apply_filters( 'wc_wallee_custom_date_of_birth_format', '' ); //phpcs:ignore if ( ! empty( $custom_date_of_birth_format ) ) { $date_of_birth = DateTime::createFromFormat( $custom_date_of_birth_format, $date_string ); } else { @@ -485,8 +487,8 @@ public function try_to_parse_date( $date_string ) { */ public function start_database_transaction() { global $wpdb; - $wpdb->query( 'SET TRANSACTION ISOLATION LEVEL READ COMMITTED' ); - wc_transaction_query( 'start' ); + $wpdb->query( 'SET TRANSACTION ISOLATION LEVEL READ COMMITTED' ); //phpcs:ignore + wc_transaction_query( 'start' ); //phpcs:ignore } /** @@ -495,7 +497,7 @@ public function start_database_transaction() { * @return void */ public function commit_database_transaction() { - wc_transaction_query( 'commit' ); + wc_transaction_query( 'commit' ); //phpcs:ignore } /** @@ -504,7 +506,7 @@ public function commit_database_transaction() { * @return void */ public function rollback_database_transaction() { - wc_transaction_query( 'rollback' ); + wc_transaction_query( 'rollback' ); //phpcs:ignore } /** @@ -525,7 +527,6 @@ public function maybe_restock_items_for_order( WC_Order $order ) { } else { wc_maybe_increase_stock_levels( $order ); } - } /** @@ -535,36 +536,43 @@ public function maybe_restock_items_for_order( WC_Order $order ) { * @return void */ protected function restock_items_for_order( WC_Order $order ) { - if ( 'yes' === get_option( 'woocommerce_manage_stock' ) && $order && apply_filters( 'wc_wallee_can_increase_order_stock', true, $order ) && count( $order->get_items() ) > 0 ) { + if ( + 'yes' === get_option( 'woocommerce_manage_stock' ) + && $order && apply_filters( 'wallee_can_increase_order_stock', true, $order )//phpcs:ignore + && count( $order->get_items() ) > 0 + ) { + foreach ( $order->get_items() as $item ) { $product = $item->get_product(); if ( $item->is_type( 'line_item' ) && $product && $product->managing_stock() ) { + //phpcs:ignore $qty = apply_filters( 'woocommerce_order_item_quantity', $item->get_quantity(), $order, $item ); $item_name = esc_attr( $product->get_formatted_name() ); $new_stock = wc_update_product_stock( $product, $qty, 'increase' ); if ( ! is_wp_error( $new_stock ) ) { /* translators: 1: item name 2: old stock quantity 3: new stock quantity */ - $order->add_order_note( sprintf( __( '%1$s stock increased from %2$s to %3$s.', 'woo-wallee' ), $item_name, $new_stock - $qty, $new_stock ) ); + $order->add_order_note( sprintf( esc_html__( '%1$s stock increased from %2$s to %3$s.', 'woo-wallee' ), $item_name, $new_stock - $qty, $new_stock ) ); } } } - do_action( 'wc_wallee_restocked_order', $order ); + do_action( 'wc_wallee_restocked_order', $order ); //phpcs:ignore } } /** - * @return array + * Retrieve the default header data. + * + * @return array Default header data. */ - protected static function getDefaultHeaderData() - { + protected static function get_default_header_data() { $version = WC_VERSION; - $shop_version = str_replace('v', '', $version); - list ($major_version, $minor_version) = explode('.', $shop_version, 3); - return [ - self::SHOP_SYSTEM => 'woocommerce', - self::SHOP_SYSTEM_VERSION => $shop_version, - self::SHOP_SYSTEM_AND_VERSION => 'woocommerce-' . $major_version . '.' . $minor_version, - ]; + $shop_version = str_replace( 'v', '', $version ); + list ($major_version, $minor_version) = explode( '.', $shop_version, 3 ); + return array( + self::WALLEE_SHOP_SYSTEM => 'woocommerce', + self::WALLEE_SHOP_SYSTEM_VERSION => $shop_version, + self::WALLEE_SHOP_SYSTEM_AND_VERSION => 'woocommerce-' . $major_version . '.' . $minor_version, + ); } } diff --git a/includes/class-wc-wallee-integration.php b/includes/class-wc-wallee-integration.php index 5f449ad..7dbf01c 100644 --- a/includes/class-wc-wallee-integration.php +++ b/includes/class-wc-wallee-integration.php @@ -1,7 +1,9 @@ 'update_1_0_4_failure_msg_and_attribute', '1.0.5' => 'update_1_0_5_clear_provider_transients', '1.0.6' => 'update_1_0_6_shorten_table_names', + '1.0.7' => 'update_1_0_7_migrate_plugin_name_and_tables', ); /** @@ -69,7 +83,7 @@ public static function init() { ) ); add_filter( 'plugin_row_meta', array( __CLASS__, 'plugin_row_meta' ), 10, 2 ); - add_action ( 'admin_notices' , array( __CLASS__ , 'supported_payments_integration_notice') , 30 ); + add_action( 'admin_notices', array( __CLASS__, 'supported_payments_integration_notice' ), 30 ); } /** @@ -91,7 +105,11 @@ public static function install_db( $networkwide ) { // check if it is a network activation - if so, run the activation function for each blog id. if ( $networkwide ) { // Get all blog ids. - $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); + $table_blogs = $wpdb->blogs; + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $table_blogs" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + foreach ( $blog_ids as $blog_id ) { switch_to_blog( $blog_id ); self::migrate_db(); @@ -111,26 +129,26 @@ public static function install_db( $networkwide ) { */ private static function check_requirements() { global $wp_version; - require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); + require_once ABSPATH . '/wp-admin/includes/plugin.php'; $errors = array(); if ( version_compare( PHP_VERSION, WC_WALLEE_REQUIRED_PHP_VERSION, '<' ) ) { - $errors[] = sprintf( __( "PHP %1\$s+ is required. (You're running version %2\$s)", 'woo-wallee' ), WC_WALLEE_REQUIRED_PHP_VERSION, PHP_VERSION ); + $errors[] = sprintf( esc_html__( "PHP %1\$s+ is required. (You're running version %2\$s)", 'woo-wallee' ), WC_WALLEE_REQUIRED_PHP_VERSION, PHP_VERSION ); } if ( version_compare( $wp_version, WC_WALLEE_REQUIRED_WP_VERSION, '<' ) ) { - $errors[] = sprintf( __( "Wordpress %1\$s+ is required. (You're running version %2\$s)", 'woo-wallee' ), WC_WALLEE_REQUIRED_WP_VERSION, $wp_version ); + $errors[] = sprintf( esc_html__( "WordPress %1\$s+ is required. (You're running version %2\$s)", 'woo-wallee' ), WC_WALLEE_REQUIRED_WP_VERSION, $wp_version ); } if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) { /* translators: %s+: version */ - $errors[] = sprintf( __( 'Woocommerce %s+ has to be active.', 'woo-wallee' ), WC_WALLEE_REQUIRED_WC_VERSION ); + $errors[] = sprintf( esc_html__( 'Woocommerce %s+ has to be active.', 'woo-wallee' ), WC_WALLEE_REQUIRED_WC_VERSION ); } else { $woocommerce_data = get_plugin_data( WP_PLUGIN_DIR . '/woocommerce/woocommerce.php', false, false ); if ( version_compare( $woocommerce_data['Version'], WC_WALLEE_REQUIRED_WC_VERSION, '<' ) ) { - $errors[] = sprintf( __( "Woocommerce %1\$s+ is required. (You're running version %2\$s)", 'woo-wallee' ), WC_WALLEE_REQUIRED_WC_VERSION, $woocommerce_data['Version'] ); + $errors[] = sprintf( esc_html__( "Woocommerce %1\$s+ is required. (You're running version %2\$s)", 'woo-wallee' ), WC_WALLEE_REQUIRED_WC_VERSION, $woocommerce_data['Version'] ); } } @@ -141,15 +159,17 @@ private static function check_requirements() { } if ( ! empty( $errors ) ) { - $title = __( 'Could not activate plugin wallee.', 'woo-wallee' ); - // phpcs:ignore - $message = '

' . esc_html_e( $title ) . '


' . - '

' . __( 'Please check the following requirements before activating:', 'woo-wallee' ) . '

' . - '
  • ' . - implode( '
  • ', $errors ) . - '
'; - // phpcs:ignore - wp_die( esc_html_e( $message ), esc_html_e( $title ), array( 'back_link' => true ) ); + $error_list = implode( '
  • ', array_map( 'esc_html', $errors ) ); + $message = printf( + /* translators: 1: Title, 2: Notification, 3: List of requirements */ //phpcs:ignore + // phpcs:ignore + esc_html__( "%1\$s\n\n%2\$s\n- %3\$s", 'woo-wallee' ), + esc_html__( 'Could not activate plugin wallee.', 'woo-wallee' ), + esc_html__( 'Please check the following requirements before activating:', 'woo-wallee' ), + esc_html__( $error_list ) //phpcs:ignore + ); + // phpcs:ignore + wp_die( $message, esc_html__( 'Could not activate plugin wallee.', 'woo-wallee' ), array( 'back_link' => true ) ); return; } } @@ -164,7 +184,7 @@ private static function check_requirements() { * @param mixed $site_id site id. * @param mixed $meta meta. */ - public static function wpmu_new_blog( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { + public static function wpmu_new_blog( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { //phpcs:ignore if ( is_plugin_active_for_network( 'woo-wallee/woocommerce-wallee.php' ) ) { switch_to_blog( $blog_id ); @@ -177,7 +197,7 @@ public static function wpmu_new_blog( $blog_id, $user_id, $domain, $path, $site_ * Migrate the database */ private static function migrate_db() { - $current_version = get_option( self::CK_DB_VERSION, 0 ); + $current_version = get_option( self::WALLEE_CK_DB_VERSION, 0 ); foreach ( self::$db_migrations as $version => $function_name ) { if ( version_compare( $current_version, $version, '<' ) ) { @@ -188,7 +208,7 @@ private static function migrate_db() { ) ); - update_option( self::CK_DB_VERSION, $version ); + update_option( self::WALLEE_CK_DB_VERSION, $version ); $current_version = $version; } } @@ -203,12 +223,12 @@ private static function migrate_db() { public static function wpmu_drop_tables( $tables ) { global $wpdb; - $tables[] = $wpdb->prefix . 'wc_wallee_method_config'; - $tables[] = $wpdb->prefix . 'wc_wallee_transaction_info'; - $tables[] = $wpdb->prefix . 'wc_wallee_token_info'; - $tables[] = $wpdb->prefix . 'wc_wallee_completion_job'; - $tables[] = $wpdb->prefix . 'wc_wallee_void_job'; - $tables[] = $wpdb->prefix . 'wc_wallee_refund_job'; + $tables[] = $wpdb->prefix . 'wallee_method_config'; + $tables[] = $wpdb->prefix . 'wallee_transaction_info'; + $tables[] = $wpdb->prefix . 'wallee_token_info'; + $tables[] = $wpdb->prefix . 'wallee_completion_job'; + $tables[] = $wpdb->prefix . 'wallee_void_job'; + $tables[] = $wpdb->prefix . 'wallee_refund_job'; return $tables; } @@ -220,7 +240,7 @@ public static function wpmu_drop_tables( $tables ) { */ public static function check_version() { try { - $current_version = get_option( self::CK_DB_VERSION, 0 ); + $current_version = get_option( self::WALLEE_CK_DB_VERSION, 0 ); $version_keys = array_keys( self::$db_migrations ); if ( version_compare( $current_version, '0', '>' ) && version_compare( $current_version, end( $version_keys ), '<' ) ) { // We migrate the Db for all blogs. @@ -249,7 +269,7 @@ public static function check_version() { public static function plugin_row_meta( $links, $file ) { if ( WC_WALLEE_PLUGIN_BASENAME === $file ) { $row_meta = array( - 'docs' => '' . esc_html__( 'Documentation', 'woo-wallee' ) . '', + 'docs' => '' . esc_html__( 'Documentation', 'woo-wallee' ) . '', ); return array_merge( $links, $row_meta ); @@ -266,8 +286,9 @@ public static function plugin_row_meta( $links, $file ) { public static function update_1_0_0_initialize() { global $wpdb; - $result = $wpdb->query( - "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}wc_wallee_method_config( + $table_method_config = $wpdb->prefix . 'wallee_method_config'; + // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $sql = "CREATE TABLE IF NOT EXISTS $table_method_config( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `state` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `space_id` bigint(20) unsigned NOT NULL, @@ -282,15 +303,21 @@ public static function update_1_0_0_initialize() { UNIQUE KEY `unq_space_id_configuration_id` (`space_id`,`configuration_id`), KEY `idx_space_id` (`space_id`), KEY `idx_configuration_id` (`configuration_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;" - ); + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"; + // phpcs:enable + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery -- $sql is prepared. + $result = $wpdb->query( $sql ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.NoCachin,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } + $table_transaction_info = $wpdb->prefix . 'wallee_transaction_info'; + + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->query( - "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}wc_wallee_transaction_info( + "CREATE TABLE IF NOT EXISTS $table_transaction_info( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `transaction_id` bigint(20) unsigned NOT NULL, `state` varchar(255) COLLATE utf8_unicode_ci NOT NULL, @@ -311,15 +338,19 @@ public static function update_1_0_0_initialize() { PRIMARY KEY (`id`), UNIQUE KEY `unq_transaction_id_space_id` (`transaction_id`,`space_id`), UNIQUE KEY `unq_order_id` (`order_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } + $table_token_info = $wpdb->prefix . 'wallee_token_info'; + + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->query( - "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}wc_wallee_token_info( + "CREATE TABLE IF NOT EXISTS $table_token_info( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `token_id` bigint(20) unsigned NOT NULL, `state` varchar(255) COLLATE utf8_unicode_ci NOT NULL, @@ -335,14 +366,19 @@ public static function update_1_0_0_initialize() { KEY `idx_customer_id` (`customer_id`), KEY `idx_payment_method_id` (`payment_method_id`), KEY `idx_connector_id` (`connector_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;" + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } + + $table_completion_job = $wpdb->prefix . 'wallee_completion_job'; + + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->query( - "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}wc_wallee_completion_job( + "CREATE TABLE IF NOT EXISTS $table_completion_job( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `state` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `completion_id` bigint(20) unsigned, @@ -358,58 +394,66 @@ public static function update_1_0_0_initialize() { PRIMARY KEY (`id`), KEY `idx_transaction_id_space_id` (`transaction_id`,`space_id`), KEY `idx_completion_id_space_id` (`completion_id`,`space_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } + $table_void_job = $wpdb->prefix . 'wallee_void_job'; + + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->query( - "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}wc_wallee_void_job( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `state` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `void_id` bigint(20) unsigned, - `transaction_id` bigint(20) unsigned NOT NULL, - `space_id` bigint(20) unsigned NOT NULL, - `order_id` bigint(20) unsigned NOT NULL, - `created_at` datetime NOT NULL, - `updated_at` datetime NOT NULL, - `restock` varchar(1) COLLATE utf8_unicode_ci, - `failure_reason` longtext COLLATE utf8_unicode_ci, - PRIMARY KEY (`id`), - KEY `idx_transaction_id_space_id` (`transaction_id`,`space_id`), - KEY `idx_void_id_space_id` (`void_id`,`space_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" + "CREATE TABLE IF NOT EXISTS $table_void_job( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `state` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `void_id` bigint(20) unsigned, + `transaction_id` bigint(20) unsigned NOT NULL, + `space_id` bigint(20) unsigned NOT NULL, + `order_id` bigint(20) unsigned NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + `restock` varchar(1) COLLATE utf8_unicode_ci, + `failure_reason` longtext COLLATE utf8_unicode_ci, + PRIMARY KEY (`id`), + KEY `idx_transaction_id_space_id` (`transaction_id`,`space_id`), + KEY `idx_void_id_space_id` (`void_id`,`space_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } + $table_refund_job = $wpdb->prefix . 'wallee_refund_job'; + + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->query( - "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}wc_wallee_refund_job( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `state` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `wc_refund_id` bigint(20) unsigned NOT NULL, - `external_id` varchar(100) NOT NULL, - `transaction_id` bigint(20) unsigned NOT NULL, - `space_id` bigint(20) unsigned NOT NULL, - `order_id` bigint(20) unsigned NOT NULL, - `created_at` datetime NOT NULL, - `updated_at` datetime NOT NULL, - `refund` longtext COLLATE utf8_unicode_ci, - `failure_reason` longtext COLLATE utf8_unicode_ci, - PRIMARY KEY (`id`), - KEY `idx_transaction_id_space_id` (`transaction_id`,`space_id`), - KEY `idx_external_id_space_id` (`external_id`,`space_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" + "CREATE TABLE IF NOT EXISTS $table_refund_job( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `state` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `wc_refund_id` bigint(20) unsigned NOT NULL, + `external_id` varchar(100) NOT NULL, + `transaction_id` bigint(20) unsigned NOT NULL, + `space_id` bigint(20) unsigned NOT NULL, + `order_id` bigint(20) unsigned NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + `refund` longtext COLLATE utf8_unicode_ci, + `failure_reason` longtext COLLATE utf8_unicode_ci, + PRIMARY KEY (`id`), + KEY `idx_transaction_id_space_id` (`transaction_id`,`space_id`), + KEY `idx_external_id_space_id` (`external_id`,`space_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } - } /** @@ -419,18 +463,24 @@ public static function update_1_0_0_initialize() { */ public static function update_1_0_1_image_url() { global $wpdb; - $result = $wpdb->query( - "ALTER TABLE `{$wpdb->prefix}wc_wallee_method_config` CHANGE `image` `image` VARCHAR(2047) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;" - ); + + $table_transaction_info = $wpdb->prefix . 'wallee_transaction_info'; + $table_method_config = $wpdb->prefix . 'wallee_method_config'; + + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( "ALTER TABLE $table_method_config CHANGE `image` `image` VARCHAR(2047) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } - $result = $wpdb->query( - "ALTER TABLE `{$wpdb->prefix}wc_wallee_transaction_info` CHANGE `image` `image` VARCHAR(2047) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;" - ); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( "ALTER TABLE $table_transaction_info CHANGE `image` `image` VARCHAR(2047) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } } @@ -441,28 +491,40 @@ public static function update_1_0_1_image_url() { */ public static function update_1_0_2_order_allow_null() { global $wpdb; - $result = $wpdb->query( - "ALTER TABLE `{$wpdb->prefix}wc_wallee_transaction_info` CHANGE `order_id` `order_id` int(10) unsigned NULL DEFAULT NULL;" - ); + + $table_transaction_info = $wpdb->prefix . 'wallee_transaction_info'; + $table_token_info = $wpdb->prefix . 'wallee_token_info'; + + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( "ALTER TABLE $table_transaction_info CHANGE `order_id` `order_id` int(10) unsigned NULL DEFAULT NULL" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } - $result = $wpdb->query( "SHOW COLUMNS FROM `{$wpdb->prefix}wc_wallee_transaction_info` LIKE 'order_mapping_id'" ); - if ( 0 == $result ) { - $result = $wpdb->query( - "ALTER TABLE `{$wpdb->prefix}wc_wallee_transaction_info` ADD `order_mapping_id` int(10) unsigned NULL AFTER order_id;" - ); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( + $wpdb->prepare( "SHOW COLUMNS FROM $table_transaction_info LIKE %s", 'order_mapping_id' ) + ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + + if ( 0 === $result ) { + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( "ALTER TABLE $table_transaction_info ADD `order_mapping_id` int(10) unsigned NULL AFTER order_id" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.NoCachin,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery + if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } } - $result = $wpdb->query( - "ALTER TABLE `{$wpdb->prefix}wc_wallee_token_info` CHANGE `customer_id` `customer_id` int(10) unsigned NULL DEFAULT NULL;" - ); + + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( "ALTER TABLE $table_token_info CHANGE `customer_id` `customer_id` int(10) unsigned NULL DEFAULT NULL" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.NoCachin,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } } @@ -474,23 +536,32 @@ public static function update_1_0_2_order_allow_null() { public static function update_1_0_3_image_domain() { global $wpdb; - $result = $wpdb->query( "SHOW COLUMNS FROM `{$wpdb->prefix}wc_wallee_method_config` LIKE 'image_base'" ); - if ( 0 == $result ) { - $result = $wpdb->query( - "ALTER TABLE `{$wpdb->prefix}wc_wallee_method_config` ADD COLUMN `image_base` VARCHAR(2047) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER image;" - ); + $table_transaction_info = $wpdb->prefix . 'wallee_transaction_info'; //phpcs:ignore + $table_method_config = $wpdb->prefix . 'wallee_method_config'; //phpcs:ignore + + $result = $wpdb->query( $wpdb->prepare( "SHOW COLUMNS FROM $table_method_config LIKE %s", 'image_base' ) );//phpcs:ignore + + if ( 0 === $result ) { + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( "ALTER TABLE $table_method_config ADD COLUMN `image_base` VARCHAR(2047) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER image" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } } - $result = $wpdb->query( "SHOW COLUMNS FROM `{$wpdb->prefix}wc_wallee_transaction_info` LIKE 'image_base'" ); - if ( 0 == $result ) { - $result = $wpdb->query( - "ALTER TABLE `{$wpdb->prefix}wc_wallee_transaction_info` ADD COLUMN `image_base` VARCHAR(2047) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER image;" - ); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( $wpdb->prepare( "SHOW COLUMNS FROM $table_transaction_info LIKE %s", 'image_base' ) ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + + if ( 0 === $result ) { + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( "ALTER TABLE $table_transaction_info ADD COLUMN `image_base` VARCHAR(2047) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER image" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } } } @@ -503,27 +574,37 @@ public static function update_1_0_3_image_domain() { public static function update_1_0_4_failure_msg_and_attribute() { global $wpdb; - $result = $wpdb->query( "SHOW COLUMNS FROM `{$wpdb->prefix}wc_wallee_transaction_info` LIKE 'user_failure_message'" ); - if ( 0 == $result ) { - $result = $wpdb->query( - "ALTER TABLE `{$wpdb->prefix}wc_wallee_transaction_info` ADD COLUMN `user_failure_message` VARCHAR(2047) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER failure_reason;" - ); + $table_transaction_info = $wpdb->prefix . 'wallee_transaction_info'; //phpcs:ignore + $table_attribute_options = $wpdb->prefix . 'wallee_attribute_options'; //phpcs:ignore + + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( $wpdb->prepare( "SHOW COLUMNS FROM $table_transaction_info LIKE %s", 'user_failure_message' ) ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + + if ( 0 === $result ) { + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( "ALTER TABLE $table_transaction_info ADD COLUMN `user_failure_message` VARCHAR(2047) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER failure_reason" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + throw new Exception( esc_html( $wpdb->last_error ) ); } } // Do not use foreign keys to reference attribute to cascade deletion, as some shop still run with MyISAM enginge as default. + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->query( - "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}wc_wallee_attribute_options( + "CREATE TABLE IF NOT EXISTS $table_attribute_options( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `attribute_id` bigint(20) UNSIGNED NOT NULL, + `attribute_id` bigint(20) UNSIGNED NOT NULL, `send` varchar(1) COLLATE utf8_unicode_ci, PRIMARY KEY (`id`), UNIQUE `unq_attribute_id` (`attribute_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" ); - if ( false === $result ) { - throw new Exception( $wpdb->last_error ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + + if ( false == $result ) { + throw new Exception( esc_html( $wpdb->last_error ) ); } } @@ -542,40 +623,44 @@ public static function update_1_0_5_clear_provider_transients() { public static function update_1_0_6_shorten_table_names() { global $wpdb; // old table names format => new table names format. + $table_prefix = self::WALLEE_DEPRECATED_TABLE_PREFIX; $table_rename_map = array( - "{$wpdb->prefix}woocommerce_wallee_attribute_options" => "{$wpdb->prefix}wc_wallee_attribute_options", - "{$wpdb->prefix}woocommerce_wallee_completion_job" => "{$wpdb->prefix}wc_wallee_completion_job", - "{$wpdb->prefix}woocommerce_wallee_method_configuration" => "{$wpdb->prefix}wc_wallee_method_config", - "{$wpdb->prefix}woocommerce_wallee_refund_job" => "{$wpdb->prefix}wc_wallee_refund_job", - "{$wpdb->prefix}woocommerce_wallee_token_info" => "{$wpdb->prefix}wc_wallee_token_info", - "{$wpdb->prefix}woocommerce_wallee_transaction_info" => "{$wpdb->prefix}wc_wallee_transaction_info", - "{$wpdb->prefix}woocommerce_wallee_void_job" => "{$wpdb->prefix}wc_wallee_void_job", + "{$wpdb->prefix}{$table_prefix}woocommerce_wallee_attribute_options" => "{$wpdb->prefix}{$table_prefix}wallee_attribute_options", + "{$wpdb->prefix}{$table_prefix}woocommerce_wallee_completion_job" => "{$wpdb->prefix}{$table_prefix}wallee_completion_job", + "{$wpdb->prefix}{$table_prefix}woocommerce_wallee_method_configuration" => "{$wpdb->prefix}{$table_prefix}wallee_method_config", + "{$wpdb->prefix}{$table_prefix}woocommerce_wallee_refund_job" => "{$wpdb->prefix}{$table_prefix}wallee_refund_job", + "{$wpdb->prefix}{$table_prefix}woocommerce_wallee_token_info" => "{$wpdb->prefix}{$table_prefix}wallee_token_info", + "{$wpdb->prefix}{$table_prefix}woocommerce_wallee_transaction_info" => "{$wpdb->prefix}{$table_prefix}wallee_transaction_info", + "{$wpdb->prefix}{$table_prefix}woocommerce_wallee_void_job" => "{$wpdb->prefix}{$table_prefix}wallee_void_job", ); - // rollback table rename if there are issues. - $wpdb->query( 'START TRANSACTION' ); - - foreach ( $table_rename_map as $key => $value ) { - // check old table exists. - // phpcs:ignore - $old_table_result = $wpdb->get_row( "SHOW TABLES WHERE Tables_in_{$wpdb->dbname} = '{$key}'" ); + self::rename_tables( $table_rename_map ); + } - if ( $old_table_result ) { - // check new table doesn't exist, if it does there's a problem! - // phpcs:ignore - $new_table_result = $wpdb->get_row( "SHOW TABLES WHERE Tables_in_{$wpdb->dbname} = '{$value}'" ); - if ( ! $new_table_result ) { - // phpcs:ignore - $result = $wpdb->query( "RENAME TABLE {$key} TO {$value}" ); - if ( false === $result ) { - throw new Exception( $wpdb->last_error ); - } - } - } - } - $wpdb->query( 'COMMIT' ); + /** + * Rename plugin tables and update plugin name. + * + * This function renames the tables and updates the plugin name + * to ensure a smooth upgrade without duplicating the plugin installation, version 4.0.0. + * + * @throws Exception Exception. + */ + public static function update_1_0_7_migrate_plugin_name_and_tables() { + global $wpdb; + // old table names format => new table names format. + $table_prefix = self::WALLEE_DEPRECATED_TABLE_PREFIX; + $table_rename_map = array( + "{$wpdb->prefix}{$table_prefix}wallee_attribute_options" => "{$wpdb->prefix}wallee_attribute_options", + "{$wpdb->prefix}{$table_prefix}wallee_completion_job" => "{$wpdb->prefix}wallee_completion_job", + "{$wpdb->prefix}{$table_prefix}wallee_method_config" => "{$wpdb->prefix}wallee_method_config", + "{$wpdb->prefix}{$table_prefix}wallee_refund_job" => "{$wpdb->prefix}wallee_refund_job", + "{$wpdb->prefix}{$table_prefix}wallee_token_info" => "{$wpdb->prefix}wallee_token_info", + "{$wpdb->prefix}{$table_prefix}wallee_transaction_info" => "{$wpdb->prefix}wallee_transaction_info", + "{$wpdb->prefix}{$table_prefix}wallee_void_job" => "{$wpdb->prefix}wallee_void_job", + ); + self::rename_tables( $table_rename_map ); } /** @@ -584,23 +669,85 @@ public static function update_1_0_6_shorten_table_names() { * @return void */ public static function supported_payments_integration_notice(): void { + if ( ! class_exists( 'WooCommerce' ) ) { + add_action( + 'admin_notices', + function () { + ?> +
    +

    +
    + ' )) { + if ( version_compare( $woocommerce_data['Version'], WC_WALLEE_REQUIRED_WC_MAXIMUM_VERSION, '>' ) ) { $notice_id = "wallee-{$woocommerce_data['Version']}-not-yet-supported"; - if (!WC_Admin_Notices::user_has_dismissed_notice($notice_id)) { - $message = sprintf(__( 'The plugin Wallee has been tested up to WooCommerce %1$s but you have installed the version %2$s. Please notice that this is not recommended.' , 'woo-wallee'), WC_WALLEE_REQUIRED_WC_MAXIMUM_VERSION, $woocommerce_data['Version']); - WC_Admin_Notices::add_custom_notice($notice_id, esc_html( $message )); + if ( ! WC_Admin_Notices::user_has_dismissed_notice( $notice_id ) ) { + $message = sprintf( + /* translators: 1: Required WooCommerce version, 2: Installed WooCommerce version */ + __( 'The plugin Wallee has been tested up to WooCommerce %1$s but you have installed the version %2$s. Please notice that this is not recommended.', 'woo-wallee' ), + WC_WALLEE_REQUIRED_WC_MAXIMUM_VERSION, + $woocommerce_data['Version'] + ); + WC_Admin_Notices::add_custom_notice( $notice_id, esc_html( $message ) ); // Clean up previous dismissals stored in the user data, from previous versions. - $previous_version = get_user_meta(get_current_user_id(), "wallee-previous-wc-min-version"); - if ($previous_version) { - delete_user_meta(get_current_user_id(), "dismissed_wallee-{$previous_version[0]}-not-yet-supported_notice"); + $previous_version = get_user_meta( get_current_user_id(), 'wallee-previous-wc-min-version' ); + if ( $previous_version ) { + delete_user_meta( get_current_user_id(), "dismissed_wallee-{$previous_version[0]}-not-yet-supported_notice" ); } - update_user_meta(get_current_user_id(), "wallee-previous-wc-min-version", $woocommerce_data['Version']); + update_user_meta( get_current_user_id(), 'wallee-previous-wc-min-version', $woocommerce_data['Version'] ); } } } + + /** + * Rename tables based on the mapping. + * + * @param array $table_rename_map Array of old table names => new table names. + * @throws Exception Exception. + */ + private static function rename_tables( $table_rename_map ) { + global $wpdb; + // rollback table rename if there are issues. + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $wpdb->query( 'START TRANSACTION' ); //phpcs:ignore + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + $table_stament = 'Tables_in_' . $wpdb->dbname; + + foreach ( $table_rename_map as $old_table_name => $new_table_name ) { + // check old table exists. + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $old_table_result = $wpdb->get_row( + $wpdb->prepare( "SHOW TABLES WHERE $table_stament = %s", $old_table_name ) + ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + + if ( $old_table_result ) { + // check new table doesn't exist, if it does there's a problem!. + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $new_table_result = $wpdb->get_row( + $wpdb->prepare( "SHOW TABLES WHERE $table_stament = %s", $new_table_name ) + ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + + if ( ! $new_table_result ) { + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->query( "RENAME TABLE $old_table_name TO $new_table_name" ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + if ( false === $result ) { + throw new Exception( esc_html( $wpdb->last_error ) ); + } + } + } + } + + $wpdb->query( 'COMMIT' ); //phpcs:ignore + } + } WC_Wallee_Migration::init(); diff --git a/includes/class-wc-wallee-order-reference.php b/includes/class-wc-wallee-order-reference.php index 2674f9d..3c8625b 100644 --- a/includes/class-wc-wallee-order-reference.php +++ b/includes/class-wc-wallee-order-reference.php @@ -1,7 +1,10 @@ get_id() === $order_id && $order->get_order_key() === $order_key ) { @@ -59,7 +58,7 @@ public static function process() { } } } - wp_redirect( home_url( '/' ) ); + wp_redirect( home_url( '/' ) ); //phpcs:ignore exit(); } @@ -81,8 +80,8 @@ protected static function process_success( WC_Order $order ) { 5 ); $gateway = wc_get_payment_gateway_by_order( $order ); - $url = apply_filters( 'wc_wallee_success_url', $gateway->get_return_url( $order ), $order ); - wp_redirect( $url ); + $url = apply_filters( 'wc_wallee_success_url', $gateway->get_return_url( $order ), $order ); //phpcs:ignore + wp_redirect( $url ); //phpcs:ignore exit(); } @@ -116,10 +115,10 @@ protected static function process_failure( WC_Order $order ) { // The order-pay functionality does not work currently with our plugin, so we don't // redirect the user there. // Otherwise we would get the url using: - // apply_filters( 'wc_wallee_pay_failure_url', $order->get_checkout_payment_url( false ), $order ) + // apply_filters( 'wc_wallee_pay_failure_url', $order->get_checkout_payment_url( false ), $order ). - $url = apply_filters( 'wc_wallee_checkout_failure_url', wc_get_checkout_url(), $order ); - wp_redirect( $url ); + $url = apply_filters( 'wc_wallee_checkout_failure_url', wc_get_checkout_url(), $order ); //phpcs:ignore + wp_redirect( $url ); //phpcs:ignore exit(); } diff --git a/includes/class-wc-wallee-unique-id.php b/includes/class-wc-wallee-unique-id.php index cda35a0..89d0bcf 100644 --- a/includes/class-wc-wallee-unique-id.php +++ b/includes/class-wc-wallee-unique-id.php @@ -1,7 +1,9 @@ add_meta_data( '_wallee_unique_line_item_id', self::get_uuid(), true ); return $item; @@ -97,7 +96,7 @@ public static function copy_unqiue_id_to_order_item( WC_Order_Item_Product $item * * @return WC_Order_Item_Shipping $item item */ - public static function copy_unqiue_id_to_order_shipping( WC_Order_Item_Shipping $item, $package_key, $package, WC_Order $order = null ) { + public static function copy_unqiue_id_to_order_shipping( WC_Order_Item_Shipping $item, $package_key, $package, WC_Order $order = null ) { //phpcs:ignore $item->add_meta_data( '_wallee_unique_line_item_id', self::get_uuid(), true ); return $item; } @@ -112,7 +111,7 @@ public static function copy_unqiue_id_to_order_shipping( WC_Order_Item_Shipping * * @return WC_Order_Item_Shipping $item item */ - public static function copy_unqiue_id_to_order_fee( WC_Order_Item_Fee $item, $fee_key, $fee, WC_Order $order = null ) { + public static function copy_unqiue_id_to_order_fee( WC_Order_Item_Fee $item, $fee_key, $fee, WC_Order $order = null ) { //phpcs:ignore $unique_id = null; if ( $fee->amount < 0 ) { $unique_id = 'discount-' . $fee->id; diff --git a/includes/class-wc-wallee-webhook-handler.php b/includes/class-wc-wallee-webhook-handler.php index 571bf9b..c95f563 100644 --- a/includes/class-wc-wallee-webhook-handler.php +++ b/includes/class-wc-wallee-webhook-handler.php @@ -1,7 +1,9 @@ get_contents( 'php://input' ); + $signature = isset( $_SERVER['HTTP_X_SIGNATURE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_SIGNATURE'] ) ) : ''; set_error_handler( array( __CLASS__, 'handle_webhook_errors' ) ); try { - $request = new WC_Wallee_Webhook_Request( json_decode( $request_body ) ); - $webhook_model = $webhook_service->get_webhook_entity_for_id( $request->get_listener_entity_id() ); - if ( null === $webhook_model ) { - WooCommerce_Wallee::instance()->log( sprintf( 'Could not retrieve webhook model for listener entity id: %s', $request->get_listener_entity_id() ), WC_Log_Levels::ERROR ); - // phpcs:ignore - echo esc_html__( sprintf( 'Could not retrieve webhook model for listener entity id: %s', $request->get_listener_entity_id() ) ); - exit(); + $clean_data = wp_kses_post( wp_unslash( $raw_post_data ) ); + $request = new WC_Wallee_Webhook_Request( json_decode( $clean_data ) ); + $client = WC_Wallee_Helper::instance()->get_api_client(); + $webhook_service = WC_Wallee_Service_Webhook::instance(); + // Handling of payloads without a signature (legacy method). + // Deprecated since 3.0.12. + if ( empty( $signature ) ) { + $webhook_model = $webhook_service->get_webhook_entity_for_id( $request->get_listener_entity_id() ); + $webhook_handler_class_name = $webhook_model->get_handler_class_name(); + $webhook_handler = $webhook_handler_class_name::instance(); + $webhook_handler->process( $request ); } - $webhook_handler_class_name = $webhook_model->get_handler_class_name(); - $webhook_handler = $webhook_handler_class_name::instance(); - $webhook_handler->process( $request ); + + // Handling of payloads with a valid signature. + // This payload signed has the transaction state. + if ( ! empty( $signature ) && $client->getWebhookEncryptionService()->isContentValid( $signature, $clean_data ) ) { + WC_Wallee_Webhook_Strategy_Manager::instance()->process( $request ); + } + header( 'HTTP/1.1 200 OK' ); } catch ( Exception $e ) { WooCommerce_Wallee::instance()->log( $e->getMessage(), WC_Log_Levels::ERROR ); - // phpcs:ignore - echo esc_textarea($e->getMessage()); + // phpcs:ignore + echo esc_textarea( $e->getMessage() ); exit(); } exit(); diff --git a/includes/entity/class-wc-wallee-entity-abstract.php b/includes/entity/class-wc-wallee-entity-abstract.php index e30bf8d..c808505 100644 --- a/includes/entity/class-wc-wallee-entity-abstract.php +++ b/includes/entity/class-wc-wallee-entity-abstract.php @@ -1,7 +1,9 @@ WC_Wallee_Entity_Resource_Type::INTEGER, - 'created_at' => WC_Wallee_Entity_Resource_Type::DATETIME, - 'updated_at' => WC_Wallee_Entity_Resource_Type::DATETIME, + 'id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'created_at' => WC_Wallee_Entity_Resource_Type::WALLEE_DATETIME, + 'updated_at' => WC_Wallee_Entity_Resource_Type::WALLEE_DATETIME, ); } @@ -123,26 +122,26 @@ protected function fill_values_from_db( array $db_values ) { if ( isset( $db_values[ $key ] ) ) { $value = $db_values[ $key ]; switch ( $type ) { - case WC_Wallee_Entity_Resource_Type::STRING: + case WC_Wallee_Entity_Resource_Type::WALLEE_STRING: // Do nothing. break; - case WC_Wallee_Entity_Resource_Type::BOOLEAN: + case WC_Wallee_Entity_Resource_Type::WALLEE_BOOLEAN: $value = 'Y' === $value; break; - case WC_Wallee_Entity_Resource_Type::INTEGER: + case WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER: $value = intval( $value ); break; - case WC_Wallee_Entity_Resource_Type::DECIMAL: + case WC_Wallee_Entity_Resource_Type::WALLEE_DECIMAL: $value = (float) $value; break; - case WC_Wallee_Entity_Resource_Type::DATETIME: + case WC_Wallee_Entity_Resource_Type::WALLEE_DATETIME: $value = new DateTime( $value ); break; - case WC_Wallee_Entity_Resource_Type::OBJECT: - $value = unserialize( $value ); + case WC_Wallee_Entity_Resource_Type::WALLEE_OBJECT: + $value = unserialize( $value ); //phpcs:ignore break; default: throw new Exception( 'Unsupported variable type' ); @@ -165,31 +164,31 @@ public function save() { foreach ( $this->get_field_definition() as $key => $type ) { $value = $this->get_value( $key ); switch ( $type ) { - case WC_Wallee_Entity_Resource_Type::STRING: + case WC_Wallee_Entity_Resource_Type::WALLEE_STRING: $type_array[] = '%s'; break; - case WC_Wallee_Entity_Resource_Type::BOOLEAN: + case WC_Wallee_Entity_Resource_Type::WALLEE_BOOLEAN: $value = $value ? 'Y' : 'N'; $type_array[] = '%s'; break; - case WC_Wallee_Entity_Resource_Type::INTEGER: + case WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER: $type_array[] = '%d'; break; - case WC_Wallee_Entity_Resource_Type::DATETIME: + case WC_Wallee_Entity_Resource_Type::WALLEE_DATETIME: if ( $value instanceof DateTime ) { $value = $value->format( 'Y-m-d H:i:s' ); } $type_array[] = '%s'; break; - case WC_Wallee_Entity_Resource_Type::OBJECT: - $value = serialize( $value ); + case WC_Wallee_Entity_Resource_Type::WALLEE_OBJECT: + $value = serialize( $value ); //phpcs:ignore $type_array[] = '%s'; break; - case WC_Wallee_Entity_Resource_Type::DECIMAL: + case WC_Wallee_Entity_Resource_Type::WALLEE_DECIMAL: $value = number_format( $value, 8, '.', '' ); $type_array[] = '%s'; break; @@ -202,10 +201,10 @@ public function save() { $this->prepare_base_fields_for_storage( $data_array, $type_array ); if ( $this->get_id() === null ) { - $wpdb->insert( $wpdb->prefix . $this->get_table_name(), $data_array, $type_array ); + $wpdb->insert( $wpdb->prefix . $this->get_table_name(), $data_array, $type_array ); //phpcs:ignore $this->set_id( $wpdb->insert_id ); } else { - $wpdb->update( + $wpdb->update( //phpcs:ignore $wpdb->prefix . $this->get_table_name(), $data_array, array( @@ -245,7 +244,7 @@ protected function prepare_base_fields_for_storage( &$data_array, &$type_array ) public static function load_by_id( $id ) { global $wpdb; // phpcs:ignore - $result = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . static::get_table_name() . ' WHERE id = %d', $id ), ARRAY_A ); + $result = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . static::get_table_name() . ' WHERE id = %d', $id ), ARRAY_A ); //phpcs:ignore if ( null !== $result ) { return new static( $result ); } @@ -261,7 +260,7 @@ public static function load_all() { global $wpdb; // Returns empty array. // phpcs:ignore - $db_results = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . static::get_table_name(), ARRAY_A ); + $db_results = $wpdb->get_results( "SELECT * FROM ". $wpdb->prefix . static::get_table_name() , ARRAY_A );//phpcs:ignore $result = array(); foreach ( $db_results as $object_values ) { $result[] = new static( $object_values ); @@ -274,7 +273,7 @@ public static function load_all() { */ public function delete() { global $wpdb; - $wpdb->delete( + $wpdb->delete( //phpcs:ignore $wpdb->prefix . $this->get_table_name(), array( 'id' => $this->get_id(), diff --git a/includes/entity/class-wc-wallee-entity-attribute-options.php b/includes/entity/class-wc-wallee-entity-attribute-options.php index 242a6f2..e85a892 100644 --- a/includes/entity/class-wc-wallee-entity-attribute-options.php +++ b/includes/entity/class-wc-wallee-entity-attribute-options.php @@ -1,7 +1,9 @@ WC_Wallee_Entity_Resource_Type::INTEGER, - 'send' => WC_Wallee_Entity_Resource_Type::BOOLEAN, + 'attribute_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'send' => WC_Wallee_Entity_Resource_Type::WALLEE_BOOLEAN, ); } @@ -45,7 +43,7 @@ protected static function get_field_definition() { */ protected static function get_base_fields() { return array( - 'id' => WC_Wallee_Entity_Resource_Type::INTEGER, + 'id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, ); } @@ -53,7 +51,7 @@ protected static function get_base_fields() { * Get table name. */ protected static function get_table_name() { - return 'wc_wallee_attribute_options'; + return 'wallee_attribute_options'; } /** @@ -62,9 +60,7 @@ protected static function get_table_name() { * @param array $data_array data array. * @param array $type_array type array. */ - protected function prepare_base_fields_for_storage( &$data_array, &$type_array ) { - - } + protected function prepare_base_fields_for_storage( &$data_array, &$type_array ) {} /** * Load attribute by ID. @@ -73,19 +69,19 @@ protected function prepare_base_fields_for_storage( &$data_array, &$type_array ) */ public static function load_by_attribute_id( $attribute_id ) { global $wpdb; + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->get_row( - // phpcs:ignore $wpdb->prepare( - 'SELECT * FROM %1$s WHERE attribute_id = %2$d', - $wpdb->prefix . self::get_table_name(), + "SELECT * FROM $table WHERE attribute_id = %d", $attribute_id ), ARRAY_A ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( null !== $result ) { return new self( $result ); } return new self(); } - } diff --git a/includes/entity/class-wc-wallee-entity-completion-job.php b/includes/entity/class-wc-wallee-entity-completion-job.php index ecebea0..771947d 100644 --- a/includes/entity/class-wc-wallee-entity-completion-job.php +++ b/includes/entity/class-wc-wallee-entity-completion-job.php @@ -1,7 +1,9 @@ WC_Wallee_Entity_Resource_Type::INTEGER, - 'state' => WC_Wallee_Entity_Resource_Type::STRING, - 'space_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'transaction_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'order_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'amount' => WC_Wallee_Entity_Resource_Type::DECIMAL, - 'items' => WC_Wallee_Entity_Resource_Type::OBJECT, - 'restock' => WC_Wallee_Entity_Resource_Type::BOOLEAN, - 'failure_reason' => WC_Wallee_Entity_Resource_Type::OBJECT, + 'completion_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'state' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'space_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'transaction_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'order_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'amount' => WC_Wallee_Entity_Resource_Type::WALLEE_DECIMAL, + 'items' => WC_Wallee_Entity_Resource_Type::WALLEE_OBJECT, + 'restock' => WC_Wallee_Entity_Resource_Type::WALLEE_BOOLEAN, + 'failure_reason' => WC_Wallee_Entity_Resource_Type::WALLEE_OBJECT, ); } @@ -74,7 +72,7 @@ protected static function get_field_definition() { * @return string */ protected static function get_table_name() { - return 'wc_wallee_completion_job'; + return 'wallee_completion_job'; } /** @@ -131,7 +129,7 @@ public static function count_running_completion_for_transaction( $space_id, $tra 'SELECT COUNT(*) FROM ' . $wpdb->prefix . self::get_table_name() . ' WHERE space_id = %d AND transaction_id = %d AND state != %s', $space_id, $transaction_id, - self::STATE_DONE + self::WALLEE_STATE_DONE ); // phpcs:ignore $result = $wpdb->get_var( $query ); @@ -155,7 +153,7 @@ public static function load_running_completion_for_transaction( $space_id, $tran // phpcs:ignore $space_id, $transaction_id, - self::STATE_DONE + self::WALLEE_STATE_DONE ), ARRAY_A ); @@ -174,15 +172,14 @@ public static function load_not_sent_job_ids() { $time = new DateTime(); $time->sub( new DateInterval( 'PT10M' ) ); - $db_results = $wpdb->get_results( - // phpcs:ignore + $db_results = $wpdb->get_results( //phpcs:ignore $wpdb->prepare( // phpcs:ignore 'SELECT id FROM ' . $wpdb->prefix . self::get_table_name() . ' WHERE (state = %s OR state = %s ) AND updated_at < %s', // phpcs:ignore - self::STATE_CREATED, + self::WALLEE_STATE_CREATED, // phpcs:ignore - self::STATE_ITEMS_UPDATED, + self::WALLEE_STATE_ITEMS_UPDATED, // phpcs:ignore $time->format( 'Y-m-d H:i:s' ) ), diff --git a/includes/entity/class-wc-wallee-entity-method-configuration.php b/includes/entity/class-wc-wallee-entity-method-configuration.php index cbb5603..3072692 100644 --- a/includes/entity/class-wc-wallee-entity-method-configuration.php +++ b/includes/entity/class-wc-wallee-entity-method-configuration.php @@ -1,7 +1,9 @@ WC_Wallee_Entity_Resource_Type::STRING, - 'space_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'configuration_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'configuration_name' => WC_Wallee_Entity_Resource_Type::STRING, - 'title' => WC_Wallee_Entity_Resource_Type::OBJECT, - 'description' => WC_Wallee_Entity_Resource_Type::OBJECT, - 'image' => WC_Wallee_Entity_Resource_Type::STRING, - 'image_base' => WC_Wallee_Entity_Resource_Type::STRING, + 'state' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'space_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'configuration_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'configuration_name' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'title' => WC_Wallee_Entity_Resource_Type::WALLEE_OBJECT, + 'description' => WC_Wallee_Entity_Resource_Type::WALLEE_OBJECT, + 'image' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'image_base' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, ); } @@ -66,7 +67,7 @@ protected static function get_field_definition() { * @return string */ protected static function get_table_name() { - return 'wc_wallee_method_config'; + return 'wallee_method_config'; } /** @@ -79,15 +80,17 @@ protected static function get_table_name() { public static function load_by_configuration( $space_id, $configuration_id ) { global $wpdb; + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->get_row( $wpdb->prepare( - 'SELECT * FROM %1$s WHERE space_id = %2$d AND configuration_id = %3$d', - $wpdb->prefix . self::get_table_name(), + "SELECT * FROM $table WHERE space_id = %d AND configuration_id = %d", $space_id, $configuration_id ), ARRAY_A ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( null !== $result ) { return new self( $result ); @@ -121,12 +124,16 @@ public static function load_by_states_and_space_id( $space_id, array $states ) { $query = 'SELECT * FROM ' . $wpdb->prefix . self::get_table_name() . ' WHERE space_id = %d AND state IN (' . $replace . ')'; $result = array(); - // phpcs:ignore - $db_results = $wpdb->get_results( $wpdb->prepare( $query, $values ), ARRAY_A ); - if ( is_array( $db_results ) ) { - foreach ( $db_results as $object_values ) { - $result[] = new static( $object_values ); + try { + // phpcs:ignore + $db_results = $wpdb->get_results( $wpdb->prepare( $query, $values ), ARRAY_A ); + if ( is_array( $db_results ) ) { + foreach ( $db_results as $object_values ) { + $result[] = new static( $object_values ); + } } + } catch ( Exception $e ) { + return $result; } return $result; } diff --git a/includes/entity/class-wc-wallee-entity-refund-job.php b/includes/entity/class-wc-wallee-entity-refund-job.php index 9dec565..dc73297 100644 --- a/includes/entity/class-wc-wallee-entity-refund-job.php +++ b/includes/entity/class-wc-wallee-entity-refund-job.php @@ -1,7 +1,9 @@ WC_Wallee_Entity_Resource_Type::STRING, - 'state' => WC_Wallee_Entity_Resource_Type::STRING, - 'space_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'transaction_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'order_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'wc_refund_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'refund' => WC_Wallee_Entity_Resource_Type::OBJECT, - 'failure_reason' => WC_Wallee_Entity_Resource_Type::OBJECT, + 'external_id' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'state' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'space_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'transaction_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'order_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'wc_refund_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'refund' => WC_Wallee_Entity_Resource_Type::WALLEE_OBJECT, + 'failure_reason' => WC_Wallee_Entity_Resource_Type::WALLEE_OBJECT, ); } @@ -66,7 +67,7 @@ protected static function get_field_definition() { * @return string */ protected static function get_table_name() { - return 'wc_wallee_refund_job'; + return 'wallee_refund_job'; } @@ -94,15 +95,18 @@ public function get_failure_reason( $language = null ) { */ public static function load_by_external_id( $space_id, $external_id ) { global $wpdb; + + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->get_row( $wpdb->prepare( - 'SELECT * FROM %1$s WHERE space_id = %2$d AND external_id = "%3$s"', - $wpdb->prefix . self::get_table_name(), + "SELECT * FROM {$table} WHERE space_id = %d AND external_id = %s", $space_id, $external_id ), ARRAY_A ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( null !== $result ) { return new self( $result ); } @@ -119,16 +123,18 @@ public static function load_by_external_id( $space_id, $external_id ) { public static function count_running_refund_for_transaction( $space_id, $transaction_id ) { global $wpdb; - $result = $wpdb->get_var( + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->get_var( //phpcs:ignore $wpdb->prepare( - 'SELECT COUNT(*) FROM %1$s WHERE space_id = %2$d AND transaction_id = %3$d AND state != "%4$s" AND state != "%5$s"', - $wpdb->prefix . self::get_table_name(), + "SELECT COUNT(*) FROM $table WHERE space_id = %d AND transaction_id = %d AND state != %s AND state != %s", $space_id, $transaction_id, - self::STATE_SUCCESS, - self::STATE_FAILURE + self::WALLEE_STATE_SUCCESS, + self::WALLEE_STATE_FAILURE ) ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. return $result; } @@ -141,17 +147,19 @@ public static function count_running_refund_for_transaction( $space_id, $transac */ public static function load_running_refund_for_transaction( $space_id, $transaction_id ) { global $wpdb; - $result = $wpdb->get_row( + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->get_row( //phpcs:ignore $wpdb->prepare( - 'SELECT * FROM %1$s WHERE space_id = %2$d AND transaction_id = %3$d AND state != "%4$s" AND state != "%5$s"', - $wpdb->prefix . self::get_table_name(), + "SELECT * FROM $table WHERE space_id = %d AND transaction_id = %d AND state != %s AND state != %s", $space_id, $transaction_id, - self::STATE_SUCCESS, - self::STATE_FAILURE + self::WALLEE_STATE_SUCCESS, + self::WALLEE_STATE_FAILURE ), ARRAY_A ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( null !== $result ) { return new self( $result ); } @@ -166,16 +174,17 @@ public static function load_running_refund_for_transaction( $space_id, $transact */ public static function load_refunds_for_order( $order_id ) { global $wpdb; - - $db_results = $wpdb->get_results( + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $db_results = $wpdb->get_results( //phpcs:ignore $wpdb->prepare( - 'SELECT * FROM %1$s WHERE order_id = %2$d', - $wpdb->prefix . self::get_table_name(), + "SELECT * FROM $table WHERE order_id = %d", $order_id ), ARRAY_A ); - $result = array(); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + $result = array(); if ( is_array( $db_results ) ) { foreach ( $db_results as $object_values ) { $result[] = new self( $object_values ); @@ -193,16 +202,18 @@ public static function load_not_sent_job_ids() { global $wpdb; $time = new DateTime(); $time->sub( new DateInterval( 'PT10M' ) ); - $db_results = $wpdb->get_results( + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $db_results = $wpdb->get_results( //phpcs:ignore $wpdb->prepare( - 'SELECT id FROM %1$s WHERE state = "%2$s" AND updated_at < "%3$s"', - $wpdb->prefix . self::get_table_name(), - self::STATE_CREATED, + "SELECT id FROM $table WHERE state = %s AND updated_at < %s", + self::WALLEE_STATE_CREATED, $time->format( 'Y-m-d H:i:s' ) ), ARRAY_A ); - $result = array(); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. + $result = array(); if ( is_array( $db_results ) ) { foreach ( $db_results as $object_values ) { $result[] = $object_values['id']; diff --git a/includes/entity/class-wc-wallee-entity-resource-type.php b/includes/entity/class-wc-wallee-entity-resource-type.php index 2bf9765..628d022 100644 --- a/includes/entity/class-wc-wallee-entity-resource-type.php +++ b/includes/entity/class-wc-wallee-entity-resource-type.php @@ -1,7 +1,9 @@ WC_Wallee_Entity_Resource_Type::INTEGER, - 'state' => WC_Wallee_Entity_Resource_Type::STRING, - 'space_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'name' => WC_Wallee_Entity_Resource_Type::STRING, - 'customer_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'payment_method_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'connector_id' => WC_Wallee_Entity_Resource_Type::INTEGER, + 'token_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'state' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'space_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'name' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'customer_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'payment_method_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'connector_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, ); } @@ -59,7 +60,7 @@ protected static function get_field_definition() { * @return string */ protected static function get_table_name() { - return 'wc_wallee_token_info'; + return 'wallee_token_info'; } /** @@ -71,15 +72,17 @@ protected static function get_table_name() { */ public static function load_by_token( $space_id, $token_id ) { global $wpdb; + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->get_row( $wpdb->prepare( - 'SELECT * FROM %1$s WHERE space_id = %2$d AND token_id = %3$d', - $wpdb->prefix . self::get_table_name(), + "SELECT * FROM $table WHERE space_id = %d AND token_id = %d", $space_id, $token_id ), ARRAY_A ); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. if ( null !== $result ) { return new self( $result ); } diff --git a/includes/entity/class-wc-wallee-entity-transaction-info.php b/includes/entity/class-wc-wallee-entity-transaction-info.php index 1c464ad..6a41da5 100644 --- a/includes/entity/class-wc-wallee-entity-transaction-info.php +++ b/includes/entity/class-wc-wallee-entity-transaction-info.php @@ -1,7 +1,9 @@ WC_Wallee_Entity_Resource_Type::INTEGER, - 'state' => WC_Wallee_Entity_Resource_Type::STRING, - 'space_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'space_view_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'language' => WC_Wallee_Entity_Resource_Type::STRING, - 'currency' => WC_Wallee_Entity_Resource_Type::STRING, - 'authorization_amount' => WC_Wallee_Entity_Resource_Type::DECIMAL, - 'image' => WC_Wallee_Entity_Resource_Type::STRING, - 'image_base' => WC_Wallee_Entity_Resource_Type::STRING, - 'labels' => WC_Wallee_Entity_Resource_Type::OBJECT, - 'payment_method_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'connector_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'order_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'order_mapping_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'failure_reason' => WC_Wallee_Entity_Resource_Type::OBJECT, - 'user_failure_message' => WC_Wallee_Entity_Resource_Type::STRING, - 'locked_at' => WC_Wallee_Entity_Resource_Type::DATETIME, + 'transaction_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'state' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'space_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'space_view_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'language' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'currency' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'authorization_amount' => WC_Wallee_Entity_Resource_Type::WALLEE_DECIMAL, + 'image' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'image_base' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'labels' => WC_Wallee_Entity_Resource_Type::WALLEE_OBJECT, + 'payment_method_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'connector_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'order_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'order_mapping_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'failure_reason' => WC_Wallee_Entity_Resource_Type::WALLEE_OBJECT, + 'user_failure_message' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'locked_at' => WC_Wallee_Entity_Resource_Type::WALLEE_DATETIME, ); } @@ -86,7 +87,7 @@ protected static function get_field_definition() { * @return string */ protected static function get_table_name() { - return 'wc_wallee_transaction_info'; + return 'wallee_transaction_info'; } /** @@ -111,14 +112,16 @@ public function get_failure_reason( $language = null ) { */ public static function load_by_order_id( $order_id ) { global $wpdb; - $result = $wpdb->get_row( + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->get_row(//phpcs:ignore $wpdb->prepare( - 'SELECT * FROM %1$s WHERE order_id = %2$d', - $wpdb->prefix . self::get_table_name(), + "SELECT * FROM $table WHERE order_id = %d", $order_id ), ARRAY_A ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( null !== $result ) { return new self( $result ); } @@ -134,15 +137,17 @@ public static function load_by_order_id( $order_id ) { */ public static function load_by_transaction( $space_id, $transaction_id ) { global $wpdb; + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->get_row( $wpdb->prepare( - 'SELECT * FROM %1$s WHERE space_id = %2$d AND transaction_id = %3$d', - $wpdb->prefix . self::get_table_name(), + "SELECT * FROM $table WHERE space_id = %d AND transaction_id = %d", $space_id, $transaction_id ), ARRAY_A ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( null !== $result ) { return new self( $result ); } @@ -158,14 +163,16 @@ public static function load_by_transaction( $space_id, $transaction_id ) { */ public static function load_newest_by_mapped_order_id( $order_id ) { global $wpdb; + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->get_row( $wpdb->prepare( - 'SELECT * FROM %1$s WHERE order_mapping_id = %2$d ORDER BY id DESC', - $wpdb->prefix . self::get_table_name(), + "SELECT * FROM $table WHERE order_mapping_id = %d ORDER BY id DESC", $order_id ), ARRAY_A ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( null !== $result ) { return new self( $result ); } diff --git a/includes/entity/class-wc-wallee-entity-void-job.php b/includes/entity/class-wc-wallee-entity-void-job.php index 4337ff5..7d100e5 100644 --- a/includes/entity/class-wc-wallee-entity-void-job.php +++ b/includes/entity/class-wc-wallee-entity-void-job.php @@ -1,7 +1,9 @@ WC_Wallee_Entity_Resource_Type::INTEGER, - 'state' => WC_Wallee_Entity_Resource_Type::STRING, - 'space_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'transaction_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'order_id' => WC_Wallee_Entity_Resource_Type::INTEGER, - 'restock' => WC_Wallee_Entity_Resource_Type::BOOLEAN, - 'failure_reason' => WC_Wallee_Entity_Resource_Type::OBJECT, + 'void_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'state' => WC_Wallee_Entity_Resource_Type::WALLEE_STRING, + 'space_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'transaction_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'order_id' => WC_Wallee_Entity_Resource_Type::WALLEE_INTEGER, + 'restock' => WC_Wallee_Entity_Resource_Type::WALLEE_BOOLEAN, + 'failure_reason' => WC_Wallee_Entity_Resource_Type::WALLEE_OBJECT, ); } @@ -62,7 +63,7 @@ protected static function get_field_definition() { * @return string */ protected static function get_table_name() { - return 'wc_wallee_void_job'; + return 'wallee_void_job'; } @@ -90,15 +91,17 @@ public function get_failure_reason( $language = null ) { */ public static function load_by_void( $space_id, $void_id ) { global $wpdb; - $result = $wpdb->get_row( + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. + $result = $wpdb->get_row( //phpcs:ignore $wpdb->prepare( - 'SELECT * FROM %1$s WHERE space_id = %2$d AND void_id = %3$d', - $wpdb->prefix . self::get_table_name(), + "SELECT * FROM $table WHERE space_id = %d AND void_id = %d", $space_id, $void_id ), ARRAY_A ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( null !== $result ) { return new self( $result ); } @@ -115,15 +118,17 @@ public static function load_by_void( $space_id, $void_id ) { public static function count_running_void_for_transaction( $space_id, $transaction_id ) { global $wpdb; + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->get_var( $wpdb->prepare( - 'SELECT COUNT(*) FROM %1$s WHERE space_id = %2$d AND transaction_id = %3$d AND state != "%4$s"', - $wpdb->prefix . self::get_table_name(), + "SELECT COUNT(*) FROM $table WHERE space_id = %d AND transaction_id = %d AND state != %s", $space_id, $transaction_id, - self::STATE_DONE + self::WALLEE_STATE_DONE ) ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. return $result; } @@ -136,16 +141,18 @@ public static function count_running_void_for_transaction( $space_id, $transacti */ public static function load_running_void_for_transaction( $space_id, $transaction_id ) { global $wpdb; + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $result = $wpdb->get_row( $wpdb->prepare( - 'SELECT * FROM %1$s WHERE space_id = %2$d AND transaction_id = %3$d AND state != "%4$s"', - $wpdb->prefix . self::get_table_name(), + "SELECT * FROM $table WHERE space_id = %d AND transaction_id = %d AND state != %s", $space_id, $transaction_id, - self::STATE_DONE + self::WALLEE_STATE_DONE ), ARRAY_A ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. if ( null !== $result ) { return new self( $result ); } @@ -163,15 +170,17 @@ public static function load_not_sent_job_ids() { $time = new DateTime(); $time->sub( new DateInterval( 'PT10M' ) ); + $table = $wpdb->prefix . self::get_table_name(); + // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Values are escaped in $wpdb->prepare. $db_results = $wpdb->get_results( $wpdb->prepare( - 'SELECT id FROM %1$s WHERE state = "%2$s" AND updated_at < "%3$s"', - $wpdb->prefix . self::get_table_name(), - self::STATE_CREATED, + "SELECT id FROM $table WHERE state = %s AND updated_at < %s", + self::WALLEE_STATE_CREATED, $time->format( 'Y-m-d H:i:s' ) ), ARRAY_A ); + // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare. $result = array(); if ( is_array( $db_results ) ) { foreach ( $db_results as $object_values ) { diff --git a/includes/exception/class-wc-wallee-exception-invalid-transaction-amount.php b/includes/exception/class-wc-wallee-exception-invalid-transaction-amount.php index 93de1ac..8443d7f 100644 --- a/includes/exception/class-wc-wallee-exception-invalid-transaction-amount.php +++ b/includes/exception/class-wc-wallee-exception-invalid-transaction-amount.php @@ -1,7 +1,9 @@ order_total; } - } diff --git a/includes/packages/coupon/class-wc-wallee-packages-coupon-discount.php b/includes/packages/coupon/class-wc-wallee-packages-coupon-discount.php index 7787a23..d2586b8 100644 --- a/includes/packages/coupon/class-wc-wallee-packages-coupon-discount.php +++ b/includes/packages/coupon/class-wc-wallee-packages-coupon-discount.php @@ -1,7 +1,9 @@ add_meta_data( '_wallee_coupon_discount_line_item_discounts', $coupon_discount ); return $item; } @@ -105,27 +104,32 @@ public static function copy_total_coupon_discount_meta_data_to_order_item( WC_Or /** * Get the total coupons discounts amount applied to the cart. * - * @param $currency - * @return float|int + * @param string $currency The currency code. + * @return float|int The total coupons' discounts' amount including tax. */ public static function get_coupons_discount_totals_including_tax( $currency ) { $coupons_discount_total = 0; - //guard clause if the order doesn't exists, nothing to do here. - $order_id = WC()->session->get( 'wallee_order_id' ); - if ( WC()->cart->get_cart_contents_count() == 0 && !is_null( $order_id ) ) { - - if ( $order = wc_get_order( $order_id ) ) { + // guard clause if the order doesn't exists, nothing to do here. + $session = WC()->session; + if ( ! class_exists( 'WC_Session' ) || ! ( $session instanceof WC_Session ) ) { + return $coupons_discount_total; + } + + $order_id = $session->get( 'wallee_order_id' ); + if ( WC()->cart->get_cart_contents_count() == 0 && ! is_null( $order_id ) ) { + $order = wc_get_order( $order_id ); + if ( $order ) { $coupons_discount_total += $order->get_total_discount(); } } - //guard clause if the cart is empty, nothing to do here. This applies to subscription renewals + // guard clause if the cart is empty, nothing to do here. This applies to subscription renewals. if ( empty( WC()->cart->get_cart_contents_count() ) ) { return $coupons_discount_total; } - foreach (WC()->cart->get_coupon_discount_totals() as $coupon_discount_total) { + foreach ( WC()->cart->get_coupon_discount_totals() as $coupon_discount_total ) { $coupons_discount_total += WC_Wallee_Helper::instance()->round_amount( $coupon_discount_total, $currency ); } @@ -135,20 +139,19 @@ public static function get_coupons_discount_totals_including_tax( $currency ) { /** * Check if the cart has any coupons. * - * @param $currency + * @param string $currency currency. * @return bool */ public static function has_coupon_discounts_applied( $currency ) { - $discount = apply_filters( 'wc_wallee_packages_coupon_discount_totals_including_tax', $currency ); + $discount = apply_filters( 'wc_wallee_packages_coupon_discount_totals_including_tax', $currency ); //phpcs:ignore return $discount > 0; } /** * Get coupons with their discount applied per item based on quantity. * - * @param WC_Cart $cart - * @return array|array[] - * @throws Exception + * @param WC_Cart $cart The WooCommerce cart object. + * @return array|array[] An array containing coupons with their discount applied per item. */ public static function get_coupon_discounts_applied_by_cart( WC_Cart $cart ) { if ( empty( $cart->get_coupons() ) ) { @@ -169,15 +172,14 @@ public static function get_coupon_discounts_applied_by_cart( WC_Cart $cart ) { /** * Get percentage coupon discount per item based on quantity. * - * @param string $item_key - * @return int|mixed - * @throws Exception + * @param string $item_key The item key. + * @return int|mixed The coupon discount for the item. */ public static function get_coupon_percentage_discount_by_item( string $item_key ) { - $coupon_discounts_applied = apply_filters( 'wc_wallee_packages_coupon_discounts_applied_by_cart', WC()->cart ); + $coupon_discounts_applied = apply_filters( 'wc_wallee_packages_coupon_discounts_applied_by_cart', WC()->cart ); //phpcs:ignore $coupon_percentage_discount = 0; foreach ( $coupon_discounts_applied as $discounts ) { - if ( !empty( $discounts[ $item_key ] ) ) { + if ( ! empty( $discounts[ $item_key ] ) ) { $coupon_percentage_discount += $discounts[ $item_key ]; } } @@ -187,37 +189,36 @@ public static function get_coupon_percentage_discount_by_item( string $item_key /** * Calculate total line items if there is a coupon * - * @param array $line_items - * @param float $expected_sum - * @param string $currency - * @return array + * @param array $line_items The array of line items. + * @param float $expected_sum The expected sum. + * @param string $currency The current currency. + * @return array An array containing the effective sum and cleaned line items. */ public static function process_line_items_with_coupons( array $line_items, float $expected_sum, string $currency ) { - $line_item_coupons = []; + $line_item_coupons = array(); $exclude_discounts = true; - $amount = WC_Wallee_Helper::instance()->get_total_amount_including_tax( $line_items, $exclude_discounts); - $effective_sum = WC_Wallee_Helper::instance()->round_amount( $amount , $currency ); - //compare the difference with a small tolerance to handle floating point inaccuracies. + $amount = WC_Wallee_Helper::instance()->get_total_amount_including_tax( $line_items, $exclude_discounts ); + $effective_sum = WC_Wallee_Helper::instance()->round_amount( $amount, $currency ); + // compare the difference with a small tolerance to handle floating point inaccuracies. $result_amount = $expected_sum - $effective_sum; - //coupon line items rounding again - /** @var \Wallee\Sdk\Model\LineItemCreate $line_item */ + // coupon line items rounding again. foreach ( $line_items as $line_item ) { if ( $line_item->getType() == \Wallee\Sdk\Model\LineItemType::DISCOUNT ) { - //if there is a difference, a penny, then the coupon is readjust + // if there is a difference, a penny, then the coupon is readjust. $line_item_coupons[] = clone $line_item; $item_amount = $line_item->getAmountIncludingTax() + $result_amount; $line_item->setAmountIncludingTax( WC_Wallee_Helper::instance()->round_amount( $item_amount, $currency ) ); } } - //if there is another difference, like a penny, create a new line item for adjustment - $amount_rounded = WC_Wallee_Helper::instance()->get_total_amount_including_tax( $line_items, $exclude_discounts); - if ( !self::compare_numbers( $expected_sum, $amount_rounded ) ) { + // if there is another difference, like a penny, create a new line item for adjustment. + $amount_rounded = WC_Wallee_Helper::instance()->get_total_amount_including_tax( $line_items, $exclude_discounts ); + if ( ! self::compare_numbers( $expected_sum, $amount_rounded ) ) { $line_item = new \Wallee\Sdk\Model\LineItemCreate(); $amount_mismatch = $expected_sum - $amount_rounded; $line_item->setAmountIncludingTax( WC_Wallee_Helper::instance()->round_amount( $amount_mismatch, $currency ) ); - $line_item->setName( __( 'Coupon adjustment', 'woo-wallee' ) ); + $line_item->setName( esc_html__( 'Coupon adjustment', 'woo-wallee' ) ); $line_item->setQuantity( 1 ); $line_item->setSku( 'coupon adjustment' ); $line_item->setUniqueId( 'coupon adjustment' ); @@ -225,32 +226,32 @@ public static function process_line_items_with_coupons( array $line_items, float $line_item->setType( \Wallee\Sdk\Model\LineItemType::DISCOUNT ); $line_items[] = $line_item; - //readjustment of the total amount of items - //($amount_mismatch * -1) this changes the sign of the floating number so that it can be subtracted. - $amount_rounded = $amount_rounded - ($amount_mismatch * -1); // + // readjustment of the total amount of items + // ($amount_mismatch * -1) this changes the sign of the floating number so that it can be subtracted. + $amount_rounded = $amount_rounded - ( $amount_mismatch * -1 ); } - return [ - //format number with two decimal places - 'effective_sum' => sprintf("%.2f", $amount_rounded ), + return array( + // format number with two decimal places. + 'effective_sum' => sprintf( '%.2f', $amount_rounded ), 'line_items_cleaned' => $line_items, 'line_item_coupons' => $line_item_coupons, - ]; + ); } /** * Compare whether two floating numbers are equal - * @param float $first_value - * @param float $second_value - * @param int $precision - * @return bool + * + * @param float $first_value The first floating-point number to compare. + * @param float $second_value The second floating-point number to compare. + * @param int $precision (Optional) The precision to use for rounding. Default is 6. + * @return bool Returns true if the two numbers are equal within the specified precision, false otherwise. */ - private static function compare_numbers(float $first_value, float $second_value, int $precision = 6) - { + private static function compare_numbers( float $first_value, float $second_value, int $precision = 6 ) { $multiplier = pow( 10, $precision ); - $first_value_rounded = round($first_value * $multiplier); - $second_value_rounded = round($second_value * $multiplier); + $first_value_rounded = round( $first_value * $multiplier ); + $second_value_rounded = round( $second_value * $multiplier ); return $first_value_rounded === $second_value_rounded; } } diff --git a/includes/provider/class-wc-wallee-provider-abstract.php b/includes/provider/class-wc-wallee-provider-abstract.php index ec70524..c79ad48 100644 --- a/includes/provider/class-wc-wallee-provider-abstract.php +++ b/includes/provider/class-wc-wallee-provider-abstract.php @@ -1,7 +1,9 @@ getCurrencyCode(); } } diff --git a/includes/provider/class-wc-wallee-provider-label-description-group.php b/includes/provider/class-wc-wallee-provider-label-description-group.php index e468f3d..3e5c3a2 100644 --- a/includes/provider/class-wc-wallee-provider-label-description-group.php +++ b/includes/provider/class-wc-wallee-provider-label-description-group.php @@ -1,7 +1,9 @@ getId(); } } diff --git a/includes/provider/class-wc-wallee-provider-label-description.php b/includes/provider/class-wc-wallee-provider-label-description.php index 0cd9602..12c8f7f 100644 --- a/includes/provider/class-wc-wallee-provider-label-description.php +++ b/includes/provider/class-wc-wallee-provider-label-description.php @@ -1,7 +1,9 @@ getId(); } } diff --git a/includes/provider/class-wc-wallee-provider-language.php b/includes/provider/class-wc-wallee-provider-language.php index 0e271fa..06e3686 100644 --- a/includes/provider/class-wc-wallee-provider-language.php +++ b/includes/provider/class-wc-wallee-provider-language.php @@ -1,7 +1,9 @@ getIetfCode(); } } diff --git a/includes/provider/class-wc-wallee-provider-payment-connector.php b/includes/provider/class-wc-wallee-provider-payment-connector.php index 94fa92d..bcea08c 100644 --- a/includes/provider/class-wc-wallee-provider-payment-connector.php +++ b/includes/provider/class-wc-wallee-provider-payment-connector.php @@ -1,7 +1,9 @@ getId(); } } diff --git a/includes/provider/class-wc-wallee-provider-payment-method.php b/includes/provider/class-wc-wallee-provider-payment-method.php index a5e5326..01491c9 100644 --- a/includes/provider/class-wc-wallee-provider-payment-method.php +++ b/includes/provider/class-wc-wallee-provider-payment-method.php @@ -1,7 +1,9 @@ getId(); } } diff --git a/includes/service/class-wc-wallee-service-abstract.php b/includes/service/class-wc-wallee-service-abstract.php index eb67716..28fe802 100644 --- a/includes/service/class-wc-wallee-service-abstract.php +++ b/includes/service/class-wc-wallee-service-abstract.php @@ -1,7 +1,9 @@ get_name(); } - $trp = TRP_Translate_Press::get_trp_instance(); + $query = TRP_Translate_Press::get_trp_instance()->get_component( 'query' ); $query = $trp->get_component( 'query' ); // we get the translations from the dictionary. - $dictionary = $query->get_string_rows( '', $strings, $trp_language ); + $dictionary = $query->get_string_rows( '', $strings, $wallee_trp_language ); //phpcs:ignore if ( is_array( $dictionary ) ) { foreach ( $dictionary as $row ) { $translations[ $row->original ] = $row->translated; @@ -138,7 +145,7 @@ protected function create_product_line_items_from_session( WC_Cart $cart, $curre $line_item->setAttributes( $attributes ); } - $items[] = apply_filters( 'wc_wallee_modify_line_item_product_session', $this->clean_line_item( $line_item ), $values ); + $items[] = apply_filters( 'wc_wallee_modify_line_item_product_session', $this->clean_line_item( $line_item ), $values ); //phpcs:ignore } return $items; } @@ -183,7 +190,7 @@ protected function create_fee_lines_items_from_session( WC_Cart $cart, $currency $line_item->setType( \Wallee\Sdk\Model\LineItemType::FEE ); $line_item->setUniqueId( 'fee-' . $fee->id ); } - $fees[] = apply_filters( 'wc_wallee_modify_line_item_fee_session', $this->clean_line_item( $line_item ), $fee ); + $fees[] = apply_filters( 'wc_wallee_modify_line_item_fee_session', $this->clean_line_item( $line_item ), $fee ); //phpcs:ignore } return $fees; } @@ -228,7 +235,7 @@ protected function create_shipping_line_items_from_session( $packages, $chosen_m $line_item->setType( \Wallee\Sdk\Model\LineItemType::SHIPPING ); $line_item->setUniqueId( WC_Wallee_Unique_Id::get_uuid() ); - $shippings[] = apply_filters( 'wc_wallee_modify_line_item_shipping_session', $this->clean_line_item( $line_item ), $shipping_rate ); + $shippings[] = apply_filters( 'wc_wallee_modify_line_item_shipping_session', $this->clean_line_item( $line_item ), $shipping_rate ); //phpcs:ignore } } return $shippings; @@ -241,46 +248,110 @@ protected function create_shipping_line_items_from_session( $packages, $chosen_m */ protected function create_coupons_line_items_from_session() { $coupons = array(); - $currency = get_woocommerce_currency(); $cart = WC()->cart; if ( empty( $cart->get_applied_coupons() ) ) { return $coupons; } - $discount = $cart->get_discount_total() + $cart->get_discount_tax(); - $line_item = $this->create_coupon_line_item( current($cart->get_coupons()), $discount ); - $coupons[] = $line_item; + $discount = $cart->get_discount_total() + $cart->get_discount_tax(); + $line_items = $this->create_coupon_line_items( current( $cart->get_coupons() ), $discount ); + if ( is_array( $line_items ) ) { + $coupons = array_merge( $coupons, $line_items ); + } return $coupons; } /** * Create coupon line item - * @param WC_Coupon|WC_Order_Item_Coupon $coupon - * @param float $amount - * @return \Wallee\Sdk\Model\LineItemCreate|null + * + * @param WC_Coupon|WC_Order_Item_Coupon $coupon The coupon object. + * @param float $total_discount_amount The amount of the coupon. + * @return \Wallee\Sdk\Model\LineItemCreate|null The line item created or null if the coupon is not valid. */ - private function create_coupon_line_item( $coupon, float $amount = 0 ) { - //check if the coupon is valid - if ( !$coupon instanceof WC_Coupon && !$coupon instanceof WC_Order_Item_Coupon ) { - return null; + private function create_coupon_line_items( $coupon, float $total_discount_amount = 0 ) { + if ( ! $coupon instanceof WC_Coupon && ! $coupon instanceof WC_Order_Item_Coupon ) { + return array(); } $coupon = new WC_Coupon( $coupon->get_code() ); - - $amount = $amount * -1; $sku = $this->fix_length( $coupon->get_discount_type(), 150 ); - $sku = str_replace( array( "\n", "\r", ), '', $sku ); - - $line_item = new \Wallee\Sdk\Model\LineItemCreate(); - $line_item->setAmountIncludingTax( $amount ); - $line_item->setName( sprintf( '%s: %s', WC_Wallee_Packages_Coupon_Discount::COUPON, $coupon->get_code() ) ); - $line_item->setQuantity( 1 ); - $line_item->setShippingRequired( false ); - $line_item->setSku( $sku, 200 ); - $line_item->setType( \Wallee\Sdk\Model\LineItemType::DISCOUNT ); - $line_item->setUniqueId( 'coupon-' . $coupon->get_id() ); - return $line_item; + $sku = str_replace( array( "\n", "\r" ), '', $sku ); + + // Calculate the proportional discount amounts for each tax rate. + $discounts = $this->calculate_discount_rates_proportionally( $total_discount_amount ); + + $line_items = array(); + + foreach ( $discounts as $discount ) { + $line_item = new \Wallee\Sdk\Model\LineItemCreate(); + $line_item->setAmountIncludingTax( $discount['amount'] * -1 ); + $line_item->setName( sprintf( '%s: %s (%s%% tax)', WC_Wallee_Packages_Coupon_Discount::WALLEE_COUPON, $coupon->get_code(), $discount['rate_id'] ) ); + $line_item->setQuantity( 1 ); + $line_item->setShippingRequired( false ); + $line_item->setSku( $sku, 200 ); + $line_item->setType( \Wallee\Sdk\Model\LineItemType::DISCOUNT ); + $line_item->setUniqueId( 'coupon-' . $coupon->get_id() . '-' . $discount['rate_id'] ); + + $tax_rate = new \Wallee\Sdk\Model\TaxCreate( + array( + 'title' => 'Discount Tax: ' . $discount['rate_id'], + 'rate' => $discount['rate_id'], + ) + ); + + $line_item->setTaxes( array( $tax_rate ) ); + $line_items[] = $line_item; + } + + return $line_items; + } + + /** + * Calculate discount rates + * + * @param float $total_discount_amount total_discount_amount. + * @return array + */ + private function calculate_discount_rates_proportionally( float $total_discount_amount ): array { + $cart = WC()->cart; + $tax_totals = array(); + $total_amount = 0; + + foreach ( $cart->get_cart() as $cart_item ) { + $product = $cart_item['data']; + $tax_class = $product->get_tax_class(); + $tax_rates_class = WC_Tax::get_rates( $tax_class ); + + foreach ( $tax_rates_class as $rate ) { + $rate_id = $rate['rate']; + $line_total_with_tax = $cart_item['line_total'] + $cart_item['line_tax']; + + if ( ! isset( $tax_totals[ $rate_id ] ) ) { + $tax_totals[ $rate_id ] = array( + 'total' => 0, + 'rate_percentage' => $rate_id, + ); + } + + $tax_totals[ $rate_id ]['total'] += $line_total_with_tax; + $total_amount += $line_total_with_tax; + } + } + + $discounts = array(); + + foreach ( $tax_totals as $rate_id => $data ) { + $proportional_discount_amount = $total_discount_amount * ( $data['total'] / $total_amount ); + + $discounts[] = array( + 'rate_id' => $rate_id, + 'amount' => $proportional_discount_amount, + 'rate_percentage' => $rate_id, + ); + } + + return $discounts; } /** * Returns the line items from the given cart @@ -291,8 +362,8 @@ private function create_coupon_line_item( $coupon, float $amount = 0 ) { */ public function get_items_from_order( WC_Order $order ) { $raw = $this->get_raw_items_from_order( $order ); - $items = apply_filters( 'wc_wallee_modify_line_item_order', $raw, $order ); - $total = apply_filters( 'wc_wallee_modify_total_to_check_order', $order->get_total(), $order ); + $items = apply_filters( 'wc_wallee_modify_line_item_order', $raw, $order ); //phpcs:ignore + $total = apply_filters( 'wc_wallee_modify_total_to_check_order', $order->get_total(), $order ); //phpcs:ignore return WC_Wallee_Helper::instance()->cleanup_line_items( $items, $total, $order->get_currency() ); } @@ -398,7 +469,7 @@ protected function create_product_line_items_from_order( WC_Order $order ) { } } - $items[] = apply_filters( 'wc_wallee_modify_line_item_product_order', $this->clean_line_item( $line_item ), $item ); + $items[] = apply_filters( 'wc_wallee_modify_line_item_product_order', $this->clean_line_item( $line_item ), $item ); //phpcs:ignore } return $items; } @@ -451,7 +522,7 @@ protected function create_fee_lines_items_from_order( WC_Order $order ) { $line_item->setUniqueId( $fee->get_meta( '_wallee_unique_line_item_id', true ) ); - $fees[] = apply_filters( 'wc_wallee_modify_line_item_fee_order', $this->clean_line_item( $line_item ), $fee ); + $fees[] = apply_filters( 'wc_wallee_modify_line_item_fee_order', $this->clean_line_item( $line_item ), $fee ); //phpcs:ignore } return $fees; } @@ -497,33 +568,42 @@ protected function create_shipping_line_items_from_order( WC_Order $order ) { $line_item->setType( \Wallee\Sdk\Model\LineItemType::SHIPPING ); $line_item->setUniqueId( $shipping->get_meta( '_wallee_unique_line_item_id', true ) ); - $shippings[] = apply_filters( 'wc_wallee_modify_line_item_shipping_order', $this->clean_line_item( $line_item ), $shipping ); + $shippings[] = apply_filters( 'wc_wallee_modify_line_item_shipping_order', $this->clean_line_item( $line_item ), $shipping ); //phpcs:ignore } return $shippings; } + /** + * Creates line items for coupons from the order. + * + * @param WC_Order $order The order object. + * @return array An array of coupon line items. + */ protected function create_coupons_line_items_from_order( WC_Order $order ) { $coupons = array(); if ( empty( $order->get_coupons() ) ) { return $coupons; } - //all wp coupons available - $discount = 0; + // all wp coupons available. + $discount = 0; foreach ( $order->get_coupons() as $coupon ) { - /** @var WC_Order_Item_Coupon $coupon */ - $discount += (float)$coupon->get_discount() + (float)$coupon->get_discount_tax(); + /** @var WC_Order_Item_Coupon $coupon */ //phpcs:ignore + $discount += (float) $coupon->get_discount() + (float) $coupon->get_discount_tax(); + } + + $line_items = $this->create_coupon_line_items( current( $order->get_coupons() ), $discount ); + foreach ( $line_items as $line_item ) { + $coupons[] = $this->clean_line_item( $line_item ); } - $line_item = $this->create_coupon_line_item( current($order->get_coupons()), $discount ); - $coupons[] = $this->clean_line_item( $line_item ); return $coupons; } /** * Get items from backend. * - * @param array $backend_items backend items. - * @param mixed $amount amount. + * @param array $backend_items backend items. + * @param mixed $amount amount. * @param WC_Order $order order. * @return \Wallee\Sdk\Model\LineItemCreate[] * @throws WC_Wallee_Exception_Invalid_Transaction_Amount WC_Wallee_Exception_Invalid_Transaction_Amount. @@ -541,7 +621,7 @@ public function get_items_from_backend( array $backend_items, $amount, WC_Order /** * Creates the line items for the products * - * @param array $backend_items backend items. + * @param array $backend_items backend items. * @param WC_Order $order order. * @return \Wallee\Sdk\Model\LineItemCreate[] * @throws Exception Exception. @@ -561,18 +641,19 @@ protected function create_product_line_items_from_backend( array $backend_items, $line_item = new \Wallee\Sdk\Model\LineItemCreate(); - $tax = $discounts = 0; + $tax = 0; + $discounts = 0; if ( isset( $backend_items[ $item_id ]['completion_tax'] ) ) { $tax = array_sum( $backend_items[ $item_id ]['completion_tax'] ); } - //At this point, if there is a discount applied by coupon, the price already has the discount applied, - //and to be able to send the discount to the portal, it is necessary to restore the discounted amount, - //the original price must be restored before being applied, otherwise it would be discounting twice in the portal. + // At this point, if there is a discount applied by coupon, the price already has the discount applied, + // and to be able to send the discount to the portal, it is necessary to restore the discounted amount, + // the original price must be restored before being applied, otherwise it would be discounting twice in the portal. $item_data_coupon = $item->get_meta( '_wallee_coupon_discount_line_item_discounts' ); - if ( !empty ( $item_data_coupon ) ) { - $discount_tax = $item->get_subtotal_tax() - $item->get_total_tax(); - $discount_amount = $item->get_subtotal() - $item->get_total(); + if ( ! empty( $item_data_coupon ) ) { + $discount_tax = $item->get_subtotal_tax() - $item->get_total_tax(); + $discount_amount = $item->get_subtotal() - $item->get_total(); $discounts = $discount_tax + $discount_amount; } @@ -624,7 +705,7 @@ protected function create_product_line_items_from_backend( array $backend_items, $line_item->setAttributes( $attributes ); } - $items[] = apply_filters( 'wc_wallee_modify_line_item_product_backend', $this->clean_line_item( $line_item ), $item ); + $items[] = apply_filters( 'wc_wallee_modify_line_item_product_backend', $this->clean_line_item( $line_item ), $item ); //phpcs:ignore } return $items; } @@ -633,7 +714,7 @@ protected function create_product_line_items_from_backend( array $backend_items, /** * Returns the line items for fees. * - * @param array $backend_items backend items. + * @param array $backend_items backend items. * @param WC_Order $order order. * @return array */ @@ -692,7 +773,7 @@ protected function create_fee_lines_items_from_backend( array $backend_items, WC $line_item->setUniqueId( $fee->get_meta( '_wallee_unique_line_item_id', true ) ); - $fees[] = apply_filters( 'wc_wallee_modify_line_item_fee_backend', $this->clean_line_item( $line_item ), $fee ); + $fees[] = apply_filters( 'wc_wallee_modify_line_item_fee_backend', $this->clean_line_item( $line_item ), $fee ); //phpcs:ignore } return $fees; } @@ -701,7 +782,7 @@ protected function create_fee_lines_items_from_backend( array $backend_items, WC /** * Returns the line items for the shipping costs. * - * @param array $backend_items backend items. + * @param array $backend_items backend items. * @param WC_Order $order order. * @return array */ @@ -751,7 +832,7 @@ protected function create_shipping_line_items_from_backend( array $backend_items $line_item->setType( \Wallee\Sdk\Model\LineItemType::SHIPPING ); $line_item->setUniqueId( $shipping->get_meta( '_wallee_unique_line_item_id', true ) ); - $shippings[] = apply_filters( 'wc_wallee_modify_line_item_shipping_backend', $this->clean_line_item( $line_item ), $shipping ); + $shippings[] = apply_filters( 'wc_wallee_modify_line_item_shipping_backend', $this->clean_line_item( $line_item ), $shipping ); //phpcs:ignore } return $shippings; } diff --git a/includes/service/class-wc-wallee-service-manual-task.php b/includes/service/class-wc-wallee-service-manual-task.php index 6672d55..2c8aba0 100644 --- a/includes/service/class-wc-wallee-service-manual-task.php +++ b/includes/service/class-wc-wallee-service-manual-task.php @@ -1,7 +1,9 @@ get_api_client() ); - $space_id = get_option( WooCommerce_Wallee::CK_SPACE_ID ); + $space_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_ID ); if ( ! empty( $space_id ) ) { $number_of_manual_tasks = $manual_task_service->count( $space_id, $this->create_entity_filter( 'state', \Wallee\Sdk\Model\ManualTaskState::OPEN ) ); - update_option( self::CONFIG_KEY, $number_of_manual_tasks ); + update_option( self::WALLEE_CONFIG_KEY, $number_of_manual_tasks ); } return $number_of_manual_tasks; diff --git a/includes/service/class-wc-wallee-service-method-configuration.php b/includes/service/class-wc-wallee-service-method-configuration.php index 901645f..d98f302 100644 --- a/includes/service/class-wc-wallee-service-method-configuration.php +++ b/includes/service/class-wc-wallee-service-method-configuration.php @@ -1,7 +1,9 @@ getLinkedSpaceId(), $configuration->getId() ); if ( $entity->get_id() !== null && $this->has_changed( $configuration, $entity ) ) { $entity->set_configuration_name( $configuration->getName() ); @@ -75,7 +76,7 @@ private function has_changed( \Wallee\Sdk\Model\PaymentMethodConfiguration $conf */ public function synchronize() { $existing_found = array(); - $space_id = get_option( WooCommerce_Wallee::CK_SPACE_ID ); + $space_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_ID ); $existing_configurations = WC_Wallee_Entity_Method_Configuration::load_all(); @@ -89,7 +90,7 @@ public function synchronize() { ); foreach ( $configurations as $configuration ) { - /* @var WC_Wallee_Entity_Method_Configuration $method */ + /* @var WC_Wallee_Entity_Method_Configuration $method */ //phpcs:ignore $method = WC_Wallee_Entity_Method_Configuration::load_by_configuration( $space_id, $configuration->getId() ); if ( $method->get_id() !== null ) { $existing_found[] = $method->get_id(); @@ -108,8 +109,8 @@ public function synchronize() { } } foreach ( $existing_configurations as $existing_configuration ) { - if ( ! in_array( $existing_configuration->get_id(), $existing_found ) ) { - $existing_configuration->set_state( WC_Wallee_Entity_Method_Configuration::STATE_HIDDEN ); + if ( ! in_array( $existing_configuration->get_id(), $existing_found, true ) ) { + $existing_configuration->set_state( WC_Wallee_Entity_Method_Configuration::WALLEE_STATE_HIDDEN ); $existing_configuration->save(); } } @@ -124,7 +125,7 @@ public function synchronize() { * @return \Wallee\Sdk\Model\PaymentMethod */ protected function get_payment_method( $id ) { - /* @var WC_Wallee_Provider_Payment_Method */ + /* @var WC_Wallee_Provider_Payment_Method */ //phpcs:ignore $method_provider = WC_Wallee_Provider_Payment_Method::instance(); return $method_provider->find( $id ); } @@ -138,11 +139,11 @@ protected function get_payment_method( $id ) { protected function get_configuration_state( \Wallee\Sdk\Model\PaymentMethodConfiguration $configuration ) { switch ( $configuration->getState() ) { case \Wallee\Sdk\Model\CreationEntityState::ACTIVE: - return WC_Wallee_Entity_Method_Configuration::STATE_ACTIVE; + return WC_Wallee_Entity_Method_Configuration::WALLEE_STATE_ACTIVE; case \Wallee\Sdk\Model\CreationEntityState::INACTIVE: - return WC_Wallee_Entity_Method_Configuration::STATE_INACTIVE; + return WC_Wallee_Entity_Method_Configuration::WALLEE_STATE_INACTIVE; default: - return WC_Wallee_Entity_Method_Configuration::STATE_HIDDEN; + return WC_Wallee_Entity_Method_Configuration::WALLEE_STATE_HIDDEN; } } } diff --git a/includes/service/class-wc-wallee-service-refund.php b/includes/service/class-wc-wallee-service-refund.php index dbe79c9..b95bef9 100644 --- a/includes/service/class-wc-wallee-service-refund.php +++ b/includes/service/class-wc-wallee-service-refund.php @@ -1,7 +1,9 @@ get_currency_fraction_digits( $currency_code ); $current_reduction = $reductions[ $index ]; @@ -132,7 +138,7 @@ private function distribute_rounding_difference( array $reductions, $index, $rem $positive = $delta > 0; $new_reduction = null; $applied_delta = null; - if ( $current_reduction->getUnitPriceReduction() != 0 && $current_reduction->getQuantityReduction() == 0 ) { + if ( $current_reduction->getUnitPriceReduction() != 0 && $current_reduction->getQuantityReduction() === 0 ) { $line_item = $this->get_line_item_by_unique_id( $base_line_items, $current_reduction->getLineItemUniqueId() ); if ( null != $line_item ) { while ( 0 != $delta ) { @@ -178,13 +184,10 @@ private function distribute_rounding_difference( array $reductions, $index, $rem $base_line_items, $currency_code ); + } elseif ( $new_remainder > pow( 0.1, $digits + 1 ) ) { + throw new Exception( esc_html__( 'Could not distribute the rounding difference.', 'woo-wallee' ) ); } else { - if ( $new_remainder > pow( 0.1, $digits + 1 ) ) { - throw new Exception( __( 'Could not distribute the rounding difference.', 'woo-wallee' ) ); - } else { - - return $reductions; - } + return $reductions; } } diff --git a/includes/service/class-wc-wallee-service-token.php b/includes/service/class-wc-wallee-service-token.php index 6e05060..a74f38f 100644 --- a/includes/service/class-wc-wallee-service-token.php +++ b/includes/service/class-wc-wallee-service-token.php @@ -1,7 +1,9 @@ get_id() ); - if ( in_array( $transaction_info->get_state(), $states ) ) { + if ( in_array( $transaction_info->get_state(), $states, true ) ) { return true; } @@ -273,8 +274,8 @@ public function get_failed_charge_attempt( $space_id, $transaction_id ) { /** * Updates the line items version of the given transaction. * - * @param int $space_id space id. - * @param int $transaction_id transaction id. + * @param int $space_id space id. + * @param int $transaction_id transaction id. * @param \Wallee\Sdk\Model\LineItemCreate[] $line_items line items. * @return \Wallee\Sdk\Model\TransactionLineItemVersion * @throws Exception Exception. @@ -314,8 +315,10 @@ public function update_transaction_info( \Wallee\Sdk\Model\Transaction $transact ! is_null( $transaction->getPaymentConnectorConfiguration() ) ? $transaction->getPaymentConnectorConfiguration()->getConnector() : null ); $info->set_payment_method_id( - ! is_null( $transaction->getPaymentConnectorConfiguration() ) && $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration() != - null ? $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration()->getPaymentMethod() : null + ! is_null( $transaction->getPaymentConnectorConfiguration() ) + && ! is_null( $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration() ) + ? $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration()->getPaymentMethod() + : null ); $info->set_image( $this->get_resource_path( $this->get_payment_method_image( $transaction, $order ) ) ); $info->set_image_base( $this->get_resource_base( $this->get_payment_method_image( $transaction, $order ) ) ); @@ -338,7 +341,7 @@ public function update_transaction_info( \Wallee\Sdk\Model\Transaction $transact $info->set_user_failure_message( $transaction->getUserFailureMessage() ); } } - $info = apply_filters( 'wc_wallee_update_transaction_info', $info, $transaction, $order ); + $info = apply_filters( 'wc_wallee_update_transaction_info', $info, $transaction, $order ); //phpcs:ignore $info->save(); return $info; } @@ -421,45 +424,53 @@ protected function get_payment_method_image( \Wallee\Sdk\Model\Transaction $tran * @param WC_Order|null $transaction_source The source of the transaction. Pass a WC_Order object for orders, or null for cart. * @return array|int[]|\Wallee\Sdk\Model\PaymentMethodConfiguration The list of possible payment methods. * @throws WC_Wallee_Exception_Invalid_Transaction_Amount If the transaction amount is invalid. - * @throws \Wallee\Sdk\ApiException If there is an API exception during the process. + * @throws \Wallee\Sdk\Http\ConnectionException If there is an API connection error during the process. */ private function get_possible_payment_methods( $transaction_source ) { - $id = ($transaction_source instanceof WC_Order) ? $transaction_source->get_id() : WC_Wallee_Helper::instance()->get_current_cart_id(); - - if ( ! isset( self::$possible_payment_method_cache[ $id ] ) || is_null( self::$possible_payment_method_cache[ $id ] ) ) { - try { - $transaction = ($transaction_source instanceof WC_Order) ? $this->get_transaction_from_order( $transaction_source ) : $this->get_transaction_from_session(); - - if ( $transaction->getState() != \Wallee\Sdk\Model\TransactionState::PENDING ) { - self::$possible_payment_method_cache[ $id ] = $transaction->getAllowedPaymentMethodConfigurations(); - return self::$possible_payment_method_cache[ $id ]; - } - - $integration_method = get_option( WooCommerce_Wallee::CK_INTEGRATION ); - $payment_methods = $this->get_transaction_service()->fetchPaymentMethods( - $transaction->getLinkedSpaceId(), - $transaction->getId(), - $integration_method - ); - - $method_configuration_service = WC_Wallee_Service_Method_Configuration::instance(); - $possible_methods = array(); - foreach ( $payment_methods as $payment_method ) { - $method_configuration_service->update_data( $payment_method ); - $possible_methods[] = $payment_method->getId(); - } - - self::$possible_payment_method_cache[ $id ] = $possible_methods; - } catch ( WC_Wallee_Exception_Invalid_Transaction_Amount $e ) { - self::$possible_payment_method_cache[ $id ] = array(); - throw $e; - } catch ( \Wallee\Sdk\ApiException $e ) { - self::$possible_payment_method_cache[ $id ] = array(); - $last = new Exception( __FUNCTION__ ); - WooCommerce_Wallee::instance()->log( __CLASS__ . ' : ' . __FUNCTION__ . ' : ' . __LINE__ . ' : ' . $last->getMessage(), WC_Log_Levels::ERROR ); - } - } - return self::$possible_payment_method_cache[ $id ]; + $id = ( $transaction_source instanceof WC_Order ) ? $transaction_source->get_id() : WC_Wallee_Helper::instance()->get_current_cart_id(); + + $cacheKey = 'wallee_payment_methods-' . $id; + self::$possible_payment_method_cache[ $id ] = WC()->session->get( $cacheKey ); + if ( ! isset( self::$possible_payment_method_cache[ $id ] ) || is_null( self::$possible_payment_method_cache[ $id ] ) ) { + try { + $transaction = ( $transaction_source instanceof WC_Order ) + ? $this->get_transaction_from_order( $transaction_source ) + : $this->get_transaction_from_session(); + + if ( $transaction->getState() != \Wallee\Sdk\Model\TransactionState::PENDING ) { + self::$possible_payment_method_cache[ $id ] = $transaction->getAllowedPaymentMethodConfigurations(); + return self::$possible_payment_method_cache[ $id ]; + } + + $integration_method = get_option( WooCommerce_Wallee::WALLEE_CK_INTEGRATION ); + $payment_methods = $this->get_transaction_service()->fetchPaymentMethods( + $transaction->getLinkedSpaceId(), + $transaction->getId(), + $integration_method + ); + + $method_configuration_service = WC_Wallee_Service_Method_Configuration::instance(); + $possible_methods = array(); + foreach ( $payment_methods as $payment_method ) { + $method_configuration_service->update_data( $payment_method ); + $possible_methods[] = $payment_method->getId(); + } + + self::$possible_payment_method_cache[ $id ] = $possible_methods; + } catch ( WC_Wallee_Exception_Invalid_Transaction_Amount $e ) { + self::$possible_payment_method_cache[ $id ] = array(); + throw $e; + } catch ( \Wallee\Sdk\ApiException $e ) { + self::$possible_payment_method_cache[ $id ] = array(); + $last = new Exception( __FUNCTION__ ); + WooCommerce_Wallee::instance()->log( __CLASS__ . ' : ' . __FUNCTION__ . ' : ' . __LINE__ . ' : ' . $last->getMessage(), WC_Log_Levels::ERROR ); + } catch ( \Wallee\Sdk\Http\ConnectionException $e ) { + self::$possible_payment_method_cache[ $id ] = array(); + throw $e; + } + WC()->session->set( $cacheKey, self::$possible_payment_method_cache[ $id ] ); + } + return self::$possible_payment_method_cache[ $id ]; } /** @@ -473,7 +484,7 @@ private function get_possible_payment_methods( $transaction_source ) { * @throws \Wallee\Sdk\ApiException If there is an API exception during the process. */ public function get_possible_payment_methods_for_cart() { - return $this->get_possible_payment_methods( null ); + return $this->get_possible_payment_methods( null ); } /** @@ -488,7 +499,7 @@ public function get_possible_payment_methods_for_cart() { * @throws \Wallee\Sdk\ApiException If there is an API exception during the process. */ public function get_possible_payment_methods_for_order( WC_Order $order ) { - return $this->get_possible_payment_methods( $order ); + return $this->get_possible_payment_methods( $order ); } @@ -507,15 +518,15 @@ public function confirm_transaction( $transaction_id, $space_id, WC_Order $order for ( $i = 0; $i < 5; $i++ ) { try { $transaction = $this->get_transaction_service()->read( $space_id, $transaction_id ); - if ( $transaction->getState() != \Wallee\Sdk\Model\TransactionState::PENDING ) { - throw new Exception( __( 'The checkout expired, please try again.', 'woo-wallee' ) ); + if ( $transaction->getState() !== \Wallee\Sdk\Model\TransactionState::PENDING ) { + throw new Exception( esc_html__( 'The checkout expired, please try again.', 'woo-wallee' ) ); } $pending_transaction = new \Wallee\Sdk\Model\TransactionPending(); $pending_transaction->setId( $transaction->getId() ); $pending_transaction->setVersion( $transaction->getVersion() ); $this->assemble_order_transaction_data( $order, $pending_transaction ); $pending_transaction->setAllowedPaymentMethodConfigurations( array( $method_configuration_id ) ); - $pending_transaction = apply_filters( 'wc_wallee_modify_confirm_transaction', $pending_transaction, $order ); + $pending_transaction = apply_filters( 'wc_wallee_modify_confirm_transaction', $pending_transaction, $order ); //phpcs:ignore return $this->get_transaction_service()->confirm( $space_id, $pending_transaction ); } catch ( \Exception $e ) { $last = $e; @@ -562,9 +573,9 @@ protected function assemble_order_transaction_data( WC_Order $order, \Wallee\Sdk * @return mixed */ protected function getOrderReference( $order ) { - $reference_type = get_option( WooCommerce_Wallee::CK_ORDER_REFERENCE ); + $reference_type = get_option( WooCommerce_Wallee::WALLEE_CK_ORDER_REFERENCE ); - if ( WC_Wallee_Order_Reference::ORDER_NUMBER == $reference_type ) { + if ( WC_Wallee_Order_Reference::WALLEE_ORDER_NUMBER == $reference_type ) { return $order->get_order_number(); } @@ -638,7 +649,7 @@ protected function get_order_billing_address( WC_order $order ) { $address->setEmailAddress( $this->fix_length( $this->get_order_email_address( $order ), 254 ) ); $date_of_birth_string = ''; - $custom_billing_date_of_birth_meta_name = apply_filters( 'wc_wallee_billing_date_of_birth_order_meta_name', '' ); + $custom_billing_date_of_birth_meta_name = apply_filters( 'wc_wallee_billing_date_of_birth_order_meta_name', '' ); //phpcs:ignore if ( ! empty( $custom_billing_date_of_birth_meta_name ) ) { $date_of_birth_string = $order->get_meta( $custom_billing_date_of_birth_meta_name, true, 'edit' ); } else { @@ -647,15 +658,10 @@ protected function get_order_billing_address( WC_order $order ) { $date_of_birth_string = $order->get_meta( '_billing_date_of_birth', true, 'edit' ); } } - if ( ! empty( $date_of_birth_string ) ) { - $date_of_birth = WC_Wallee_Helper::instance()->try_to_parse_date( $date_of_birth_string ); - if ( false !== $date_of_birth ) { - $address->setDateOfBirth( $date_of_birth ); - } - } + $this->set_address_dob( $address, $date_of_birth_string ); $gender_string = ''; - $custom_billing_gender_meta_name = apply_filters( 'wc_wallee_billing_gender_order_meta_name', '' ); + $custom_billing_gender_meta_name = apply_filters( 'wc_wallee_billing_gender_order_meta_name', '' ); //phpcs:ignore if ( ! empty( $custom_billing_gender_meta_name ) ) { $gender_string = $order->get_meta( $custom_billing_gender_meta_name, true, 'edit' ); } else { @@ -664,15 +670,9 @@ protected function get_order_billing_address( WC_order $order ) { $gender_string = $order->get_meta( '_billing_gender', true, 'edit' ); } } - if ( ! empty( $gender_string ) ) { - if ( strtolower( $gender_string ) == 'm' || strtolower( $gender_string ) == 'male' ) { - $address->setGender( \Wallee\Sdk\Model\Gender::MALE ); - } elseif ( strtolower( $gender_string ) == 'f' || strtolower( $gender_string ) == 'female' ) { - $address->setGender( \Wallee\Sdk\Model\Gender::FEMALE ); - } - } + $this->set_address_gender( $address, $gender_string ); - return apply_filters( 'wc_wallee_modify_order_billing_address', $address, $order ); + return apply_filters( 'wc_wallee_modify_order_billing_address', $address, $order ); //phpcs:ignore } @@ -702,7 +702,7 @@ protected function get_order_shipping_address( WC_order $order ) { $address->setEmailAddress( $this->fix_length( $this->get_order_email_address( $order ), 254 ) ); $date_of_birth_string = ''; - $custom_shipping_date_of_birth_meta_name = apply_filters( 'wc_wallee_shipping_date_of_birth_order_meta_name', '' ); + $custom_shipping_date_of_birth_meta_name = apply_filters( 'wc_wallee_shipping_date_of_birth_order_meta_name', '' ); //phpcs:ignore if ( ! empty( $custom_shipping_date_of_birth_meta_name ) ) { $date_of_birth_string = $order->get_meta( $custom_shipping_date_of_birth_meta_name, true, 'edit' ); } else { @@ -711,15 +711,10 @@ protected function get_order_shipping_address( WC_order $order ) { $date_of_birth_string = $order->get_meta( '_shipping_date_of_birth', true, 'edit' ); } } - if ( ! empty( $date_of_birth_string ) ) { - $date_of_birth = WC_Wallee_Helper::instance()->try_to_parse_date( $date_of_birth_string ); - if ( false !== $date_of_birth ) { - $address->setDateOfBirth( $date_of_birth ); - } - } + $this->set_address_dob( $address, $date_of_birth_string ); $gender_string = ''; - $custom_shipping_gender_meta_name = apply_filters( 'wc_wallee_shipping_gender_order_meta_name', '' ); + $custom_shipping_gender_meta_name = apply_filters( 'wc_wallee_shipping_gender_order_meta_name', '' ); //phpcs:ignore if ( ! empty( $custom_shipping_gender_meta_name ) ) { $gender_string = $order->get_meta( $custom_shipping_gender_meta_name, true, 'edit' ); } else { @@ -728,16 +723,9 @@ protected function get_order_shipping_address( WC_order $order ) { $gender_string = $order->get_meta( '_shipping_gender', true, 'edit' ); } } - if ( ! empty( $gender_string ) ) { - if ( strtolower( $gender_string ) == 'm' || strtolower( $gender_string ) == 'male' ) { - $address->setGender( \Wallee\Sdk\Model\Gender::MALE ); - } elseif ( strtolower( $gender_string ) == 'f' || strtolower( $gender_string ) == 'female' ) { - $address->setGender( \Wallee\Sdk\Model\Gender::FEMALE ); - } - } - - return apply_filters( 'wc_wallee_modify_order_shipping_address', $address, $order ); + $this->set_address_gender( $address, $gender_string ); + return apply_filters( 'wc_wallee_modify_order_shipping_address', $address, $order ); //phpcs:ignore } /** @@ -772,8 +760,8 @@ public function get_transaction_from_session() { if ( ! isset( self::$transaction_cache[ $current_cart_id ] ) || null == self::$transaction_cache[ $current_cart_id ] ) { $transaction_id = WC()->session->get( 'wallee_transaction_id', null ); $space_id = WC()->session->get( 'wallee_space_id', null ); - $configured_space_id = get_option( WooCommerce_Wallee::CK_SPACE_ID ); - if ( null === $transaction_id || null == $space_id || $space_id != $configured_space_id ) { + $configured_space_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_ID ); + if ( is_null( $transaction_id ) || is_null( $space_id ) || $space_id != $configured_space_id ) { $transaction = $this->create_transaction_from_session(); } else { $transaction = $this->load_and_update_transaction_from_session(); @@ -798,8 +786,11 @@ public function get_transaction_from_order( WC_Order $order ) { if ( ! isset( self::$transaction_cache[ $order->get_id() ] ) || is_null( self::$transaction_cache[ $order->get_id() ] ) ) { $existing_transaction = WC_Wallee_Entity_Transaction_Info::load_by_order_id( $order->get_id() ); - $configured_space_id = get_option( WooCommerce_Wallee::CK_SPACE_ID ); - if ( is_null( $existing_transaction->get_id() ) || is_null( $existing_transaction->get_space_id() ) || $existing_transaction->get_space_id() != $configured_space_id ) { + $configured_space_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_ID ); + if ( is_null( $existing_transaction->get_id() ) + || is_null( $existing_transaction->get_space_id() ) + || $existing_transaction->get_space_id() != $configured_space_id + ) { WC_Wallee_Helper::instance()->start_database_transaction(); try { $transaction = $this->create_transaction_by_order( $order ); @@ -827,10 +818,10 @@ public function get_transaction_from_order( WC_Order $order ) { * @throws Exception Exception. */ protected function create_transaction_by_order( WC_Order $order ) { - $space_id = get_option( WooCommerce_Wallee::CK_SPACE_ID ); + $space_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_ID ); $create_transaction = new \Wallee\Sdk\Model\TransactionCreate(); $create_transaction->setCustomersPresence( \Wallee\Sdk\Model\CustomersPresence::VIRTUAL_PRESENT ); - $space_view_id = get_option( WooCommerce_Wallee::CK_SPACE_VIEW_ID, null ); + $space_view_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_VIEW_ID, null ); if ( ! empty( $space_view_id ) ) { $create_transaction->setSpaceViewId( $space_view_id ); } @@ -839,10 +830,10 @@ protected function create_transaction_by_order( WC_Order $order ) { $create_transaction->setDeviceSessionIdentifier( sanitize_text_field( wp_unslash( $_COOKIE['wc_wallee_device_id'] ) ) ); } $this->assemble_order_transaction_data( $order, $create_transaction ); - $create_transaction = apply_filters( 'wc_wallee_modify_order_create_transaction', $create_transaction, $order ); + $create_transaction = apply_filters( 'wc_wallee_modify_order_create_transaction', $create_transaction, $order ); //phpcs:ignore $transaction = $this->get_transaction_service()->create( $space_id, $create_transaction ); $this->update_transaction_info( $transaction, $order ); - $this->store_transaction_ids_in_session($transaction); + $this->store_transaction_ids_in_session( $transaction ); return $transaction; } @@ -855,10 +846,10 @@ protected function create_transaction_by_order( WC_Order $order ) { */ protected function create_transaction_from_session() { - $space_id = get_option( WooCommerce_Wallee::CK_SPACE_ID ); + $space_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_ID ); $create_transaction = new \Wallee\Sdk\Model\TransactionCreate(); $create_transaction->setCustomersPresence( \Wallee\Sdk\Model\CustomersPresence::VIRTUAL_PRESENT ); - $space_view_id = get_option( WooCommerce_Wallee::CK_SPACE_VIEW_ID, null ); + $space_view_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_VIEW_ID, null ); if ( ! empty( $space_view_id ) ) { $create_transaction->setSpaceViewId( $space_view_id ); } @@ -867,7 +858,7 @@ protected function create_transaction_from_session() { $create_transaction->setDeviceSessionIdentifier( sanitize_text_field( wp_unslash( $_COOKIE['wc_wallee_device_id'] ) ) ); } $this->assemble_session_transaction_data( $create_transaction ); - $create_transaction = apply_filters( 'wc_wallee_modify_session_create_transaction', $create_transaction ); + $create_transaction = apply_filters( 'wc_wallee_modify_session_create_transaction', $create_transaction ); //phpcs:ignore $transaction = $this->get_transaction_service()->create( $space_id, $create_transaction ); $this->store_transaction_ids_in_session( $transaction ); return $transaction; @@ -876,7 +867,7 @@ protected function create_transaction_from_session() { /** * Load and update transaction for order. * - * @param WC_Order $order order. + * @param WC_Order $order order. * @param WC_Wallee_Entity_Transaction_Info $existing_transaction existing transaction. * @return \Wallee\Sdk\Model\Transaction|\Wallee\Sdk\Model\TransactionCreate * @throws Exception Exception. @@ -897,7 +888,7 @@ protected function load_and_update_transaction_for_order( WC_Order $order, WC_Wa $pending_transaction->setId( $transaction->getId() ); $pending_transaction->setVersion( $transaction->getVersion() ); $this->assemble_order_transaction_data( $order, $pending_transaction ); - $pending_transaction = apply_filters( 'wc_wallee_modify_order_pending_transaction', $pending_transaction, $order ); + $pending_transaction = apply_filters( 'wc_wallee_modify_order_pending_transaction', $pending_transaction, $order ); //phpcs:ignore return $this->get_transaction_service()->update( $space_id, $pending_transaction ); } catch ( \Exception $e ) { $last = $e; @@ -923,14 +914,17 @@ protected function load_and_update_transaction_from_session() { $space_id = $session_handler->get( 'wallee_space_id' ); $transaction_id = $session_handler->get( 'wallee_transaction_id' ); $transaction = $this->get_transaction( $space_id, $transaction_id ); - if ( $transaction->getState() != \Wallee\Sdk\Model\TransactionState::PENDING || ( ! empty( $transaction->getCustomerId() ) && $transaction->getCustomerId() != $this->get_customer_id() ) ) { + if ( + $transaction->getState() != \Wallee\Sdk\Model\TransactionState::PENDING + || ( ! empty( $transaction->getCustomerId() ) && $transaction->getCustomerId() != $this->get_customer_id() ) + ) { return $this->create_transaction_from_session(); } $pending_transaction = new \Wallee\Sdk\Model\TransactionPending(); $pending_transaction->setId( $transaction->getId() ); $pending_transaction->setVersion( $transaction->getVersion() ); $this->assemble_session_transaction_data( $pending_transaction ); - $pending_transaction = apply_filters( 'wc_wallee_modify_session_pending_transaction', $pending_transaction ); + $pending_transaction = apply_filters( 'wc_wallee_modify_session_pending_transaction', $pending_transaction ); //phpcs:ignore return $this->get_transaction_service()->update( $space_id, $pending_transaction ); } catch ( \Exception $e ) { $last = $e; @@ -994,23 +988,12 @@ protected function get_session_billing_address() { $address->setEmailAddress( $this->fix_length( $this->get_session_email_address(), 254 ) ); $date_of_birth_string = $customer->get_meta( '_wallee_billing_date_of_birth', true, 'edit' ); - if ( ! empty( $date_of_birth_string ) ) { - $date_of_birth = WC_Wallee_Helper::instance()->try_to_parse_date( $date_of_birth_string ); - if ( false !== $date_of_birth ) { - $address->setDateOfBirth( $date_of_birth ); - } - } + $this->set_address_dob( $address, $date_of_birth_string ); $gender_string = $customer->get_meta( '_wallee_billing_gender', true, 'edit' ); - if ( ! empty( $gender_string ) ) { - if ( strtolower( $gender_string ) == 'm' || strtolower( $gender_string ) == 'male' ) { - $address->setGender( \Wallee\Sdk\Model\Gender::MALE ); - } elseif ( strtolower( $gender_string ) == 'f' || strtolower( $gender_string ) == 'female' ) { - $address->setGender( \Wallee\Sdk\Model\Gender::FEMALE ); - } - } + $this->set_address_gender( $address, $gender_string ); - return apply_filters( 'wc_wallee_modify_session_billing_address', $address ); + return apply_filters( 'wc_wallee_modify_session_billing_address', $address ); //phpcs:ignore } /** @@ -1031,7 +1014,7 @@ protected function get_session_shipping_address() { $address->setGivenName( $this->fix_length( $customer->get_shipping_first_name(), 100 ) ); // Because of a problem with WC, we don't get the shipping_company value from the checkout. // We use the billing_company if shipping_company is empty. - $shipping_company = !empty($customer->get_shipping_company()) ? $customer->get_shipping_company() : $customer->get_billing_company(); + $shipping_company = ! empty( $customer->get_shipping_company() ) ? $customer->get_shipping_company() : $customer->get_billing_company(); $address->setOrganizationName( $this->fix_length( $shipping_company, 100 ) ); if ( ! empty( $customer->get_shipping_state() ) ) { $address->setPostalState( $customer->get_shipping_country() . '-' . $customer->get_shipping_state() ); @@ -1041,23 +1024,12 @@ protected function get_session_shipping_address() { $address->setEmailAddress( $this->fix_length( $this->get_session_email_address(), 254 ) ); $date_of_birth_string = $customer->get_meta( '_wallee_shipping_date_of_birth', true, 'edit' ); - if ( ! empty( $date_of_birth_string ) ) { - $date_of_birth = WC_Wallee_Helper::instance()->try_to_parse_date( $date_of_birth_string ); - if ( false !== $date_of_birth ) { - $address->setDateOfBirth( $date_of_birth ); - } - } + $this->set_address_dob( $address, $date_of_birth_string ); $gender_string = $customer->get_meta( '_wallee_shipping_gender', true, 'edit' ); - if ( ! empty( $gender_string ) ) { - if ( strtolower( $gender_string ) == 'm' || strtolower( $gender_string ) == 'male' ) { - $address->setGender( \Wallee\Sdk\Model\Gender::MALE ); - } elseif ( strtolower( $gender_string ) == 'f' || strtolower( $gender_string ) == 'female' ) { - $address->setGender( \Wallee\Sdk\Model\Gender::FEMALE ); - } - } + $this->set_address_gender( $address, $gender_string ); - return apply_filters( 'wc_wallee_modify_session_shipping_address', $address ); + return apply_filters( 'wc_wallee_modify_session_shipping_address', $address ); //phpcs:ignore } /** @@ -1103,7 +1075,7 @@ protected function get_customer_id() { return null; } $current = get_current_user_id(); - if ( 0 == $current ) { + if ( 0 == $current || null == $current ) { return null; } @@ -1145,4 +1117,39 @@ protected function store_transaction_ids_in_session( \Wallee\Sdk\Model\Transacti $session_handler->set( 'wallee_transaction_id', $transaction->getId() ); $session_handler->set( 'wallee_space_id', $transaction->getLinkedSpaceId() ); } + + /** + * Set address dob + * + * @param \Wallee\Sdk\Model\AddressCreate() $address address. + * @param string $date_of_birth_string date_of_birth_string. + * + * @return void + */ + protected function set_address_dob( $address, $date_of_birth_string ) { + if ( ! empty( $date_of_birth_string ) ) { + $date_of_birth = WC_Wallee_Helper::instance()->try_to_parse_date( $date_of_birth_string ); + if ( false !== $date_of_birth ) { + $address->setDateOfBirth( $date_of_birth ); + } + } + } + + /** + * Set address gender + * + * @param \Wallee\Sdk\Model\AddressCreate() $address address. + * @param string $gender_string gender_string. + * + * @return void + */ + protected function set_address_gender( $address, $gender_string ) { + if ( ! empty( $gender_string ) ) { + if ( strtolower( $gender_string ) == 'm' || strtolower( $gender_string ) == 'male' ) { + $address->setGender( \Wallee\Sdk\Model\Gender::MALE ); + } elseif ( strtolower( $gender_string ) == 'f' || strtolower( $gender_string ) == 'female' ) { + $address->setGender( \Wallee\Sdk\Model\Gender::FEMALE ); + } + } + } } diff --git a/includes/service/class-wc-wallee-service-webhook.php b/includes/service/class-wc-wallee-service-webhook.php index f0ff0ab..96045bc 100644 --- a/includes/service/class-wc-wallee-service-webhook.php +++ b/includes/service/class-wc-wallee-service-webhook.php @@ -1,7 +1,9 @@ webhook_entities[1487165678181] = new WC_Wallee_Webhook_Entity( - 1487165678181, + $this->init_webhook_entities(); + } + + /** + * Initializes webhook entities with their specific configurations. + */ + private function init_webhook_entities() { + $this->webhook_entities[ self::WALLEE_MANUAL_TASK ] = new WC_Wallee_Webhook_Entity( + self::WALLEE_MANUAL_TASK, 'Manual Task', array( \Wallee\Sdk\Model\ManualTaskState::DONE, @@ -58,8 +77,8 @@ public function __construct() { ), 'WC_Wallee_Webhook_Manual_Task' ); - $this->webhook_entities[1472041857405] = new WC_Wallee_Webhook_Entity( - 1472041857405, + $this->webhook_entities[ self::WALLEE_PAYMENT_METHOD_CONFIGURATION ] = new WC_Wallee_Webhook_Entity( + self::WALLEE_PAYMENT_METHOD_CONFIGURATION, 'Payment Method Configuration', array( \Wallee\Sdk\Model\CreationEntityState::ACTIVE, @@ -70,8 +89,8 @@ public function __construct() { 'WC_Wallee_Webhook_Method_Configuration', true ); - $this->webhook_entities[1472041829003] = new WC_Wallee_Webhook_Entity( - 1472041829003, + $this->webhook_entities[ self::WALLEE_TRANSACTION ] = new WC_Wallee_Webhook_Entity( + self::WALLEE_TRANSACTION, 'Transaction', array( \Wallee\Sdk\Model\TransactionState::CONFIRMED, @@ -85,8 +104,8 @@ public function __construct() { ), 'WC_Wallee_Webhook_Transaction' ); - $this->webhook_entities[1472041819799] = new WC_Wallee_Webhook_Entity( - 1472041819799, + $this->webhook_entities[ self::WALLEE_DELIVERY_INDICATION ] = new WC_Wallee_Webhook_Entity( + self::WALLEE_DELIVERY_INDICATION, 'Delivery Indication', array( \Wallee\Sdk\Model\DeliveryIndicationState::MANUAL_CHECK_REQUIRED, @@ -94,8 +113,8 @@ public function __construct() { 'WC_Wallee_Webhook_Delivery_Indication' ); - $this->webhook_entities[1472041816898] = new WC_Wallee_Webhook_Entity( - 1472041816898, + $this->webhook_entities[ self::WALLEE_TRANSACTION_INVOICE ] = new WC_Wallee_Webhook_Entity( + self::WALLEE_TRANSACTION_INVOICE, 'Transaction Invoice', array( \Wallee\Sdk\Model\TransactionInvoiceState::NOT_APPLICABLE, @@ -105,8 +124,8 @@ public function __construct() { 'WC_Wallee_Webhook_Transaction_Invoice' ); - $this->webhook_entities[1472041831364] = new WC_Wallee_Webhook_Entity( - 1472041831364, + $this->webhook_entities[ self::WALLEE_TRANSACTION_COMPLETION ] = new WC_Wallee_Webhook_Entity( + self::WALLEE_TRANSACTION_COMPLETION, 'Transaction Completion', array( \Wallee\Sdk\Model\TransactionCompletionState::FAILED, @@ -115,8 +134,8 @@ public function __construct() { 'WC_Wallee_Webhook_Transaction_Completion' ); - $this->webhook_entities[1472041867364] = new WC_Wallee_Webhook_Entity( - 1472041867364, + $this->webhook_entities[ self::WALLEE_TRANSACTION_VOID ] = new WC_Wallee_Webhook_Entity( + self::WALLEE_TRANSACTION_VOID, 'Transaction Void', array( \Wallee\Sdk\Model\TransactionVoidState::FAILED, @@ -125,8 +144,8 @@ public function __construct() { 'WC_Wallee_Webhook_Transaction_Void' ); - $this->webhook_entities[1472041839405] = new WC_Wallee_Webhook_Entity( - 1472041839405, + $this->webhook_entities[ self::WALLEE_REFUND ] = new WC_Wallee_Webhook_Entity( + self::WALLEE_REFUND, 'Refund', array( \Wallee\Sdk\Model\RefundState::FAILED, @@ -134,8 +153,8 @@ public function __construct() { ), 'WC_Wallee_Webhook_Refund' ); - $this->webhook_entities[1472041806455] = new WC_Wallee_Webhook_Entity( - 1472041806455, + $this->webhook_entities[ self::WALLEE_TOKEN ] = new WC_Wallee_Webhook_Entity( + self::WALLEE_TOKEN, 'Token', array( \Wallee\Sdk\Model\CreationEntityState::ACTIVE, @@ -145,8 +164,8 @@ public function __construct() { ), 'WC_Wallee_Webhook_Token' ); - $this->webhook_entities[1472041811051] = new WC_Wallee_Webhook_Entity( - 1472041811051, + $this->webhook_entities[ self::WALLEE_TOKEN_VERSION ] = new WC_Wallee_Webhook_Entity( + self::WALLEE_TOKEN_VERSION, 'Token Version', array( \Wallee\Sdk\Model\TokenVersionState::ACTIVE, @@ -160,7 +179,7 @@ public function __construct() { * Installs the necessary webhooks in wallee. */ public function install() { - $space_id = get_option( WooCommerce_Wallee::CK_SPACE_ID ); + $space_id = get_option( WooCommerce_Wallee::WALLEE_CK_SPACE_ID ); if ( ! empty( $space_id ) ) { $webhook_url = $this->get_webhook_url( $space_id ); if ( null == $webhook_url ) { @@ -168,7 +187,7 @@ public function install() { } $existing_listeners = $this->get_webhook_listeners( $space_id, $webhook_url ); foreach ( $this->webhook_entities as $webhook_entity ) { - /* @var WC_Wallee_Webhook_Entity $webhook_entity */ + /* @var WC_Wallee_Webhook_Entity $webhook_entity */ //phpcs:ignore $exists = false; foreach ( $existing_listeners as $existing_listener ) { if ( $existing_listener->getEntity() == $webhook_entity->get_id() ) { @@ -183,23 +202,24 @@ public function install() { } /** - * Get webhook entity for id. + * Get the webhook entity for a specific ID or throws an exception if not found. * - * @param int|string $id id. - * @return WC_Wallee_Webhook_Entity + * @param mixed $id The ID of the webhook entity to retrieve. + * @return WC_Wallee_Webhook_Entity The webhook entity associated with the given ID. + * @throws Exception If the webhook entity cannot be found. */ public function get_webhook_entity_for_id( $id ) { - if ( isset( $this->webhook_entities[ $id ] ) ) { - return $this->webhook_entities[ $id ]; + if ( ! isset( $this->webhook_entities[ $id ] ) ) { + throw new Exception( sprintf( 'Could not retrieve webhook model for listener entity id: %s', esc_attr( $id ) ) ); } - return null; + return $this->webhook_entities[ $id ]; } /** * Create a webhook listener. * - * @param WC_Wallee_Webhook_Entity $entity entity. - * @param int $space_id space id. + * @param WC_Wallee_Webhook_Entity $entity entity. + * @param int $space_id space id. * @param \Wallee\Sdk\Model\WebhookUrl $webhook_url webhook url. * * @return \Wallee\Sdk\Model\WebhookListenerCreate @@ -213,13 +233,14 @@ protected function create_webhook_listener( WC_Wallee_Webhook_Entity $entity, $s $webhook_listener->setState( \Wallee\Sdk\Model\CreationEntityState::ACTIVE ); $webhook_listener->setUrl( $webhook_url->getId() ); $webhook_listener->setNotifyEveryChange( $entity->is_notify_every_change() ); + $webhook_listener->setEnablePayloadSignatureAndState( true ); return $this->get_webhook_listener_service()->create( $space_id, $webhook_listener ); } /** * Returns the existing webhook listeners. * - * @param int $space_id space id. + * @param int $space_id space id. * @param \Wallee\Sdk\Model\WebhookUrl $webhook_url webhook url. * * @return \Wallee\Sdk\Model\WebhookListener[] @@ -275,11 +296,15 @@ protected function get_webhook_url( $space_id ) { ); $query->setFilter( $filter ); $query->setNumberOfEntities( 1 ); - $result = $this->get_webhook_url_service()->search( $space_id, $query ); - if ( ! empty( $result ) ) { - return $result[0]; - } else { - return null; + try { + $result = $this->get_webhook_url_service()->search( $space_id, $query ); + if ( ! empty( $result ) ) { + return $result[0]; + } else { + return null; + } + } catch ( \Exception $e ) { + WooCommerce_Wallee::instance()->log( $e->getMessage(), WC_Log_Levels::ERROR ); } } diff --git a/includes/webhook/class-wc-wallee-webhook-abstract.php b/includes/webhook/class-wc-wallee-webhook-abstract.php index 567f15d..31a8c9f 100644 --- a/includes/webhook/class-wc-wallee-webhook-abstract.php +++ b/includes/webhook/class-wc-wallee-webhook-abstract.php @@ -1,7 +1,9 @@ getTransaction()->getLinkedSpaceId(), $delivery_indication->getTransaction()->getId() )->get_order_id(); } @@ -53,7 +57,7 @@ protected function get_order_id( $delivery_indication ) { * @return int */ protected function get_transaction_id( $delivery_indication ) { - /* @var \Wallee\Sdk\Model\DeliveryIndication $delivery_indication */ + /* @var \Wallee\Sdk\Model\DeliveryIndication $delivery_indication */ //phpcs:ignore return $delivery_indication->getLinkedTransaction(); } @@ -61,11 +65,11 @@ protected function get_transaction_id( $delivery_indication ) { * Process order related inner. * * @param WC_Order $order order. - * @param mixed $delivery_indication delivery indication. + * @param mixed $delivery_indication delivery indication. * @return void */ protected function process_order_related_inner( WC_Order $order, $delivery_indication ) { - /* @var \Wallee\Sdk\Model\DeliveryIndication $delivery_indication */ + /* @var \Wallee\Sdk\Model\DeliveryIndication $delivery_indication */ //phpcs:ignore switch ( $delivery_indication->getState() ) { case \Wallee\Sdk\Model\DeliveryIndicationState::MANUAL_CHECK_REQUIRED: $this->review( $order ); @@ -85,6 +89,6 @@ protected function process_order_related_inner( WC_Order $order, $delivery_indic protected function review( WC_Order $order ) { $status = apply_filters( 'wc_wallee_manual_task_status', 'wallee-manual', $order ); $order->add_meta_data( '_wallee_manual_check', true ); - $order->update_status( $status, __( 'A manual decision about whether to accept the payment is required.', 'woo-wallee' ) ); + $order->update_status( $status, esc_html__( 'A manual decision about whether to accept the payment is required.', 'woo-wallee' ) ); } } diff --git a/includes/webhook/class-wc-wallee-webhook-entity.php b/includes/webhook/class-wc-wallee-webhook-entity.php index 2779625..0962eb0 100644 --- a/includes/webhook/class-wc-wallee-webhook-entity.php +++ b/includes/webhook/class-wc-wallee-webhook-entity.php @@ -1,7 +1,9 @@ handler_class_name; diff --git a/includes/webhook/class-wc-wallee-webhook-manual-task.php b/includes/webhook/class-wc-wallee-webhook-manual-task.php index a245c51..32128e2 100644 --- a/includes/webhook/class-wc-wallee-webhook-manual-task.php +++ b/includes/webhook/class-wc-wallee-webhook-manual-task.php @@ -1,7 +1,9 @@ getTransaction()->getLinkedSpaceId(), $refund->getTransaction()->getId() )->get_order_id(); } @@ -53,7 +57,7 @@ protected function get_order_id( $refund ) { * @return int */ protected function get_transaction_id( $refund ) { - /* @var \Wallee\Sdk\Model\Refund $refund */ + /* @var \Wallee\Sdk\Model\Refund $refund */ //phpcs:ignore return $refund->getTransaction()->getId(); } @@ -61,11 +65,11 @@ protected function get_transaction_id( $refund ) { * Process order related inner. * * @param WC_Order $order order. - * @param mixed $refund refund. + * @param mixed $refund refund. * @return void */ protected function process_order_related_inner( WC_Order $order, $refund ) { - /* @var \Wallee\Sdk\Model\Refund $refund */ + /* @var \Wallee\Sdk\Model\Refund $refund */ //phpcs:ignore switch ( $refund->getState() ) { case \Wallee\Sdk\Model\RefundState::FAILED: // fallback. @@ -84,14 +88,14 @@ protected function process_order_related_inner( WC_Order $order, $refund ) { * Failed. * * @param \Wallee\Sdk\Model\Refund $refund refund. - * @param WC_Order $order order. + * @param WC_Order $order order. * @return void * @throws Exception Exception. */ protected function failed( \Wallee\Sdk\Model\Refund $refund, WC_Order $order ) { $refund_job = WC_Wallee_Entity_Refund_Job::load_by_external_id( $refund->getLinkedSpaceId(), $refund->getExternalId() ); if ( $refund_job->get_id() ) { - $refund_job->set_state( WC_Wallee_Entity_Refund_Job::STATE_FAILURE ); + $refund_job->set_state( WC_Wallee_Entity_Refund_Job::WALLEE_STATE_FAILURE ); if ( $refund->getFailureReason() != null ) { $refund_job->set_failure_reason( $refund->getFailureReason()->getDescription() ); } @@ -111,7 +115,7 @@ protected function failed( \Wallee\Sdk\Model\Refund $refund, WC_Order $order ) { * Refunded. * * @param \Wallee\Sdk\Model\Refund $refund refund. - * @param WC_Order $order order. + * @param WC_Order $order order. * @return void * @throws Exception Exception. */ @@ -119,7 +123,7 @@ protected function refunded( \Wallee\Sdk\Model\Refund $refund, WC_Order $order ) $refund_job = WC_Wallee_Entity_Refund_Job::load_by_external_id( $refund->getLinkedSpaceId(), $refund->getExternalId() ); if ( $refund_job->get_id() ) { - $refund_job->set_state( WC_Wallee_Entity_Refund_Job::STATE_SUCCESS ); + $refund_job->set_state( WC_Wallee_Entity_Refund_Job::WALLEE_STATE_SUCCESS ); $refund_job->save(); $refunds = $order->get_refunds(); foreach ( $refunds as $wc_refund ) { diff --git a/includes/webhook/class-wc-wallee-webhook-request.php b/includes/webhook/class-wc-wallee-webhook-request.php index 7b0be83..18de073 100644 --- a/includes/webhook/class-wc-wallee-webhook-request.php +++ b/includes/webhook/class-wc-wallee-webhook-request.php @@ -1,7 +1,9 @@ event_id = $model->eventId; - // phpcs:ignore + // phpcs:ignore $this->entity_id = $model->entityId; - // phpcs:ignore + // phpcs:ignore $this->listener_entity_id = $model->listenerEntityId; - // phpcs:ignore + // phpcs:ignore $this->listener_entity_technical_name = $model->listenerEntityTechnicalName; - // phpcs:ignore + // phpcs:ignore $this->space_id = $model->spaceId; - // phpcs:ignore + // phpcs:ignore $this->webhook_listener_id = $model->webhookListenerId; $this->timestamp = $model->timestamp; + $this->state = $model->state; } /** @@ -150,4 +160,13 @@ public function get_webhook_listener_id() { public function get_timestamp() { return $this->timestamp; } + + /** + * Returns the state of the webhook event's entity. + * + * @return string + */ + public function get_state() { + return $this->state; + } } diff --git a/includes/webhook/class-wc-wallee-webhook-token-version.php b/includes/webhook/class-wc-wallee-webhook-token-version.php index 2acb2d8..9baaeaa 100644 --- a/includes/webhook/class-wc-wallee-webhook-token-version.php +++ b/includes/webhook/class-wc-wallee-webhook-token-version.php @@ -1,7 +1,9 @@ getLineItemVersion()->getTransaction()->getLinkedSpaceId(), $completion->getLineItemVersion()->getTransaction()->getId() )->get_order_id(); } @@ -53,7 +57,7 @@ protected function get_order_id( $completion ) { * @return int */ protected function get_transaction_id( $completion ) { - /* @var \Wallee\Sdk\Model\TransactionCompletion $completion */ + /* @var \Wallee\Sdk\Model\TransactionCompletion $completion */ //phpcs:ignore return $completion->getLinkedTransaction(); } @@ -61,11 +65,11 @@ protected function get_transaction_id( $completion ) { * Process order realted inner. * * @param WC_Order $order order. - * @param mixed $completion completion. + * @param mixed $completion completion. * @return void */ protected function process_order_related_inner( WC_Order $order, $completion ) { - /* @var \Wallee\Sdk\Model\TransactionCompletion $completion */ + /* @var \Wallee\Sdk\Model\TransactionCompletion $completion */ //phpcs:ignore switch ( $completion->getState() ) { case \Wallee\Sdk\Model\TransactionCompletionState::FAILED: $this->failed( $completion, $order ); @@ -83,14 +87,14 @@ protected function process_order_related_inner( WC_Order $order, $completion ) { * Success. * * @param \Wallee\Sdk\Model\TransactionCompletion $completion completion. - * @param WC_Order $order order. + * @param WC_Order $order order. * @return void * @throws Exception Exception. */ protected function success( \Wallee\Sdk\Model\TransactionCompletion $completion, WC_Order $order ) { $completion_job = WC_Wallee_Entity_Completion_Job::load_by_completion( $completion->getLinkedSpaceId(), $completion->getId() ); if ( ! $completion_job->get_id() ) { - // We have no completion job with this id -> the server could not store the id of the completion after sending the request. (e.g. connection issue or crash) + // We have no completion job with this id -> the server could not store the id of the completion after sending the request. (e.g. connection issue or crash). // We only have on running completion which was not yet processed successfully and use it as it should be the one the webhook is for. $completion_job = WC_Wallee_Entity_Completion_Job::load_running_completion_for_transaction( $completion->getLinkedSpaceId(), @@ -102,7 +106,7 @@ protected function success( \Wallee\Sdk\Model\TransactionCompletion $completion, } $completion_job->set_completion_id( $completion->getId() ); } - $completion_job->set_state( WC_Wallee_Entity_Completion_Job::STATE_DONE ); + $completion_job->set_state( WC_Wallee_Entity_Completion_Job::WALLEE_STATE_DONE ); if ( $completion_job->get_restock() ) { $this->restock_non_completed_items( (array) $completion_job->get_items(), $order ); @@ -114,7 +118,7 @@ protected function success( \Wallee\Sdk\Model\TransactionCompletion $completion, /** * Restock non completed items. * - * @param array $completed_items completed items. + * @param array $completed_items completed items. * @param WC_Order $order order. * @return void */ @@ -134,8 +138,8 @@ private function restock_non_completed_items( array $completed_items, WC_Order $ $old_stock = $new_stock - $changed_qty; $order->add_order_note( - /* translators: %1$s, %2$s, %3$s are replaced with "string" */ - sprintf( __( '%1$s stock increased from %2$s to %3$s.', 'woo-wallee' ), $item_name, $old_stock, $new_stock ) + /* translators: %s, %s, %s are replaced with "string" */ + sprintf( esc_html__( '%1$s stock increased from %2$s to %3$s.', 'woo-wallee' ), $item_name, $old_stock, $new_stock ) ); do_action( 'wc_wallee_restock_not_completed_item', $product->get_id(), $old_stock, $new_stock, $order, $product ); } @@ -147,14 +151,14 @@ private function restock_non_completed_items( array $completed_items, WC_Order $ /** * Adapt order items. * - * @param array $completed_items completed items. + * @param array $completed_items completed items. * @param WC_Order $order order. * @return void */ private function adapt_order_items( array $completed_items, WC_Order $order ) { foreach ( $order->get_items() as $item_id => $item ) { if ( ! isset( $completed_items[ $item_id ] ) || - $completed_items[ $item_id ]['completion_total'] + array_sum( $completed_items[ $item_id ]['completion_tax'] ) == 0 ) { + $completed_items[ $item_id ]['completion_total'] + array_sum( $completed_items[ $item_id ]['completion_tax'] ) == 0 ) { $order_item = $order->get_item( $item_id ); $order_item->delete( true ); continue; @@ -162,7 +166,7 @@ private function adapt_order_items( array $completed_items, WC_Order $order ) { $old_total = $item->get_total(); $subtotal = $item->get_subtotal(); $ratio = $old_total / $completed_items[ $item_id ]['completion_total']; - if ( 0 != $ratio ) { + if ( 0 !== $ratio ) { $subtotal = $subtotal / $ratio; } $old_taxes = $item->get_taxes(); @@ -195,7 +199,7 @@ private function adapt_order_items( array $completed_items, WC_Order $order ) { } foreach ( $order->get_fees() as $fee_id => $fee ) { if ( ! isset( $completed_items[ $fee_id ] ) || - $completed_items[ $fee_id ]['completion_total'] + array_sum( $completed_items[ $fee_id ]['completion_tax'] ) == 0 ) { + $completed_items[ $fee_id ]['completion_total'] + array_sum( $completed_items[ $fee_id ]['completion_tax'] ) == 0 ) { $order_fee = $order->get_item( $fee_id ); $order_fee->delete(); continue; @@ -213,7 +217,7 @@ private function adapt_order_items( array $completed_items, WC_Order $order ) { foreach ( $order->get_shipping_methods() as $shipping_id => $shipping ) { if ( ! isset( $completed_items[ $shipping_id ] ) || - $completed_items[ $shipping_id ]['completion_total'] + array_sum( $completed_items[ $shipping_id ]['completion_tax'] ) == 0 ) { + $completed_items[ $shipping_id ]['completion_total'] + array_sum( $completed_items[ $shipping_id ]['completion_tax'] ) == 0 ) { $order_shipping = $order->get_item( $shipping_id ); $order_shipping->delete(); continue; @@ -239,7 +243,7 @@ private function adapt_order_items( array $completed_items, WC_Order $order ) { * Failed. * * @param \Wallee\Sdk\Model\TransactionCompletion $completion completion. - * @param WC_Order $order order. + * @param WC_Order $order order. * @return void * @throws Exception Exception. */ @@ -258,7 +262,7 @@ protected function failed( \Wallee\Sdk\Model\TransactionCompletion $completion, if ( $completion->getFailureReason() != null ) { $completion_job->set_failure_reason( $completion->getFailureReason()->getDescription() ); } - $completion_job->set_state( WC_Wallee_Entity_Completion_Job::STATE_DONE ); + $completion_job->set_state( WC_Wallee_Entity_Completion_Job::WALLEE_STATE_DONE ); $completion_job->save(); } } diff --git a/includes/webhook/class-wc-wallee-webhook-transaction-invoice.php b/includes/webhook/class-wc-wallee-webhook-transaction-invoice.php index f9df9d8..e6322c5 100644 --- a/includes/webhook/class-wc-wallee-webhook-transaction-invoice.php +++ b/includes/webhook/class-wc-wallee-webhook-transaction-invoice.php @@ -1,7 +1,9 @@ get_api_client() ); return $transaction_service->read( $transaction_invoice->getLinkedSpaceId(), $transaction_invoice->getCompletion()->getLineItemVersion()->getTransaction()->getId() ); } @@ -57,7 +61,7 @@ protected function load_transaction( $transaction_invoice ) { * @return int|string */ protected function get_order_id( $transaction_invoice ) { - /* @var \Wallee\Sdk\Model\TransactionInvoice $transaction_invoice */ + /* @var \Wallee\Sdk\Model\TransactionInvoice $transaction_invoice */ //phpcs:ignore return WC_Wallee_Entity_Transaction_Info::load_by_transaction( $transaction_invoice->getLinkedSpaceId(), $transaction_invoice->getCompletion()->getLineItemVersion()->getTransaction()->getId() )->get_order_id(); } @@ -68,7 +72,7 @@ protected function get_order_id( $transaction_invoice ) { * @return int */ protected function get_transaction_id( $transaction_invoice ) { - /* @var \Wallee\Sdk\Model\TransactionInvoice $transaction_invoice */ + /* @var \Wallee\Sdk\Model\TransactionInvoice $transaction_invoice */ //phpcs:ignore return $transaction_invoice->getLinkedTransaction(); } @@ -76,18 +80,18 @@ protected function get_transaction_id( $transaction_invoice ) { * Process * * @param WC_Order $order order. - * @param mixed $transaction_invoice transaction invoice. + * @param mixed $transaction_invoice transaction invoice. * @return void */ protected function process_order_related_inner( WC_Order $order, $transaction_invoice ) { - /* @var \Wallee\Sdk\Model\TransactionInvoice $transaction_invoice */ + /* @var \Wallee\Sdk\Model\TransactionInvoice $transaction_invoice */ //phpcs:ignore switch ( $transaction_invoice->getState() ) { case \Wallee\Sdk\Model\TransactionInvoiceState::DERECOGNIZED: - $order->add_order_note( __( 'Invoice Not Settled' ) ); + $order->add_order_note( esc_html__( 'Invoice Not Settled' ) ); break; case \Wallee\Sdk\Model\TransactionInvoiceState::NOT_APPLICABLE: case \Wallee\Sdk\Model\TransactionInvoiceState::PAID: - $order->add_order_note( __( 'Invoice Settled' ) ); + $order->add_order_note( esc_html__( 'Invoice Settled' ) ); break; default: // Nothing to do. diff --git a/includes/webhook/class-wc-wallee-webhook-transaction-void.php b/includes/webhook/class-wc-wallee-webhook-transaction-void.php index 95588a2..0c3d638 100644 --- a/includes/webhook/class-wc-wallee-webhook-transaction-void.php +++ b/includes/webhook/class-wc-wallee-webhook-transaction-void.php @@ -1,7 +1,9 @@ getTransaction()->getLinkedSpaceId(), $void->getTransaction()->getId() )->get_order_id(); + protected function get_order_id( $void_transaction ) { + /* @var \Wallee\Sdk\Model\TransactionVoid $void */ //phpcs:ignore + return WC_Wallee_Entity_Transaction_Info::load_by_transaction( $void_transaction->getTransaction()->getLinkedSpaceId(), $void_transaction->getTransaction()->getId() )->get_order_id(); } /** * Get transaction id. * - * @param mixed $void void. + * @param mixed $void_transaction void transaction. * @return int */ - protected function get_transaction_id( $void ) { - /* @var \Wallee\Sdk\Model\TransactionVoid $void */ - return $void->getLinkedTransaction(); + protected function get_transaction_id( $void_transaction ) { + /* @var \Wallee\Sdk\Model\TransactionVoid $void_transaction */ //phpcs:ignore + return $void_transaction->getLinkedTransaction(); } /** * Process order related inner. * * @param WC_Order $order order. - * @param mixed $void void. + * @param mixed $void_transaction void transaction. * @return void */ - protected function process_order_related_inner( WC_Order $order, $void ) { - /* @var \Wallee\Sdk\Model\TransactionVoid $void */ - switch ( $void->getState() ) { + protected function process_order_related_inner( WC_Order $order, $void_transaction ) { + /* @var \Wallee\Sdk\Model\TransactionVoid $void_transaction */ //phpcs:ignore + switch ( $void_transaction->getState() ) { case \Wallee\Sdk\Model\TransactionVoidState::FAILED: - $this->failed( $void, $order ); + $this->failed( $void_transaction, $order ); break; case \Wallee\Sdk\Model\TransactionVoidState::SUCCESSFUL: - $this->success( $void, $order ); + $this->success( $void_transaction, $order ); break; default: // Nothing to do. @@ -82,24 +85,24 @@ protected function process_order_related_inner( WC_Order $order, $void ) { /** * Success. * - * @param \Wallee\Sdk\Model\TransactionVoid $void void. - * @param WC_Order $order order. + * @param \Wallee\Sdk\Model\TransactionVoid $void_transaction void. + * @param WC_Order $order order. * @return void * @throws Exception Exception. */ - protected function success( \Wallee\Sdk\Model\TransactionVoid $void, WC_Order $order ) { - $void_job = WC_Wallee_Entity_Void_Job::load_by_void( $void->getLinkedSpaceId(), $void->getId() ); + protected function success( \Wallee\Sdk\Model\TransactionVoid $void_transaction, WC_Order $order ) { + $void_job = WC_Wallee_Entity_Void_Job::load_by_void( $void_transaction->getLinkedSpaceId(), $void_transaction->getId() ); if ( ! $void_job->get_id() ) { - // We have no void job with this id -> the server could not store the id of the void after sending the request. (e.g. connection issue or crash) + // We have no void job with this id -> the server could not store the id of the void after sending the request. (e.g. connection issue or crash). // We only have on running void which was not yet processed successfully and use it as it should be the one the webhook is for. - $void_job = WC_Wallee_Entity_Void_Job::load_running_void_for_transaction( $void->getLinkedSpaceId(), $void->getLinkedTransaction() ); + $void_job = WC_Wallee_Entity_Void_Job::load_running_void_for_transaction( $void_transaction->getLinkedSpaceId(), $void_transaction->getLinkedTransaction() ); if ( ! $void_job->get_id() ) { // void not initiated in shop backend ignore. return; } - $void_job->set_void_id( $void->getId() ); + $void_job->set_void_id( $void_transaction->getId() ); } - $void_job->set_state( WC_Wallee_Entity_Void_Job::STATE_DONE ); + $void_job->set_state( WC_Wallee_Entity_Void_Job::WALLEE_STATE_DONE ); if ( $void_job->get_restock() ) { WC_Wallee_Helper::instance()->maybe_restock_items_for_order( $order ); @@ -110,27 +113,27 @@ protected function success( \Wallee\Sdk\Model\TransactionVoid $void, WC_Order $o /** * Failed. * - * @param \Wallee\Sdk\Model\TransactionVoid $void void. - * @param WC_Order $order order. + * @param \Wallee\Sdk\Model\TransactionVoid $void_transaction void. + * @param WC_Order $order order. * @return void * @throws Exception Exception. */ - protected function failed( \Wallee\Sdk\Model\TransactionVoid $void, WC_Order $order ) { - $void_job = WC_Wallee_Entity_Void_Job::load_by_void( $void->getLinkedSpaceId(), $void->getId() ); + protected function failed( \Wallee\Sdk\Model\TransactionVoid $void_transaction, WC_Order $order ) { + $void_job = WC_Wallee_Entity_Void_Job::load_by_void( $void_transaction->getLinkedSpaceId(), $void_transaction->getId() ); if ( ! $void_job->get_id() ) { // We have no void job with this id -> the server could not store the id of the void after sending the request. (e.g. connection issue or crash) // We only have on running void which was not yet processed successfully and use it as it should be the one the webhook is for. - $void_job = WC_Wallee_Entity_Void_Job::load_running_void_for_transaction( $void->getLinkedSpaceId(), $void->getLinkedTransaction() ); + $void_job = WC_Wallee_Entity_Void_Job::load_running_void_for_transaction( $void_transaction->getLinkedSpaceId(), $void_transaction->getLinkedTransaction() ); if ( ! $void_job->get_id() ) { // void not initiated in shop backend ignore. return; } - $void_job->set_void_id( $void->getId() ); + $void_job->set_void_id( $void_transaction->getId() ); } if ( $void_job->getFailureReason() != null ) { - $void_job->set_failure_reason( $void->getFailureReason()->getDescription() ); + $void_job->set_failure_reason( $void_transaction->getFailureReason()->getDescription() ); } - $void_job->set_state( WC_Wallee_Entity_Void_Job::STATE_DONE ); + $void_job->set_state( WC_Wallee_Entity_Void_Job::WALLEE_STATE_DONE ); $void_job->save(); } } diff --git a/includes/webhook/class-wc-wallee-webhook-transaction.php b/includes/webhook/class-wc-wallee-webhook-transaction.php index c6403f5..5e26c26 100644 --- a/includes/webhook/class-wc-wallee-webhook-transaction.php +++ b/includes/webhook/class-wc-wallee-webhook-transaction.php @@ -1,7 +1,9 @@ getLinkedSpaceId(), $transaction->getId() )->get_order_id(); } @@ -53,7 +56,7 @@ protected function get_order_id( $transaction ) { * @return int */ protected function get_transaction_id( $transaction ) { - /* @var \Wallee\Sdk\Model\Transaction $transaction */ + /* @var \Wallee\Sdk\Model\Transaction $transaction */ //phpcs:ignore return $transaction->getId(); } @@ -61,13 +64,13 @@ protected function get_transaction_id( $transaction ) { * Process order related inner. * * @param WC_Order $order order. - * @param mixed $transaction transaction. + * @param mixed $transaction transaction. * @return void * @throws Exception Exception. */ protected function process_order_related_inner( WC_Order $order, $transaction ) { - /* @var \Wallee\Sdk\Model\Transaction $transaction */ + /* @var \Wallee\Sdk\Model\Transaction $transaction */ //phpcs:ignore $transaction_info = WC_Wallee_Entity_Transaction_Info::load_by_order_id( $order->get_id() ); if ( $transaction->getState() != $transaction_info->get_state() ) { switch ( $transaction->getState() ) { @@ -108,7 +111,7 @@ protected function process_order_related_inner( WC_Order $order, $transaction ) * Confirm. * * @param \Wallee\Sdk\Model\Transaction $transaction transaction. - * @param WC_Order $order order. + * @param WC_Order $order order. * @return void */ protected function confirm( \Wallee\Sdk\Model\Transaction $transaction, WC_Order $order ) { @@ -125,7 +128,7 @@ protected function confirm( \Wallee\Sdk\Model\Transaction $transaction, WC_Order * Authorize. * * @param \Wallee\Sdk\Model\Transaction $transaction transaction. - * @param \WC_Order $order order. + * @param \WC_Order $order order. */ protected function authorize( \Wallee\Sdk\Model\Transaction $transaction, WC_Order $order ) { if ( ! $order->get_meta( '_wallee_authorized', true ) ) { @@ -144,7 +147,7 @@ protected function authorize( \Wallee\Sdk\Model\Transaction $transaction, WC_Ord * Waiting. * * @param \Wallee\Sdk\Model\Transaction $transaction transaction. - * @param WC_Order $order order. + * @param WC_Order $order order. * @return void */ protected function waiting( \Wallee\Sdk\Model\Transaction $transaction, WC_Order $order ) { @@ -159,7 +162,7 @@ protected function waiting( \Wallee\Sdk\Model\Transaction $transaction, WC_Order * Decline. * * @param \Wallee\Sdk\Model\Transaction $transaction transaction. - * @param WC_Order $order order. + * @param WC_Order $order order. * @return void */ protected function decline( \Wallee\Sdk\Model\Transaction $transaction, WC_Order $order ) { @@ -173,7 +176,7 @@ protected function decline( \Wallee\Sdk\Model\Transaction $transaction, WC_Order * Failed. * * @param \Wallee\Sdk\Model\Transaction $transaction transaction. - * @param WC_Order $order order. + * @param WC_Order $order order. * @return void */ protected function failed( \Wallee\Sdk\Model\Transaction $transaction, WC_Order $order ) { @@ -189,21 +192,20 @@ protected function failed( \Wallee\Sdk\Model\Transaction $transaction, WC_Order * Fulfill. * * @param \Wallee\Sdk\Model\Transaction $transaction transaction. - * @param WC_Order $order order. + * @param WC_Order $order order. * @return void */ protected function fulfill( \Wallee\Sdk\Model\Transaction $transaction, WC_Order $order ) { do_action( 'wc_wallee_fulfill', $transaction, $order ); // Sets the status to procesing or complete depending on items. $order->payment_complete( $transaction->getId() ); - } /** * Voided. * * @param \Wallee\Sdk\Model\Transaction $transaction transaction. - * @param WC_Order $order order. + * @param WC_Order $order order. * @return void */ protected function voided( \Wallee\Sdk\Model\Transaction $transaction, WC_Order $order ) { diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-delivery-indication-strategy.php b/includes/webhook/strategies/class-wc-wallee-webhook-delivery-indication-strategy.php new file mode 100644 index 0000000..e966031 --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-delivery-indication-strategy.php @@ -0,0 +1,112 @@ +get_api_client() ); + return $transaction_invoice_service->read( $request->get_space_id(), $request->get_entity_id() ); + } + + /** + * Get the order ID. + * + * @inheritDoc + * @param object $object The webhook request. + */ + protected function get_order_id( $object ) { + /* @var \Wallee\Sdk\Model\DeliveryIndication $object */ + return WC_Wallee_Entity_Transaction_Info::load_by_transaction( + $object->getTransaction()->getLinkedSpaceId(), + $object->getTransaction()->getId() + )->get_order_id(); + } + + /** + * Processes the incoming webhook request pertaining to delivery indications. + * + * This method retrieves the delivery indication details from the API and updates the associated + * WooCommerce order based on the indication state. + * + * @param WC_Wallee_Webhook_Request $request The webhook request object. + * @return void + */ + public function process( WC_Wallee_Webhook_Request $request ) { + /* @var \Wallee\Sdk\Model\DeliveryIndication $delivery_indication */ + $delivery_indication = $this->load_entity( $request ); + $order = $this->get_order( $delivery_indication ); + if ( false != $order && $order->get_id() ) { + $this->process_order_related_inner( $order, $delivery_indication, $request ); + } + } + + /** + * Additional processing on the order based on the state of the delivery indication. + * + * @param WC_Order $order The WooCommerce order linked to the delivery indication. + * @param \Wallee\Sdk\Model\DeliveryIndication $delivery_indication The delivery indication object. + * @param WC_Wallee_Webhook_Request $request The webhook request. + * @return void + */ + protected function process_order_related_inner( WC_Order $order, \Wallee\Sdk\Model\DeliveryIndication $delivery_indication, WC_Wallee_Webhook_Request $request ) { + switch ( $request->get_state() ) { + case \Wallee\Sdk\Model\DeliveryIndicationState::MANUAL_CHECK_REQUIRED: + $this->review( $order ); + break; + default: + // Nothing to do. + break; + } + } + + /** + * Review and potentially update the order status based on manual review requirements. + * + * @param WC_Order $order The associated WooCommerce order. + * @return void + */ + protected function review( WC_Order $order ) { + $status = apply_filters( 'wc_wallee_manual_task_status', 'wallee-manual', $order ); + $order->add_meta_data( '_wallee_manual_check', true ); + $order->update_status( $status, __( 'A manual decision about whether to accept the payment is required.', 'woo-wallee' ) ); + } +} diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-manual-task-strategy.php b/includes/webhook/strategies/class-wc-wallee-webhook-manual-task-strategy.php new file mode 100644 index 0000000..616a642 --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-manual-task-strategy.php @@ -0,0 +1,53 @@ +update(); + } +} diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-method-configuration-strategy.php b/includes/webhook/strategies/class-wc-wallee-webhook-method-configuration-strategy.php new file mode 100644 index 0000000..9e3555e --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-method-configuration-strategy.php @@ -0,0 +1,53 @@ +synchronize(); + } +} diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-refund-strategy.php b/includes/webhook/strategies/class-wc-wallee-webhook-refund-strategy.php new file mode 100644 index 0000000..3985f36 --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-refund-strategy.php @@ -0,0 +1,156 @@ +get_api_client() ); + return $refund_service->read( $request->get_space_id(), $request->get_entity_id() ); + } + + /** + * Get the order id. + * + * @inheritDoc + * @param \Wallee\Sdk\Model\Refund $object The refund object. + */ + protected function get_order_id( $object ) { + return WC_Wallee_Entity_Transaction_Info::load_by_transaction( + $object->getTransaction()->getLinkedSpaceId(), + $object->getTransaction()->getId() + )->get_order_id(); + } + + /** + * Processes the incoming webhook request related to refunds. + * + * This method retrieves the refund details from the API and updates the associated order + * based on the refund's state. + * + * @param WC_Wallee_Webhook_Request $request The webhook request object. + * @return void + */ + public function process( WC_Wallee_Webhook_Request $request ) { + /* @var \Wallee\Sdk\Model\Refund $refund */ + $refund = $this->load_entity( $request ); + $order = $this->get_order( $refund ); + if ( false != $order && $order->get_id() ) { + $this->process_order_related_inner( $order, $refund, $request ); + } + } + + /** + * Performs additional order-related processing based on the refund state. + * + * @param WC_Order $order The WooCommerce order associated with the refund. + * @param \Wallee\Sdk\Model\Refund $refund The transaction refund object. + * @param WC_Wallee_Webhook_Request $request The webhook request object. + * @return void + */ + protected function process_order_related_inner( WC_Order $order, \Wallee\Sdk\Model\Refund $refund, WC_Wallee_Webhook_Request $request ) { + /* @var \Wallee\Sdk\Model\Refund $refund */ + switch ( $request->get_state() ) { + case \Wallee\Sdk\Model\RefundState::FAILED: + // fallback. + $this->failed( $refund, $order ); + break; + case \Wallee\Sdk\Model\RefundState::SUCCESSFUL: + $this->refunded( $refund, $order ); + // Nothing to do. + default: + // Nothing to do. + break; + } + } + + /** + * Handles actions to be performed when a refund transaction fails. + * + * @param \Wallee\Sdk\Model\Refund $refund refund. + * @param WC_Order $order order. + * @return void + * @throws Exception Exception. + */ + protected function failed( \Wallee\Sdk\Model\Refund $refund, WC_Order $order ) { + $refund_job = WC_Wallee_Entity_Refund_Job::load_by_external_id( $refund->getLinkedSpaceId(), $refund->getExternalId() ); + if ( $refund_job->get_id() ) { + $refund_job->set_state( WC_Wallee_Entity_Refund_Job::WALLEE_STATE_FAILURE ); + if ( $refund->getFailureReason() != null ) { + $refund_job->set_failure_reason( $refund->getFailureReason()->getDescription() ); + } + $refund_job->save(); + $refunds = $order->get_refunds(); + foreach ( $refunds as $wc_refund ) { + if ( $wc_refund->get_meta( '_wallee_refund_job_id', true ) == $refund_job->get_id() ) { + $wc_refund->set_status( 'failed' ); + $wc_refund->save(); + break; + } + } + } + } + + /** + * Handles actions to be performed when a refund transaction is successful. + * + * @param \Wallee\Sdk\Model\Refund $refund refund. + * @param WC_Order $order order. + * @return void + * @throws Exception Exception. + */ + protected function refunded( \Wallee\Sdk\Model\Refund $refund, WC_Order $order ) { + $refund_job = WC_Wallee_Entity_Refund_Job::load_by_external_id( $refund->getLinkedSpaceId(), $refund->getExternalId() ); + + if ( $refund_job->get_id() ) { + $refund_job->set_state( WC_Wallee_Entity_Refund_Job::WALLEE_STATE_SUCCESS ); + $refund_job->save(); + $refunds = $order->get_refunds(); + foreach ( $refunds as $wc_refund ) { + if ( $wc_refund->get_meta( '_wallee_refund_job_id', true ) == $refund_job->get_id() ) { + $wc_refund->set_status( 'completed' ); + $wc_refund->save(); + break; + } + } + } + } +} diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-strategy-base.php b/includes/webhook/strategies/class-wc-wallee-webhook-strategy-base.php new file mode 100644 index 0000000..0a7c6ed --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-strategy-base.php @@ -0,0 +1,68 @@ +get_api_client() ); + return $transaction_service->read( $request->get_space_id(), $request->get_entity_id() ); + } + + /** + * Get the WooCommerce order associated with the webhook request. + * + * This method uses the Order Factory to fetch the order based on the ID retrieved from the transaction linked to the webhook request. + * + * @param WC_Wallee_Webhook_Request|mixed $object The webhook request or transaction that containing data needed to identify the order. + * @return \WC_Order The WooCommerce order object associated with the request. + */ + protected function get_order( $object ) { + return WC_Order_Factory::get_order( $this->get_order_id( $object ) ); + } + + /** + * Extracts the order ID from a transaction. + * + * This method fetches the order ID by using the transaction information available in the webhook request. + * It is typically used to link the transaction data retrieved via API to a specific WooCommerce order. + * + * @param WC_Wallee_Webhook_Request|mixed $object The webhook request or transaction that containing data needed to identify the order.. + * @return int|string + */ + protected function get_order_id( $object ) { + return WC_Wallee_Entity_Transaction_Info::load_by_transaction( $object->get_space_id(), $object->get_entity_id() )->get_order_id(); + } +} diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-strategy-interface.php b/includes/webhook/strategies/class-wc-wallee-webhook-strategy-interface.php new file mode 100644 index 0000000..e8e2185 --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-strategy-interface.php @@ -0,0 +1,45 @@ +webhook_service = WC_Wallee_Service_Webhook::instance(); + $this->helper = WC_Wallee_Helper::instance(); + $this->configure_strategies_to_handle_webhooks(); + } + + /** + * Initializes the list of strategies for handling different types of webhook events. + * + * This method populates the 'strategies' array with instances of various webhook handling strategies. + * Each strategy corresponds to a specific type of webhook event, ensuring that the appropriate + * processing logic is applied based on the type of the incoming webhook request. + * + * @return void + */ + private function configure_strategies_to_handle_webhooks() { + $this->strategies[] = new WC_Wallee_Webhook_Manual_Task_Strategy(); + $this->strategies[] = new WC_Wallee_Webhook_Method_Configuration_Strategy(); + $this->strategies[] = new WC_Wallee_Webhook_Transaction_Strategy(); + $this->strategies[] = new WC_Wallee_Webhook_Delivery_Indication_Strategy(); + $this->strategies[] = new WC_Wallee_Webhook_Transaction_Invoice_Strategy(); + $this->strategies[] = new WC_Wallee_Webhook_Transaction_Completion_Strategy(); + $this->strategies[] = new WC_Wallee_Webhook_Transaction_Void_Strategy(); + $this->strategies[] = new WC_Wallee_Webhook_Refund_Strategy(); + $this->strategies[] = new WC_Wallee_Webhook_Token_Strategy(); + $this->strategies[] = new WC_Wallee_Webhook_Token_Version_Strategy(); + } + + /** + * Resolves the appropriate strategy for handling the given webhook request based on webhook type. + * + * This method fetches the webhook entity using the listener entity ID from the request, checks if a corresponding + * strategy exists, and returns the strategy if found. + * + * @param WC_Wallee_Webhook_Request $request The incoming webhook request. + * @return WC_Wallee_Webhook_Strategy_Interface The strategy to handle the request. + * @throws Exception If no strategy can be resolved. + */ + private function resolve_strategy( WC_Wallee_Webhook_Request $request ) { + $webhook_model = $this->webhook_service->get_webhook_entity_for_id( $request->get_listener_entity_id() ); + + // Check if the webhook model exists for this listener entity ID. + if ( is_null( $webhook_model ) ) { + $entity_id = esc_attr( $request->get_listener_entity_id() ); + throw new Exception( esc_attr( sprintf( 'Could not retrieve webhook model for listener entity id: %s', $entity_id ) ) ); + } + + $webhook_transaction_id = $webhook_model->get_id(); + + // Check if the strategy exists for the retrieved transaction ID. + foreach ( $this->strategies as $strategy ) { + if ( $strategy->match( $webhook_transaction_id ) ) { + return $strategy; + } + } + + // No strategy found for the transaction ID. + throw new Exception( esc_attr( sprintf( 'No strategy available for the transaction ID: %s', $webhook_transaction_id ) ) ); + } + + /** + * Processes the incoming webhook by delegating to the appropriate strategy. + * + * This method determines the type of the incoming webhook request and uses it + * to look up the corresponding strategy. If a strategy is found, it delegates the + * request processing to that strategy. If no strategy is found for the type, it + * throws an exception. + * + * @param WC_Wallee_Webhook_Request $request The incoming webhook request object. + * @throws Exception If no strategy is available for the webhook type provided in the request. + */ + public function process( WC_Wallee_Webhook_Request $request ) { + $this->helper->start_database_transaction(); + + try { + $this->helper->lock_by_transaction_id( $request->get_space_id(), $request->get_entity_id() ); + + $strategy = $this->resolve_strategy( $request ); + $strategy->process( $request ); + + $this->helper->commit_database_transaction(); + } catch ( Exception $e ) { + $this->helper->rollback_database_transaction(); + throw $e; + } + } +} diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-token-strategy.php b/includes/webhook/strategies/class-wc-wallee-webhook-token-strategy.php new file mode 100644 index 0000000..30ceca6 --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-token-strategy.php @@ -0,0 +1,54 @@ +update_token( $request->get_space_id(), $request->get_entity_id() ); + } +} diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-token-version-strategy.php b/includes/webhook/strategies/class-wc-wallee-webhook-token-version-strategy.php new file mode 100644 index 0000000..fe4924c --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-token-version-strategy.php @@ -0,0 +1,54 @@ +update_token_version( $request->get_space_id(), $request->get_entity_id() ); + } +} diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-transaction-completion-strategy.php b/includes/webhook/strategies/class-wc-wallee-webhook-transaction-completion-strategy.php new file mode 100644 index 0000000..14422ed --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-transaction-completion-strategy.php @@ -0,0 +1,284 @@ +get_api_client() ); + return $transaction_invoice_service->read( $request->get_space_id(), $request->get_entity_id() ); + } + + /** + * Get the order ID. + * + * @inheritDoc + * @param object $object The webhook request. + */ + protected function get_order_id( $object ) { + /* @var \Wallee\Sdk\Model\TransactionCompletion $object */ + return WC_Wallee_Entity_Transaction_Info::load_by_transaction( + $object->getLineItemVersion()->getTransaction()->getLinkedSpaceId(), + $object->getLineItemVersion()->getTransaction()->getId() + )->get_order_id(); + } + + /** + * Processes the incoming webhook request pertaining to transaction completions. + * + * This method retrieves the transaction completion details from the API and updates the associated + * WooCommerce order based on the state of the completion. + * + * @param WC_Wallee_Webhook_Request $request The webhook request object. + * @return void + */ + public function process( WC_Wallee_Webhook_Request $request ) { + /* @var \Wallee\Sdk\Model\TransactionCompletion $completion */ + $completion = $this->load_entity( $request ); + $order = $this->get_order( $completion ); + if ( false != $order && $order->get_id() ) { + $this->process_order_related_inner( $order, $completion, $request ); + } + } + + /** + * Additional processing on the order based on the state of the transaction completion. + * + * @param WC_Order $order The WooCommerce order linked to the completion. + * @param \Wallee\Sdk\Model\TransactionCompletion $completion The transaction completion object. + * @param WC_Wallee_Webhook_Request $request The webhook request. + * @return void + */ + protected function process_order_related_inner( WC_Order $order, \Wallee\Sdk\Model\TransactionCompletion $completion, WC_Wallee_Webhook_Request $request ) { + switch ( $request->get_state() ) { + case \Wallee\Sdk\Model\TransactionCompletionState::FAILED: + $this->failed( $order, $completion ); + break; + case \Wallee\Sdk\Model\TransactionCompletionState::SUCCESSFUL: + $this->success( $order, $completion ); + break; + default: + // Nothing to do. + break; + } + } + + /** + * Handles successful transaction completion. + * + * @param WC_Order $order The associated WooCommerce order. + * @param \Wallee\Sdk\Model\TransactionCompletion $completion The transaction completion data. + * @return void + */ + protected function success( WC_Order $order, \Wallee\Sdk\Model\TransactionCompletion $completion ) { + $completion_job = WC_Wallee_Entity_Completion_Job::load_by_completion( $completion->getLinkedSpaceId(), $completion->getId() ); + if ( ! $completion_job->get_id() ) { + // We have no completion job with this id -> the server could not store the id of the completion after sending the request. (e.g. connection issue or crash) + // We only have on running completion which was not yet processed successfully and use it as it should be the one the webhook is for. + $completion_job = WC_Wallee_Entity_Completion_Job::load_running_completion_for_transaction( + $completion->getLinkedSpaceId(), + $completion->getLinkedTransaction() + ); + if ( ! $completion_job->get_id() ) { + // completion not initiated in shop backend ignore. + return; + } + $completion_job->set_completion_id( $completion->getId() ); + } + $completion_job->set_state( WC_Wallee_Entity_Completion_Job::WALLEE_STATE_DONE ); + + if ( $completion_job->get_restock() ) { + $this->restock_non_completed_items( (array) $completion_job->get_items(), $order ); + } + $this->adapt_order_items( (array) $completion_job->get_items(), $order ); + $completion_job->save(); + } + + /** + * Restock non completed items. + * + * @param array $completed_items completed items. + * @param WC_Order $order order. + * @return void + */ + private function restock_non_completed_items( array $completed_items, WC_Order $order ) { + if ( 'yes' === get_option( 'woocommerce_manage_stock' ) && $order && count( $order->get_items() ) > 0 ) { + foreach ( $order->get_items() as $item_id => $item ) { + $product = $item->get_product(); + if ( $item->is_type( 'line_item' ) && $product && $product->managing_stock() ) { + + $changed_qty = $item->get_quantity(); + if ( isset( $completed_items[ $item_id ] ) ) { + $changed_qty = $changed_qty - $completed_items[ $item_id ]['qty']; + } + if ( $changed_qty > 0 ) { + $item_name = esc_attr( $product->get_formatted_name() ); + $new_stock = wc_update_product_stock( $product, $changed_qty, 'increase' ); + $old_stock = $new_stock - $changed_qty; + + $order->add_order_note( + /* translators: %1$s, %2$s, %3$s are replaced with "string" */ + sprintf( __( '%1$s stock increased from %2$s to %3$s.', 'woo-wallee' ), $item_name, $old_stock, $new_stock ) + ); + do_action( 'wc_wallee_restock_not_completed_item', $product->get_id(), $old_stock, $new_stock, $order, $product ); + } + } + } + } + } + + /** + * Adapt order items. + * + * @param array $completed_items completed items. + * @param WC_Order $order order. + * @return void + */ + private function adapt_order_items( array $completed_items, WC_Order $order ) { + foreach ( $order->get_items() as $item_id => $item ) { + if ( ! isset( $completed_items[ $item_id ] ) || + $completed_items[ $item_id ]['completion_total'] + array_sum( $completed_items[ $item_id ]['completion_tax'] ) == 0 ) { + $order_item = $order->get_item( $item_id ); + $order_item->delete( true ); + continue; + } + $old_total = $item->get_total(); + $subtotal = $item->get_subtotal(); + $ratio = $old_total / $completed_items[ $item_id ]['completion_total']; + if ( 0 != $ratio ) { + $subtotal = $subtotal / $ratio; + } + $old_taxes = $item->get_taxes(); + $new_taxes = array( + 'total' => array(), + 'subtotal' => array(), + ); + foreach ( array_keys( $old_taxes['total'] ) as $id ) { + $old_tax = $old_taxes['total'][ $id ]; + $subtax = $old_taxes['subtotal'][ $id ]; + if ( 0 != $completed_items[ $item_id ]['completion_tax'][ $id ] ) { + $ration = $old_tax / $completed_items[ $item_id ]['completion_tax'][ $id ]; + if ( 0 != $ration ) { + $subtax = $subtax / $ratio; + } + } + $new_taxes['total'][ $id ] = wc_format_decimal( $completed_items[ $item_id ]['completion_tax'][ $id ], wc_get_price_decimals() ); + $new_taxes['subtotal'][ $id ] = wc_format_decimal( $subtax, wc_get_price_decimals() ); + } + + $item->set_props( + array( + 'quantity' => $completed_items[ $item_id ]['qty'], + 'total' => wc_format_decimal( $completed_items[ $item_id ]['completion_total'], wc_get_price_decimals() ), + 'subtotal' => wc_format_decimal( $subtotal, wc_get_price_decimals() ), + 'taxes' => $new_taxes, + ) + ); + $item->save(); + } + foreach ( $order->get_fees() as $fee_id => $fee ) { + if ( ! isset( $completed_items[ $fee_id ] ) || + $completed_items[ $fee_id ]['completion_total'] + array_sum( $completed_items[ $fee_id ]['completion_tax'] ) == 0 ) { + $order_fee = $order->get_item( $fee_id ); + $order_fee->delete(); + continue; + } + $fee->set_props( + array( + 'total' => $completed_items[ $fee_id ]['completion_total'], + 'taxes' => array( + 'total' => $completed_items[ $fee_id ]['completion_tax'], + ), + ) + ); + $fee->save(); + } + foreach ( $order->get_shipping_methods() as $shipping_id => $shipping ) { + + if ( ! isset( $completed_items[ $shipping_id ] ) || + $completed_items[ $shipping_id ]['completion_total'] + array_sum( $completed_items[ $shipping_id ]['completion_tax'] ) == 0 ) { + $order_shipping = $order->get_item( $shipping_id ); + $order_shipping->delete(); + continue; + } + $shipping->set_props( + array( + 'total' => $completed_items[ $shipping_id ]['completion_total'], + 'taxes' => array( + 'total' => $completed_items[ $shipping_id ]['completion_tax'], + ), + ) + ); + + $shipping->save(); + } + $order->save(); + $order = WC_Order_Factory::get_order( $order->get_id() ); + $order->update_taxes(); + $order->calculate_totals( false ); + } + + /** + * Handles failed transaction completion. + * + * @param WC_Order $order The associated WooCommerce order. + * @param \Wallee\Sdk\Model\TransactionCompletion $completion The transaction completion data that failed. + * @return void + */ + protected function failed( WC_Order $order, \Wallee\Sdk\Model\TransactionCompletion $completion ) { + $completion_job = WC_Wallee_Entity_Completion_Job::load_by_completion( $completion->getLinkedSpaceId(), $completion->getId() ); + if ( ! $completion_job->get_id() ) { + $completion_job = WC_Wallee_Entity_Completion_Job::load_running_completion_for_transaction( + $completion->getLinkedSpaceId(), + $completion->getLinkedTransaction() + ); + if ( ! $completion_job->get_id() ) { + return; + } + $completion_job->set_completion_id( $completion->getId() ); + } + if ( $completion->getFailureReason() != null ) { + $completion_job->set_failure_reason( $completion->getFailureReason()->getDescription() ); + } + $completion_job->set_state( WC_Wallee_Entity_Completion_Job::WALLEE_STATE_DONE ); + $completion_job->save(); + } +} diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-transaction-invoice-strategy.php b/includes/webhook/strategies/class-wc-wallee-webhook-transaction-invoice-strategy.php new file mode 100644 index 0000000..f51ce49 --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-transaction-invoice-strategy.php @@ -0,0 +1,104 @@ +get_api_client() ); + return $transaction_invoice_service->read( $request->get_space_id(), $request->get_entity_id() ); + } + + /** + * Get the order ID from the object. + * + * @inheritDoc + * @param object $object transaction entity object. + */ + protected function get_order_id( $object ) { + /* @var \Wallee\Sdk\Model\TransactionInvoice $object */ + return WC_Wallee_Entity_Transaction_Info::load_by_transaction( + $object->getLinkedSpaceId(), + $object->getCompletion()->getLineItemVersion()->getTransaction()->getId() + )->get_order_id(); + } + + /** + * Processes the incoming webhook request pertaining to transaction invoices. + * + * This method retrieves the transaction invoice details from the API and updates the associated + * WooCommerce order based on the state of the invoice. + * + * @param WC_Wallee_Webhook_Request $request The webhook request object. + * @return void + */ + public function process( WC_Wallee_Webhook_Request $request ) { + /* @var \Wallee\Sdk\Model\TransactionInvoice $transaction_invoice */ + $transaction_invoice = $this->load_entity( $request ); + $order = $this->get_order( $transaction_invoice ); + if ( false != $order && $order->get_id() ) { + $this->process_order_related_inner( $order, $transaction_invoice, $request ); + } + } + + /** + * Additional processing on the order based on the state of the transaction invoice. + * + * @param WC_Order $order The WooCommerce order linked to the invoice. + * @param \Wallee\Sdk\Model\TransactionInvoice $transaction_invoice The transaction invoice object. + * @param WC_Wallee_Webhook_Request $request The webhook request object. + * @return void + */ + protected function process_order_related_inner( WC_Order $order, \Wallee\Sdk\Model\TransactionInvoice $transaction_invoice, WC_Wallee_Webhook_Request $request ) { + switch ( $request->get_state() ) { + case \Wallee\Sdk\Model\TransactionInvoiceState::DERECOGNIZED: + $order->add_order_note( __( 'Invoice Not Settled' ) ); + break; + case \Wallee\Sdk\Model\TransactionInvoiceState::NOT_APPLICABLE: + case \Wallee\Sdk\Model\TransactionInvoiceState::PAID: + $order->add_order_note( __( 'Invoice Settled' ) ); + break; + default: + // Nothing to do. + break; + } + } +} diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-transaction-strategy.php b/includes/webhook/strategies/class-wc-wallee-webhook-transaction-strategy.php new file mode 100644 index 0000000..beea91f --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-transaction-strategy.php @@ -0,0 +1,203 @@ +get_order( $request ); + if ( false != $order && $order->get_id() ) { + $this->process_order_related_inner( $order, $request ); + } + } + + /** + * Process order related inner. + * + * @param WC_Order $order order. + * @param WC_Wallee_Webhook_Request $request request. + * @return void + * @throws Exception Exception. + */ + protected function process_order_related_inner( WC_Order $order, WC_Wallee_Webhook_Request $request ) { + $transaction_info = WC_Wallee_Entity_Transaction_Info::load_by_order_id( $order->get_id() ); + if ( $request->get_state() != $transaction_info->get_state() ) { + switch ( $request->get_state() ) { + case \Wallee\Sdk\Model\TransactionState::CONFIRMED: + case \Wallee\Sdk\Model\TransactionState::PROCESSING: + $this->confirm( $request, $order ); + break; + case \Wallee\Sdk\Model\TransactionState::AUTHORIZED: + $this->authorize( $request, $order ); + break; + case \Wallee\Sdk\Model\TransactionState::DECLINE: + $this->decline( $request, $order ); + break; + case \Wallee\Sdk\Model\TransactionState::FAILED: + $this->failed( $request, $order ); + break; + case \Wallee\Sdk\Model\TransactionState::FULFILL: + $this->authorize( $request, $order ); + $this->fulfill( $request, $order ); + break; + case \Wallee\Sdk\Model\TransactionState::VOIDED: + $this->voided( $request, $order ); + break; + case \Wallee\Sdk\Model\TransactionState::COMPLETED: + $this->authorize( $request, $order ); + $this->waiting( $request, $order ); + break; + default: + // Nothing to do. + break; + } + } + + WC_Wallee_Service_Transaction::instance()->update_transaction_info( $this->load_entity( $request ), $order ); + } + + /** + * Confirm. + * + * @param WC_Wallee_Webhook_Request $request request. + * @param WC_Order $order order. + * @return void + */ + protected function confirm( WC_Wallee_Webhook_Request $request, WC_Order $order ) { + if ( ! $order->get_meta( '_wallee_confirmed', true ) && ! $order->get_meta( '_wallee_authorized', true ) ) { + do_action( 'wc_wallee_confirmed', $this->load_entity( $request ), $order ); + $order->add_meta_data( '_wallee_confirmed', 'true', true ); + $status = apply_filters( 'wc_wallee_confirmed_status', 'wallee-redirected', $order ); + $order->update_status( $status ); + wc_maybe_reduce_stock_levels( $order->get_id() ); + } + } + + /** + * Authorize. + * + * @param WC_Wallee_Webhook_Request $request request. + * @param \WC_Order $order order. + */ + protected function authorize( WC_Wallee_Webhook_Request $request, WC_Order $order ) { + if ( ! $order->get_meta( '_wallee_authorized', true ) ) { + do_action( 'wc_wallee_authorized', $this->load_entity( $request ), $order ); + $status = apply_filters( 'wc_wallee_authorized_status', 'on-hold', $order ); + $order->add_meta_data( '_wallee_authorized', 'true', true ); + $order->update_status( $status ); + wc_maybe_reduce_stock_levels( $order->get_id() ); + if ( isset( WC()->cart ) ) { + WC()->cart->empty_cart(); + } + } + } + + /** + * Waiting. + * + * @param WC_Wallee_Webhook_Request $request request. + * @param WC_Order $order order. + * @return void + */ + protected function waiting( WC_Wallee_Webhook_Request $request, WC_Order $order ) { + if ( ! $order->get_meta( '_wallee_manual_check', true ) ) { + do_action( 'wc_wallee_completed', $this->load_entity( $request ), $order ); + $status = apply_filters( 'wc_wallee_completed_status', 'processing', $order ); + $order->update_status( $status ); + } + } + + /** + * Decline. + * + * @param WC_Wallee_Webhook_Request $request request. + * @param WC_Order $order order. + * @return void + */ + protected function decline( WC_Wallee_Webhook_Request $request, WC_Order $order ) { + do_action( 'wc_wallee_declined', $this->load_entity( $request ), $order ); + $status = apply_filters( 'wc_wallee_decline_status', 'cancelled', $order ); + $order->update_status( $status ); + WC_Wallee_Helper::instance()->maybe_restock_items_for_order( $order ); + } + + /** + * Failed. + * + * @param WC_Wallee_Webhook_Request $request request. + * @param WC_Order $order order. + * @return void + */ + protected function failed( WC_Wallee_Webhook_Request $request, WC_Order $order ) { + do_action( 'wc_wallee_failed', $this->load_entity( $request ), $order ); + if ( $order->get_status( 'edit' ) == 'pending' || $order->get_status( 'edit' ) == 'wallee-redirected' ) { + $status = apply_filters( 'wc_wallee_failed_status', 'failed', $order ); + $order->update_status( $status ); + WC_Wallee_Helper::instance()->maybe_restock_items_for_order( $order ); + } + } + + /** + * Fulfill. + * + * @param WC_Wallee_Webhook_Request $request request. + * @param WC_Order $order order. + * @return void + */ + protected function fulfill( WC_Wallee_Webhook_Request $request, WC_Order $order ) { + do_action( 'wc_wallee_fulfill', $this->load_entity( $request ), $order ); + // Sets the status to procesing or complete depending on items. + $order->payment_complete( $request->get_entity_id() ); + } + + /** + * Voided. + * + * @param WC_Wallee_Webhook_Request $request request. + * @param WC_Order $order order. + * @return void + */ + protected function voided( WC_Wallee_Webhook_Request $request, WC_Order $order ) { + $status = apply_filters( 'wc_wallee_voided_status', 'cancelled', $order ); + $order->update_status( $status ); + do_action( 'wc_wallee_voided', $this->load_entity( $request ), $order ); + } +} diff --git a/includes/webhook/strategies/class-wc-wallee-webhook-transaction-void-strategy.php b/includes/webhook/strategies/class-wc-wallee-webhook-transaction-void-strategy.php new file mode 100644 index 0000000..7c7730f --- /dev/null +++ b/includes/webhook/strategies/class-wc-wallee-webhook-transaction-void-strategy.php @@ -0,0 +1,161 @@ +get_api_client() ); + return $void_service->read( $request->get_space_id(), $request->get_entity_id() ); + } + + /** + * Get order id + * + * @inheritDoc + * + * @param object $object The order object. + */ + protected function get_order_id( $object ) { + /* @var \Wallee\Sdk\Model\TransactionVoid $object */ + return WC_Wallee_Entity_Transaction_Info::load_by_transaction( + $object->getTransaction()->getLinkedSpaceId(), + $object->getTransaction()->getId() + )->get_order_id(); + } + + /** + * Processes the incoming webhook request related to transaction voids. + * + * This method checks if the corresponding order exists and if so, it further processes the order + * based on the transaction void state obtained from the webhook request. + * + * @param WC_Wallee_Webhook_Request $request The webhook request. + * @return void + */ + public function process( WC_Wallee_Webhook_Request $request ) { + /* @var \Wallee\Sdk\Model\TransactionVoid $void_transaction */ + $void = $this->load_entity( $request ); + $order = $this->get_order( $void ); + if ( false != $order && $order->get_id() ) { + $this->process_order_related_inner( $order, $void, $request ); + } + } + + /** + * Processes additional order-related operations based on the transaction void's state. + * + * @param WC_Order $order The WooCommerce order associated with the void request. + * @param \Wallee\Sdk\Model\TransactionVoid $void The transaction void object. + * @param WC_Wallee_Webhook_Request $request The webhook request object. + * @return void + */ + protected function process_order_related_inner( WC_Order $order, \Wallee\Sdk\Model\TransactionVoid $void, WC_Wallee_Webhook_Request $request ) { + + switch ( $request->get_state() ) { + case \Wallee\Sdk\Model\TransactionVoidState::FAILED: + $this->failed( $order, $void ); + break; + case \Wallee\Sdk\Model\TransactionVoidState::SUCCESSFUL: + $this->success( $order, $void ); + break; + default: + // Nothing to do. + break; + } + } + + /** + * Successfully processes a transaction void. + * + * @param WC_Order $order The order to process. + * @param \Wallee\Sdk\Model\TransactionVoid $void The transaction void. + * @return void + */ + protected function success( WC_Order $order, \Wallee\Sdk\Model\TransactionVoid $void ) { + $void_job = WC_Wallee_Entity_Void_Job::load_by_void( $void->getLinkedSpaceId(), $void->getId() ); + if ( ! $void_job->get_id() ) { + // We have no void job with this id -> the server could not store the id of the void after sending the request. (e.g. connection issue or crash) + // We only have on running void which was not yet processed successfully and use it as it should be the one the webhook is for. + $void_job = WC_Wallee_Entity_Void_Job::load_running_void_for_transaction( $void->getLinkedSpaceId(), $void->getLinkedTransaction() ); + if ( ! $void_job->get_id() ) { + // void not initiated in shop backend ignore. + return; + } + $void_job->set_void_id( $void->getId() ); + } + $void_job->set_state( WC_Wallee_Entity_Void_Job::WALLEE_STATE_DONE ); + + if ( $void_job->get_restock() ) { + WC_Wallee_Helper::instance()->maybe_restock_items_for_order( $order ); + } + $void_job->save(); + } + + /** + * Handles a failed transaction void. + * + * @param WC_Order $order The order linked to the failed void. + * @param \Wallee\Sdk\Model\TransactionVoid $void The transaction void. + * @return void + */ + protected function failed( WC_Order $order, \Wallee\Sdk\Model\TransactionVoid $void ) { + $void_job = WC_Wallee_Entity_Void_Job::load_by_void( $void->getLinkedSpaceId(), $void->getId() ); + + if ( ! $void_job->get_id() ) { + // We have no void job with this id -> the server could not store the id of the void after sending the request. (e.g. connection issue or crash) + // We only have on running void which was not yet processed successfully and use it as it should be the one the webhook is for. + $void_job = WC_Wallee_Entity_Void_Job::load_running_void_for_transaction( $void->getLinkedSpaceId(), $void->getLinkedTransaction() ); + if ( ! $void_job->get_id() ) { + // void not initiated in shop backend ignore. + return; + } + $void_job->set_void_id( $void->getId() ); + } + if ( $void_job->getFailureReason() != null ) { + $void_job->set_failure_reason( $void->getFailureReason()->getDescription() ); + } + $void_job->set_state( WC_Wallee_Entity_Void_Job::WALLEE_STATE_DONE ); + $void_job->save(); + } +} diff --git a/languages/woo-wallee-de_DE.mo b/languages/woo-wallee-de_DE.mo index 1aa75cc58c1796453556ebd1e316980f5a75e950..57a16abf8e8ab47a44f141c6a5c0690487ccd3e8 100644 GIT binary patch delta 2557 zcmYk-e@vBC9LMpm2`GeuKw2pFXe$0d#9RJAGz^u}NNA>&N^!e9!9}^Z;JG?*?lzZg zrf!i^{-HM8EOX`NP;<@PT16$U4Y&MJ8$&B|b5yK3mox4C={_?V+}Anh`SCs9?>Xo4 zSFCe=yeBKE-S~Nnzft_{PEwC{>i_1`%%i^>7hxJ+!ZPf`ui=aIlXqfC0y)%w4o<{ZF@)pr2b_gB za5@Hv8o*lAlDvyr+An-h;}ZJkkfPbxZ0bLfMiJ=|%PQ~ztVRV`kArbHYC`)__w^w$ z?G~0`COc^cR-h)l3H98Ys6acAn6?kc;t_1Xb2-#MpGFz!YsL+@2zTN)_#-}n?+>R6 zcohSfKEiAomSQz0bMI3lP<;P!98GlPwE@tPNJ&G-;xX0r(RJvXqjaigK8BIrR zrbg7}dIx9Xmso>0a4xRm%qHV5)UMu(s?0%D<|j~_?G&mq-KZ0O0acNB4-MVek6QcN z{tZL(5)Wph9?Zo`9E;Cm6Y3bA#@YBgYJ&M>F%Vxsotl?WiL6D6XYHs7eVn)+w+^On%60 z9kybY&VN4*mf4cnaXJmTn1=bNO%(9^C8*Mt`~Byzh<*sQ2X^9Q{0W;dWqcxV3(lv1 z1dH(+YJ$@y5Rdp)Ohct9M=eFQ-(Q1l3)_TjblZcP;9+E+*-2z0+gV(OS5cd)l#f!Z z!@2k&s-nN3p1Y1ZWf`nXTx&jwh62yVL0FD@U@5YJEr{E&6%}yMq{J7=C>%_`0F}TD z)Qc-n&%cbSSPQDcTd@)Mp_V*jGW8G8aHyLyTZYQG2K7y~0hP&COv5gG3eVye95*F# zY!Bf=`scA6^9mCGY-&-b>k#UFy{Lr$MBRV8fcmQ>3#Xbrf~%2zWNpYYS_iURb{>b| zEv&-y!bC>ZsEnI&7H&rc{2Eo6>%RK3(DSLN%8WpYV3XrCYG^!zC3qCITl-Og3fN)Y zxDn@JC2waHY&$N+W2pO*DdW?)0vqrEW({E9Je+U>*)3tbcm_ujUq|hk_-{0bWhI;y z-eqf00rsG7=tNB@m-Kj-Eyu@j3vR?NEW^co2_)k-)ECj)s7&|z9!6E*EC2c#WUs}o zhsJO&Tt;n@e{dLPb5_!EJf>m*Q*bU;;sUJ49jK+ciJIsbK6r(##(S_GGjJCwu>+`h z-I$_plq)n8;1A5izp)O}SPx~;g!6H8Nk>}hs+<)IqK%DiQ^<9~%}ylhIl+(@UKjM- z+Crylts881?~FLlMx%G`_M%RVYhJzUyb^3_bR(VUsSdULSUwyh5ie?0LN1A8;eivaox1i~=Xt=+rW{GFZPh7O88#D}d7)b0RUX M)g{!#;;sSz0zOMYC;$Ke delta 2352 zcmYM$e@s?Y9LMqR1NZ|4d3g8{;SYWl@F<9ZL;{*IgHRM3x;D&-mNSi9GNsMg?pP$b z{IN>hLY-Si!)DEV8kOM+HhQo&2^y^uYC8Qxa<+y2oN4b*_ij1hb-0wNx`#pDl z@xsI|=f^-)yYcT3zq9x~9HpLFO!WWe(2S*j42y9Z4r2w5;aW^*P~*+~$;B4T$9J(7 zzr$+Goo*JuCQLMQ>}48Uvksh$oyarov^U<3@$`GW@ozAL{unC2T?}G=jM-{@0=0lH zoR348jTUP*1#*xnR)BuuTNw?0tmeM~vwBRT|ExFOf?CiaoPlp*0(Rk6?7=+D=Ar`E zp#ttf?ewH)H?kJHfZFJ{ID_~$MnfyRfpK^X{TM~39+OZ3pGS?iqV8|^`p3QN?;}6f z#~%eA_WIXw1O4B;{#qWgfc|E5w4x(4wBwUVZ2JVOZ~zs^PyS0W1$ST_-iQ5Ig5&rA zW)ig!*PvcW8|u}5;Ms%A>4%Y|Ss;P@&!myg_K0QWcrUI*1=xa9aX)H7?Wp_4keGH8 z%TSe64CSZ=H=*Y3Mg@8aiD|E4Cccf^Fq}yKb7&N@eXY12AH`M-X>co`?~3XY_>JN}qmZKfZYYPJNoqT+TrG?copaSle14(%udRZQzq z#kCh7#1J;%IF{oI&g>+71y$7tQJLvL?ff*V*v_Fc(~COc7f=~-F4EAAmr?Kj7w?8U zsELuY-HFq%mVN+r{5Ii3*os=%d5pwcsMGQ%Y6B7Mie%Y5)blD(*Q=3N=~x|&rxHsDS?ip}WHa^tjN zlFokz4V{8BsA@frDxLwaKZHu@sMo)V3+Vral{lA5or^oL36G%y$K7wX6qn;7d=<68 zepI|cOeVgK($FiI&;a_f%_s*;K?>Z8P!p<OD+APz<>b2`o@(T6*mjJ?!?+sXLOuyL zf!cBOeD@2Og$lS1r{V$6BdGZ&P?>oTweZie0mmI0Wi(dsHBr&Dp#t^c5GGJ*i}4zg zRm&pEDy%`>cN8DT8@LUZkk^3E?38Cuk$Xx8+2tm#r*gDZGcO_`%o(D=T=Q{e6rc!o z!;`25ok5;qKjR~qR>EZ5h!yw~PQpw+2GcPYwbO;3Rj3Tqd)J>q)!I%>*7@HD35flKjhX(%;%U1Df(c6es!?xL{oU*o6!asU7T diff --git a/languages/woo-wallee-de_DE.po b/languages/woo-wallee-de_DE.po index 1df57f4..128f5c8 100644 --- a/languages/woo-wallee-de_DE.po +++ b/languages/woo-wallee-de_DE.po @@ -67,6 +67,10 @@ msgstr "Dokumentation" msgid "A version of the Wallee plugin is yet to be released for this version of WooCommerce." msgstr "Eine Version des Wallee Plugin ist für diese Version von WooCommerce noch nicht freigegeben." +#: includes/class-wc-wallee-migration.php:602 +msgid "WooCommerce is not activated. Please activate WooCommerce to use the payment integration." +msgstr "WooCommerce ist nicht aktiviert. Bitte aktivieren Sie WooCommerce, um die Zahlungsintegration zu nutzen." + #: includes/class-wc-wallee-customer-document.php:57 msgid "Order Documents" msgstr "Bestelldokumente" diff --git a/languages/woo-wallee.pot b/languages/woo-wallee.pot index ad9a1ca..61830f0 100644 --- a/languages/woo-wallee.pot +++ b/languages/woo-wallee.pot @@ -34,7 +34,7 @@ msgstr "PHP %s+ ist erforderlich. (Sie verwenden die Version %s)" msgid "Wordpress %s+ is required. (You're running version %s)" msgstr "Wordpress %s+ ist erforderlich. (Sie verwenden die Version %s)" -#: includes/class-wc-wallee-migration.php:98 +#: includes/class-wc-wallee-migration.php:98 #, php-format msgid "Woocommerce %s+ has to be active." msgstr "Woocommerce %s+ muss aktiviert sein." @@ -66,6 +66,10 @@ msgstr "Dokumentation" msgid "A version of the Wallee plugin is yet to be released for this version of WooCommerce." msgstr "Eine Version des Wallee Plugin ist für diese Version von WooCommerce noch nicht freigegeben." +#: includes/class-wc-wallee-migration.php:602 +msgid "WooCommerce is not activated. Please activate WooCommerce to use the payment integration." +msgstr "WooCommerce ist nicht aktiviert. Bitte aktivieren Sie WooCommerce, um die Zahlungsintegration zu nutzen." + #: includes/class-wc-wallee-customer-document.php:57 msgid "Order Documents" msgstr "Bestellungsdokumente" diff --git a/readme.txt b/readme.txt index 2ba27ce..ed99a3e 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: wallee AG Tags: woocommerce wallee, woocommerce, wallee, payment, e-commerce, webshop, psp, invoice, packing slips, pdf, customer invoice, processing Requires at least: 4.7 -Tested up to: 6.5 +Tested up to: 6.6 Stable tag: 3.1.3 License: Apache 2 License URI: http://www.apache.org/licenses/LICENSE-2.0 @@ -14,9 +14,9 @@ Accept payments in WooCommerce with wallee. Website: [https://www.wallee.com](https://www.wallee.com) The plugin offers an easy and convenient way to accept credit cards and all -other payment methods listed below fast and securely. The payment forms will be fully integrated in your checkout -and for credit cards there is no redirection to a payment page needed anymore. The pages are by default mobile optimized but -the look and feel can be changed according the merchants needs. +other payment methods listed below fast and securely. The payment forms will be fully integrated in your checkout +and for credit cards there is no redirection to a payment page needed anymore. The pages are by default mobile optimized but +the look and feel can be changed according the merchants needs. This plugin will add support for all wallee payments methods and connect the wallee servers to your WooCommerce webshop. To use this extension, a wallee account is required. Sign up on [wallee](https://app-wallee.com/user/signup). @@ -29,14 +29,20 @@ Additional documentation for this plugin is available [here](https://plugin-docu Support queries can be issued on the [wallee support site](https://app-wallee.com/space/select?target=/support). +== Privacy Policy == + +Enquiries about our privacy policy can be made on the [wallee privacy policies site](https://en.wallee.com/legal/privacy-policy). + +== Terms of use == + +Enquiries about our terms of use can be made on the [wallee terms of use site](https://en.wallee.com/legal/agb). + == Installation == = Minimum Requirements = * PHP version 5.6 or greater -* WordPress 4.7 up to 6.5.3 -* WooCommerce 3.0.0 up to 8.9.1 -* WordPress 4.7 up to 6.5.3 +* WordPress 4.7 up to 6.6 * WooCommerce 3.0.0 up to 8.9.1 = Automatic installation = @@ -57,6 +63,10 @@ Support queries can be issued on the [wallee support site](https://app-wallee.co == Changelog == - -= 3.1.3 - Sep 20 2024 = -- [Hotfix] Rolledback to version 3.0.11 + += 3.1.3 - Sept 20 2024 = +- [Bugfix] Enchanced plugin performance on Checkout page. +- [Tested Against] PHP 8.2 +- [Tested Against] Wordpress 6.6 +- [Tested Against] Woocommerce 9.3.1 +- [Tested Against] PHP SDK 4.5.0 diff --git a/views/admin-notices/manual-tasks.php b/views/admin-notices/manual-tasks.php index 838e848..b2b8f42 100644 --- a/views/admin-notices/manual-tasks.php +++ b/views/admin-notices/manual-tasks.php @@ -1,5 +1,9 @@

    diff --git a/views/admin-notices/plugin-deactivated.php b/views/admin-notices/plugin-deactivated.php index 17e5a54..da7455f 100644 --- a/views/admin-notices/plugin-deactivated.php +++ b/views/admin-notices/plugin-deactivated.php @@ -1,5 +1,9 @@

    diff --git a/views/admin-notices/round-subtotal-warning.php b/views/admin-notices/round-subtotal-warning.php index ac0d245..3007c6a 100644 --- a/views/admin-notices/round-subtotal-warning.php +++ b/views/admin-notices/round-subtotal-warning.php @@ -1,5 +1,9 @@

    diff --git a/woocommerce-wallee.php b/woocommerce-wallee.php index 13a2d50..273b824 100644 --- a/woocommerce-wallee.php +++ b/woocommerce-wallee.php @@ -3,21 +3,20 @@ * Plugin Name: wallee * Plugin URI: https://wordpress.org/plugins/woo-wallee * Description: Process WooCommerce payments with wallee. - * License: Apache2 * Version: 3.1.3 - * License URI: http://www.apache.org/licenses/LICENSE-2.0 * Author: wallee AG * Author URI: https://www.wallee.com + * Text Domain: wallee + * Domain Path: /languages/ * Requires at least: 6.0 * Requires PHP: 7.4 * WC requires at least: 8.0.0 - * WC tested up to: 9.3.1 - * - * Text Domain: wallee - * Domain Path: /languages/ + * WC tested up to: 9.2.3 + * License: Apache 2 + * License URI: http://www.apache.org/licenses/LICENSE-2.0 */ if ( ! defined( 'ABSPATH' ) ) { - exit(); // Exit if accessed directly. + exit(); // Exit if accessed directly. } if ( ! class_exists( 'WooCommerce_Wallee' ) ) { @@ -29,17 +28,18 @@ */ final class WooCommerce_Wallee { - const CK_SPACE_ID = 'wc_wallee_space_id'; - const CK_SPACE_VIEW_ID = 'wc_wallee_space_view_id'; - const CK_APP_USER_ID = 'wc_wallee_application_user_id'; - const CK_APP_USER_KEY = 'wc_wallee_application_user_key'; - const CK_CUSTOMER_INVOICE = 'wc_wallee_customer_invoice'; - const CK_CUSTOMER_PACKING = 'wc_wallee_customer_packing'; - const CK_SHOP_EMAIL = 'wc_wallee_shop_email'; - const CK_INTEGRATION = 'wc_wallee_integration'; - const CK_ORDER_REFERENCE = 'wc_wallee_order_reference'; - const CK_ENFORCE_CONSISTENCY = 'wc_wallee_enforce_consistency'; - const WC_MAXIMUM_VERSION = '9.3.1'; + const WALLEE_CK_SPACE_ID = 'wc_wallee_space_id'; + const WALLEE_CK_SPACE_VIEW_ID = 'wc_wallee_space_view_id'; + const WALLEE_CK_APP_USER_ID = 'wc_wallee_application_user_id'; + const WALLEE_CK_APP_USER_KEY = 'wc_wallee_application_user_key'; + const WALLEE_CK_CUSTOMER_INVOICE = 'wc_wallee_customer_invoice'; + const WALLEE_CK_CUSTOMER_PACKING = 'wc_wallee_customer_packing'; + const WALLEE_CK_SHOP_EMAIL = 'wc_wallee_shop_email'; + const WALLEE_CK_INTEGRATION = 'wc_wallee_integration'; + const WALLEE_CK_ORDER_REFERENCE = 'wc_wallee_order_reference'; + const WALLEE_CK_ENFORCE_CONSISTENCY = 'wc_wallee_enforce_consistency'; + const WALLEE_UPGRADE_VERSION = '3.1.2'; + const WC_MAXIMUM_VERSION = '9.2.3'; /** * WooCommerce Wallee version. @@ -53,7 +53,7 @@ final class WooCommerce_Wallee { * * @var WooCommerce_Wallee */ - protected static $_instance = null; + protected static $instance = null; /** * Logger. @@ -70,10 +70,10 @@ final class WooCommerce_Wallee { * @return WooCommerce_Wallee - Main instance. */ public static function instance() { - if ( null === self::$_instance ) { - self::$_instance = new self(); + if ( is_null( self::$instance ) ) { + self::$instance = new self(); } - return self::$_instance; + return self::$instance; } /** @@ -97,7 +97,7 @@ public function get_version() { */ protected function define_constants() { $this->define( 'WC_WALLEE_PLUGIN_FILE', __FILE__ ); - $this->define( 'WC_WALLEE_ABSPATH', dirname( __FILE__ ) . '/' ); + $this->define( 'WC_WALLEE_ABSPATH', __DIR__ . '/' ); $this->define( 'WC_WALLEE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); $this->define( 'WC_WALLEE_VERSION', $this->version ); $this->define( 'WC_WALLEE_REQUIRED_PHP_VERSION', '5.6' ); @@ -113,20 +113,20 @@ protected function includes() { /** * Class autoloader. */ - require_once( WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-autoloader.php' ); - require_once( WC_WALLEE_ABSPATH . 'wallee-sdk/autoload.php' ); - - require_once( WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-migration.php' ); - require_once( WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-email.php' ); - require_once( WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-return-handler.php' ); - require_once( WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-webhook-handler.php' ); - require_once( WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-unique-id.php' ); - require_once( WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-customer-document.php' ); - require_once( WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-cron.php' ); - require_once( WC_WALLEE_ABSPATH . 'includes/packages/coupon/class-wc-wallee-packages-coupon-discount.php' ); + require_once WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-autoloader.php'; + require_once WC_WALLEE_ABSPATH . 'wallee-sdk/autoload.php'; + + require_once WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-migration.php'; + require_once WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-email.php'; + require_once WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-return-handler.php'; + require_once WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-webhook-handler.php'; + require_once WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-unique-id.php'; + require_once WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-customer-document.php'; + require_once WC_WALLEE_ABSPATH . 'includes/class-wc-wallee-cron.php'; + require_once WC_WALLEE_ABSPATH . 'includes/packages/coupon/class-wc-wallee-packages-coupon-discount.php'; if ( is_admin() ) { - require_once( WC_WALLEE_ABSPATH . 'includes/admin/class-wc-wallee-admin.php' ); + require_once WC_WALLEE_ABSPATH . 'includes/admin/class-wc-wallee-admin.php'; } } @@ -136,6 +136,35 @@ protected function includes() { * @return void */ protected function init_hooks() { + register_activation_hook( + __FILE__, + array( + 'WooCommerce_Wallee', + 'migrate_plugin_data_on_activation' + ) + ); + + register_activation_hook( + __FILE__, + array( + $this, + 'plugin_activate', + ) + ); + register_deactivation_hook( + __FILE__, + array( + $this, + 'plugin_deactivate', + ) + ); + register_uninstall_hook( + __FILE__, + array( + 'WooCommerce_Wallee', + 'plugin_uninstall', + ) + ); register_activation_hook( __FILE__, array( @@ -158,13 +187,16 @@ protected function init_hooks() { ) ); - /*add_action( - 'woocommerce_thankyou', + // Hook to run migration after plugin update. + add_action( + 'upgrader_process_complete', array( $this, - 'secure_redirect_order_confirmed', - ) - );*/ + 'migrate_plugin_data_after_update', + ), + 10, + 2 + ); add_action( 'plugins_loaded', @@ -213,67 +245,243 @@ protected function init_hooks() { ); // Endpoints needed for supporting Woocommerce Blocks checkout block. - add_action( - 'wp_ajax_is_payment_method_available', - ['WC_Wallee_Blocks_Support', 'is_payment_method_available'] - ); - add_action( - 'wp_ajax_nopriv_is_payment_method_available', - ['WC_Wallee_Blocks_Support', 'is_payment_method_available'] - ); - add_action( - 'wp_ajax_get_payment_methods', - ['WC_Wallee_Blocks_Support', 'get_payment_methods'] - ); - add_action( - 'wp_ajax_nopriv_get_payment_methods', - ['WC_Wallee_Blocks_Support', 'get_payment_methods'] - ); + add_action( + 'wp_ajax_is_payment_method_available', + array( + 'WC_Wallee_Blocks_Support', + 'is_payment_method_available', + ) + ); + add_action( + 'wp_ajax_nopriv_is_payment_method_available', + array( + 'WC_Wallee_Blocks_Support', + 'is_payment_method_available', + ) + ); + add_action( + 'wp_ajax_get_payment_methods', + array( + 'WC_Wallee_Blocks_Support', + 'get_payment_methods', + ) + ); + add_action( + 'wp_ajax_nopriv_get_payment_methods', + array( + 'WC_Wallee_Blocks_Support', + 'get_payment_methods', + ) + ); add_action( 'woocommerce_blocks_enqueue_checkout_block_scripts_after', - ['WC_Wallee_Blocks_Support', 'enqueue_portal_scripts'] + array( + 'WC_Wallee_Blocks_Support', + 'enqueue_portal_scripts', + ) ); - add_action( 'woocommerce_rest_checkout_process_payment_with_context', - ['WC_Wallee_Blocks_Support', 'process_payment'], 10, 2); + add_action( + 'woocommerce_rest_checkout_process_payment_with_context', + array( + 'WC_Wallee_Blocks_Support', + 'process_payment', + ), + 10, + 2 + ); + + // Clear the permalinks after the post type has been registered. } + /** + * Activation hook. + * Fired when the plugin is activated. + */ + public static function plugin_activate() { + // Clear the permalinks after the post type has been registered. + flush_rewrite_rules(); + } /** - * Secirity check in the thank you page. + * Deactivation hook. + * Fired when the plugin is deactivated. + */ + public static function plugin_deactivate() { + // Get the plugin version. + $old_plugin_prefix = WC_Wallee_Migration::WALLEE_DEPRECATED_PLUGIN_PREFIX; + $plugin_current_version = self::get_installed_plugin_version( $old_plugin_prefix . 'wallee' ); // The slug of the old plugin. + + // Check if the plugin version is lower than 3.1.0. + if ( version_compare( $plugin_current_version, self::WALLEE_UPGRADE_VERSION, '<' ) ) { + // Start output buffering to prevent "headers already sent" errors. + ob_start(); + } + + // Hook to run migration after plugin update. + add_action( + 'upgrader_process_complete', + array( + 'WooCommerce_Wallee', + 'migrate_plugin_data_after_update', + ), + 10, + 2 + ); + + // Clear the permalinks to remove our post type's rules from the database. + flush_rewrite_rules(); + } + + /** + * Uninstall hook. + * Fired when the plugin is uninstalled. + */ + public static function plugin_uninstall() { + // code to run on plugin uninstall. + // delete the registered options. + } + + /** + * Function to get the installed version of a plugin. + * + * @param string $plugin_slug The slug of the plugin. + * @return string|null The version of the plugin or null if not found. + */ + public static function get_installed_plugin_version( $plugin_slug ) { + if (!function_exists( 'get_plugins' ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + } + + $all_plugins = get_plugins(); + foreach ( $all_plugins as $plugin_path => $plugin_info ) { + if ( strpos( $plugin_path, $plugin_slug ) !== false ) { + return $plugin_info[ 'Version' ]; + } + } + + return null; + } + + /** + * Security check in the thank you page. * * Note: If for some reason order status is still pending, it will redirect you to the payment form. * + * @param int $order_id Order id. */ - - public function secure_redirect_order_confirmed($order_id) { + public function secure_redirect_order_confirmed( $order_id ) { $order = wc_get_order( $order_id ); $wc_service_transaction = WC_Wallee_Service_Transaction::instance(); - $sdk_service_transaction = new \Wallee\Sdk\Service\TransactionService(WC_Wallee_Helper::instance()->get_api_client()); - $wc_transaction_info = WC_Wallee_Entity_Transaction_Info::load_by_order_id($order_id); - - if (property_exists($wc_transaction_info,'get_transaction_id')) { - $state = $sdk_service_transaction->read(get_option(self::CK_SPACE_ID), $wc_transaction_info->get_transaction_id())->getState(); - if ($state == \Wallee\Sdk\Model\TransactionState::CONFIRMED) { - wp_redirect($wc_service_transaction->get_payment_page_url(get_option(self::CK_SPACE_ID), $wc_transaction_info->get_transaction_id())); - exit; - } + $sdk_service_transaction = new \Wallee\Sdk\Service\TransactionService( WC_Wallee_Helper::instance()->get_api_client() ); + $wc_transaction_info = WC_Wallee_Entity_Transaction_Info::load_by_order_id( $order_id ); + + if ( property_exists( $wc_transaction_info, 'get_transaction_id' ) ) { + $state = $sdk_service_transaction->read( get_option( self::WALLEE_CK_SPACE_ID ), $wc_transaction_info->get_transaction_id() )->getState(); + if ( \Wallee\Sdk\Model\TransactionState::CONFIRMED === $state ) { + wp_redirect($wc_service_transaction->get_payment_page_url(get_option(self::WALLEE_CK_SPACE_ID), $wc_transaction_info->get_transaction_id())); //phpcs:ignore + exit; + } + } + } + + /** + * Migrates settings from the old plugin version to the new version 4.0.0. + * + * This function checks if the settings from the old plugin version exist. + * If they do, it transfers these settings to the new plugin's options + * and deletes the old settings from the database. + * + * This ensures that users retain their configurations when updating + * from the old plugin version to the new version. + * + * @return void + */ + public static function migrate_plugin_data_on_activation() { + $old_option_prefix = WC_Wallee_Migration::WALLEE_DEPRECATED_TABLE_PREFIX; + $old_plugin_prefix = WC_Wallee_Migration::WALLEE_DEPRECATED_PLUGIN_PREFIX; + + $plugin_slug = $old_plugin_prefix . 'wallee'; // The slug of the old plugin. + $installed_version = self::get_installed_plugin_version( $plugin_slug ); + + /** + * Check if the installed version is 3.1.1 or higher. + * If the version is 3.1.1 or higher, do not run the migration. + */ + if ( version_compare( $installed_version, self::WALLEE_UPGRADE_VERSION, '>=' ) ) { + return; + } + + global $wpdb; + $options_to_migrate = [ + $old_option_prefix . WC_Wallee_Migration::WALLEE_CK_DB_VERSION, + $old_option_prefix . WC_Wallee_Service_Manual_Task::WALLEE_CONFIG_KEY, + $old_option_prefix . self::WALLEE_CK_SPACE_ID, + $old_option_prefix . self::WALLEE_CK_SPACE_VIEW_ID, + $old_option_prefix . self::WALLEE_CK_APP_USER_ID, + $old_option_prefix . self::WALLEE_CK_APP_USER_KEY, + $old_option_prefix . self::WALLEE_CK_CUSTOMER_INVOICE, + $old_option_prefix . self::WALLEE_CK_CUSTOMER_PACKING, + $old_option_prefix . self::WALLEE_CK_SHOP_EMAIL, + $old_option_prefix . self::WALLEE_CK_INTEGRATION, + $old_option_prefix . self::WALLEE_CK_ORDER_REFERENCE, + $old_option_prefix . self::WALLEE_CK_ENFORCE_CONSISTENCY, + $old_option_prefix . self::WC_MAXIMUM_VERSION, + ]; + + // If the old plugin options exist, perform the migration + foreach ( $options_to_migrate as $option_name ) { + $option_value = get_option( $option_name ); + if ( $option_value !== false ) { + // Rename the options to the new prefix 'wallee_'. + $new_option_name = str_replace( $old_option_prefix . 'wallee_', 'wallee_', $option_name ); + if ( get_option( $new_option_name ) !== false ) { + // Update the option if it already exists. + update_option( $new_option_name, $option_value ); + } else { + // Add the option if it doesn't exist. + add_option( $new_option_name, $option_value ); + } + // Delete the old option. + //delete_option( $option_name );. + } + } + } + + /** + * Function to migrate plugin data after update + * This function is triggered after the plugin is updated + * + * @param object $upgrader_object The upgrader object. + * @param array $options The options array. + */ + public static function migrate_plugin_data_after_update( $upgrader_object, $options ) { + // Check if the plugin was just updated. + if ( $options['action'] == 'update' && $options['type'] == 'plugin' ) { + $plugin_basename = plugin_basename( __FILE__ ); + foreach ( $options['plugins'] as $plugin ) { + if ( $plugin == $plugin_basename ) { + self::migrate_plugin_data_on_activation(); + break; + } + } } } + /** * Load Localization files. * * Note: the first-loaded translation file overrides any following ones if the same translation is present. * * Locales found in: - * - WP_LANG_DIR/woo-wallee/woo-wallee-LOCALE.mo + * - WP_LANG_DIR/woo-wallee/woo-wallee-LOCALE.mo */ public function load_plugin_textdomain() { $locale = is_admin() && function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale(); $locale = apply_filters( 'plugin_locale', $locale, 'woo-wallee' ); load_textdomain( 'woo-wallee', WP_LANG_DIR . '/woo-wallee/woo-wallee' . $locale . '.mo' ); - load_plugin_textdomain( 'woo-wallee', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' ); + load_plugin_textdomain( 'woo-wallee', false, plugin_basename( __DIR__ ) . '/languages' ); } /** @@ -470,13 +678,14 @@ public function loaded() { 2 ); - - add_action( 'before_woocommerce_init', function() { - if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { - \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); + add_action( + 'before_woocommerce_init', + function () { + if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { + \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); + } } - } ); - + ); } /** @@ -524,7 +733,7 @@ public function register_order_statuses() { 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, /* translators: %s: replaces string */ - 'label_count' => _n_noop( 'wallee Processing (%s)', 'wallee Processing (%s)' ), + 'label_count' => _n_noop( 'wallee Processing (%s)', 'wallee Processing (%s)', 'woo-wallee' ), ) ); register_post_status( @@ -536,7 +745,7 @@ public function register_order_statuses() { 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, /* translators: %s: replaces string */ - 'label_count' => _n_noop( 'Waiting (%s)', 'Waiting (%s)' ), + 'label_count' => _n_noop( 'Waiting (%s)', 'Waiting (%s)', 'woo-wallee' ), ) ); register_post_status( @@ -548,7 +757,7 @@ public function register_order_statuses() { 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, /* translators: %s: replaces string */ - 'label_count' => _n_noop( 'Manual Decision (%s)', 'Manual Decision (%s)' ), + 'label_count' => _n_noop( 'Manual Decision (%s)', 'Manual Decision (%s)', 'woo-wallee' ), ) ); } @@ -574,7 +783,7 @@ public function add_order_statuses( $order_statuses ) { * @param mixed $order order. * @return mixed */ - public function valid_order_statuses_for_payment( $statuses, $order = null ) { + public function valid_order_statuses_for_payment( $statuses, $order = null ) { //phpcs:ignore $statuses[] = 'wallee-redirected'; return $statuses; @@ -601,10 +810,10 @@ public function set_device_id_cookie() { * @param mixed $src src. * @return array|mixed|string|string[] */ - public function set_js_async( $tag, $handle, $src ) { + public function set_js_async( $tag, $handle, $src ) { //phpcs:ignore $async_script_handles = array( 'wallee-device-id-js' ); foreach ( $async_script_handles as $async_handle ) { - if ( $async_handle == $handle ) { + if ( $async_handle === $handle ) { return str_replace( ' src', ' async="async" src', $tag ); } } @@ -620,7 +829,7 @@ public function set_js_async( $tag, $handle, $src ) { public function enqueue_javascript_script() { if ( is_cart() || is_checkout() ) { $unique_id = isset( $_COOKIE['wc_wallee_device_id'] ) ? sanitize_text_field( wp_unslash( $_COOKIE['wc_wallee_device_id'] ) ) : null; - $space_id = get_option( self::CK_SPACE_ID ); + $space_id = get_option( self::WALLEE_CK_SPACE_ID ); $script_url = WC_Wallee_Helper::instance()->get_base_gateway_url() . 's/' . $space_id . '/payment/device.js?sessionIdentifier=' . $unique_id; @@ -647,7 +856,7 @@ public function enqueue_stylesheets() { * @return false|mixed */ public function order_editable_check( $allowed, WC_Order $order = null ) { - if ( null == $order ) { + if ( is_null( $order ) ) { return $allowed; } if ( $order->get_meta( '_wallee_authorized', true ) ) { @@ -663,7 +872,7 @@ public function order_editable_check( $allowed, WC_Order $order = null ) { * @param WC_Order|null $order order. * @return mixed */ - public function valid_order_status_for_completion( $statuses, WC_Order $order = null ) { + public function valid_order_status_for_completion( $statuses, WC_Order $order = null ) { //phpcs:ignore $statuses[] = 'wallee-waiting'; $statuses[] = 'wallee-manual'; $statuses[] = 'wallee-redirected'; @@ -677,7 +886,7 @@ public function valid_order_status_for_completion( $statuses, WC_Order $order = * @param mixed $cart cart. * @return void */ - public function before_calculate_totals( $cart ) { + public function before_calculate_totals( $cart ) { //phpcs:ignore $GLOBALS['_wc_wallee_calculating'] = true; } @@ -687,7 +896,7 @@ public function before_calculate_totals( $cart ) { * @param mixed $cart cart. * @return void */ - public function after_calculate_totals( $cart ) { + public function after_calculate_totals( $cart ) { //phpcs:ignore unset( $GLOBALS['_wc_wallee_calculating'] ); } @@ -699,12 +908,12 @@ public function after_calculate_totals( $cart ) { * @return mixed */ public function add_gateways( $methods ) { - $space_id = get_option( self::CK_SPACE_ID ); + $space_id = get_option( self::WALLEE_CK_SPACE_ID ); $method_configurations = WC_Wallee_Entity_Method_Configuration::load_by_states_and_space_id( $space_id, array( - WC_Wallee_Entity_Method_Configuration::STATE_ACTIVE, - WC_Wallee_Entity_Method_Configuration::STATE_INACTIVE, + WC_Wallee_Entity_Method_Configuration::WALLEE_STATE_ACTIVE, + WC_Wallee_Entity_Method_Configuration::WALLEE_STATE_INACTIVE, ) ); try { @@ -715,7 +924,7 @@ public function add_gateways( $methods ) { } catch ( \Wallee\Sdk\ApiException $e ) { if ( $e->getCode() === 401 ) { // Ignore it because we simply are not allowed to access the API. - return $methods; + return $methods; } else { $this->log( $e->getMessage(), WC_Log_Levels::CRITICAL ); } @@ -731,26 +940,26 @@ public function add_gateways( $methods ) { * @param mixed $value calue. * @return array */ - public function modify_form_fields_args( $arguments, $key, $value = null ) { - if ( 'billing_company' == $key ) { + public function modify_form_fields_args( $arguments, $key, $value = null ) { //phpcs:ignore + if ( 'billing_company' === $key ) { $arguments['class'][] = 'address-field'; } - if ( 'billing_email' == $key ) { + if ( 'billing_email' === $key ) { $arguments['class'][] = 'address-field'; } - if ( 'billing_phone' == $key ) { + if ( 'billing_phone' === $key ) { $arguments['class'][] = 'address-field'; } - if ( 'billing_first_name' == $key ) { + if ( 'billing_first_name' === $key ) { $arguments['class'][] = 'address-field'; } - if ( 'billing_last_name' == $key ) { + if ( 'billing_last_name' === $key ) { $arguments['class'][] = 'address-field'; } - if ( 'shipping_first_name' == $key ) { + if ( 'shipping_first_name' === $key ) { $arguments['class'][] = 'address-field'; } - if ( 'shipping_last_name' == $key ) { + if ( 'shipping_last_name' === $key ) { $arguments['class'][] = 'address-field'; } @@ -779,7 +988,7 @@ public function update_additional_customer_data( $arguments ) { ) ); - if ( wc_ship_to_billing_address_only() || ! isset( $post_data['ship_to_different_address'] ) || '0' == $post_data['ship_to_different_address'] ) { + if ( wc_ship_to_billing_address_only() || ! isset( $post_data['ship_to_different_address'] ) || '0' === $post_data['ship_to_different_address'] ) { WC()->customer->set_props( array( 'shipping_first_name' => isset( $post_data['billing_first_name'] ) ? sanitize_text_field( wp_unslash( $post_data['billing_first_name'] ) ) : null, @@ -885,7 +1094,7 @@ public function register_checkout_error_msg() { * @return void */ public function show_checkout_error_msg() { - if ($this->register_checkout_error_msg()) { + if ( $this->register_checkout_error_msg() ) { wc_print_notices(); } } @@ -893,8 +1102,8 @@ public function show_checkout_error_msg() { /** * Define constant if not already set. * - * @param string $name name. - * @param string|bool $value value. + * @param string $name name. + * @param string|bool $value value. */ protected function define( $name, $value ) { if ( ! defined( $name ) ) { @@ -910,7 +1119,7 @@ protected function define( $name, $value ) { * @return void */ public function log( $message, $level = WC_Log_Levels::WARNING ) { - if ( null == $this->logger ) { + if ( is_null( $this->logger ) ) { $this->logger = new WC_Logger(); } @@ -923,7 +1132,7 @@ public function log( $message, $level = WC_Log_Levels::WARNING ) { ); if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { - error_log( 'Woocommerce Wallee: ' . $message ); + error_log( 'Woocommerce Wallee: ' . $message ); //phpcs:ignore } } @@ -942,7 +1151,8 @@ public function add_notice( $message, $type = 'notice' ) { 'notice', 'error', 'success', - ) + ), + true ) ? $type : 'notice'; wc_add_notice( $message, $type ); } @@ -990,9 +1200,9 @@ protected function update_attribute_options( $attribute_id, $send ) { * @throws Exception Exception. * * @see woocommerce_rest_insert_product_attribute - * Edit through REST API is handled in woocommerce_rest_insert_product_attribute, as we can not get the rest request object otherwise. + * Edit through REST API is handled in woocommerce_rest_insert_product_attribute, as we can not get the rest request object otherwise. */ - public function woocommerce_attribute_added( $attribute_id, $data ) { + public function woocommerce_attribute_added( $attribute_id, $data ) { //phpcs:ignore if ( did_action( 'product_page_product_attributes' ) ) { // edit through backend form, check POST data. $option_set = isset( $_POST['wallee_attribute_option_send'] ); @@ -1011,7 +1221,7 @@ public function woocommerce_attribute_added( $attribute_id, $data ) { * @return void * @throws Exception Exception. */ - public function woocommerce_attribute_updated( $attribute_id, $data, $old_slug ) { + public function woocommerce_attribute_updated( $attribute_id, $data, $old_slug ) { //phpcs:ignore $this->woocommerce_attribute_added( $attribute_id, $data ); } @@ -1023,7 +1233,7 @@ public function woocommerce_attribute_updated( $attribute_id, $data, $old_slug ) * @param mixed $taxonomy_name taxonomy name. * @return void */ - public function woocommerce_attribute_deleted( $attribute_id, $name, $taxonomy_name ) { + public function woocommerce_attribute_deleted( $attribute_id, $name, $taxonomy_name ) { //phpcs:ignore $attribute_options = WC_Wallee_Entity_Attribute_Options::load_by_attribute_id( $attribute_id ); $attribute_options->delete(); } @@ -1037,7 +1247,7 @@ public function woocommerce_attribute_deleted( $attribute_id, $name, $taxonomy_n * @return void * @throws Exception Exception. */ - public function woocommerce_rest_insert_product_attribute( $attribute, $request, $create ) { + public function woocommerce_rest_insert_product_attribute( $attribute, $request, $create ) { //phpcs:ignore if ( isset( $request['wallee_attribute_option_send'] ) ) { if ( $request['wallee_attribute_option_send'] ) { $this->update_attribute_options( $attribute->attribute_id, true ); @@ -1047,39 +1257,41 @@ public function woocommerce_rest_insert_product_attribute( $attribute, $request, } } - /** - * Add cache no store. - * - * @param mixed $headers headers. - * @return mixed - */ - public function add_cache_no_store( $headers ) { - if ( is_checkout() && isset( $headers['Cache-Control'] ) && stripos( $headers['Cache-Control'], 'no-store' ) === false ) { - $headers['Cache-Control'] .= ', no-store '; - } - return $headers; - } - - - /** - * Woocommerce rest prepare product attribute. - * - * @param mixed $response response. - * @param mixed $item item. - * @param mixed $request request. - * @return mixed - */ - public function woocommerce_rest_prepare_product_attribute( $response, $item, $request ) { - - $context = ! empty( $request['context'] ) ? $request['context'] : 'view'; - if ( 'view' == $context || 'edit' == $context ) { - $data = $response->get_data(); - $attribute_options = WC_Wallee_Entity_Attribute_Options::load_by_attribute_id( $item->attribute_id ); - $data['wallee_attribute_option_send'] = $attribute_options->get_id() > 0 && $attribute_options->get_send(); - $response->set_data( $data ); - } - return $response; - } + /** + * Add cache no store. + * + * @param mixed $headers headers. + * @return mixed + */ + public function add_cache_no_store( $headers ) { + if ( class_exists( 'WooCommerce' ) ) { + if ( is_checkout() && isset( $headers['Cache-Control'] ) && stripos( $headers['Cache-Control'], 'no-store' ) === false ) { + $headers['Cache-Control'] .= ', no-store '; + } + } + return $headers; + } + + + /** + * Woocommerce rest prepare product attribute. + * + * @param mixed $response response. + * @param mixed $item item. + * @param mixed $request request. + * @return mixed + */ + public function woocommerce_rest_prepare_product_attribute( $response, $item, $request ) { + + $context = ! empty( $request['context'] ) ? $request['context'] : 'view'; + if ( 'view' === $context || 'edit' === $context ) { + $data = $response->get_data(); + $attribute_options = WC_Wallee_Entity_Attribute_Options::load_by_attribute_id( $item->attribute_id ); + $data['wallee_attribute_option_send'] = $attribute_options->get_id() > 0 && $attribute_options->get_send(); + $response->set_data( $data ); + } + return $response; + } /** * Displays error messages, if there are, when rendering the woocommerce/checkout block. @@ -1088,26 +1300,30 @@ public function woocommerce_rest_prepare_product_attribute( $response, $item, $r */ public function pre_render_block() { $args = func_get_args(); - if (count($args) && !empty($args[1]) && !empty($args[1]['blockName']) && $args[1]['blockName'] === 'woocommerce/checkout') { + if ( count( $args ) + && ! empty( $args[1] ) + && ! empty( $args[1]['blockName'] ) + && 'woocommerce/checkout' === wp_unslash( $args[1]['blockName'] ) + ) { $this->show_checkout_error_msg(); } } - } - - add_action( 'woocommerce_blocks_loaded', 'WC_Wallee_Blocks_Support' ); - - function WC_Wallee_Blocks_Support() { - if ( class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) { - require_once dirname( __FILE__ ) . '/includes/class-wc-wallee-blocks-support.php'; - - add_action( - 'woocommerce_blocks_payment_method_type_registration', - function( Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry ) { - $payment_method_registry->register( new WC_Wallee_Blocks_Support ); - }, - ); - } - } + } + + add_action( 'woocommerce_blocks_loaded', 'WC_Wallee_Blocks_Support' ); + + function WC_Wallee_Blocks_Support() { //phpcs:ignore + if ( class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) { + require_once __DIR__ . '/includes/class-wc-wallee-blocks-support.php'; + + add_action( + 'woocommerce_blocks_payment_method_type_registration', + function ( Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry ) { + $payment_method_registry->register( new WC_Wallee_Blocks_Support() ); + }, + ); + } + } } WooCommerce_Wallee::instance();