HEX
Server: LiteSpeed
System: Linux premium235.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: beaupptk (733)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //proc/self/cwd/wp-content/plugins/woocommerce-payments/dist/multi-currency-switcher-block.js
/*! For license information please see multi-currency-switcher-block.js.LICENSE.txt */
(()=>{var e={1020:(e,t,r)=>{"use strict";var o=r(1609),a=Symbol.for("react.element"),n=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,c={},d=null,u=null;for(o in void 0!==r&&(d=""+r),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(u=t.ref),t)n.call(t,o)&&!i.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:a,type:e,key:d,ref:u,props:c,_owner:s.current}}t.jsx=c,t.jsxs=c},4848:(e,t,r)=>{"use strict";e.exports=r(1020)},1609:e=>{"use strict";e.exports=window.React}},t={};function r(o){var a=t[o];if(void 0!==a)return a.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.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 o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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 o=t.getElementsByTagName("script");if(o.length)for(var a=o.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=o[a--].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:()=>X,getAllDepositsOverviewsError:()=>ee,getDeposit:()=>J,getDepositQueryError:()=>ae,getDeposits:()=>re,getDepositsCount:()=>oe,getDepositsSummary:()=>se,getDepositsSummaryError:()=>ie,getInstantDeposit:()=>ce});var t={};r.r(t),r.d(t,{submitInstantDeposit:()=>Me,updateAllDepositsOverviews:()=>be,updateDeposit:()=>ve,updateDeposits:()=>Ae,updateDepositsCount:()=>Ne,updateDepositsSummary:()=>Pe,updateErrorForAllDepositsOverviews:()=>Ie,updateErrorForDepositQuery:()=>Ce,updateErrorForDepositsSummary:()=>De,updateInstantDeposit:()=>Fe});var o={};r.r(o),r.d(o,{getAllDepositsOverviews:()=>Le,getDeposit:()=>Ue,getDeposits:()=>ke,getDepositsSummary:()=>qe,getPayoutsCSVRequestURL:()=>Ye,payoutsDownloadEndpoint:()=>xe});var a={};r.r(a),r.d(a,{getFraudOutcomeTransactions:()=>Je,getFraudOutcomeTransactionsError:()=>Xe,getFraudOutcomeTransactionsSummary:()=>tt,getFraudOutcomeTransactionsSummaryError:()=>rt,getTransactions:()=>Ve,getTransactionsError:()=>Ge,getTransactionsSummary:()=>We,getTransactionsSummaryError:()=>Ze});var n={};r.r(n),r.d(n,{updateErrorForFraudOutcomeTransactions:()=>ct,updateErrorForFraudOutcomeTransactionsSummary:()=>ut,updateErrorForTransactions:()=>at,updateErrorForTransactionsSummary:()=>st,updateFraudOutcomeTransactions:()=>it,updateFraudOutcomeTransactionsSummary:()=>dt,updateTransactions:()=>ot,updateTransactionsSummary:()=>nt});var s={};r.r(s),r.d(s,{formatQueryFilters:()=>_t,getFraudOutcomeTransactions:()=>ht,getFraudOutcomeTransactionsExport:()=>Et,getFraudOutcomeTransactionsSummary:()=>St,getTransactions:()=>pt,getTransactionsCSVRequestURL:()=>lt,getTransactionsSummary:()=>yt,transactionsDownloadEndpoint:()=>mt});var i={};r.r(i),r.d(i,{getCharge:()=>Tt,getChargeError:()=>Rt,getChargeFromOrder:()=>wt,getChargeFromOrderError:()=>ft});var c={};r.r(c),r.d(c,{updateCharge:()=>Ot,updateErrorForCharge:()=>vt});var d={};r.r(d),r.d(d,{getCharge:()=>bt,getChargeFromOrder:()=>It});var u={};r.r(u),r.d(u,{getTimeline:()=>Nt,getTimelineError:()=>Ct});var _={};r.r(_),r.d(_,{updateErrorForTimeline:()=>Dt,updateTimeline:()=>Pt});var p={};r.r(p),r.d(p,{getTimeline:()=>Ft});var m={};r.r(m),r.d(m,{getCachedDispute:()=>Yt,getDispute:()=>jt,getDisputeError:()=>xt,getDisputes:()=>kt,getDisputesSummary:()=>qt});var l={};r.r(l),r.d(l,{refundCharge:()=>Vt,updateErrorForPaymentIntent:()=>Ht,updatePaymentIntent:()=>$t});var y={};r.r(y),r.d(y,{getPaymentIntent:()=>Gt});var h={};r.r(h),r.d(h,{acceptDispute:()=>Jt,updateDispute:()=>Qt,updateDisputes:()=>Zt,updateDisputesSummary:()=>Kt,updateErrorForDispute:()=>Wt});var S={};r.r(S),r.d(S,{disputesDownloadEndpoint:()=>nr,getDispute:()=>ir,getDisputes:()=>cr,getDisputesCSVRequestURL:()=>sr,getDisputesSummary:()=>dr});var E={};r.r(E),r.d(E,{getAccountBusinessSupportEmail:()=>br,getAccountBusinessSupportPhone:()=>Ir,getAccountDomesticCurrency:()=>Ar,getAccountStatementDescriptor:()=>fr,getAccountStatementDescriptorKana:()=>vr,getAccountStatementDescriptorKanji:()=>Or,getAdvancedFraudProtectionSettings:()=>io,getAvailablePaymentMethodIds:()=>gr,getCompletedWaitingPeriod:()=>Fr,getCurrentProtectionLevel:()=>so,getDepositDelayDays:()=>Dr,getDepositRestrictions:()=>Ur,getDepositScheduleInterval:()=>Nr,getDepositScheduleMonthlyAnchor:()=>Pr,getDepositScheduleWeeklyAnchor:()=>Cr,getDepositStatus:()=>Mr,getDuplicatedPaymentMethodIds:()=>hr,getEnabledPaymentMethodIds:()=>Er,getIsAppleGooglePayInPaymentMethodsOptionsEnabled:()=>qr,getIsCardPresentEligible:()=>Kr,getIsDebugLogEnabled:()=>zr,getIsDevModeEnabled:()=>Yr,getIsManualCaptureEnabled:()=>Lr,getIsMultiCurrencyEnabled:()=>Br,getIsPaymentRequestEnabled:()=>kr,getIsSavedCardsEnabled:()=>Wr,getIsStripeBillingEnabled:()=>uo,getIsStripeBillingMigrationInProgress:()=>_o,getIsSubscriptionsPluginActive:()=>eo,getIsTestModeEnabled:()=>jr,getIsTestModeOnboarding:()=>xr,getIsWCPayEnabled:()=>Sr,getIsWCPaySubscriptionsEligible:()=>Xr,getIsWCPaySubscriptionsEnabled:()=>Jr,getIsWooPayEnabled:()=>to,getIsWooPayGlobalThemeSupportEnabled:()=>ro,getPaymentMethodStatuses:()=>Tr,getPaymentRequestButtonBorderRadius:()=>Qr,getPaymentRequestButtonSize:()=>Vr,getPaymentRequestButtonTheme:()=>Gr,getPaymentRequestButtonType:()=>Hr,getPaymentRequestLocations:()=>$r,getSavingError:()=>Zr,getSettings:()=>yr,getShowWooPayIncompatibilityNotice:()=>co,getStripeBillingMigratedCount:()=>mo,getStripeBillingSubscriptionCount:()=>po,getWooPayCustomMessage:()=>oo,getWooPayLocations:()=>no,getWooPayStoreLogo:()=>ao,isDirty:()=>wr,isSavingSettings:()=>Rr});var g={};r.r(g),r.d(g,{saveOption:()=>ta,saveSettings:()=>$o,submitStripeBillingSubscriptionMigration:()=>ea,updateAccountBusinessSupportEmail:()=>Yo,updateAccountBusinessSupportPhone:()=>ko,updateAccountStatementDescriptor:()=>Lo,updateAccountStatementDescriptorKana:()=>xo,updateAccountStatementDescriptorKanji:()=>jo,updateAdvancedFraudProtectionSettings:()=>Jo,updateDepositScheduleInterval:()=>qo,updateDepositScheduleMonthlyAnchor:()=>Bo,updateDepositScheduleWeeklyAnchor:()=>zo,updateEnabledPaymentMethodIds:()=>Io,updateIsAppleGooglePayInPaymentMethodsOptionsEnabled:()=>bo,updateIsCardPresentEligible:()=>Eo,updateIsDebugLogEnabled:()=>Fo,updateIsManualCaptureEnabled:()=>Po,updateIsMultiCurrencyEnabled:()=>Mo,updateIsPaymentRequestEnabled:()=>vo,updateIsSavedCardsEnabled:()=>So,updateIsSavingSettings:()=>Ao,updateIsStripeBillingEnabled:()=>Xo,updateIsTestModeEnabled:()=>Do,updateIsWCPayEnabled:()=>Oo,updateIsWCPaySubscriptionsEnabled:()=>Uo,updateIsWooPayEnabled:()=>Vo,updateIsWooPayGlobalThemeSupportEnabled:()=>Go,updatePaymentRequestButtonBorderRadius:()=>wo,updatePaymentRequestButtonSize:()=>To,updatePaymentRequestButtonTheme:()=>Ro,updatePaymentRequestButtonType:()=>go,updatePaymentRequestLocations:()=>Ho,updateProtectionLevel:()=>Ko,updateSelectedPaymentMethod:()=>No,updateSettings:()=>fo,updateUnselectedPaymentMethod:()=>Co,updateWooPayCustomMessage:()=>Qo,updateWooPayLocations:()=>Zo,updateWooPayStoreLogo:()=>Wo});var T={};r.r(T),r.d(T,{getSettings:()=>ra});var R={};r.r(R),r.d(R,{getCardReaderStats:()=>aa,getCardReaderStatsError:()=>na,getCardReaders:()=>sa});var w={};r.r(w),r.d(w,{updateCardReaderStats:()=>ia,updateCardReaders:()=>ca,updateErrorForCardReaderStats:()=>da,updateErrorForCardReaders:()=>ua});var f={};r.r(f),r.d(f,{getCardReaderStats:()=>_a,getCardReaders:()=>pa});var O={};r.r(O),r.d(O,{getActiveLoanSummary:()=>Sa,getActiveLoanSummaryError:()=>Ea,getLoans:()=>ga,getLoansError:()=>Ta});var v={};r.r(v),r.d(v,{updateActiveLoanSummary:()=>Ra,updateErrorForActiveLoanSummary:()=>wa,updateErrorForLoans:()=>Oa,updateLoans:()=>fa});var b={};r.r(b),r.d(b,{getActiveLoanSummary:()=>va,getLoans:()=>ba});var I={};r.r(I),r.d(I,{getDocuments:()=>Pa,getDocumentsError:()=>Da,getDocumentsSummary:()=>Ma,getDocumentsSummaryError:()=>Ua});var A={};r.r(A),r.d(A,{updateDocuments:()=>La,updateDocumentsSummary:()=>xa,updateErrorForDocuments:()=>ja,updateErrorForDocumentsSummary:()=>Ya});var N={};r.r(N),r.d(N,{formatQueryFilters:()=>ka,getDocuments:()=>qa,getDocumentsSummary:()=>za});var C={};r.r(C),r.d(C,{getPaymentIntent:()=>$a,getPaymentIntentError:()=>Ha});var P={};r.r(P),r.d(P,{getAuthorization:()=>Ka,getAuthorizations:()=>Za,getAuthorizationsError:()=>Ja,getAuthorizationsSummary:()=>en,getAuthorizationsSummaryError:()=>tn,getIsRequesting:()=>rn});var D={};r.r(D),r.d(D,{setIsRequestingAuthorization:()=>dn,submitCancelAuthorization:()=>_n,submitCaptureAuthorization:()=>un,updateAuthorization:()=>sn,updateAuthorizations:()=>an,updateAuthorizationsSummary:()=>cn,updateErrorForAuthorizations:()=>nn,updateErrorForAuthorizationsSummary:()=>pn});var F={};r.r(F),r.d(F,{getAuthorization:()=>ln,getAuthorizations:()=>mn,getAuthorizationsSummary:()=>yn});var M={};r.r(M),r.d(M,{getFile:()=>gn,getFileError:()=>Tn});var U={};r.r(U),r.d(U,{updateErrorForFiles:()=>wn,updateFiles:()=>Rn});var L={};r.r(L),r.d(L,{getFile:()=>fn});var j={};r.r(j),r.d(j,{getPmPromotions:()=>bn,getPmPromotionsError:()=>In});var x={};r.r(x),r.d(x,{activatePmPromotion:()=>Pn,dismissPmPromotion:()=>Dn,updateErrorForPmPromotions:()=>Cn,updatePmPromotions:()=>Nn});var Y={};r.r(Y),r.d(Y,{getPmPromotions:()=>Mn});var k={};r.r(k),r.d(k,{getAvailableCurrencies:()=>qn,getCurrencies:()=>kn,getCurrencySettings:()=>$n,getDefaultCurrency:()=>Bn,getEnabledCurrencies:()=>zn,getStoreSettings:()=>Hn});var q={};r.r(q),r.d(q,{saveOption:()=>ts,submitCurrencySettings:()=>Xn,submitEnabledCurrenciesUpdate:()=>Jn,submitStoreSettingsUpdate:()=>es,updateAvailableCurrencies:()=>Gn,updateCurrencies:()=>Vn,updateCurrencySettings:()=>Zn,updateDefaultCurrency:()=>Wn,updateEnabledCurrencies:()=>Qn,updateStoreSettings:()=>Kn});var z={};r.r(z),r.d(z,{getCurrencies:()=>rs,getCurrencySettings:()=>os,getStoreSettings:()=>as});const B=window.wp.data,$=window.wp.dataControls,H="/wc/v3/payments",V="wc/payments",G=window.lodash,Q={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"},W=e=>JSON.stringify(e,Object.keys(e).sort()),Z={byId:{},queries:{},count:0,instant:{}},K=e=>e&&e.deposits||{},J=(e,t)=>(K(e).byId||{})[t],X=e=>{const t=K(e).overviews||{};if(!t.data)return{account:null,currencies:[]};const{deposit:r,balance:o,account:a}=t.data,n={lastPaid:r.last_paid,pending:o.pending,available:o.available,instant:o.instant},s={};for(const[e,t]of Object.entries(n))t?.forEach((t=>{const{currency:r}=t;s[r]||(s[r]={currency:r,lastPaid:void 0,pending:void 0,available:void 0,instant:void 0}),s[r][e]=t}));const i=Object.values(s);return{account:a,currencies:[...i.filter((e=>a.default_currency===e.currency)),...i.filter((e=>a.default_currency!==e.currency))]}},ee=e=>(K(e).overviews||{}).error,te=(e,t)=>{const r=W(t);return(K(e).queries||{})[r]||{}},re=(e,t)=>(te(e,t).data||[]).map(J.bind(void 0,e)),oe=e=>K(e).count,ae=(e,t)=>te(e,t).error||{},ne=(e,t)=>{const r=W(t);return(K(e).summary||{})[r]||{}},se=(e,t)=>ne(e,t).data||{},ie=(e,t)=>ne(e,t).error||{},ce=e=>(K(e).instant||{}).data,de=window.wp.i18n,ue=window.wp.domReady;var _e=r.n(ue);const pe=(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]}_e()((()=>{var r,o;(null!==(o=null===(r=null===wc||void 0===wc?void 0:wc.tracks)||void 0===r?void 0:r.recordEvent)&&void 0!==o?o:wcTracks.recordEvent)(e,t)}))};var me=r(1609);(0,me.createContext)(window.wcpaySettings),(0,me.createContext)({isActive:!1,setActive:()=>null,isCompleted:!1,setCompleted:()=>null,taskId:""});const le=window.wc.currency;var ye=r.n(le);(0,de.__)("Australian dollar","woocommerce-payments"),(0,de.__)("Canadian dollar","woocommerce-payments"),(0,de.__)("Swiss franc","woocommerce-payments"),(0,de.__)("Danish krone","woocommerce-payments"),(0,de.__)("Euro","woocommerce-payments"),(0,de.__)("Pound sterling","woocommerce-payments"),(0,de.__)("Norwegian krone","woocommerce-payments"),(0,de.__)("New Zealand dollar","woocommerce-payments"),(0,de.__)("Swedish krona","woocommerce-payments"),(0,de.__)("United States (US) dollar","woocommerce-payments");const he=(e,t="USD",r=null,o=!1)=>{const a=(e=>wcpaySettings.zeroDecimalCurrencies.includes(e.toLowerCase()))(t);a||(e/=100);const n=e<0,s=n?-1*e:e,i=n?"-":"",c=o?(e=>{const t=e.toUpperCase(),{currencyData:r,connect:{country:o="US"}}=wcpaySettings;if(r[o]?.code===t)return ye()(r[o]);const a=(0,G.find)(r,{code:t});if(a){const{defaultLocale:e={}}=a;return e.hasOwnProperty("decimalSeparator")&&e.hasOwnProperty("thousandSeparator")&&e.hasOwnProperty("symbolPosition")&&(a.decimalSeparator=e.decimalSeparator,a.thousandSeparator=e.thousandSeparator,a.symbolPosition=e.symbolPosition),ye()(a)}return null})(t):((e,t=null)=>{const{currencyData:r,connect:{country:o="US"}}=wcpaySettings,a=(0,G.find)(r,{code:e.toUpperCase()});if(a){if(null!==t&&t.toUpperCase()!==e.toUpperCase()||r[o]){const e=t?(0,G.find)(r,{code:t.toUpperCase()}):r[o];e&&(a.decimalSeparator=e.decimalSeparator,a.thousandSeparator=e.thousandSeparator,a.symbolPosition=e.symbolPosition)}return ye()(a)}return null})(t,r);if(null===c)return i+Se(s,t,a);try{return i+("function"==typeof c.formatAmount?Ee(c.formatAmount(s)):Ee(c.formatCurrency(s)))}catch(e){return i+Ee(Se(s,t,a))}};function Se(e,t,r){try{return e.toLocaleString(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",dummy:r})}catch(o){return(0,de.sprintf)(r?"%s %i":"%s %.2f",t.toUpperCase(),e)}}function Ee(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}const ge=window.wp.url,Te=window.moment;var Re=r.n(Te);const we=window.wp.date,fe=(window.wc.number,e=>(0,ge.addQueryArgs)("admin.php",e)),Oe=(e,t=!1)=>{const r=t?Re()(e).endOf("day").utc().toISOString():Re()(e).startOf("day").utc().toISOString();return e&&(0,we.dateI18n)("Y-m-d H:i:s",r,!0)};function ve(e){return{type:Q.SET_DEPOSIT,data:e}}function be(e){return{type:Q.SET_ALL_DEPOSITS_OVERVIEWS,data:e}}function Ie(e,t){return{type:Q.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS,error:t}}function Ae(e,t){return{type:Q.SET_DEPOSITS,query:e,data:t}}function Ne(e){return{type:Q.SET_DEPOSITS_COUNT,data:e}}function Ce(e,t,r){return{type:Q.SET_ERROR_FOR_DEPOSIT_QUERY,query:e,data:t,error:r}}function Pe(e,t){return{type:Q.SET_DEPOSITS_SUMMARY,query:e,data:t}}function De(e,t,r){return{type:Q.SET_ERROR_FOR_DEPOSITS_SUMMARY,query:e,data:t,error:r}}function Fe(e){return{type:Q.SET_INSTANT_DEPOSIT,data:e}}function*Me(e){try{yield(0,B.dispatch)(V).startResolution("getInstantDeposit",[e]);const t=yield(0,$.apiFetch)({path:"/wc/v3/payments/deposits",method:"POST",data:{type:"instant",currency:e}});yield Fe(t),yield(0,B.dispatch)(V).invalidateResolutionForStoreSelector("getDeposits"),yield(0,B.dispatch)(V).invalidateResolutionForStoreSelector("getAllDepositsOverviews"),yield(0,B.dispatch)("core/notices").createSuccessNotice((0,de.sprintf)((0,de.__)("Instant payout for %s in transit.","woocommerce-payments"),he(t.amount)),{actions:[{label:(0,de.__)("View details","woocommerce-payments"),url:fe({page:"wc-admin",path:"/payments/payouts/details",id:t.id})}]})}catch{yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error creating instant payout.","woocommerce-payments"))}finally{yield(0,B.dispatch)(V).finishResolution("getInstantDeposit",[e])}}function*Ue(e){if(/\W/.test(e))return;const t=(0,ge.addQueryArgs)(`${H}/deposits/${e}`);try{const e=yield(0,$.apiFetch)({path:t});yield ve(e)}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving payout.","woocommerce-payments"))}}function*Le(){const e=(0,ge.addQueryArgs)(`${H}/deposits/overview-all`);try{const t=yield(0,$.apiFetch)({path:e});yield be(t)}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving all payouts' overviews.","woocommerce-payments")),yield Ie()}}const je=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:Oe(e.dateBefore,!0),date_after:Oe(e.dateAfter),date_between:e.dateBetween&&[Oe(e.dateBetween[0]),Oe(e.dateBetween[1],!0)],status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.locale}),xe=`${H}/deposits/download`;function Ye(e){return(0,ge.addQueryArgs)(xe,je(e))}function*ke(e){const t=(0,ge.addQueryArgs)(`${H}/deposits`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...je(e)});try{const r=yield(0,$.apiFetch)({path:t})||{};yield Ae(e,r.data),yield Ne(r.total_count);for(const e in r.data)yield B.controls.dispatch(V,"finishResolution","getDeposit",[r.data[e].id])}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving payouts.","woocommerce-payments")),yield Ce(e,null,t)}}function*qe(e){const t=(0,ge.addQueryArgs)(`${H}/deposits/summary`,je(e));try{const r=yield(0,$.apiFetch)({path:t});yield Pe(e,r)}catch(t){yield De(e,null,t)}}const ze={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"},Be={summary:{},fraudProtection:{review:{summary:{}},block:{summary:{}}}},$e=e=>e&&e.transactions||{},He=(e,t)=>{const r=W(t);return $e(e)[r]||{}},Ve=(e,t)=>He(e,t).data||[],Ge=(e,t)=>He(e,t).error||{},Qe=(e,t)=>{const r=W(t);return $e(e).summary[r]||{}},We=(e,t)=>Qe(e,t).data||{},Ze=(e,t)=>Qe(e,t).error||{},Ke=(e,t,r)=>{const o=W(r);return $e(e).fraudProtection?.[t]?.[o]||{}},Je=(e,t,r)=>Ke(e,t,r).data||[],Xe=(e,t,r)=>Ke(e,t,r).error||{},et=(e,t,r)=>{const o=W(r);return $e(e).fraudProtection?.[t]?.summary[o]||{}},tt=(e,t,r)=>et(e,t,r).data||{},rt=(e,t,r)=>et(e,t,r).error||{};function ot(e,t){return{type:ze.SET_TRANSACTIONS,query:e,data:t}}function at(e,t,r){return{type:ze.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:r}}function nt(e,t){return{type:ze.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function st(e,t,r){return{type:ze.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:r}}function it(e,t,r){return{type:ze.SET_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:r}}function ct(e,t,r){return{type:ze.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:null,error:r}}function dt(e,t,r){return{type:ze.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:r}}function ut(e,t,r){return{type:ze.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:null,error:r}}const _t=e=>({user_email:e.userEmail,match:e.match,date_before:Oe(e.dateBefore,!0),date_after:Oe(e.dateAfter),date_between:e.dateBetween&&[Oe(e.dateBetween[0]),Oe(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:Re()(new Date).format("Z"),locale:e.locale});function*pt(e){const t=(0,ge.addQueryArgs)(`${H}/transactions`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,..._t(e)});try{const r=yield(0,$.apiFetch)({path:t});yield ot(e,r.data||[])}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving transactions.","woocommerce-payments")),yield at(e,null,t)}}const mt=`${H}/transactions/download`;function lt(e){return(0,ge.addQueryArgs)(mt,_t(e))}function*yt(e){const t=(0,ge.addQueryArgs)(`${H}/transactions/summary`,_t(e));try{const r=yield(0,$.apiFetch)({path:t});yield nt(e,r)}catch(t){yield st(e,null,t)}}function*ht(e,t){const r=(0,ge.addQueryArgs)(`${H}/transactions/fraud-outcomes`,{status:e,page:t.paged,sort:t.orderby,pagesize:t.perPage,direction:t.order,additional_status:t.additionalStatus,..._t(t)});try{const o=yield(0,$.apiFetch)({path:r});yield it(e,t,o.data||[])}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield it(e,t,[]));yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving transactions.","woocommerce-payments")),yield ct(e,t,r)}}function*St(e,t){const r=(0,ge.addQueryArgs)(`${H}/transactions/fraud-outcomes/summary`,{status:e,additional_status:t.additionalStatus}),o={count:0,total:0};try{const a=yield(0,$.apiFetch)({path:r});yield dt(e,t,a||o)}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield dt(e,t,o));yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving on review transactions.","woocommerce-payments")),yield ut(e,t,r)}}function Et(e,t){return(0,ge.addQueryArgs)(`${H}/transactions/fraud-outcomes/download`,{status:e,sort:t.orderby,direction:t.order,additional_status:t.additionalStatus,..._t(t)})}const gt={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"},Tt=(e,t)=>e.charges[t]&&e.charges[t].data?e.charges[t].data:{},Rt=(e,t)=>e.charges[t]&&e.charges[t].error?e.charges[t].error:{},wt=(e,t)=>Tt(e,t),ft=(e,t)=>Rt(e,t);function Ot(e,t){return{type:gt.SET_CHARGE,id:e,data:t}}function vt(e,t,r){return{type:gt.SET_ERROR_FOR_CHARGE,id:e,data:t,error:r}}function*bt(e){try{const t=yield(0,$.apiFetch)({path:`${H}/charges/${e}`});yield Ot(e,t)}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving transaction.","woocommerce-payments")),yield vt(e,null,t)}}function*It(e){try{const t=yield(0,$.apiFetch)({path:`${H}/charges/order/${e}`});yield Ot(e,t)}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving transaction.","woocommerce-payments")),yield vt(e,null,t)}}const At={SET_TIMELINE:"SET_TIMELINE",SET_ERROR_FOR_TIMELINE:"SET_ERROR_FOR_TIMELINE"},Nt=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].data?e.timeline[t].data:{},Ct=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].error?e.timeline[t].error:{};function Pt(e,t){return{id:e,type:At.SET_TIMELINE,data:t}}function Dt(e,t){return{id:e,type:At.SET_ERROR_FOR_TIMELINE,error:t}}function*Ft(e){try{const t=yield(0,$.apiFetch)({path:`${H}/timeline/${e}`});yield Pt(e,t.data)}catch(t){yield Dt(e,t)}}const Mt={SET_DISPUTE:"SET_DISPUTE",SET_ERROR_FOR_DISPUTE:"SET_ERROR_FOR_DISPUTE",SET_DISPUTES:"SET_DISPUTES",SET_DISPUTES_SUMMARY:"SET_DISPUTES_SUMMARY"},Ut={byId:{},queries:{},summary:{},cached:{}},Lt=e=>e&&e.disputes||{},jt=(e,t)=>(Lt(e).byId||{})[t],xt=(e,t)=>{const r=Lt(e).byId||{};return r[t]?.error},Yt=(e,t)=>(Lt(e).cached||{})[t],kt=(e,t)=>{const r=((e,t)=>{const r=W(t);return(Lt(e).queries||{})[r]||{}})(e,t).data||[];return r.map(Yt.bind(void 0,e))},qt=(e,t)=>((e,t)=>{const r=W(t);return(Lt(e).summary||{})[r]||{}})(e,t).data||{};var zt;!function(e){e.SET_PAYMENT_INTENT="SET_PAYMENT_INTENT",e.SET_ERROR_FOR_PAYMENT_INTENT="SET_ERROR_FOR_PAYMENT_INTENT"}(zt||(zt={}));const Bt=zt;function $t(e,t){return{type:Bt.SET_PAYMENT_INTENT,id:e,data:t}}function Ht(e,t){return{type:Bt.SET_ERROR_FOR_PAYMENT_INTENT,id:e,error:t}}function*Vt(e,t){var r;const o=e.payment_intent;try{yield(0,$.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 B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getTimeline"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield B.controls.dispatch("core/notices","createSuccessNotice",(0,de.sprintf)((0,de.__)("Refunded payment #%s.","woocommerce-payments"),o))}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.sprintf)((0,de.__)("There has been an error refunding the payment #%s. Please try again later.","woocommerce-payments"),o))}}function*Gt(e){try{const t=yield(0,$.apiFetch)({path:`${H}/payment_intents/${e}`});yield $t(e,t)}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving transaction.","woocommerce-payments")),yield Ht(e,t)}}function Qt(e){return{type:Mt.SET_DISPUTE,data:e}}function Wt(e,t,r){return{type:Mt.SET_ERROR_FOR_DISPUTE,id:e,data:t,error:r}}function Zt(e,t){return{type:Mt.SET_DISPUTES,query:e,data:t}}function Kt(e,t){return{type:Mt.SET_DISPUTES_SUMMARY,query:e,data:t}}function*Jt(e){const{id:t,payment_intent:r}=e;try{yield B.controls.dispatch(V,"startResolution","getDispute",[t]);const e=yield(0,$.apiFetch)({path:`${H}/disputes/${t}/close`,method:"post"});yield Qt(e),yield Gt(r),yield B.controls.dispatch(V,"finishResolution","getDispute",[t]);const o=e.order?(0,de.sprintf)((0,de.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),e.order.number):(0,de.__)("You have accepted the dispute.","woocommerce-payments");yield B.controls.dispatch("core/notices","createSuccessNotice",o)}catch(e){const r=(0,de.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments");yield B.controls.dispatch("core/notices","createErrorNotice",r),yield B.controls.dispatch(V,"finishResolution","getDispute",[t])}}const Xt=window.wc.wcSettings,er=((0,de.__)("Bank cannot process","woocommerce-payments"),(0,de.__)("Check returned","woocommerce-payments"),(0,de.__)("Credit not processed","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("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,de.__)("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,de.__)("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,de.__)("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,de.__)("The cardholder claims a credit was not processed.","woocommerce-payments"),(0,de.__)("Customer initiated","woocommerce-payments"),(0,de.__)("Debit not authorized","woocommerce-payments"),(0,de.__)("Duplicate","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments"),(0,de.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments"),(0,de.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("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,de.__)("The cardholder claims this is a duplicate transaction.","woocommerce-payments"),(0,de.__)("Transaction unauthorized","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("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,de.__)("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,de.__)("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,de.__)("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,de.__)("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,de.__)("The cardholder claims this is an unauthorized transaction.","woocommerce-payments"),(0,de.__)("General","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("Incorrect account details","woocommerce-payments"),(0,de.__)("Insufficient funds","woocommerce-payments"),(0,de.__)("Product not received","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("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,de.__)("The cardholder claims they did not receive the product.","woocommerce-payments"),(0,de.__)("Product unacceptable","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments"),(0,de.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("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,de.__)("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,de.__)("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,de.__)("The cardholder claims the product was unacceptable.","woocommerce-payments"),(0,de.__)("Subscription canceled","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments"),(0,de.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("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,de.__)("The cardholder claims a subscription was canceled.","woocommerce-payments"),(0,de.__)("Unrecognized","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments"),(0,de.__)("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,de.__)("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,de.__)("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,de.__)("Non-compliant","woocommerce-payments"),(0,de.__)("Your customer’s bank claims this payment violates Visa’s rules.","woocommerce-payments"),(0,de.__)("The customer’s bank claims this transaction doesn’t conform to Visa’s network rules.","woocommerce-payments"),{warning_needs_response:(0,de.__)("Inquiry: Response needed","woocommerce-payments"),warning_under_review:(0,de.__)("Inquiry: Under review","woocommerce-payments"),warning_closed:(0,de.__)("Inquiry: Closed","woocommerce-payments"),needs_response:(0,de.__)("Response needed","woocommerce-payments"),under_review:(0,de.__)("Under review","woocommerce-payments"),charge_refunded:(0,de.__)("Charge refunded","woocommerce-payments"),won:(0,de.__)("Won","woocommerce-payments"),lost:(0,de.__)("Lost","woocommerce-payments")}),tr=(Object.entries(er).map((([e,t])=>({label:t,value:e}))).filter((function(e){return null!=e})),["needs_response","warning_needs_response"]),rr=((0,de.__)("Dispute currency","woocommerce-payments"),(0,de.__)("All currencies","woocommerce-payments"),(0,de.__)("Show","woocommerce-payments"),(0,de.__)("Needs response","woocommerce-payments"),(0,de.__)("All disputes","woocommerce-payments"),(0,de.__)("Advanced filters","woocommerce-payments"),(0,Xt.getSetting)("wcVersion")),or=parseFloat(rr),ar=(or<7.8?(0,de.__)("Disputes match {{select /}} filters","woocommerce-payments"):(0,de.__)("Disputes match <select /> filters","woocommerce-payments"),(0,de.__)("Disputed on date","woocommerce-payments"),(0,de.__)("Remove dispute date filter","woocommerce-payments"),(0,de.__)("Select a dispute date filter match","woocommerce-payments"),or<7.8?(0,de.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,de.__)("<title>Date</title> <rule /> <filter />","woocommerce-payments"),(0,de.__)("Select a dispute date","woocommerce-payments"),(0,de.__)("Before","woocommerce-payments"),(0,de.__)("After","woocommerce-payments"),(0,de.__)("Between","woocommerce-payments"),(0,de.__)("Status","woocommerce-payments"),(0,de.__)("Remove dispute status filter","woocommerce-payments"),(0,de.__)("Select a dispute status filter match","woocommerce-payments"),or<7.8?(0,de.__)("{{title}}Status{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,de.__)("<title>Status</title> <rule /> <filter />","woocommerce-payments"),(0,de.__)("Select a dispute status","woocommerce-payments"),(0,de._x)("Is","dispute status","woocommerce-payments"),(0,de._x)("Is not","dispute status","woocommerce-payments"),e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:Oe(e.dateBefore,!0),date_after:Oe(e.dateAfter),date_between:e.dateBetween&&[Oe(e.dateBetween[0]),Oe(e.dateBetween[1],!0)],search:"awaiting_response"===e.filter?tr:e.search,status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.locale})),nr=`${H}/disputes/download`;function sr(e){return(0,ge.addQueryArgs)(nr,ar(e))}function*ir(e){const t=(0,ge.addQueryArgs)(`${H}/disputes/${e}`);try{const e=yield(0,$.apiFetch)({path:t});yield Qt(e)}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving dispute.","woocommerce-payments")),yield Wt(e,void 0,t)}}function*cr(e){const t=(0,ge.addQueryArgs)(`${H}/disputes`,{page:e.paged,pagesize:e.perPage,sort:(0,G.snakeCase)(e.orderBy),direction:e.order,...ar(e)});try{const r=yield(0,$.apiFetch)({path:t})||{};yield Zt(e,r.data)}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving disputes.","woocommerce-payments"))}}function*dr(e){const t=(0,ge.addQueryArgs)(`${H}/disputes/summary`,{page:e.paged,pagesize:e.perPage,...ar(e)});try{const r=yield(0,$.apiFetch)({path:t});yield Kt(e,r)}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving the summary of disputes.","woocommerce-payments"))}}const ur={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"},_r={isDirty:!1,isSaving:!1,savingError:null,data:{}},pr={},mr=[],lr=e=>e&&e.settings||pr,yr=e=>lr(e).data||pr,hr=e=>yr(e).duplicated_payment_method_ids||pr,Sr=e=>yr(e).is_wcpay_enabled||!1,Er=e=>yr(e).enabled_payment_method_ids||mr,gr=e=>yr(e).available_payment_method_ids||mr,Tr=e=>yr(e).payment_method_statuses||pr,Rr=e=>lr(e).isSaving||!1,wr=e=>lr(e).isDirty||!1,fr=e=>yr(e).account_statement_descriptor||"",Or=e=>yr(e).account_statement_descriptor_kanji||"",vr=e=>yr(e).account_statement_descriptor_kana||"",br=e=>yr(e).account_business_support_email||"",Ir=e=>yr(e).account_business_support_phone||"",Ar=e=>yr(e).account_domestic_currency||"",Nr=e=>yr(e).deposit_schedule_interval||"",Cr=e=>yr(e).deposit_schedule_weekly_anchor||"",Pr=e=>yr(e).deposit_schedule_monthly_anchor||"",Dr=e=>yr(e).deposit_delay_days||"7",Fr=e=>yr(e).deposit_completed_waiting_period||!1,Mr=e=>yr(e).deposit_status||"",Ur=e=>yr(e).deposit_restrictions||"",Lr=e=>yr(e).is_manual_capture_enabled||!1,jr=e=>yr(e).is_test_mode_enabled||!1,xr=e=>yr(e).is_test_mode_onboarding||!1,Yr=e=>yr(e).is_dev_mode_enabled||!1,kr=e=>yr(e).is_payment_request_enabled||!1,qr=e=>yr(e).is_apple_google_pay_in_payment_methods_options_enabled||!1,zr=e=>yr(e).is_debug_log_enabled||!1,Br=e=>yr(e).is_multi_currency_enabled||!1,$r=e=>yr(e).payment_request_enabled_locations||mr,Hr=e=>yr(e).payment_request_button_type||"",Vr=e=>yr(e).payment_request_button_size||"",Gr=e=>yr(e).payment_request_button_theme||"",Qr=e=>{const t=yr(e)?.payment_request_button_border_radius;return 0===t||"0"===t||t?t:"undefined"==typeof wcpaySettings?4:parseInt(window?.wcpaySettings?.defaultExpressCheckoutBorderRadius||4,10)},Wr=e=>yr(e).is_saved_cards_enabled||!1,Zr=e=>lr(e).savingError,Kr=e=>yr(e).is_card_present_eligible||!1,Jr=e=>yr(e).is_wcpay_subscriptions_enabled||!1,Xr=e=>yr(e).is_wcpay_subscriptions_eligible||!1,eo=e=>yr(e).is_subscriptions_plugin_active||!1,to=e=>yr(e).is_woopay_enabled||!1,ro=e=>yr(e).is_woopay_global_theme_support_enabled||!1,oo=e=>yr(e).woopay_custom_message||"",ao=e=>yr(e).woopay_store_logo||"",no=e=>yr(e).woopay_enabled_locations||mr,so=e=>yr(e).current_protection_level||"basic",io=e=>yr(e).advanced_fraud_protection_settings||mr,co=e=>yr(e).show_woopay_incompatibility_notice||!1,uo=e=>yr(e).is_stripe_billing_enabled||!1,_o=e=>yr(e).is_migrating_stripe_billing||!1,po=e=>yr(e).stripe_billing_subscription_count||0,mo=e=>yr(e).stripe_billing_migrated_count||0,lo=window.wp.apiFetch;var yo=r.n(lo);function ho(e){return{type:ur.SET_SETTINGS_VALUES,payload:e}}function So(e){return ho({is_saved_cards_enabled:e})}function Eo(e){return ho({is_card_present_eligible:e})}function go(e){return ho({payment_request_button_type:e})}function To(e){return ho({payment_request_button_size:e})}function Ro(e){return ho({payment_request_button_theme:e})}function wo(e){return ho({payment_request_button_border_radius:e})}function fo(e){return{type:ur.SET_SETTINGS,data:e}}function Oo(e){return ho({is_wcpay_enabled:e})}function vo(e){return ho({is_payment_request_enabled:e})}function bo(e){return ho({is_apple_google_pay_in_payment_methods_options_enabled:e})}function Io(e){return ho({enabled_payment_method_ids:[...e]})}function Ao(e,t){return{type:ur.SET_IS_SAVING_SETTINGS,isSaving:e,error:t}}function No(e){return{type:ur.SET_SELECTED_PAYMENT_METHOD,id:e}}function Co(e){return{type:ur.SET_UNSELECTED_PAYMENT_METHOD,id:e}}function Po(e){return ho({is_manual_capture_enabled:e})}function Do(e){return ho({is_test_mode_enabled:e})}function Fo(e){return ho({is_debug_log_enabled:e})}function Mo(e){return ho({is_multi_currency_enabled:e})}function Uo(e){return ho({is_wcpay_subscriptions_enabled:e})}function Lo(e){return ho({account_statement_descriptor:e})}function jo(e){return ho({account_statement_descriptor_kanji:e})}function xo(e){return ho({account_statement_descriptor_kana:e})}function Yo(e){return ho({account_business_support_email:e})}function ko(e){return ho({account_business_support_phone:e})}function qo(e){return ho({deposit_schedule_interval:e})}function zo(e){return ho({deposit_schedule_weekly_anchor:e})}function Bo(e){return ho({deposit_schedule_monthly_anchor:""===e?null:parseInt(e,10)})}function*$o(){let e=null;try{const e=(0,B.select)(V).getSettings();yield Ao(!0,null);const t=yield(0,$.apiFetch)({path:`${H}/settings`,method:"post",data:e});yield ho({payment_method_statuses:t.data.payment_method_statuses}),yield(0,B.dispatch)("core/notices").createSuccessNotice((0,de.__)("Settings saved.","woocommerce-payments"))}catch(t){e=t,yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error saving settings.","woocommerce-payments")),e.server_error&&(yield(0,B.dispatch)("core/notices").createErrorNotice(e.server_error))}finally{yield Ao(!1,e)}return null===e}function Ho(e){return ho({payment_request_enabled_locations:[...e]})}function Vo(e){return ho({is_woopay_enabled:e})}function Go(e){return ho({is_woopay_global_theme_support_enabled:e})}function Qo(e){return ho({woopay_custom_message:e})}function Wo(e){return ho({woopay_store_logo:e})}function Zo(e){return ho({woopay_enabled_locations:[...e]})}function Ko(e){return ho({current_protection_level:e})}function Jo(e){return ho({advanced_fraud_protection_settings:e})}function Xo(e){return ho({is_stripe_billing_enabled:e})}function*ea(){try{yield(0,B.dispatch)(V).startResolution("scheduleStripeBillingMigration"),yield(0,$.apiFetch)({path:`${H}/settings/schedule-stripe-billing-migration`,method:"post"})}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error starting the Stripe Billing migration.","woocommerce-payments"))}yield(0,B.dispatch)(V).finishResolution("scheduleStripeBillingMigration")}function ta(e,t){yo()({path:`${H}/settings/${e}`,method:"post",data:{value:t}}).catch((()=>{(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error saving option","woocommerce-payments"))}))}function*ra(){const e=`${H}/settings`;try{const t=yield(0,$.apiFetch)({path:e});yield fo(t)}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving settings.","woocommerce-payments"))}}const oa={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"},aa=(e,t)=>e.readers[t]&&e.readers[t].data?e.readers[t].data:{},na=(e,t)=>e.readers[t]&&e.readers[t].error?e.readers[t].error:{},sa=e=>e.readers&&e.readers.list?e.readers.list:{};function ia(e,t){return{type:oa.SET_CARD_READER_STATS,id:e,data:t}}function ca(e,t){return{type:oa.SET_READERS,query:e,data:t}}function da(e,t,r){return{type:oa.SET_CARD_ERROR_FOR_READER_STATS,id:e,data:t,error:r}}function ua(e,t){return{type:oa.SET_CARD_ERROR_FOR_READERS,data:e,error:t}}function*_a(e,t){try{const r=yield(0,$.apiFetch)({path:`${H}/readers/charges/${t}`});yield ia(e,r)}catch(t){yield da(e,null,t)}}function*pa(e){const t=(0,ge.addQueryArgs)(`${H}/readers`,{limit:e.limit});try{const r=yield(0,$.apiFetch)({path:t})||{};yield ca(e,r)}catch(e){yield ua(null,e)}}var ma;!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"}(ma||(ma={}));const la=ma,ya={},ha=e=>e&&e.capital||{},Sa=e=>ha(e).summary,Ea=e=>ha(e).summaryError,ga=e=>ha(e).loans||[],Ta=e=>ha(e).loansError;function Ra(e){return{type:la.SET_ACTIVE_LOAN_SUMMARY,data:e}}function wa(e){return{type:la.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY,error:e}}function fa(e){return{type:la.SET_LOANS,data:e.data}}function Oa(e){return{type:la.SET_ERROR_FOR_LOANS,error:e}}function*va(){const e=`${H}/capital/active_loan_summary`;try{const t=yield(0,$.apiFetch)({path:e});yield Ra(t)}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield wa(e)}}function*ba(){const e=`${H}/capital/loans`;try{const t=yield(0,$.apiFetch)({path:e});yield fa(t)}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield Oa(e)}}const Ia={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"},Aa={summary:{}},Na=e=>e&&e.documents||{},Ca=(e,t)=>{const r=W(t);return Na(e)[r]||{}},Pa=(e,t)=>Ca(e,t).data||[],Da=(e,t)=>Ca(e,t).error||{},Fa=(e,t)=>{const r=W(t);return Na(e).summary[r]||{}},Ma=(e,t)=>Fa(e,t).data||{},Ua=(e,t)=>Fa(e,t).error||{};function La(e,t){return{type:Ia.SET_DOCUMENTS,query:e,data:t}}function ja(e,t,r){return{type:Ia.SET_ERROR_FOR_DOCUMENTS,query:e,data:t,error:r}}function xa(e,t){return{type:Ia.SET_DOCUMENTS_SUMMARY,query:e,data:t}}function Ya(e,t,r){return{type:Ia.SET_ERROR_FOR_DOCUMENTS_SUMMARY,query:e,data:t,error:r}}const ka=e=>({user_email:e.userEmail,match:e.match,date_before:Oe(e.dateBefore,!0),date_after:Oe(e.dateAfter),date_between:e.dateBetween&&[Oe(e.dateBetween[0]),Oe(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot});function*qa(e){const t=(0,ge.addQueryArgs)(`${H}/documents`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...ka(e)});try{const r=yield(0,$.apiFetch)({path:t});yield La(e,r.data||[])}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving documents.","woocommerce-payments")),yield ja(e,null,t)}}function*za(e){const t=(0,ge.addQueryArgs)(`${H}/documents/summary`,ka(e));try{const r=yield(0,$.apiFetch)({path:t});yield xa(e,r)}catch(t){yield Ya(e,null,t)}}const Ba={},$a=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},Ha=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}},Va={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"},Ga={summary:{},byId:{},isRequesting:!1},Qa=e=>e&&e.authorizations||{},Wa=(e,t)=>{const r=W(t);return Qa(e)[r]||{}},Za=(e,t)=>Wa(e,t).data||[],Ka=(e,t)=>(Qa(e).byId||{})[t],Ja=(e,t)=>Wa(e,t).error||{},Xa=(e,t)=>{const r=W(t);return Qa(e).summary[r]||{}},en=(e,t)=>Xa(e,t).data||{},tn=(e,t)=>Xa(e,t).error||{},rn=e=>Qa(e).isRequesting,on=e=>{var t;const r={wcpay_missing_order:(0,de.__)("The order could not be found.","woocommerce-payments"),wcpay_refunded_order_uncapturable:(0,de.__)("Payment cannot be processed for partially or fully refunded orders.","woocommerce-payments"),wcpay_intent_order_mismatch:(0,de.__)("The payment cannot be processed due to a mismatch with order details.","woocommerce-payments"),wcpay_payment_uncapturable:(0,de.__)("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,o,a;if(!(null===(r=null===(t=e.data)||void 0===t?void 0:t.extra_details)||void 0===r?void 0:r.minimum_amount)||!(null===(a=null===(o=e.data)||void 0===o?void 0:o.extra_details)||void 0===a?void 0:a.minimum_amount_currency))return(0,de.__)("The payment amount is too small to be processed.","woocommerce-payments");const n=e.data.extra_details.minimum_amount_currency,s=he(e.data.extra_details.minimum_amount,n);return(0,de.sprintf)((0,de.__)("The minimum amount that can be processed is %1$s %2$s.","woocommerce-payments"),s,n.toUpperCase())})(e):(0,de.__)("The payment capture failed to complete.","woocommerce-payments")},wcpay_cancel_error:(0,de.__)("The payment cancellation failed to complete.","woocommerce-payments"),wcpay_server_error:(0,de.__)("An unexpected error occurred. Please try again later.","woocommerce-payments")},o=r[null!==(t=e.code)&&void 0!==t?t:""];return"function"==typeof o?o(e):null!=o?o:(0,de.__)("Unable to process the payment. Please try again later.","woocommerce-payments")};function an(e,t){return{type:Va.SET_AUTHORIZATIONS,data:t,query:e}}function nn(e,t){return{type:Va.SET_ERROR_FOR_AUTHORIZATIONS,query:e,error:t}}function sn(e){return{type:Va.SET_AUTHORIZATION,data:e}}function cn(e,t){return{type:Va.SET_AUTHORIZATIONS_SUMMARY,data:t,query:e}}function dn(e){return{type:Va.SET_IS_REQUESTING_AUTHORIZATION,data:e}}function*un(e,t){try{yield B.controls.dispatch(V,"startResolution","getAuthorization",[e]),yield B.controls.dispatch(V,"setIsRequestingAuthorization",!0);const r=yield(0,$.apiFetch)({path:`/wc/v3/payments/orders/${t}/capture_authorization`,method:"post",data:{payment_intent_id:e}}),o={payment_intent_id:r.id,captured:"succeeded"===r.status};yield sn(o),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getAuthorizations"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getTimeline"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getTransactions"),yield B.controls.dispatch("core/notices","createSuccessNotice",(0,de.sprintf)((0,de.__)("Payment for order #%s captured successfully.","woocommerce-payments"),t))}catch(e){const r=(0,de.sprintf)((0,de.__)("There has been an error capturing the payment for order #%s.","woocommerce-payments"),t),o=on(e);yield B.controls.dispatch("core/notices","createErrorNotice",`${r} ${o}`)}finally{yield B.controls.dispatch(V,"finishResolution","getAuthorization",[e]),yield B.controls.dispatch(V,"setIsRequestingAuthorization",!1)}}function*_n(e,t){try{yield B.controls.dispatch(V,"startResolution","getAuthorization",[e]),yield B.controls.dispatch(V,"setIsRequestingAuthorization",!0);const r=yield(0,$.apiFetch)({path:`/wc/v3/payments/orders/${t}/cancel_authorization`,method:"post",data:{payment_intent_id:e}}),o={payment_intent_id:r.id,captured:"succeeded"===r.status};yield sn(o),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getAuthorizations"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getTimeline"),yield B.controls.dispatch(V,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield B.controls.dispatch("core/notices","createSuccessNotice",(0,de.sprintf)((0,de.__)("Payment for order #%s canceled successfully.","woocommerce-payments"),t))}catch(e){const r=(0,de.sprintf)((0,de.__)("There has been an error canceling the payment for order #%s.","woocommerce-payments"),t),o=on(e);yield B.controls.dispatch("core/notices","createErrorNotice",`${r} ${o}`)}finally{yield B.controls.dispatch(V,"finishResolution","getAuthorization",[e]),yield B.controls.dispatch(V,"setIsRequestingAuthorization",!1)}}function pn(e,t){return{type:Va.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY,query:e,error:t}}function*mn(e){var t;let{paged:r=1,per_page:o=25,orderby:a="created",order:n="asc"}=e;"capture_by"===a&&(a="created");const s=(0,ge.addQueryArgs)(`${H}/authorizations`,{page:r,pagesize:o,sort:a,direction:n});try{const r=yield(0,$.apiFetch)({path:s});yield an(e,null!==(t=r.data)&&void 0!==t?t:[])}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield nn(e,t)}}function*ln(e){try{if(e){const t=yield(0,$.apiFetch)({path:`${H}/authorizations/${e}`}),{is_captured:r,payment_intent_id:o,created:a}=t;yield sn({payment_intent_id:o,captured:r,created:a})}}catch(e){"authorization_missing"!==e.code&&(yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving authorization.","woocommerce-payments")))}}function*yn(e){const t=(0,ge.addQueryArgs)(`${H}/authorizations/summary`,{pagesize:e.per_page,sort:e.orderby,direction:e.order,page:e.paged});try{const r=yield(0,$.apiFetch)({path:t});yield cn(e,null!=r?r:[])}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield pn(e,t)}}var hn;!function(e){e.SET_FILE="SET_FILE",e.SET_ERROR_FOR_FILES="SET_ERROR_FOR_FILES"}(hn||(hn={}));const Sn=hn,En={},gn=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},Tn=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}};function Rn(e,t){return{type:Sn.SET_FILE,id:e,data:t}}function wn(e,t){return{type:Sn.SET_ERROR_FOR_FILES,id:e,error:t}}function*fn(e){try{const t=yield(0,$.apiFetch)({path:`${H}/file/${e}/details`});yield Rn(e,t)}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving file.","woocommerce-payments")),yield wn(e,t)}}var On;!function(e){e.SET_PM_PROMOTIONS="SET_PM_PROMOTIONS",e.SET_ERROR_FOR_PM_PROMOTIONS="SET_ERROR_FOR_PM_PROMOTIONS"}(On||(On={}));const vn={pmPromotions:void 0,pmPromotionsError:void 0},bn=e=>{var t,r;return null!==(r=null===(t=e.pmPromotions)||void 0===t?void 0:t.pmPromotions)&&void 0!==r?r:[]},In=e=>{var t;return null===(t=e.pmPromotions)||void 0===t?void 0:t.pmPromotionsError};function An(e){return function(e){return"object"==typeof e&&null!==e&&"code"in e&&"string"==typeof e.code}(e)?e:{code:"unknown_error"}}function Nn(e){return{type:On.SET_PM_PROMOTIONS,data:e}}function Cn(e){return{type:On.SET_ERROR_FOR_PM_PROMOTIONS,error:e}}function*Pn(e){const t=`${H}/pm-promotions/${e}/activate`;try{yield(0,$.apiFetch)({path:t,method:"POST"}),yield B.controls.dispatch("core/notices","createSuccessNotice",(0,de.__)("Promotion activated successfully!","woocommerce-payments")),yield B.controls.dispatch("wc/payments","invalidateResolution","getPmPromotions",[])}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error activating promotion. Please try again.","woocommerce-payments")),yield B.controls.dispatch("wc/payments","updateErrorForPmPromotions",An(e))}}function*Dn(e){const t=`${H}/pm-promotions/${e}/dismiss`;try{yield(0,$.apiFetch)({path:t,method:"POST"}),yield B.controls.dispatch("core/notices","createSuccessNotice",(0,de.__)("Promotion dismissed.","woocommerce-payments")),yield B.controls.dispatch("wc/payments","invalidateResolution","getPmPromotions",[])}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error dismissing promotion. Please try again.","woocommerce-payments")),yield B.controls.dispatch("wc/payments","updateErrorForPmPromotions",An(e))}}function Fn(e){if("object"!=typeof e||null===e)return!1;const t=e;return"string"==typeof t.id&&"string"==typeof t.promo_id&&"string"==typeof t.payment_method&&"string"==typeof t.payment_method_title&&"string"==typeof t.type&&("spotlight"===t.type||"badge"===t.type)&&"string"==typeof t.title&&"string"==typeof t.description&&"string"==typeof t.cta_label&&"string"==typeof t.tc_url&&"string"==typeof t.tc_label}function*Mn(){const e=`${H}/pm-promotions`;try{const t=yield(0,$.apiFetch)({path:e});if(r=t,!Array.isArray(r)||!r.every(Fn))throw new Error("Invalid promotions data received from API");yield B.controls.dispatch("wc/payments","updatePmPromotions",t)}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving promotions. Please try again later.","woocommerce-payments")),yield B.controls.dispatch("wc/payments","updateErrorForPmPromotions",(t=e,function(e){return"object"==typeof e&&null!==e&&"code"in e}(t)?t:{code:"unknown_error"}))}var t,r}(0,B.registerStore)(V,{reducer:(0,B.combineReducers)({deposits:(e=Z,{type:t,query:r={},data:o=[],error:a})=>{const n=W(r);switch(t){case Q.SET_DEPOSIT:return{...e,byId:{...e.byId,[o.id]:o}};case Q.SET_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,data:o}};case Q.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,error:a}};case Q.SET_DEPOSITS:return{...e,byId:{...e.byId,...(0,G.keyBy)(o,"id")},queries:{...e.queries,[n]:{data:(0,G.map)(o,"id")}}};case Q.SET_DEPOSITS_COUNT:return{...e,count:o};case Q.SET_ERROR_FOR_DEPOSIT_QUERY:return{...e,queries:{...e.queries,[n]:{error:a}}};case Q.SET_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[n]:{data:o}}};case Q.SET_ERROR_FOR_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[n]:{error:a}}};case Q.SET_INSTANT_DEPOSIT:return{...e,instant:{...e.instant,data:o}}}return e},transactions:(e=Be,{type:t,query:r={},data:o=[],error:a,status:n})=>{const s=W(r);switch(t){case ze.SET_TRANSACTIONS:return{...e,[s]:{data:o}};case ze.SET_ERROR_FOR_TRANSACTIONS:return{...e,[s]:{error:a}};case ze.SET_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[s]:{data:o}}};case ze.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[s]:{error:a}}};case ze.SET_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[n]:{...e.fraudProtection?.[n]||{},[s]:{data:o}}}};case ze.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[n]:{...e.fraudProtection?.[n]||{},[s]:{error:a}}}};case ze.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[n]:{...e.fraudProtection?.[n]||{},summary:{...e.fraudProtection?.[n]?.summary||{},[s]:{data:o}}}}};case ze.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[n]:{...e.fraudProtection?.[n]||{},summary:{...e.fraudProtection?.[n]?.summary||{},[s]:{error:a}}}}}}return e},charges:(e={},{type:t,id:r,data:o,error:a})=>{switch(t){case gt.SET_CHARGE:e={...e,[r]:{...e[r],data:o}};break;case gt.SET_ERROR_FOR_CHARGE:e={...e,[r]:{...e[r],error:a}}}return e},timeline:(e={},{type:t,id:r,data:o,error:a})=>{switch(t){case At.SET_TIMELINE:e={...e,[r]:{data:o}};break;case At.SET_ERROR_FOR_TIMELINE:e={...e,[r]:{...e[r],error:a}}}return e},disputes:(e=Ut,{type:t,query:r={},data:o=[],id:a,error:n})=>{const s=W(r);switch(t){case Mt.SET_DISPUTE:return{...e,byId:{...e.byId,[o.id]:o}};case Mt.SET_ERROR_FOR_DISPUTE:e={...e,byId:{...e.byId,[a]:{error:n}}};break;case Mt.SET_DISPUTES:return{...e,cached:{...e.cached,...(0,G.keyBy)(o,"dispute_id")},queries:{...e.queries,[s]:{data:(0,G.map)(o,"dispute_id")}}};case Mt.SET_DISPUTES_SUMMARY:return{...e,summary:{...e.summary,[s]:{data:o}}}}return e},settings:(e=_r,{type:t,...r})=>{switch(t){case ur.SET_SETTINGS:return{...e,data:r.data,isDirty:!1};case ur.SET_SETTINGS_VALUES:return{...e,savingError:null,isDirty:!0,data:{...e.data,...r.payload}};case ur.SET_IS_SAVING_SETTINGS:return{...e,isDirty:!(!r.isSaving&&!r.error)&&e.isDirty,isSaving:r.isSaving,savingError:r.error};case ur.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 ur.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:o,error:a})=>{switch(t){case oa.SET_CARD_READER_STATS:e={...e,[r]:{...e[r],data:o}};break;case oa.SET_ERROR_FOR_CARD_READER_STATS:e={...e,[r]:{...e[r],error:a}};break;case oa.SET_READERS:e={...e,list:o}}return e},capital:(e=ya,t)=>{switch(t.type){case la.SET_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:t.data,summaryError:void 0});case la.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:void 0,summaryError:t.error});case la.SET_LOANS:return Object.assign(Object.assign({},e),{loans:t.data,loansError:void 0});case la.SET_ERROR_FOR_LOANS:return Object.assign(Object.assign({},e),{loans:void 0,loansError:t.error})}return e},documents:(e=Aa,{type:t,query:r={},data:o=[],error:a})=>{const n=W(r);switch(t){case Ia.SET_DOCUMENTS:return{...e,[n]:{data:o}};case Ia.SET_ERROR_FOR_DOCUMENTS:return{...e,[n]:{error:a}};case Ia.SET_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[n]:{data:o}}};case Ia.SET_ERROR_FOR_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[n]:{error:a}}}}return e},paymentIntents:(e=Ba,t)=>{const{type:r,id:o}=t;switch(r){case Bt.SET_PAYMENT_INTENT:return Object.assign(Object.assign({},e),{[o]:Object.assign(Object.assign({},e[o]),{data:t.data})});case Bt.SET_ERROR_FOR_PAYMENT_INTENT:return Object.assign(Object.assign({},e),{[o]:Object.assign(Object.assign({},e[o]),{error:t.error})});default:return e}},authorizations:(e=Ga,t)=>{switch(t.type){case Va.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 Va.SET_AUTHORIZATIONS:{const{data:r,query:o}=t;return Object.assign(Object.assign({},e),{[W(o)]:{data:r}})}case Va.SET_ERROR_FOR_AUTHORIZATIONS:{const{error:r,query:o}=t;return Object.assign(Object.assign({},e),{[W(o)]:{error:r}})}case Va.SET_AUTHORIZATIONS_SUMMARY:{const{data:r,query:o}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[W(o)]:{data:r||{}}})})}case Va.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:{const{query:r,error:o}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[W(r)]:{error:o||""}})})}case Va.SET_IS_REQUESTING_AUTHORIZATION:{const{data:r}=t;return Object.assign(Object.assign({},e),{isRequesting:r})}}return e},files:(e=En,t)=>{const{type:r,id:o}=t;switch(r){case Sn.SET_FILE:return Object.assign(Object.assign({},e),{[o]:Object.assign(Object.assign({},e[o]),{data:t.data})});case Sn.SET_ERROR_FOR_FILES:return Object.assign(Object.assign({},e),{[o]:Object.assign(Object.assign({},e[o]),{error:t.error})});default:return e}},pmPromotions:(e=vn,t)=>{switch(t.type){case On.SET_PM_PROMOTIONS:return Object.assign(Object.assign({},e),{pmPromotions:t.data,pmPromotionsError:void 0});case On.SET_ERROR_FOR_PM_PROMOTIONS:return Object.assign(Object.assign({},e),{pmPromotions:void 0,pmPromotionsError:t.error})}return e}}),actions:{...t,...n,...c,..._,...h,...g,...w,...v,...A,...l,...D,...U,...x},controls:$.controls,selectors:{...e,...a,...i,...u,...m,...E,...R,...O,...I,...C,...P,...M,...j},resolvers:{...o,...s,...d,...p,...S,...T,...f,...b,...N,...y,...F,...L,...Y}});const Un="/wc/v3/payments",Ln="wc/payments/multi-currency",jn={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"},xn={},Yn=e=>e&&e||{},kn=e=>Yn(e).currencies||{},qn=e=>kn(e).available||{},zn=e=>kn(e).enabled||{},Bn=e=>kn(e).default||{},$n=e=>Yn(e).currency_settings||{},Hn=e=>Yn(e).settings||{};function Vn(e){return{type:jn.SET_CURRENCIES,data:e}}function Gn(e){return{type:jn.SET_AVAILABLE_CURRENCIES,data:e}}function Qn(e){return{type:jn.SET_ENABLED_CURRENCIES,data:e}}function Wn(e){return{type:jn.SET_DEFAULT_CURRENCY,data:e}}function Zn(e,t){return{type:jn.SET_CURRENCY_SETTINGS,data:{code:e,data:t}}}function Kn(e){return{type:jn.SET_STORE_SETTINGS,data:e}}function*Jn(e){const t=Object.keys((0,B.select)(Ln).getEnabledCurrencies()),r=e.filter((e=>!t.includes(e))),o=t.filter((t=>!e.includes(t)));try{const t=yield(0,$.apiFetch)({path:`${Un}/multi-currency/update-enabled-currencies`,method:"POST",data:{enabled:e}});yield Vn(t),yield(0,B.dispatch)("core/notices").createSuccessNotice((0,de.__)("Enabled currencies updated.","woocommerce-payments")),pe("wcpay_multi_currency_enabled_currencies_updated",{added_currencies:r,removed_currencies:o})}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error updating enabled currencies.","woocommerce-payments"))}}function*Xn(e,t){try{const r=yield(0,$.apiFetch)({path:`${Un}/multi-currency/currencies/${e}`,method:"POST",data:t});yield Zn(e,r),yield(0,B.dispatch)("core/notices").createSuccessNotice((0,de.__)("Currency settings updated.","woocommerce-payments"))}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error updating currency settings.","woocommerce-payments"))}}function*es(e,t,r=!1){try{const o=yield(0,$.apiFetch)({path:`${Un}/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 Kn(o),r)return;yield(0,B.dispatch)("core/notices").createSuccessNotice((0,de.__)("Store settings saved.","woocommerce-payments"))}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error saving store settings.","woocommerce-payments"))}}function ts(e,t){yo()({path:`${Un}/settings/${e}`,method:"post",data:{value:t}}).catch((()=>{(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error saving option","woocommerce-payments"))}))}function*rs(){const e=`${Un}/multi-currency/currencies`;try{const t=yield(0,$.apiFetch)({path:e});yield Vn(t)}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving currencies.","woocommerce-payments"))}}function*os(e){const t=`${Un}/multi-currency/currencies/${e}`;try{const r=yield(0,$.apiFetch)({path:t});yield Zn(e,r)}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving single currency settings.","woocommerce-payments"))}}function*as(){const e=`${Un}/multi-currency/get-settings`;try{const t=yield(0,$.apiFetch)({path:e});yield Kn(t)}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving store settings.","woocommerce-payments"))}}(0,B.registerStore)(Ln,{reducer:(e=xn,{type:t,data:r=[]})=>{switch(t){case jn.SET_CURRENCIES:return{...e,currencies:r,available:r.available,enabled:r.enabled,default:r.default};case jn.SET_AVAILABLE_CURRENCIES:return{...e,currencies:{...e,available:r.available},available:r.available};case jn.SET_ENABLED_CURRENCIES:return{...e,currencies:{...e,enabled:r.enabled},enabled:r.enabled};case jn.SET_DEFAULT_CURRENCY:return{...e,currencies:{...e,default:r.default},default:r.default};case jn.SET_CURRENCY_SETTINGS:return{...e,currency_settings:{...e.currency_settings,[r.code]:r.data}};case jn.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:{...q},controls:$.controls,selectors:{...k},resolvers:{...z}});const ns=window.wp.components,ss=window.wp.blocks,is=window.wp.blockEditor;var cs=r(4848);(0,ss.registerBlockType)("woocommerce-payments/multi-currency-switcher",{apiVersion:3,title:(0,de.__)("Currency Switcher Block","woocommerce-payments"),description:(0,de.__)("Let your customers switch between your enabled currencies","woocommerce-payments"),icon:(0,cs.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",baseProfile:"tiny-ps",viewBox:"0 0 24 24",children:[(0,cs.jsx)("path",{d:"M13.5 8.1h.86c.34 1.81 1.54 2.9 3.2 2.9 1.58 0 2.64-.89 2.94-2.29h-1.11c-.23.72-.86 1.21-1.82 1.21-1 0-1.77-.67-2.06-1.82h2.78v-.65H15.4L15.38 7l.02-.46h2.89v-.65h-2.78c.3-1.13 1.06-1.81 2.05-1.81.94 0 1.63.59 1.84 1.38h1.1A2.86 2.86 0 0017.56 3c-1.65 0-2.85 1.09-3.19 2.89h-.87v.65h.78l-.02.46.02.45h-.78v.65zm-9 8.57v.78h1.8c.07.24.12.49.12.73 0 .87-.79 1.64-1.9 1.84V21h6.98v-1.01H6.57v-.07c.7-.33 1.25-.95 1.25-1.79 0-.23-.04-.45-.1-.68h2.72v-.78H7.43a3.6 3.6 0 01-.35-1.33c0-.83.77-1.33 2.12-1.33.74 0 1.51.13 1.85.29v-1.01A5.9 5.9 0 009.06 13c-2.15 0-3.44.87-3.44 2.28 0 .48.18.94.37 1.39H4.5z",className:"prefix__shp0"}),(0,cs.jsx)("path",{fillRule:"evenodd",d:"M7.63 10.22c-1.72-.09-3.08-.75-3.13-1.85h1.41c.13.54.64.93 1.72 1.01V7.37l-.26-.05c-1.73-.27-2.66-.8-2.66-1.73 0-1.04 1.22-1.72 2.92-1.8V3h.8v.79c1.69.09 2.91.78 2.96 1.82H9.98c-.08-.57-.69-.91-1.55-.99v1.93l.31.05c1.79.28 2.76.78 2.76 1.77 0 1.13-1.35 1.77-3.07 1.85V11h-.8v-.78zm0-3.8v-1.8c-.98.08-1.48.47-1.48.89 0 .42.4.73 1.48.91zm.8 1.07v1.9c1.15-.07 1.64-.44 1.64-.93 0-.48-.39-.76-1.64-.97z",className:"prefix__shp0"}),(0,cs.jsx)("path",{d:"M17.63 21v-1.61h1.97v-.67h-1.97v-.87h1.97v-.67h-1.63L20.5 13h-1.4l-2.07 3.63h-.05L14.92 13H13.5l2.53 4.18H14.4v.67h1.97v.87H14.4v.67h1.97V21h1.26z",opacity:.8})]}),category:"widgets",attributes:{symbol:{type:"boolean",default:!0},flag:{type:"boolean",default:!1},fontSize:{type:"integer",default:14},fontLineHeight:{type:"float",default:1.5},fontColor:{type:"string",default:"#000000"},border:{type:"boolean",default:!0},borderRadius:{type:"integer",default:3},borderColor:{type:"string",default:"#000000"},backgroundColor:{type:"string",default:"transparent"}},edit:e=>{const{attributes:{symbol:t,flag:r,fontSize:o,fontLineHeight:a,fontColor:n,border:s,borderRadius:i,borderColor:c,backgroundColor:d},setAttributes:u}=e,{isLoading:_}=(0,B.useSelect)((e=>{const{getCurrencies:t,isResolving:r}=e(Ln);return{currencies:t(),isLoading:r("getCurrencies",[])}}),[]),{enabledCurrencies:p}=(()=>{const e=(0,B.useSelect)((e=>{const{getEnabledCurrencies:t}=e(Ln);return t()})),{submitEnabledCurrenciesUpdate:t}=(0,B.useDispatch)(Ln);return{enabledCurrencies:e,submitEnabledCurrenciesUpdate:t}})(),m=p?Object.keys(p):[],l={div:{lineHeight:a},select:{fontSize:o,color:n,backgroundColor:d,borderWidth:s?"1px":"0px",borderColor:c,borderRadius:i}},y=(0,is.useBlockProps)(),h=!window._wpemojiSettings||window._wpemojiSettings.supports?.flag;return(0,cs.jsxs)("div",{...y,children:[(0,cs.jsxs)(is.InspectorControls,{children:[(0,cs.jsx)(ns.PanelBody,{title:(0,de.__)("Multi-Currency settings","woocommerce-payments"),children:(0,cs.jsx)(ns.ExternalLink,{href:"/wp-admin/admin.php?page=wc-settings&tab=wcpay_multi_currency",children:(0,de.__)("Adjust and edit your Multi-Currency settings","woocommerce-payments")})}),(0,cs.jsxs)(ns.PanelBody,{title:(0,de.__)("Layout","woocommerce-payments"),children:[(0,cs.jsx)(ns.CheckboxControl,{label:(0,de.__)("Display flags","woocommerce-payments"),checked:r,onChange:e=>{u({flag:e})},__nextHasNoMarginBottom:!0}),(0,cs.jsx)(ns.CheckboxControl,{label:(0,de.__)("Display currency symbols","woocommerce-payments"),checked:t,onChange:e=>{u({symbol:e})},__nextHasNoMarginBottom:!0}),(0,cs.jsx)(ns.CheckboxControl,{label:(0,de.__)("Border","woocommerce-payments"),checked:s,onChange:e=>{u({border:void 0!==e&&e})},__nextHasNoMarginBottom:!0}),(0,cs.jsx)(ns.RangeControl,{label:(0,de.__)("Border radius","woocommerce-payments"),value:i,onChange:e=>{u({borderRadius:void 0===e?3:e})},min:1,max:20,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,cs.jsxs)(ns.PanelBody,{title:(0,de.__)("Typography","woocommerce-payments"),children:[(0,cs.jsx)(ns.RangeControl,{label:(0,de.__)("Size","woocommerce-payments"),value:o,onChange:e=>{u({fontSize:void 0===e?11:e})},min:6,max:48,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,cs.jsx)(ns.RangeControl,{label:(0,de.__)("Line height","woocommerce-payments"),value:a,onChange:e=>{u({fontLineHeight:void 0===e?"normal":e})},min:1,max:3,step:.1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,cs.jsxs)(ns.PanelBody,{title:(0,de.__)("Color settings","woocommerce-payments"),children:[(0,cs.jsx)(is.ColorPaletteControl,{onChange:e=>{u({fontColor:void 0===e?"#000000":e})},value:n,label:(0,de.__)("Text","woocommerce-payments")}),(0,cs.jsx)(is.ColorPaletteControl,{onChange:e=>{u({backgroundColor:void 0===e?"transparent":e})},value:d,label:(0,de.__)("Background","woocommerce-payments")}),(0,cs.jsx)(is.ColorPaletteControl,{onChange:e=>{u({borderColor:void 0===e?"#000000":e})},value:c,label:(0,de.__)("Border","woocommerce-payments")})]})]},"setting"),(0,cs.jsx)("div",{className:"currency-switcher-holder",style:l.div,children:(0,cs.jsxs)("select",{name:"currency",disabled:_,style:l.select,children:[_&&(0,cs.jsx)("option",{children:(0,de.__)("Loading…","woocommerce-payments")}),!_&&p&&m.map((e=>(0,cs.jsxs)("option",{value:p[e].code,children:[h&&r?p[e].flag+" ":"",t&&p[e].symbol!==p[e].code?p[e].symbol+" ":"",p[e].code]},p[e].id)))]})})]})},save:()=>null})})()})();