Файловый менеджер - Редактировать - /home/bean7936/perfect-community.com/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:()=>Fe,updateAllDepositsOverviews:()=>be,updateDeposit:()=>ve,updateDeposits:()=>Ae,updateDepositsCount:()=>Ne,updateDepositsSummary:()=>Pe,updateErrorForAllDepositsOverviews:()=>Ie,updateErrorForDepositQuery:()=>Ce,updateErrorForDepositsSummary:()=>De,updateInstantDeposit:()=>Me});var o={};r.r(o),r.d(o,{getAllDepositsOverviews:()=>Le,getDeposit:()=>Ue,getDeposits:()=>Ye,getDepositsSummary:()=>ze,getPayoutsCSVRequestURL:()=>je,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:()=>Mt});var m={};r.r(m),r.d(m,{getCachedDispute:()=>jt,getDispute:()=>kt,getDisputeError:()=>xt,getDisputes:()=>Yt,getDisputesSummary:()=>zt});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,getAccountCommunicationsEmail:()=>mo,getAccountDomesticCurrency:()=>Ar,getAccountStatementDescriptor:()=>fr,getAccountStatementDescriptorKana:()=>vr,getAccountStatementDescriptorKanji:()=>Or,getAdvancedFraudProtectionSettings:()=>so,getAvailablePaymentMethodIds:()=>gr,getCompletedWaitingPeriod:()=>Mr,getCurrentProtectionLevel:()=>no,getDepositDelayDays:()=>Dr,getDepositRestrictions:()=>Ur,getDepositScheduleInterval:()=>Nr,getDepositScheduleMonthlyAnchor:()=>Pr,getDepositScheduleWeeklyAnchor:()=>Cr,getDepositStatus:()=>Fr,getDuplicatedPaymentMethodIds:()=>hr,getEnabledPaymentMethodIds:()=>Er,getExpressCheckoutCartMethods:()=>yo,getExpressCheckoutCheckoutMethods:()=>ho,getExpressCheckoutProductMethods:()=>lo,getIsAmazonPayEnabled:()=>to,getIsAppleGooglePayInPaymentMethodsOptionsEnabled:()=>zr,getIsCardPresentEligible:()=>Zr,getIsDebugLogEnabled:()=>qr,getIsDevModeEnabled:()=>jr,getIsManualCaptureEnabled:()=>Lr,getIsMultiCurrencyEnabled:()=>Br,getIsPaymentRequestEnabled:()=>Yr,getIsSavedCardsEnabled:()=>Qr,getIsStripeBillingEnabled:()=>co,getIsStripeBillingMigrationInProgress:()=>uo,getIsSubscriptionsPluginActive:()=>Xr,getIsTestModeEnabled:()=>kr,getIsTestModeOnboarding:()=>xr,getIsWCPayEnabled:()=>Sr,getIsWCPaySubscriptionsEligible:()=>Jr,getIsWCPaySubscriptionsEnabled:()=>Kr,getIsWooPayEnabled:()=>eo,getIsWooPayGlobalThemeSupportEnabled:()=>ro,getPaymentMethodStatuses:()=>Tr,getPaymentRequestButtonBorderRadius:()=>Gr,getPaymentRequestButtonSize:()=>Hr,getPaymentRequestButtonTheme:()=>Vr,getPaymentRequestButtonType:()=>$r,getSavingError:()=>Wr,getSettings:()=>yr,getShowWooPayIncompatibilityNotice:()=>io,getStripeBillingMigratedCount:()=>po,getStripeBillingSubscriptionCount:()=>_o,getWooPayCustomMessage:()=>oo,getWooPayStoreLogo:()=>ao,isDirty:()=>wr,isSavingSettings:()=>Rr});var g={};r.r(g),r.d(g,{saveOption:()=>ia,saveSettings:()=>Go,submitStripeBillingSubscriptionMigration:()=>sa,updateAccountBusinessSupportEmail:()=>qo,updateAccountBusinessSupportPhone:()=>Bo,updateAccountCommunicationsEmail:()=>ra,updateAccountStatementDescriptor:()=>jo,updateAccountStatementDescriptorKana:()=>zo,updateAccountStatementDescriptorKanji:()=>Yo,updateAdvancedFraudProtectionSettings:()=>ea,updateDepositScheduleInterval:()=>$o,updateDepositScheduleMonthlyAnchor:()=>Vo,updateDepositScheduleWeeklyAnchor:()=>Ho,updateEnabledPaymentMethodIds:()=>Co,updateExpressCheckoutCartMethods:()=>aa,updateExpressCheckoutCheckoutMethods:()=>na,updateExpressCheckoutProductMethods:()=>oa,updateIsAmazonPayEnabled:()=>Wo,updateIsAppleGooglePayInPaymentMethodsOptionsEnabled:()=>No,updateIsCardPresentEligible:()=>Ro,updateIsDebugLogEnabled:()=>Lo,updateIsManualCaptureEnabled:()=>Fo,updateIsMultiCurrencyEnabled:()=>ko,updateIsPaymentRequestEnabled:()=>Ao,updateIsSavedCardsEnabled:()=>To,updateIsSavingSettings:()=>Po,updateIsStripeBillingEnabled:()=>ta,updateIsTestModeEnabled:()=>Uo,updateIsWCPayEnabled:()=>Io,updateIsWCPaySubscriptionsEnabled:()=>xo,updateIsWooPayEnabled:()=>Qo,updateIsWooPayGlobalThemeSupportEnabled:()=>Zo,updatePaymentRequestButtonBorderRadius:()=>vo,updatePaymentRequestButtonSize:()=>fo,updatePaymentRequestButtonTheme:()=>Oo,updatePaymentRequestButtonType:()=>wo,updateProtectionLevel:()=>Xo,updateSelectedPaymentMethod:()=>Do,updateSettings:()=>bo,updateUnselectedPaymentMethod:()=>Mo,updateWooPayCustomMessage:()=>Ko,updateWooPayStoreLogo:()=>Jo});var T={};r.r(T),r.d(T,{getSettings:()=>ca});var R={};r.r(R),r.d(R,{getCardReaderStats:()=>_a,getCardReaderStatsError:()=>pa,getCardReaders:()=>ma});var w={};r.r(w),r.d(w,{updateCardReaderStats:()=>la,updateCardReaders:()=>ya,updateErrorForCardReaderStats:()=>ha,updateErrorForCardReaders:()=>Sa});var f={};r.r(f),r.d(f,{getCardReaderStats:()=>Ea,getCardReaders:()=>ga});var O={};r.r(O),r.d(O,{getActiveLoanSummary:()=>Oa,getActiveLoanSummaryError:()=>va,getLoans:()=>ba,getLoansError:()=>Ia});var v={};r.r(v),r.d(v,{updateActiveLoanSummary:()=>Aa,updateErrorForActiveLoanSummary:()=>Na,updateErrorForLoans:()=>Pa,updateLoans:()=>Ca});var b={};r.r(b),r.d(b,{getActiveLoanSummary:()=>Da,getLoans:()=>Ma});var I={};r.r(I),r.d(I,{getDocuments:()=>xa,getDocumentsError:()=>ja,getDocumentsSummary:()=>za,getDocumentsSummaryError:()=>qa});var A={};r.r(A),r.d(A,{updateDocuments:()=>Ba,updateDocumentsSummary:()=>Ha,updateErrorForDocuments:()=>$a,updateErrorForDocumentsSummary:()=>Va});var N={};r.r(N),r.d(N,{formatQueryFilters:()=>Ga,getDocuments:()=>Qa,getDocumentsSummary:()=>Wa});var C={};r.r(C),r.d(C,{getPaymentIntent:()=>Ka,getPaymentIntentError:()=>Ja});var P={};r.r(P),r.d(P,{getAuthorization:()=>an,getAuthorizations:()=>on,getAuthorizationsError:()=>nn,getAuthorizationsSummary:()=>cn,getAuthorizationsSummaryError:()=>dn,getIsRequesting:()=>un});var D={};r.r(D),r.d(D,{setIsRequestingAuthorization:()=>hn,submitCancelAuthorization:()=>En,submitCaptureAuthorization:()=>Sn,updateAuthorization:()=>ln,updateAuthorizations:()=>pn,updateAuthorizationsSummary:()=>yn,updateErrorForAuthorizations:()=>mn,updateErrorForAuthorizationsSummary:()=>gn});var M={};r.r(M),r.d(M,{getAuthorization:()=>Rn,getAuthorizations:()=>Tn,getAuthorizationsSummary:()=>wn});var F={};r.r(F),r.d(F,{getFile:()=>bn,getFileError:()=>In});var U={};r.r(U),r.d(U,{updateErrorForFiles:()=>Nn,updateFiles:()=>An});var L={};r.r(L),r.d(L,{getFile:()=>Cn});var k={};r.r(k),r.d(k,{getPmPromotions:()=>Mn,getPmPromotionsError:()=>Fn});var x={};r.r(x),r.d(x,{activatePmPromotion:()=>xn,dismissPmPromotion:()=>jn,updateErrorForPmPromotions:()=>kn,updatePmPromotions:()=>Ln});var j={};r.r(j),r.d(j,{getPmPromotions:()=>zn});var Y={};r.r(Y),r.d(Y,{getAvailableCurrencies:()=>Qn,getCurrencies:()=>Gn,getCurrencySettings:()=>Kn,getDefaultCurrency:()=>Zn,getEnabledCurrencies:()=>Wn,getStoreSettings:()=>Jn});var z={};r.r(z),r.d(z,{saveOption:()=>cs,submitCurrencySettings:()=>ss,submitEnabledCurrenciesUpdate:()=>ns,submitStoreSettingsUpdate:()=>is,updateAvailableCurrencies:()=>es,updateCurrencies:()=>Xn,updateCurrencySettings:()=>os,updateDefaultCurrency:()=>rs,updateEnabledCurrencies:()=>ts,updateStoreSettings:()=>as});var q={};r.r(q),r.d(q,{getCurrencies:()=>ds,getCurrencySettings:()=>us,getStoreSettings:()=>_s});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 Me(e){return{type:Q.SET_INSTANT_DEPOSIT,data:e}}function*Fe(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 Me(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 ke=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 je(e){return(0,ge.addQueryArgs)(xe,ke(e))}function*Ye(e){const t=(0,ge.addQueryArgs)(`${H}/deposits`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...ke(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*ze(e){const t=(0,ge.addQueryArgs)(`${H}/deposits/summary`,ke(e));try{const r=yield(0,$.apiFetch)({path:t});yield Pe(e,r)}catch(t){yield De(e,null,t)}}const qe={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:qe.SET_TRANSACTIONS,query:e,data:t}}function at(e,t,r){return{type:qe.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:r}}function nt(e,t){return{type:qe.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function st(e,t,r){return{type:qe.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:r}}function it(e,t,r){return{type:qe.SET_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:r}}function ct(e,t,r){return{type:qe.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:null,error:r}}function dt(e,t,r){return{type:qe.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:r}}function ut(e,t,r){return{type:qe.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*Mt(e){try{const t=yield(0,$.apiFetch)({path:`${H}/timeline/${e}`});yield Pt(e,t.data)}catch(t){yield Dt(e,t)}}const Ft={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||{},kt=(e,t)=>(Lt(e).byId||{})[t],xt=(e,t)=>{const r=Lt(e).byId||{};return r[t]?.error},jt=(e,t)=>(Lt(e).cached||{})[t],Yt=(e,t)=>{const r=((e,t)=>{const r=W(t);return(Lt(e).queries||{})[r]||{}})(e,t).data||[];return r.map(jt.bind(void 0,e))},zt=(e,t)=>((e,t)=>{const r=W(t);return(Lt(e).summary||{})[r]||{}})(e,t).data||{};var qt;!function(e){e.SET_PAYMENT_INTENT="SET_PAYMENT_INTENT",e.SET_ERROR_FOR_PAYMENT_INTENT="SET_ERROR_FOR_PAYMENT_INTENT"}(qt||(qt={}));const Bt=qt;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:Ft.SET_DISPUTE,data:e}}function Wt(e,t,r){return{type:Ft.SET_ERROR_FOR_DISPUTE,id:e,data:t,error:r}}function Zt(e,t){return{type:Ft.SET_DISPUTES,query:e,data:t}}function Kt(e,t){return{type:Ft.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.__)("This transaction is being reviewed under Visa’s network compliance 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",Mr=e=>yr(e).deposit_completed_waiting_period||!1,Fr=e=>yr(e).deposit_status||"",Ur=e=>yr(e).deposit_restrictions||"",Lr=e=>yr(e).is_manual_capture_enabled||!1,kr=e=>yr(e).is_test_mode_enabled||!1,xr=e=>yr(e).is_test_mode_onboarding||!1,jr=e=>yr(e).is_dev_mode_enabled||!1,Yr=e=>yr(e).is_payment_request_enabled||!1,zr=e=>yr(e).is_apple_google_pay_in_payment_methods_options_enabled||!1,qr=e=>yr(e).is_debug_log_enabled||!1,Br=e=>yr(e).is_multi_currency_enabled||!1,$r=e=>yr(e).payment_request_button_type||"",Hr=e=>yr(e).payment_request_button_size||"",Vr=e=>yr(e).payment_request_button_theme||"",Gr=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)},Qr=e=>yr(e).is_saved_cards_enabled||!1,Wr=e=>lr(e).savingError,Zr=e=>yr(e).is_card_present_eligible||!1,Kr=e=>yr(e).is_wcpay_subscriptions_enabled||!1,Jr=e=>yr(e).is_wcpay_subscriptions_eligible||!1,Xr=e=>yr(e).is_subscriptions_plugin_active||!1,eo=e=>yr(e).is_woopay_enabled||!1,to=e=>yr(e).is_amazon_pay_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).current_protection_level||"basic",so=e=>yr(e).advanced_fraud_protection_settings||mr,io=e=>yr(e).show_woopay_incompatibility_notice||!1,co=e=>yr(e).is_stripe_billing_enabled||!1,uo=e=>yr(e).is_migrating_stripe_billing||!1,_o=e=>yr(e).stripe_billing_subscription_count||0,po=e=>yr(e).stripe_billing_migrated_count||0,mo=e=>yr(e).account_communications_email||"",lo=e=>yr(e).express_checkout_product_methods||mr,yo=e=>yr(e).express_checkout_cart_methods||mr,ho=e=>yr(e).express_checkout_checkout_methods||mr,So=window.wp.apiFetch;var Eo=r.n(So);function go(e){return{type:ur.SET_SETTINGS_VALUES,payload:e}}function To(e){return go({is_saved_cards_enabled:e})}function Ro(e){return go({is_card_present_eligible:e})}function wo(e){return go({payment_request_button_type:e})}function fo(e){return go({payment_request_button_size:e})}function Oo(e){return go({payment_request_button_theme:e})}function vo(e){return go({payment_request_button_border_radius:e})}function bo(e){return{type:ur.SET_SETTINGS,data:e}}function Io(e){return go({is_wcpay_enabled:e})}function Ao(e){return go({is_payment_request_enabled:e})}function No(e){return go({is_apple_google_pay_in_payment_methods_options_enabled:e})}function Co(e){return go({enabled_payment_method_ids:[...e]})}function Po(e,t){return{type:ur.SET_IS_SAVING_SETTINGS,isSaving:e,error:t}}function Do(e){return{type:ur.SET_SELECTED_PAYMENT_METHOD,id:e}}function Mo(e){return{type:ur.SET_UNSELECTED_PAYMENT_METHOD,id:e}}function Fo(e){return go({is_manual_capture_enabled:e})}function Uo(e){return go({is_test_mode_enabled:e})}function Lo(e){return go({is_debug_log_enabled:e})}function ko(e){return go({is_multi_currency_enabled:e})}function xo(e){return go({is_wcpay_subscriptions_enabled:e})}function jo(e){return go({account_statement_descriptor:e})}function Yo(e){return go({account_statement_descriptor_kanji:e})}function zo(e){return go({account_statement_descriptor_kana:e})}function qo(e){return go({account_business_support_email:e})}function Bo(e){return go({account_business_support_phone:e})}function $o(e){return go({deposit_schedule_interval:e})}function Ho(e){return go({deposit_schedule_weekly_anchor:e})}function Vo(e){return go({deposit_schedule_monthly_anchor:""===e?null:parseInt(e,10)})}function*Go(){let e=null;try{const e=(0,B.select)(V).getSettings();yield Po(!0,null);const t=yield(0,$.apiFetch)({path:`${H}/settings`,method:"post",data:e});yield go({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 Po(!1,e)}return null===e}function Qo(e){return go({is_woopay_enabled:e})}function Wo(e){return go({is_amazon_pay_enabled:e})}function Zo(e){return go({is_woopay_global_theme_support_enabled:e})}function Ko(e){return go({woopay_custom_message:e})}function Jo(e){return go({woopay_store_logo:e})}function Xo(e){return go({current_protection_level:e})}function ea(e){return go({advanced_fraud_protection_settings:e})}function ta(e){return go({is_stripe_billing_enabled:e})}function ra(e){return go({account_communications_email:e})}function oa(e){return go({express_checkout_product_methods:[...e]})}function aa(e){return go({express_checkout_cart_methods:[...e]})}function na(e){return go({express_checkout_checkout_methods:[...e]})}function*sa(){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 ia(e,t){return Eo()({path:`${H}/settings/${e}`,method:"post",data:{value:t}}).catch((()=>{(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error saving option","woocommerce-payments"))}))}function*ca(){const e=`${H}/settings`;try{const t=yield(0,$.apiFetch)({path:e});yield bo(t)}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving settings.","woocommerce-payments"))}}const da=e=>()=>{const{updateExpressCheckoutProductMethods:t,updateExpressCheckoutCartMethods:r,updateExpressCheckoutCheckoutMethods:o}=(0,B.useDispatch)(V),a=(0,B.useSelect)((e=>e(V).getExpressCheckoutProductMethods())),n=(0,B.useSelect)((e=>e(V).getExpressCheckoutCartMethods())),s=(0,B.useSelect)((e=>e(V).getExpressCheckoutCheckoutMethods())),i={product:a,cart:n,checkout:s},c={product:t,cart:r,checkout:o};return[[a.includes(e)&&"product",n.includes(e)&&"cart",s.includes(e)&&"checkout"].filter(Boolean),(t,r)=>{c[t](r?[...i[t],e]:i[t].filter((t=>t!==e)))}]},ua=(da("payment_request"),da("woopay"),da("amazon_pay"),{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"}),_a=(e,t)=>e.readers[t]&&e.readers[t].data?e.readers[t].data:{},pa=(e,t)=>e.readers[t]&&e.readers[t].error?e.readers[t].error:{},ma=e=>e.readers&&e.readers.list?e.readers.list:{};function la(e,t){return{type:ua.SET_CARD_READER_STATS,id:e,data:t}}function ya(e,t){return{type:ua.SET_READERS,query:e,data:t}}function ha(e,t,r){return{type:ua.SET_CARD_ERROR_FOR_READER_STATS,id:e,data:t,error:r}}function Sa(e,t){return{type:ua.SET_CARD_ERROR_FOR_READERS,data:e,error:t}}function*Ea(e,t){try{const r=yield(0,$.apiFetch)({path:`${H}/readers/charges/${t}`});yield la(e,r)}catch(t){yield ha(e,null,t)}}function*ga(e){const t=(0,ge.addQueryArgs)(`${H}/readers`,{limit:e.limit});try{const r=yield(0,$.apiFetch)({path:t})||{};yield ya(e,r)}catch(e){yield Sa(null,e)}}var Ta;!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"}(Ta||(Ta={}));const Ra=Ta,wa={},fa=e=>e&&e.capital||{},Oa=e=>fa(e).summary,va=e=>fa(e).summaryError,ba=e=>fa(e).loans||[],Ia=e=>fa(e).loansError;function Aa(e){return{type:Ra.SET_ACTIVE_LOAN_SUMMARY,data:e}}function Na(e){return{type:Ra.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY,error:e}}function Ca(e){return{type:Ra.SET_LOANS,data:e.data}}function Pa(e){return{type:Ra.SET_ERROR_FOR_LOANS,error:e}}function*Da(){const e=`${H}/capital/active_loan_summary`;try{const t=yield(0,$.apiFetch)({path:e});yield Aa(t)}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield Na(e)}}function*Ma(){const e=`${H}/capital/loans`;try{const t=yield(0,$.apiFetch)({path:e});yield Ca(t)}catch(e){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield Pa(e)}}const Fa={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"},Ua={summary:{}},La=e=>e&&e.documents||{},ka=(e,t)=>{const r=W(t);return La(e)[r]||{}},xa=(e,t)=>ka(e,t).data||[],ja=(e,t)=>ka(e,t).error||{},Ya=(e,t)=>{const r=W(t);return La(e).summary[r]||{}},za=(e,t)=>Ya(e,t).data||{},qa=(e,t)=>Ya(e,t).error||{};function Ba(e,t){return{type:Fa.SET_DOCUMENTS,query:e,data:t}}function $a(e,t,r){return{type:Fa.SET_ERROR_FOR_DOCUMENTS,query:e,data:t,error:r}}function Ha(e,t){return{type:Fa.SET_DOCUMENTS_SUMMARY,query:e,data:t}}function Va(e,t,r){return{type:Fa.SET_ERROR_FOR_DOCUMENTS_SUMMARY,query:e,data:t,error:r}}const Ga=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,...Ga(e)});try{const r=yield(0,$.apiFetch)({path:t});yield Ba(e,r.data||[])}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving documents.","woocommerce-payments")),yield $a(e,null,t)}}function*Wa(e){const t=(0,ge.addQueryArgs)(`${H}/documents/summary`,Ga(e));try{const r=yield(0,$.apiFetch)({path:t});yield Ha(e,r)}catch(t){yield Va(e,null,t)}}const Za={},Ka=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},Ja=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}},Xa={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"},en={summary:{},byId:{},isRequesting:!1},tn=e=>e&&e.authorizations||{},rn=(e,t)=>{const r=W(t);return tn(e)[r]||{}},on=(e,t)=>rn(e,t).data||[],an=(e,t)=>(tn(e).byId||{})[t],nn=(e,t)=>rn(e,t).error||{},sn=(e,t)=>{const r=W(t);return tn(e).summary[r]||{}},cn=(e,t)=>sn(e,t).data||{},dn=(e,t)=>sn(e,t).error||{},un=e=>tn(e).isRequesting,_n=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 pn(e,t){return{type:Xa.SET_AUTHORIZATIONS,data:t,query:e}}function mn(e,t){return{type:Xa.SET_ERROR_FOR_AUTHORIZATIONS,query:e,error:t}}function ln(e){return{type:Xa.SET_AUTHORIZATION,data:e}}function yn(e,t){return{type:Xa.SET_AUTHORIZATIONS_SUMMARY,data:t,query:e}}function hn(e){return{type:Xa.SET_IS_REQUESTING_AUTHORIZATION,data:e}}function*Sn(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 ln(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=_n(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*En(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 ln(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=_n(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 gn(e,t){return{type:Xa.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY,query:e,error:t}}function*Tn(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 pn(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 mn(e,t)}}function*Rn(e){try{if(e){const t=yield(0,$.apiFetch)({path:`${H}/authorizations/${e}`}),{is_captured:r,payment_intent_id:o,created:a}=t;yield ln({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*wn(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 yn(e,null!=r?r:[])}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield gn(e,t)}}var fn;!function(e){e.SET_FILE="SET_FILE",e.SET_ERROR_FOR_FILES="SET_ERROR_FOR_FILES"}(fn||(fn={}));const On=fn,vn={},bn=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},In=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}};function An(e,t){return{type:On.SET_FILE,id:e,data:t}}function Nn(e,t){return{type:On.SET_ERROR_FOR_FILES,id:e,error:t}}function*Cn(e){try{const t=yield(0,$.apiFetch)({path:`${H}/file/${e}/details`});yield An(e,t)}catch(t){yield B.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving file.","woocommerce-payments")),yield Nn(e,t)}}var Pn;!function(e){e.SET_PM_PROMOTIONS="SET_PM_PROMOTIONS",e.SET_ERROR_FOR_PM_PROMOTIONS="SET_ERROR_FOR_PM_PROMOTIONS"}(Pn||(Pn={}));const Dn={pmPromotions:void 0,pmPromotionsError:void 0},Mn=e=>{var t,r;return null!==(r=null===(t=e.pmPromotions)||void 0===t?void 0:t.pmPromotions)&&void 0!==r?r:[]},Fn=e=>{var t;return null===(t=e.pmPromotions)||void 0===t?void 0:t.pmPromotionsError};function Un(e){return function(e){return"object"==typeof e&&null!==e&&"code"in e&&"string"==typeof e.code}(e)?e:{code:"unknown_error"}}function Ln(e){return{type:Pn.SET_PM_PROMOTIONS,data:e}}function kn(e){return{type:Pn.SET_ERROR_FOR_PM_PROMOTIONS,error:e}}function*xn(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",Un(e))}}function*jn(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",Un(e))}}function Yn(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*zn(){const e=`${H}/pm-promotions`;try{const t=yield(0,$.apiFetch)({path:e});if(r=t,!Array.isArray(r)||!r.every(Yn))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 qe.SET_TRANSACTIONS:return{...e,[s]:{data:o}};case qe.SET_ERROR_FOR_TRANSACTIONS:return{...e,[s]:{error:a}};case qe.SET_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[s]:{data:o}}};case qe.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[s]:{error:a}}};case qe.SET_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[n]:{...e.fraudProtection?.[n]||{},[s]:{data:o}}}};case qe.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[n]:{...e.fraudProtection?.[n]||{},[s]:{error:a}}}};case qe.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[n]:{...e.fraudProtection?.[n]||{},summary:{...e.fraudProtection?.[n]?.summary||{},[s]:{data:o}}}}};case qe.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 Ft.SET_DISPUTE:return{...e,byId:{...e.byId,[o.id]:o}};case Ft.SET_ERROR_FOR_DISPUTE:e={...e,byId:{...e.byId,[a]:{error:n}}};break;case Ft.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 Ft.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 ua.SET_CARD_READER_STATS:e={...e,[r]:{...e[r],data:o}};break;case ua.SET_ERROR_FOR_CARD_READER_STATS:e={...e,[r]:{...e[r],error:a}};break;case ua.SET_READERS:e={...e,list:o}}return e},capital:(e=wa,t)=>{switch(t.type){case Ra.SET_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:t.data,summaryError:void 0});case Ra.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:void 0,summaryError:t.error});case Ra.SET_LOANS:return Object.assign(Object.assign({},e),{loans:t.data,loansError:void 0});case Ra.SET_ERROR_FOR_LOANS:return Object.assign(Object.assign({},e),{loans:void 0,loansError:t.error})}return e},documents:(e=Ua,{type:t,query:r={},data:o=[],error:a})=>{const n=W(r);switch(t){case Fa.SET_DOCUMENTS:return{...e,[n]:{data:o}};case Fa.SET_ERROR_FOR_DOCUMENTS:return{...e,[n]:{error:a}};case Fa.SET_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[n]:{data:o}}};case Fa.SET_ERROR_FOR_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[n]:{error:a}}}}return e},paymentIntents:(e=Za,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=en,t)=>{switch(t.type){case Xa.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 Xa.SET_AUTHORIZATIONS:{const{data:r,query:o}=t;return Object.assign(Object.assign({},e),{[W(o)]:{data:r}})}case Xa.SET_ERROR_FOR_AUTHORIZATIONS:{const{error:r,query:o}=t;return Object.assign(Object.assign({},e),{[W(o)]:{error:r}})}case Xa.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 Xa.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 Xa.SET_IS_REQUESTING_AUTHORIZATION:{const{data:r}=t;return Object.assign(Object.assign({},e),{isRequesting:r})}}return e},files:(e=vn,t)=>{const{type:r,id:o}=t;switch(r){case On.SET_FILE:return Object.assign(Object.assign({},e),{[o]:Object.assign(Object.assign({},e[o]),{data:t.data})});case On.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=Dn,t)=>{switch(t.type){case Pn.SET_PM_PROMOTIONS:return Object.assign(Object.assign({},e),{pmPromotions:t.data,pmPromotionsError:void 0});case Pn.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,...F,...k},resolvers:{...o,...s,...d,...p,...S,...T,...f,...b,...N,...y,...M,...L,...j}});const qn="/wc/v3/payments",Bn="wc/payments/multi-currency",$n={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"},Hn={},Vn=e=>e&&e||{},Gn=e=>Vn(e).currencies||{},Qn=e=>Gn(e).available||{},Wn=e=>Gn(e).enabled||{},Zn=e=>Gn(e).default||{},Kn=e=>Vn(e).currency_settings||{},Jn=e=>Vn(e).settings||{};function Xn(e){return{type:$n.SET_CURRENCIES,data:e}}function es(e){return{type:$n.SET_AVAILABLE_CURRENCIES,data:e}}function ts(e){return{type:$n.SET_ENABLED_CURRENCIES,data:e}}function rs(e){return{type:$n.SET_DEFAULT_CURRENCY,data:e}}function os(e,t){return{type:$n.SET_CURRENCY_SETTINGS,data:{code:e,data:t}}}function as(e){return{type:$n.SET_STORE_SETTINGS,data:e}}function*ns(e){const t=Object.keys((0,B.select)(Bn).getEnabledCurrencies()),r=e.filter((e=>!t.includes(e))),o=t.filter((t=>!e.includes(t)));try{const t=yield(0,$.apiFetch)({path:`${qn}/multi-currency/update-enabled-currencies`,method:"POST",data:{enabled:e}});yield Xn(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*ss(e,t){try{const r=yield(0,$.apiFetch)({path:`${qn}/multi-currency/currencies/${e}`,method:"POST",data:t});yield os(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*is(e,t,r=!1){try{const o=yield(0,$.apiFetch)({path:`${qn}/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 as(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 cs(e,t){Eo()({path:`${qn}/settings/${e}`,method:"post",data:{value:t}}).catch((()=>{(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error saving option","woocommerce-payments"))}))}function*ds(){const e=`${qn}/multi-currency/currencies`;try{const t=yield(0,$.apiFetch)({path:e});yield Xn(t)}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving currencies.","woocommerce-payments"))}}function*us(e){const t=`${qn}/multi-currency/currencies/${e}`;try{const r=yield(0,$.apiFetch)({path:t});yield os(e,r)}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving single currency settings.","woocommerce-payments"))}}function*_s(){const e=`${qn}/multi-currency/get-settings`;try{const t=yield(0,$.apiFetch)({path:e});yield as(t)}catch(e){yield(0,B.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving store settings.","woocommerce-payments"))}}(0,B.registerStore)(Bn,{reducer:(e=Hn,{type:t,data:r=[]})=>{switch(t){case $n.SET_CURRENCIES:return{...e,currencies:r,available:r.available,enabled:r.enabled,default:r.default};case $n.SET_AVAILABLE_CURRENCIES:return{...e,currencies:{...e,available:r.available},available:r.available};case $n.SET_ENABLED_CURRENCIES:return{...e,currencies:{...e,enabled:r.enabled},enabled:r.enabled};case $n.SET_DEFAULT_CURRENCY:return{...e,currencies:{...e,default:r.default},default:r.default};case $n.SET_CURRENCY_SETTINGS:return{...e,currency_settings:{...e.currency_settings,[r.code]:r.data}};case $n.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:{...z},controls:$.controls,selectors:{...Y},resolvers:{...q}});const ps=window.wp.components,ms=window.wp.blocks,ls=window.wp.blockEditor;var ys=r(4848);(0,ms.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,ys.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",baseProfile:"tiny-ps",viewBox:"0 0 24 24",children:[(0,ys.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,ys.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,ys.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(Bn);return{currencies:t(),isLoading:r("getCurrencies",[])}}),[]),{enabledCurrencies:p}=(()=>{const e=(0,B.useSelect)((e=>{const{getEnabledCurrencies:t}=e(Bn);return t()})),{submitEnabledCurrenciesUpdate:t}=(0,B.useDispatch)(Bn);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,ls.useBlockProps)(),h=!window._wpemojiSettings||window._wpemojiSettings.supports?.flag;return(0,ys.jsxs)("div",{...y,children:[(0,ys.jsxs)(ls.InspectorControls,{children:[(0,ys.jsx)(ps.PanelBody,{title:(0,de.__)("Multi-Currency settings","woocommerce-payments"),children:(0,ys.jsx)(ps.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,ys.jsxs)(ps.PanelBody,{title:(0,de.__)("Layout","woocommerce-payments"),children:[(0,ys.jsx)(ps.CheckboxControl,{label:(0,de.__)("Display flags","woocommerce-payments"),checked:r,onChange:e=>{u({flag:e})},__nextHasNoMarginBottom:!0}),(0,ys.jsx)(ps.CheckboxControl,{label:(0,de.__)("Display currency symbols","woocommerce-payments"),checked:t,onChange:e=>{u({symbol:e})},__nextHasNoMarginBottom:!0}),(0,ys.jsx)(ps.CheckboxControl,{label:(0,de.__)("Border","woocommerce-payments"),checked:s,onChange:e=>{u({border:void 0!==e&&e})},__nextHasNoMarginBottom:!0}),(0,ys.jsx)(ps.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,ys.jsxs)(ps.PanelBody,{title:(0,de.__)("Typography","woocommerce-payments"),children:[(0,ys.jsx)(ps.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,ys.jsx)(ps.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,ys.jsxs)(ps.PanelBody,{title:(0,de.__)("Color settings","woocommerce-payments"),children:[(0,ys.jsx)(ls.ColorPaletteControl,{onChange:e=>{u({fontColor:void 0===e?"#000000":e})},value:n,label:(0,de.__)("Text","woocommerce-payments")}),(0,ys.jsx)(ls.ColorPaletteControl,{onChange:e=>{u({backgroundColor:void 0===e?"transparent":e})},value:d,label:(0,de.__)("Background","woocommerce-payments")}),(0,ys.jsx)(ls.ColorPaletteControl,{onChange:e=>{u({borderColor:void 0===e?"#000000":e})},value:c,label:(0,de.__)("Border","woocommerce-payments")})]})]},"setting"),(0,ys.jsx)("div",{className:"currency-switcher-holder",style:l.div,children:(0,ys.jsxs)("select",{name:"currency",disabled:_,style:l.select,children:[_&&(0,ys.jsx)("option",{children:(0,de.__)("Loading…","woocommerce-payments")}),!_&&p&&m.map((e=>(0,ys.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})})()})();
| ver. 1.6 |
Github
|
.
| PHP 8.3.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка