Current File : /home/kelaby89/abl.academy/wp-content/plugins/woocommerce-payments/dist/multi-currency.js |
/*! For license information please see multi-currency.js.LICENSE.txt */
(()=>{var e={4418:(e,t,r)=>{"use strict";var n=r(1609),o=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var n,c={},l=null,u=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,n)&&!s.hasOwnProperty(n)&&(c[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===c[n]&&(c[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:u,props:c,_owner:i.current}}},7706:(e,t,r)=>{"use strict";e.exports=r(4418)},5955:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,s=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a),l=["gridicon","gridicons-checkmark",s,!1,!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:l,height:r,width:r,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414z"})))};var n,o=(n=r(1609))&&n.__esModule?n:{default:n},a=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)}},9387:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,s=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a),l=["gridicon","gridicons-cross-circle",s,!1,!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:l,height:r,width:r,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.1 4.9C15.2 1 8.8 1 4.9 4.9S1 15.2 4.9 19.1s10.2 3.9 14.1 0 4-10.3.1-14.2zm-4.3 11.3L12 13.4l-2.8 2.8-1.4-1.4 2.8-2.8-2.8-2.8 1.4-1.4 2.8 2.8 2.8-2.8 1.4 1.4-2.8 2.8 2.8 2.8-1.4 1.4z"})))};var n,o=(n=r(1609))&&n.__esModule?n:{default:n},a=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)}},4275:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,s=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a),l=["gridicon","gridicons-info-outline",s,!!function(e){return 0==e%18}(r)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:l,height:r,width:r,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"})))};var n,o=(n=r(1609))&&n.__esModule?n:{default:n},a=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)}},9031:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,s=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a),l=["gridicon","gridicons-notice-outline",s,!!function(e){return 0==e%18}(r)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:l,height:r,width:r,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))};var n,o=(n=r(1609))&&n.__esModule?n:{default:n},a=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)}},4146:(e,t,r)=>{"use strict";var n=r(3404),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return n.isMemo(e)?i:s[e.$$typeof]||o}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=i;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,y=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(y){var o=p(r);o&&o!==y&&e(t,o,n)}var i=u(r);d&&(i=i.concat(d(r)));for(var s=c(t),h=c(r),f=0;f<i.length;++f){var _=i[f];if(!(a[_]||n&&n[_]||h&&h[_]||s&&s[_])){var g=m(r,_);try{l(t,_,g)}catch(e){}}}}return t}},3072:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,m=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,f=r?Symbol.for("react.lazy"):60116,_=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,v=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case d:case a:case s:case i:case p:return e;default:switch(e=e&&e.$$typeof){case l:case m:case f:case h:case c:return e;default:return t}}case o:return t}}}function S(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=c,t.Element=n,t.ForwardRef=m,t.Fragment=a,t.Lazy=f,t.Memo=h,t.Portal=o,t.Profiler=s,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return S(e)||w(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===m},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===f},t.isMemo=function(e){return w(e)===h},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===i},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===s||e===i||e===p||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===c||e.$$typeof===l||e.$$typeof===m||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v||e.$$typeof===_)},t.typeOf=w},3404:(e,t,r)=>{"use strict";e.exports=r(3072)},8616:e=>{e.exports=function(e,t){var r,n,o=0;function a(){var a,i,s=r,c=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(i=0;i<c;i++)if(s.args[i]!==arguments[i]){s=s.next;continue e}return s!==r&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=r,s.prev=null,r.prev=s,r=s),s.val}s=s.next}for(a=new Array(c),i=0;i<c;i++)a[i]=arguments[i];return s={args:a,val:e.apply(null,a)},r?(r.prev=s,s.next=r):n=s,o===t.maxSize?(n=n.prev).next=null:o++,r=s,s.val}return t=t||{},a.clear=function(){r=null,n=null,o=0},a}},5228:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,i,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))r.call(a,l)&&(s[l]=a[l]);if(t){i=t(a);for(var u=0;u<i.length;u++)n.call(a,i[u])&&(s[i[u]]=a[i[u]])}}return s}},5606:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],l=!1,u=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):u=-1,c.length&&m())}function m(){if(!l){var e=i(d);l=!0;for(var t=c.length;t;){for(s=c,c=[];++u<t;)s&&s[u].run();u=-1,t=c.length}s=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function y(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||l||i(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=y,n.addListener=y,n.once=y,n.off=y,n.removeListener=y,n.removeAllListeners=y,n.emit=y,n.prependListener=y,n.prependOnceListener=y,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},1020:(e,t,r)=>{"use strict";r(5228);var n=r(1609),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;o=a("react.element"),t.Fragment=a("react.fragment")}var i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var n,a={},l=null,u=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,n)&&!c.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:u,props:a,_owner:i.current}}t.jsx=l,t.jsxs=l},4848:(e,t,r)=>{"use strict";e.exports=r(1020)},1609:e=>{"use strict";e.exports=window.React},6942:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(e,a(r)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=i(t,r));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.p=window.wcpayAssets.url,(()=>{"use strict";var e={};r.r(e),r.d(e,{getAllDepositsOverviews:()=>Wn,getAllDepositsOverviewsError:()=>Gn,getDeposit:()=>Vn,getDepositQueryError:()=>Kn,getDeposits:()=>Zn,getDepositsCount:()=>Xn,getDepositsSummary:()=>eo,getDepositsSummaryError:()=>to,getInstantDeposit:()=>ro});var t={};r.r(t),r.d(t,{submitInstantDeposit:()=>bo,updateAllDepositsOverviews:()=>uo,updateDeposit:()=>lo,updateDeposits:()=>po,updateDepositsCount:()=>yo,updateDepositsSummary:()=>fo,updateErrorForAllDepositsOverviews:()=>mo,updateErrorForDepositQuery:()=>ho,updateErrorForDepositsSummary:()=>_o,updateInstantDeposit:()=>go});var n={};r.r(n),r.d(n,{getAllDepositsOverviews:()=>wo,getDeposit:()=>vo,getDeposits:()=>Ro,getDepositsSummary:()=>Oo,getPayoutsCSVRequestURL:()=>To,payoutsDownloadEndpoint:()=>Eo});var o={};r.r(o),r.d(o,{getFraudOutcomeTransactions:()=>Mo,getFraudOutcomeTransactionsError:()=>Lo,getFraudOutcomeTransactionsSummary:()=>$o,getFraudOutcomeTransactionsSummaryError:()=>zo,getTransactions:()=>Io,getTransactionsError:()=>ko,getTransactionsSummary:()=>Po,getTransactionsSummaryError:()=>Do});var a={};r.r(a),r.d(a,{updateErrorForFraudOutcomeTransactions:()=>Wo,updateErrorForFraudOutcomeTransactionsSummary:()=>Qo,updateErrorForTransactions:()=>qo,updateErrorForTransactionsSummary:()=>Yo,updateFraudOutcomeTransactions:()=>Vo,updateFraudOutcomeTransactionsSummary:()=>Go,updateTransactions:()=>Bo,updateTransactionsSummary:()=>Ho});var i={};r.r(i),r.d(i,{formatQueryFilters:()=>Zo,getFraudOutcomeTransactions:()=>ta,getFraudOutcomeTransactionsExport:()=>na,getFraudOutcomeTransactionsSummary:()=>ra,getTransactions:()=>Xo,getTransactionsCSVRequestURL:()=>Jo,getTransactionsSummary:()=>ea,transactionsDownloadEndpoint:()=>Ko});var s={};r.r(s),r.d(s,{getCharge:()=>aa,getChargeError:()=>ia,getChargeFromOrder:()=>sa,getChargeFromOrderError:()=>ca});var c={};r.r(c),r.d(c,{updateCharge:()=>la,updateErrorForCharge:()=>ua});var l={};r.r(l),r.d(l,{getCharge:()=>da,getChargeFromOrder:()=>ma});var u={};r.r(u),r.d(u,{getTimeline:()=>ya,getTimelineError:()=>ha});var d={};r.r(d),r.d(d,{updateErrorForTimeline:()=>_a,updateTimeline:()=>fa});var m={};r.r(m),r.d(m,{getTimeline:()=>ga});var p={};r.r(p),r.d(p,{getCachedDispute:()=>Ta,getDispute:()=>Sa,getDisputeError:()=>Ea,getDisputes:()=>Ra,getDisputesSummary:()=>Oa});var y={};r.r(y),r.d(y,{refundCharge:()=>Ia,updateErrorForPaymentIntent:()=>Na,updatePaymentIntent:()=>Aa});var h={};r.r(h),r.d(h,{getPaymentIntent:()=>ka});var f={};r.r(f),r.d(f,{acceptDispute:()=>Ma,updateDispute:()=>ja,updateDisputes:()=>Da,updateDisputesSummary:()=>Fa,updateErrorForDispute:()=>Pa});var _={};r.r(_),r.d(_,{disputesDownloadEndpoint:()=>Ha,getDispute:()=>Va,getDisputes:()=>Wa,getDisputesCSVRequestURL:()=>Ya,getDisputesSummary:()=>Ga});var g={};r.r(g),r.d(g,{getAccountBusinessSupportEmail:()=>di,getAccountBusinessSupportPhone:()=>mi,getAccountDomesticCurrency:()=>pi,getAccountStatementDescriptor:()=>ci,getAccountStatementDescriptorKana:()=>ui,getAccountStatementDescriptorKanji:()=>li,getAdvancedFraudProtectionSettings:()=>Yi,getAvailablePaymentMethodIds:()=>oi,getCompletedWaitingPeriod:()=>gi,getCurrentProtectionLevel:()=>Hi,getDepositDelayDays:()=>_i,getDepositRestrictions:()=>vi,getDepositScheduleInterval:()=>yi,getDepositScheduleMonthlyAnchor:()=>fi,getDepositScheduleWeeklyAnchor:()=>hi,getDepositStatus:()=>bi,getDuplicatedPaymentMethodIds:()=>ti,getEnabledPaymentMethodIds:()=>ni,getIsCardPresentEligible:()=>Di,getIsDebugLogEnabled:()=>Oi,getIsDevModeEnabled:()=>Ti,getIsManualCaptureEnabled:()=>wi,getIsMultiCurrencyEnabled:()=>xi,getIsPaymentRequestEnabled:()=>Ri,getIsSavedCardsEnabled:()=>ji,getIsStripeBillingEnabled:()=>Wi,getIsStripeBillingMigrationInProgress:()=>Gi,getIsSubscriptionsPluginActive:()=>Li,getIsTestModeEnabled:()=>Si,getIsTestModeOnboarding:()=>Ei,getIsWCPayEnabled:()=>ri,getIsWCPaySubscriptionsEligible:()=>Mi,getIsWCPaySubscriptionsEnabled:()=>Fi,getIsWooPayEnabled:()=>Ui,getIsWooPayGlobalThemeSupportEnabled:()=>$i,getPaymentMethodStatuses:()=>ai,getPaymentRequestButtonBorderRadius:()=>ki,getPaymentRequestButtonSize:()=>Ni,getPaymentRequestButtonTheme:()=>Ii,getPaymentRequestButtonType:()=>Ai,getPaymentRequestLocations:()=>Ci,getSavingError:()=>Pi,getSettings:()=>ei,getShowWooPayIncompatibilityNotice:()=>Vi,getStripeBillingMigratedCount:()=>Zi,getStripeBillingSubscriptionCount:()=>Qi,getWooPayCustomMessage:()=>zi,getWooPayLocations:()=>qi,getWooPayStoreLogo:()=>Bi,isDirty:()=>si,isSavingSettings:()=>ii});var b={};r.r(b),r.d(b,{saveOption:()=>Ms,saveSettings:()=>Os,submitStripeBillingSubscriptionMigration:()=>Fs,updateAccountBusinessSupportEmail:()=>ws,updateAccountBusinessSupportPhone:()=>Ss,updateAccountStatementDescriptor:()=>gs,updateAccountStatementDescriptorKana:()=>vs,updateAccountStatementDescriptorKanji:()=>bs,updateAdvancedFraudProtectionSettings:()=>Ps,updateDepositScheduleInterval:()=>Es,updateDepositScheduleMonthlyAnchor:()=>Rs,updateDepositScheduleWeeklyAnchor:()=>Ts,updateEnabledPaymentMethodIds:()=>ls,updateIsCardPresentEligible:()=>ts,updateIsDebugLogEnabled:()=>hs,updateIsManualCaptureEnabled:()=>ps,updateIsMultiCurrencyEnabled:()=>fs,updateIsPaymentRequestEnabled:()=>cs,updateIsSavedCardsEnabled:()=>es,updateIsSavingSettings:()=>us,updateIsStripeBillingEnabled:()=>Ds,updateIsTestModeEnabled:()=>ys,updateIsWCPayEnabled:()=>ss,updateIsWCPaySubscriptionsEnabled:()=>_s,updateIsWooPayEnabled:()=>Cs,updateIsWooPayGlobalThemeSupportEnabled:()=>As,updatePaymentRequestButtonBorderRadius:()=>as,updatePaymentRequestButtonSize:()=>ns,updatePaymentRequestButtonTheme:()=>os,updatePaymentRequestButtonType:()=>rs,updatePaymentRequestLocations:()=>xs,updateProtectionLevel:()=>js,updateSelectedPaymentMethod:()=>ds,updateSettings:()=>is,updateUnselectedPaymentMethod:()=>ms,updateWooPayCustomMessage:()=>Ns,updateWooPayLocations:()=>ks,updateWooPayStoreLogo:()=>Is});var v={};r.r(v),r.d(v,{getSettings:()=>Ls});var w={};r.r(w),r.d(w,{getCardReaderStats:()=>$s,getCardReaderStatsError:()=>zs,getCardReaders:()=>Bs});var S={};r.r(S),r.d(S,{updateCardReaderStats:()=>qs,updateCardReaders:()=>Hs,updateErrorForCardReaderStats:()=>Ys,updateErrorForCardReaders:()=>Vs});var E={};r.r(E),r.d(E,{getCardReaderStats:()=>Ws,getCardReaders:()=>Gs});var T={};r.r(T),r.d(T,{getActiveLoanSummary:()=>Js,getActiveLoanSummaryError:()=>ec,getLoans:()=>tc,getLoansError:()=>rc});var R={};r.r(R),r.d(R,{updateActiveLoanSummary:()=>nc,updateErrorForActiveLoanSummary:()=>oc,updateErrorForLoans:()=>ic,updateLoans:()=>ac});var O={};r.r(O),r.d(O,{getActiveLoanSummary:()=>sc,getLoans:()=>cc});var x={};r.r(x),r.d(x,{getDocuments:()=>pc,getDocumentsError:()=>yc,getDocumentsSummary:()=>fc,getDocumentsSummaryError:()=>_c});var C={};r.r(C),r.d(C,{updateDocuments:()=>gc,updateDocumentsSummary:()=>vc,updateErrorForDocuments:()=>bc,updateErrorForDocumentsSummary:()=>Sc});var A={};r.r(A),r.d(A,{formatQueryFilters:()=>Ec,getDocuments:()=>Tc,getDocumentsSummary:()=>Rc});var N={};r.r(N),r.d(N,{getPaymentIntent:()=>xc,getPaymentIntentError:()=>Cc});var I={};r.r(I),r.d(I,{getAuthorization:()=>Pc,getAuthorizations:()=>jc,getAuthorizationsError:()=>Dc,getAuthorizationsSummary:()=>Mc,getAuthorizationsSummaryError:()=>Lc,getIsRequesting:()=>Uc});var k={};r.r(k),r.d(k,{setIsRequestingAuthorization:()=>Yc,submitCancelAuthorization:()=>Wc,submitCaptureAuthorization:()=>Vc,updateAuthorization:()=>qc,updateAuthorizations:()=>zc,updateAuthorizationsSummary:()=>Hc,updateErrorForAuthorizations:()=>Bc,updateErrorForAuthorizationsSummary:()=>Gc});var j={};r.r(j),r.d(j,{getAuthorization:()=>Zc,getAuthorizations:()=>Qc,getAuthorizationsSummary:()=>Xc});var P={};r.r(P),r.d(P,{getFile:()=>tl,getFileError:()=>rl});var D={};r.r(D),r.d(D,{updateErrorForFiles:()=>ol,updateFiles:()=>nl});var F={};r.r(F),r.d(F,{getFile:()=>al});var M={};r.r(M),r.d(M,{getAvailableCurrencies:()=>ml,getCurrencies:()=>dl,getCurrencySettings:()=>hl,getDefaultCurrency:()=>yl,getEnabledCurrencies:()=>pl,getStoreSettings:()=>fl});var L={};r.r(L),r.d(L,{saveOption:()=>Ol,submitCurrencySettings:()=>Tl,submitEnabledCurrenciesUpdate:()=>El,submitStoreSettingsUpdate:()=>Rl,updateAvailableCurrencies:()=>gl,updateCurrencies:()=>_l,updateCurrencySettings:()=>wl,updateDefaultCurrency:()=>vl,updateEnabledCurrencies:()=>bl,updateStoreSettings:()=>Sl});var U={};r.r(U),r.d(U,{getCurrencies:()=>xl,getCurrencySettings:()=>Cl,getStoreSettings:()=>Al});var $=r(1609),z=r.n($);const B=window.ReactDOM;var q=r.n(B);(0,$.createContext)({isActive:!1,setActive:()=>null,isCompleted:!1,setCompleted:()=>null,taskId:""}),(0,$.createContext)({activeTask:"",setActiveTask:()=>null,completedTasks:{},setCompletedTasks:()=>null});var H=r(4848);function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y.apply(null,arguments)}const V=window.wp.element;var W=r(6942),G=r.n(W);const Q=window.wp.compose,Z=window.wp.keycodes,X=window.wp.i18n,K=window.wp.primitives,J=(0,V.createElement)(K.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,V.createElement)(K.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),ee=window.lodash,te=new Set(["alert","status","log","marquee","timer"]);let re=[],ne=!1;const oe=window.wp.deprecated;var ae=r.n(oe);const ie=window.wp.dom,se=(0,V.createElement)(K.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,V.createElement)(K.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function ce(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const a=o.getBoundingClientRect();return new n.DOMRect(e.left+a.left,e.top+a.top,e.width,e.height)}let le=0;function ue(e){const t=document.scrollingElement||document.body;e&&(le=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=le)}let de=0;function me(){return(0,V.useEffect)((()=>(0===de&&ue(!0),++de,()=>{1===de&&ue(!1),--de})),[]),null}window.wp.warning;var pe=r(5606);const ye=(0,V.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==pe&&pe.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function he(e){const t=(0,V.useContext)(ye),r=t.slots[e]||{},n=t.fills[e],o=(0,V.useMemo)((()=>n||[]),[n]);return{...r,updateSlot:(0,V.useCallback)((r=>{t.updateSlot(e,r)}),[e,t.updateSlot]),unregisterSlot:(0,V.useCallback)((r=>{t.unregisterSlot(e,r)}),[e,t.unregisterSlot]),fills:o,registerFill:(0,V.useCallback)((r=>{t.registerFill(e,r)}),[e,t.registerFill]),unregisterFill:(0,V.useCallback)((r=>{t.unregisterFill(e,r)}),[e,t.unregisterFill])}}const fe=(0,V.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function _e(e){let{name:t,children:r,registerFill:n,unregisterFill:o}=e;const a=(e=>{const{getSlot:t,subscribe:r}=(0,V.useContext)(fe),[n,o]=(0,V.useState)(t(e));return(0,V.useEffect)((()=>(o(t(e)),r((()=>{o(t(e))})))),[e]),n})(t),i=(0,V.useRef)({name:t,children:r});return(0,V.useLayoutEffect)((()=>(n(t,i.current),()=>o(t,i.current))),[]),(0,V.useLayoutEffect)((()=>{i.current.children=r,a&&a.forceUpdate()}),[r]),(0,V.useLayoutEffect)((()=>{t!==i.current.name&&(o(i.current.name,i.current),i.current.name=t,n(t,i.current))}),[t]),a&&a.node?((0,ee.isFunction)(r)&&(r=r(a.props.fillProps)),(0,V.createPortal)(r,a.node)):null}const ge=e=>(0,V.createElement)(fe.Consumer,null,(t=>{let{registerFill:r,unregisterFill:n}=t;return(0,V.createElement)(_e,Y({},e,{registerFill:r,unregisterFill:n}))}));class be extends V.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,o=(0,ee.map)(n(t,this),(e=>{const t=(0,ee.isFunction)(e.children)?e.children(r):e.children;return V.Children.map(t,((e,t)=>{if(!e||(0,ee.isString)(e))return e;const r=e.key||t;return(0,V.cloneElement)(e,{key:r})}))})).filter((0,ee.negate)(V.isEmptyElement));return(0,V.createElement)(V.Fragment,null,(0,ee.isFunction)(e)?e(o):o)}}const ve=e=>(0,V.createElement)(fe.Consumer,null,(t=>{let{registerSlot:r,unregisterSlot:n,getFills:o}=t;return(0,V.createElement)(be,Y({},e,{registerSlot:r,unregisterSlot:n,getFills:o}))}));var we=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Se=Math.abs,Ee=String.fromCharCode,Te=Object.assign;function Re(e){return e.trim()}function Oe(e,t,r){return e.replace(t,r)}function xe(e,t){return e.indexOf(t)}function Ce(e,t){return 0|e.charCodeAt(t)}function Ae(e,t,r){return e.slice(t,r)}function Ne(e){return e.length}function Ie(e){return e.length}function ke(e,t){return t.push(e),e}var je=1,Pe=1,De=0,Fe=0,Me=0,Le="";function Ue(e,t,r,n,o,a,i){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:je,column:Pe,length:i,return:""}}function $e(e,t){return Te(Ue("",null,null,"",null,null,0),e,{length:-e.length},t)}function ze(){return Me=Fe>0?Ce(Le,--Fe):0,Pe--,10===Me&&(Pe=1,je--),Me}function Be(){return Me=Fe<De?Ce(Le,Fe++):0,Pe++,10===Me&&(Pe=1,je++),Me}function qe(){return Ce(Le,Fe)}function He(){return Fe}function Ye(e,t){return Ae(Le,e,t)}function Ve(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function We(e){return je=Pe=1,De=Ne(Le=e),Fe=0,[]}function Ge(e){return Le="",e}function Qe(e){return Re(Ye(Fe-1,Ke(91===e?e+2:40===e?e+1:e)))}function Ze(e){for(;(Me=qe())&&Me<33;)Be();return Ve(e)>2||Ve(Me)>3?"":" "}function Xe(e,t){for(;--t&&Be()&&!(Me<48||Me>102||Me>57&&Me<65||Me>70&&Me<97););return Ye(e,He()+(t<6&&32==qe()&&32==Be()))}function Ke(e){for(;Be();)switch(Me){case e:return Fe;case 34:case 39:34!==e&&39!==e&&Ke(Me);break;case 40:41===e&&Ke(e);break;case 92:Be()}return Fe}function Je(e,t){for(;Be()&&e+Me!==57&&(e+Me!==84||47!==qe()););return"/*"+Ye(t,Fe-1)+"*"+Ee(47===e?e:Be())}function et(e){for(;!Ve(qe());)Be();return Ye(e,Fe)}var tt="-ms-",rt="-moz-",nt="-webkit-",ot="comm",at="rule",it="decl",st="@keyframes";function ct(e,t){for(var r="",n=Ie(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function lt(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case it:return e.return=e.return||e.value;case ot:return"";case st:return e.return=e.value+"{"+ct(e.children,n)+"}";case at:e.value=e.props.join(",")}return Ne(r=ct(e.children,n))?e.return=e.value+"{"+r+"}":""}function ut(e){return Ge(dt("",null,null,null,[""],e=We(e),0,[0],e))}function dt(e,t,r,n,o,a,i,s,c){for(var l=0,u=0,d=i,m=0,p=0,y=0,h=1,f=1,_=1,g=0,b="",v=o,w=a,S=n,E=b;f;)switch(y=g,g=Be()){case 40:if(108!=y&&58==Ce(E,d-1)){-1!=xe(E+=Oe(Qe(g),"&","&\f"),"&\f")&&(_=-1);break}case 34:case 39:case 91:E+=Qe(g);break;case 9:case 10:case 13:case 32:E+=Ze(y);break;case 92:E+=Xe(He()-1,7);continue;case 47:switch(qe()){case 42:case 47:ke(pt(Je(Be(),He()),t,r),c);break;default:E+="/"}break;case 123*h:s[l++]=Ne(E)*_;case 125*h:case 59:case 0:switch(g){case 0:case 125:f=0;case 59+u:-1==_&&(E=Oe(E,/\f/g,"")),p>0&&Ne(E)-d&&ke(p>32?yt(E+";",n,r,d-1):yt(Oe(E," ","")+";",n,r,d-2),c);break;case 59:E+=";";default:if(ke(S=mt(E,t,r,l,u,o,s,b,v=[],w=[],d),a),123===g)if(0===u)dt(E,t,S,S,v,a,d,s,w);else switch(99===m&&110===Ce(E,3)?100:m){case 100:case 108:case 109:case 115:dt(e,S,S,n&&ke(mt(e,S,S,0,0,o,s,b,o,v=[],d),w),o,w,d,s,n?v:w);break;default:dt(E,S,S,S,[""],w,0,s,w)}}l=u=p=0,h=_=1,b=E="",d=i;break;case 58:d=1+Ne(E),p=y;default:if(h<1)if(123==g)--h;else if(125==g&&0==h++&&125==ze())continue;switch(E+=Ee(g),g*h){case 38:_=u>0?1:(E+="\f",-1);break;case 44:s[l++]=(Ne(E)-1)*_,_=1;break;case 64:45===qe()&&(E+=Qe(Be())),m=qe(),u=d=Ne(b=E+=et(He())),g++;break;case 45:45===y&&2==Ne(E)&&(h=0)}}return a}function mt(e,t,r,n,o,a,i,s,c,l,u){for(var d=o-1,m=0===o?a:[""],p=Ie(m),y=0,h=0,f=0;y<n;++y)for(var _=0,g=Ae(e,d+1,d=Se(h=i[y])),b=e;_<p;++_)(b=Re(h>0?m[_]+" "+g:Oe(g,/&\f/g,m[_])))&&(c[f++]=b);return Ue(e,t,r,0===o?at:s,c,l,u)}function pt(e,t,r){return Ue(e,t,r,ot,Ee(Me),Ae(e,2,-2),0)}function yt(e,t,r,n){return Ue(e,t,r,it,Ae(e,0,n),Ae(e,n+1,-1),n)}var ht=function(e,t,r){for(var n=0,o=0;n=o,o=qe(),38===n&&12===o&&(t[r]=1),!Ve(o);)Be();return Ye(e,Fe)},ft=new WeakMap,_t=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ft.get(r))&&!n){ft.set(e,!0);for(var o=[],a=function(e,t){return Ge(function(e,t){var r=-1,n=44;do{switch(Ve(n)){case 0:38===n&&12===qe()&&(t[r]=1),e[r]+=ht(Fe-1,t,r);break;case 2:e[r]+=Qe(n);break;case 4:if(44===n){e[++r]=58===qe()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=Ee(n)}}while(n=Be());return e}(We(e),t))}(t,o),i=r.props,s=0,c=0;s<a.length;s++)for(var l=0;l<i.length;l++,c++)e.props[c]=o[s]?a[s].replace(/&\f/g,i[l]):i[l]+" "+a[s]}}},gt=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function bt(e,t){switch(function(e,t){return 45^Ce(e,0)?(((t<<2^Ce(e,0))<<2^Ce(e,1))<<2^Ce(e,2))<<2^Ce(e,3):0}(e,t)){case 5103:return nt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return nt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return nt+e+rt+e+tt+e+e;case 6828:case 4268:return nt+e+tt+e+e;case 6165:return nt+e+tt+"flex-"+e+e;case 5187:return nt+e+Oe(e,/(\w+).+(:[^]+)/,nt+"box-$1$2"+tt+"flex-$1$2")+e;case 5443:return nt+e+tt+"flex-item-"+Oe(e,/flex-|-self/,"")+e;case 4675:return nt+e+tt+"flex-line-pack"+Oe(e,/align-content|flex-|-self/,"")+e;case 5548:return nt+e+tt+Oe(e,"shrink","negative")+e;case 5292:return nt+e+tt+Oe(e,"basis","preferred-size")+e;case 6060:return nt+"box-"+Oe(e,"-grow","")+nt+e+tt+Oe(e,"grow","positive")+e;case 4554:return nt+Oe(e,/([^-])(transform)/g,"$1"+nt+"$2")+e;case 6187:return Oe(Oe(Oe(e,/(zoom-|grab)/,nt+"$1"),/(image-set)/,nt+"$1"),e,"")+e;case 5495:case 3959:return Oe(e,/(image-set\([^]*)/,nt+"$1$`$1");case 4968:return Oe(Oe(e,/(.+:)(flex-)?(.*)/,nt+"box-pack:$3"+tt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+nt+e+e;case 4095:case 3583:case 4068:case 2532:return Oe(e,/(.+)-inline(.+)/,nt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ne(e)-1-t>6)switch(Ce(e,t+1)){case 109:if(45!==Ce(e,t+4))break;case 102:return Oe(e,/(.+:)(.+)-([^]+)/,"$1"+nt+"$2-$3$1"+rt+(108==Ce(e,t+3)?"$3":"$2-$3"))+e;case 115:return~xe(e,"stretch")?bt(Oe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ce(e,t+1))break;case 6444:switch(Ce(e,Ne(e)-3-(~xe(e,"!important")&&10))){case 107:return Oe(e,":",":"+nt)+e;case 101:return Oe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nt+(45===Ce(e,14)?"inline-":"")+"box$3$1"+nt+"$2$3$1"+tt+"$2box$3")+e}break;case 5936:switch(Ce(e,t+11)){case 114:return nt+e+tt+Oe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return nt+e+tt+Oe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return nt+e+tt+Oe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return nt+e+tt+e+e}return e}var vt=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case it:e.return=bt(e.value,e.length);break;case st:return ct([$e(e,{value:Oe(e.value,"@","@"+nt)})],n);case at:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return ct([$e(e,{props:[Oe(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return ct([$e(e,{props:[Oe(t,/:(plac\w+)/,":"+nt+"input-$1")]}),$e(e,{props:[Oe(t,/:(plac\w+)/,":-moz-$1")]}),$e(e,{props:[Oe(t,/:(plac\w+)/,tt+"input-$1")]})],n)}return""}))}}],wt=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var n,o,a=e.stylisPlugins||vt,i={},s=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)i[t[r]]=!0;s.push(e)}));var c,l,u,d,m=[lt,(d=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(l=[_t,gt].concat(a,m),u=Ie(l),function(e,t,r,n){for(var o="",a=0;a<u;a++)o+=l[a](e,t,r,n)||"";return o});o=function(e,t,r,n){c=r,ct(ut(e?e+"{"+t.styles+"}":t.styles),p),n&&(y.inserted[t.name]=!0)};var y={key:t,sheet:new we({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:o};return y.sheet.hydrate(s),y},St={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Et(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var Tt=/[A-Z]|^ms/g,Rt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ot=function(e){return 45===e.charCodeAt(1)},xt=function(e){return null!=e&&"boolean"!=typeof e},Ct=Et((function(e){return Ot(e)?e:e.replace(Tt,"-$&").toLowerCase()})),At=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Rt,(function(e,t,r){return It={name:t,styles:r,next:It},t}))}return 1===St[e]||Ot(e)||"number"!=typeof t||0===t?t:t+"px"};function Nt(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return It={name:r.name,styles:r.styles,next:It},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)It={name:n.name,styles:n.styles,next:It},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Nt(e,t,r[o])+";";else for(var a in r){var i=r[a];if("object"!=typeof i)null!=t&&void 0!==t[i]?n+=a+"{"+t[i]+"}":xt(i)&&(n+=Ct(a)+":"+At(a,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=Nt(e,t,i);switch(a){case"animation":case"animationName":n+=Ct(a)+":"+s+";";break;default:n+=a+"{"+s+"}"}}else for(var c=0;c<i.length;c++)xt(i[c])&&(n+=Ct(a)+":"+At(a,i[c])+";")}return n}(e,t,r);case"function":if(void 0!==e){var o=It,a=r(e);return It=o,Nt(e,t,a)}}if(null==t)return r;var i=t[r];return void 0!==i?i:r}var It,kt,jt=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Pt=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,o="";It=void 0;var a=e[0];null==a||void 0===a.raw?(n=!1,o+=Nt(r,t,a)):o+=a[0];for(var i=1;i<e.length;i++)o+=Nt(r,t,e[i]),n&&(o+=a[i]);jt.lastIndex=0;for(var s,c="";null!==(s=jt.exec(o));)c+="-"+s[1];var l=function(e){for(var t,r=0,n=0,o=e.length;o>=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:It}},Dt=!!$.useInsertionEffect&&$.useInsertionEffect,Ft=Dt||function(e){return e()},Mt=(Dt||$.useLayoutEffect,$.createContext("undefined"!=typeof HTMLElement?wt({key:"css"}):null)),Lt=Mt.Provider,Ut=$.createContext({}),$t=r(8616),zt=r.n($t),Bt=new Uint8Array(16);function qt(){if(!kt&&!(kt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return kt(Bt)}const Ht=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Yt=[],Vt=0;Vt<256;++Vt)Yt.push((Vt+256).toString(16).substr(1));const Wt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Yt[e[t+0]]+Yt[e[t+1]]+Yt[e[t+2]]+Yt[e[t+3]]+"-"+Yt[e[t+4]]+Yt[e[t+5]]+"-"+Yt[e[t+6]]+Yt[e[t+7]]+"-"+Yt[e[t+8]]+Yt[e[t+9]]+"-"+Yt[e[t+10]]+Yt[e[t+11]]+Yt[e[t+12]]+Yt[e[t+13]]+Yt[e[t+14]]+Yt[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&Ht.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r},Gt=function(e,t,r){var n=(e=e||{}).random||(e.rng||qt)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return Wt(n)},Qt=new Set,Zt=zt()((e=>{let t=Gt().replace(/[0-9]/g,"");for(;Qt.has(t);)t=Gt().replace(/[0-9]/g,"");return Qt.add(t),wt({container:e,key:t})}));function Xt(e){let{children:t,document:r}=e;if(!r)return null;const n=Zt(r.head);return(0,V.createElement)(Lt,{value:n},t)}function Kt(){const[,e]=(0,V.useState)({}),t=(0,V.useRef)(!0);return(0,V.useEffect)((()=>()=>{t.current=!1}),[]),()=>{t.current&&e({})}}function Jt(e){let{name:t,children:r}=e;const n=he(t),o=(0,V.useRef)({rerender:Kt()});if((0,V.useEffect)((()=>(n.registerFill(o),()=>{n.unregisterFill(o)})),[n.registerFill,n.unregisterFill]),!n.ref||!n.ref.current)return null;"function"==typeof r&&(r=r(n.fillProps));const a=(0,V.createElement)(Xt,{document:n.ref.current.ownerDocument},r);return(0,V.createPortal)(a,n.ref.current)}const er=(0,V.forwardRef)((function(e,t){let{name:r,fillProps:n={},as:o="div",...a}=e;const i=(0,V.useContext)(ye),s=(0,V.useRef)();return(0,V.useLayoutEffect)((()=>(i.registerSlot(r,s,n),()=>{i.unregisterSlot(r,s)})),[i.registerSlot,i.unregisterSlot,r]),(0,V.useLayoutEffect)((()=>{i.updateSlot(r,n)})),(0,V.createElement)(o,Y({ref:(0,Q.useMergeRefs)([t,s])},a))}));function tr(e){return(0,V.createElement)(V.Fragment,null,(0,V.createElement)(ge,e),(0,V.createElement)(Jt,e))}const rr=(0,V.forwardRef)(((e,t)=>{let{bubblesVirtually:r,...n}=e;return r?(0,V.createElement)(er,Y({},n,{ref:t})):(0,V.createElement)(ve,n)}));function nr(e){return"appear"===e?"top":"left"}const or="Popover",ar=(0,V.createContext)();function ir(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:a}=function(e){return e.ownerDocument.defaultView.getComputedStyle(e)}(t),i=r?parseInt(r,10):0,s=n?parseInt(n,10):0,c=o?parseInt(o,10):0,l=a?parseInt(a,10):0;return{x:e.left+c,y:e.top+i,width:e.width-c-l,height:e.height-i-s,left:e.left+c,right:e.right-l,top:e.top+i,bottom:e.bottom-s}}function sr(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function cr(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==r&&(e.style[t]=r)}function lr(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const ur=(0,V.forwardRef)(((e,t)=>{let{headerTitle:r,onClose:n,children:o,className:a,noArrow:i=!0,isAlternate:s,position:c="bottom right",range:l,focusOnMount:u="firstElement",anchorRef:d,shouldAnchorIncludePadding:m,anchorRect:p,getAnchorRect:y,expandOnMobile:h,animate:f=!0,onFocusOutside:_,__unstableStickyBoundaryElement:g,__unstableSlotName:b=or,__unstableObserveElement:v,__unstableBoundaryParent:w,__unstableForcePosition:S,__unstableForceXAlignment:E,__unstableEditorCanvasWrapper:T,...R}=e;const O=(0,V.useRef)(null),x=(0,V.useRef)(null),C=(0,V.useRef)(),A=(0,Q.useViewportMatch)("medium","<"),[N,I]=(0,V.useState)(),k=(0,V.useContext)(ar)||b,j=he(k),P=h&&A,[D,F]=(0,Q.useResizeObserver)();i=P||i,(0,V.useLayoutEffect)((()=>{if(P)return lr(C.current,"is-without-arrow",i),lr(C.current,"is-alternate",s),sr(C.current,"data-x-axis"),sr(C.current,"data-y-axis"),cr(C.current,"top"),cr(C.current,"left"),cr(x.current,"maxHeight"),void cr(x.current,"maxWidth");const e=()=>{if(!C.current||!x.current)return;let e=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return ce(t,t.ownerDocument||e.current.ownerDocument,a)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return ce((0,ie.getRectangleFromRange)(n),n.endContainer.ownerDocument,a);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=ce(n.getBoundingClientRect(),n.ownerDocument,a);return o?e:ir(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=ce(new window.DOMRect(r.left,r.top,r.width,i.bottom-r.top),e.ownerDocument,a);return o?s:ir(s,n)}if(!e.current)return;const{parentNode:i}=e.current,s=ce(i.getBoundingClientRect(),i.ownerDocument,a);return o?s:ir(s,i)}(O,p,y,d,m,C.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=C.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}w&&(n=C.current.parentElement);const a=F.height?F:x.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:h,yAxis:f,contentHeight:_,contentWidth:b}=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",n=arguments.length>3?arguments[3]:void 0,o=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,i=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0;const[l,u="center",d]=r.split(" "),m=function(e,t,r,n,o,a,i,s,c){const{height:l}=t;if(o){const t=o.getBoundingClientRect(),n=t.top+l-i,a=t.bottom-l-i;if(e.top<=n)return!c||l+10<c.scrollTop+e.top?{yAxis:r,popoverTop:Math.min(e.bottom,n)}:{yAxis:"bottom",popoverTop:Math.min(e.bottom,a)}}let u=e.top+e.height/2;"bottom"===n?u=e.bottom:"top"===n&&(u=e.top);const d={popoverTop:u,contentHeight:(u-l/2>0?l/2:u)+(u+l/2>window.innerHeight?window.innerHeight-u:l/2)},m={popoverTop:e.top,contentHeight:e.top-10-l>0?l:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+l>window.innerHeight?window.innerHeight-10-e.bottom:l};let y,h=r,f=null;if(!o&&!s)if("middle"===r&&d.contentHeight===l)h="middle";else if("top"===r&&m.contentHeight===l)h="top";else if("bottom"===r&&p.contentHeight===l)h="bottom";else{h=m.contentHeight>p.contentHeight?"top":"bottom";const e="top"===h?m.contentHeight:p.contentHeight;f=e!==l?e:null}return y="middle"===h?d.popoverTop:"top"===h?m.popoverTop:p.popoverTop,{yAxis:h,popoverTop:y,contentHeight:f}}(e,t,l,d,n,0,o,i,c),p=function(e,t,r,n,o,a,i,s,c){const{width:l}=t;"left"===r&&(0,X.isRTL)()?r="right":"right"===r&&(0,X.isRTL)()&&(r="left"),"left"===n&&(0,X.isRTL)()?n="right":"right"===n&&(0,X.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let m=e.left;"right"===n?m=e.right:"middle"===a||c||(m=u);let p=e.right;"left"===n?p=e.left:"middle"===a||c||(p=u);const y={popoverLeft:m,contentWidth:m-l>0?l:m},h={popoverLeft:p,contentWidth:p+l>window.innerWidth?window.innerWidth-p:l};let f,_=r,g=null;if(!o&&!s)if("center"===r&&d.contentWidth===l)_="center";else if("left"===r&&y.contentWidth===l)_="left";else if("right"===r&&h.contentWidth===l)_="right";else{_=y.contentWidth>h.contentWidth?"left":"right";const e="left"===_?y.contentWidth:h.contentWidth;l>window.innerWidth&&(g=window.innerWidth),e!==l&&(_="center",d.popoverLeft=window.innerWidth/2)}return f="center"===_?d.popoverLeft:"left"===_?y.popoverLeft:h.popoverLeft,i&&(f=Math.min(f,i.offsetLeft+i.offsetWidth-l),(0,X.isRTL)()||(f=Math.max(f,0))),{xAxis:_,popoverLeft:f,contentWidth:g}}(e,t,u,d,n,m.yAxis,a,i,s);return{...p,...m}}(e,a,c,g,C.current,o,n,S,E,T);"number"==typeof l&&"number"==typeof u&&(cr(C.current,"top",l+"px"),cr(C.current,"left",u+"px")),lr(C.current,"is-without-arrow",i||"center"===h&&"middle"===f),lr(C.current,"is-alternate",s),sr(C.current,"data-x-axis",h),sr(C.current,"data-y-axis",f),cr(x.current,"maxHeight","number"==typeof _?_+"px":""),cr(x.current,"maxWidth","number"==typeof b?b+"px":""),I(({left:"right",right:"left"}[h]||"center")+" "+({top:"bottom",bottom:"top"}[f]||"middle"))};e();const{ownerDocument:t}=C.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const a=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",a),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const l=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(d);let u;return l&&l!==t&&(l.defaultView.addEventListener("resize",e),l.defaultView.addEventListener("scroll",e,!0)),v&&(u=new r.MutationObserver(e),u.observe(v,{attributes:!0})),()=>{var i,s;r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",a),r.cancelAnimationFrame(o),l&&l!==t&&(null===(i=l.defaultView)||void 0===i||i.removeEventListener("resize",e),null===(s=l.defaultView)||void 0===s||s.removeEventListener("scroll",e,!0)),u&&u.disconnect()}}),[P,p,y,d,m,c,F,g,v,w]);const M=(e,t)=>{"focus-outside"===e&&_?_(t):n&&n()},[L,U]=(0,Q.__experimentalUseDialog)({focusOnMount:u,__unstableOnClose:M,onClose:M}),$=(0,Q.useMergeRefs)([C,L,t]),z=Boolean(f&&N)&&function(e){if("loading"===e.type)return G()("components-animate__loading");const{type:t,origin:r=nr(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return G()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?G()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:N});let B=(0,V.createElement)("div",Y({className:G()("components-popover",a,z,{"is-expanded":P,"is-without-arrow":i,"is-alternate":s})},R,{ref:$},U,{tabIndex:"-1"}),P&&(0,V.createElement)(me,null),P&&(0,V.createElement)("div",{className:"components-popover__header"},(0,V.createElement)("span",{className:"components-popover__header-title"},r),(0,V.createElement)(en,{className:"components-popover__close",icon:se,onClick:n})),(0,V.createElement)("div",{ref:x,className:"components-popover__content"},(0,V.createElement)("div",{style:{position:"relative"}},D,o)));return j.ref&&(B=(0,V.createElement)(tr,{name:k},B)),d||p?B:(0,V.createElement)("span",{ref:O},B)}));ur.Slot=(0,V.forwardRef)((function(e,t){let{name:r=or}=e;return(0,V.createElement)(rr,{bubblesVirtually:!0,name:r,className:"popover-slot",ref:t})})),ur.__unstableSlotNameProvider=ar.Provider;const dr=ur,mr=function(e){let t,r,{shortcut:n,className:o}=e;return n?((0,ee.isString)(n)&&(t=n),(0,ee.isObject)(n)&&(t=n.display,r=n.ariaLabel),(0,V.createElement)("span",{className:o,"aria-label":r},t)):null},pr=700,yr=(0,V.createElement)("div",{className:"event-catcher"}),hr=e=>{let{eventHandlers:t,child:r,childrenWithPopover:n}=e;return(0,V.cloneElement)((0,V.createElement)("span",{className:"disabled-element-wrapper"},(0,V.cloneElement)(yr,t),(0,V.cloneElement)(r,{children:n})),t)},fr=e=>{let{child:t,eventHandlers:r,childrenWithPopover:n}=e;return(0,V.cloneElement)(t,{...r,children:n})},_r=(e,t,r)=>{if(1!==V.Children.count(e))return;const n=V.Children.only(e);n.props.disabled||"function"==typeof n.props[t]&&n.props[t](r)},gr=function(e){const{children:t,position:r,text:n,shortcut:o,delay:a=pr}=e,[i,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(!1),u=(0,Q.useDebounce)(l,a),d=e=>{_r(t,"onMouseDown",e),document.addEventListener("mouseup",y),s(!0)},m=e=>{_r(t,"onMouseUp",e),document.removeEventListener("mouseup",y),s(!1)},p=e=>"mouseUp"===e?m:"mouseDown"===e?d:void 0,y=p("mouseUp"),h=(e,r)=>n=>{if(_r(t,e,n),n.currentTarget.disabled)return;if("focus"===n.type&&i)return;u.cancel();const o=(0,ee.includes)(["focus","mouseenter"],n.type);o!==c&&(r?u(o):l(o))},f=()=>{u.cancel(),document.removeEventListener("mouseup",y)};if((0,V.useEffect)((()=>f),[]),1!==V.Children.count(t))return t;const _={onMouseEnter:h("onMouseEnter",!0),onMouseLeave:h("onMouseLeave"),onClick:h("onClick"),onFocus:h("onFocus"),onBlur:h("onBlur"),onMouseDown:p("mouseDown")},g=V.Children.only(t),{children:b,disabled:v}=g.props,w=v?hr:fr,S=(e=>{let{grandchildren:t,isOver:r,position:n,text:o,shortcut:a}=e;return(0,V.concatChildren)(t,r&&(0,V.createElement)(dr,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,(0,V.createElement)(mr,{className:"components-tooltip__shortcut",shortcut:a})))})({grandchildren:b,isOver:c,position:r,text:n,shortcut:o});return w({child:g,eventHandlers:_,childrenWithPopover:S})},br=function(e){let{icon:t,className:r,...n}=e;const o=["dashicon","dashicons","dashicons-"+t,r].filter(Boolean).join(" ");return(0,V.createElement)("span",Y({className:o},n))},vr=function(e){let{icon:t=null,size:r=24,...n}=e;if("string"==typeof t)return(0,V.createElement)(br,Y({icon:t},n));if((0,V.isValidElement)(t)&&br===t.type)return(0,V.cloneElement)(t,{...n});if("function"==typeof t)return t.prototype instanceof V.Component?(0,V.createElement)(t,{size:r,...n}):t({size:r,...n});if(t&&("svg"===t.type||t.type===K.SVG)){const e={width:r,height:r,...t.props,...n};return(0,V.createElement)(K.SVG,e)}return(0,V.isValidElement)(t)?(0,V.cloneElement)(t,{size:r,...n}):t};var wr=r(5606);const Sr=(0,V.createContext)({}),Er=()=>(0,V.useContext)(Sr);function Tr(e){let{value:t}=e;const r=Er(),n=(0,V.useRef)(t);return function(e,r){const o=(0,V.useRef)(!1);(0,V.useEffect)((()=>{o.current?(0,ee.isEqual)(n.current,t)&&n.current!==t&&void 0!==wr&&wr.env:o.current=!0}),r)}(0,[t]),(0,V.useMemo)((()=>(0,ee.merge)((0,ee.cloneDeep)(r),t)),[r,t])}const Rr=(0,V.memo)((e=>{let{children:t,value:r}=e;const n=Tr({value:r});return(0,V.createElement)(Sr.Provider,{value:n},t)})),Or="data-wp-component",xr="data-wp-c16t",Cr="__contextSystemKey__",Ar=zt()((function(e){return`components-${(0,ee.kebabCase)(e)}`}));function Nr(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n}function Ir(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function kr(e,t,r){var n=[],o=Nr(e,n,r);return n.length<2?r:o+t(n)}var jr=function e(t){for(var r="",n=0;n<t.length;n++){var o=t[n];if(null!=o){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=e(o);else for(var i in a="",o)o[i]&&i&&(a&&(a+=" "),a+=i);break;default:a=o}a&&(r&&(r+=" "),r+=a)}}return r},Pr=function(){var e=wt({key:"css"});e.sheet.speedy=function(e){this.isSpeedy=e},e.compat=!0;var t=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=Pt(r,e.registered,void 0);return function(e,t){!function(e,t){var r=e.key+"-"+t.name;void 0===e.registered[r]&&(e.registered[r]=t.styles)}(e,t);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var n=t;do{e.insert(t===n?"."+r:"",n,e.sheet,!0),n=n.next}while(void 0!==n)}}(e,o),e.key+"-"+o.name};return{css:t,cx:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return kr(e.registered,t,jr(n))},injectGlobal:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=Pt(r,e.registered);Ir(e,o)},keyframes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=Pt(r,e.registered),a="animation-"+o.name;return Ir(e,{name:o.name,styles:"@keyframes "+a+"{"+o.styles+"}"}),a},hydrate:function(t){t.forEach((function(t){e.inserted[t]=!0}))},flush:function(){e.registered={},e.inserted={},e.sheet.flush()},sheet:e.sheet,cache:e,getRegisteredStyles:Nr.bind(null,e.registered),merge:kr.bind(null,e.registered,t)}}(),Dr=(Pr.flush,Pr.hydrate,Pr.cx);Pr.merge,Pr.getRegisteredStyles,Pr.injectGlobal,Pr.keyframes,Pr.css,Pr.sheet,Pr.cache;const Fr=()=>{const e=(0,$.useContext)(Mt),t=(0,V.useCallback)((function(){if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dr(...r.map((t=>(e=>null!=e&&["name","styles"].every((t=>void 0!==e[t])))(t)?(function(e,t){var r=e.key+"-"+t.name;if(void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var n=t;do{e.insert(t===n?"."+r:"",n,e.sheet,!0),n=n.next}while(void 0!==n)}}(e,t),`${e.key}-${t.name}`):t)))}),[e]);return t};var Mr=r(5606);function Lr(e,t){const r=Er();void 0===t&&void 0!==Mr&&Mr.env;const n=(null==r?void 0:r[t])||{},o={[xr]:!0,...(a=t,{[Or]:a})};var a;const{_overrides:i,...s}=n,c=Object.entries(s).length?Object.assign({},s,e):e,l=Fr()(Ar(t),e.className),u="function"==typeof c.renderChildren?c.renderChildren(c):c.children;for(const e in c)o[e]=c[e];for(const e in i)o[e]=i[e];return o.children=u,o.className=l,o}var Ur=r(5606);function $r(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{memo:n=!1}=r;let o=(0,V.forwardRef)(e);n&&(o=(0,V.memo)(o)),void 0===t&&void 0!==Ur&&Ur.env;let a=o[Cr]||[t];return Array.isArray(t)&&(a=[...a,...t]),"string"==typeof t&&(a=[...a,t]),o.displayName=t,o[Cr]=(0,ee.uniq)(a),o.selector=`.${Ar(t)}`,o}const zr={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};var Br=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qr=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},Hr=Et((function(e){return Br.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Yr=function(e){return"theme"!==e},Vr=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Hr:Yr},Wr=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},Gr=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return qr(t,r,n),Ft((function(){return function(e,t,r){qr(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,r,n)})),null},Qr=function e(t,r){var n,o,a=t.__emotion_real===t,i=a&&t.__emotion_base||t;void 0!==r&&(n=r.label,o=r.target);var s=Wr(t,r,a),c=s||Vr(i),l=!c("as");return function(){var u=arguments,d=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&d.push("label:"+n+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{d.push(u[0][0]);for(var m=u.length,p=1;p<m;p++)d.push(u[p],u[0][p])}var y,h=(y=function(e,t,r){var n,a,u,m,p=l&&e.as||i,y="",h=[],f=e;if(null==e.theme){for(var _ in f={},e)f[_]=e[_];f.theme=$.useContext(Ut)}"string"==typeof e.className?(n=t.registered,a=h,u=e.className,m="",u.split(" ").forEach((function(e){void 0!==n[e]?a.push(n[e]+";"):m+=e+" "})),y=m):null!=e.className&&(y=e.className+" ");var g=Pt(d.concat(h),t.registered,f);y+=t.key+"-"+g.name,void 0!==o&&(y+=" "+o);var b=l&&void 0===s?Vr(p):c,v={};for(var w in e)l&&"as"===w||b(w)&&(v[w]=e[w]);return v.className=y,v.ref=r,$.createElement($.Fragment,null,$.createElement(Gr,{cache:t,serialized:g,isStringTag:"string"==typeof p}),$.createElement(p,v))},(0,$.forwardRef)((function(e,t){var r=(0,$.useContext)(Mt);return y(e,r,t)})));return h.displayName=void 0!==n?n:"Styled("+("string"==typeof i?i:i.displayName||i.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(t,n){return e(t,Y({},r,n,{shouldForwardProp:Wr(h,n,!0)})).apply(void 0,d)},h}};const Zr=Qr("div",{target:"em57xhy0"})("");Zr.selector=".components-view",Zr.displayName="View";const Xr=Zr,Kr=$r((function(e,t){const{style:r,...n}=Lr(e,"VisuallyHidden");return(0,V.createElement)(Xr,Y({ref:t},n,{style:{...zr,...r||{}}}))}),"VisuallyHidden"),Jr=["onMouseDown","onClick"],en=(0,V.forwardRef)((function e(t,r){const{href:n,target:o,isSmall:a,isPressed:i,isBusy:s,isDestructive:c,className:l,disabled:u,icon:d,iconPosition:m="left",iconSize:p,showTooltip:y,tooltipPosition:h,shortcut:f,label:_,children:g,text:b,variant:v,__experimentalIsFocusable:w,describedBy:S,...E}=function(e){let{isDefault:t,isPrimary:r,isSecondary:n,isTertiary:o,isLink:a,variant:i,...s}=e,c=i;var l,u,d,m,p;return r&&(null!==(l=c)&&void 0!==l||(c="primary")),o&&(null!==(u=c)&&void 0!==u||(c="tertiary")),n&&(null!==(d=c)&&void 0!==d||(c="secondary")),t&&(ae()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"',version:"6.2"}),null!==(m=c)&&void 0!==m||(c="secondary")),a&&(null!==(p=c)&&void 0!==p||(c="link")),{...s,variant:c}}(t),T=(0,Q.useInstanceId)(e,"components-button__description"),R=G()("components-button",l,{"is-secondary":"secondary"===v,"is-primary":"primary"===v,"is-small":a,"is-tertiary":"tertiary"===v,"is-pressed":i,"is-busy":s,"is-link":"link"===v,"is-destructive":c,"has-text":!!d&&!!g,"has-icon":!!d}),O=u&&!w,x=void 0===n||O?"button":"a",C="a"===x?{href:n,target:o}:{type:"button",disabled:O,"aria-pressed":i};if(u&&w){C["aria-disabled"]=!0;for(const e of Jr)E[e]=e=>{e.stopPropagation(),e.preventDefault()}}const A=!O&&(y&&_||f||!!_&&(!g||(0,ee.isArray)(g)&&!g.length)&&!1!==y),N=S?T:null,I=E["aria-describedby"]||N,k=(0,V.createElement)(x,Y({},C,E,{className:R,"aria-label":E["aria-label"]||_,"aria-describedby":I,ref:r}),d&&"left"===m&&(0,V.createElement)(vr,{icon:d,size:p}),b&&(0,V.createElement)(V.Fragment,null,b),d&&"right"===m&&(0,V.createElement)(vr,{icon:d,size:p}),g);return A?(0,V.createElement)(V.Fragment,null,(0,V.createElement)(gr,{text:S||_,shortcut:f,position:h},k),S&&(0,V.createElement)(Kr,null,(0,V.createElement)("span",{id:N},S))):(0,V.createElement)(V.Fragment,null,k,S&&(0,V.createElement)(Kr,null,(0,V.createElement)("span",{id:N},S)))}));let tn=0;const rn=(0,V.forwardRef)((function e(t,r){const{bodyOpenClassName:n="modal-open",role:o="dialog",title:a=null,focusOnMount:i=!0,shouldCloseOnEsc:s=!0,shouldCloseOnClickOutside:c=!0,isDismissible:l=!0,aria:u={labelledby:null,describedby:null},onRequestClose:d,icon:m,closeButtonLabel:p,children:y,style:h,overlayClassName:f,className:_,contentLabel:g,onKeyDown:b,isFullScreen:v=!1,__experimentalHideHeader:w=!1}=t,S=(0,V.useRef)(),E=(0,Q.useInstanceId)(e),T=a?`components-modal-header-${E}`:u.labelledby,R=(0,Q.useFocusOnMount)(i),O=(0,Q.useConstrainedTabbing)(),x=(0,Q.useFocusReturn)(),C=(0,Q.__experimentalUseFocusOutside)(d);return(0,V.useEffect)((()=>(tn++,1===tn&&(function(e){if(ne)return;const t=document.body.children;(0,ee.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||te.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),re.push(t))})),ne=!0}(S.current),document.body.classList.add(n)),()=>{tn--,0===tn&&(document.body.classList.remove(n),ne&&((0,ee.forEach)(re,(e=>{e.removeAttribute("aria-hidden")})),re=[],ne=!1))})),[]),(0,V.createPortal)((0,V.createElement)("div",{ref:(0,Q.useMergeRefs)([S,r]),className:G()("components-modal__screen-overlay",f),onKeyDown:function(e){s&&e.keyCode===Z.ESCAPE&&!e.defaultPrevented&&(e.preventDefault(),d&&d(e))}},(0,V.createElement)(Xt,{document},(0,V.createElement)("div",Y({className:G()("components-modal__frame",_,{"is-full-screen":v}),style:h,ref:(0,Q.useMergeRefs)([O,x,R]),role:o,"aria-label":g,"aria-labelledby":g?null:T,"aria-describedby":u.describedby,tabIndex:"-1"},c?C:{},{onKeyDown:b}),(0,V.createElement)("div",{className:G()("components-modal__content",{"hide-header":w}),role:"document"},!w&&(0,V.createElement)("div",{className:"components-modal__header"},(0,V.createElement)("div",{className:"components-modal__header-heading-container"},m&&(0,V.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},m),a&&(0,V.createElement)("h1",{id:T,className:"components-modal__header-heading"},a)),l&&(0,V.createElement)(en,{onClick:d,icon:J,label:p||(0,X.__)("Close dialog")})),y)))),document.body)}));function nn(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=nn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}const on=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=nn(e))&&(n&&(n+=" "),n+=t);return n};const an=e=>{var{children:t,actions:r,className:n}=e,o=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children","actions","className"]);return z().createElement(rn,Object.assign({className:on("wcpay-confirmation-modal",n)},o),t,z().createElement(K.HorizontalRule,{className:"wcpay-confirmation-modal__separator"}),z().createElement("div",{className:"wcpay-confirmation-modal__footer"},r))};function sn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Pt(t)}window.wp.a11y,r(4146);const cn=["40em","52em","64em"],ln="4px";function un(e){var t,r;if(void 0===e)return;if(!e)return"0";const n="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&null!==(t=window.CSS)&&void 0!==t&&null!==(r=t.supports)&&void 0!==r&&r.call(t,"margin",e.toString())||Number.isNaN(n)?e.toString():`calc(${ln} * ${e})`}const dn={name:"zjik7",styles:"display:flex"},mn={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},pn={name:"82a6rk",styles:"flex:1"},yn={name:"13nosa1",styles:">*{min-height:0;}"},hn={name:"1pwxzk4",styles:">*{min-width:0;}"},fn=new RegExp(/-left/g),_n=new RegExp(/-right/g),gn=new RegExp(/Left/g),bn=new RegExp(/Right/g),vn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,ee.mapKeys)(e,((e,t)=>function(e){return"left"===e?"right":"right"===e?"left":fn.test(e)?e.replace(fn,"-right"):_n.test(e)?e.replace(_n,"-left"):gn.test(e)?e.replace(gn,"Right"):bn.test(e)?e.replace(bn,"Left"):e}(t)))};function wn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return()=>t?(0,X.isRTL)()?sn(t,""):sn(e,""):(0,X.isRTL)()?sn(vn(e),""):sn(e,"")}function Sn(e){const{align:t="center",className:r,direction:n="row",expanded:o=!0,gap:a=2,justify:i="space-between",wrap:s=!1,...c}=Lr(function(e){let{isReversed:t,...r}=e;return void 0!==t?(ae()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...r,direction:t?"row-reverse":"row"}):r}(e),"Flex"),l=function(e){const t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>cn.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${cn.length} breakpoints, got index ${t}`);const[r,n]=(0,V.useState)(t);return(0,V.useEffect)((()=>{const e=()=>{const e=cn.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;r!==e&&n(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[r]),r}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[t>=r.length?r.length-1:t]}(Array.isArray(n)?n:[n]),u="string"==typeof l&&!!l.includes("column"),d="string"==typeof l&&l.includes("reverse"),m=Fr();return{...c,className:(0,V.useMemo)((()=>{const e={};return e.Base=sn({alignItems:u?"normal":t,flexDirection:l,flexWrap:s?"wrap":void 0,justifyContent:i,height:u&&o?"100%":void 0,width:!u&&o?"100%":void 0,marginBottom:s?`calc(${un(a)} * -1)`:void 0},"",""),e.Items=sn(">*+*:not( marquee ){margin-top:",u?un(a):void 0,";",wn({marginLeft:u||d?void 0:un(a),marginRight:!u&&d?un(a):void 0})(),";}",""),e.WrapItems=sn(">*:not( marquee ){margin-bottom:",un(a),";",wn({marginLeft:!u&&d?un(a):void 0,marginRight:u||d?void 0:un(a)})(),";}>*:last-child:not( marquee ){",wn({marginLeft:!u&&d?0:void 0,marginRight:u||d?void 0:0})(),";}",""),m(dn,e.Base,s?e.WrapItems:e.Items,u?yn:hn,r)}),[t,r,m,l,o,a,u,d,i,s,wn.watch()]),isColumn:u}}wn.watch=()=>(0,X.isRTL)();const En=(0,V.createContext)({flexItemDisplay:void 0});$r((function(e,t){const{children:r,isColumn:n,...o}=Sn(e);return(0,V.createElement)(En.Provider,{value:{flexItemDisplay:n?"block":void 0}},(0,V.createElement)(Xr,Y({},o,{ref:t}),r))}),"Flex"),$r((function(e,t){const r=function(e){const{className:t,display:r,isBlock:n=!1,...o}=Lr(e,"FlexItem"),a={},i=(0,V.useContext)(En).flexItemDisplay;return a.Base=sn({display:r||i},"",""),{...o,className:Fr()(mn,a.Base,n&&pn,t)}}(e);return(0,V.createElement)(Xr,Y({},r,{ref:t}))}),"FlexItem"),r(5955),r(9031),r(4275),(0,$.createContext)(void 0),V.Component;const Tn=({isLoading:e,display:t,placeholder:r,value:n,children:o})=>e?z().createElement("span",{className:t?`is-loadable-placeholder is-${t}`:"is-loadable-placeholder","aria-busy":"true"},void 0===r?o||n:r):z().createElement(z().Fragment,null,o||n),Rn=e=>{const t=z().createElement("p",{style:{lineHeight:e.numLines}},"Block placeholder");return z().createElement(Tn,Object.assign({},e,{placeholder:t,display:"block"}))},On=({Icon:e,label:t})=>e?(0,H.jsxs)("span",{className:on("woocommerce-payments__payment-method-icon"),children:[(0,H.jsx)(e,{}),t&&(0,H.jsx)("span",{className:"woocommerce-payments__payment-method-icon__label",children:t})]}):null,xn=({children:e})=>(0,H.jsx)("div",{className:"wcpay-settings-layout",children:e}),Cn=({description:e=()=>null,children:t,className:r,id:n})=>z().createElement("div",{className:on("settings-section",r),id:n},z().createElement("div",{className:"settings-section__details"},z().createElement(e,null)),z().createElement("div",{className:"settings-section__controls"},t)),An=window.wp.domReady;var Nn=r.n(An);const In=(e,t={})=>{var r;if(window.wcpaySettings){Object.assign(t,{is_test_mode:wcpaySettings.testMode,jetpack_connected:wcpaySettings.isJetpackConnected,wcpay_version:wcpaySettings.version,woo_country_code:wcpaySettings.connect.country,hosting_provider:null===(r=wcpaySettings.trackingInfo)||void 0===r?void 0:r.hosting_provider});for(const e in t)void 0===t[e]&&delete t[e]}Nn()((()=>{var r,n;(null!==(n=null===(r=null===wc||void 0===wc?void 0:wc.tracks)||void 0===r?void 0:r.recordEvent)&&void 0!==n?n:wcTracks.recordEvent)(e,t)}))},kn=((0,$.createContext)(window.wcpaySettings),window.wc.currency);var jn=r.n(kn);(0,X.__)("Australian dollar","woocommerce-payments"),(0,X.__)("Canadian dollar","woocommerce-payments"),(0,X.__)("Swiss franc","woocommerce-payments"),(0,X.__)("Danish krone","woocommerce-payments"),(0,X.__)("Euro","woocommerce-payments"),(0,X.__)("Pound sterling","woocommerce-payments"),(0,X.__)("Norwegian krone","woocommerce-payments"),(0,X.__)("New Zealand dollar","woocommerce-payments"),(0,X.__)("Swedish krona","woocommerce-payments"),(0,X.__)("United States (US) dollar","woocommerce-payments");const Pn=e=>wcpaySettings.zeroDecimalCurrencies.includes(e.toLowerCase()),Dn=(e,t="USD",r=null,n=!1)=>{const o=Pn(t);o||(e/=100);const a=e<0,i=a?-1*e:e,s=a?"-":"",c=n?(e=>{const t=e.toUpperCase(),{currencyData:r,connect:{country:n="US"}}=wcpaySettings;if(r[n]?.code===t)return jn()(r[n]);const o=(0,ee.find)(r,{code:t});if(o){const{defaultLocale:e={}}=o;return e.hasOwnProperty("decimalSeparator")&&e.hasOwnProperty("thousandSeparator")&&e.hasOwnProperty("symbolPosition")&&(o.decimalSeparator=e.decimalSeparator,o.thousandSeparator=e.thousandSeparator,o.symbolPosition=e.symbolPosition),jn()(o)}return null})(t):((e,t=null)=>{const{currencyData:r,connect:{country:n="US"}}=wcpaySettings,o=(0,ee.find)(r,{code:e.toUpperCase()});if(o){if(null!==t&&t.toUpperCase()!==e.toUpperCase()||r[n]){const e=t?(0,ee.find)(r,{code:t.toUpperCase()}):r[n];e&&(o.decimalSeparator=e.decimalSeparator,o.thousandSeparator=e.thousandSeparator,o.symbolPosition=e.symbolPosition)}return jn()(o)}return null})(t,r);if(null===c)return s+Fn(i,t,o);try{return s+("function"==typeof c.formatAmount?Mn(c.formatAmount(i)):Mn(c.formatCurrency(i)))}catch(e){return s+Mn(Fn(i,t,o))}};function Fn(e,t,r){try{return e.toLocaleString(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",dummy:r})}catch(n){return(0,X.sprintf)(r?"%s %i":"%s %.2f",t.toUpperCase(),e)}}function Mn(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}const Ln=window.wp.data,Un=window.wp.dataControls,$n="/wc/v3/payments",zn="wc/payments",Bn={SET_DEPOSIT:"SET_DEPOSIT",SET_DEPOSITS:"SET_DEPOSITS",SET_DEPOSITS_COUNT:"SET_DEPOSITS_COUNT",SET_ERROR_FOR_DEPOSIT_QUERY:"SET_ERROR_FOR_DEPOSIT_QUERY",SET_DEPOSITS_SUMMARY:"SET_DEPOSITS_SUMMARY",SET_ERROR_FOR_DEPOSITS_SUMMARY:"SET_ERROR_FOR_DEPOSITS_SUMMARY",SET_INSTANT_DEPOSIT:"SET_INSTANT_DEPOSIT",SET_ALL_DEPOSITS_OVERVIEWS:"SET_ALL_DEPOSITS_OVERVIEWS",SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:"SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS"},qn=e=>JSON.stringify(e,Object.keys(e).sort()),Hn={byId:{},queries:{},count:0,instant:{}},Yn=e=>e&&e.deposits||{},Vn=(e,t)=>(Yn(e).byId||{})[t],Wn=e=>{const t=Yn(e).overviews||{};if(!t.data)return{account:null,currencies:[]};const{deposit:r,balance:n,account:o}=t.data,a={lastPaid:r.last_paid,pending:n.pending,available:n.available,instant:n.instant},i={};for(const[e,t]of Object.entries(a))t?.forEach((t=>{const{currency:r}=t;i[r]||(i[r]={currency:r,lastPaid:void 0,pending:void 0,available:void 0,instant:void 0}),i[r][e]=t}));const s=Object.values(i);return{account:o,currencies:[...s.filter((e=>o.default_currency===e.currency)),...s.filter((e=>o.default_currency!==e.currency))]}},Gn=e=>(Yn(e).overviews||{}).error,Qn=(e,t)=>{const r=qn(t);return(Yn(e).queries||{})[r]||{}},Zn=(e,t)=>(Qn(e,t).data||[]).map(Vn.bind(void 0,e)),Xn=e=>Yn(e).count,Kn=(e,t)=>Qn(e,t).error||{},Jn=(e,t)=>{const r=qn(t);return(Yn(e).summary||{})[r]||{}},eo=(e,t)=>Jn(e,t).data||{},to=(e,t)=>Jn(e,t).error||{},ro=e=>(Yn(e).instant||{}).data,no=window.wp.url,oo=window.moment;var ao=r.n(oo);const io=window.wp.date,so=(window.wc.number,e=>(0,no.addQueryArgs)("admin.php",e)),co=(e,t=!1)=>{const r=t?ao()(e).endOf("day").utc().toISOString():ao()(e).startOf("day").utc().toISOString();return e&&(0,io.dateI18n)("Y-m-d H:i:s",r,!0)};function lo(e){return{type:Bn.SET_DEPOSIT,data:e}}function uo(e){return{type:Bn.SET_ALL_DEPOSITS_OVERVIEWS,data:e}}function mo(e,t){return{type:Bn.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS,error:t}}function po(e,t){return{type:Bn.SET_DEPOSITS,query:e,data:t}}function yo(e){return{type:Bn.SET_DEPOSITS_COUNT,data:e}}function ho(e,t,r){return{type:Bn.SET_ERROR_FOR_DEPOSIT_QUERY,query:e,data:t,error:r}}function fo(e,t){return{type:Bn.SET_DEPOSITS_SUMMARY,query:e,data:t}}function _o(e,t,r){return{type:Bn.SET_ERROR_FOR_DEPOSITS_SUMMARY,query:e,data:t,error:r}}function go(e){return{type:Bn.SET_INSTANT_DEPOSIT,data:e}}function*bo(e){try{yield(0,Ln.dispatch)(zn).startResolution("getInstantDeposit",[e]);const t=yield(0,Un.apiFetch)({path:"/wc/v3/payments/deposits",method:"POST",data:{type:"instant",currency:e}});yield go(t),yield(0,Ln.dispatch)(zn).invalidateResolutionForStoreSelector("getDeposits"),yield(0,Ln.dispatch)(zn).invalidateResolutionForStoreSelector("getAllDepositsOverviews"),yield(0,Ln.dispatch)("core/notices").createSuccessNotice((0,X.sprintf)((0,X.__)("Instant payout for %s in transit.","woocommerce-payments"),Dn(t.amount)),{actions:[{label:(0,X.__)("View details","woocommerce-payments"),url:so({page:"wc-admin",path:"/payments/payouts/details",id:t.id})}]})}catch{yield(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error creating instant payout.","woocommerce-payments"))}finally{yield(0,Ln.dispatch)(zn).finishResolution("getInstantDeposit",[e])}}function*vo(e){if(/\W/.test(e))return;const t=(0,no.addQueryArgs)(`${$n}/deposits/${e}`);try{const e=yield(0,Un.apiFetch)({path:t});yield lo(e)}catch(e){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving payout.","woocommerce-payments"))}}function*wo(){const e=(0,no.addQueryArgs)(`${$n}/deposits/overview-all`);try{const t=yield(0,Un.apiFetch)({path:e});yield uo(t)}catch(e){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving all payouts' overviews.","woocommerce-payments")),yield mo()}}const So=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:co(e.dateBefore,!0),date_after:co(e.dateAfter),date_between:e.dateBetween&&[co(e.dateBetween[0]),co(e.dateBetween[1],!0)],status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.userLocale}),Eo=`${$n}/deposits/download`;function To(e){return(0,no.addQueryArgs)(Eo,So(e))}function*Ro(e){const t=(0,no.addQueryArgs)(`${$n}/deposits`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...So(e)});try{const r=yield(0,Un.apiFetch)({path:t})||{};yield po(e,r.data),yield yo(r.total_count);for(const e in r.data)yield Ln.controls.dispatch(zn,"finishResolution","getDeposit",[r.data[e].id])}catch(t){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving payouts.","woocommerce-payments")),yield ho(e,null,t)}}function*Oo(e){const t=(0,no.addQueryArgs)(`${$n}/deposits/summary`,So(e));try{const r=yield(0,Un.apiFetch)({path:t});yield fo(e,r)}catch(t){yield _o(e,null,t)}}const xo={SET_TRANSACTIONS:"SET_TRANSACTIONS",SET_ERROR_FOR_TRANSACTIONS:"SET_ERROR_FOR_TRANSACTIONS",SET_TRANSACTIONS_SUMMARY:"SET_TRANSACTIONS_SUMMARY",SET_ERROR_FOR_TRANSACTIONS_SUMMARY:"SET_ERROR_FOR_TRANSACTIONS_SUMMARY",SET_FRAUD_OUTCOME_TRANSACTIONS:"SET_FRAUD_OUTCOME_TRANSACTIONS",SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:"SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS",SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:"SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY",SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:"SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY"},Co={summary:{},fraudProtection:{review:{summary:{}},block:{summary:{}}}},Ao=e=>e&&e.transactions||{},No=(e,t)=>{const r=qn(t);return Ao(e)[r]||{}},Io=(e,t)=>No(e,t).data||[],ko=(e,t)=>No(e,t).error||{},jo=(e,t)=>{const r=qn(t);return Ao(e).summary[r]||{}},Po=(e,t)=>jo(e,t).data||{},Do=(e,t)=>jo(e,t).error||{},Fo=(e,t,r)=>{const n=qn(r);return Ao(e).fraudProtection?.[t]?.[n]||{}},Mo=(e,t,r)=>Fo(e,t,r).data||[],Lo=(e,t,r)=>Fo(e,t,r).error||{},Uo=(e,t,r)=>{const n=qn(r);return Ao(e).fraudProtection?.[t]?.summary[n]||{}},$o=(e,t,r)=>Uo(e,t,r).data||{},zo=(e,t,r)=>Uo(e,t,r).error||{};function Bo(e,t){return{type:xo.SET_TRANSACTIONS,query:e,data:t}}function qo(e,t,r){return{type:xo.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:r}}function Ho(e,t){return{type:xo.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function Yo(e,t,r){return{type:xo.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:r}}function Vo(e,t,r){return{type:xo.SET_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:r}}function Wo(e,t,r){return{type:xo.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:null,error:r}}function Go(e,t,r){return{type:xo.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:r}}function Qo(e,t,r){return{type:xo.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:null,error:r}}const Zo=e=>({user_email:e.userEmail,match:e.match,date_before:co(e.dateBefore,!0),date_after:co(e.dateAfter),date_between:e.dateBetween&&[co(e.dateBetween[0]),co(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot,type_is_in:e.typeIsIn,source_device_is:e.sourceDeviceIs,source_device_is_not:e.sourceDeviceIsNot,channel_is:e.channelIs,channel_is_not:e.channelIsNot,customer_country_is:e.customerCountryIs,customer_country_is_not:e.customerCountryIsNot,risk_level_is:e.riskLevelIs,risk_level_is_not:e.riskLevelIsNot,store_currency_is:e.storeCurrencyIs,loan_id_is:e.loanIdIs,deposit_id:e.depositId,customer_currency_is:e.customerCurrencyIs,customer_currency_is_not:e.customerCurrencyIsNot,source_is:e.sourceIs,source_is_not:e.sourceIsNot,search:e.search,user_timezone:ao()(new Date).format("Z"),locale:e.userLocale});function*Xo(e){const t=(0,no.addQueryArgs)(`${$n}/transactions`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...Zo(e)});try{const r=yield(0,Un.apiFetch)({path:t});yield Bo(e,r.data||[])}catch(t){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving transactions.","woocommerce-payments")),yield qo(e,null,t)}}const Ko=`${$n}/transactions/download`;function Jo(e){return(0,no.addQueryArgs)(Ko,Zo(e))}function*ea(e){const t=(0,no.addQueryArgs)(`${$n}/transactions/summary`,Zo(e));try{const r=yield(0,Un.apiFetch)({path:t});yield Ho(e,r)}catch(t){yield Yo(e,null,t)}}function*ta(e,t){const r=(0,no.addQueryArgs)(`${$n}/transactions/fraud-outcomes`,{status:e,page:t.paged,sort:t.orderby,pagesize:t.perPage,direction:t.order,additional_status:t.additionalStatus,...Zo(t)});try{const n=yield(0,Un.apiFetch)({path:r});yield Vo(e,t,n.data||[])}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield Vo(e,t,[]));yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving transactions.","woocommerce-payments")),yield Wo(e,t,r)}}function*ra(e,t){const r=(0,no.addQueryArgs)(`${$n}/transactions/fraud-outcomes/summary`,{status:e,additional_status:t.additionalStatus}),n={count:0,total:0};try{const o=yield(0,Un.apiFetch)({path:r});yield Go(e,t,o||n)}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield Go(e,t,n));yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving on review transactions.","woocommerce-payments")),yield Qo(e,t,r)}}function na(e,t){return(0,no.addQueryArgs)(`${$n}/transactions/fraud-outcomes/download`,{status:e,sort:t.orderby,direction:t.order,additional_status:t.additionalStatus,...Zo(t)})}const oa={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"},aa=(e,t)=>e.charges[t]&&e.charges[t].data?e.charges[t].data:{},ia=(e,t)=>e.charges[t]&&e.charges[t].error?e.charges[t].error:{},sa=(e,t)=>aa(e,t),ca=(e,t)=>ia(e,t);function la(e,t){return{type:oa.SET_CHARGE,id:e,data:t}}function ua(e,t,r){return{type:oa.SET_ERROR_FOR_CHARGE,id:e,data:t,error:r}}function*da(e){try{const t=yield(0,Un.apiFetch)({path:`${$n}/charges/${e}`});yield la(e,t)}catch(t){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving transaction.","woocommerce-payments")),yield ua(e,null,t)}}function*ma(e){try{const t=yield(0,Un.apiFetch)({path:`${$n}/charges/order/${e}`});yield la(e,t)}catch(t){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving transaction.","woocommerce-payments")),yield ua(e,null,t)}}const pa={SET_TIMELINE:"SET_TIMELINE",SET_ERROR_FOR_TIMELINE:"SET_ERROR_FOR_TIMELINE"},ya=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].data?e.timeline[t].data:{},ha=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].error?e.timeline[t].error:{};function fa(e,t){return{id:e,type:pa.SET_TIMELINE,data:t}}function _a(e,t){return{id:e,type:pa.SET_ERROR_FOR_TIMELINE,error:t}}function*ga(e){try{const t=yield(0,Un.apiFetch)({path:`${$n}/timeline/${e}`});yield fa(e,t.data)}catch(t){yield _a(e,t)}}const ba={SET_DISPUTE:"SET_DISPUTE",SET_ERROR_FOR_DISPUTE:"SET_ERROR_FOR_DISPUTE",SET_DISPUTES:"SET_DISPUTES",SET_DISPUTES_SUMMARY:"SET_DISPUTES_SUMMARY"},va={byId:{},queries:{},summary:{},cached:{}},wa=e=>e&&e.disputes||{},Sa=(e,t)=>(wa(e).byId||{})[t],Ea=(e,t)=>{const r=wa(e).byId||{};return r[t]?.error},Ta=(e,t)=>(wa(e).cached||{})[t],Ra=(e,t)=>{const r=((e,t)=>{const r=qn(t);return(wa(e).queries||{})[r]||{}})(e,t).data||[];return r.map(Ta.bind(void 0,e))},Oa=(e,t)=>((e,t)=>{const r=qn(t);return(wa(e).summary||{})[r]||{}})(e,t).data||{};var xa;!function(e){e.SET_PAYMENT_INTENT="SET_PAYMENT_INTENT",e.SET_ERROR_FOR_PAYMENT_INTENT="SET_ERROR_FOR_PAYMENT_INTENT"}(xa||(xa={}));const Ca=xa;function Aa(e,t){return{type:Ca.SET_PAYMENT_INTENT,id:e,data:t}}function Na(e,t){return{type:Ca.SET_ERROR_FOR_PAYMENT_INTENT,id:e,error:t}}function*Ia(e,t){var r;const n=e.payment_intent;try{yield(0,Un.apiFetch)({path:"/wc/v3/payments/refund/",method:"post",data:{charge_id:e.id,amount:e.amount,reason:t,order_id:null===(r=null==e?void 0:e.order)||void 0===r?void 0:r.id}}),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getTimeline"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Ln.controls.dispatch("core/notices","createSuccessNotice",(0,X.sprintf)((0,X.__)("Refunded payment #%s.","woocommerce-payments"),n))}catch(e){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.sprintf)((0,X.__)("There has been an error refunding the payment #%s. Please try again later.","woocommerce-payments"),n))}}function*ka(e){try{const t=yield(0,Un.apiFetch)({path:`${$n}/payment_intents/${e}`});yield Aa(e,t)}catch(t){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving transaction.","woocommerce-payments")),yield Na(e,t)}}function ja(e){return{type:ba.SET_DISPUTE,data:e}}function Pa(e,t,r){return{type:ba.SET_ERROR_FOR_DISPUTE,id:e,data:t,error:r}}function Da(e,t){return{type:ba.SET_DISPUTES,query:e,data:t}}function Fa(e,t){return{type:ba.SET_DISPUTES_SUMMARY,query:e,data:t}}function*Ma(e){const{id:t,payment_intent:r}=e;try{yield Ln.controls.dispatch(zn,"startResolution","getDispute",[t]);const e=yield(0,Un.apiFetch)({path:`${$n}/disputes/${t}/close`,method:"post"});yield ja(e),yield ka(r),yield Ln.controls.dispatch(zn,"finishResolution","getDispute",[t]);const n=e.order?(0,X.sprintf)((0,X.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),e.order.number):(0,X.__)("You have accepted the dispute.","woocommerce-payments");yield Ln.controls.dispatch("core/notices","createSuccessNotice",n)}catch(e){const r=(0,X.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments");yield Ln.controls.dispatch("core/notices","createErrorNotice",r),yield Ln.controls.dispatch(zn,"finishResolution","getDispute",[t])}}const La=window.wc.wcSettings,Ua=((0,X.__)("Bank cannot process","woocommerce-payments"),(0,X.__)("Check returned","woocommerce-payments"),(0,X.__)("Credit not processed","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If your customer was not refunded appropriately, you will need to accept the dispute, or resolve the issue with your customer. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The customer claims that the purchased product was returned or the transaction was otherwise canceled, but you have not yet provided a refund or credit.","woocommerce-payments"),(0,X.__)("Demonstrate that you have refunded your customer through other means or that your customer is not entitled to a refund. You cannot issue a refund while a payment is being disputed. If you believe that your customer was entitled a refund that you did not provide, you can accept the dispute.","woocommerce-payments"),(0,X.__)("You should first get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),(0,X.__)("If the cardholder agrees to withdraw the dispute, you should still submit evidence for the dispute using the forms on the next screen. In addition to the following evidence, your submission should include correspondence with the cardholder saying they would withdraw the dispute and a written statement from their card issuer confirming that the dispute has been withdrawn.","woocommerce-payments"),(0,X.__)("The cardholder claims a credit was not processed.","woocommerce-payments"),(0,X.__)("Customer initiated","woocommerce-payments"),(0,X.__)("Debit not authorized","woocommerce-payments"),(0,X.__)("Duplicate","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If there were duplicate payments, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments"),(0,X.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments"),(0,X.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),(0,X.__)("If they were not, collect any and all information documenting that each payment was made separately, such as copies of receipts. If the receipts don’t include the items purchased, be sure to include an itemized list. Each receipt should clearly indicate that the payments are for separate purchases of items or services. If you’ve been able to get in touch with the customer you should be sure to address any concerns they had in your evidence.","woocommerce-payments"),(0,X.__)("If there have been two or more separate payments, you should get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),(0,X.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,X.__)("The cardholder claims this is a duplicate transaction.","woocommerce-payments"),(0,X.__)("Transaction unauthorized","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If you believe the payment was actually made using a stolen credit card, you will need to accept the dispute. The credit card networks place liability for accepting unauthorized transactions with you, the business.","woocommerce-payments"),(0,X.__)("This is the most common reason for a dispute, and happens when a cardholder claims that they didn’t authorize the payment. This can happen if the card was lost or stolen and used to make an unauthorized transaction. It can also happen if the cardholder doesn’t recognize the payment as it appears on the billing statement from their card issuer.","woocommerce-payments"),(0,X.__)("Provide adequate payment and order details so that a legitimate customer recognizes it, or proves to the card issuer that their cardholder authorized the transaction.","woocommerce-payments"),(0,X.__)("Try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction.","woocommerce-payments"),(0,X.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,X.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments"),(0,X.__)("The cardholder claims this is an unauthorized transaction.","woocommerce-payments"),(0,X.__)("General","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("This is an uncategorized dispute, so you should contact the customer for additional details to find out why the payment was disputed.","woocommerce-payments"),(0,X.__)("Incorrect account details","woocommerce-payments"),(0,X.__)("Insufficient funds","woocommerce-payments"),(0,X.__)("Product not received","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If you can not prove the customer received their product or service, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments"),(0,X.__)("Prove that the customer received a physical product or offline service, or made use of a digital product or online service. This must have occurred prior to the date the dispute was initiated.","woocommerce-payments"),(0,X.__)("First, get in touch with your customer. Understanding why they filed the dispute will be important for helping make sure your customer gets the product and will give you critical information to prevent this from happening to others.","woocommerce-payments"),(0,X.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,X.__)("The cardholder claims the product was not received.","woocommerce-payments"),(0,X.__)("Product unacceptable","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If you can not prove the customer received their product or service as described, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments"),(0,X.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments"),(0,X.__)("If the product or service is as described, provide specific information (invoice, contract, etc.) to refute the cardholder’s claims. Quality disputes are where the customer does not agree with the condition of merchandise or service received (e.g., a car repair situation or quality of a hotel room). There may be instances where you will need to obtain a neutral third-party opinion to help corroborate your claim against the cardholder. Provide as much specific information and documentation as possible to refute the cardholder’s claims. It is recommended that you address each point that the cardholder has made.","woocommerce-payments"),(0,X.__)("If the customer has not yet returned the product or canceled the service, provide specific information to that effect. You should double-check your incoming shipping records to verify that you have not received a return before you respond. If you have processed a credit or reversal for this transaction, provide evidence of this which includes the amount and date processed.","woocommerce-payments"),(0,X.__)("For products that have been repaired or replaced, provide evidence that the cardholder agreed to a repair or replacement, it has been received by the customer, and the repair or replacement has not since been disputed.","woocommerce-payments"),(0,X.__)("If your customer made no attempt to return the product or cancel the service, or if you provided a replacement product or service, make sure to note that as well.","woocommerce-payments"),(0,X.__)("If the customer withdraws their dispute you should still submit evidence using the forms on the next screen. Be sure to provide a letter or email from the cardholder stating that they are no longer in dispute.","woocommerce-payments"),(0,X.__)("The cardholder claims the product was unacceptable.","woocommerce-payments"),(0,X.__)("Subscription canceled","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancellation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments"),(0,X.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,X.__)("First, get in touch with your customer. If you understand what they believe happened, there is a chance for you to explain the misunderstanding or to make it right. ","woocommerce-payments"),(0,X.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,X.__)("Otherwise, use the forms on the next screen to submit evidence that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,X.__)("The cardholder claims a subscription was canceled.","woocommerce-payments"),(0,X.__)("Unrecognized","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancellation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments"),(0,X.__)("Get your customer to withdraw the dispute by helping them identify the payment. Otherwise, challenge the dispute with appropriate evidence that proves the purchase was legitimate. ","woocommerce-payments"),(0,X.__)("First, try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction. Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,X.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments"),{warning_needs_response:(0,X.__)("Inquiry: Needs response","woocommerce-payments"),warning_under_review:(0,X.__)("Inquiry: Under review","woocommerce-payments"),warning_closed:(0,X.__)("Inquiry: Closed","woocommerce-payments"),needs_response:(0,X.__)("Needs response","woocommerce-payments"),under_review:(0,X.__)("Under review","woocommerce-payments"),charge_refunded:(0,X.__)("Charge refunded","woocommerce-payments"),won:(0,X.__)("Won","woocommerce-payments"),lost:(0,X.__)("Lost","woocommerce-payments")}),$a=(Object.entries(Ua).map((([e,t])=>({label:t,value:e}))).filter((function(e){return null!=e})),["needs_response","warning_needs_response"]),za=((0,X.__)("Dispute currency","woocommerce-payments"),(0,X.__)("All currencies","woocommerce-payments"),(0,X.__)("Show","woocommerce-payments"),(0,X.__)("Needs response","woocommerce-payments"),(0,X.__)("All disputes","woocommerce-payments"),(0,X.__)("Advanced filters","woocommerce-payments"),(0,La.getSetting)("wcVersion")),Ba=parseFloat(za),qa=(Ba<7.8?(0,X.__)("Disputes match {{select /}} filters","woocommerce-payments"):(0,X.__)("Disputes match <select /> filters","woocommerce-payments"),(0,X.__)("Disputed on date","woocommerce-payments"),(0,X.__)("Remove dispute date filter","woocommerce-payments"),(0,X.__)("Select a dispute date filter match","woocommerce-payments"),Ba<7.8?(0,X.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,X.__)("<title>Date</title> <rule /> <filter />","woocommerce-payments"),(0,X.__)("Select a dispute date","woocommerce-payments"),(0,X.__)("Before","woocommerce-payments"),(0,X.__)("After","woocommerce-payments"),(0,X.__)("Between","woocommerce-payments"),(0,X.__)("Status","woocommerce-payments"),(0,X.__)("Remove dispute status filter","woocommerce-payments"),(0,X.__)("Select a dispute status filter match","woocommerce-payments"),Ba<7.8?(0,X.__)("{{title}}Status{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,X.__)("<title>Status</title> <rule /> <filter />","woocommerce-payments"),(0,X.__)("Select a dispute status","woocommerce-payments"),(0,X._x)("Is","dispute status","woocommerce-payments"),(0,X._x)("Is not","dispute status","woocommerce-payments"),e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:co(e.dateBefore,!0),date_after:co(e.dateAfter),date_between:e.dateBetween&&[co(e.dateBetween[0]),co(e.dateBetween[1],!0)],search:"awaiting_response"===e.filter?$a:e.search,status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.userLocale})),Ha=`${$n}/disputes/download`;function Ya(e){return(0,no.addQueryArgs)(Ha,qa(e))}function*Va(e){const t=(0,no.addQueryArgs)(`${$n}/disputes/${e}`);try{const e=yield(0,Un.apiFetch)({path:t});yield ja(e)}catch(t){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving dispute.","woocommerce-payments")),yield Pa(e,void 0,t)}}function*Wa(e){const t=(0,no.addQueryArgs)(`${$n}/disputes`,{page:e.paged,pagesize:e.perPage,sort:(0,ee.snakeCase)(e.orderBy),direction:e.order,...qa(e)});try{const r=yield(0,Un.apiFetch)({path:t})||{};yield Da(e,r.data)}catch(e){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving disputes.","woocommerce-payments"))}}function*Ga(e){const t=(0,no.addQueryArgs)(`${$n}/disputes/summary`,{page:e.paged,pagesize:e.perPage,...qa(e)});try{const r=yield(0,Un.apiFetch)({path:t});yield Fa(e,r)}catch(e){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving the summary of disputes.","woocommerce-payments"))}}const Qa={SET_SETTINGS:"SET_SETTINGS",SET_SETTINGS_VALUES:"SET_SETTINGS_VALUES",SET_IS_SAVING_SETTINGS:"SET_IS_SAVING_SETTINGS",SET_SELECTED_PAYMENT_METHOD:"SET_SELECTED_PAYMENT_METHOD",SET_UNSELECTED_PAYMENT_METHOD:"SET_UNSELECTED_PAYMENT_METHOD"},Za={isDirty:!1,isSaving:!1,savingError:null,data:{}},Xa={},Ka=[],Ja=e=>e&&e.settings||Xa,ei=e=>Ja(e).data||Xa,ti=e=>ei(e).duplicated_payment_method_ids||Xa,ri=e=>ei(e).is_wcpay_enabled||!1,ni=e=>ei(e).enabled_payment_method_ids||Ka,oi=e=>ei(e).available_payment_method_ids||Ka,ai=e=>ei(e).payment_method_statuses||Xa,ii=e=>Ja(e).isSaving||!1,si=e=>Ja(e).isDirty||!1,ci=e=>ei(e).account_statement_descriptor||"",li=e=>ei(e).account_statement_descriptor_kanji||"",ui=e=>ei(e).account_statement_descriptor_kana||"",di=e=>ei(e).account_business_support_email||"",mi=e=>ei(e).account_business_support_phone||"",pi=e=>ei(e).account_domestic_currency||"",yi=e=>ei(e).deposit_schedule_interval||"",hi=e=>ei(e).deposit_schedule_weekly_anchor||"",fi=e=>ei(e).deposit_schedule_monthly_anchor||"",_i=e=>ei(e).deposit_delay_days||"7",gi=e=>ei(e).deposit_completed_waiting_period||!1,bi=e=>ei(e).deposit_status||"",vi=e=>ei(e).deposit_restrictions||"",wi=e=>ei(e).is_manual_capture_enabled||!1,Si=e=>ei(e).is_test_mode_enabled||!1,Ei=e=>ei(e).is_test_mode_onboarding||!1,Ti=e=>ei(e).is_dev_mode_enabled||!1,Ri=e=>ei(e).is_payment_request_enabled||!1,Oi=e=>ei(e).is_debug_log_enabled||!1,xi=e=>ei(e).is_multi_currency_enabled||!1,Ci=e=>ei(e).payment_request_enabled_locations||Ka,Ai=e=>ei(e).payment_request_button_type||"",Ni=e=>ei(e).payment_request_button_size||"",Ii=e=>ei(e).payment_request_button_theme||"",ki=e=>{const t=ei(e)?.payment_request_button_border_radius;return 0===t||"0"===t||t?t:"undefined"==typeof wcpaySettings?4:parseInt(window?.wcpaySettings?.defaultExpressCheckoutBorderRadius||4,10)},ji=e=>ei(e).is_saved_cards_enabled||!1,Pi=e=>Ja(e).savingError,Di=e=>ei(e).is_card_present_eligible||!1,Fi=e=>ei(e).is_wcpay_subscriptions_enabled||!1,Mi=e=>ei(e).is_wcpay_subscriptions_eligible||!1,Li=e=>ei(e).is_subscriptions_plugin_active||!1,Ui=e=>ei(e).is_woopay_enabled||!1,$i=e=>ei(e).is_woopay_global_theme_support_enabled||!1,zi=e=>ei(e).woopay_custom_message||"",Bi=e=>ei(e).woopay_store_logo||"",qi=e=>ei(e).woopay_enabled_locations||Ka,Hi=e=>ei(e).current_protection_level||"basic",Yi=e=>ei(e).advanced_fraud_protection_settings||Ka,Vi=e=>ei(e).show_woopay_incompatibility_notice||!1,Wi=e=>ei(e).is_stripe_billing_enabled||!1,Gi=e=>ei(e).is_migrating_stripe_billing||!1,Qi=e=>ei(e).stripe_billing_subscription_count||0,Zi=e=>ei(e).stripe_billing_migrated_count||0,Xi=window.wp.apiFetch;var Ki=r.n(Xi);function Ji(e){return{type:Qa.SET_SETTINGS_VALUES,payload:e}}function es(e){return Ji({is_saved_cards_enabled:e})}function ts(e){return Ji({is_card_present_eligible:e})}function rs(e){return Ji({payment_request_button_type:e})}function ns(e){return Ji({payment_request_button_size:e})}function os(e){return Ji({payment_request_button_theme:e})}function as(e){return Ji({payment_request_button_border_radius:e})}function is(e){return{type:Qa.SET_SETTINGS,data:e}}function ss(e){return Ji({is_wcpay_enabled:e})}function cs(e){return Ji({is_payment_request_enabled:e})}function ls(e){return Ji({enabled_payment_method_ids:[...e]})}function us(e,t){return{type:Qa.SET_IS_SAVING_SETTINGS,isSaving:e,error:t}}function ds(e){return{type:Qa.SET_SELECTED_PAYMENT_METHOD,id:e}}function ms(e){return{type:Qa.SET_UNSELECTED_PAYMENT_METHOD,id:e}}function ps(e){return Ji({is_manual_capture_enabled:e})}function ys(e){return Ji({is_test_mode_enabled:e})}function hs(e){return Ji({is_debug_log_enabled:e})}function fs(e){return Ji({is_multi_currency_enabled:e})}function _s(e){return Ji({is_wcpay_subscriptions_enabled:e})}function gs(e){return Ji({account_statement_descriptor:e})}function bs(e){return Ji({account_statement_descriptor_kanji:e})}function vs(e){return Ji({account_statement_descriptor_kana:e})}function ws(e){return Ji({account_business_support_email:e})}function Ss(e){return Ji({account_business_support_phone:e})}function Es(e){return Ji({deposit_schedule_interval:e})}function Ts(e){return Ji({deposit_schedule_weekly_anchor:e})}function Rs(e){return Ji({deposit_schedule_monthly_anchor:""===e?null:parseInt(e,10)})}function*Os(){let e=null;try{const e=(0,Ln.select)(zn).getSettings();yield us(!0,null);const t=yield(0,Un.apiFetch)({path:`${$n}/settings`,method:"post",data:e});yield Ji({payment_method_statuses:t.data.payment_method_statuses}),yield(0,Ln.dispatch)("core/notices").createSuccessNotice((0,X.__)("Settings saved.","woocommerce-payments"))}catch(t){e=t,yield(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error saving settings.","woocommerce-payments")),e.server_error&&(yield(0,Ln.dispatch)("core/notices").createErrorNotice(e.server_error))}finally{yield us(!1,e)}return null===e}function xs(e){return Ji({payment_request_enabled_locations:[...e]})}function Cs(e){return Ji({is_woopay_enabled:e})}function As(e){return Ji({is_woopay_global_theme_support_enabled:e})}function Ns(e){return Ji({woopay_custom_message:e})}function Is(e){return Ji({woopay_store_logo:e})}function ks(e){return Ji({woopay_enabled_locations:[...e]})}function js(e){return Ji({current_protection_level:e})}function Ps(e){return Ji({advanced_fraud_protection_settings:e})}function Ds(e){return Ji({is_stripe_billing_enabled:e})}function*Fs(){try{yield(0,Ln.dispatch)(zn).startResolution("scheduleStripeBillingMigration"),yield(0,Un.apiFetch)({path:`${$n}/settings/schedule-stripe-billing-migration`,method:"post"})}catch(e){yield(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error starting the Stripe Billing migration.","woocommerce-payments"))}yield(0,Ln.dispatch)(zn).finishResolution("scheduleStripeBillingMigration")}function Ms(e,t){Ki()({path:`${$n}/settings/${e}`,method:"post",data:{value:t}}).catch((()=>{(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error saving option","woocommerce-payments"))}))}function*Ls(){const e=`${$n}/settings`;try{const t=yield(0,Un.apiFetch)({path:e});yield is(t)}catch(e){yield(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error retrieving settings.","woocommerce-payments"))}}const Us={SET_CARD_READER_STATS:"SET_CARD_READER_STATS",SET_ERROR_FOR_CARD_READER_STATS:"SET_ERROR_FOR_CARD_READER_STATS",SET_READERS:"SET_READERS",SET_ERROR_FOR_CARD_READERS:"SET_ERROR_FOR_CARD_READERS"},$s=(e,t)=>e.readers[t]&&e.readers[t].data?e.readers[t].data:{},zs=(e,t)=>e.readers[t]&&e.readers[t].error?e.readers[t].error:{},Bs=e=>e.readers&&e.readers.list?e.readers.list:{};function qs(e,t){return{type:Us.SET_CARD_READER_STATS,id:e,data:t}}function Hs(e,t){return{type:Us.SET_READERS,query:e,data:t}}function Ys(e,t,r){return{type:Us.SET_CARD_ERROR_FOR_READER_STATS,id:e,data:t,error:r}}function Vs(e,t){return{type:Us.SET_CARD_ERROR_FOR_READERS,data:e,error:t}}function*Ws(e,t){try{const r=yield(0,Un.apiFetch)({path:`${$n}/readers/charges/${t}`});yield qs(e,r)}catch(t){yield Ys(e,null,t)}}function*Gs(e){const t=(0,no.addQueryArgs)(`${$n}/readers`,{limit:e.limit});try{const r=yield(0,Un.apiFetch)({path:t})||{};yield Hs(e,r)}catch(e){yield Vs(null,e)}}var Qs;!function(e){e.SET_ACTIVE_LOAN_SUMMARY="SET_ACTIVE_LOAN_SUMMARY",e.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY="SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY",e.SET_LOANS="SET_LOANS",e.SET_ERROR_FOR_LOANS="SET_ERROR_FOR_LOANS"}(Qs||(Qs={}));const Zs=Qs,Xs={},Ks=e=>e&&e.capital||{},Js=e=>Ks(e).summary,ec=e=>Ks(e).summaryError,tc=e=>Ks(e).loans||[],rc=e=>Ks(e).loansError;function nc(e){return{type:Zs.SET_ACTIVE_LOAN_SUMMARY,data:e}}function oc(e){return{type:Zs.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY,error:e}}function ac(e){return{type:Zs.SET_LOANS,data:e.data}}function ic(e){return{type:Zs.SET_ERROR_FOR_LOANS,error:e}}function*sc(){const e=`${$n}/capital/active_loan_summary`;try{const t=yield(0,Un.apiFetch)({path:e});yield nc(t)}catch(e){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield oc(e)}}function*cc(){const e=`${$n}/capital/loans`;try{const t=yield(0,Un.apiFetch)({path:e});yield ac(t)}catch(e){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield ic(e)}}const lc={SET_DOCUMENTS:"SET_DOCUMENTS",SET_ERROR_FOR_DOCUMENTS:"SET_ERROR_FOR_DOCUMENTS",SET_DOCUMENTS_SUMMARY:"SET_DOCUMENTS_SUMMARY",SET_ERROR_FOR_DOCUMENTS_SUMMARY:"SET_ERROR_FOR_DOCUMENTS_SUMMARY"},uc={summary:{}},dc=e=>e&&e.documents||{},mc=(e,t)=>{const r=qn(t);return dc(e)[r]||{}},pc=(e,t)=>mc(e,t).data||[],yc=(e,t)=>mc(e,t).error||{},hc=(e,t)=>{const r=qn(t);return dc(e).summary[r]||{}},fc=(e,t)=>hc(e,t).data||{},_c=(e,t)=>hc(e,t).error||{};function gc(e,t){return{type:lc.SET_DOCUMENTS,query:e,data:t}}function bc(e,t,r){return{type:lc.SET_ERROR_FOR_DOCUMENTS,query:e,data:t,error:r}}function vc(e,t){return{type:lc.SET_DOCUMENTS_SUMMARY,query:e,data:t}}function Sc(e,t,r){return{type:lc.SET_ERROR_FOR_DOCUMENTS_SUMMARY,query:e,data:t,error:r}}const Ec=e=>({user_email:e.userEmail,match:e.match,date_before:co(e.dateBefore,!0),date_after:co(e.dateAfter),date_between:e.dateBetween&&[co(e.dateBetween[0]),co(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot});function*Tc(e){const t=(0,no.addQueryArgs)(`${$n}/documents`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...Ec(e)});try{const r=yield(0,Un.apiFetch)({path:t});yield gc(e,r.data||[])}catch(t){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving documents.","woocommerce-payments")),yield bc(e,null,t)}}function*Rc(e){const t=(0,no.addQueryArgs)(`${$n}/documents/summary`,Ec(e));try{const r=yield(0,Un.apiFetch)({path:t});yield vc(e,r)}catch(t){yield Sc(e,null,t)}}const Oc={},xc=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},Cc=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}},Ac={SET_AUTHORIZATIONS:"SET_AUTHORIZATIONS",SET_AUTHORIZATION:"SET_AUTHORIZATION",SET_ERROR_FOR_AUTHORIZATIONS:"SET_ERROR_FOR_AUTHORIZATIONS",SET_AUTHORIZATIONS_SUMMARY:"SET_AUTHORIZATIONS_SUMMARY",SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:"SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY",SET_IS_REQUESTING_AUTHORIZATION:"SET_IS_REQUESTING_AUTHORIZATION"},Nc={summary:{},byId:{},isRequesting:!1},Ic=e=>e&&e.authorizations||{},kc=(e,t)=>{const r=qn(t);return Ic(e)[r]||{}},jc=(e,t)=>kc(e,t).data||[],Pc=(e,t)=>(Ic(e).byId||{})[t],Dc=(e,t)=>kc(e,t).error||{},Fc=(e,t)=>{const r=qn(t);return Ic(e).summary[r]||{}},Mc=(e,t)=>Fc(e,t).data||{},Lc=(e,t)=>Fc(e,t).error||{},Uc=e=>Ic(e).isRequesting,$c=e=>{var t;const r={wcpay_missing_order:(0,X.__)("The order could not be found.","woocommerce-payments"),wcpay_refunded_order_uncapturable:(0,X.__)("Payment cannot be processed for partially or fully refunded orders.","woocommerce-payments"),wcpay_intent_order_mismatch:(0,X.__)("The payment cannot be processed due to a mismatch with order details.","woocommerce-payments"),wcpay_payment_uncapturable:(0,X.__)("This payment cannot be processed in its current state.","woocommerce-payments"),wcpay_capture_error:e=>{var t;return"amount_too_small"===(null===(t=e.data)||void 0===t?void 0:t.error_type)?(e=>{var t,r,n,o;if(!(null===(r=null===(t=e.data)||void 0===t?void 0:t.extra_details)||void 0===r?void 0:r.minimum_amount)||!(null===(o=null===(n=e.data)||void 0===n?void 0:n.extra_details)||void 0===o?void 0:o.minimum_amount_currency))return(0,X.__)("The payment amount is too small to be processed.","woocommerce-payments");const a=e.data.extra_details.minimum_amount_currency,i=Dn(e.data.extra_details.minimum_amount,a);return(0,X.sprintf)((0,X.__)("The minimum amount that can be processed is %1$s %2$s.","woocommerce-payments"),i,a.toUpperCase())})(e):(0,X.__)("The payment capture failed to complete.","woocommerce-payments")},wcpay_cancel_error:(0,X.__)("The payment cancellation failed to complete.","woocommerce-payments"),wcpay_server_error:(0,X.__)("An unexpected error occurred. Please try again later.","woocommerce-payments")},n=r[null!==(t=e.code)&&void 0!==t?t:""];return"function"==typeof n?n(e):null!=n?n:(0,X.__)("Unable to process the payment. Please try again later.","woocommerce-payments")};function zc(e,t){return{type:Ac.SET_AUTHORIZATIONS,data:t,query:e}}function Bc(e,t){return{type:Ac.SET_ERROR_FOR_AUTHORIZATIONS,query:e,error:t}}function qc(e){return{type:Ac.SET_AUTHORIZATION,data:e}}function Hc(e,t){return{type:Ac.SET_AUTHORIZATIONS_SUMMARY,data:t,query:e}}function Yc(e){return{type:Ac.SET_IS_REQUESTING_AUTHORIZATION,data:e}}function*Vc(e,t){try{yield Ln.controls.dispatch(zn,"startResolution","getAuthorization",[e]),yield Ln.controls.dispatch(zn,"setIsRequestingAuthorization",!0);const r=yield(0,Un.apiFetch)({path:`/wc/v3/payments/orders/${t}/capture_authorization`,method:"post",data:{payment_intent_id:e}}),n={payment_intent_id:r.id,captured:"succeeded"===r.status};yield qc(n),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getAuthorizations"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getTimeline"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getTransactions"),yield Ln.controls.dispatch("core/notices","createSuccessNotice",(0,X.sprintf)((0,X.__)("Payment for order #%s captured successfully.","woocommerce-payments"),t))}catch(e){const r=(0,X.sprintf)((0,X.__)("There has been an error capturing the payment for order #%s.","woocommerce-payments"),t),n=$c(e);yield Ln.controls.dispatch("core/notices","createErrorNotice",`${r} ${n}`)}finally{yield Ln.controls.dispatch(zn,"finishResolution","getAuthorization",[e]),yield Ln.controls.dispatch(zn,"setIsRequestingAuthorization",!1)}}function*Wc(e,t){try{yield Ln.controls.dispatch(zn,"startResolution","getAuthorization",[e]),yield Ln.controls.dispatch(zn,"setIsRequestingAuthorization",!0);const r=yield(0,Un.apiFetch)({path:`/wc/v3/payments/orders/${t}/cancel_authorization`,method:"post",data:{payment_intent_id:e}}),n={payment_intent_id:r.id,captured:"succeeded"===r.status};yield qc(n),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getAuthorizations"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getTimeline"),yield Ln.controls.dispatch(zn,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Ln.controls.dispatch("core/notices","createSuccessNotice",(0,X.sprintf)((0,X.__)("Payment for order #%s canceled successfully.","woocommerce-payments"),t))}catch(e){const r=(0,X.sprintf)((0,X.__)("There has been an error canceling the payment for order #%s.","woocommerce-payments"),t),n=$c(e);yield Ln.controls.dispatch("core/notices","createErrorNotice",`${r} ${n}`)}finally{yield Ln.controls.dispatch(zn,"finishResolution","getAuthorization",[e]),yield Ln.controls.dispatch(zn,"setIsRequestingAuthorization",!1)}}function Gc(e,t){return{type:Ac.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY,query:e,error:t}}function*Qc(e){var t;let{paged:r=1,per_page:n=25,orderby:o="created",order:a="asc"}=e;"capture_by"===o&&(o="created");const i=(0,no.addQueryArgs)(`${$n}/authorizations`,{page:r,pagesize:n,sort:o,direction:a});try{const r=yield(0,Un.apiFetch)({path:i});yield zc(e,null!==(t=r.data)&&void 0!==t?t:[])}catch(t){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield Bc(e,t)}}function*Zc(e){try{if(e){const t=yield(0,Un.apiFetch)({path:`${$n}/authorizations/${e}`}),{is_captured:r,payment_intent_id:n,created:o}=t;yield qc({payment_intent_id:n,captured:r,created:o})}}catch(e){"authorization_missing"!==e.code&&(yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving authorization.","woocommerce-payments")))}}function*Xc(e){const t=(0,no.addQueryArgs)(`${$n}/authorizations/summary`,{pagesize:e.per_page,sort:e.orderby,direction:e.order,page:e.paged});try{const r=yield(0,Un.apiFetch)({path:t});yield Hc(e,null!=r?r:[])}catch(t){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield Gc(e,t)}}var Kc;!function(e){e.SET_FILE="SET_FILE",e.SET_ERROR_FOR_FILES="SET_ERROR_FOR_FILES"}(Kc||(Kc={}));const Jc=Kc,el={},tl=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},rl=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}};function nl(e,t){return{type:Jc.SET_FILE,id:e,data:t}}function ol(e,t){return{type:Jc.SET_ERROR_FOR_FILES,id:e,error:t}}function*al(e){try{const t=yield(0,Un.apiFetch)({path:`${$n}/file/${e}/details`});yield nl(e,t)}catch(t){yield Ln.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving file.","woocommerce-payments")),yield ol(e,t)}}(0,Ln.registerStore)(zn,{reducer:(0,Ln.combineReducers)({deposits:(e=Hn,{type:t,query:r={},data:n=[],error:o})=>{const a=qn(r);switch(t){case Bn.SET_DEPOSIT:return{...e,byId:{...e.byId,[n.id]:n}};case Bn.SET_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,data:n}};case Bn.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,error:o}};case Bn.SET_DEPOSITS:return{...e,byId:{...e.byId,...(0,ee.keyBy)(n,"id")},queries:{...e.queries,[a]:{data:(0,ee.map)(n,"id")}}};case Bn.SET_DEPOSITS_COUNT:return{...e,count:n};case Bn.SET_ERROR_FOR_DEPOSIT_QUERY:return{...e,queries:{...e.queries,[a]:{error:o}}};case Bn.SET_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:n}}};case Bn.SET_ERROR_FOR_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:o}}};case Bn.SET_INSTANT_DEPOSIT:return{...e,instant:{...e.instant,data:n}}}return e},transactions:(e=Co,{type:t,query:r={},data:n=[],error:o,status:a})=>{const i=qn(r);switch(t){case xo.SET_TRANSACTIONS:return{...e,[i]:{data:n}};case xo.SET_ERROR_FOR_TRANSACTIONS:return{...e,[i]:{error:o}};case xo.SET_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[i]:{data:n}}};case xo.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[i]:{error:o}}};case xo.SET_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[i]:{data:n}}}};case xo.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[i]:{error:o}}}};case xo.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[i]:{data:n}}}}};case xo.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[i]:{error:o}}}}}}return e},charges:(e={},{type:t,id:r,data:n,error:o})=>{switch(t){case oa.SET_CHARGE:e={...e,[r]:{...e[r],data:n}};break;case oa.SET_ERROR_FOR_CHARGE:e={...e,[r]:{...e[r],error:o}}}return e},timeline:(e={},{type:t,id:r,data:n,error:o})=>{switch(t){case pa.SET_TIMELINE:e={...e,[r]:{data:n}};break;case pa.SET_ERROR_FOR_TIMELINE:e={...e,[r]:{...e[r],error:o}}}return e},disputes:(e=va,{type:t,query:r={},data:n=[],id:o,error:a})=>{const i=qn(r);switch(t){case ba.SET_DISPUTE:return{...e,byId:{...e.byId,[n.id]:n}};case ba.SET_ERROR_FOR_DISPUTE:e={...e,byId:{...e.byId,[o]:{error:a}}};break;case ba.SET_DISPUTES:return{...e,cached:{...e.cached,...(0,ee.keyBy)(n,"dispute_id")},queries:{...e.queries,[i]:{data:(0,ee.map)(n,"dispute_id")}}};case ba.SET_DISPUTES_SUMMARY:return{...e,summary:{...e.summary,[i]:{data:n}}}}return e},settings:(e=Za,{type:t,...r})=>{switch(t){case Qa.SET_SETTINGS:return{...e,data:r.data,isDirty:!1};case Qa.SET_SETTINGS_VALUES:return{...e,savingError:null,isDirty:!0,data:{...e.data,...r.payload}};case Qa.SET_IS_SAVING_SETTINGS:return{...e,isDirty:!(!r.isSaving&&!r.error)&&e.isDirty,isSaving:r.isSaving,savingError:r.error};case Qa.SET_SELECTED_PAYMENT_METHOD:return{...e,isDirty:!0,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.concat(r.id)}};case Qa.SET_UNSELECTED_PAYMENT_METHOD:return{...e,isDirty:!0,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.filter((e=>e!==r.id))}}}return e},readers:(e={},{type:t,id:r,data:n,error:o})=>{switch(t){case Us.SET_CARD_READER_STATS:e={...e,[r]:{...e[r],data:n}};break;case Us.SET_ERROR_FOR_CARD_READER_STATS:e={...e,[r]:{...e[r],error:o}};break;case Us.SET_READERS:e={...e,list:n}}return e},capital:(e=Xs,t)=>{switch(t.type){case Zs.SET_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:t.data,summaryError:void 0});case Zs.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:void 0,summaryError:t.error});case Zs.SET_LOANS:return Object.assign(Object.assign({},e),{loans:t.data,loansError:void 0});case Zs.SET_ERROR_FOR_LOANS:return Object.assign(Object.assign({},e),{loans:void 0,loansError:t.error})}return e},documents:(e=uc,{type:t,query:r={},data:n=[],error:o})=>{const a=qn(r);switch(t){case lc.SET_DOCUMENTS:return{...e,[a]:{data:n}};case lc.SET_ERROR_FOR_DOCUMENTS:return{...e,[a]:{error:o}};case lc.SET_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:n}}};case lc.SET_ERROR_FOR_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:o}}}}return e},paymentIntents:(e=Oc,t)=>{const{type:r,id:n}=t;switch(r){case Ca.SET_PAYMENT_INTENT:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{data:t.data})});case Ca.SET_ERROR_FOR_PAYMENT_INTENT:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{error:t.error})});default:return e}},authorizations:(e=Nc,t)=>{switch(t.type){case Ac.SET_AUTHORIZATION:{const{data:r}=t;return Object.assign(Object.assign({},e),{byId:Object.assign(Object.assign({},e.byId),{[r.payment_intent_id]:Object.assign(Object.assign({},e.byId[r.payment_intent_id]),r)})})}case Ac.SET_AUTHORIZATIONS:{const{data:r,query:n}=t;return Object.assign(Object.assign({},e),{[qn(n)]:{data:r}})}case Ac.SET_ERROR_FOR_AUTHORIZATIONS:{const{error:r,query:n}=t;return Object.assign(Object.assign({},e),{[qn(n)]:{error:r}})}case Ac.SET_AUTHORIZATIONS_SUMMARY:{const{data:r,query:n}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[qn(n)]:{data:r||{}}})})}case Ac.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:{const{query:r,error:n}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[qn(r)]:{error:n||""}})})}case Ac.SET_IS_REQUESTING_AUTHORIZATION:{const{data:r}=t;return Object.assign(Object.assign({},e),{isRequesting:r})}}return e},files:(e=el,t)=>{const{type:r,id:n}=t;switch(r){case Jc.SET_FILE:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{data:t.data})});case Jc.SET_ERROR_FOR_FILES:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{error:t.error})});default:return e}}}),actions:{...t,...a,...c,...d,...f,...b,...S,...R,...C,...y,...k,...D},controls:Un.controls,selectors:{...e,...o,...s,...u,...p,...g,...w,...T,...x,...N,...I,...P},resolvers:{...n,...i,...l,...m,..._,...v,...E,...O,...A,...h,...j,...F}});const il="/wc/v3/payments",sl="wc/payments/multi-currency",cl={SET_CURRENCIES:"SET_CURRENCIES",SET_AVAILABLE_CURRENCIES:"SET_AVAILABLE_CURRENCIES",SET_ENABLED_CURRENCIES:"SET_ENABLED_CURRENCIES",SET_DEFAULT_CURRENCY:"SET_DEFAULT_CURRENCY",SET_CURRENCY_SETTINGS:"SET_CURRENCY_SETTINGS",SET_STORE_SETTINGS:"SET_STORE_SETTINGS"},ll={},ul=e=>e&&e||{},dl=e=>ul(e).currencies||{},ml=e=>dl(e).available||{},pl=e=>dl(e).enabled||{},yl=e=>dl(e).default||{},hl=e=>ul(e).currency_settings||{},fl=e=>ul(e).settings||{};function _l(e){return{type:cl.SET_CURRENCIES,data:e}}function gl(e){return{type:cl.SET_AVAILABLE_CURRENCIES,data:e}}function bl(e){return{type:cl.SET_ENABLED_CURRENCIES,data:e}}function vl(e){return{type:cl.SET_DEFAULT_CURRENCY,data:e}}function wl(e,t){return{type:cl.SET_CURRENCY_SETTINGS,data:{code:e,data:t}}}function Sl(e){return{type:cl.SET_STORE_SETTINGS,data:e}}function*El(e){const t=Object.keys((0,Ln.select)(sl).getEnabledCurrencies()),r=e.filter((e=>!t.includes(e))),n=t.filter((t=>!e.includes(t)));try{const t=yield(0,Un.apiFetch)({path:`${il}/multi-currency/update-enabled-currencies`,method:"POST",data:{enabled:e}});yield _l(t),yield(0,Ln.dispatch)("core/notices").createSuccessNotice((0,X.__)("Enabled currencies updated.","woocommerce-payments")),In("wcpay_multi_currency_enabled_currencies_updated",{added_currencies:r,removed_currencies:n})}catch(e){yield(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error updating enabled currencies.","woocommerce-payments"))}}function*Tl(e,t){try{const r=yield(0,Un.apiFetch)({path:`${il}/multi-currency/currencies/${e}`,method:"POST",data:t});yield wl(e,r),yield(0,Ln.dispatch)("core/notices").createSuccessNotice((0,X.__)("Currency settings updated.","woocommerce-payments"))}catch(e){yield(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error updating currency settings.","woocommerce-payments"))}}function*Rl(e,t,r=!1){try{const n=yield(0,Un.apiFetch)({path:`${il}/multi-currency/update-settings`,method:"POST",data:{wcpay_multi_currency_enable_auto_currency:e?"yes":"no",wcpay_multi_currency_enable_storefront_switcher:t?"yes":"no"}});if(yield Sl(n),r)return;yield(0,Ln.dispatch)("core/notices").createSuccessNotice((0,X.__)("Store settings saved.","woocommerce-payments"))}catch(e){yield(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error saving store settings.","woocommerce-payments"))}}function Ol(e,t){Ki()({path:`${il}/settings/${e}`,method:"post",data:{value:t}}).catch((()=>{(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error saving option","woocommerce-payments"))}))}function*xl(){const e=`${il}/multi-currency/currencies`;try{const t=yield(0,Un.apiFetch)({path:e});yield _l(t)}catch(e){yield(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error retrieving currencies.","woocommerce-payments"))}}function*Cl(e){const t=`${il}/multi-currency/currencies/${e}`;try{const r=yield(0,Un.apiFetch)({path:t});yield wl(e,r)}catch(e){yield(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error retrieving single currency settings.","woocommerce-payments"))}}function*Al(){const e=`${il}/multi-currency/get-settings`;try{const t=yield(0,Un.apiFetch)({path:e});yield Sl(t)}catch(e){yield(0,Ln.dispatch)("core/notices").createErrorNotice((0,X.__)("Error retrieving store settings.","woocommerce-payments"))}}const Nl=()=>(0,Ln.useSelect)((e=>{const{getCurrencies:t,isResolving:r}=e(sl);return{currencies:t(),isLoading:r("getCurrencies",[])}}),[]),Il=()=>{const e=(0,Ln.useSelect)((e=>{const{getEnabledCurrencies:t}=e(sl);return t()})),{submitEnabledCurrenciesUpdate:t}=(0,Ln.useDispatch)(sl);return{enabledCurrencies:e,submitEnabledCurrenciesUpdate:t}},kl=()=>{const{storeSettings:e,isLoading:t}=(0,Ln.useSelect)((e=>{const{getStoreSettings:t,isResolving:r}=e(sl);return{storeSettings:t(),isLoading:r("getStoreSettings",[])}})),{submitStoreSettingsUpdate:r}=(0,Ln.useDispatch)(sl);return{storeSettings:e,isLoading:t,submitStoreSettingsUpdate:r}},jl=()=>(0,Ln.useSelect)((e=>{const{getDefaultCurrency:t}=e(sl);return t()}));(0,Ln.registerStore)(sl,{reducer:(e=ll,{type:t,data:r=[]})=>{switch(t){case cl.SET_CURRENCIES:return{...e,currencies:r,available:r.available,enabled:r.enabled,default:r.default};case cl.SET_AVAILABLE_CURRENCIES:return{...e,currencies:{...e,available:r.available},available:r.available};case cl.SET_ENABLED_CURRENCIES:return{...e,currencies:{...e,enabled:r.enabled},enabled:r.enabled};case cl.SET_DEFAULT_CURRENCY:return{...e,currencies:{...e,default:r.default},default:r.default};case cl.SET_CURRENCY_SETTINGS:return{...e,currency_settings:{...e.currency_settings,[r.code]:r.data}};case cl.SET_STORE_SETTINGS:return{...e,settings:{enable_auto_currency:r.wcpay_multi_currency_enable_auto_currency,enable_storefront_switcher:r.wcpay_multi_currency_enable_storefront_switcher,site_theme:r.site_theme,date_format:r.date_format,time_format:r.time_format,store_url:r.store_url}}}return e},actions:{...L},controls:Un.controls,selectors:{...M},resolvers:{...U}});const Pl=({isPreviewModalOpen:e,setPreviewModalOpen:t,isStorefrontSwitcherEnabledValue:r,isAutomaticSwitchEnabledValue:n})=>{const{storeSettings:o}=kl();return e&&(0,H.jsx)(rn,{title:(0,X.__)("Preview","woocommerce-payments"),isDismissible:!0,className:"multi-currency-store-settings-preview-modal",shouldCloseOnClickOutside:!1,onRequestClose:()=>{t(!1)},children:(0,H.jsx)("iframe",{title:(0,X.__)("Preview","woocommerce-payments"),className:"multi-currency-store-settings-preview-iframe",src:"/"+o.store_url+"?is_mc_onboarding_simulation=1&enable_storefront_switcher="+r+"&enable_auto_currency="+n})})},Dl=(0,V.forwardRef)((function({icon:e,size:t=24,...r},n){return(0,V.cloneElement)(e,{width:t,height:t,...r,ref:n})}));var Fl=r(7706);const Ml=(0,Fl.jsx)(K.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Fl.jsx)(K.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})}),Ll=e=>(0,H.jsxs)("div",{className:"search",children:[(0,H.jsx)(Dl,{className:"search__icon",icon:Ml}),(0,H.jsx)("input",{...e,type:"text",className:"components-text-control__input"})]}),Ul=({children:e})=>(0,H.jsx)("ul",{children:e}),$l=function(e){let{icon:t,size:r=24,...n}=e;return(0,V.cloneElement)(t,{width:r,height:r,...n})},zl=(0,V.createElement)(K.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,V.createElement)(K.Path,{d:"M7 11.5h10V13H7z"})),Bl=(0,V.createElement)(K.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,V.createElement)(K.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),ql={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function Hl(e){return(0,ee.get)(ql,e,"")}var Yl={grad:.9,turn:360,rad:360/(2*Math.PI)},Vl=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Wl=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Gl=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e>r?r:e>t?e:t},Ql=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Zl=function(e){return{r:Gl(e.r,0,255),g:Gl(e.g,0,255),b:Gl(e.b,0,255),a:Gl(e.a)}},Xl=function(e){return{r:Wl(e.r),g:Wl(e.g),b:Wl(e.b),a:Wl(e.a,3)}},Kl=/^#([0-9a-f]{3,8})$/i,Jl=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},eu=function(e){var t=e.r,r=e.g,n=e.b,o=e.a,a=Math.max(t,r,n),i=a-Math.min(t,r,n),s=i?a===t?(r-n)/i:a===r?2+(n-t)/i:4+(t-r)/i:0;return{h:60*(s<0?s+6:s),s:a?i/a*100:0,v:a/255*100,a:o}},tu=function(e){var t=e.h,r=e.s,n=e.v,o=e.a;t=t/360*6,r/=100,n/=100;var a=Math.floor(t),i=n*(1-r),s=n*(1-(t-a)*r),c=n*(1-(1-t+a)*r),l=a%6;return{r:255*[n,s,i,i,c,n][l],g:255*[c,n,n,s,i,i][l],b:255*[i,i,c,n,n,s][l],a:o}},ru=function(e){return{h:Ql(e.h),s:Gl(e.s,0,100),l:Gl(e.l,0,100),a:Gl(e.a)}},nu=function(e){return{h:Wl(e.h),s:Wl(e.s),l:Wl(e.l),a:Wl(e.a,3)}},ou=function(e){return tu((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},au=function(e){return{h:(t=eu(e)).h,s:(o=(200-(r=t.s))*(n=t.v)/100)>0&&o<200?r*n/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,r,n,o},iu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,su=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,cu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,uu={string:[[function(e){var t=Kl.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Wl(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Wl(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=cu.exec(e)||lu.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Zl({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=iu.exec(e)||su.exec(e);if(!t)return null;var r,n,o=ru({h:(r=t[1],n=t[2],void 0===n&&(n="deg"),Number(r)*(Yl[n]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return ou(o)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,o=e.a,a=void 0===o?1:o;return Vl(t)&&Vl(r)&&Vl(n)?Zl({r:Number(t),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,o=e.a,a=void 0===o?1:o;if(!Vl(t)||!Vl(r)||!Vl(n))return null;var i=ru({h:Number(t),s:Number(r),l:Number(n),a:Number(a)});return ou(i)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,o=e.a,a=void 0===o?1:o;if(!Vl(t)||!Vl(r)||!Vl(n))return null;var i=function(e){return{h:Ql(e.h),s:Gl(e.s,0,100),v:Gl(e.v,0,100),a:Gl(e.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(a)});return tu(i)},"hsv"]]},du=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},mu=function(e,t){var r=au(e);return{h:r.h,s:Gl(r.s+100*t,0,100),l:r.l,a:r.a}},pu=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},yu=function(e,t){var r=au(e);return{h:r.h,s:r.s,l:Gl(r.l+100*t,0,100),a:r.a}},hu=function(){function e(e){this.parsed=function(e){return"string"==typeof e?du(e.trim(),uu.string):"object"==typeof e&&null!==e?du(e,uu.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Wl(pu(this.rgba),2)},e.prototype.isDark=function(){return pu(this.rgba)<.5},e.prototype.isLight=function(){return pu(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Xl(this.rgba)).r,r=e.g,n=e.b,a=(o=e.a)<1?Jl(Wl(255*o)):"","#"+Jl(t)+Jl(r)+Jl(n)+a;var e,t,r,n,o,a},e.prototype.toRgb=function(){return Xl(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Xl(this.rgba)).r,r=e.g,n=e.b,(o=e.a)<1?"rgba("+t+", "+r+", "+n+", "+o+")":"rgb("+t+", "+r+", "+n+")";var e,t,r,n,o},e.prototype.toHsl=function(){return nu(au(this.rgba))},e.prototype.toHslString=function(){return t=(e=nu(au(this.rgba))).h,r=e.s,n=e.l,(o=e.a)<1?"hsla("+t+", "+r+"%, "+n+"%, "+o+")":"hsl("+t+", "+r+"%, "+n+"%)";var e,t,r,n,o},e.prototype.toHsv=function(){return e=eu(this.rgba),{h:Wl(e.h),s:Wl(e.s),v:Wl(e.v),a:Wl(e.a,3)};var e},e.prototype.invert=function(){return fu({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),fu(mu(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),fu(mu(this.rgba,-e))},e.prototype.grayscale=function(){return fu(mu(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),fu(yu(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),fu(yu(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?fu({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Wl(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=au(this.rgba);return"number"==typeof e?fu({h:e,s:t.s,l:t.l,a:t.a}):Wl(t.h)},e.prototype.isEqual=function(e){return this.toHex()===fu(e).toHex()},e}(),fu=function(e){return e instanceof hu?e:new hu(e)},_u=[];function gu(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return fu(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").alpha(e).toRgbString()}!function(e){e.forEach((function(e){_u.indexOf(e)<0&&(e(hu,uu),_u.push(e))}))}([function(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var o in r)n[r[o]]=o;var a={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,i,s=n[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var c=this.toRgb(),l=1/0,u="black";if(!a.length)for(var d in r)a[d]=new e(r[d]).toRgb();for(var m in r){var p=(o=c,i=a[m],Math.pow(o.r-i.r,2)+Math.pow(o.g-i.g,2)+Math.pow(o.b-i.b,2));p<l&&(l=p,u=m)}return u}},t.string.push([function(t){var n=t.toLowerCase(),o="transparent"===n?"#0000":r[n];return o?new e(o).toRgb():null},"name"])}]);const bu={black:"#000",white:"#fff"},vu={blue:{medium:{focus:"#007cba",focusDark:"#fff"}},gray:{900:"#1e1e1e",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},darkGray:{primary:"#1e1e1e",heading:"#050505"},mediumGray:{text:"#757575"},lightGray:{ui:"#949494",secondary:"#ccc",tertiary:"#e7e8e9"}},wu={900:"#191e23",800:"#23282d",700:"#32373c",600:"#40464d",500:"#555d66",400:"#606a73",300:"#6c7781",200:"#7e8993",150:"#8d96a0",100:"#8f98a1",placeholder:gu(vu.gray[900],.62)},Su={900:gu("#000510",.9),800:gu("#00000a",.85),700:gu("#06060b",.8),600:gu("#000913",.75),500:gu("#0a1829",.7),400:gu("#0a1829",.65),300:gu("#0e1c2e",.62),200:gu("#162435",.55),100:gu("#223443",.5),backgroundFill:gu(wu[700],.7)},Eu={900:gu("#304455",.45),800:gu("#425863",.4),700:gu("#667886",.35),600:gu("#7b86a2",.3),500:gu("#9197a2",.25),400:gu("#95959c",.2),300:gu("#829493",.15),200:gu("#8b8b96",.1),100:gu("#747474",.05)},Tu={900:"#a2aab2",800:"#b5bcc2",700:"#ccd0d4",600:"#d7dade",500:"#e2e4e7",400:"#e8eaeb",300:"#edeff0",200:"#f3f4f5",100:"#f8f9f9",placeholder:gu(bu.white,.65)},Ru={900:gu(bu.white,.5),800:gu(bu.white,.45),700:gu(bu.white,.4),600:gu(bu.white,.35),500:gu(bu.white,.3),400:gu(bu.white,.25),300:gu(bu.white,.2),200:gu(bu.white,.15),100:gu(bu.white,.1),backgroundFill:gu(Tu[300],.8)},Ou={wordpress:{700:"#00669b"},dark:{900:"#0071a1"},medium:{900:"#006589",800:"#00739c",700:"#007fac",600:"#008dbe",500:"#00a0d2",400:"#33b3db",300:"#66c6e4",200:"#bfe7f3",100:"#e5f5fa",highlight:"#b3e7fe",focus:"#007cba"}},xu={theme:`var( --wp-admin-theme-color, ${Ou.wordpress[700]})`,themeDark10:`var( --wp-admin-theme-color-darker-10, ${Ou.medium.focus})`},Cu={theme:xu.theme,background:bu.white,backgroundDisabled:Tu[200],border:vu.gray[700],borderHover:vu.gray[700],borderFocus:xu.themeDark10,borderDisabled:vu.gray[400],borderLight:vu.gray[300],label:wu[500],textDisabled:wu[150],textDark:bu.white,textLight:bu.black},Au=Object.assign({},bu,{darkGray:(0,ee.merge)({},wu,vu.darkGray),darkOpacity:Su,darkOpacityLight:Eu,mediumGray:vu.mediumGray,gray:vu.gray,lightGray:(0,ee.merge)({},Tu,vu.lightGray),lightGrayLight:Ru,blue:(0,ee.merge)({},Ou,vu.blue),alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},admin:xu,ui:Cu}),Nu=Qr("div",{target:"ej5x27r4"})("font-family:",Hl("default.fontFamily"),";font-size:",Hl("default.fontSize"),";"),Iu=Qr("div",{target:"ej5x27r3"})((e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&sn("margin-bottom:",un(2),";","")})," .components-panel__row &{margin-bottom:inherit;}"),ku=sn("display:inline-block;margin-bottom:",un(2),";",""),ju=Qr("label",{target:"ej5x27r2"})(ku,";");var Pu={name:"11yad0w",styles:"margin-bottom:revert"};const Du=Qr("p",{target:"ej5x27r1"})("margin-top:",un(2),";margin-bottom:0;font-size:",Hl("helpText.fontSize"),";font-style:normal;color:",Au.mediumGray.text,";",(e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&Pu}),";"),Fu=Qr("span",{target:"ej5x27r0"})(ku,";"),Mu=e=>{let{__nextHasNoMarginBottom:t=!1,id:r,label:n,hideLabelFromVision:o=!1,help:a,className:i,children:s}=e;return(0,V.createElement)(Nu,{className:G()("components-base-control",i)},(0,V.createElement)(Iu,{className:"components-base-control__field",__nextHasNoMarginBottom:t},n&&r&&(o?(0,V.createElement)(Kr,{as:"label",htmlFor:r},n):(0,V.createElement)(ju,{className:"components-base-control__label",htmlFor:r},n)),n&&!r&&(o?(0,V.createElement)(Kr,{as:"label"},n):(0,V.createElement)(Mu.VisualLabel,null,n)),s),!!a&&(0,V.createElement)(Du,{id:r?r+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom:t},a))};Mu.VisualLabel=e=>{let{className:t,children:r}=e;return(0,V.createElement)(Fu,{className:G()("components-base-control__label",t)},r)};const Lu=Mu;function Uu(e){let{label:t,className:r,heading:n,checked:o,indeterminate:a,help:i,onChange:s,...c}=e;n&&ae()("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[l,u]=(0,V.useState)(!1),[d,m]=(0,V.useState)(!1),p=(0,Q.useRefEffect)((e=>{e&&(e.indeterminate=!!a,u(e.matches(":checked")),m(e.matches(":indeterminate")))}),[o,a]),y=`inspector-checkbox-control-${(0,Q.useInstanceId)(Uu)}`;return(0,V.createElement)(Lu,{label:n,id:y,help:i,className:G()("components-checkbox-control",r)},(0,V.createElement)("span",{className:"components-checkbox-control__input-container"},(0,V.createElement)("input",Y({ref:p,id:y,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>s(e.target.checked),checked:o,"aria-describedby":i?y+"__help":void 0},c)),d?(0,V.createElement)($l,{icon:zl,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,l?(0,V.createElement)($l,{icon:Bl,className:"components-checkbox-control__checked",role:"presentation"}):null),(0,V.createElement)("label",{className:"components-checkbox-control__label",htmlFor:y},t))}function $u(e){return e.startsWith("{{/")?{type:"componentClose",value:e.replace(/\W/g,"")}:e.endsWith("/}}")?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.startsWith("{{")?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}function zu(e,t){let r,n,o=[];for(let a=0;a<e.length;a++){const i=e[a];if("string"!==i.type){if(void 0===t[i.value])throw new Error(`Invalid interpolation, missing component node: \`${i.value}\``);if("object"!=typeof t[i.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${i.value}\``);if("componentClose"===i.type)throw new Error(`Missing opening component token: \`${i.value}\``);if("componentOpen"===i.type){r=t[i.value],n=a;break}o.push(t[i.value])}else o.push(i.value)}if(r){const a=function(e,t){const r=t[e];let n=0;for(let o=e+1;o<t.length;o++){const e=t[o];if(e.value===r.value){if("componentOpen"===e.type){n++;continue}if("componentClose"===e.type){if(0===n)return o;n--}}}throw new Error("Missing closing component token `"+r.value+"`")}(n,e),i=zu(e.slice(n+1,a),t),s=(0,$.cloneElement)(r,{},i);if(o.push(s),a<e.length-1){const r=zu(e.slice(a+1),t);o=o.concat(r)}}return o=o.filter(Boolean),0===o.length?null:1===o.length?o[0]:(0,$.createElement)($.Fragment,null,...o)}function Bu(e){const{mixedString:t,components:r,throwErrors:n}=e;if(!r)return t;if("object"!=typeof r){if(n)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const o=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map($u)}(t);try{return zu(o,r)}catch(e){if(n)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}const qu=({onChange:e,checked:t=!1,currency:{flag:r,symbol:n,code:o,name:a},testId:i=null})=>{const s=(0,V.useCallback)((t=>{e(o,t)}),[o,e]);return(0,H.jsx)("li",{className:"enabled-currency-checkbox","data-testid":i,children:(0,H.jsx)(Uu,{code:o,checked:t,onChange:s,label:Bu({mixedString:"{{flag /}} {{name /}} {{code /}}",components:{flag:(0,H.jsx)("span",{className:"enabled-currency-checkbox__flag",children:""!==r?r:(0,H.jsx)("div",{className:"enabled-currency-checkbox__flag-text",children:(0,H.jsx)("span",{children:o})})}),name:(0,H.jsx)("span",{children:a}),code:(0,H.jsxs)("span",{className:"enabled-currency-checkbox__code",children:["(",n,n!==o&&" "+o,")"]})}})})})};(0,X.__)("any","woocommerce-payments"),(0,X.__)("one","woocommerce-payments"),(0,X.__)("two","woocommerce-payments"),(0,X.__)("three","woocommerce-payments"),(0,X.__)("four","woocommerce-payments"),(0,X.__)("five","woocommerce-payments"),(0,X.__)("six","woocommerce-payments"),(0,X.__)("seven","woocommerce-payments"),(0,X.__)("eight","woocommerce-payments"),(0,X.__)("nine","woocommerce-payments");const Hu={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"},Yu="36px",Vu="12px",Wu={controlSurfaceColor:Au.white,controlTextActiveColor:Au.ui.theme,controlPaddingX:Vu,controlPaddingXLarge:`calc(${Vu} * 1.3334)`,controlPaddingXSmall:`calc(${Vu} / 1.3334)`,controlBackgroundColor:Au.white,controlBorderRadius:"2px",controlBorderColor:Au.gray[700],controlBoxShadow:"transparent",controlBorderColorHover:Au.gray[700],controlBoxShadowFocus:`0 0 0 0.5px ${Au.admin.theme}`,controlDestructiveBorderColor:Au.alert.red,controlHeight:Yu,controlHeightXSmall:`calc( ${Yu} * 0.6 )`,controlHeightSmall:`calc( ${Yu} * 0.8 )`,controlHeightLarge:`calc( ${Yu} * 1.2 )`,controlHeightXLarge:`calc( ${Yu} * 1.4 )`},Gu={toggleGroupControlBackgroundColor:Wu.controlBackgroundColor,toggleGroupControlBorderColor:Au.ui.border,toggleGroupControlBackdropBackgroundColor:Wu.controlSurfaceColor,toggleGroupControlBackdropBorderColor:Au.ui.border,toggleGroupControlBackdropBoxShadow:"transparent",toggleGroupControlButtonColorActive:Wu.controlBackgroundColor},Qu=Object.assign({},Wu,Gu,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardBorderRadius:"2px",cardPaddingXSmall:`${un(2)}`,cardPaddingSmall:`${un(4)}`,cardPaddingMedium:`${un(4)} ${un(6)}`,cardPaddingLarge:`${un(6)} ${un(8)}`,surfaceBackgroundColor:Au.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:Au.white,surfaceColor:Au.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});function Zu(e){return`0 ${e}px ${2*e}px 0\n\trgba(0 ,0, 0, ${e/20})`}const Xu=$r((function(e,t){const r=function(e){const{active:t,borderRadius:r="inherit",className:n,focus:o,hover:a,isInteractive:i=!1,offset:s=0,value:c=0,...l}=Lr(e,"Elevation"),u=Fr(),d=(0,V.useMemo)((()=>{let e=(0,ee.isNil)(a)?2*c:a,l=(0,ee.isNil)(t)?c/2:t;i||(e=(0,ee.isNil)(a)?void 0:a,l=(0,ee.isNil)(t)?void 0:t);const d=`box-shadow ${Qu.transitionDuration} ${Qu.transitionTimingFunction}`,m={};return m.Base=sn({borderRadius:r,bottom:s,boxShadow:Zu(c),opacity:Qu.elevationIntensity,left:s,right:s,top:s,transition:d},function(){let e;switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transition"){case"transition":e="transition-duration: 0ms;";break;case"animation":e="animation-duration: 1ms;";break;default:e="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${e};\n\t\t}\n\t`}("transition"),"",""),(0,ee.isNil)(e)||(m.hover=sn("*:hover>&{box-shadow:",Zu(e),";}","")),(0,ee.isNil)(l)||(m.active=sn("*:active>&{box-shadow:",Zu(l),";}","")),(0,ee.isNil)(o)||(m.focus=sn("*:focus>&{box-shadow:",Zu(o),";}","")),u(Hu,m.Base,m.hover&&m.hover,m.focus&&m.focus,m.active&&m.active,n)}),[t,r,n,u,o,a,i,s,c]);return{...l,className:d,"aria-hidden":!0}}(e);return(0,V.createElement)(Xr,Y({},r,{ref:t}))}),"Elevation"),Ku=Xu,Ju=`calc(${Qu.cardBorderRadius} - 1px)`,ed=sn("box-shadow:0 0 0 1px ",Qu.surfaceBorderColor,";outline:none;",""),td={name:"13udsys",styles:"height:100%"},rd={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},nd={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},od=sn("&:first-of-type{border-top-left-radius:",Ju,";border-top-right-radius:",Ju,";}&:last-of-type{border-bottom-left-radius:",Ju,";border-bottom-right-radius:",Ju,";}",""),ad=sn("border-color:",Qu.colorDivider,";",""),id={name:"1t90u8d",styles:"box-shadow:none"},sd=sn("border-radius:",Ju,";",""),cd=sn("padding:",Qu.cardPaddingXSmall,";",""),ld={large:sn("padding:",Qu.cardPaddingLarge,";",""),medium:sn("padding:",Qu.cardPaddingMedium,";",""),small:sn("padding:",Qu.cardPaddingSmall,";",""),xSmall:cd,extraSmall:cd},ud=sn("background-color:",Au.lightGray[200],";",""),dd=sn("background-color:",Qu.surfaceColor,";color:",Au.darkGray.primary,";position:relative;","");Qu.surfaceBackgroundColor;const md=sn("",""),pd=sn("background:",Qu.surfaceBackgroundTintColor,";",""),yd=sn("background:",Qu.surfaceBackgroundTertiaryColor,";",""),hd=e=>[e,e].join(" "),fd=e=>["90deg",[Qu.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),_d=e=>[[Qu.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),gd=[`linear-gradient( ${[`${Qu.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`,`linear-gradient( ${["90deg",`${Qu.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`].join(","),bd=(e,t,r)=>{switch(e){case"dotted":return((e,t)=>sn("background:",(e=>[`linear-gradient( ${fd(e)} ) center`,`linear-gradient( ${_d(e)} ) center`,Qu.surfaceBorderBoldColor].join(","))(t),";background-size:",hd(e),";",""))(t,r);case"grid":return(e=>sn("background:",Qu.surfaceBackgroundColor,";background-image:",gd,";background-size:",hd(e),";",""))(t);case"primary":return md;case"secondary":return pd;case"tertiary":return yd}};function vd(e){const{backgroundSize:t=12,borderBottom:r=!1,borderLeft:n=!1,borderRight:o=!1,borderTop:a=!1,className:i,variant:s="primary",...c}=Lr(e,"Surface"),l=Fr(),u=(0,V.useMemo)((()=>{const e={};return e.borders=function(e){let{borderBottom:t,borderLeft:r,borderRight:n,borderTop:o}=e;const a=`1px solid ${Qu.surfaceBorderColor}`;return sn({borderBottom:t?a:void 0,borderLeft:r?a:void 0,borderRight:n?a:void 0,borderTop:o?a:void 0},"","")}({borderBottom:r,borderLeft:n,borderRight:o,borderTop:a}),l(dd,e.borders,bd(s,`${t}px`,t-1+"px"),i)}),[t,r,n,o,a,i,l,s]);return{...c,className:u}}const wd=$r((function(e,t){const{children:r,elevation:n,isBorderless:o,isRounded:a,size:i,...s}=function(e){const{className:t,elevation:r=0,isBorderless:n=!1,isRounded:o=!0,size:a="medium",...i}=Lr(function(e){let{elevation:t,isElevated:r,...n}=e;const o={...n};let a=t;var i;return r&&(ae()("Card isElevated prop",{since:"5.9",alternative:"elevation"}),null!==(i=a)&&void 0!==i||(a=2)),void 0!==a&&(o.elevation=a),o}(e),"Card"),s=Fr();return{...vd({...i,className:(0,V.useMemo)((()=>s(ed,n&&id,o&&sd,t)),[t,s,n,o])}),elevation:r,isBorderless:n,isRounded:o,size:a}}(e),c=a?Qu.cardBorderRadius:0,l=Fr(),u=(0,V.useMemo)((()=>l(sn({borderRadius:c},"",""))),[l,c]),d=(0,V.useMemo)((()=>{const e={size:i,isBorderless:o};return{CardBody:e,CardHeader:e,CardFooter:e}}),[o,i]);return(0,V.createElement)(Rr,{value:d},(0,V.createElement)(Xr,Y({},s,{ref:t}),(0,V.createElement)(Xr,{className:l(td)},r),(0,V.createElement)(Ku,{className:u,isInteractive:!1,value:n?1:0}),(0,V.createElement)(Ku,{className:u,isInteractive:!1,value:n})))}),"Card"),Sd=sn("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",Qu.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",Qu.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",Qu.colorScrollbarThumbHover,";}}",""),Ed={name:"13udsys",styles:"height:100%"},Td={name:"7zq9w",styles:"scroll-behavior:smooth"},Rd={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},Od={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},xd={name:"umwchj",styles:"overflow-y:auto"},Cd=$r((function(e,t){const r=function(e){const{className:t,scrollDirection:r="y",smoothScroll:n=!1,...o}=Lr(e,"Scrollable"),a=Fr();return{...o,className:(0,V.useMemo)((()=>a(Ed,Sd,n&&Td,"x"===r&&Rd,"y"===r&&Od,"auto"===r&&xd,t)),[t,a,r,n])}}(e);return(0,V.createElement)(Xr,Y({},r,{ref:t}))}),"Scrollable"),Ad=$r((function(e,t){const{isScrollable:r,...n}=function(e){const{className:t,isScrollable:r=!1,isShady:n=!1,size:o="medium",...a}=Lr(e,"CardBody"),i=Fr();return{...a,className:(0,V.useMemo)((()=>i(rd,od,ld[o],n&&ud,"components-card__body",t)),[t,i,n,o]),isScrollable:r}}(e);return r?(0,V.createElement)(Cd,Y({},n,{ref:t})):(0,V.createElement)(Xr,Y({},n,{ref:t}))}),"CardBody");function Nd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Id(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function kd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Id(Object(r),!0).forEach((function(t){Nd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Id(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function jd(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function Pd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dd(Object(r),!0).forEach((function(t){Pd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Md(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function Ld(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ud(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ld(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ld(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var $d=(0,$.createContext)({}),zd=function(e,t,r){void 0===r&&(r=t.children);var n=(0,$.useContext)($d);return n.useCreateElement?n.useCreateElement(e,t,r):"string"==typeof e&&function(e){return"function"==typeof e}(r)?(t.children,r(Md(t,["children"]))):(0,$.createElement)(e,t,r)};function Bd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Hd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qd(Object(r),!0).forEach((function(t){Bd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Yd(e){var t;if(!function(e){return"object"==typeof e&&null!=e}(e))return!1;var r=Object.getPrototypeOf(e);return null==r||(null===(t=r.constructor)||void 0===t?void 0:t.toString())===Object.toString()}function Vd(e,t){for(var r={},n={},o=0,a=Object.keys(e);o<a.length;o++){var i=a[o];t.indexOf(i)>=0?r[i]=e[i]:n[i]=e[i]}return[r,n]}function Wd(e,t){if(void 0===t&&(t=[]),!Yd(e.state))return Vd(e,t);var r=Vd(e,[].concat(t,["state"])),n=r[0],o=r[1],a=n.state,i=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(n,["state"]);return[Hd(Hd({},a),i),o]}function Gd(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var r=Object.keys(e),n=Object.keys(t),o=r.length;if(n.length!==o)return!1;for(var a=0,i=r;a<i.length;a++){var s=i[a];if(e[s]!==t[s])return!1}return!0}function Qd(e){return"normalizePropsAreEqualInner"===e.name?e:function(t,r){return Yd(t.state)&&Yd(r.state)?e(Hd(Hd({},t.state),t),Hd(Hd({},r.state),r)):e(t,r)}}function Zd(e){var t=e.as,r=e.useHook,n=e.memo,o=e.propsAreEqual,a=void 0===o?null==r?void 0:r.unstable_propsAreEqual:o,i=e.keys,s=void 0===i?(null==r?void 0:r.__keys)||[]:i,c=e.useCreateElement,l=void 0===c?zd:c,u=function(e,n){var o=e.as,a=void 0===o?t:o,i=Md(e,["as"]);if(r){var c,u=Wd(i,s),d=u[0],m=u[1],p=r(d,Fd({ref:n},m)),y=p.wrapElement,h=Md(p,["wrapElement"]),f=(null===(c=a.render)||void 0===c?void 0:c.__keys)||a.__keys,_=f&&Wd(i,f)[0],g=_?Fd(Fd({},h),_):h,b=l(a,g);return y?y(b):b}return l(a,Fd({ref:n},i))};return u=function(e){return(0,$.forwardRef)(e)}(u),n&&(u=function(e,t){return(0,$.memo)(e,t)}(u,a&&Qd(a))),u.__keys=s,u.unstable_propsAreEqual=Qd(a||Gd),u}function Xd(e,t){(0,$.useDebugValue)(e);var r=(0,$.useContext)($d);return null!=r[e]?r[e]:t}function Kd(e){var t,r,n,o=(n=e.compose,Array.isArray(n)?n:void 0!==n?[n]:[]),a=function(t,r){if(e.useOptions&&(t=e.useOptions(t,r)),e.name&&(t=function(e,t,r){void 0===t&&(t={}),void 0===r&&(r={});var n="use"+e+"Options";(0,$.useDebugValue)(n);var o=Xd(n);return o?Fd(Fd({},t),o(t,r)):t}(e.name,t,r)),e.compose)for(var n,a=Ud(o);!(n=a()).done;)t=n.value.__useOptions(t,r);return t},i=function(t,r,n){if(void 0===t&&(t={}),void 0===r&&(r={}),void 0===n&&(n=!1),n||(t=a(t,r)),e.useProps&&(r=e.useProps(t,r)),e.name&&(r=function(e,t,r){void 0===t&&(t={}),void 0===r&&(r={});var n="use"+e+"Props";(0,$.useDebugValue)(n);var o=Xd(n);return o?o(t,r):r}(e.name,t,r)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,r)),e.useComposeProps)r=e.useComposeProps(t,r);else for(var i,s=Ud(o);!(i=s()).done;)r=(0,i.value)(t,r,!0);var c={},l=r||{};for(var u in l)void 0!==l[u]&&(c[u]=l[u]);return c};i.__useOptions=a;var s=o.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return i.__keys=[].concat(s,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),i.unstable_propsAreEqual=e.propsAreEqual||(null===(r=o[0])||void 0===r?void 0:r.unstable_propsAreEqual)||Gd,i}var Jd=Kd({name:"Role",keys:["unstable_system"],propsAreEqual:function(e,t){var r=e.unstable_system,n=jd(e,["unstable_system"]),o=t.unstable_system,a=jd(t,["unstable_system"]);return!(r!==o&&!Gd(r,o))&&Gd(n,a)}}),em=(Zd({as:"div",useHook:Jd}),Kd({name:"Separator",compose:Jd,keys:["orientation"],useOptions:function(e){var t=e.orientation;return kd({orientation:void 0===t?"horizontal":t},jd(e,["orientation"]))},useProps:function(e,t){return kd({role:"separator","aria-orientation":e.orientation},t)}})),tm=Zd({as:"hr",memo:!0,useHook:em});const rm={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}};var nm={name:"1u4hpl4",styles:"display:inline"};const om=Qr("hr",{target:"e19on6iw0"})("border:0;margin:0;",(e=>{let{"aria-orientation":t="horizontal"}=e;return"vertical"===t?nm:void 0})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return sn({["vertical"===t?"borderRight":"borderBottom"]:"1px solid currentColor"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return sn({height:"vertical"===t?"auto":0,width:"vertical"===t?0:"auto"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal",margin:r,marginStart:n,marginEnd:o}=e;return sn(wn({[rm[t].start]:un(null!=n?n:r),[rm[t].end]:un(null!=o?o:r)})(),"","")}),";"),am=$r((function(e,t){const r=Lr(e,"Divider");return(0,V.createElement)(tm,Y({as:om},r,{ref:t}))}),"Divider"),im=$r((function(e,t){const r=function(e){const{className:t,...r}=Lr(e,"CardDivider"),n=Fr();return{...r,className:(0,V.useMemo)((()=>n(nd,ad,"components-card__divider",t)),[t,n])}}(e);return(0,V.createElement)(am,Y({},r,{ref:t}))}),"CardDivider"),sm=({className:e,children:t})=>(0,H.jsx)("ul",{className:e,children:t});var cm=r(9387);const lm=({symbol:e})=>(0,H.jsx)("div",{className:"currency-delete-illustration__wrapper",children:(0,H.jsxs)("div",{className:"currency-delete-illustration__illustrations",children:[e,(0,H.jsx)(cm.A,{className:"currency-delete-illustration__currency-cross-icon"})]})}),um=r.p+"../assets/images/payment-methods/jcb.svg?ver=3351f2584f4a62ad094d",dm=r.p+"../assets/images/cards/visa.svg?ver=f10d76e13a47cb867cca",mm=r.p+"../assets/images/cards/mastercard.svg?ver=d21057587f14a719da45",pm=r.p+"../assets/images/cards/amex.svg?ver=9035aad80e3ae7ac653c",ym=r.p+"../assets/images/payment-methods/woo.svg?ver=86a2411c2b2a56f57bc5",hm=r.p+"../assets/images/payment-methods/woo-short.svg?ver=e7eb126add68e8fde2b6",fm=r.p+"../assets/images/cards/apple-pay.svg?ver=126e07a26632bc8a9c21",_m=r.p+"../assets/images/cards/google-pay.svg?ver=30aba48019e36097a19d",gm=r.p+"../assets/images/cards/diners.svg?ver=62451ea54fcf12af5e0d",bm=r.p+"../assets/images/cards/discover.svg?ver=a19341de516c258e11fe",vm=r.p+"../assets/images/cards/cb.svg?ver=375fa3d816484fa4b53c",wm=r.p+"../assets/images/cards/unionpay.svg?ver=e60ed9d9db08315ff5c9",Sm=r.p+"../assets/images/payment-methods/link.svg?ver=2af3c660d8ddc95442bb";const Em=(e,t,r=!0)=>n=>{var{className:o}=n,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(n,["className"]);return z().createElement("img",Object.assign({className:on("payment-method__icon",r?"":"no-border",o),src:e,alt:t},a))},Tm=(Em(pm,(0,X.__)("American Express","woocommerce-payments")),Em(fm,(0,X.__)("Apple Pay","woocommerce-payments")),Em(vm,(0,X.__)("Cartes Bancaires","woocommerce-payments")),Em(gm,(0,X.__)("Diners Club","woocommerce-payments")),Em(bm,(0,X.__)("Discover","woocommerce-payments")),Em(_m,(0,X.__)("Google Pay","woocommerce-payments")),Em(um,(0,X.__)("JCB","woocommerce-payments")));if(Em(Sm,(0,X.__)("Link","woocommerce-payments")),Em(mm,(0,X.__)("Mastercard","woocommerce-payments")),Em(wm,(0,X.__)("UnionPay","woocommerce-payments")),Em(dm,(0,X.__)("Visa","woocommerce-payments")),Em(ym,(0,X.__)("WooPay","woocommerce-payments"),!1),Em(hm,(0,X.__)("WooPay","woocommerce-payments"),!1),"undefined"==typeof wooPaymentsPaymentMethodDefinitions)throw new Error("wooPaymentsPaymentMethodDefinitions is undefined");const Rm=Object.keys(wooPaymentsPaymentMethodDefinitions).reduce(((e,t)=>(e[t]=Object.assign(Object.assign({},wooPaymentsPaymentMethodDefinitions[t]),{icon:({className:e})=>z().createElement("img",{src:wooPaymentsPaymentMethodDefinitions[t].settings_icon_url,alt:wooPaymentsPaymentMethodDefinitions[t].label,className:on("payment-method__icon",e)})}),e)),{jcb:{id:"jcb",label:(0,X.__)("JCB","woocommerce-payments"),description:(0,X.__)("Let your customers pay with JCB, the only international payment brand based in Japan.","woocommerce-payments"),icon:Tm,currencies:["JPY"],stripe_key:"jcb_payments",allows_manual_capture:!1,allows_pay_later:!1,accepts_only_domestic_payment:!1,settings_icon_url:""}}),Om=({code:e,label:t,symbol:r,onClick:n,className:o})=>{const[a,i]=(0,V.useState)(!1),s=window.multiCurrencyPaymentMethodsMap,c=s&&s[e]&&Object.keys(s[e]).length>0,l=c?Object.keys(s[e]):[],u=(0,V.useCallback)((()=>{c?i(!0):n(e)}),[i,c,n,e]),d=(0,V.useCallback)((()=>{i(!1),n(e)}),[n,i,e]),m=(0,V.useCallback)((()=>{i(!1)}),[i]);return(0,H.jsxs)(H.Fragment,{children:[a&&(0,H.jsxs)(an,{title:(0,X.sprintf)((0,X.__)("Remove %1$s","woocommerce-payments"),t),onRequestClose:m,className:"enabled-currency-delete-modal",actions:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(en,{onClick:d,isPrimary:!0,isDestructive:!0,children:(0,X.__)("Remove","woocommerce-payments")}),(0,H.jsx)(en,{onClick:m,isSecondary:!0,children:(0,X.__)("Cancel","woocommerce-payments")})]}),children:[(0,H.jsx)(lm,{symbol:r}),(0,H.jsx)("p",{children:Bu({mixedString:(0,X.sprintf)((0,X.__)("Are you sure you want to remove {{strong}}%s (%s){{/strong}}? Your customers will no longer be able to pay in this currency and use payment methods listed below.","woocommerce-payments"),t,e===r?e:[e,r].join(" ")),components:{strong:(0,H.jsx)("strong",{})}})}),(0,H.jsx)("ul",{children:l.map((e=>(0,H.jsx)("li",{children:(0,H.jsx)(On,{Icon:Rm[e].icon,label:Rm[e].label})},e)))}),(0,H.jsx)("p",{children:(0,X.sprintf)((0,X.__)("You can add %s (%s) again at any time in Multi-Currency settings.","woocommerce-payments"),t,e===r?e:[e,r].join(" "))})]}),(0,H.jsx)(en,{isLink:!0,"aria-label":(0,X.sprintf)((0,X.__)("Remove %1$s as an enabled currency","woocommerce-payments"),t),className:o,onClick:u,children:(0,H.jsx)(vr,{icon:"trash"})})]})},xm=(0,$.createContext)(),Cm=({currency:{code:e,flag:t,id:r,is_default:n,name:o,symbol:a,rate:i},defaultCurrency:{code:s,is_zero_decimal:c},onDeleteClick:l})=>{const{openSingleCurrencySettings:u}=(0,$.useContext)(xm);return(0,H.jsxs)("li",{className:on("enabled-currency",r),children:[(0,H.jsxs)("div",{className:"enabled-currency__container",children:[(0,H.jsx)("div",{className:"enabled-currency__flag",children:""!==t?t:(0,H.jsx)("div",{className:"enabled-currency__flag-text",children:(0,H.jsx)("span",{children:e})})}),(0,H.jsx)("div",{className:"enabled-currency__label",children:o}),(0,H.jsxs)("div",{className:"enabled-currency__code",children:["(",a+(a===e?"":` ${e}`),")"]})]}),(0,H.jsx)("div",{className:"enabled-currency__rate",children:(()=>{const t=c?Number.parseFloat(1e3*i).toFixed(2):Number.parseFloat(i).toFixed(2);return n?(0,X.__)("Default currency","woocommerce-payments"):c?`1,000 ${s} → ${t} ${e}`:`1 ${s} → ${t} ${e}`})()}),(0,H.jsxs)("div",{className:"enabled-currency__actions",children:[!n&&(0,H.jsx)(en,{isLink:!0,onClick:()=>{u(e)},"aria-label":(0,X.sprintf)((0,X.__)("Edit %1$s","woocommerce-payments"),o),className:"enabled-currency__action edit",children:(0,X.__)("manage","woocommerce-payments")}),l&&(0,H.jsx)(Om,{className:"enabled-currency__action delete",onClick:l,label:o,code:e,symbol:a})]})]})},Am=({isLoading:e})=>(0,H.jsxs)("li",{className:on("enabled-currency-placeholder","enabled-currency"),children:[(0,H.jsxs)("div",{className:"enabled-currency__container",children:[(0,H.jsx)("div",{className:"enabled-currency__flag",children:(0,H.jsx)(Rn,{isLoading:e,numLines:1,children:(0,H.jsx)("div",{className:"enabled-currency__flag-text"})})}),(0,H.jsx)("div",{className:"enabled-currency__label",children:(0,H.jsx)(Rn,{isLoading:e,numLines:1})}),(0,H.jsx)("div",{className:"enabled-currency__code",children:(0,H.jsx)(Rn,{isLoading:e,numLines:1})})]}),(0,H.jsx)("div",{className:"enabled-currency__rate",children:(0,H.jsx)(Rn,{isLoading:e,numLines:1})}),(0,H.jsx)("div",{className:"enabled-currency__actions",children:(0,H.jsx)(Rn,{isLoading:e,numLines:1})})]}),Nm=({className:e})=>{const t=(0,Ln.useSelect)((e=>{const{getAvailableCurrencies:t}=e(sl);return t()})),r=Object.keys(t),n=(0,V.useRef)(null),{enabledCurrencies:o,submitEnabledCurrenciesUpdate:a}=Il(),i=Object.keys(o),s=jl().code;r.splice(r.indexOf(s),1);const[c,l]=(0,V.useState)(""),[u,d]=(0,V.useState)({}),m=c?r.filter((e=>{const{symbol:r,name:n}=t[e];return`${r} ${e} ${n}`.toLocaleLowerCase().indexOf(c.toLocaleLowerCase())>-1})):r,p=(0,V.useCallback)((()=>{d(r.reduce(((e,t)=>(e[t]=i.includes(t),e)),{}))}),[i,r]);(0,V.useEffect)((()=>{p()}),[JSON.stringify(r),JSON.stringify(i)]);const y=(e,t)=>{d((r=>({...r,[e]:t})))},[h,f]=(0,V.useState)(!1),[_,g]=(0,V.useState)(!1),b=(0,V.useCallback)((()=>{f(!0)}),[f]),v=(0,V.useCallback)((()=>{f(!1),g(!1),l(""),p()}),[f,p]);return(0,V.useEffect)((()=>{h&&n&&!1===_&&g(n.current.offsetWidth)}),[JSON.stringify(m),h]),(0,H.jsxs)(H.Fragment,{children:[h&&(0,H.jsxs)(an,{title:(0,X.__)("Add enabled currencies","woocommerce-payments"),onRequestClose:v,className:"add-enabled-currencies-modal",actions:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(en,{isSecondary:!0,onClick:v,children:(0,X.__)("Cancel","woocommerce-payments")}),(0,H.jsx)(en,{isPrimary:!0,onClick:()=>{f(!1),g(!1),l("");const e=Object.entries(u).filter((([,e])=>e)).map((([e])=>e));e.push(s),e.sort(),a(e)},children:(0,X.__)("Update selected","woocommerce-payments")})]}),children:[(0,H.jsx)("div",{className:"add-enabled-currencies-modal__search",children:(0,H.jsx)(Ll,{value:c,placeholder:(0,X.__)("Search currencies","woocommerce-payments"),onChange:e=>{l(e.target.value)}})}),(0,H.jsx)("h3",{children:c?(0,X.sprintf)((0,X.__)("Search results (%1$d currencies)","woocommerce-payments"),m.length):(0,X.__)("All currencies","woocommerce-payments")}),(0,H.jsx)("div",{className:"add-enabled-currencies-modal__content",ref:n,style:{width:_||"auto"},children:(0,H.jsx)(Ul,{children:m.map((e=>(0,H.jsx)(qu,{checked:u[e],onChange:y,currency:t[e]},t[e].id)))})})]}),(0,H.jsx)(en,{variant:"secondary",className:e,onClick:b,"data-testid":"enabled-currencies-add-button",children:(0,X.__)("Add/remove currencies","woocommerce-payments")})]})},Im=()=>{const e="https://woocommerce.com/document/woopayments/currencies/multi-currency-setup/#enabled-currencies";return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("h2",{children:(0,X.__)("Enabled currencies","woocommerce-payments")}),(0,H.jsx)("p",{children:(0,V.createInterpolateElement)((0,X.sprintf)((0,X.__)("Accept payments in multiple currencies. Prices are converted based on exchange rates and rounding rules. <learnMoreLink>Learn more</learnMoreLink>","woocommerce-payments"),e),{learnMoreLink:(0,H.jsx)("a",{href:e,target:"_blank",rel:"noreferrer"})})})]})},km=()=>{const{isLoading:e}=Nl(),t=jl(),{enabledCurrencies:r,submitEnabledCurrenciesUpdate:n}=Il(),o="wcpay-multi-currency",a=e=>{const t=Object.keys(r);t.splice(t.indexOf(e),1),n(t)},i=r?Object.keys(r):[];return(0,H.jsx)(Cn,{description:Im,className:"multi-currency-settings-enabled-currencies-section",children:(0,H.jsxs)(wd,{className:`${o}__enabled-currencies`,children:[(0,H.jsxs)(Ad,{className:`${o}__enabled-currencies-header`,children:[(0,H.jsx)("div",{children:(0,X.__)("Name","woocommerce-payments")}),(0,H.jsx)("div",{children:(0,X.__)("Exchange rate","woocommerce-payments")}),(0,H.jsx)("div",{})]}),(0,H.jsx)(im,{}),(0,H.jsx)(Ad,{size:null,children:(0,H.jsxs)(sm,{className:"enabled-currencies-list",children:[!e&&r&&i.map((e=>(0,H.jsx)(Cm,{currency:r[e],defaultCurrency:t,onDeleteClick:r[e].is_default?void 0:a},r[e].id))),e&&[1,2,3,4,5].map((e=>(0,H.jsx)(Am,{isLoading:1},"loadable-placeholder-"+e)))]})}),(0,H.jsx)(im,{}),(0,H.jsx)(Ad,{className:`${o}__available-currencies-container`,children:r&&(0,H.jsx)(Nm,{className:`${o}__available-currencies-modal`})})]})})},jm=()=>{const e="https://woocommerce.com/document/woopayments/currencies/multi-currency-setup/#store-settings";return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("h2",{children:(0,X.__)("Store settings","woocommerce-payments")}),(0,H.jsx)("p",{children:(0,V.createInterpolateElement)((0,X.sprintf)((0,X.__)("Store settings allow your customers to choose which currency they would like to use when shopping at your store. <learnMoreLink>Learn more</learnMoreLink>","woocommerce-payments"),e),{learnMoreLink:(0,H.jsx)("a",{href:e,target:"_blank",rel:"noreferrer"})})})]})},Pm=()=>{const{storeSettings:e,isLoading:t,submitStoreSettingsUpdate:r}=kl(),[n,o]=(0,$.useState)(!1),[a,i]=(0,$.useState)(!1),[s,c]=(0,$.useState)(!1),[l,u]=(0,$.useState)(!1),[d,m]=(0,$.useState)(!1);return(0,$.useEffect)((()=>{Object.keys(e).length&&(c(e.enable_storefront_switcher),i(e.enable_auto_currency))}),[i,c,e]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Cn,{description:jm,className:"multi-currency-settings-store-settings-section",children:(0,H.jsx)(Rn,{isLoading:t,numLines:10,children:(0,H.jsxs)(wd,{className:"multi-currency-settings__wrapper",children:[(0,H.jsxs)(Ad,{children:[(0,H.jsx)(Uu,{checked:a,onChange:e=>{i(e),m(!0)},"data-testid":"enable_auto_currency",label:(0,X.__)("Automatically switch customers to their local currency if it has been enabled","woocommerce-payments")}),(0,H.jsx)("div",{className:"multi-currency-settings__description",children:(0,V.createInterpolateElement)((0,X.__)("Customers will be notified via store alert banner. <previewLink>Preview</previewLink>","woocommerce-payments"),{previewLink:(0,H.jsx)(en,{isLink:!0,onClick:()=>{u(!0)}})})}),"Storefront"===e.site_theme?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Uu,{checked:s,onChange:e=>{c(e),m(!0)},"data-testid":"enable_storefront_switcher",label:(0,X.__)("Add a currency switcher to the Storefront theme on breadcrumb section.","woocommerce-payments")}),(0,H.jsx)("div",{className:"multi-currency-settings__description",children:(0,V.createInterpolateElement)((0,X.sprintf)((0,X.__)("A currency switcher is also available in your widgets. <linkToWidgets>Configure now</linkToWidgets>","woocommerce-payments"),"widgets.php"),{linkToWidgets:(0,H.jsx)("a",{href:"widgets.php"})})})]}):null]}),(0,H.jsx)(Pl,{isPreviewModalOpen:l,setPreviewModalOpen:u,isStorefrontSwitcherEnabledValue:!1,isAutomaticSwitchEnabledValue:!0})]})})}),(0,H.jsx)(Cn,{className:"multi-currency-settings-save-settings-section",children:(0,H.jsx)(en,{isPrimary:!0,isBusy:n,disabled:n||!d,onClick:()=>{o(!0),r(a,s),o(!1),m(!1)},children:(0,X.__)("Save changes","woocommerce-payments")})})]})},Dm=()=>(0,H.jsx)("div",{className:"multi-currency-settings",children:(0,H.jsxs)(xn,{children:[(0,H.jsx)(km,{}),(0,H.jsx)(Pm,{})]})}),Fm=window.wc.components,Mm=({storeCurrency:e,targetCurrency:t,currencyRate:r=null,roundingValue:n,charmValue:o})=>{const[a,i]=(0,$.useState)(20),[s,c]=(0,$.useState)(0),l=(0,$.useCallback)((e=>{const a=parseFloat(e.toString().replace(/,/g,"."))*parseFloat(r||t.rate),i=(parseFloat(n)?Math.ceil(a/parseFloat(n))*parseFloat(n):a)+parseFloat(o);return isNaN(i)?(0,X.__)("Please enter a valid number","woocommerce-payments"):Dn(Pn(t.code)?i:100*i,t.code,null,!0)}),[o,r,n,t]);(0,$.useEffect)((()=>{if(t){const e=l(a);c(e)}}),[l,a,t,n,o,r]);const u=e=>{i(e);const t=l(e);c(t)};return(0,H.jsx)("div",{className:"single-currency-settings-preview-wrapper",children:(0,H.jsx)(wd,{children:(0,H.jsxs)(Ad,{children:[(0,H.jsxs)("div",{children:[(0,H.jsx)("h4",{children:e.name}),"left"===e.symbol_position?(0,H.jsx)(Fm.TextControlWithAffixes,{prefix:e.symbol,"data-testid":"store_currency_value",value:a.toString(),onChange:u}):(0,H.jsx)(Fm.TextControlWithAffixes,{suffix:e.symbol,"data-testid":"store_currency_value",value:a.toString(),onChange:u})]}),(0,H.jsxs)("div",{children:[(0,H.jsx)("h4",{children:t&&t.name}),(0,H.jsx)("div",{children:(0,H.jsx)("strong",{"data-testid":"calculated_value",children:s})})]})]})})})},Lm={0:(0,X.__)("None","woocommerce-payments"),.25:"0.25","0.50":"0.50","1.00":"1.00 (recommended)","5.00":"5.00","10.00":"10.00"},Um={1:"1",10:"10",25:"25",50:"50",100:"100 (recommended)",500:"500",1e3:"1000"},$m={"0.00":(0,X.__)("None","woocommerce-payments"),"-0.01":"-0.01","-0.05":"-0.05"},zm={"0.00":(0,X.__)("None","woocommerce-payments"),"-1":"-1","-5":"-5","-10":"-10","-20":"-20","-25":"-25","-50":"-50","-100":"-100"},Bm=()=>{var e,t;const{currencyCodeToShowSettingsFor:r,closeSingleCurrencySettings:n}=(0,$.useContext)(xm),[o,a]=(0,$.useState)(!1),i=r,{currencies:s}=Nl(),{enabledCurrencies:c}=Il(),{storeSettings:l}=kl(),{currencySettings:u,isLoading:d,submitCurrencySettings:m}=(e=>{const{currencySettings:t,isLoading:r}=(0,Ln.useSelect)((t=>{const{getCurrencySettings:r,isResolving:n}=t(sl);return{currencySettings:r(e),isLoading:n("getCurrencySettings",[e])}})),{submitCurrencySettings:n}=(0,Ln.dispatch)(sl);return{currencySettings:t,isLoading:r,submitCurrencySettings:n}})(i),p=s.default?s.default:{},y=s.available?s.available[i]:{},h=y.is_zero_decimal?Um:Lm,f=y.is_zero_decimal?zm:$m,_="automatic",g=y?.is_zero_decimal?"100":"1.00",b="0.00",[v,w]=(0,$.useState)(_),[S,E]=(0,$.useState)(0),[T,R]=(0,$.useState)(g),[O,x]=(0,$.useState)(b),[C,A]=(0,$.useState)(!1);(0,$.useEffect)((()=>{var e;u[i]&&(w(u[i].exchange_rate_type||_),E(u[i].manual_rate||0),R(null!==(e=u[i].price_rounding)&&void 0!==e?e:g),x(u[i].price_charm||b))}),[u,i,g]);const N=null!==(e=l.date_format)&&void 0!==e?e:"M j, Y",I=null!==(t=l.time_format)&&void 0!==t?t:"g:iA",k=y?(0,io.dateI18n)(`${N} ${I}`,ao().unix(y.last_updated).toISOString()):"";return(0,H.jsx)("div",{className:"single-currency-settings",children:(0,H.jsxs)(xn,{children:[(0,H.jsxs)("h2",{className:"single-currency-settings-breadcrumb",children:[(0,H.jsx)(en,{isLink:!0,onClick:()=>n(),children:(0,X.__)("Enabled currencies","woocommerce-payments")})," ","> ",y.name," (",y.code,")"," ",y.flag]}),(0,H.jsx)(Cn,{description:()=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("h2",{children:(0,X.__)("Currency settings","woocommerce-payments")}),(0,H.jsx)("p",{children:(0,X.__)("Choose between automatic or manual exchange rates and modify formatting rules to refine the display of your prices.","woocommerce-payments")})]}),children:(0,H.jsx)(Rn,{isLoading:d,numLines:33,children:(0,H.jsx)(wd,{className:"single-currency-settings-currency-settings",children:(0,H.jsxs)(Ad,{children:[(0,H.jsx)("h3",{children:(0,X.__)("Exchange rate","woocommerce-payments")}),(0,H.jsx)("fieldset",{children:(0,H.jsxs)("ul",{children:[(0,H.jsx)("li",{children:(0,H.jsxs)("label",{htmlFor:"single-currency-settings__automatic_rate_radio",children:[(0,H.jsxs)("div",{className:"single-currency-settings-radio-wrapper",children:[(0,H.jsx)("input",{name:"wcpay_multi_currency_exchange_rate_aud",id:"single-currency-settings__automatic_rate_radio",value:"automatic",type:"radio",className:"exchange-rate-selector",checked:"automatic"===v,onChange:()=>{w("automatic"),a(!0)}}),(0,H.jsx)("h4",{children:(0,X.__)("Fetch rates automatically","woocommerce-payments")})]}),(0,H.jsx)("p",{className:on("single-currency-settings-description","single-currency-settings-description-inset"),children:y.last_updated?(0,X.sprintf)((0,X.__)("Current rate: 1 %s = %s %s (Last updated: %s)","woocommerce-payments"),p.code,y.rate,y.code,k):(0,X.__)("Error - Unable to fetch automatic rate for this currency")})]})}),(0,H.jsx)("li",{children:(0,H.jsxs)("label",{htmlFor:"single-currency-settings__manual_rate_radio",children:[(0,H.jsxs)("div",{className:"single-currency-settings-radio-wrapper",children:[(0,H.jsx)("input",{name:"wcpay_multi_currency_exchange_rate_aud",id:"single-currency-settings__manual_rate_radio",value:"manual",type:"radio",className:"exchange-rate-selector",checked:"manual"===v,onChange:()=>{w("manual"),E(S||y.rate),a(!0)}}),(0,H.jsx)("h4",{children:(0,X.__)("Manual","woocommerce-payments")})]}),(0,H.jsx)("p",{className:on("single-currency-settings-description","single-currency-settings-description-inset"),children:(0,X.__)("Enter your fixed rate of exchange","woocommerce-payments")})]})}),"manual"===v?(0,H.jsxs)("li",{children:[(0,H.jsx)("h4",{children:(0,X.__)("Manual Rate","woocommerce-payments")}),(0,H.jsx)("input",{type:"text","data-testid":"manual_rate_input",defaultValue:S||y.rate,onChange:e=>{E(e.target.value.replace(/,/g,".")),a(!0)}}),(0,H.jsx)("p",{className:"single-currency-settings-description",children:(0,X.__)("Enter the manual rate you would like to use. Must be a positive number.","woocommerce-payments")})]}):""]})}),(0,H.jsx)("h3",{children:(0,X.__)("Formatting rules","woocommerce-payments")}),(0,H.jsx)("fieldset",{children:(0,H.jsxs)("ul",{children:[(0,H.jsxs)("li",{children:[(0,H.jsx)("h4",{children:(0,X.__)("Price rounding","woocommerce-payments")}),(0,H.jsx)("select",{value:parseFloat(T),"data-testid":"price_rounding",onChange:e=>{R(e.target.value),a(!0)},children:Object.keys(h).map((e=>(0,H.jsx)("option",{value:parseFloat(e),children:h[e]},e)))}),(0,H.jsxs)("p",{className:"single-currency-settings-description",children:[(0,X.sprintf)((0,X.__)("Make your %s prices consistent by rounding them up after they're converted.","woocommerce-payments"),y.code),(0,H.jsx)(en,{isLink:!0,onClick:()=>{open("https://woocommerce.com/document/woopayments/currencies/multi-currency-setup/#price-rounding","_blank")},children:(0,X.__)("Learn more","woocommerce-payments")})]})]}),(0,H.jsxs)("li",{children:[(0,H.jsx)("h4",{children:(0,X.__)("Charm pricing","woocommerce-payments")}),(0,H.jsx)("select",{value:parseFloat(O),"data-testid":"price_charm",onChange:e=>{x(e.target.value),a(!0)},children:Object.keys(f).map((e=>(0,H.jsx)("option",{value:parseFloat(e),children:f[e]},e)))}),(0,H.jsxs)("p",{className:"single-currency-settings-description",children:[(0,X.__)("Reduce the converted price for a specific amount","woocommerce-payments"),(0,H.jsx)(en,{isLink:!0,onClick:()=>{open("https://woocommerce.com/document/woopayments/currencies/multi-currency-setup/#charm-pricing","_blank")},children:(0,X.__)("Learn more","woocommerce-payments")})]})]})]})})]})})})}),(0,H.jsx)(Cn,{description:()=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("h2",{children:(0,X.__)("Preview","woocommerce-payments")}),(0,H.jsx)("p",{children:d?"":(0,X.sprintf)((0,X.__)("Enter a price in your default currency (%s) to see it converted to %s using the exchange rate and formatting rules above.","woocommerce-payments"),p.name,y.name)})]}),children:(0,H.jsx)(Rn,{isLoading:d,numLines:8,children:(0,H.jsx)(Mm,{className:"single-currency-settings-currency-preview",storeCurrency:p,targetCurrency:y,currencyRate:"manual"===v?S:null,roundingValue:T,charmValue:O})})}),(0,H.jsx)(Cn,{className:"single-currency-settings-save-settings-section",children:(0,H.jsx)(en,{isPrimary:!0,isBusy:C,disabled:C||!o,onClick:()=>{A(!0),m(y.code,{exchange_rate_type:v,manual_rate:S,price_rounding:T,price_charm:O}),isNaN(S)||(c[y.code].rate=Number(S)),A(!1),a(!1)},children:(0,X.__)("Save changes","woocommerce-payments")})})]})})},qm=()=>{const[e,t]=(0,$.useState)(!1),[r,n]=(0,$.useState)(null);return(0,H.jsx)(xm.Provider,{value:{isSingleCurrencyScreenOpen:e,currencyCodeToShowSettingsFor:r,openSingleCurrencySettings:e=>{n(e),t(!0)},closeSingleCurrencySettings:()=>{t(!1),n(null)}},children:e?(0,H.jsx)(Bm,{}):(0,H.jsx)(Dm,{})})};q().render((0,H.jsx)(qm,{}),document.querySelector("#wcpay_multi_currency_settings_container"))})()})();