Changeset 3381700
- Timestamp:
- 10/21/2025 08:12:16 AM (5 months ago)
- Location:
- mlm-soft-integration/trunk
- Files:
-
- 4 added
- 9 edited
-
CHANGELOG.md (modified) (1 diff)
-
admin/models/MLMSoftWooBlockSupportForm.php (modified) (1 diff)
-
integrations/woocommerce/assets/eWalletBlock/mlmsoft-ewallet-block.min.css (modified) (1 diff)
-
integrations/woocommerce/assets/eWalletBlock/mlmsoft-ewallet-block.min.js (modified) (3 diffs)
-
integrations/woocommerce/modules/WCAccountModule.php (modified) (4 diffs)
-
integrations/woocommerce/paymentGateways/eWallet/MLMSoftEWalletGateway.php (modified) (3 diffs)
-
integrations/woocommerce/paymentGateways/eWallet/models/EWalletCartHelper.php (modified) (3 diffs)
-
integrations/woocommerce/paymentGateways/eWalletBlock/MLMSoftEWalletBlockGateway.php (modified) (4 diffs)
-
integrations/woocommerce/paymentGateways/eWalletBlock/models (added)
-
integrations/woocommerce/paymentGateways/eWalletBlock/models/EWalletBlockCartHelper.php (added)
-
integrations/woocommerce/paymentGateways/eWalletBlock/modules (added)
-
integrations/woocommerce/paymentGateways/eWalletBlock/modules/EWalletBlockCartModule.php (added)
-
mlm-soft-integration.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mlm-soft-integration/trunk/CHANGELOG.md
r3380390 r3381700 2 2 3 3 ## Changelog ## 4 5 ## 2025-10-21 - version 3.13.0 6 * Using `has_block_in_checkout` function in `shippingMethodsUpdated` method. [EWalletBlockCartModule.php] 7 * Using `admin_notices` action instead of `wc_add_notice` function. [WCAccountModule.php] 8 * Added own `userProfileUpdate` callback function to `edit_user_profile_update` action. [WCAccountModule.php] 9 * Added a second attempt to save account data if an "Error while editing profile field" occurs. [WCAccountModule.php] 10 11 ## 2025-10-20 - version 3.12.0 12 * Added `EWalletBlockCartHelper`, `EWalletBlockCartModule` classes. 13 * Updated `MLMSoftEWalletBlockGateway` class. [MLMSoftEWalletBlockGateway.php] 14 * Updated assets for `MLMSoftEWalletBlockGateway` class. 15 * Updated `MLMSoftEWalletGateway` class. [MLMSoftEWalletGateway.php] 16 * Updated `EWalletCartHelper` class. [EWalletCartHelper.php] 4 17 5 18 ## 2025-10-17 - version 3.11.0 -
mlm-soft-integration/trunk/admin/models/MLMSoftWooBlockSupportForm.php
r3257446 r3381700 72 72 } 73 73 74 /** 75 if ( isset($enabledFormFields[self::ONLINE_OFFICE_AUTH_SECRET_KEY_ID]) ) { 76 MLMSoftOptions::getInstance()->__set( 77 'onlineOfficeAuthSecretKey', 78 $enabledFormFields[self::ONLINE_OFFICE_AUTH_SECRET_KEY_ID] 79 ); 80 } 81 // */ 74 //** 75 // if ( isset($enabledFormFields[self::ONLINE_OFFICE_AUTH_SECRET_KEY_ID]) ) { 76 // MLMSoftOptions::getInstance()->__set( 77 // 'onlineOfficeAuthSecretKey', 78 // $enabledFormFields[self::ONLINE_OFFICE_AUTH_SECRET_KEY_ID] 79 // ); 80 // } 82 81 83 82 if ( isset($enabledFormFields[self::WOO_CHECKOUT_BLOCK_SUPPORT_ENABLED]) ) { -
mlm-soft-integration/trunk/integrations/woocommerce/assets/eWalletBlock/mlmsoft-ewallet-block.min.css
r3257446 r3381700 1 .w c-block-components-totals-wrapper .wc-block-components-totals-item__description{display:block}.ewallet-payment-app__wrapper .no-ewallets-available{font-size:20px;margin-bottom:10px}.hidden{display:none}.ewallet-payment-app__wrapper .ewallet__alert{background-color:#ff6200;color:#000;font-size:1.2rem}.ewallet-payment-app__wrapper .ewallet__alert p{padding:10px 0 10px 10px}.ewallet-payment-app__wrapper .ewallet-item{background-color:#fff;color:#000;font-size:1.4rem;padding:12px 20px 2px;margin-bottom:4px;cursor:pointer;border:1px solid rgb(119,119,119);border-radius:4px}.ewallet-payment-app__wrapper .ewallet-item.selected{background-color:#b9f6ca;border-color:#b9f6ca}.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__header,.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__content{margin-bottom:8px}.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__content.balance-title{margin-bottom:0}.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__content.balance{font-size:38px}.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__content.align-right{text-align:right}.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__header_wrapper{display:flex;justify-content:space-between}.field__payment-amount-input{padding:0 8px 8px}.field__payment-amount-input .ewallet-form__payment-amount-input{color:#000;height:54px;font-size:1.2rem}.field__payment-amount-input .ewallet-form__payment-amount-input.error{color:red}.field__payment-amount-input .ewallet-form__payment-amount-input::placeholder{color:#aeaeae}.ewallet-form__payment-amount-input-footer .warning{color:#ff5252}.ewallet-form__actions{display:flex;gap:10px;padding:8px}.ewallet-form__actions .ewallet-form__payment-button{min-width:100px;background-color:#1976d2;border-color:#1976d2;color:#fff}.ewallet-form__actions .ewallet-form__payment-button.disabled{background-color:#0000001f;color:#746e6e;cursor:default}@keyframes skeleton-frames1{0%{background-color:#8a9398}to{background-color:#dcdee0}}@keyframes skeleton-frames2{0%{background-color:#8a9398}to{background-color:#f8f8f8}}.skeleton-loading{animation:skeleton-frames2 1s linear infinite alternate;width:100%;height:5rem;margin-bottom:.5rem;border-radius:.25rem}.skeleton-payment-process{animation:skeleton-frames11s linear infinite alternate;width:80%;border-radius:.25rem}.ewallet-payment-app__wrapper .ewallet-info{margin-top:10px;margin-bottom:10px}1 .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-order-summary-coupon-form-block{display:none}.wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-discount__coupon-list{float:right}.wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-discount__coupon-list .wc-block-components-totals-discount__coupon-list-item.is-removable{padding-left:5px}.wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-discount__coupon-list .wc-block-components-totals-discount__coupon-list-item.is-removable .wc-block-components-chip__text{display:none}.ewallet-payment-app__wrapper .no-ewallets-available{font-size:20px;margin-bottom:10px}.hidden{display:none}.ewallet-payment-app__wrapper .ewallet__alert{background-color:#ff6200;color:#000;font-size:1.2rem}.ewallet-payment-app__wrapper .ewallet__alert p{padding:10px 0 10px 10px}.ewallet-payment-app__wrapper .ewallet-item{background-color:#fff;color:#000;font-size:1.4rem;padding:12px 20px 2px;margin-bottom:4px;cursor:pointer;border:1px solid rgb(119,119,119);border-radius:4px}.ewallet-payment-app__wrapper .ewallet-item.selected{background-color:#b9f6ca;border-color:#b9f6ca}.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__header,.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__content{margin-bottom:8px}.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__content.balance-title{margin-bottom:0}.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__content.balance{font-size:38px}.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__content.align-right{text-align:right}.ewallet-payment-app__wrapper .ewallet-item .ewallet-item__header_wrapper{display:flex;justify-content:space-between}.field__payment-amount-input{padding:0 8px 8px}.field__payment-amount-input .ewallet-form__payment-amount-input{color:#000;height:54px;font-size:1.2rem}.field__payment-amount-input .ewallet-form__payment-amount-input.error{color:red}.field__payment-amount-input .ewallet-form__payment-amount-input::placeholder{color:#aeaeae}.ewallet-form__payment-amount-input-footer .warning{color:#ff5252}.ewallet-form__actions{display:flex;gap:10px;padding:8px}.ewallet-form__actions .ewallet-form__payment-button{min-width:100px;background-color:#1976d2;border-color:#1976d2;color:#fff}.ewallet-form__actions .ewallet-form__payment-button.disabled{background-color:#0000001f;color:#746e6e;cursor:default}@keyframes skeleton-frames{0%{background-color:#dfdfdf}to{background-color:#f8f8f8}}@keyframes skeleton-frames-loading{0%{background-color:#dfdfdf}to{background-color:#f8f8f8}}.skeleton-loading{animation:skeleton-frames-loading 1s linear infinite alternate;width:100%;height:5rem;margin-bottom:.5rem;border-radius:.25rem}.skeleton-payment-process{animation:skeleton-frames 1s linear infinite alternate;width:80%;border-radius:.25rem}.ewallet-payment-app__wrapper .ewallet-info{margin-top:10px;margin-bottom:10px} -
mlm-soft-integration/trunk/integrations/woocommerce/assets/eWalletBlock/mlmsoft-ewallet-block.min.js
r3257446 r3381700 1 (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var mt={exports:{}}, ue={},ht={exports:{}},E={};/**1 (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var mt={exports:{}},de={},ht={exports:{}},E={};/** 2 2 * @license React 3 3 * react.production.min.js … … 7 7 * This source code is licensed under the MIT license found in the 8 8 * LICENSE file in the root directory of this source tree. 9 */var X=Symbol.for("react.element"), Qt=Symbol.for("react.portal"),Zt=Symbol.for("react.fragment"),en=Symbol.for("react.strict_mode"),tn=Symbol.for("react.profiler"),nn=Symbol.for("react.provider"),rn=Symbol.for("react.context"),sn=Symbol.for("react.forward_ref"),on=Symbol.for("react.suspense"),an=Symbol.for("react.memo"),cn=Symbol.for("react.lazy"),ze=Symbol.iterator;function ln(e){return e===null||typeof e!="object"?null:(e=ze&&e[ze]||e["@@iterator"],typeof e=="function"?e:null)}var yt={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wt=Object.assign,gt={};function H(e,t,n){this.props=e,this.context=t,this.refs=gt,this.updater=n||yt}H.prototype.isReactComponent={};H.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};H.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Et(){}Et.prototype=H.prototype;function Be(e,t,n){this.props=e,this.context=t,this.refs=gt,this.updater=n||yt}var Fe=Be.prototype=new Et;Fe.constructor=Be;wt(Fe,H.prototype);Fe.isPureReactComponent=!0;var Ve=Array.isArray,St=Object.prototype.hasOwnProperty,Ue={current:null},bt={key:!0,ref:!0,__self:!0,__source:!0};function Rt(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)St.call(t,r)&&!bt.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var u=Array(a),l=0;l<a;l++)u[l]=arguments[l+2];s.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:X,type:e,key:o,ref:i,props:s,_owner:Ue.current}}function un(e,t){return{$$typeof:X,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Me(e){return typeof e=="object"&&e!==null&&e.$$typeof===X}function fn(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Je=/\/+/g;function Se(e,t){return typeof e=="object"&&e!==null&&e.key!=null?fn(""+e.key):t.toString(36)}function ne(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case X:case Qt:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+Se(i,0):r,Ve(s)?(n="",e!=null&&(n=e.replace(Je,"$&/")+"/"),ne(s,t,n,"",function(l){return l})):s!=null&&(Me(s)&&(s=un(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Je,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",Ve(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+Se(o,a);i+=ne(o,t,n,u,s)}else if(u=ln(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+Se(o,a++),i+=ne(o,t,n,u,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ee(e,t,n){if(e==null)return e;var r=[],s=0;return ne(e,r,"","",function(o){return t.call(n,o,s++)}),r}function dn(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var L={current:null},re={transition:null},pn={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:re,ReactCurrentOwner:Ue};function _t(){throw Error("act(...) is not supported in production builds of React.")}E.Children={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(e,function(t){return t})||[]},only:function(e){if(!Me(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};E.Component=H;E.Fragment=Zt;E.Profiler=tn;E.PureComponent=Be;E.StrictMode=en;E.Suspense=on;E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pn;E.act=_t;E.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=wt({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Ue.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)St.call(t,u)&&!bt.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var l=0;l<u;l++)a[l]=arguments[l+2];r.children=a}return{$$typeof:X,type:e.type,key:s,ref:o,props:r,_owner:i}};E.createContext=function(e){return e={$$typeof:rn,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:nn,_context:e},e.Consumer=e};E.createElement=Rt;E.createFactory=function(e){var t=Rt.bind(null,e);return t.type=e,t};E.createRef=function(){return{current:null}};E.forwardRef=function(e){return{$$typeof:sn,render:e}};E.isValidElement=Me;E.lazy=function(e){return{$$typeof:cn,_payload:{_status:-1,_result:e},_init:dn}};E.memo=function(e,t){return{$$typeof:an,type:e,compare:t===void 0?null:t}};E.startTransition=function(e){var t=re.transition;re.transition={};try{e()}finally{re.transition=t}};E.unstable_act=_t;E.useCallback=function(e,t){return L.current.useCallback(e,t)};E.useContext=function(e){return L.current.useContext(e)};E.useDebugValue=function(){};E.useDeferredValue=function(e){return L.current.useDeferredValue(e)};E.useEffect=function(e,t){return L.current.useEffect(e,t)};E.useId=function(){return L.current.useId()};E.useImperativeHandle=function(e,t,n){return L.current.useImperativeHandle(e,t,n)};E.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)};E.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)};E.useMemo=function(e,t){return L.current.useMemo(e,t)};E.useReducer=function(e,t,n){return L.current.useReducer(e,t,n)};E.useRef=function(e){return L.current.useRef(e)};E.useState=function(e){return L.current.useState(e)};E.useSyncExternalStore=function(e,t,n){return L.current.useSyncExternalStore(e,t,n)};E.useTransition=function(){return L.current.useTransition()};E.version="18.3.1";ht.exports=E;var mn=ht.exports;/**9 */var X=Symbol.for("react.element"),en=Symbol.for("react.portal"),tn=Symbol.for("react.fragment"),nn=Symbol.for("react.strict_mode"),rn=Symbol.for("react.profiler"),sn=Symbol.for("react.provider"),on=Symbol.for("react.context"),an=Symbol.for("react.forward_ref"),ln=Symbol.for("react.suspense"),cn=Symbol.for("react.memo"),un=Symbol.for("react.lazy"),Ve=Symbol.iterator;function fn(e){return e===null||typeof e!="object"?null:(e=Ve&&e[Ve]||e["@@iterator"],typeof e=="function"?e:null)}var yt={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wt=Object.assign,gt={};function H(e,t,n){this.props=e,this.context=t,this.refs=gt,this.updater=n||yt}H.prototype.isReactComponent={};H.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};H.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Et(){}Et.prototype=H.prototype;function Ue(e,t,n){this.props=e,this.context=t,this.refs=gt,this.updater=n||yt}var Me=Ue.prototype=new Et;Me.constructor=Ue;wt(Me,H.prototype);Me.isPureReactComponent=!0;var Je=Array.isArray,St=Object.prototype.hasOwnProperty,Be={current:null},bt={key:!0,ref:!0,__self:!0,__source:!0};function _t(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)St.call(t,r)&&!bt.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];s.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:X,type:e,key:o,ref:i,props:s,_owner:Be.current}}function dn(e,t){return{$$typeof:X,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===X}function pn(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ke=/\/+/g;function _e(e,t){return typeof e=="object"&&e!==null&&e.key!=null?pn(""+e.key):t.toString(36)}function se(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case X:case en:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+_e(i,0):r,Je(s)?(n="",e!=null&&(n=e.replace(Ke,"$&/")+"/"),se(s,t,n,"",function(c){return c})):s!=null&&(Ie(s)&&(s=dn(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Ke,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",Je(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+_e(o,a);i+=se(o,t,n,u,s)}else if(u=fn(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+_e(o,a++),i+=se(o,t,n,u,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ne(e,t,n){if(e==null)return e;var r=[],s=0;return se(e,r,"","",function(o){return t.call(n,o,s++)}),r}function mn(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var L={current:null},oe={transition:null},hn={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:oe,ReactCurrentOwner:Be};function Rt(){throw Error("act(...) is not supported in production builds of React.")}E.Children={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(e,function(t){return t})||[]},only:function(e){if(!Ie(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};E.Component=H;E.Fragment=tn;E.Profiler=rn;E.PureComponent=Ue;E.StrictMode=nn;E.Suspense=ln;E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hn;E.act=Rt;E.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=wt({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Be.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)St.call(t,u)&&!bt.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var c=0;c<u;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:X,type:e.type,key:s,ref:o,props:r,_owner:i}};E.createContext=function(e){return e={$$typeof:on,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:sn,_context:e},e.Consumer=e};E.createElement=_t;E.createFactory=function(e){var t=_t.bind(null,e);return t.type=e,t};E.createRef=function(){return{current:null}};E.forwardRef=function(e){return{$$typeof:an,render:e}};E.isValidElement=Ie;E.lazy=function(e){return{$$typeof:un,_payload:{_status:-1,_result:e},_init:mn}};E.memo=function(e,t){return{$$typeof:cn,type:e,compare:t===void 0?null:t}};E.startTransition=function(e){var t=oe.transition;oe.transition={};try{e()}finally{oe.transition=t}};E.unstable_act=Rt;E.useCallback=function(e,t){return L.current.useCallback(e,t)};E.useContext=function(e){return L.current.useContext(e)};E.useDebugValue=function(){};E.useDeferredValue=function(e){return L.current.useDeferredValue(e)};E.useEffect=function(e,t){return L.current.useEffect(e,t)};E.useId=function(){return L.current.useId()};E.useImperativeHandle=function(e,t,n){return L.current.useImperativeHandle(e,t,n)};E.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)};E.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)};E.useMemo=function(e,t){return L.current.useMemo(e,t)};E.useReducer=function(e,t,n){return L.current.useReducer(e,t,n)};E.useRef=function(e){return L.current.useRef(e)};E.useState=function(e){return L.current.useState(e)};E.useSyncExternalStore=function(e,t,n){return L.current.useSyncExternalStore(e,t,n)};E.useTransition=function(){return L.current.useTransition()};E.version="18.3.1";ht.exports=E;var yn=ht.exports;/** 10 10 * @license React 11 11 * react-jsx-runtime.production.min.js … … 15 15 * This source code is licensed under the MIT license found in the 16 16 * LICENSE file in the root directory of this source tree. 17 */var hn=mn,yn=Symbol.for("react.element"),wn=Symbol.for("react.fragment"),gn=Object.prototype.hasOwnProperty,En=hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Sn={key:!0,ref:!0,__self:!0,__source:!0};function xt(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)gn.call(t,r)&&!Sn.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:yn,type:e,key:o,ref:i,props:s,_owner:En.current}}ue.Fragment=wn;ue.jsx=xt;ue.jsxs=xt;mt.exports=ue;var w=mt.exports;const h=window,bn=e=>{const{className:t,children:n,...r}=e;let s="ewallet-alert "+(t??"");return w.jsx("div",{className:s,...r,children:n})},Rn=e=>{const{className:t,children:n,...r}=e;let s=""+(t??"");return w.jsx("div",{className:s,...r,children:n})},_n=e=>{const{caption:t,classes:n}=e;return w.jsx("h5",{className:n,onClick:()=>{},children:t})},se={__(e){const t=Object.entries(h.MLMSoftEWalletBlock.i18n);let n;return t.filter(r=>{r[0]===e&&(n=r[1])}),typeof n>"u"?e:n+""},log(e){},parseBool(e){return!new RegExp("/^(false|0)$/i").test(e)&&!!e},isUserLoggedIn(){return xn(h.MLMSoftEWalletBlock.userLoggedIn)},isLocal(){return location.origin==="http://www.dev-mlm-pro.com"},isDev(){return location.origin==="https://dev.newave.ru"},isStaging(){return location.origin==="https://stage.newave.ru"},isProd(){return fe()||Ie()?!1:!se.isLocal()},fcUpperCase(e){return e.length===0?e:e.length===1?e.toUpperCase():e[0].toUpperCase()+e.slice(1)},getExitFromAppUrl(){var e="";return se.isDev()?e="#":se.isStaging()?e="https://stage.newave.ru/wp-admin":e=h.location.origin,e},getAppDefaultLanguage(){},formattedNumber(e){const{num:t,thousandSeparator:n=" "}=e;return t===""?"":n===""?t.toString():t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,n)},getAppStoreKey(){return h.MLMSoftEWalletBlock.appStoreKey},async hashHmac(e,t){let n=new TextEncoder,r=await h.crypto.subtle.importKey("raw",n.encode(t),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),s=await h.crypto.subtle.sign("HMAC",r,n.encode(e)),o=new Uint8Array(s);return Array.prototype.map.call(o,i=>i.toString(16).padStart(2,"0")).join("")},getAmountStr(e){const{amount:t,decimals:n=2}=e;let r=parseFloat("1"+"0".repeat(n)),s=(t/r).toString();return s.indexOf(h.MLMSoftEWalletBlock.decimalSeparator)===-1&&(s=s+h.MLMSoftEWalletBlock.decimalSeparator+"0".repeat(n)),s}},{__:B,log:Ks,parseBool:xn,isUserLoggedIn:Ke,getAppDefaultLanguage:Gs,fcUpperCase:Ys,getExitFromAppUrl:Xs,isLocal:Pe,isDev:fe,isProd:At,isStaging:Ie,formattedNumber:ve,getAppStoreKey:de,hashHmac:Tt,getAmountStr:An}=se;var G=(e=>(e.EWALLET="EWALLET",e.PAYMENT_AMOUNT="PAYMENT_AMOUNT",e.PAYMENT_STATUS="PAYMENT_STATUS",e))(G||{});const Tn=h.wp.data.createReduxStore,On=h.wp.data.register,Pn=h.MLMSoftEWalletBlock.decimalSeparator??".",Nn=h.MLMSoftEWalletBlock.extraDecimalSeparator??",",Cn={log:[],eWalletId:0,paymentInfo:{success:!1,error:null,data:null},paymentAmount:"",paymentStatus:!1},Ln={dispatchPaymentStatus(e){return{type:"SET_PAYMENT_STATUS",paymentStatus:e}},dispatchPaymentAmount(e){return{type:"SET_PAYMENT_AMOUNT",paymentAmount:e}},dispatchPaymentInfo(e){return{type:"SET_PAYMENT_INFO",paymentInfo:e}},dispatchEWalletId(e){return{type:"SET_EWALLET_ID",id:e}},dispatchLog(e){return{type:"ADD_TO_LOG",item:e}},removeFromLog(e){return{type:"REMOVE_FROM_LOG",itemId:e}}},jn=(e=Cn,t)=>{switch(t.type){case"SET_PAYMENT_STATUS":return{...e,paymentStatus:t.paymentStatus};case"SET_PAYMENT_AMOUNT":let n=t.paymentAmount,r=0;return typeof n=="number"&&n>=0?r=n*100:n.length>0&&(n=n.replace(Nn,Pn),r=parseFloat(n)*100),{...e,paymentAmount:r};case"SET_PAYMENT_INFO":return{...e,paymentInfo:t.paymentInfo};case"SET_EWALLET_ID":return{...e,eWalletId:t.id};case"ADD_TO_LOG":e.log.length>20&&e.log.shift();let s=Object.assign({timestamp:Date.now()},t.item);return{...e,log:[...e.log,s]};case"REMOVE_FROM_LOG":default:return e}},kn={getPaymentStatus(e){return e.paymentStatus},getPaymentAmount(e){return e.paymentAmount==""?0:e.paymentAmount},getLog(e){return e.log},getEWalletId(e){return e.eWalletId},getPaymentInfo(e){return e.paymentInfo},getStore(e){return e},getState(e){return e}},P=Tn(de(),{reducer:jn,actions:Ln,selectors:kn});On(P);const Dn=h.wp.data.useDispatch,Bn=h.wp.data.select,Fn=e=>{const{title:t}=e;return w.jsxs("div",{className:"ewallet-item__header_wrapper",children:[w.jsx("h3",{className:"ewallet-item__header",children:t}),w.jsx("h4",{className:"ewallet-item__header balance-title",children:B("Balance")})]})},Un=e=>{const{eWallet:t}=e;return w.jsx(w.Fragment,{children:w.jsxs("h3",{className:"ewallet-item__content align-right balance",children:[ve({num:t.balance})," ",w.jsx("small",{children:t.currency_id})]})})},Mn=e=>{const{eWallet:t}=e,{dispatchEWalletId:n,dispatchLog:r}=Dn(P);let s=["ewallet-item"];const o=()=>(Bn(P).getEWalletId()===t.id&&s.push("selected"),s.join(" ")),i=a=>{n(a),r({type:G.EWALLET,action:"eWallet has been selected: "+a})};return w.jsxs("div",{className:o(),id:"wallet-id-"+t.id,onClick:()=>i(t.id),children:[w.jsx(Fn,{title:t.title}),w.jsx(Un,{eWallet:t})]})},In=e=>{const{message:t}=e;return w.jsx("div",{className:"ewallet-form__payment-amount-input-footer",children:w.jsx("span",{className:"warning",children:t})})},be=h.wp.element.useState,vn=h.wp.data.useDispatch,Wn=h.wp.data.useSelect,Ge=h.wp.data.select,$n=h.wp.element.useRef,Re=h.wp.element.useEffect,qn=h.wp.data.subscribe,J={hidden:"hidden",error:"error",empty:"empty"},v=e=>{let t=["ewallet-form__input-field","ewallet-form__payment-amount-input"];return typeof e=="string"?t.push(e):Array.isArray(e)&&(t=t.concat()),t.join(" ")},Hn=e=>{const{balance:t,maxAmount:n,currencyId:r}=e,{dispatchPaymentAmount:s,dispatchPaymentStatus:o,dispatchLog:i}=vn(P),[a,u]=be(v()),[l,f]=be(""),[d,S]=be(Wn(b=>b(P).getPaymentAmount()/100)),_=h.MLMSoftEWalletBlock.decimalSeparator??".",y=h.MLMSoftEWalletBlock.extraDecimalSeparator??",",m=new RegExp("^\\d+["+_+y+"]?\\d{0,2}$"),p=$n(),x=()=>"0"+_+"00",A=b=>b===""?0:parseFloat(b);Re(()=>{d>0&&d<=n&&(p.current.value=d);const b=qn(()=>{let R=Ge(P).getPaymentAmount()/100,M=parseFloat(p.current.value);isNaN(M)&&(M=0),R!==M&&S(R)},de());return()=>{b()}},[]),Re(()=>{let b=!1,R=A(d);d===""||d===0?(u(v(J.empty)),b=!1):R<=t&&R<=n?(u(v()),b=!0):(u(v(J.error)),b=!1),o(b)},[t]),Re(()=>{let b,R=A(d);d===""||d==="0"||d===0||R==0?(u(v(J.empty)),b=!1):R>t?(u(v(J.error)),b=!1):R<=n?(u(v()),b=!0):(u(v(J.error)),b=!1),s(d),i({type:G.PAYMENT_AMOUNT,action:"Amount has been set: "+d}),o(b),f(N())},[d]);const T=b=>{let R=b.target.value;return b.target.value.length>12?(p.current.value=R.slice(0,-1),!1):R.length>0&&!m.test(R)?(console.log("incorrect regex with value :",R),p.current.value=R.slice(0,-1),!1):(S(R),!0)},D=()=>d==0||d=="0"?"":d,N=()=>{const b=Ge(P).getLog();let R="";if(A(D())>t)if(b[b.length-1].type==G.EWALLET){let I=t.toString();if(I.indexOf(_)!==-1){let Ee=I.split(_);Ee[1].length==1&&(I=Ee[0]+_+Ee[1]+"0")}p.current.value=I,S(I)}else R=B("Wallet balance exceeded");else A(D())>n&&(R=B("The amount must be less than or equal to")+" "+ve({num:n})+" "+r);return R};return w.jsxs("div",{className:"ewallet-form__field field__payment-amount-input",children:[w.jsx("label",{htmlFor:"ewallet-form__payment-amount-input",children:B("Enter the amount")}),w.jsx("input",{ref:p,onChange:b=>{T(b)},name:"ewallet-form__payment-amount-input",id:"ewallet-form__payment-amount-input",placeholder:x(),title:"",type:"text",className:a}),l.length>0&&w.jsx(In,{message:l})]})};function Ot(e,t){return function(){return e.apply(t,arguments)}}const{toString:zn}=Object.prototype,{getPrototypeOf:We}=Object,pe=(e=>t=>{const n=zn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),F=e=>(e=e.toLowerCase(),t=>pe(t)===e),me=e=>t=>typeof t===e,{isArray:z}=Array,Y=me("undefined");function Vn(e){return e!==null&&!Y(e)&&e.constructor!==null&&!Y(e.constructor)&&k(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pt=F("ArrayBuffer");function Jn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pt(e.buffer),t}const Kn=me("string"),k=me("function"),Nt=me("number"),he=e=>e!==null&&typeof e=="object",Gn=e=>e===!0||e===!1,oe=e=>{if(pe(e)!=="object")return!1;const t=We(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Yn=F("Date"),Xn=F("File"),Qn=F("Blob"),Zn=F("FileList"),er=e=>he(e)&&k(e.pipe),tr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||k(e.append)&&((t=pe(e))==="formdata"||t==="object"&&k(e.toString)&&e.toString()==="[object FormData]"))},nr=F("URLSearchParams"),[rr,sr,or,ir]=["ReadableStream","Request","Response","Headers"].map(F),ar=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Q(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),z(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Ct(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Lt=e=>!Y(e)&&e!==W;function Ne(){const{caseless:e}=Lt(this)&&this||{},t={},n=(r,s)=>{const o=e&&Ct(t,s)||s;oe(t[o])&&oe(r)?t[o]=Ne(t[o],r):oe(r)?t[o]=Ne({},r):z(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Q(arguments[r],n);return t}const cr=(e,t,n,{allOwnKeys:r}={})=>(Q(t,(s,o)=>{n&&k(s)?e[o]=Ot(s,n):e[o]=s},{allOwnKeys:r}),e),lr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ur=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},fr=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&We(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},dr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},pr=e=>{if(!e)return null;if(z(e))return e;let t=e.length;if(!Nt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},mr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&We(Uint8Array)),hr=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},yr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},wr=F("HTMLFormElement"),gr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ye=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Er=F("RegExp"),jt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Q(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Sr=e=>{jt(e,(t,n)=>{if(k(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(k(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},br=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return z(e)?r(e):r(String(e).split(t)),n},Rr=()=>{},_r=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,_e="abcdefghijklmnopqrstuvwxyz",Xe="0123456789",kt={DIGIT:Xe,ALPHA:_e,ALPHA_DIGIT:_e+_e.toUpperCase()+Xe},xr=(e=16,t=kt.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Ar(e){return!!(e&&k(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Tr=e=>{const t=new Array(10),n=(r,s)=>{if(he(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=z(r)?[]:{};return Q(r,(i,a)=>{const u=n(i,s+1);!Y(u)&&(o[a]=u)}),t[s]=void 0,o}}return r};return n(e,0)},Or=F("AsyncFunction"),Pr=e=>e&&(he(e)||k(e))&&k(e.then)&&k(e.catch),Dt=((e,t)=>e?setImmediate:t?((n,r)=>(W.addEventListener("message",({source:s,data:o})=>{s===W&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),W.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",k(W.postMessage)),Nr=typeof queueMicrotask<"u"?queueMicrotask.bind(W):typeof process<"u"&&process.nextTick||Dt,c={isArray:z,isArrayBuffer:Pt,isBuffer:Vn,isFormData:tr,isArrayBufferView:Jn,isString:Kn,isNumber:Nt,isBoolean:Gn,isObject:he,isPlainObject:oe,isReadableStream:rr,isRequest:sr,isResponse:or,isHeaders:ir,isUndefined:Y,isDate:Yn,isFile:Xn,isBlob:Qn,isRegExp:Er,isFunction:k,isStream:er,isURLSearchParams:nr,isTypedArray:mr,isFileList:Zn,forEach:Q,merge:Ne,extend:cr,trim:ar,stripBOM:lr,inherits:ur,toFlatObject:fr,kindOf:pe,kindOfTest:F,endsWith:dr,toArray:pr,forEachEntry:hr,matchAll:yr,isHTMLForm:wr,hasOwnProperty:Ye,hasOwnProp:Ye,reduceDescriptors:jt,freezeMethods:Sr,toObjectSet:br,toCamelCase:gr,noop:Rr,toFiniteNumber:_r,findKey:Ct,global:W,isContextDefined:Lt,ALPHABET:kt,generateString:xr,isSpecCompliantForm:Ar,toJSONObject:Tr,isAsyncFn:Or,isThenable:Pr,setImmediate:Dt,asap:Nr};function g(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}c.inherits(g,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}});const Bt=g.prototype,Ft={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ft[e]={value:e}});Object.defineProperties(g,Ft);Object.defineProperty(Bt,"isAxiosError",{value:!0});g.from=(e,t,n,r,s,o)=>{const i=Object.create(Bt);return c.toFlatObject(e,i,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),g.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const Cr=null;function Ce(e){return c.isPlainObject(e)||c.isArray(e)}function Ut(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function Qe(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ut(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Lr(e){return c.isArray(e)&&!e.some(Ce)}const jr=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function ye(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!c.isUndefined(p[m])});const r=n.metaTokens,s=n.visitor||f,o=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function l(y){if(y===null)return"";if(c.isDate(y))return y.toISOString();if(!u&&c.isBlob(y))throw new g("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(y)||c.isTypedArray(y)?u&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,m,p){let x=y;if(y&&!p&&typeof y=="object"){if(c.endsWith(m,"{}"))m=r?m:m.slice(0,-2),y=JSON.stringify(y);else if(c.isArray(y)&&Lr(y)||(c.isFileList(y)||c.endsWith(m,"[]"))&&(x=c.toArray(y)))return m=Ut(m),x.forEach(function(T,D){!(c.isUndefined(T)||T===null)&&t.append(i===!0?Qe([m],D,o):i===null?m:m+"[]",l(T))}),!1}return Ce(y)?!0:(t.append(Qe(p,m,o),l(y)),!1)}const d=[],S=Object.assign(jr,{defaultVisitor:f,convertValue:l,isVisitable:Ce});function _(y,m){if(!c.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(y),c.forEach(y,function(x,A){(!(c.isUndefined(x)||x===null)&&s.call(t,x,c.isString(A)?A.trim():A,m,S))===!0&&_(x,m?m.concat(A):[A])}),d.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Ze(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function $e(e,t){this._pairs=[],e&&ye(e,this,t)}const Mt=$e.prototype;Mt.append=function(t,n){this._pairs.push([t,n])};Mt.toString=function(t){const n=t?function(r){return t.call(this,r,Ze)}:Ze;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function kr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function It(e,t,n){if(!t)return e;const r=n&&n.encode||kr;c.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=c.isURLSearchParams(t)?t.toString():new $e(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class et{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(r){r!==null&&t(r)})}}const vt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Dr=typeof URLSearchParams<"u"?URLSearchParams:$e,Br=typeof FormData<"u"?FormData:null,Fr=typeof Blob<"u"?Blob:null,Ur={isBrowser:!0,classes:{URLSearchParams:Dr,FormData:Br,Blob:Fr},protocols:["http","https","file","blob","url","data"]},qe=typeof window<"u"&&typeof document<"u",Le=typeof navigator=="object"&&navigator||void 0,Mr=qe&&(!Le||["ReactNative","NativeScript","NS"].indexOf(Le.product)<0),Ir=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vr=qe&&window.location.href||"http://localhost",Wr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qe,hasStandardBrowserEnv:Mr,hasStandardBrowserWebWorkerEnv:Ir,navigator:Le,origin:vr},Symbol.toStringTag,{value:"Module"})),C={...Wr,...Ur};function $r(e,t){return ye(e,new C.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return C.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function qr(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Hr(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Wt(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),u=o>=n.length;return i=!i&&c.isArray(s)?s.length:i,u?(c.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!c.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&c.isArray(s[i])&&(s[i]=Hr(s[i])),!a)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(r,s)=>{t(qr(r),s,n,0)}),n}return null}function zr(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Z={transitional:vt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=c.isObject(t);if(o&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return s?JSON.stringify(Wt(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return $r(t,this.formSerializer).toString();if((a=c.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return ye(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),zr(t)):t}],transformResponse:[function(t){const n=this.transitional||Z.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?g.from(a,g.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:C.classes.FormData,Blob:C.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{Z.headers[e]={}});const Vr=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Jr=e=>{const t={};let n,r,s;return e&&e.split(`18 `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&& Vr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},tt=Symbol("internals");function K(e){return e&&String(e).trim().toLowerCase()}function ie(e){return e===!1||e==null?e:c.isArray(e)?e.map(ie):String(e)}function Kr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Gr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function xe(e,t,n,r,s){if(c.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!c.isString(t)){if(c.isString(r))return t.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(t)}}function Yr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Xr(e,t){const n=c.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class j{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,u,l){const f=K(u);if(!f)throw new Error("header name must be a non-empty string");const d=c.findKey(s,f);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||u]=ie(a))}const i=(a,u)=>c.forEach(a,(l,f)=>o(l,f,u));if(c.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(c.isString(t)&&(t=t.trim())&&!Gr(t))i(Jr(t),n);else if(c.isHeaders(t))for(const[a,u]of t.entries())o(u,a,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=K(t),t){const r=c.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Kr(s);if(c.isFunction(n))return n.call(this,s,r);if(c.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=K(t),t){const r=c.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||xe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=K(i),i){const a=c.findKey(r,i);a&&(!n||xe(r,r[a],a,n))&&(delete r[a],s=!0)}}return c.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||xe(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return c.forEach(this,(s,o)=>{const i=c.findKey(r,o);if(i){n[i]=ie(s),delete n[o];return}const a=t?Yr(o):String(o).trim();a!==o&&delete n[o],n[a]=ie(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return c.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&c.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`19 `)}get [Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[tt]=this[tt]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=K(i);r[a]||(Xr(s,i),r[a]=!0)}return c.isArray(t)?t.forEach(o):o(t),this}}j.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(j.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});c.freezeMethods(j);function Ae(e,t){const n=this||Z,r=t||n,s=j.from(r.headers);let o=r.data;return c.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function $t(e){return!!(e&&e.__CANCEL__)}function V(e,t,n){g.call(this,e??"canceled",g.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(V,g,{__CANCEL__:!0});function qt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new g("Request failed with status code "+n.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Qr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Zr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),f=r[o];i||(i=l),n[s]=u,r[s]=l;let d=o,S=0;for(;d!==s;)S+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-i<t)return;const _=f&&l-f;return _?Math.round(S*1e3/_):void 0}}function es(e,t){let n=0,r=1e3/t,s,o;const i=(l,f=Date.now())=>{n=f,s=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const f=Date.now(),d=f-n;d>=r?i(l,f):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const ce=(e,t,n=3)=>{let r=0;const s=Zr(50,250);return es(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,u=i-r,l=s(u),f=i<=a;r=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:u,rate:l||void 0,estimated:l&&a&&f?(a-i)/l:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},nt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},rt=e=>(...t)=>c.asap(()=>e(...t)),ts=C.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,C.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(C.origin),C.navigator&&/(msie|trident)/i.test(C.navigator.userAgent)):()=>!0,ns=C.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];c.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),c.isString(r)&&i.push("path="+r),c.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function rs(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ss(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ht(e,t){return e&&!rs(t)?ss(e,t):t}const st=e=>e instanceof j?{...e}:e;function q(e,t){t=t||{};const n={};function r(l,f,d,S){return c.isPlainObject(l)&&c.isPlainObject(f)?c.merge.call({caseless:S},l,f):c.isPlainObject(f)?c.merge({},f):c.isArray(f)?f.slice():f}function s(l,f,d,S){if(c.isUndefined(f)){if(!c.isUndefined(l))return r(void 0,l,d,S)}else return r(l,f,d,S)}function o(l,f){if(!c.isUndefined(f))return r(void 0,f)}function i(l,f){if(c.isUndefined(f)){if(!c.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function a(l,f,d){if(d in t)return r(l,f);if(d in e)return r(void 0,l)}const u={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(l,f,d)=>s(st(l),st(f),d,!0)};return c.forEach(Object.keys(Object.assign({},e,t)),function(f){const d=u[f]||s,S=d(e[f],t[f],f);c.isUndefined(S)&&d!==a||(n[f]=S)}),n}const zt=e=>{const t=q({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;t.headers=i=j.from(i),t.url=It(Ht(t.baseURL,t.url),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(c.isFormData(n)){if(C.hasStandardBrowserEnv||C.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((u=i.getContentType())!==!1){const[l,...f]=u?u.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...f].join("; "))}}if(C.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(t)),r||r!==!1&&ts(t.url))){const l=s&&o&&ns.read(o);l&&i.set(s,l)}return t},os=typeof XMLHttpRequest<"u",is=os&&function(e){return new Promise(function(n,r){const s=zt(e);let o=s.data;const i=j.from(s.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:l}=s,f,d,S,_,y;function m(){_&&_(),y&&y(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function x(){if(!p)return;const T=j.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),N={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:T,config:e,request:p};qt(function(R){n(R),m()},function(R){r(R),m()},N),p=null}"onloadend"in p?p.onloadend=x:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(x)},p.onabort=function(){p&&(r(new g("Request aborted",g.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new g("Network Error",g.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||vt;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new g(D,N.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,p)),p=null},o===void 0&&i.setContentType(null),"setRequestHeader"in p&&c.forEach(i.toJSON(),function(D,N){p.setRequestHeader(N,D)}),c.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),a&&a!=="json"&&(p.responseType=s.responseType),l&&([S,y]=ce(l,!0),p.addEventListener("progress",S)),u&&p.upload&&([d,_]=ce(u),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",_)),(s.cancelToken||s.signal)&&(f=T=>{p&&(r(!T||T.type?new V(null,e,p):T),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const A=Qr(s.url);if(A&&C.protocols.indexOf(A)===-1){r(new g("Unsupported protocol "+A+":",g.ERR_BAD_REQUEST,e));return}p.send(o||null)})},as=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(l){if(!s){s=!0,a();const f=l instanceof Error?l:this.reason;r.abort(f instanceof g?f:new V(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,o(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>c.asap(a),u}},cs=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},ls=async function*(e,t){for await(const n of us(e))yield*cs(n,t)},us=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ot=(e,t,n,r)=>{const s=ls(e,t);let o=0,i,a=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:f}=await s.next();if(l){a(),u.close();return}let d=f.byteLength;if(n){let S=o+=d;n(S)}u.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}},cancel(u){return a(u),s.return()}},{highWaterMark:2})},we=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Vt=we&&typeof ReadableStream=="function",fs=we&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Jt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ds=Vt&&Jt(()=>{let e=!1;const t=new Request(C.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),it=64*1024,je=Vt&&Jt(()=>c.isReadableStream(new Response("").body)),le={stream:je&&(e=>e.body)};we&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!le[t]&&(le[t]=c.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new g(`Response type '${t}' is not supported`,g.ERR_NOT_SUPPORT,r)})})})(new Response);const ps=async e=>{if(e==null)return 0;if(c.isBlob(e))return e.size;if(c.isSpecCompliantForm(e))return(await new Request(C.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(c.isArrayBufferView(e)||c.isArrayBuffer(e))return e.byteLength;if(c.isURLSearchParams(e)&&(e=e+""),c.isString(e))return(await fs(e)).byteLength},ms=async(e,t)=>{const n=c.toFiniteNumber(e.getContentLength());return n??ps(t)},hs=we&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:a,onUploadProgress:u,responseType:l,headers:f,withCredentials:d="same-origin",fetchOptions:S}=zt(e);l=l?(l+"").toLowerCase():"text";let _=as([s,o&&o.toAbortSignal()],i),y;const m=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let p;try{if(u&&ds&&n!=="get"&&n!=="head"&&(p=await ms(f,r))!==0){let N=new Request(t,{method:"POST",body:r,duplex:"half"}),b;if(c.isFormData(r)&&(b=N.headers.get("content-type"))&&f.setContentType(b),N.body){const[R,M]=nt(p,ce(rt(u)));r=ot(N.body,it,R,M)}}c.isString(d)||(d=d?"include":"omit");const x="credentials"in Request.prototype;y=new Request(t,{...S,signal:_,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:x?d:void 0});let A=await fetch(y);const T=je&&(l==="stream"||l==="response");if(je&&(a||T&&m)){const N={};["status","statusText","headers"].forEach(I=>{N[I]=A[I]});const b=c.toFiniteNumber(A.headers.get("content-length")),[R,M]=a&&nt(b,ce(rt(a),!0))||[];A=new Response(ot(A.body,it,R,()=>{M&&M(),m&&m()}),N)}l=l||"text";let D=await le[c.findKey(le,l)||"text"](A,e);return!T&&m&&m(),await new Promise((N,b)=>{qt(N,b,{data:D,headers:j.from(A.headers),status:A.status,statusText:A.statusText,config:e,request:y})})}catch(x){throw m&&m(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,e,y),{cause:x.cause||x}):g.from(x,x&&x.code,e,y)}}),ke={http:Cr,xhr:is,fetch:hs};c.forEach(ke,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const at=e=>`- ${e}`,ys=e=>c.isFunction(e)||e===null||e===!1,Kt={getAdapter:e=>{e=c.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!ys(n)&&(r=ke[(i=String(n)).toLowerCase()],r===void 0))throw new g(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :17 */var wn=yn,gn=Symbol.for("react.element"),En=Symbol.for("react.fragment"),Sn=Object.prototype.hasOwnProperty,bn=wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_n={key:!0,ref:!0,__self:!0,__source:!0};function At(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Sn.call(t,r)&&!_n.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:gn,type:e,key:o,ref:i,props:s,_owner:bn.current}}de.Fragment=En;de.jsx=At;de.jsxs=At;mt.exports=de;var w=mt.exports;const m=window,Rn=e=>{const{className:t,children:n,...r}=e;let s="ewallet-alert "+(t??"");return w.jsx("div",{className:s,...r,children:n})},An=e=>{const{className:t,children:n,...r}=e;let s=""+(t??"");return w.jsx("div",{className:s,...r,children:n})},xn=e=>{const{caption:t,classes:n}=e;return w.jsx("h5",{className:n,onClick:()=>{},children:t})},xt=m.wp.data.select;var On=m.wp.data.dispatch;const Tn=xt("wc/store/cart").getCartTotals().currency_decimal_separator,ie={__(e){const t=Object.entries(m.MLMSoftEWalletBlock.i18n);let n;return t.filter(r=>{r[0]===e&&(n=r[1])}),typeof n>"u"?e:n+""},log(e){},parseBool(e){return!new RegExp("/^(false|0)$/i").test(e)&&!!e},isUserLoggedIn(){return Nn(m.MLMSoftEWalletBlock.userLoggedIn)},isLocal(){return location.origin==="http://www.dev-mlm-pro.com"},isDev(){return location.origin==="https://dev.newave.ru"},isStaging(){return location.origin==="https://stage.newave.ru"},isProd(){return pe()||ve()?!1:!ie.isLocal()},fcUpperCase(e){return e.length===0?e:e.length===1?e.toUpperCase():e[0].toUpperCase()+e.slice(1)},getExitFromAppUrl(){var e="";return ie.isDev()?e="#":ie.isStaging()?e="https://stage.newave.ru/wp-admin":e=m.location.origin,e},getAppDefaultLanguage(){},formattedNumber(e){const{num:t,thousandSeparator:n=" "}=e;return t===""?"":n===""?t.toString():t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,n).replace(".",Tn)},getAmountStr(e){const{amount:t,precision:n=2}=e;let r=parseFloat("1"+"0".repeat(n)),s=(t/r).toString();return s.indexOf(m.MLMSoftEWalletBlock.decimalSeparator)===-1&&(s=s+m.MLMSoftEWalletBlock.decimalSeparator+"0".repeat(n)),s},getAppStoreKey(){return m.MLMSoftEWalletBlock.appStoreKey},async hashHmac(e,t){let n=new TextEncoder,r=await m.crypto.subtle.importKey("raw",n.encode(t),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),s=await m.crypto.subtle.sign("HMAC",r,n.encode(e)),o=new Uint8Array(s);return Array.prototype.map.call(o,i=>i.toString(16).padStart(2,"0")).join("")},hideShippingRateElements(){var t=[...m.document.querySelectorAll(".wc-block-components-radio-control__option")];t.map(n=>{var r=n.getAttribute("for");if((r==null?void 0:r.indexOf("radio-control-0-"))===0){if(n.className.indexOf("wc-block-components-radio-control__option-checked")!==-1)return!0;n.setAttribute("style","display:none")}})},removeShippingRateElements(){var t=[...m.document.querySelectorAll(".wc-block-components-radio-control__option")];t.map(n=>{var r=n.getAttribute("for");if((r==null?void 0:r.indexOf("radio-control-0-"))===0){if(n.className.indexOf("wc-block-components-radio-control__option-checked")!==-1)return!0;n.remove()}})},showShippingRateElements(){var t=[...m.document.querySelectorAll(".wc-block-components-radio-control__option")];t.map(n=>{var r=n.getAttribute("for");(r==null?void 0:r.indexOf("radio-control-0-"))===0&&n.setAttribute("style","display:block")})},removeShippingRates(){var e=()=>{var r=[],s=xt("wc/store/cart").getShippingRates();return s[0].shipping_rates.map(o=>{o.selected===!0&&r.push(o)}),s[0].shipping_rates=[],s[0].shipping_rates=r,s};let t=e(),n={shippingRates:[]};n.shippingRates=t,On("wc/store/cart").setCartData(n)}},{__:F,log:Xs,parseBool:Nn,isUserLoggedIn:Ge,getAppDefaultLanguage:Qs,fcUpperCase:Zs,getExitFromAppUrl:eo,isLocal:Ot,isDev:pe,isProd:Tt,isStaging:ve,formattedNumber:We,getAppStoreKey:me,hashHmac:Nt,getAmountStr:Pn}=ie;var G=(e=>(e.EWALLET="EWALLET",e.PAYMENT_AMOUNT="PAYMENT_AMOUNT",e.PAYMENT_STATUS="PAYMENT_STATUS",e))(G||{});const Cn=m.wp.data.createReduxStore,Ln=m.wp.data.register,kn=m.MLMSoftEWalletBlock.decimalSeparator??".",jn=m.MLMSoftEWalletBlock.extraDecimalSeparator??",",Dn={log:[],eWalletId:0,paymentInfo:{success:!1,error:null,data:null},paymentAmount:"",paymentStatus:!1},Fn={dispatchPaymentStatus(e){return{type:"SET_PAYMENT_STATUS",paymentStatus:e}},dispatchPaymentAmount(e){return{type:"SET_PAYMENT_AMOUNT",paymentAmount:e}},dispatchPaymentInfo(e){return{type:"SET_PAYMENT_INFO",paymentInfo:e}},dispatchEWalletId(e){return{type:"SET_EWALLET_ID",id:e}},dispatchLog(e){return{type:"ADD_TO_LOG",item:e}},removeFromLog(e){return{type:"REMOVE_FROM_LOG",itemId:e}}},Un=(e=Dn,t)=>{switch(t.type){case"SET_PAYMENT_STATUS":return{...e,paymentStatus:t.paymentStatus};case"SET_PAYMENT_AMOUNT":let n=t.paymentAmount,r=0;return typeof n=="number"&&n>=0?r=n*100:n.length>0&&(n=n.replace(jn,kn),r=parseFloat(n)*100),{...e,paymentAmount:r};case"SET_PAYMENT_INFO":return{...e,paymentInfo:t.paymentInfo};case"SET_EWALLET_ID":return{...e,eWalletId:t.id};case"ADD_TO_LOG":e.log.length>20&&e.log.shift();let s=Object.assign({timestamp:Date.now()},t.item);return{...e,log:[...e.log,s]};case"REMOVE_FROM_LOG":default:return e}},Mn={getPaymentStatus(e){return e.paymentStatus},getPaymentAmount(e){return e.paymentAmount==""?0:e.paymentAmount},getLog(e){return e.log},getEWalletId(e){return e.eWalletId},getPaymentInfo(e){return e.paymentInfo},getStore(e){return e},getState(e){return e}},N=Cn(me(),{reducer:Un,actions:Fn,selectors:Mn});Ln(N);const Bn=m.wp.data.useDispatch,In=m.wp.data.select,vn=e=>{const{title:t}=e;return w.jsxs("div",{className:"ewallet-item__header_wrapper",children:[w.jsx("h3",{className:"ewallet-item__header",children:t}),w.jsx("h4",{className:"ewallet-item__header balance-title",children:F("Balance")})]})},Wn=e=>{const{eWallet:t}=e;return w.jsx(w.Fragment,{children:w.jsxs("h3",{className:"ewallet-item__content align-right balance",children:[We({num:t.balance})," ",w.jsx("small",{children:t.currency_id})]})})},$n=e=>{const{eWallet:t}=e,{dispatchEWalletId:n,dispatchLog:r}=Bn(N);let s=["ewallet-item"];const o=()=>(In(N).getEWalletId()===t.id&&s.push("selected"),s.join(" ")),i=a=>{n(a),r({type:G.EWALLET,action:"eWallet has been selected: "+a})};return w.jsxs("div",{className:o(),id:"wallet-id-"+t.id,onClick:()=>i(t.id),children:[w.jsx(vn,{title:t.title}),w.jsx(Wn,{eWallet:t})]})},qn=e=>{const{message:t}=e;return w.jsx("div",{className:"ewallet-form__payment-amount-input-footer",children:w.jsx("span",{className:"warning",children:t})})},Re=m.wp.element.useState,Hn=m.wp.data.useDispatch,zn=m.wp.data.useSelect,Ye=m.wp.data.select,Vn=m.wp.element.useRef,Ae=m.wp.element.useEffect,Jn=m.wp.data.subscribe,J={hidden:"hidden",error:"error",empty:"empty"},v=e=>{let t=["ewallet-form__input-field","ewallet-form__payment-amount-input"];return typeof e=="string"?t.push(e):Array.isArray(e)&&(t=t.concat()),t.join(" ")},Kn=e=>{const{balance:t,maxAmount:n,currencyId:r}=e,{dispatchPaymentAmount:s,dispatchPaymentStatus:o,dispatchLog:i}=Hn(N),[a,u]=Re(v()),[c,f]=Re(""),[d,S]=Re(zn(b=>b(N).getPaymentAmount()/100)),R=m.MLMSoftEWalletBlock.decimalSeparator??".",y=m.MLMSoftEWalletBlock.extraDecimalSeparator??",",h=new RegExp("^\\d+["+R+y+"]?\\d{0,2}$"),p=Vn(),A=()=>"0"+R+"00",x=b=>b===""?0:parseFloat(b);Ae(()=>{d>0&&d<=n&&(p.current.value=d);const b=Jn(()=>{let _=Ye(N).getPaymentAmount()/100,B=parseFloat(p.current.value);isNaN(B)&&(B=0),_!==B&&S(_)},me());return()=>{b()}},[]),Ae(()=>{let b=!1,_=x(d);d===""||d===0?(u(v(J.empty)),b=!1):_<=t&&_<=n?(u(v()),b=!0):(u(v(J.error)),b=!1),o(b)},[t]),Ae(()=>{let b,_=x(d);d===""||d==="0"||d===0||_==0?(u(v(J.empty)),b=!1):_>t?(u(v(J.error)),b=!1):_<=n?(u(v()),b=!0):(u(v(J.error)),b=!1),s(d),i({type:G.PAYMENT_AMOUNT,action:"Amount has been set: "+d}),o(b),f(P())},[d]);const O=b=>{let _=b.target.value;return b.target.value.length>12?(p.current.value=_.slice(0,-1),!1):_.length>0&&!h.test(_)?(console.log("incorrect regex with value :",_),p.current.value=_.slice(0,-1),!1):(S(_),!0)},D=()=>d==0||d=="0"?"":d,P=()=>{const b=Ye(N).getLog();let _="";if(x(D())>t)if(b[b.length-1].type==G.EWALLET){let I=t.toString();if(I.indexOf(R)!==-1){let be=I.split(R);be[1].length==1&&(I=be[0]+R+be[1]+"0")}p.current.value=I,S(I)}else _=F("Wallet balance exceeded");else x(D())>n&&(_=F("The amount must be less than or equal to")+" "+We({num:n})+" "+r);return _};return w.jsxs("div",{className:"ewallet-form__field field__payment-amount-input",children:[w.jsx("label",{htmlFor:"ewallet-form__payment-amount-input",children:F("Enter the amount")}),w.jsx("input",{ref:p,onChange:b=>{O(b)},name:"ewallet-form__payment-amount-input",id:"ewallet-form__payment-amount-input",placeholder:A(),title:"",type:"text",className:a}),c.length>0&&w.jsx(qn,{message:c})]})};function Pt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Gn}=Object.prototype,{getPrototypeOf:$e}=Object,{iterator:he,toStringTag:Ct}=Symbol,ye=(e=>t=>{const n=Gn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>ye(t)===e),we=e=>t=>typeof t===e,{isArray:z}=Array,Y=we("undefined");function Q(e){return e!==null&&!Y(e)&&e.constructor!==null&&!Y(e.constructor)&&k(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Lt=U("ArrayBuffer");function Yn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Lt(e.buffer),t}const Xn=we("string"),k=we("function"),kt=we("number"),Z=e=>e!==null&&typeof e=="object",Qn=e=>e===!0||e===!1,ae=e=>{if(ye(e)!=="object")return!1;const t=$e(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ct in e)&&!(he in e)},Zn=e=>{if(!Z(e)||Q(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},er=U("Date"),tr=U("File"),nr=U("Blob"),rr=U("FileList"),sr=e=>Z(e)&&k(e.pipe),or=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||k(e.append)&&((t=ye(e))==="formdata"||t==="object"&&k(e.toString)&&e.toString()==="[object FormData]"))},ir=U("URLSearchParams"),[ar,lr,cr,ur]=["ReadableStream","Request","Response","Headers"].map(U),fr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ee(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),z(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Q(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function jt(e,t){if(Q(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Dt=e=>!Y(e)&&e!==W;function Ce(){const{caseless:e}=Dt(this)&&this||{},t={},n=(r,s)=>{const o=e&&jt(t,s)||s;ae(t[o])&&ae(r)?t[o]=Ce(t[o],r):ae(r)?t[o]=Ce({},r):z(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&ee(arguments[r],n);return t}const dr=(e,t,n,{allOwnKeys:r}={})=>(ee(t,(s,o)=>{n&&k(s)?e[o]=Pt(s,n):e[o]=s},{allOwnKeys:r}),e),pr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},hr=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&$e(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},yr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},wr=e=>{if(!e)return null;if(z(e))return e;let t=e.length;if(!kt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},gr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$e(Uint8Array)),Er=(e,t)=>{const r=(e&&e[he]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Sr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},br=U("HTMLFormElement"),_r=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Xe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Rr=U("RegExp"),Ft=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ee(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Ar=e=>{Ft(e,(t,n)=>{if(k(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(k(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},xr=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return z(e)?r(e):r(String(e).split(t)),n},Or=()=>{},Tr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Nr(e){return!!(e&&k(e.append)&&e[Ct]==="FormData"&&e[he])}const Pr=e=>{const t=new Array(10),n=(r,s)=>{if(Z(r)){if(t.indexOf(r)>=0)return;if(Q(r))return r;if(!("toJSON"in r)){t[s]=r;const o=z(r)?[]:{};return ee(r,(i,a)=>{const u=n(i,s+1);!Y(u)&&(o[a]=u)}),t[s]=void 0,o}}return r};return n(e,0)},Cr=U("AsyncFunction"),Lr=e=>e&&(Z(e)||k(e))&&k(e.then)&&k(e.catch),Ut=((e,t)=>e?setImmediate:t?((n,r)=>(W.addEventListener("message",({source:s,data:o})=>{s===W&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),W.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",k(W.postMessage)),kr=typeof queueMicrotask<"u"?queueMicrotask.bind(W):typeof process<"u"&&process.nextTick||Ut,jr=e=>e!=null&&k(e[he]),l={isArray:z,isArrayBuffer:Lt,isBuffer:Q,isFormData:or,isArrayBufferView:Yn,isString:Xn,isNumber:kt,isBoolean:Qn,isObject:Z,isPlainObject:ae,isEmptyObject:Zn,isReadableStream:ar,isRequest:lr,isResponse:cr,isHeaders:ur,isUndefined:Y,isDate:er,isFile:tr,isBlob:nr,isRegExp:Rr,isFunction:k,isStream:sr,isURLSearchParams:ir,isTypedArray:gr,isFileList:rr,forEach:ee,merge:Ce,extend:dr,trim:fr,stripBOM:pr,inherits:mr,toFlatObject:hr,kindOf:ye,kindOfTest:U,endsWith:yr,toArray:wr,forEachEntry:Er,matchAll:Sr,isHTMLForm:br,hasOwnProperty:Xe,hasOwnProp:Xe,reduceDescriptors:Ft,freezeMethods:Ar,toObjectSet:xr,toCamelCase:_r,noop:Or,toFiniteNumber:Tr,findKey:jt,global:W,isContextDefined:Dt,isSpecCompliantForm:Nr,toJSONObject:Pr,isAsyncFn:Cr,isThenable:Lr,setImmediate:Ut,asap:kr,isIterable:jr};function g(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}l.inherits(g,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.status}}});const Mt=g.prototype,Bt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Bt[e]={value:e}});Object.defineProperties(g,Bt);Object.defineProperty(Mt,"isAxiosError",{value:!0});g.from=(e,t,n,r,s,o)=>{const i=Object.create(Mt);return l.toFlatObject(e,i,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),g.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const Dr=null;function Le(e){return l.isPlainObject(e)||l.isArray(e)}function It(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function Qe(e,t,n){return e?e.concat(t).map(function(s,o){return s=It(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Fr(e){return l.isArray(e)&&!e.some(Le)}const Ur=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function ge(e,t,n){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=l.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,p){return!l.isUndefined(p[h])});const r=n.metaTokens,s=n.visitor||f,o=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(s))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(l.isDate(y))return y.toISOString();if(l.isBoolean(y))return y.toString();if(!u&&l.isBlob(y))throw new g("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(y)||l.isTypedArray(y)?u&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,h,p){let A=y;if(y&&!p&&typeof y=="object"){if(l.endsWith(h,"{}"))h=r?h:h.slice(0,-2),y=JSON.stringify(y);else if(l.isArray(y)&&Fr(y)||(l.isFileList(y)||l.endsWith(h,"[]"))&&(A=l.toArray(y)))return h=It(h),A.forEach(function(O,D){!(l.isUndefined(O)||O===null)&&t.append(i===!0?Qe([h],D,o):i===null?h:h+"[]",c(O))}),!1}return Le(y)?!0:(t.append(Qe(p,h,o),c(y)),!1)}const d=[],S=Object.assign(Ur,{defaultVisitor:f,convertValue:c,isVisitable:Le});function R(y,h){if(!l.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(y),l.forEach(y,function(A,x){(!(l.isUndefined(A)||A===null)&&s.call(t,A,l.isString(x)?x.trim():x,h,S))===!0&&R(A,h?h.concat(x):[x])}),d.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return R(e),t}function Ze(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function qe(e,t){this._pairs=[],e&&ge(e,this,t)}const vt=qe.prototype;vt.append=function(t,n){this._pairs.push([t,n])};vt.toString=function(t){const n=t?function(r){return t.call(this,r,Ze)}:Ze;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Mr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wt(e,t,n){if(!t)return e;const r=n&&n.encode||Mr;l.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=l.isURLSearchParams(t)?t.toString():new qe(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class et{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(r){r!==null&&t(r)})}}const $t={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Br=typeof URLSearchParams<"u"?URLSearchParams:qe,Ir=typeof FormData<"u"?FormData:null,vr=typeof Blob<"u"?Blob:null,Wr={isBrowser:!0,classes:{URLSearchParams:Br,FormData:Ir,Blob:vr},protocols:["http","https","file","blob","url","data"]},He=typeof window<"u"&&typeof document<"u",ke=typeof navigator=="object"&&navigator||void 0,$r=He&&(!ke||["ReactNative","NativeScript","NS"].indexOf(ke.product)<0),qr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hr=He&&window.location.href||"http://localhost",zr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:He,hasStandardBrowserEnv:$r,hasStandardBrowserWebWorkerEnv:qr,navigator:ke,origin:Hr},Symbol.toStringTag,{value:"Module"})),C={...zr,...Wr};function Vr(e,t){return ge(e,new C.classes.URLSearchParams,{visitor:function(n,r,s,o){return C.isNode&&l.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Jr(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Kr(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function qt(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),u=o>=n.length;return i=!i&&l.isArray(s)?s.length:i,u?(l.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!l.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&l.isArray(s[i])&&(s[i]=Kr(s[i])),!a)}if(l.isFormData(e)&&l.isFunction(e.entries)){const n={};return l.forEachEntry(e,(r,s)=>{t(Jr(r),s,n,0)}),n}return null}function Gr(e,t,n){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const te={transitional:$t,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=l.isObject(t);if(o&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return s?JSON.stringify(qt(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Vr(t,this.formSerializer).toString();if((a=l.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return ge(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Gr(t)):t}],transformResponse:[function(t){const n=this.transitional||te.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?g.from(a,g.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:C.classes.FormData,Blob:C.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],e=>{te.headers[e]={}});const Yr=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Xr=e=>{const t={};let n,r,s;return e&&e.split(` 18 `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Yr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},tt=Symbol("internals");function K(e){return e&&String(e).trim().toLowerCase()}function le(e){return e===!1||e==null?e:l.isArray(e)?e.map(le):String(e)}function Qr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Zr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function xe(e,t,n,r,s){if(l.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!l.isString(t)){if(l.isString(r))return t.indexOf(r)!==-1;if(l.isRegExp(r))return r.test(t)}}function es(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ts(e,t){const n=l.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class j{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,u,c){const f=K(u);if(!f)throw new Error("header name must be a non-empty string");const d=l.findKey(s,f);(!d||s[d]===void 0||c===!0||c===void 0&&s[d]!==!1)&&(s[d||u]=le(a))}const i=(a,u)=>l.forEach(a,(c,f)=>o(c,f,u));if(l.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(l.isString(t)&&(t=t.trim())&&!Zr(t))i(Xr(t),n);else if(l.isObject(t)&&l.isIterable(t)){let a={},u,c;for(const f of t){if(!l.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[c=f[0]]=(u=a[c])?l.isArray(u)?[...u,f[1]]:[u,f[1]]:f[1]}i(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=K(t),t){const r=l.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Qr(s);if(l.isFunction(n))return n.call(this,s,r);if(l.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=K(t),t){const r=l.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||xe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=K(i),i){const a=l.findKey(r,i);a&&(!n||xe(r,r[a],a,n))&&(delete r[a],s=!0)}}return l.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||xe(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return l.forEach(this,(s,o)=>{const i=l.findKey(r,o);if(i){n[i]=le(s),delete n[o];return}const a=t?es(o):String(o).trim();a!==o&&delete n[o],n[a]=le(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return l.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&l.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` 19 `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[tt]=this[tt]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=K(i);r[a]||(ts(s,i),r[a]=!0)}return l.isArray(t)?t.forEach(o):o(t),this}}j.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);l.reduceDescriptors(j.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});l.freezeMethods(j);function Oe(e,t){const n=this||te,r=t||n,s=j.from(r.headers);let o=r.data;return l.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ht(e){return!!(e&&e.__CANCEL__)}function V(e,t,n){g.call(this,e??"canceled",g.ERR_CANCELED,t,n),this.name="CanceledError"}l.inherits(V,g,{__CANCEL__:!0});function zt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new g("Request failed with status code "+n.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ns(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function rs(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),f=r[o];i||(i=c),n[s]=u,r[s]=c;let d=o,S=0;for(;d!==s;)S+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-i<t)return;const R=f&&c-f;return R?Math.round(S*1e3/R):void 0}}function ss(e,t){let n=0,r=1e3/t,s,o;const i=(c,f=Date.now())=>{n=f,s=null,o&&(clearTimeout(o),o=null),e(...c)};return[(...c)=>{const f=Date.now(),d=f-n;d>=r?i(c,f):(s=c,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const ue=(e,t,n=3)=>{let r=0;const s=rs(50,250);return ss(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,u=i-r,c=s(u),f=i<=a;r=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a&&f?(a-i)/c:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},nt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},rt=e=>(...t)=>l.asap(()=>e(...t)),os=C.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,C.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(C.origin),C.navigator&&/(msie|trident)/i.test(C.navigator.userAgent)):()=>!0,is=C.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];l.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),l.isString(r)&&i.push("path="+r),l.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function as(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ls(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Vt(e,t,n){let r=!as(t);return e&&(r||n==!1)?ls(e,t):t}const st=e=>e instanceof j?{...e}:e;function q(e,t){t=t||{};const n={};function r(c,f,d,S){return l.isPlainObject(c)&&l.isPlainObject(f)?l.merge.call({caseless:S},c,f):l.isPlainObject(f)?l.merge({},f):l.isArray(f)?f.slice():f}function s(c,f,d,S){if(l.isUndefined(f)){if(!l.isUndefined(c))return r(void 0,c,d,S)}else return r(c,f,d,S)}function o(c,f){if(!l.isUndefined(f))return r(void 0,f)}function i(c,f){if(l.isUndefined(f)){if(!l.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function a(c,f,d){if(d in t)return r(c,f);if(d in e)return r(void 0,c)}const u={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(c,f,d)=>s(st(c),st(f),d,!0)};return l.forEach(Object.keys({...e,...t}),function(f){const d=u[f]||s,S=d(e[f],t[f],f);l.isUndefined(S)&&d!==a||(n[f]=S)}),n}const Jt=e=>{const t=q({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;t.headers=i=j.from(i),t.url=Wt(Vt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(l.isFormData(n)){if(C.hasStandardBrowserEnv||C.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((u=i.getContentType())!==!1){const[c,...f]=u?u.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...f].join("; "))}}if(C.hasStandardBrowserEnv&&(r&&l.isFunction(r)&&(r=r(t)),r||r!==!1&&os(t.url))){const c=s&&o&&is.read(o);c&&i.set(s,c)}return t},cs=typeof XMLHttpRequest<"u",us=cs&&function(e){return new Promise(function(n,r){const s=Jt(e);let o=s.data;const i=j.from(s.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:c}=s,f,d,S,R,y;function h(){R&&R(),y&&y(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function A(){if(!p)return;const O=j.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),P={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:O,config:e,request:p};zt(function(_){n(_),h()},function(_){r(_),h()},P),p=null}"onloadend"in p?p.onloadend=A:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(A)},p.onabort=function(){p&&(r(new g("Request aborted",g.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new g("Network Error",g.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||$t;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new g(D,P.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,p)),p=null},o===void 0&&i.setContentType(null),"setRequestHeader"in p&&l.forEach(i.toJSON(),function(D,P){p.setRequestHeader(P,D)}),l.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),a&&a!=="json"&&(p.responseType=s.responseType),c&&([S,y]=ue(c,!0),p.addEventListener("progress",S)),u&&p.upload&&([d,R]=ue(u),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",R)),(s.cancelToken||s.signal)&&(f=O=>{p&&(r(!O||O.type?new V(null,e,p):O),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const x=ns(s.url);if(x&&C.protocols.indexOf(x)===-1){r(new g("Unsupported protocol "+x+":",g.ERR_BAD_REQUEST,e));return}p.send(o||null)})},fs=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(c){if(!s){s=!0,a();const f=c instanceof Error?c:this.reason;r.abort(f instanceof g?f:new V(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,o(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>l.asap(a),u}},ds=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},ps=async function*(e,t){for await(const n of ms(e))yield*ds(n,t)},ms=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ot=(e,t,n,r)=>{const s=ps(e,t);let o=0,i,a=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:f}=await s.next();if(c){a(),u.close();return}let d=f.byteLength;if(n){let S=o+=d;n(S)}u.enqueue(new Uint8Array(f))}catch(c){throw a(c),c}},cancel(u){return a(u),s.return()}},{highWaterMark:2})},Ee=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Kt=Ee&&typeof ReadableStream=="function",hs=Ee&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Gt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ys=Kt&&Gt(()=>{let e=!1;const t=new Request(C.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),it=64*1024,je=Kt&&Gt(()=>l.isReadableStream(new Response("").body)),fe={stream:je&&(e=>e.body)};Ee&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!fe[t]&&(fe[t]=l.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new g(`Response type '${t}' is not supported`,g.ERR_NOT_SUPPORT,r)})})})(new Response);const ws=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new Request(C.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(l.isArrayBufferView(e)||l.isArrayBuffer(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await hs(e)).byteLength},gs=async(e,t)=>{const n=l.toFiniteNumber(e.getContentLength());return n??ws(t)},Es=Ee&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:a,onUploadProgress:u,responseType:c,headers:f,withCredentials:d="same-origin",fetchOptions:S}=Jt(e);c=c?(c+"").toLowerCase():"text";let R=fs([s,o&&o.toAbortSignal()],i),y;const h=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let p;try{if(u&&ys&&n!=="get"&&n!=="head"&&(p=await gs(f,r))!==0){let P=new Request(t,{method:"POST",body:r,duplex:"half"}),b;if(l.isFormData(r)&&(b=P.headers.get("content-type"))&&f.setContentType(b),P.body){const[_,B]=nt(p,ue(rt(u)));r=ot(P.body,it,_,B)}}l.isString(d)||(d=d?"include":"omit");const A="credentials"in Request.prototype;y=new Request(t,{...S,signal:R,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:A?d:void 0});let x=await fetch(y,S);const O=je&&(c==="stream"||c==="response");if(je&&(a||O&&h)){const P={};["status","statusText","headers"].forEach(I=>{P[I]=x[I]});const b=l.toFiniteNumber(x.headers.get("content-length")),[_,B]=a&&nt(b,ue(rt(a),!0))||[];x=new Response(ot(x.body,it,_,()=>{B&&B(),h&&h()}),P)}c=c||"text";let D=await fe[l.findKey(fe,c)||"text"](x,e);return!O&&h&&h(),await new Promise((P,b)=>{zt(P,b,{data:D,headers:j.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:y})})}catch(A){throw h&&h(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,e,y),{cause:A.cause||A}):g.from(A,A&&A.code,e,y)}}),De={http:Dr,xhr:us,fetch:Es};l.forEach(De,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const at=e=>`- ${e}`,Ss=e=>l.isFunction(e)||e===null||e===!1,Yt={getAdapter:e=>{e=l.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!Ss(n)&&(r=De[(i=String(n)).toLowerCase()],r===void 0))throw new g(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : 20 20 `+o.map(at).join(` 21 `):" "+at(o[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters: ke};function Te(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new V(null,e)}function ct(e){return Te(e),e.headers=j.from(e.headers),e.data=Ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Kt.getAdapter(e.adapter||Z.adapter)(e).then(function(r){return Te(e),r.data=Ae.call(e,e.transformResponse,r),r.headers=j.from(r.headers),r},function(r){return $t(r)||(Te(e),r&&r.response&&(r.response.data=Ae.call(e,e.transformResponse,r.response),r.response.headers=j.from(r.response.headers))),Promise.reject(r)})}const Gt="1.7.9",ge={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ge[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const lt={};ge.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Gt+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new g(s(i," has been removed"+(n?" in "+n:"")),g.ERR_DEPRECATED);return n&&!lt[i]&&(lt[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}};ge.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ws(e,t,n){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const a=e[o],u=a===void 0||i(a,o,e);if(u!==!0)throw new g("option "+o+" must be "+u,g.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new g("Unknown option "+o,g.ERR_BAD_OPTION)}}const ae={assertOptions:ws,validators:ge},U=ae.validators;class ${constructor(t){this.defaults=t,this.interceptors={request:new et,response:new et}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`22 `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=q(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&& ae.assertOptions(r,{silentJSONParsing:U.transitional(U.boolean),forcedJSONParsing:U.transitional(U.boolean),clarifyTimeoutError:U.transitional(U.boolean)},!1),s!=null&&(c.isFunction(s)?n.paramsSerializer={serialize:s}:ae.assertOptions(s,{encode:U.function,serialize:U.function},!0)),ae.assertOptions(n,{baseUrl:U.spelling("baseURL"),withXsrfToken:U.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&c.merge(o.common,o[n.method]);o&&c.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=j.concat(i,o);const a=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(u=u&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let f,d=0,S;if(!u){const y=[ct.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,l),S=y.length,f=Promise.resolve(n);d<S;)f=f.then(y[d++],y[d++]);return f}S=a.length;let _=n;for(d=0;d<S;){const y=a[d++],m=a[d++];try{_=y(_)}catch(p){m.call(this,p);break}}try{f=ct.call(this,_)}catch(y){return Promise.reject(y)}for(d=0,S=l.length;d<S;)f=f.then(l[d++],l[d++]);return f}getUri(t){t=q(this.defaults,t);const n=Ht(t.baseURL,t.url);return It(n,t.params,t.paramsSerializer)}}c.forEach(["delete","get","head","options"],function(t){$.prototype[t]=function(n,r){return this.request(q(r||{},{method:t,url:n,data:(r||{}).data}))}});c.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,a){return this.request(q(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}$.prototype[t]=n(),$.prototype[t+"Form"]=n(!0)});class He{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new V(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new He(function(s){t=s}),cancel:t}}}function gs(e){return function(n){return e.apply(null,n)}}function Es(e){return c.isObject(e)&&e.isAxiosError===!0}const De={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(De).forEach(([e,t])=>{De[t]=e});function Yt(e){const t=new $(e),n=Ot($.prototype.request,t);return c.extend(n,$.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Yt(q(e,s))},n}const O=Yt(Z);O.Axios=$;O.CanceledError=V;O.CancelToken=He;O.isCancel=$t;O.VERSION=Gt;O.toFormData=ye;O.AxiosError=g;O.Cancel=O.CanceledError;O.all=function(t){return Promise.all(t)};O.spread=gs;O.isAxiosError=Es;O.mergeConfig=q;O.AxiosHeaders=j;O.formToJSON=e=>Wt(c.isHTMLForm(e)?new FormData(e):e);O.getAdapter=Kt.getAdapter;O.HttpStatusCode=De;O.default=O;const Xt=e=>{const{classes:t}=e,n=()=>{const r="skeleton ";return typeof t>"u"?r:r+t};return w.jsx("div",{className:n()})},Oe=h.wp.element.useState,te=h.wp.data.select,ut=h.wp.element.useEffect,Ss=h.wp.data.subscribe,bs=h.wp.data.useDispatch,Rs=h.wc.blocksCheckout.extensionCartUpdate,_s=h.wc.wcBlocksData.processErrorResponse,xs=h.wc.wcBlocksRegistry.registerPaymentMethodExtensionCallbacks,As=h.MLMSoftEWalletBlock.paymentGatewayId,Ts=()=>{const[e,t]=Oe(!1),[n,r]=Oe(""),[s,o]=Oe(te(P).getPaymentStatus()),i=h.MLMSoftEWalletBlock.payWithBonuses??{},a=te(P).getEWalletId(),{dispatchPaymentStatus:u}=bs(P),l=()=>{const m=te(P).getPaymentAmount();return{amount:An({amount:m}),walletId:a}},f=()=>{Rs({namespace:"mlmsoft/cart/update",data:{action:"add",key:"value",another_key:100,third_key:{fourth_key:!0}}}).then(()=>{}).catch(m=>{_s(m)})},d=()=>{xs("mlmsoft_payment_update",{"e-wallet":m=>{let p=!1;return m.cart.cartCoupons.map(x=>{x.code.indexOf(As)!==-1&&(p=!0)}),!p},cod:()=>{}})};ut(()=>{const m=Ss(()=>{o(te(P).getPaymentStatus())},de());return()=>{m()}},[]),ut(()=>{n!==""&&(u(!1),O({method:"POST",url:n,data:l()}).then(()=>{f(),d()}).catch(m=>{O.isCancel(m)}).finally(()=>{}))},[n]);const S=()=>{if(At()||fe()||Ie()){const m=Date.now(),p=JSON.stringify(l())+"|"+m+"|action="+i.action+"&handler="+i.handler,x=h.MLMSoftEWalletBlock.$s._k??"";Tt(p,x).then(function(T){return i.url+"×tamp="+m+"&digest="+T},function(){}).then(function(T){r(T)})}},_=()=>{const m="ewallet-form__";let p=[m+"payment-button"];return s||p.push("disabled"),p.push(m+"ewallet-id-"+a),p.join(" ")},y=m=>{t(!0),S()};return w.jsxs("div",{className:"ewallet-form__actions",children:[w.jsx("button",{type:"button",onClick:m=>{y()},disabled:!s,id:"ewallet-form__payment-button",className:_(),children:B("Pay")}),e&&w.jsx(Xt,{classes:"skeleton-payment-process"})]})},Os=e=>{const{classes:t,maxAmount:n,currencyId:r}=e;return w.jsxs("h5",{className:t,children:[B("Maximum amount for payment from a wallet"),": ",ve({num:n})," ",r]})},ft=h.wp.data.select,Ps=h.wp.element.useMemo,Ns=()=>{const e=ft(P).getEWalletId(),t=ft(P).getPaymentInfo(),n=()=>{var a;return(a=t.data)==null?void 0:a.wallets.filter(u=>u.id===e)},r=Ps(()=>n(),[e]),s=()=>parseFloat(r[0].balance),o=()=>r[0].maxAmount,i=()=>r[0].currency_id;return s()===0?w.jsx(w.Fragment,{children:w.jsx("h5",{children:B("There is nothing to pay with")})}):w.jsxs(w.Fragment,{children:[w.jsx(Os,{classes:"ewallet-info",maxAmount:o(),currencyId:i()}),w.jsxs("div",{className:"ewallet-form",children:[w.jsx(Hn,{balance:s(),maxAmount:o(),currencyId:i()}),w.jsx(Ts,{})]},"ewallet-form")]})},Cs=h.wp.element.useState,Ls=h.wp.element.useEffect,js=h.wp.data.useDispatch,ks=h.wp.data.select,Ds=h.wp.data.subscribe,Bs=e=>{const{eWallets:t}=e,{dispatchEWalletId:n,dispatchLog:r}=js(P),[s,o]=Cs(0);Ls(()=>(Ds(()=>{o(ks(P).getEWalletId())},de()),()=>{}),[]);const i=t.map((a,u)=>(s===0&&u===0&&(n(a.id),r({type:G.EWALLET,action:"eWallet has been selected: "+a.id})),w.jsx(Mn,{eWallet:a})));return t.length===0?w.jsx(w.Fragment,{}):w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"ewallet-item__group",children:i},"item-group"),w.jsx(Ns,{})]})},Fs={getPaymentInfoTestData(){return{success:!0,data:{wallets:[{id:3,"#title":"Бонусный счёт RUB",title:"Бонусный счёт RUB",alias:"Virtual_wallet",currency_id:"RUB",balance:"75000.75",maxAmount:1147*1},{id:100,"#title":"Cashback RUB",title:"Cashback RUB",alias:"CashbackRUB",currency_id:"RUB",balance:"200.00",maxAmount:1147*.7}],currency:"RUB",maxAmount:12510},error:null}},getTestUrl(){return h.MLMSoftEWalletBlock.testData.url}},{getPaymentInfoTestData:Us,getTestUrl:Qs}=Fs,dt=h.wp.element.useState,Ms=h.wp.element.useEffect,Is=h.wp.element.useMemo,vs=()=>{const[e,t]=dt({}),[n,r]=dt(""),s={success:!1,error:null,data:null},o=()=>{if(Pe(),At()||fe()||Ie()){const i=h.MLMSoftEWalletBlock.paymentInfo,a=Date.now(),u=i.body+"|"+a+"|action="+i.action+"&handler="+i.handler,l=h.MLMSoftEWalletBlock.$s._k??"";Tt(u,l).then(function(d){let S=h.MLMSoftEWalletBlock.paymentInfo.url+"×tamp="+a+"&digest="+d;r(S)})}};return Is(()=>o(),[]),Ms(()=>{Pe()?setTimeout(()=>{t(Us())},2e3):n!==""&&O({method:"GET",url:n}).then(i=>{t(i.data)}).catch(i=>{O.isCancel(i)||t(s)}).finally(()=>{})},[n]),{paymentInfo:e}},pt=h.wp.element.useState,Ws=h.wp.element.useEffect,$s=h.wp.data.useDispatch,qs=()=>{const[e,t]=pt(!0),[n,r]=pt([]),{dispatchPaymentInfo:s}=$s(P),{paymentInfo:o}=vs();return Ws(()=>{typeof o.success<"u"&&(s(o),o.success&&o.data!==null&&r(o.data.wallets),t(!1))},[o]),e?w.jsx(Xt,{classes:"skeleton-loading"}):o.success===!1?w.jsx(bn,{"data-error":o.error,children:w.jsx("h5",{children:B(o.error)})}):w.jsxs(w.Fragment,{children:[w.jsx(Rn,{className:"ewallet-header__wrapper","data-caption":"Payment from bonus wallet",children:w.jsx("h2",{className:"ewallet-header",children:B("Payment from bonus wallet")})}),w.jsx(_n,{caption:B("Please select the wallet"),classes:"ewallet-subheader"}),w.jsx(Bs,{eWallets:n})]})},Hs=({content:e,classes:t})=>(t="ewallet-content "+t,w.jsx("div",{className:t,children:e})),zs=({id:e})=>w.jsxs("div",{className:"ewallet-payment-app__wrapper",id:e,children:[Ke()&&w.jsx(qs,{}),!Ke()&&w.jsx(Hs,{content:B("No E-Wallets available"),classes:"no-ewallets-available"})]}),Vs=(e,t)=>["Discount","Zzzzz"].includes(t)?B(t):e;h.wp.hooks.addFilter("i18n.gettext","mlmsoft/gettext/filter",Vs);const Js=()=>(Pe()&&console.log("LOCAL DEVELOPMENT"),fe()&&console.log("DEV DEVELOPMENT"),w.jsx("div",{className:"App",id:"ewallet-app-root",children:w.jsx(zs,{id:"ewallet-payment-app"})}));{const e=h.wc.wcSettings.getSetting(h.MLMSoftEWalletBlock.settingKey,{}),t=h.wp.htmlEntities.decodeEntities(e.name)||"",n=h.wp.htmlEntities.decodeEntities(e.title)||"E-Wallet",r=()=>w.jsx(Js,{}),s=()=>h.wp.htmlEntities.decodeEntities(e.description||"Default description"),o={name:t,label:n,content:r(),edit:Object(h.wp.element.createElement)(s,null),canMakePayment:()=>!0,ariaLabel:n,supports:{features:e.supports},billing:{}};h.wc.wcBlocksRegistry.registerPaymentMethod(o)}21 `):" "+at(o[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:De};function Te(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new V(null,e)}function lt(e){return Te(e),e.headers=j.from(e.headers),e.data=Oe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Yt.getAdapter(e.adapter||te.adapter)(e).then(function(r){return Te(e),r.data=Oe.call(e,e.transformResponse,r),r.headers=j.from(r.headers),r},function(r){return Ht(r)||(Te(e),r&&r.response&&(r.response.data=Oe.call(e,e.transformResponse,r.response),r.response.headers=j.from(r.response.headers))),Promise.reject(r)})}const Xt="1.11.0",Se={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Se[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ct={};Se.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Xt+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new g(s(i," has been removed"+(n?" in "+n:"")),g.ERR_DEPRECATED);return n&&!ct[i]&&(ct[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}};Se.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function bs(e,t,n){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const a=e[o],u=a===void 0||i(a,o,e);if(u!==!0)throw new g("option "+o+" must be "+u,g.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new g("Unknown option "+o,g.ERR_BAD_OPTION)}}const ce={assertOptions:bs,validators:Se},M=ce.validators;class ${constructor(t){this.defaults=t||{},this.interceptors={request:new et,response:new et}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` 22 `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=q(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&ce.assertOptions(r,{silentJSONParsing:M.transitional(M.boolean),forcedJSONParsing:M.transitional(M.boolean),clarifyTimeoutError:M.transitional(M.boolean)},!1),s!=null&&(l.isFunction(s)?n.paramsSerializer={serialize:s}:ce.assertOptions(s,{encode:M.function,serialize:M.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ce.assertOptions(n,{baseUrl:M.spelling("baseURL"),withXsrfToken:M.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&l.merge(o.common,o[n.method]);o&&l.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=j.concat(i,o);const a=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let f,d=0,S;if(!u){const y=[lt.bind(this),void 0];for(y.unshift(...a),y.push(...c),S=y.length,f=Promise.resolve(n);d<S;)f=f.then(y[d++],y[d++]);return f}S=a.length;let R=n;for(d=0;d<S;){const y=a[d++],h=a[d++];try{R=y(R)}catch(p){h.call(this,p);break}}try{f=lt.call(this,R)}catch(y){return Promise.reject(y)}for(d=0,S=c.length;d<S;)f=f.then(c[d++],c[d++]);return f}getUri(t){t=q(this.defaults,t);const n=Vt(t.baseURL,t.url,t.allowAbsoluteUrls);return Wt(n,t.params,t.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(t){$.prototype[t]=function(n,r){return this.request(q(r||{},{method:t,url:n,data:(r||{}).data}))}});l.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,a){return this.request(q(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}$.prototype[t]=n(),$.prototype[t+"Form"]=n(!0)});class ze{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new V(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ze(function(s){t=s}),cancel:t}}}function _s(e){return function(n){return e.apply(null,n)}}function Rs(e){return l.isObject(e)&&e.isAxiosError===!0}const Fe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Fe).forEach(([e,t])=>{Fe[t]=e});function Qt(e){const t=new $(e),n=Pt($.prototype.request,t);return l.extend(n,$.prototype,t,{allOwnKeys:!0}),l.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Qt(q(e,s))},n}const T=Qt(te);T.Axios=$;T.CanceledError=V;T.CancelToken=ze;T.isCancel=Ht;T.VERSION=Xt;T.toFormData=ge;T.AxiosError=g;T.Cancel=T.CanceledError;T.all=function(t){return Promise.all(t)};T.spread=_s;T.isAxiosError=Rs;T.mergeConfig=q;T.AxiosHeaders=j;T.formToJSON=e=>qt(l.isHTMLForm(e)?new FormData(e):e);T.getAdapter=Yt.getAdapter;T.HttpStatusCode=Fe;T.default=T;const Zt=e=>{const{classes:t}=e,n=()=>{const r="skeleton ";return typeof t>"u"?r:r+t};return w.jsx("div",{className:n()})},Ne=m.wp.element.useState,re=m.wp.data.select,ut=m.wp.element.useEffect,As=m.wp.data.subscribe,xs=m.wp.data.useDispatch,Os=m.wc.blocksCheckout.extensionCartUpdate,Ts=m.wc.wcBlocksData.processErrorResponse,Ns=m.wc.wcBlocksRegistry.registerPaymentMethodExtensionCallbacks,Ps=m.MLMSoftEWalletBlock.paymentGatewayId,Cs=()=>{const[e,t]=Ne(!1),[n,r]=Ne(""),[s,o]=Ne(re(N).getPaymentStatus()),i=m.MLMSoftEWalletBlock.payWithBonuses??{},a=re(N).getEWalletId(),{dispatchPaymentStatus:u}=xs(N),c=()=>{const h=re(N).getPaymentAmount();return{amount:Pn({amount:h}),walletId:a}},f=()=>{Os({namespace:"mlmsoft/cart/update",data:{action:"add",key:"value",another_key:100,third_key:{fourth_key:!0}}}).then(()=>{}).catch(h=>{Ts(h)})},d=()=>{Ns("mlmsoft_payment_update",{"e-wallet":h=>{let p=!1;return h.cart.cartCoupons.map(A=>{A.code.indexOf(Ps)!==-1&&(p=!0)}),!p},cod:()=>{}})};ut(()=>{const h=As(()=>{o(re(N).getPaymentStatus())},me());return()=>{h()}},[]),ut(()=>{n!==""&&(u(!1),T({method:"POST",url:n,data:c()}).then(()=>{f(),d()}).catch(h=>{T.isCancel(h)}).finally(()=>{}))},[n]);const S=()=>{if(Tt()||pe()||ve()){const h=Date.now(),p=JSON.stringify(c())+"|"+h+"|action="+i.action+"&handler="+i.handler,A=m.MLMSoftEWalletBlock.$s._k??"";Nt(p,A).then(function(O){return i.url+"×tamp="+h+"&digest="+O},function(){}).then(function(O){r(O)})}},R=()=>{const h="ewallet-form__";let p=[h+"payment-button"];return s||p.push("disabled"),p.push(h+"ewallet-id-"+a),p.join(" ")},y=h=>{t(!0),S()};return w.jsxs("div",{className:"ewallet-form__actions",children:[w.jsx("button",{type:"button",onClick:h=>{y()},disabled:!s,id:"ewallet-form__payment-button",className:R(),children:F("Pay")}),e&&w.jsx(Zt,{classes:"skeleton-payment-process"})]})},Ls=e=>{const{classes:t,maxAmount:n,currencyId:r}=e;return w.jsxs("h5",{className:t,children:[F("Maximum amount for payment from a wallet"),": ",w.jsx("span",{children:We({num:n})})," ",r]})},ft=m.wp.data.select,ks=m.wp.element.useMemo,js=()=>{const e=ft(N).getEWalletId(),t=ft(N).getPaymentInfo(),n=()=>{var a;return(a=t.data)==null?void 0:a.wallets.filter(u=>u.id===e)},r=ks(()=>n(),[e]),s=()=>parseFloat(r[0].balance),o=()=>r[0].maxAmount,i=()=>r[0].currency_id;return s()===0?w.jsx(w.Fragment,{children:w.jsx("h5",{children:F("There is nothing to pay with")})}):w.jsxs(w.Fragment,{children:[w.jsx(Ls,{classes:"ewallet-info",maxAmount:o(),currencyId:i()}),w.jsxs("div",{className:"ewallet-form",children:[w.jsx(Kn,{balance:s(),maxAmount:o(),currencyId:i()}),w.jsx(Cs,{})]},"ewallet-form")]})},Ds=m.wp.element.useState,Fs=m.wp.element.useEffect,Us=m.wp.data.useDispatch,Ms=m.wp.data.select,Bs=m.wp.data.subscribe,Is=e=>{const{eWallets:t}=e,{dispatchEWalletId:n,dispatchLog:r}=Us(N),[s,o]=Ds(0);Fs(()=>(Bs(()=>{o(Ms(N).getEWalletId())},me()),()=>{}),[]);const i=t.map((a,u)=>(s===0&&u===0&&(n(a.id),r({type:G.EWALLET,action:"eWallet has been selected: "+a.id})),w.jsx($n,{eWallet:a})));return t.length===0?w.jsx(w.Fragment,{}):w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"ewallet-item__group",children:i},"item-group"),w.jsx(js,{})]})},Pe=m.wp.element.useState,vs=m.wp.element.useEffect,Ws=m.wp.element.useMemo,$s=m.wp.data.select,qs=()=>{const[e,t]=Pe({}),[n,r]=Pe(""),s=$s("wc/store/cart").getCartData().totals,[o,i]=Pe(""),a={success:!1,error:null,data:null},u=()=>{if(Tt()||pe()||ve()){const c=m.MLMSoftEWalletBlock.paymentInfo,f=Date.now(),d=c.body+"|"+f+"|action="+c.action+"&handler="+c.handler,S=m.MLMSoftEWalletBlock.$s._k??"";Nt(d,S).then(function(y){let h=m.MLMSoftEWalletBlock.paymentInfo.url+"×tamp="+f+"&digest="+y;r(h)})}};return Ws(()=>{u()},[]),vs(()=>{Ot()||n!==""&&s.total_price!==o&&(i(s.total_price),T({method:"GET",url:n}).then(c=>{t(c.data)}).catch(c=>{T.isCancel(c)||t(a)}).finally(()=>{}))},[n,s]),{paymentInfo:e}},dt=m.wp.element.useState,pt=m.wp.element.useEffect,Hs=m.wp.data.useDispatch,zs=m.wp.data.select,Vs=()=>{const[e,t]=dt(!0),[n,r]=dt([]),{dispatchPaymentInfo:s}=Hs(N),{paymentInfo:o}=qs(),i=zs("wc/store/cart").isShippingRateBeingSelected();return pt(()=>{i&&t(!0)},[i]),pt(()=>{typeof o.success<"u"&&(s(o),o.success&&o.data!==null&&r(o.data.wallets),t(!1))},[o]),e?w.jsx(Zt,{classes:"skeleton-loading"}):o.success===!1?w.jsx(Rn,{"data-error":o.error,children:w.jsx("h5",{children:F(o.error)})}):w.jsxs(w.Fragment,{children:[w.jsx(An,{className:"ewallet-header__wrapper","data-caption":"Payment from bonus wallet",children:w.jsx("h2",{className:"ewallet-header",children:F("Payment from bonus wallet")})}),w.jsx(xn,{caption:F("Please select the wallet"),classes:"ewallet-subheader"}),w.jsx(Is,{eWallets:n})]})},Js=({content:e,classes:t})=>(t="ewallet-content "+t,w.jsx("div",{className:t,children:e})),Ks=({id:e})=>w.jsxs("div",{className:"ewallet-payment-app__wrapper",id:e,children:[Ge()&&w.jsx(Vs,{}),!Ge()&&w.jsx(Js,{content:F("No E-Wallets available"),classes:"no-ewallets-available"})]}),Gs=(e,t)=>["Discount","Zzzzz"].includes(t)?F(t):e;m.wp.hooks.addFilter("i18n.gettext","mlmsoft/gettext/filter",Gs);const Ys=()=>(Ot()&&console.log("LOCAL DEVELOPMENT"),pe()&&console.log("DEV DEVELOPMENT on Asus Vivobook 16"),w.jsx("div",{className:"App",id:"ewallet-app-root",children:w.jsx(Ks,{id:"ewallet-payment-app"})}));{const e=m.wc.wcSettings.getSetting(m.MLMSoftEWalletBlock.settingKey,{}),t=m.wp.htmlEntities.decodeEntities(e.name)||"",n=m.wp.htmlEntities.decodeEntities(e.title)||"E-Wallet",r=()=>w.jsx(Ys,{}),s=()=>m.wp.htmlEntities.decodeEntities(e.description||"Default description"),o={name:t,label:n,content:r(),edit:Object(m.wp.element.createElement)(s,null),canMakePayment:()=>!0,ariaLabel:n,supports:{features:e.supports},billing:{}};m.wc.wcBlocksRegistry.registerPaymentMethod(o)} -
mlm-soft-integration/trunk/integrations/woocommerce/modules/WCAccountModule.php
r3376875 r3381700 51 51 add_action('woocommerce_created_customer', array($this, 'createdCustomer'), 10, 3); 52 52 add_action('woocommerce_save_account_details', array($this, 'saveAccountDetails'), 10, 1); 53 add_action('edit_user_profile_update', array($this, 'saveAccountDetails'), 10, 1); 53 54 /** 55 * @since 3.13.0 56 * @see wp-admin\user-edit.php 57 */ 58 // add_action('edit_user_profile_update', array($this, 'saveAccountDetails'), 10, 1); 59 add_action('edit_user_profile_update', array($this, 'userProfileUpdate'), 10, 1); 54 60 55 61 /** … … 57 63 */ 58 64 add_action('woocommerce_register_form', array($this, 'addSponsorField'), 1); 65 66 /** 67 * @since 3.13.0 68 */ 69 add_action( 'admin_notices', [$this, 'adminNotices'] ); 70 } 71 72 /** 73 * @since 3.13.0 74 */ 75 public function adminNotices() 76 { 77 global $pagenow; 78 if ( 'user-edit.php' !== $pagenow ) { 79 return; 80 } 81 82 $errorMessage = []; 83 $errorMessage['profile'] = 'Error updating user profile'; 84 $errorMessage['password'] = 'Error updating user password'; 85 $key = sanitize_text_field($_GET['error']); 86 if ( isset($_GET['error']) && array_key_exists( $key, $errorMessage ) ) { 87 $notice = '<div class="notice notice-error">'; 88 $notice .= '<p>'; 89 $notice .= $errorMessage[$key]; 90 $notice .= '</p>'; 91 $notice .= '</div>'; 92 echo $notice; 93 } 59 94 } 60 95 … … 66 101 public function addSponsorField() 67 102 { 68 69 103 $sponsorFieldStatus = $this->options->registrationSponsorFieldStatus; 70 104 … … 245 279 246 280 /** 281 * @scope admin 282 * 283 * @since 3.13.0 284 */ 285 public function userProfileUpdate($wpUserId) 286 { 287 $syncUsers = $this->mlmsoftPlugin->options->syncUsers; 288 if (!$syncUsers) { 289 return; 290 } 291 292 $localUser = new MLMSoftLocalUser($wpUserId); 293 $remoteUser = MLMSoftRemoteWCUser::loadByWpUser($localUser); 294 if (!$remoteUser) { 295 return; 296 } 297 298 $updateAgain = false; 299 try { 300 $res = $remoteUser->updateWCProfile($localUser, $_REQUEST); 301 } catch (Exception $e) { 302 $res = false; 303 if ( $e->getMessage() == 'Error when editing a profile field' ) { 304 $updateAgain = true; 305 } 306 } 307 308 if ( $updateAgain ) { 309 $res = true; 310 unset( $_REQUEST['billing_phone'] ); 311 try { 312 $res = $remoteUser->updateWCProfile($localUser, $_REQUEST); 313 } catch (Exception $e) { 314 $res = false; 315 } 316 } 317 318 if (!$res) { 319 // wc_add_notice('Error updating user profile', 'error'); 320 $url = add_query_arg( 321 [ 322 'user_id' => $_REQUEST['user_id'], 323 'error' => 'profile' 324 ], 325 admin_url('user-edit.php') 326 ); 327 wp_redirect($url); 328 exit; 329 } 330 331 if (!empty($_REQUEST['password_1'])) { 332 $res = $remoteUser->setPassword($_REQUEST['password_1']); 333 if (!$res) { 334 // wc_add_notice('Error updating user password', 'error'); 335 $url = add_query_arg( 336 [ 337 'user_id' => $_REQUEST['user_id'], 338 'error' => 'password' 339 ], 340 admin_url('user-edit.php') 341 ); 342 wp_redirect($url); 343 exit; 344 } 345 } 346 } 347 348 /** 247 349 * @return MLMSoftReferral|WP_Error|null 248 350 */ -
mlm-soft-integration/trunk/integrations/woocommerce/paymentGateways/eWallet/MLMSoftEWalletGateway.php
r3213832 r3381700 11 11 use MLMSoft\integrations\woocommerce\paymentGateways\eWallet\modules\EWalletOrderModule; 12 12 use MLMSoft\integrations\woocommerce\WCIntegrationOptions; 13 use MLMSoft\integrations\woocommerce\paymentGateways\eWalletBlock\models\EWalletBlockCartHelper; 13 14 use WC_Payment_Gateway; 14 15 // @since 3.6.616 15 17 16 class MLMSoftEWalletGateway extends WC_Payment_Gateway … … 113 112 return; 114 113 } 115 $this->componentLoader->enqueue(); 114 115 /** 116 * @since 3.12.0 117 */ 118 if ( ! EWalletBlockCartHelper::has_block_in_checkout() ) { 119 $this->componentLoader->enqueue(); 120 } 116 121 } 117 122 … … 121 126 public function checkout_page_styles() 122 127 { 128 /** 129 * @since 3.12.0 130 */ 131 if ( EWalletBlockCartHelper::has_block_in_checkout() ) { 132 return; 133 } 134 123 135 $useCss = WCIntegrationOptions::getInstance()->useCheckoutCss; 124 136 $css = WCIntegrationOptions::getInstance()->checkoutCss; -
mlm-soft-integration/trunk/integrations/woocommerce/paymentGateways/eWallet/models/EWalletCartHelper.php
r3257446 r3381700 11 11 use WC_Cart; 12 12 use WC_Coupon; 13 14 /** 15 * @since 3.12.0 16 */ 17 use MLMSoft\integrations\woocommerce\paymentGateways\eWalletBlock\models\EWalletBlockCartHelper; 13 18 14 19 class EWalletCartHelper … … 34 39 { 35 40 if (empty($this->cart)) { 41 /** 42 * Cart prop is empty on checkout page when using block editor. 43 * @since 3.12.0 44 */ 45 if ( EWalletBlockCartHelper::has_block_in_checkout() ) { 46 if ( WC()->cart && WC()->cart->get_applied_coupons() ) { 47 foreach (WC()->cart->get_applied_coupons() as $couponCode) { 48 if ( EWalletCoupon::isEWalletCoupon($couponCode) ) { 49 return true; 50 } 51 } 52 53 } 54 } 55 36 56 return false; 37 57 } 58 38 59 $coupons = $this->cart->get_coupons(); 39 60 /** @var WC_Coupon $coupon */ … … 112 133 113 134 /** 114 * Cart is empty on checkout page when using block editor.135 * Cart prop is empty on checkout page when using block editor. 115 136 * @since 3.9.0 116 137 */ -
mlm-soft-integration/trunk/integrations/woocommerce/paymentGateways/eWalletBlock/MLMSoftEWalletBlockGateway.php
r3362112 r3381700 22 22 23 23 /** 24 * @since 3.12.0 25 */ 26 use MLMSoft\integrations\woocommerce\paymentGateways\eWalletBlock\modules\EWalletBlockCartModule; 27 use MLMSoft\integrations\woocommerce\paymentGateways\eWalletBlock\models\EWalletBlockCartHelper; 28 29 /** 24 30 * MLMSoftEWallet payment method integration. 25 31 */ 26 final class MLMSoftEWalletBlockGateway extends AbstractPaymentMethodType {27 32 final class MLMSoftEWalletBlockGateway extends AbstractPaymentMethodType 33 { 28 34 /** 29 35 * @var string … … 63 69 ] 64 70 ); 71 72 $this->initGateway(); 65 73 } 66 74 … … 197 205 'extraDecimalSeparator' => ',', 198 206 'paymentGatewayId' => MLMSoftEWalletGateway::GATEWAY_ID, 199 '$s' => ['_k' => SignHelper::createSignKey(__FUNCTION__)] ,207 '$s' => ['_k' => SignHelper::createSignKey(__FUNCTION__)] 200 208 ); 201 209 … … 264 272 ]; 265 273 } 274 275 /** 276 * @since 3.12.0 277 */ 278 public function initGateway() 279 { 280 if ( ! EWalletBlockCartHelper::has_block_in_checkout() ) { 281 return; 282 } 283 284 EWalletBlockCartModule::getInstance(); 285 } 266 286 } 267 287 -
mlm-soft-integration/trunk/mlm-soft-integration.php
r3380390 r3381700 4 4 Plugin Name: MLM Soft Integration 5 5 Description: WP integration with mlm-soft.com cloud platform 6 Version: 3.1 1.06 Version: 3.13.0 7 7 Author: MLM Soft Ltd. 8 8 Author URI: https://mlm-soft.com
Note: See TracChangeset
for help on using the changeset viewer.