Файловый менеджер - Редактировать - /home/harasnat/www/labour/wp-content/plugins/woocommerce-payments/dist/order.js
Назад
/*! For license information please see order.js.LICENSE.txt */ (()=>{var e={5955:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],0<=t.indexOf(r)||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,a),u=["gridicon","gridicons-checkmark",i,!1,!1,!1].filter(Boolean).join(" ");return n.default.createElement("svg",s({className:u,height:r,width:r,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),n.default.createElement("g",null,n.default.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414z"})))};var o,n=(o=r(1609))&&o.__esModule?o:{default:o},a=["size","onClick","icon","className"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)}},4275:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],0<=t.indexOf(r)||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,a),u=["gridicon","gridicons-info-outline",i,!!function(e){return 0==e%18}(r)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return n.default.createElement("svg",s({className:u,height:r,width:r,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),n.default.createElement("g",null,n.default.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"})))};var o,n=(o=r(1609))&&o.__esModule?o:{default:o},a=["size","onClick","icon","className"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)}},9031:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],0<=t.indexOf(r)||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,a),u=["gridicon","gridicons-notice-outline",i,!!function(e){return 0==e%18}(r)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return n.default.createElement("svg",s({className:u,height:r,width:r,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),n.default.createElement("g",null,n.default.createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))};var o,n=(o=r(1609))&&o.__esModule?o:{default:o},a=["size","onClick","icon","className"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)}},5338:(e,t,r)=>{"use strict";var o=r(5795);t.H=o.createRoot,o.hydrateRoot},1020:(e,t,r)=>{"use strict";var o=r(1609),n=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var o,a={},u=null,d=null;for(o in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(d=t.ref),t)s.call(t,o)&&!c.hasOwnProperty(o)&&(a[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===a[o]&&(a[o]=t[o]);return{$$typeof:n,type:e,key:u,ref:d,props:a,_owner:i.current}}t.Fragment=a,t.jsx=u,t.jsxs=u},4848:(e,t,r)=>{"use strict";e.exports=r(1020)},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var 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 n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].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:()=>je,getAllDepositsOverviewsError:()=>xe,getDeposit:()=>Ue,getDepositQueryError:()=>ze,getDeposits:()=>Le,getDepositsCount:()=>qe,getDepositsSummary:()=>$e,getDepositsSummaryError:()=>Be,getInstantDeposit:()=>He});var t={};r.r(t),r.d(t,{submitInstantDeposit:()=>tt,updateAllDepositsOverviews:()=>We,updateDeposit:()=>Ve,updateDeposits:()=>Ge,updateDepositsCount:()=>Ze,updateDepositsSummary:()=>Je,updateErrorForAllDepositsOverviews:()=>Qe,updateErrorForDepositQuery:()=>Ke,updateErrorForDepositsSummary:()=>Xe,updateInstantDeposit:()=>et});var o={};r.r(o),r.d(o,{getAllDepositsOverviews:()=>ot,getDeposit:()=>rt,getDeposits:()=>it,getDepositsSummary:()=>ct,getPayoutsCSVRequestURL:()=>st,payoutsDownloadEndpoint:()=>at});var n={};r.r(n),r.d(n,{getFraudOutcomeTransactions:()=>gt,getFraudOutcomeTransactionsError:()=>ft,getFraudOutcomeTransactionsSummary:()=>Tt,getFraudOutcomeTransactionsSummaryError:()=>Rt,getTransactions:()=>pt,getTransactionsError:()=>_t,getTransactionsSummary:()=>ht,getTransactionsSummaryError:()=>St});var a={};r.r(a),r.d(a,{updateErrorForFraudOutcomeTransactions:()=>Nt,updateErrorForFraudOutcomeTransactionsSummary:()=>Ct,updateErrorForTransactions:()=>vt,updateErrorForTransactionsSummary:()=>At,updateFraudOutcomeTransactions:()=>It,updateFraudOutcomeTransactionsSummary:()=>Dt,updateTransactions:()=>Ot,updateTransactionsSummary:()=>bt});var s={};r.r(s),r.d(s,{formatQueryFilters:()=>Ft,getFraudOutcomeTransactions:()=>xt,getFraudOutcomeTransactionsExport:()=>Lt,getFraudOutcomeTransactionsSummary:()=>kt,getTransactions:()=>Mt,getTransactionsCSVRequestURL:()=>Ut,getTransactionsSummary:()=>jt,transactionsDownloadEndpoint:()=>Pt});var i={};r.r(i),r.d(i,{getCharge:()=>zt,getChargeError:()=>Yt,getChargeFromOrder:()=>$t,getChargeFromOrderError:()=>Bt});var c={};r.r(c),r.d(c,{updateCharge:()=>Ht,updateErrorForCharge:()=>Vt});var u={};r.r(u),r.d(u,{getCharge:()=>Wt,getChargeFromOrder:()=>Qt});var d={};r.r(d),r.d(d,{getTimeline:()=>Zt,getTimelineError:()=>Kt});var l={};r.r(l),r.d(l,{updateErrorForTimeline:()=>Xt,updateTimeline:()=>Jt});var m={};r.r(m),r.d(m,{getTimeline:()=>er});var p={};r.r(p),r.d(p,{getCachedDispute:()=>sr,getDispute:()=>nr,getDisputeError:()=>ar,getDisputes:()=>ir,getDisputesSummary:()=>cr});var _={};r.r(_),r.d(_,{refundCharge:()=>pr,updateErrorForPaymentIntent:()=>mr,updatePaymentIntent:()=>lr});var y={};r.r(y),r.d(y,{getPaymentIntent:()=>_r});var h={};r.r(h),r.d(h,{acceptDispute:()=>gr,updateDispute:()=>yr,updateDisputes:()=>Sr,updateDisputesSummary:()=>Er,updateErrorForDispute:()=>hr});var S={};r.r(S),r.d(S,{disputesDownloadEndpoint:()=>wr,getDispute:()=>Rr,getDisputes:()=>Or,getDisputesCSVRequestURL:()=>Tr,getDisputesSummary:()=>vr});var E={};r.r(E),r.d(E,{getAccountBusinessSupportEmail:()=>Yr,getAccountBusinessSupportPhone:()=>$r,getAccountDomesticCurrency:()=>Br,getAccountStatementDescriptor:()=>Lr,getAccountStatementDescriptorKana:()=>zr,getAccountStatementDescriptorKanji:()=>qr,getAdvancedFraudProtectionSettings:()=>Ro,getAvailablePaymentMethodIds:()=>Ur,getCompletedWaitingPeriod:()=>Gr,getCurrentProtectionLevel:()=>To,getDepositDelayDays:()=>Qr,getDepositRestrictions:()=>Kr,getDepositScheduleInterval:()=>Hr,getDepositScheduleMonthlyAnchor:()=>Wr,getDepositScheduleWeeklyAnchor:()=>Vr,getDepositStatus:()=>Zr,getDuplicatedPaymentMethodIds:()=>Fr,getEnabledPaymentMethodIds:()=>Pr,getIsCardPresentEligible:()=>po,getIsDebugLogEnabled:()=>oo,getIsDevModeEnabled:()=>to,getIsManualCaptureEnabled:()=>Jr,getIsMultiCurrencyEnabled:()=>no,getIsPaymentRequestEnabled:()=>ro,getIsSavedCardsEnabled:()=>lo,getIsStripeBillingEnabled:()=>vo,getIsStripeBillingMigrationInProgress:()=>bo,getIsSubscriptionsPluginActive:()=>ho,getIsTestModeEnabled:()=>Xr,getIsTestModeOnboarding:()=>eo,getIsWCPayEnabled:()=>Mr,getIsWCPaySubscriptionsEligible:()=>yo,getIsWCPaySubscriptionsEnabled:()=>_o,getIsWooPayEnabled:()=>So,getIsWooPayGlobalThemeSupportEnabled:()=>Eo,getPaymentMethodStatuses:()=>jr,getPaymentRequestButtonBorderRadius:()=>uo,getPaymentRequestButtonSize:()=>io,getPaymentRequestButtonTheme:()=>co,getPaymentRequestButtonType:()=>so,getPaymentRequestLocations:()=>ao,getSavingError:()=>mo,getSettings:()=>Cr,getShowWooPayIncompatibilityNotice:()=>Oo,getStripeBillingMigratedCount:()=>Io,getStripeBillingSubscriptionCount:()=>Ao,getWooPayCustomMessage:()=>go,getWooPayLocations:()=>wo,getWooPayStoreLogo:()=>fo,isDirty:()=>kr,isSavingSettings:()=>xr});var g={};r.r(g),r.d(g,{saveOption:()=>hn,saveSettings:()=>nn,submitStripeBillingSubscriptionMigration:()=>yn,updateAccountBusinessSupportEmail:()=>Xo,updateAccountBusinessSupportPhone:()=>en,updateAccountStatementDescriptor:()=>Zo,updateAccountStatementDescriptorKana:()=>Jo,updateAccountStatementDescriptorKanji:()=>Ko,updateAdvancedFraudProtectionSettings:()=>pn,updateDepositScheduleInterval:()=>tn,updateDepositScheduleMonthlyAnchor:()=>on,updateDepositScheduleWeeklyAnchor:()=>rn,updateEnabledPaymentMethodIds:()=>zo,updateIsCardPresentEligible:()=>Mo,updateIsDebugLogEnabled:()=>Wo,updateIsManualCaptureEnabled:()=>Ho,updateIsMultiCurrencyEnabled:()=>Qo,updateIsPaymentRequestEnabled:()=>qo,updateIsSavedCardsEnabled:()=>Fo,updateIsSavingSettings:()=>Yo,updateIsStripeBillingEnabled:()=>_n,updateIsTestModeEnabled:()=>Vo,updateIsWCPayEnabled:()=>Lo,updateIsWCPaySubscriptionsEnabled:()=>Go,updateIsWooPayEnabled:()=>sn,updateIsWooPayGlobalThemeSupportEnabled:()=>cn,updatePaymentRequestButtonBorderRadius:()=>xo,updatePaymentRequestButtonSize:()=>Uo,updatePaymentRequestButtonTheme:()=>jo,updatePaymentRequestButtonType:()=>Po,updatePaymentRequestLocations:()=>an,updateProtectionLevel:()=>mn,updateSelectedPaymentMethod:()=>$o,updateSettings:()=>ko,updateUnselectedPaymentMethod:()=>Bo,updateWooPayCustomMessage:()=>un,updateWooPayLocations:()=>ln,updateWooPayStoreLogo:()=>dn});var f={};r.r(f),r.d(f,{getSettings:()=>Sn});var w={};r.r(w),r.d(w,{getCardReaderStats:()=>gn,getCardReaderStatsError:()=>fn,getCardReaders:()=>wn});var T={};r.r(T),r.d(T,{updateCardReaderStats:()=>Tn,updateCardReaders:()=>Rn,updateErrorForCardReaderStats:()=>On,updateErrorForCardReaders:()=>vn});var R={};r.r(R),r.d(R,{getCardReaderStats:()=>bn,getCardReaders:()=>An});var O={};r.r(O),r.d(O,{getActiveLoanSummary:()=>Fn,getActiveLoanSummaryError:()=>Mn,getLoans:()=>Pn,getLoansError:()=>Un});var v={};r.r(v),r.d(v,{updateActiveLoanSummary:()=>jn,updateErrorForActiveLoanSummary:()=>xn,updateErrorForLoans:()=>Ln,updateLoans:()=>kn});var b={};r.r(b),r.d(b,{getActiveLoanSummary:()=>qn,getLoans:()=>zn});var A={};r.r(A),r.d(A,{getDocuments:()=>Vn,getDocumentsError:()=>Wn,getDocumentsSummary:()=>Gn,getDocumentsSummaryError:()=>Zn});var I={};r.r(I),r.d(I,{updateDocuments:()=>Kn,updateDocumentsSummary:()=>Xn,updateErrorForDocuments:()=>Jn,updateErrorForDocumentsSummary:()=>ea});var N={};r.r(N),r.d(N,{formatQueryFilters:()=>ta,getDocuments:()=>ra,getDocumentsSummary:()=>oa});var D={};r.r(D),r.d(D,{getPaymentIntent:()=>aa,getPaymentIntentError:()=>sa});var C={};r.r(C),r.d(C,{getAuthorization:()=>ma,getAuthorizations:()=>la,getAuthorizationsError:()=>pa,getAuthorizationsSummary:()=>ya,getAuthorizationsSummaryError:()=>ha,getIsRequesting:()=>Sa});var F={};r.r(F),r.d(F,{setIsRequestingAuthorization:()=>Ra,submitCancelAuthorization:()=>va,submitCaptureAuthorization:()=>Oa,updateAuthorization:()=>wa,updateAuthorizations:()=>ga,updateAuthorizationsSummary:()=>Ta,updateErrorForAuthorizations:()=>fa,updateErrorForAuthorizationsSummary:()=>ba});var M={};r.r(M),r.d(M,{getAuthorization:()=>Ia,getAuthorizations:()=>Aa,getAuthorizationsSummary:()=>Na});var P={};r.r(P),r.d(P,{getFile:()=>Ma,getFileError:()=>Pa});var U={};r.r(U),r.d(U,{updateErrorForFiles:()=>ja,updateFiles:()=>Ua});var j={};r.r(j),r.d(j,{getFile:()=>xa});var x=r(5338),k=r(1609),L=r.n(k);const q=window.wp.i18n,z=e=>{var t;const r=null!==(t=wcpay_order_config)&&void 0!==t?t:wc.wcSettings.getSetting("woocommerce_payments_data");return r?.[e]},Y=window.moment;var $=r.n(Y);const B=window.wc.wcSettings,H={bank_cannot_process:{display:(0,q.__)("Bank cannot process","woocommerce-payments")},check_returned:{display:(0,q.__)("Check returned","woocommerce-payments")},credit_not_processed:{display:(0,q.__)("Credit not processed","woocommerce-payments"),overview:[(0,q.__)("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,q.__)("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")],summary:[(0,q.__)("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")],required:[(0,q.__)("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")],respond:[(0,q.__)("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,q.__)("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")],claim:(0,q.__)("The cardholder claims a credit was not processed.","woocommerce-payments")},customer_initiated:{display:(0,q.__)("Customer initiated","woocommerce-payments")},debit_not_authorized:{display:(0,q.__)("Debit not authorized","woocommerce-payments")},duplicate:{display:(0,q.__)("Duplicate","woocommerce-payments"),overview:[(0,q.__)("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,q.__)("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")],summary:[(0,q.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments")],required:[(0,q.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments")],respond:[(0,q.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),(0,q.__)("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,q.__)("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,q.__)("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")],claim:(0,q.__)("The cardholder claims this is a duplicate transaction.","woocommerce-payments")},fraudulent:{display:(0,q.__)("Transaction unauthorized","woocommerce-payments"),overview:[(0,q.__)("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,q.__)("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")],summary:[(0,q.__)("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")],required:[(0,q.__)("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")],respond:[(0,q.__)("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,q.__)("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,q.__)("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")],claim:(0,q.__)("The cardholder claims this is an unauthorized transaction.","woocommerce-payments")},general:{display:(0,q.__)("General","woocommerce-payments"),overview:[(0,q.__)("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")],summary:[(0,q.__)("This is an uncategorized dispute, so you should contact the customer for additional details to find out why the payment was disputed.","woocommerce-payments")]},incorrect_account_details:{display:(0,q.__)("Incorrect account details","woocommerce-payments")},insufficient_funds:{display:(0,q.__)("Insufficient funds","woocommerce-payments")},product_not_received:{display:(0,q.__)("Product not received","woocommerce-payments"),overview:[(0,q.__)("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,q.__)("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")],summary:[(0,q.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments")],required:[(0,q.__)("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")],respond:[(0,q.__)("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,q.__)("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")],claim:(0,q.__)("The cardholder claims they did not receive the product.","woocommerce-payments")},product_unacceptable:{display:(0,q.__)("Product unacceptable","woocommerce-payments"),overview:[(0,q.__)("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,q.__)("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")],summary:[(0,q.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments")],required:[(0,q.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments")],respond:[(0,q.__)("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,q.__)("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,q.__)("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,q.__)("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,q.__)("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")],claim:(0,q.__)("The cardholder claims the product was unacceptable.","woocommerce-payments")},subscription_canceled:{display:(0,q.__)("Subscription canceled","woocommerce-payments"),overview:[(0,q.__)("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,q.__)("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")],summary:[(0,q.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments")],required:[(0,q.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments")],respond:[(0,q.__)("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,q.__)("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,q.__)("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")],claim:(0,q.__)("The cardholder claims a subscription was canceled.","woocommerce-payments")},unrecognized:{display:(0,q.__)("Unrecognized","woocommerce-payments"),overview:[(0,q.__)("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,q.__)("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")],summary:[(0,q.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments")],required:[(0,q.__)("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")],respond:[(0,q.__)("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,q.__)("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")]}},V={warning_needs_response:(0,q.__)("Inquiry: Response needed","woocommerce-payments"),warning_under_review:(0,q.__)("Inquiry: Under review","woocommerce-payments"),warning_closed:(0,q.__)("Inquiry: Closed","woocommerce-payments"),needs_response:(0,q.__)("Response needed","woocommerce-payments"),under_review:(0,q.__)("Under review","woocommerce-payments"),charge_refunded:(0,q.__)("Charge refunded","woocommerce-payments"),won:(0,q.__)("Won","woocommerce-payments"),lost:(0,q.__)("Lost","woocommerce-payments")},W=(Object.entries(V).map((([e,t])=>({label:t,value:e}))).filter((function(e){return null!=e})),["needs_response","warning_needs_response"]),Q=["under_review","warning_under_review"],G=((0,q.__)("Dispute currency","woocommerce-payments"),(0,q.__)("All currencies","woocommerce-payments"),(0,q.__)("Show","woocommerce-payments"),(0,q.__)("Needs response","woocommerce-payments"),(0,q.__)("All disputes","woocommerce-payments"),(0,q.__)("Advanced filters","woocommerce-payments"),(0,B.getSetting)("wcVersion")),Z=parseFloat(G),K=(Z<7.8?(0,q.__)("Disputes match {{select /}} filters","woocommerce-payments"):(0,q.__)("Disputes match <select /> filters","woocommerce-payments"),(0,q.__)("Disputed on date","woocommerce-payments"),(0,q.__)("Remove dispute date filter","woocommerce-payments"),(0,q.__)("Select a dispute date filter match","woocommerce-payments"),Z<7.8?(0,q.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,q.__)("<title>Date</title> <rule /> <filter />","woocommerce-payments"),(0,q.__)("Select a dispute date","woocommerce-payments"),(0,q.__)("Before","woocommerce-payments"),(0,q.__)("After","woocommerce-payments"),(0,q.__)("Between","woocommerce-payments"),(0,q.__)("Status","woocommerce-payments"),(0,q.__)("Remove dispute status filter","woocommerce-payments"),(0,q.__)("Select a dispute status filter match","woocommerce-payments"),Z<7.8?(0,q.__)("{{title}}Status{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,q.__)("<title>Status</title> <rule /> <filter />","woocommerce-payments"),(0,q.__)("Select a dispute status","woocommerce-payments"),(0,q._x)("Is","dispute status","woocommerce-payments"),(0,q._x)("Is not","dispute status","woocommerce-payments"),window.wp.domReady);var J=r.n(K);const X=(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]}J()((()=>{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)}))},ee=((0,k.createContext)(window.wcpaySettings),(0,k.createContext)({isActive:!1,setActive:()=>null,isCompleted:!1,setCompleted:()=>null,taskId:""}),window.wc.currency);var te=r.n(ee);const re=window.lodash,oe=((0,q.__)("Australian dollar","woocommerce-payments"),(0,q.__)("Canadian dollar","woocommerce-payments"),(0,q.__)("Swiss franc","woocommerce-payments"),(0,q.__)("Danish krone","woocommerce-payments"),(0,q.__)("Euro","woocommerce-payments"),(0,q.__)("Pound sterling","woocommerce-payments"),(0,q.__)("Norwegian krone","woocommerce-payments"),(0,q.__)("New Zealand dollar","woocommerce-payments"),(0,q.__)("Swedish krona","woocommerce-payments"),(0,q.__)("United States (US) dollar","woocommerce-payments"),e=>wcpaySettings.zeroDecimalCurrencies.includes(e.toLowerCase())),ne=(e,t="USD",r=null,o=!1)=>{const n=oe(t);n||(e/=100);const a=e<0,s=a?-1*e:e,i=a?"-":"",c=o?(e=>{const t=e.toUpperCase(),{currencyData:r,connect:{country:o="US"}}=wcpaySettings;if(r[o]?.code===t)return te()(r[o]);const n=(0,re.find)(r,{code:t});if(n){const{defaultLocale:e={}}=n;return e.hasOwnProperty("decimalSeparator")&&e.hasOwnProperty("thousandSeparator")&&e.hasOwnProperty("symbolPosition")&&(n.decimalSeparator=e.decimalSeparator,n.thousandSeparator=e.thousandSeparator,n.symbolPosition=e.symbolPosition),te()(n)}return null})(t):((e,t=null)=>{const{currencyData:r,connect:{country:o="US"}}=wcpaySettings,n=(0,re.find)(r,{code:e.toUpperCase()});if(n){if(null!==t&&t.toUpperCase()!==e.toUpperCase()||r[o]){const e=t?(0,re.find)(r,{code:t.toUpperCase()}):r[o];e&&(n.decimalSeparator=e.decimalSeparator,n.thousandSeparator=e.thousandSeparator,n.symbolPosition=e.symbolPosition)}return te()(n)}return null})(t,r);if(null===c)return i+se(s,t,n);try{return i+("function"==typeof c.formatAmount?ie(c.formatAmount(s)):ie(c.formatCurrency(s)))}catch(e){return i+ie(se(s,t,n))}},ae=(e,t="USD",r=!1,o=null)=>{let n=ne(e,t,o);return wcpaySettings.shouldUseExplicitPrice?(r&&(n=function(e){return e.replace(/[^0-9,.' ]/g,"").trim()}(n)),((e,t)=>(-1===e.toString().indexOf(t)&&(e=e+" "+t),e))(n,t.toUpperCase())):n};function se(e,t,r){try{return e.toLocaleString(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",dummy:r})}catch(o){return(0,q.sprintf)(r?"%s %i":"%s %.2f",t.toUpperCase(),e)}}function ie(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}const ce=e=>W.includes(e),ue=e=>Q.includes(e),de=e=>e.startsWith("warning");function le(e){return e.startsWith("{{/")?{type:"componentClose",value:e.replace(/\W/g,"")}:e.endsWith("/}}")?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.startsWith("{{")?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}function me(e,t){let r,o,n=[];for(let a=0;a<e.length;a++){const s=e[a];if("string"!==s.type){if(void 0===t[s.value])throw new Error(`Invalid interpolation, missing component node: \`${s.value}\``);if("object"!=typeof t[s.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${s.value}\``);if("componentClose"===s.type)throw new Error(`Missing opening component token: \`${s.value}\``);if("componentOpen"===s.type){r=t[s.value],o=a;break}n.push(t[s.value])}else n.push(s.value)}if(r){const a=function(e,t){const r=t[e];let o=0;for(let n=e+1;n<t.length;n++){const e=t[n];if(e.value===r.value){if("componentOpen"===e.type){o++;continue}if("componentClose"===e.type){if(0===o)return n;o--}}}throw new Error("Missing closing component token `"+r.value+"`")}(o,e),s=me(e.slice(o+1,a),t),i=(0,k.cloneElement)(r,{},s);if(n.push(i),a<e.length-1){const r=me(e.slice(a+1),t);n=n.concat(r)}}return n=n.filter(Boolean),0===n.length?null:1===n.length?n[0]:(0,k.createElement)(k.Fragment,null,...n)}function pe(e){const{mixedString:t,components:r,throwErrors:o}=e;if(!r)return t;if("object"!=typeof r){if(o)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const n=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(le)}(t);try{return me(n,r)}catch(e){if(o)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}const _e=window.wp.components;function ye(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=ye(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}const he=function(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=ye(e))&&(o&&(o+=" "),o+=t);return o};var Se=r(5955),Ee=r(9031),ge=r(4275);const fe=function(e){const{icon:t,actions:r,children:o,buttonVariant:n}=e,a=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}(e,["icon","actions","children","buttonVariant"]);a.className=he("wcpay-inline-notice",`wcpay-inline-${a.status}-notice`,a.className);let s=t;if(!0===s)switch(a.status){case"success":s=L().createElement(Se.A,null);break;case"error":case"warning":s=L().createElement(Ee.A,null);break;default:s=L().createElement(ge.A,null)}const i="wcpay-inline-notice__action",c=null==r?void 0:r.map(((e,t)=>{var r,o;return"url"in e?L().createElement("a",{key:t,className:i,href:e.url},e.label):L().createElement(_e.Button,{key:t,className:i,onClick:e.onClick,isBusy:null!==(r=e.isBusy)&&void 0!==r&&r,disabled:null!==(o=e.disabled)&&void 0!==o&&o,variant:n},e.label)}));return L().createElement(_e.Notice,Object.assign({},a),L().createElement(_e.Flex,{align:"center",justify:"flex-start"},s&&L().createElement(_e.FlexItem,{className:`wcpay-inline-notice__icon wcpay-inline-${a.status}-notice__icon`},L().createElement(_e.Icon,{icon:s,size:24})),L().createElement(_e.FlexItem,{className:`wcpay-inline-notice__content wcpay-inline-${a.status}-notice__content`},o,c&&L().createElement(_e.Flex,{className:"wcpay-inline-notice__content__actions",align:"baseline",justify:"flex-start",gap:4},c))))},we=()=>L().createElement(fe,{icon:!0,status:"warning",isDismissible:!1},pe({mixedString:(0,q.__)("WooPayments was in test mode when this order was placed. {{learnMoreLink/}}","woocommerce-payments"),components:{learnMoreLink:L().createElement(_e.ExternalLink,{href:"https://woocommerce.com/document/woopayments/testing-and-troubleshooting/testing/"},(0,q.__)("Learn more about test mode","woocommerce-payments"))}})),Te=window.wp.element,Re=(window.wc.components,window.wp.url),Oe=window.wp.date,ve=(window.wc.number,e=>(0,Re.addQueryArgs)("admin.php",e)),be=(e,t=!1)=>{const r=t?$()(e).endOf("day").utc().toISOString():$()(e).startOf("day").utc().toISOString();return e&&(0,Oe.dateI18n)("Y-m-d H:i:s",r,!0)},Ae=window.wp.data,Ie=window.wp.dataControls,Ne="/wc/v3/payments",De="wc/payments",Ce={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"},Fe=e=>JSON.stringify(e,Object.keys(e).sort()),Me={byId:{},queries:{},count:0,instant:{}},Pe=e=>e&&e.deposits||{},Ue=(e,t)=>(Pe(e).byId||{})[t],je=e=>{const t=Pe(e).overviews||{};if(!t.data)return{account:null,currencies:[]};const{deposit:r,balance:o,account:n}=t.data,a={lastPaid:r.last_paid,pending:o.pending,available:o.available,instant:o.instant},s={};for(const[e,t]of Object.entries(a))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:n,currencies:[...i.filter((e=>n.default_currency===e.currency)),...i.filter((e=>n.default_currency!==e.currency))]}},xe=e=>(Pe(e).overviews||{}).error,ke=(e,t)=>{const r=Fe(t);return(Pe(e).queries||{})[r]||{}},Le=(e,t)=>(ke(e,t).data||[]).map(Ue.bind(void 0,e)),qe=e=>Pe(e).count,ze=(e,t)=>ke(e,t).error||{},Ye=(e,t)=>{const r=Fe(t);return(Pe(e).summary||{})[r]||{}},$e=(e,t)=>Ye(e,t).data||{},Be=(e,t)=>Ye(e,t).error||{},He=e=>(Pe(e).instant||{}).data;function Ve(e){return{type:Ce.SET_DEPOSIT,data:e}}function We(e){return{type:Ce.SET_ALL_DEPOSITS_OVERVIEWS,data:e}}function Qe(e,t){return{type:Ce.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS,error:t}}function Ge(e,t){return{type:Ce.SET_DEPOSITS,query:e,data:t}}function Ze(e){return{type:Ce.SET_DEPOSITS_COUNT,data:e}}function Ke(e,t,r){return{type:Ce.SET_ERROR_FOR_DEPOSIT_QUERY,query:e,data:t,error:r}}function Je(e,t){return{type:Ce.SET_DEPOSITS_SUMMARY,query:e,data:t}}function Xe(e,t,r){return{type:Ce.SET_ERROR_FOR_DEPOSITS_SUMMARY,query:e,data:t,error:r}}function et(e){return{type:Ce.SET_INSTANT_DEPOSIT,data:e}}function*tt(e){try{yield(0,Ae.dispatch)(De).startResolution("getInstantDeposit",[e]);const t=yield(0,Ie.apiFetch)({path:"/wc/v3/payments/deposits",method:"POST",data:{type:"instant",currency:e}});yield et(t),yield(0,Ae.dispatch)(De).invalidateResolutionForStoreSelector("getDeposits"),yield(0,Ae.dispatch)(De).invalidateResolutionForStoreSelector("getAllDepositsOverviews"),yield(0,Ae.dispatch)("core/notices").createSuccessNotice((0,q.sprintf)((0,q.__)("Instant payout for %s in transit.","woocommerce-payments"),ne(t.amount)),{actions:[{label:(0,q.__)("View details","woocommerce-payments"),url:ve({page:"wc-admin",path:"/payments/payouts/details",id:t.id})}]})}catch{yield(0,Ae.dispatch)("core/notices").createErrorNotice((0,q.__)("Error creating instant payout.","woocommerce-payments"))}finally{yield(0,Ae.dispatch)(De).finishResolution("getInstantDeposit",[e])}}function*rt(e){if(/\W/.test(e))return;const t=(0,Re.addQueryArgs)(`${Ne}/deposits/${e}`);try{const e=yield(0,Ie.apiFetch)({path:t});yield Ve(e)}catch(e){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving payout.","woocommerce-payments"))}}function*ot(){const e=(0,Re.addQueryArgs)(`${Ne}/deposits/overview-all`);try{const t=yield(0,Ie.apiFetch)({path:e});yield We(t)}catch(e){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving all payouts' overviews.","woocommerce-payments")),yield Qe()}}const nt=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:be(e.dateBefore,!0),date_after:be(e.dateAfter),date_between:e.dateBetween&&[be(e.dateBetween[0]),be(e.dateBetween[1],!0)],status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.locale}),at=`${Ne}/deposits/download`;function st(e){return(0,Re.addQueryArgs)(at,nt(e))}function*it(e){const t=(0,Re.addQueryArgs)(`${Ne}/deposits`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...nt(e)});try{const r=yield(0,Ie.apiFetch)({path:t})||{};yield Ge(e,r.data),yield Ze(r.total_count);for(const e in r.data)yield Ae.controls.dispatch(De,"finishResolution","getDeposit",[r.data[e].id])}catch(t){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving payouts.","woocommerce-payments")),yield Ke(e,null,t)}}function*ct(e){const t=(0,Re.addQueryArgs)(`${Ne}/deposits/summary`,nt(e));try{const r=yield(0,Ie.apiFetch)({path:t});yield Je(e,r)}catch(t){yield Xe(e,null,t)}}const ut={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"},dt={summary:{},fraudProtection:{review:{summary:{}},block:{summary:{}}}},lt=e=>e&&e.transactions||{},mt=(e,t)=>{const r=Fe(t);return lt(e)[r]||{}},pt=(e,t)=>mt(e,t).data||[],_t=(e,t)=>mt(e,t).error||{},yt=(e,t)=>{const r=Fe(t);return lt(e).summary[r]||{}},ht=(e,t)=>yt(e,t).data||{},St=(e,t)=>yt(e,t).error||{},Et=(e,t,r)=>{const o=Fe(r);return lt(e).fraudProtection?.[t]?.[o]||{}},gt=(e,t,r)=>Et(e,t,r).data||[],ft=(e,t,r)=>Et(e,t,r).error||{},wt=(e,t,r)=>{const o=Fe(r);return lt(e).fraudProtection?.[t]?.summary[o]||{}},Tt=(e,t,r)=>wt(e,t,r).data||{},Rt=(e,t,r)=>wt(e,t,r).error||{};function Ot(e,t){return{type:ut.SET_TRANSACTIONS,query:e,data:t}}function vt(e,t,r){return{type:ut.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:r}}function bt(e,t){return{type:ut.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function At(e,t,r){return{type:ut.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:r}}function It(e,t,r){return{type:ut.SET_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:r}}function Nt(e,t,r){return{type:ut.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:null,error:r}}function Dt(e,t,r){return{type:ut.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:r}}function Ct(e,t,r){return{type:ut.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:null,error:r}}const Ft=e=>({user_email:e.userEmail,match:e.match,date_before:be(e.dateBefore,!0),date_after:be(e.dateAfter),date_between:e.dateBetween&&[be(e.dateBetween[0]),be(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:$()(new Date).format("Z"),locale:e.locale});function*Mt(e){const t=(0,Re.addQueryArgs)(`${Ne}/transactions`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...Ft(e)});try{const r=yield(0,Ie.apiFetch)({path:t});yield Ot(e,r.data||[])}catch(t){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving transactions.","woocommerce-payments")),yield vt(e,null,t)}}const Pt=`${Ne}/transactions/download`;function Ut(e){return(0,Re.addQueryArgs)(Pt,Ft(e))}function*jt(e){const t=(0,Re.addQueryArgs)(`${Ne}/transactions/summary`,Ft(e));try{const r=yield(0,Ie.apiFetch)({path:t});yield bt(e,r)}catch(t){yield At(e,null,t)}}function*xt(e,t){const r=(0,Re.addQueryArgs)(`${Ne}/transactions/fraud-outcomes`,{status:e,page:t.paged,sort:t.orderby,pagesize:t.perPage,direction:t.order,additional_status:t.additionalStatus,...Ft(t)});try{const o=yield(0,Ie.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 Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving transactions.","woocommerce-payments")),yield Nt(e,t,r)}}function*kt(e,t){const r=(0,Re.addQueryArgs)(`${Ne}/transactions/fraud-outcomes/summary`,{status:e,additional_status:t.additionalStatus}),o={count:0,total:0};try{const n=yield(0,Ie.apiFetch)({path:r});yield Dt(e,t,n||o)}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield Dt(e,t,o));yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving on review transactions.","woocommerce-payments")),yield Ct(e,t,r)}}function Lt(e,t){return(0,Re.addQueryArgs)(`${Ne}/transactions/fraud-outcomes/download`,{status:e,sort:t.orderby,direction:t.order,additional_status:t.additionalStatus,...Ft(t)})}const qt={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"},zt=(e,t)=>e.charges[t]&&e.charges[t].data?e.charges[t].data:{},Yt=(e,t)=>e.charges[t]&&e.charges[t].error?e.charges[t].error:{},$t=(e,t)=>zt(e,t),Bt=(e,t)=>Yt(e,t);function Ht(e,t){return{type:qt.SET_CHARGE,id:e,data:t}}function Vt(e,t,r){return{type:qt.SET_ERROR_FOR_CHARGE,id:e,data:t,error:r}}function*Wt(e){try{const t=yield(0,Ie.apiFetch)({path:`${Ne}/charges/${e}`});yield Ht(e,t)}catch(t){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving transaction.","woocommerce-payments")),yield Vt(e,null,t)}}function*Qt(e){try{const t=yield(0,Ie.apiFetch)({path:`${Ne}/charges/order/${e}`});yield Ht(e,t)}catch(t){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving transaction.","woocommerce-payments")),yield Vt(e,null,t)}}const Gt={SET_TIMELINE:"SET_TIMELINE",SET_ERROR_FOR_TIMELINE:"SET_ERROR_FOR_TIMELINE"},Zt=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].data?e.timeline[t].data:{},Kt=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].error?e.timeline[t].error:{};function Jt(e,t){return{id:e,type:Gt.SET_TIMELINE,data:t}}function Xt(e,t){return{id:e,type:Gt.SET_ERROR_FOR_TIMELINE,error:t}}function*er(e){try{const t=yield(0,Ie.apiFetch)({path:`${Ne}/timeline/${e}`});yield Jt(e,t.data)}catch(t){yield Xt(e,t)}}const tr={SET_DISPUTE:"SET_DISPUTE",SET_ERROR_FOR_DISPUTE:"SET_ERROR_FOR_DISPUTE",SET_DISPUTES:"SET_DISPUTES",SET_DISPUTES_SUMMARY:"SET_DISPUTES_SUMMARY"},rr={byId:{},queries:{},summary:{},cached:{}},or=e=>e&&e.disputes||{},nr=(e,t)=>(or(e).byId||{})[t],ar=(e,t)=>{const r=or(e).byId||{};return r[t]?.error},sr=(e,t)=>(or(e).cached||{})[t],ir=(e,t)=>{const r=((e,t)=>{const r=Fe(t);return(or(e).queries||{})[r]||{}})(e,t).data||[];return r.map(sr.bind(void 0,e))},cr=(e,t)=>((e,t)=>{const r=Fe(t);return(or(e).summary||{})[r]||{}})(e,t).data||{};var ur;!function(e){e.SET_PAYMENT_INTENT="SET_PAYMENT_INTENT",e.SET_ERROR_FOR_PAYMENT_INTENT="SET_ERROR_FOR_PAYMENT_INTENT"}(ur||(ur={}));const dr=ur;function lr(e,t){return{type:dr.SET_PAYMENT_INTENT,id:e,data:t}}function mr(e,t){return{type:dr.SET_ERROR_FOR_PAYMENT_INTENT,id:e,error:t}}function*pr(e,t){var r;const o=e.payment_intent;try{yield(0,Ie.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 Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getTimeline"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Ae.controls.dispatch("core/notices","createSuccessNotice",(0,q.sprintf)((0,q.__)("Refunded payment #%s.","woocommerce-payments"),o))}catch(e){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.sprintf)((0,q.__)("There has been an error refunding the payment #%s. Please try again later.","woocommerce-payments"),o))}}function*_r(e){try{const t=yield(0,Ie.apiFetch)({path:`${Ne}/payment_intents/${e}`});yield lr(e,t)}catch(t){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving transaction.","woocommerce-payments")),yield mr(e,t)}}function yr(e){return{type:tr.SET_DISPUTE,data:e}}function hr(e,t,r){return{type:tr.SET_ERROR_FOR_DISPUTE,id:e,data:t,error:r}}function Sr(e,t){return{type:tr.SET_DISPUTES,query:e,data:t}}function Er(e,t){return{type:tr.SET_DISPUTES_SUMMARY,query:e,data:t}}function*gr(e){const{id:t,payment_intent:r}=e;try{yield Ae.controls.dispatch(De,"startResolution","getDispute",[t]);const e=yield(0,Ie.apiFetch)({path:`${Ne}/disputes/${t}/close`,method:"post"});yield yr(e),yield _r(r),yield Ae.controls.dispatch(De,"finishResolution","getDispute",[t]);const o=e.order?(0,q.sprintf)((0,q.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),e.order.number):(0,q.__)("You have accepted the dispute.","woocommerce-payments");yield Ae.controls.dispatch("core/notices","createSuccessNotice",o)}catch(e){const r=(0,q.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments");yield Ae.controls.dispatch("core/notices","createErrorNotice",r),yield Ae.controls.dispatch(De,"finishResolution","getDispute",[t])}}const fr=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:be(e.dateBefore,!0),date_after:be(e.dateAfter),date_between:e.dateBetween&&[be(e.dateBetween[0]),be(e.dateBetween[1],!0)],search:"awaiting_response"===e.filter?W:e.search,status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.locale}),wr=`${Ne}/disputes/download`;function Tr(e){return(0,Re.addQueryArgs)(wr,fr(e))}function*Rr(e){const t=(0,Re.addQueryArgs)(`${Ne}/disputes/${e}`);try{const e=yield(0,Ie.apiFetch)({path:t});yield yr(e)}catch(t){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving dispute.","woocommerce-payments")),yield hr(e,void 0,t)}}function*Or(e){const t=(0,Re.addQueryArgs)(`${Ne}/disputes`,{page:e.paged,pagesize:e.perPage,sort:(0,re.snakeCase)(e.orderBy),direction:e.order,...fr(e)});try{const r=yield(0,Ie.apiFetch)({path:t})||{};yield Sr(e,r.data)}catch(e){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving disputes.","woocommerce-payments"))}}function*vr(e){const t=(0,Re.addQueryArgs)(`${Ne}/disputes/summary`,{page:e.paged,pagesize:e.perPage,...fr(e)});try{const r=yield(0,Ie.apiFetch)({path:t});yield Er(e,r)}catch(e){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving the summary of disputes.","woocommerce-payments"))}}const br={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"},Ar={isDirty:!1,isSaving:!1,savingError:null,data:{}},Ir={},Nr=[],Dr=e=>e&&e.settings||Ir,Cr=e=>Dr(e).data||Ir,Fr=e=>Cr(e).duplicated_payment_method_ids||Ir,Mr=e=>Cr(e).is_wcpay_enabled||!1,Pr=e=>Cr(e).enabled_payment_method_ids||Nr,Ur=e=>Cr(e).available_payment_method_ids||Nr,jr=e=>Cr(e).payment_method_statuses||Ir,xr=e=>Dr(e).isSaving||!1,kr=e=>Dr(e).isDirty||!1,Lr=e=>Cr(e).account_statement_descriptor||"",qr=e=>Cr(e).account_statement_descriptor_kanji||"",zr=e=>Cr(e).account_statement_descriptor_kana||"",Yr=e=>Cr(e).account_business_support_email||"",$r=e=>Cr(e).account_business_support_phone||"",Br=e=>Cr(e).account_domestic_currency||"",Hr=e=>Cr(e).deposit_schedule_interval||"",Vr=e=>Cr(e).deposit_schedule_weekly_anchor||"",Wr=e=>Cr(e).deposit_schedule_monthly_anchor||"",Qr=e=>Cr(e).deposit_delay_days||"7",Gr=e=>Cr(e).deposit_completed_waiting_period||!1,Zr=e=>Cr(e).deposit_status||"",Kr=e=>Cr(e).deposit_restrictions||"",Jr=e=>Cr(e).is_manual_capture_enabled||!1,Xr=e=>Cr(e).is_test_mode_enabled||!1,eo=e=>Cr(e).is_test_mode_onboarding||!1,to=e=>Cr(e).is_dev_mode_enabled||!1,ro=e=>Cr(e).is_payment_request_enabled||!1,oo=e=>Cr(e).is_debug_log_enabled||!1,no=e=>Cr(e).is_multi_currency_enabled||!1,ao=e=>Cr(e).payment_request_enabled_locations||Nr,so=e=>Cr(e).payment_request_button_type||"",io=e=>Cr(e).payment_request_button_size||"",co=e=>Cr(e).payment_request_button_theme||"",uo=e=>{const t=Cr(e)?.payment_request_button_border_radius;return 0===t||"0"===t||t?t:"undefined"==typeof wcpaySettings?4:parseInt(window?.wcpaySettings?.defaultExpressCheckoutBorderRadius||4,10)},lo=e=>Cr(e).is_saved_cards_enabled||!1,mo=e=>Dr(e).savingError,po=e=>Cr(e).is_card_present_eligible||!1,_o=e=>Cr(e).is_wcpay_subscriptions_enabled||!1,yo=e=>Cr(e).is_wcpay_subscriptions_eligible||!1,ho=e=>Cr(e).is_subscriptions_plugin_active||!1,So=e=>Cr(e).is_woopay_enabled||!1,Eo=e=>Cr(e).is_woopay_global_theme_support_enabled||!1,go=e=>Cr(e).woopay_custom_message||"",fo=e=>Cr(e).woopay_store_logo||"",wo=e=>Cr(e).woopay_enabled_locations||Nr,To=e=>Cr(e).current_protection_level||"basic",Ro=e=>Cr(e).advanced_fraud_protection_settings||Nr,Oo=e=>Cr(e).show_woopay_incompatibility_notice||!1,vo=e=>Cr(e).is_stripe_billing_enabled||!1,bo=e=>Cr(e).is_migrating_stripe_billing||!1,Ao=e=>Cr(e).stripe_billing_subscription_count||0,Io=e=>Cr(e).stripe_billing_migrated_count||0,No=window.wp.apiFetch;var Do=r.n(No);function Co(e){return{type:br.SET_SETTINGS_VALUES,payload:e}}function Fo(e){return Co({is_saved_cards_enabled:e})}function Mo(e){return Co({is_card_present_eligible:e})}function Po(e){return Co({payment_request_button_type:e})}function Uo(e){return Co({payment_request_button_size:e})}function jo(e){return Co({payment_request_button_theme:e})}function xo(e){return Co({payment_request_button_border_radius:e})}function ko(e){return{type:br.SET_SETTINGS,data:e}}function Lo(e){return Co({is_wcpay_enabled:e})}function qo(e){return Co({is_payment_request_enabled:e})}function zo(e){return Co({enabled_payment_method_ids:[...e]})}function Yo(e,t){return{type:br.SET_IS_SAVING_SETTINGS,isSaving:e,error:t}}function $o(e){return{type:br.SET_SELECTED_PAYMENT_METHOD,id:e}}function Bo(e){return{type:br.SET_UNSELECTED_PAYMENT_METHOD,id:e}}function Ho(e){return Co({is_manual_capture_enabled:e})}function Vo(e){return Co({is_test_mode_enabled:e})}function Wo(e){return Co({is_debug_log_enabled:e})}function Qo(e){return Co({is_multi_currency_enabled:e})}function Go(e){return Co({is_wcpay_subscriptions_enabled:e})}function Zo(e){return Co({account_statement_descriptor:e})}function Ko(e){return Co({account_statement_descriptor_kanji:e})}function Jo(e){return Co({account_statement_descriptor_kana:e})}function Xo(e){return Co({account_business_support_email:e})}function en(e){return Co({account_business_support_phone:e})}function tn(e){return Co({deposit_schedule_interval:e})}function rn(e){return Co({deposit_schedule_weekly_anchor:e})}function on(e){return Co({deposit_schedule_monthly_anchor:""===e?null:parseInt(e,10)})}function*nn(){let e=null;try{const e=(0,Ae.select)(De).getSettings();yield Yo(!0,null);const t=yield(0,Ie.apiFetch)({path:`${Ne}/settings`,method:"post",data:e});yield Co({payment_method_statuses:t.data.payment_method_statuses}),yield(0,Ae.dispatch)("core/notices").createSuccessNotice((0,q.__)("Settings saved.","woocommerce-payments"))}catch(t){e=t,yield(0,Ae.dispatch)("core/notices").createErrorNotice((0,q.__)("Error saving settings.","woocommerce-payments")),e.server_error&&(yield(0,Ae.dispatch)("core/notices").createErrorNotice(e.server_error))}finally{yield Yo(!1,e)}return null===e}function an(e){return Co({payment_request_enabled_locations:[...e]})}function sn(e){return Co({is_woopay_enabled:e})}function cn(e){return Co({is_woopay_global_theme_support_enabled:e})}function un(e){return Co({woopay_custom_message:e})}function dn(e){return Co({woopay_store_logo:e})}function ln(e){return Co({woopay_enabled_locations:[...e]})}function mn(e){return Co({current_protection_level:e})}function pn(e){return Co({advanced_fraud_protection_settings:e})}function _n(e){return Co({is_stripe_billing_enabled:e})}function*yn(){try{yield(0,Ae.dispatch)(De).startResolution("scheduleStripeBillingMigration"),yield(0,Ie.apiFetch)({path:`${Ne}/settings/schedule-stripe-billing-migration`,method:"post"})}catch(e){yield(0,Ae.dispatch)("core/notices").createErrorNotice((0,q.__)("Error starting the Stripe Billing migration.","woocommerce-payments"))}yield(0,Ae.dispatch)(De).finishResolution("scheduleStripeBillingMigration")}function hn(e,t){Do()({path:`${Ne}/settings/${e}`,method:"post",data:{value:t}}).catch((()=>{(0,Ae.dispatch)("core/notices").createErrorNotice((0,q.__)("Error saving option","woocommerce-payments"))}))}function*Sn(){const e=`${Ne}/settings`;try{const t=yield(0,Ie.apiFetch)({path:e});yield ko(t)}catch(e){yield(0,Ae.dispatch)("core/notices").createErrorNotice((0,q.__)("Error retrieving settings.","woocommerce-payments"))}}const En={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"},gn=(e,t)=>e.readers[t]&&e.readers[t].data?e.readers[t].data:{},fn=(e,t)=>e.readers[t]&&e.readers[t].error?e.readers[t].error:{},wn=e=>e.readers&&e.readers.list?e.readers.list:{};function Tn(e,t){return{type:En.SET_CARD_READER_STATS,id:e,data:t}}function Rn(e,t){return{type:En.SET_READERS,query:e,data:t}}function On(e,t,r){return{type:En.SET_CARD_ERROR_FOR_READER_STATS,id:e,data:t,error:r}}function vn(e,t){return{type:En.SET_CARD_ERROR_FOR_READERS,data:e,error:t}}function*bn(e,t){try{const r=yield(0,Ie.apiFetch)({path:`${Ne}/readers/charges/${t}`});yield Tn(e,r)}catch(t){yield On(e,null,t)}}function*An(e){const t=(0,Re.addQueryArgs)(`${Ne}/readers`,{limit:e.limit});try{const r=yield(0,Ie.apiFetch)({path:t})||{};yield Rn(e,r)}catch(e){yield vn(null,e)}}var In;!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"}(In||(In={}));const Nn=In,Dn={},Cn=e=>e&&e.capital||{},Fn=e=>Cn(e).summary,Mn=e=>Cn(e).summaryError,Pn=e=>Cn(e).loans||[],Un=e=>Cn(e).loansError;function jn(e){return{type:Nn.SET_ACTIVE_LOAN_SUMMARY,data:e}}function xn(e){return{type:Nn.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY,error:e}}function kn(e){return{type:Nn.SET_LOANS,data:e.data}}function Ln(e){return{type:Nn.SET_ERROR_FOR_LOANS,error:e}}function*qn(){const e=`${Ne}/capital/active_loan_summary`;try{const t=yield(0,Ie.apiFetch)({path:e});yield jn(t)}catch(e){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield xn(e)}}function*zn(){const e=`${Ne}/capital/loans`;try{const t=yield(0,Ie.apiFetch)({path:e});yield kn(t)}catch(e){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield Ln(e)}}const Yn={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"},$n={summary:{}},Bn=e=>e&&e.documents||{},Hn=(e,t)=>{const r=Fe(t);return Bn(e)[r]||{}},Vn=(e,t)=>Hn(e,t).data||[],Wn=(e,t)=>Hn(e,t).error||{},Qn=(e,t)=>{const r=Fe(t);return Bn(e).summary[r]||{}},Gn=(e,t)=>Qn(e,t).data||{},Zn=(e,t)=>Qn(e,t).error||{};function Kn(e,t){return{type:Yn.SET_DOCUMENTS,query:e,data:t}}function Jn(e,t,r){return{type:Yn.SET_ERROR_FOR_DOCUMENTS,query:e,data:t,error:r}}function Xn(e,t){return{type:Yn.SET_DOCUMENTS_SUMMARY,query:e,data:t}}function ea(e,t,r){return{type:Yn.SET_ERROR_FOR_DOCUMENTS_SUMMARY,query:e,data:t,error:r}}const ta=e=>({user_email:e.userEmail,match:e.match,date_before:be(e.dateBefore,!0),date_after:be(e.dateAfter),date_between:e.dateBetween&&[be(e.dateBetween[0]),be(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot});function*ra(e){const t=(0,Re.addQueryArgs)(`${Ne}/documents`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...ta(e)});try{const r=yield(0,Ie.apiFetch)({path:t});yield Kn(e,r.data||[])}catch(t){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving documents.","woocommerce-payments")),yield Jn(e,null,t)}}function*oa(e){const t=(0,Re.addQueryArgs)(`${Ne}/documents/summary`,ta(e));try{const r=yield(0,Ie.apiFetch)({path:t});yield Xn(e,r)}catch(t){yield ea(e,null,t)}}const na={},aa=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},sa=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}},ia={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"},ca={summary:{},byId:{},isRequesting:!1},ua=e=>e&&e.authorizations||{},da=(e,t)=>{const r=Fe(t);return ua(e)[r]||{}},la=(e,t)=>da(e,t).data||[],ma=(e,t)=>(ua(e).byId||{})[t],pa=(e,t)=>da(e,t).error||{},_a=(e,t)=>{const r=Fe(t);return ua(e).summary[r]||{}},ya=(e,t)=>_a(e,t).data||{},ha=(e,t)=>_a(e,t).error||{},Sa=e=>ua(e).isRequesting,Ea=e=>{var t;const r={wcpay_missing_order:(0,q.__)("The order could not be found.","woocommerce-payments"),wcpay_refunded_order_uncapturable:(0,q.__)("Payment cannot be processed for partially or fully refunded orders.","woocommerce-payments"),wcpay_intent_order_mismatch:(0,q.__)("The payment cannot be processed due to a mismatch with order details.","woocommerce-payments"),wcpay_payment_uncapturable:(0,q.__)("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,n;if(!(null===(r=null===(t=e.data)||void 0===t?void 0:t.extra_details)||void 0===r?void 0:r.minimum_amount)||!(null===(n=null===(o=e.data)||void 0===o?void 0:o.extra_details)||void 0===n?void 0:n.minimum_amount_currency))return(0,q.__)("The payment amount is too small to be processed.","woocommerce-payments");const a=e.data.extra_details.minimum_amount_currency,s=ne(e.data.extra_details.minimum_amount,a);return(0,q.sprintf)((0,q.__)("The minimum amount that can be processed is %1$s %2$s.","woocommerce-payments"),s,a.toUpperCase())})(e):(0,q.__)("The payment capture failed to complete.","woocommerce-payments")},wcpay_cancel_error:(0,q.__)("The payment cancellation failed to complete.","woocommerce-payments"),wcpay_server_error:(0,q.__)("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,q.__)("Unable to process the payment. Please try again later.","woocommerce-payments")};function ga(e,t){return{type:ia.SET_AUTHORIZATIONS,data:t,query:e}}function fa(e,t){return{type:ia.SET_ERROR_FOR_AUTHORIZATIONS,query:e,error:t}}function wa(e){return{type:ia.SET_AUTHORIZATION,data:e}}function Ta(e,t){return{type:ia.SET_AUTHORIZATIONS_SUMMARY,data:t,query:e}}function Ra(e){return{type:ia.SET_IS_REQUESTING_AUTHORIZATION,data:e}}function*Oa(e,t){try{yield Ae.controls.dispatch(De,"startResolution","getAuthorization",[e]),yield Ae.controls.dispatch(De,"setIsRequestingAuthorization",!0);const r=yield(0,Ie.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 wa(o),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getAuthorizations"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getTimeline"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getTransactions"),yield Ae.controls.dispatch("core/notices","createSuccessNotice",(0,q.sprintf)((0,q.__)("Payment for order #%s captured successfully.","woocommerce-payments"),t))}catch(e){const r=(0,q.sprintf)((0,q.__)("There has been an error capturing the payment for order #%s.","woocommerce-payments"),t),o=Ea(e);yield Ae.controls.dispatch("core/notices","createErrorNotice",`${r} ${o}`)}finally{yield Ae.controls.dispatch(De,"finishResolution","getAuthorization",[e]),yield Ae.controls.dispatch(De,"setIsRequestingAuthorization",!1)}}function*va(e,t){try{yield Ae.controls.dispatch(De,"startResolution","getAuthorization",[e]),yield Ae.controls.dispatch(De,"setIsRequestingAuthorization",!0);const r=yield(0,Ie.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 wa(o),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getAuthorizations"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getTimeline"),yield Ae.controls.dispatch(De,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Ae.controls.dispatch("core/notices","createSuccessNotice",(0,q.sprintf)((0,q.__)("Payment for order #%s canceled successfully.","woocommerce-payments"),t))}catch(e){const r=(0,q.sprintf)((0,q.__)("There has been an error canceling the payment for order #%s.","woocommerce-payments"),t),o=Ea(e);yield Ae.controls.dispatch("core/notices","createErrorNotice",`${r} ${o}`)}finally{yield Ae.controls.dispatch(De,"finishResolution","getAuthorization",[e]),yield Ae.controls.dispatch(De,"setIsRequestingAuthorization",!1)}}function ba(e,t){return{type:ia.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY,query:e,error:t}}function*Aa(e){var t;let{paged:r=1,per_page:o=25,orderby:n="created",order:a="asc"}=e;"capture_by"===n&&(n="created");const s=(0,Re.addQueryArgs)(`${Ne}/authorizations`,{page:r,pagesize:o,sort:n,direction:a});try{const r=yield(0,Ie.apiFetch)({path:s});yield ga(e,null!==(t=r.data)&&void 0!==t?t:[])}catch(t){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield fa(e,t)}}function*Ia(e){try{if(e){const t=yield(0,Ie.apiFetch)({path:`${Ne}/authorizations/${e}`}),{is_captured:r,payment_intent_id:o,created:n}=t;yield wa({payment_intent_id:o,captured:r,created:n})}}catch(e){"authorization_missing"!==e.code&&(yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving authorization.","woocommerce-payments")))}}function*Na(e){const t=(0,Re.addQueryArgs)(`${Ne}/authorizations/summary`,{pagesize:e.per_page,sort:e.orderby,direction:e.order,page:e.paged});try{const r=yield(0,Ie.apiFetch)({path:t});yield Ta(e,null!=r?r:[])}catch(t){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield ba(e,t)}}var Da;!function(e){e.SET_FILE="SET_FILE",e.SET_ERROR_FOR_FILES="SET_ERROR_FOR_FILES"}(Da||(Da={}));const Ca=Da,Fa={},Ma=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},Pa=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}};function Ua(e,t){return{type:Ca.SET_FILE,id:e,data:t}}function ja(e,t){return{type:Ca.SET_ERROR_FOR_FILES,id:e,error:t}}function*xa(e){try{const t=yield(0,Ie.apiFetch)({path:`${Ne}/file/${e}/details`});yield Ua(e,t)}catch(t){yield Ae.controls.dispatch("core/notices","createErrorNotice",(0,q.__)("Error retrieving file.","woocommerce-payments")),yield ja(e,t)}}function ka(e,t={}){const{customFormat:r=null,includeTime:o=!1,separator:n=" / ",timezone:a}=t,s=$().utc(e).toISOString(),i=r||`${window.wcpaySettings.dateFormat}${o?`${n}${window.wcpaySettings.timeFormat}`:""}`;return(0,Oe.dateI18n)(i,s,a)}(0,Ae.registerStore)(De,{reducer:(0,Ae.combineReducers)({deposits:(e=Me,{type:t,query:r={},data:o=[],error:n})=>{const a=Fe(r);switch(t){case Ce.SET_DEPOSIT:return{...e,byId:{...e.byId,[o.id]:o}};case Ce.SET_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,data:o}};case Ce.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,error:n}};case Ce.SET_DEPOSITS:return{...e,byId:{...e.byId,...(0,re.keyBy)(o,"id")},queries:{...e.queries,[a]:{data:(0,re.map)(o,"id")}}};case Ce.SET_DEPOSITS_COUNT:return{...e,count:o};case Ce.SET_ERROR_FOR_DEPOSIT_QUERY:return{...e,queries:{...e.queries,[a]:{error:n}}};case Ce.SET_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:o}}};case Ce.SET_ERROR_FOR_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:n}}};case Ce.SET_INSTANT_DEPOSIT:return{...e,instant:{...e.instant,data:o}}}return e},transactions:(e=dt,{type:t,query:r={},data:o=[],error:n,status:a})=>{const s=Fe(r);switch(t){case ut.SET_TRANSACTIONS:return{...e,[s]:{data:o}};case ut.SET_ERROR_FOR_TRANSACTIONS:return{...e,[s]:{error:n}};case ut.SET_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[s]:{data:o}}};case ut.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[s]:{error:n}}};case ut.SET_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[s]:{data:o}}}};case ut.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[s]:{error:n}}}};case ut.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[s]:{data:o}}}}};case ut.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[s]:{error:n}}}}}}return e},charges:(e={},{type:t,id:r,data:o,error:n})=>{switch(t){case qt.SET_CHARGE:e={...e,[r]:{...e[r],data:o}};break;case qt.SET_ERROR_FOR_CHARGE:e={...e,[r]:{...e[r],error:n}}}return e},timeline:(e={},{type:t,id:r,data:o,error:n})=>{switch(t){case Gt.SET_TIMELINE:e={...e,[r]:{data:o}};break;case Gt.SET_ERROR_FOR_TIMELINE:e={...e,[r]:{...e[r],error:n}}}return e},disputes:(e=rr,{type:t,query:r={},data:o=[],id:n,error:a})=>{const s=Fe(r);switch(t){case tr.SET_DISPUTE:return{...e,byId:{...e.byId,[o.id]:o}};case tr.SET_ERROR_FOR_DISPUTE:e={...e,byId:{...e.byId,[n]:{error:a}}};break;case tr.SET_DISPUTES:return{...e,cached:{...e.cached,...(0,re.keyBy)(o,"dispute_id")},queries:{...e.queries,[s]:{data:(0,re.map)(o,"dispute_id")}}};case tr.SET_DISPUTES_SUMMARY:return{...e,summary:{...e.summary,[s]:{data:o}}}}return e},settings:(e=Ar,{type:t,...r})=>{switch(t){case br.SET_SETTINGS:return{...e,data:r.data,isDirty:!1};case br.SET_SETTINGS_VALUES:return{...e,savingError:null,isDirty:!0,data:{...e.data,...r.payload}};case br.SET_IS_SAVING_SETTINGS:return{...e,isDirty:!(!r.isSaving&&!r.error)&&e.isDirty,isSaving:r.isSaving,savingError:r.error};case br.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 br.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:n})=>{switch(t){case En.SET_CARD_READER_STATS:e={...e,[r]:{...e[r],data:o}};break;case En.SET_ERROR_FOR_CARD_READER_STATS:e={...e,[r]:{...e[r],error:n}};break;case En.SET_READERS:e={...e,list:o}}return e},capital:(e=Dn,t)=>{switch(t.type){case Nn.SET_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:t.data,summaryError:void 0});case Nn.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:void 0,summaryError:t.error});case Nn.SET_LOANS:return Object.assign(Object.assign({},e),{loans:t.data,loansError:void 0});case Nn.SET_ERROR_FOR_LOANS:return Object.assign(Object.assign({},e),{loans:void 0,loansError:t.error})}return e},documents:(e=$n,{type:t,query:r={},data:o=[],error:n})=>{const a=Fe(r);switch(t){case Yn.SET_DOCUMENTS:return{...e,[a]:{data:o}};case Yn.SET_ERROR_FOR_DOCUMENTS:return{...e,[a]:{error:n}};case Yn.SET_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:o}}};case Yn.SET_ERROR_FOR_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:n}}}}return e},paymentIntents:(e=na,t)=>{const{type:r,id:o}=t;switch(r){case dr.SET_PAYMENT_INTENT:return Object.assign(Object.assign({},e),{[o]:Object.assign(Object.assign({},e[o]),{data:t.data})});case dr.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=ca,t)=>{switch(t.type){case ia.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 ia.SET_AUTHORIZATIONS:{const{data:r,query:o}=t;return Object.assign(Object.assign({},e),{[Fe(o)]:{data:r}})}case ia.SET_ERROR_FOR_AUTHORIZATIONS:{const{error:r,query:o}=t;return Object.assign(Object.assign({},e),{[Fe(o)]:{error:r}})}case ia.SET_AUTHORIZATIONS_SUMMARY:{const{data:r,query:o}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[Fe(o)]:{data:r||{}}})})}case ia.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:{const{query:r,error:o}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[Fe(r)]:{error:o||""}})})}case ia.SET_IS_REQUESTING_AUTHORIZATION:{const{data:r}=t;return Object.assign(Object.assign({},e),{isRequesting:r})}}return e},files:(e=Fa,t)=>{const{type:r,id:o}=t;switch(r){case Ca.SET_FILE:return Object.assign(Object.assign({},e),{[o]:Object.assign(Object.assign({},e[o]),{data:t.data})});case Ca.SET_ERROR_FOR_FILES:return Object.assign(Object.assign({},e),{[o]:Object.assign(Object.assign({},e[o]),{error:t.error})});default:return e}}}),actions:{...t,...a,...c,...l,...h,...g,...T,...v,...I,..._,...F,...U},controls:Ie.controls,selectors:{...e,...n,...i,...d,...p,...E,...w,...O,...A,...D,...C,...P},resolvers:{...o,...s,...u,...m,...S,...f,...R,...b,...N,...y,...M,...j}});var La=r(4848);const qa=({isPreDisputeInquiry:e,disputeReason:t,formattedAmount:r,dueBy:o,countdownDays:n})=>{const a=e?(0,q.__)("Please resolve the inquiry on this order of %1$s labeled '%2$s' by %3$s.","woocommerce-payments"):(0,q.__)("Please resolve the dispute on this order of %1$s labeled '%2$s' by %3$s.","woocommerce-payments"),s=(0,q.sprintf)(a,r,H[t].display,ka(o.toISOString()));let i=(0,q.sprintf)((0,q._n)("(%s day left)","(%s days left)",n,"woocommerce-payments"),n);return n<1&&(i=(0,q.__)("(Last day today)","woocommerce-payments")),(0,La.jsxs)(La.Fragment,{children:[(0,La.jsx)("strong",{children:s})," ",i]})},za=({isPreDisputeInquiry:e,disputeReason:t,formattedAmount:r,dueBy:o})=>{const n=e?(0,q.__)("Please resolve the inquiry on this order of %1$s with reason '%2$s'.","woocommerce-payments"):(0,q.__)("This order has a payment dispute for %1$s for the reason '%2$s'. ","woocommerce-payments"),a=(0,q.sprintf)(n,r,H[t].display),s=(0,q.sprintf)((0,q.__)("Please respond before %1$s.","woocommerce-payments"),ka(o.toISOString()));return(0,La.jsxs)(La.Fragment,{children:[(0,La.jsx)("strong",{children:a})," ",s]})},Ya=({disputeReason:e,formattedAmount:t,isPreDisputeInquiry:r,dueBy:o,countdownDays:n,disputeDetailsUrl:a})=>{(0,k.useEffect)((()=>{X("wcpay_order_dispute_notice_view",{is_inquiry:r,dispute_reason:e,due_by_days:n})}),[r,e,n]);const s=n<7,i=n<1?(0,q.__)("Respond today","woocommerce-payments"):(0,q.__)("Respond now","woocommerce-payments"),c=s?(0,La.jsx)(qa,{isPreDisputeInquiry:r,disputeReason:e,formattedAmount:t,dueBy:o,countdownDays:n}):(0,La.jsx)(za,{isPreDisputeInquiry:r,disputeReason:e,formattedAmount:t,dueBy:o});return(0,La.jsx)(fe,{status:n<3?"error":"warning",isDismissible:!1,actions:[{label:i,variant:"secondary",onClick:()=>{X("wcpay_order_dispute_notice_action_click",{due_by_days:n}),window.location=a}}],children:c})},$a=({message:e,disputeDetailsUrl:t})=>(0,La.jsxs)(fe,{status:"warning",isDismissible:!1,children:[e,(0,Te.createInterpolateElement)((0,q.__)(" <a>View details</a>","woocommerce-payments"),{a:(0,La.jsx)("a",{href:t})})]}),Ba=({chargeId:e,onDisableOrderRefund:t})=>{const{data:r}=(e=>(0,Ae.useSelect)((t=>{const r=t(De);return((e,t)=>{const{getCharge:r,isResolving:o,getChargeError:n,hasFinishedResolution:a}=t;return{data:r(e),error:n(e),isLoading:o("getCharge",[e])||!a("getCharge",[e])}})(e,r)}),[e]))(e),o=ve({page:"wc-admin",path:`/payments/${"transactions"}/details`,id:e});(0,k.useEffect)((()=>{const{dispute:e}=r;var o;r?.dispute&&(o=e.status,de(o)||"won"===o||t(e.status))}),[r,t]);const{dispute:n}=r;if(!r?.dispute)return null;if(ue(n.status)&&!de(n.status))return(0,La.jsx)($a,{message:(0,q.__)("This order has an active payment dispute. Refunds and order editing are disabled.","woocommerce-payments"),disputeDetailsUrl:o});if("lost"===n.status)return(0,La.jsx)($a,{message:(0,q.__)("Refunds and order editing have been disabled as a result of a lost dispute.","woocommerce-payments"),disputeDetailsUrl:o});if(!ce(n.status))return null;if(!n.evidence_details?.due_by)return null;const a=$()().utc(),s=$().unix(n.evidence_details?.due_by).utc();return a.isBefore(s)?(0,La.jsx)(Ya,{chargeId:e,disputeReason:n.reason,formattedAmount:ae(n.amount,n.currency),isPreDisputeInquiry:de(n.status),dueBy:s,countdownDays:Math.floor(s.diff(a,"days",!0)),disputeDetailsUrl:o}):null},Ha=window.wp.primitives;const Va=e=>{var{children:t,actions:r,className:o}=e,n=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}(e,["children","actions","className"]);return L().createElement(_e.Modal,Object.assign({className:he("wcpay-confirmation-modal",o)},n),t,L().createElement(Ha.HorizontalRule,{className:"wcpay-confirmation-modal__separator"}),L().createElement("div",{className:"wcpay-confirmation-modal__footer"},r))},Wa=({orderStatus:e,refundAmount:t,formattedRefundAmount:r,refundedAmount:o})=>{const[n,a]=(0,Te.useState)(!0),s=()=>{a(!1)},i=()=>{const t=document.querySelector("#order_status");t.value=e,t.dispatchEvent(new Event("change"))};return(0,La.jsx)(La.Fragment,{children:n&&(0,La.jsx)(Va,{title:(0,q.__)("Refund order in full","woocommerce-payments"),isDismissible:!1,className:"refund-confirmation-modal",actions:(0,La.jsxs)(La.Fragment,{children:[(0,La.jsx)(_e.Button,{variant:"secondary",onClick:()=>{i(),s()},__next40pxDefaultSize:!0,children:(0,q.__)("Cancel","woocommerce-payments")}),(0,La.jsx)(_e.Button,{variant:"primary",onClick:()=>{jQuery.ajax({type:"post",url:woocommerce_admin_meta_boxes.ajax_url,data:{action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce,refund_amount:t,refunded_amount:o,api_refund:!0},beforeSend:function(){jQuery(".refund-confirmation-modal").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},success:function(e){!0===e.success?window.location.reload():(i(),(0,Ae.dispatch)("core/notices").createErrorNotice(e.data.error))},complete:function(){jQuery(".refund-confirmation-modal").unblock(),s()}})},__next40pxDefaultSize:!0,children:(0,q.sprintf)((0,q.__)("Refund %s","woocommerce-payments"),r)})]}),children:(0,La.jsx)("p",{children:(0,q.sprintf)((0,q.__)('Issue a full refund back to your customer\'s payment method using %s. This action can not be undone. To issue a partial refund, click "Cancel", and use the "Refund" button in the order details below.',"woocommerce-payments"),"WooPayments")})})})},Qa=({title:e,confirmButtonText:t,cancelButtonText:r,confirmationMessage:o,onConfirm:n,onCancel:a})=>{const[s,i]=(0,Te.useState)(!0),c=()=>{i(!1)},u=L().createElement(L().Fragment,null,L().createElement(_e.Button,{variant:"secondary",onClick:()=>{a(),c()}},r),L().createElement(_e.Button,{variant:"primary",onClick:()=>{n(),c()}},t));return L().createElement(L().Fragment,null,s&&L().createElement(Va,{title:e,isDismissible:!1,className:"generic-confirmation-modal",actions:u,onRequestClose:()=>!1},L().createElement("p",null,o)))},Ga={CANCELLED:(0,q.__)("cancelled","woocommerce-payments"),COMPLETED:(0,q.__)("completed","woocommerce-payments"),FAILED:(0,q.__)("failed","woocommerce-payments"),ON_HOLD:(0,q.__)("on-hold","woocommerce-payments"),PENDING:(0,q.__)("pending","woocommerce-payments"),PROCESSING:(0,q.__)("processing","woocommerce-payments"),REFUNDED:(0,q.__)("refunded","woocommerce-payments"),TRASH:(0,q.__)("trash","woocommerce-payments")},Za="wc-cancelled",Ka="wc-completed",Ja="wc-failed",Xa="wc-on-hold",es="wc-pending",ts="wc-processing",rs="wc-refunded",os="wc-trash",ns={[Za]:Ga.CANCELLED,[Ka]:Ga.COMPLETED,[Ja]:Ga.FAILED,[Xa]:Ga.ON_HOLD,[es]:Ga.PENDING,[ts]:Ga.PROCESSING,[rs]:Ga.REFUNDED,[os]:Ga.TRASH};function as(e){const t=document.createElement("div");t.id="wcpay-orderstatus-confirm-container",document.body.appendChild(t),(0,x.H)(t).render(e)}function ss(){console.log("No specific action defined for this status change.")}const is={[Za]:function(e,t){if(e===Za)return;const r=z("hasOpenAuthorization"),o=z("canRefund"),n=z("refundAmount");if(r&&function(e,t){const r=pe({mixedString:(0,q.__)("This order has been {{authorizedNotCaptured/}} yet. Changing the status to {{newOrderStatus/}} will also {{cancelAuthorization/}}. Do you want to continue?","woocommerce-payments"),components:{authorizedNotCaptured:L().createElement("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#authorize-vs-capture",rel:"noopener noreferrer"},(0,q.__)("authorized but payment has not been captured","woocommerce-payments")),cancelAuthorization:L().createElement("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#cancelling-authorizations",rel:"noopener noreferrer"},(0,q.__)("cancel the payment","woocommerce-payments")),newOrderStatus:L().createElement("b",null,ns[t])}});as(L().createElement(Qa,{title:(0,q.__)("Cancel payment","woocommerce-payments"),confirmButtonText:(0,q.__)("Cancel order and payment","woocommerce-payments"),cancelButtonText:(0,q.__)("Cancel","woocommerce-payments"),confirmationMessage:r,onConfirm:()=>{var e;const t=(null===(e=document.querySelector("#order_status"))||void 0===e?void 0:e.closest("form"))||null;null!==t&&t.submit()},onCancel:()=>{const t=document.querySelector("#order_status");null!==t&&(t.value=e,t.dispatchEvent(new Event("change")))}}))}(e,t),!r&&o&&n>0){const t=pe({mixedString:(0,q.__)("Are you trying to issue a refund for this order? If so, please click {{doNothingBold/}} and see our documentation on {{howtoIssueRefunds/}}. If you want to mark this order as Cancelled without issuing a refund, click {{cancelOrderBold/}}.","woocommerce-payments"),components:{doNothingBold:L().createElement("b",null,(0,q.__)("Do Nothing","woocommerce-payments")),cancelOrderBold:L().createElement("b",null,(0,q.__)("Cancel order","woocommerce-payments")),howtoIssueRefunds:L().createElement("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/managing-money/#refunds",rel:"noopener noreferrer"},(0,q.__)("how to issue refunds","woocommerce-payments"))}});as(L().createElement(Qa,{title:(0,q.__)("Cancel order","woocommerce-payments"),confirmButtonText:(0,q.__)("Cancel order","woocommerce-payments"),cancelButtonText:(0,q.__)("Do Nothing","woocommerce-payments"),confirmationMessage:t,onConfirm:()=>{var e;const t=(null===(e=document.querySelector("#order_status"))||void 0===e?void 0:e.closest("form"))||null;null!==t&&t.submit()},onCancel:()=>{const t=document.querySelector("#order_status");null!==t&&(t.value=e,t.dispatchEvent(new Event("change")))}}))}},[Ka]:function(e,t){e!==Ka&&z("hasOpenAuthorization")&&function(e,t){const r=pe({mixedString:(0,q.__)("This order has been {{authorizedNotCaptured/}} yet. Changing the status to {{newOrderStatus/}} will also {{captureAuthorization/}}. Do you want to continue?","woocommerce-payments"),components:{authorizedNotCaptured:L().createElement("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#authorize-vs-capture",rel:"noopener noreferrer"},(0,q.__)("authorized but payment has not been captured","woocommerce-payments")),captureAuthorization:L().createElement("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#capturing-authorized-payments",rel:"noopener noreferrer"},(0,q.__)("capture the payment","woocommerce-payments")),newOrderStatus:L().createElement("b",null,ns[t])}});as(L().createElement(Qa,{title:(0,q.__)("Capture payment","woocommerce-payments"),confirmButtonText:(0,q.__)("Complete order and capture payment","woocommerce-payments"),cancelButtonText:(0,q.__)("Cancel","woocommerce-payments"),confirmationMessage:r,onConfirm:()=>{var e;const t=(null===(e=document.querySelector("#order_status"))||void 0===e?void 0:e.closest("form"))||null;null!==t&&t.submit()},onCancel:()=>{const t=document.querySelector("#order_status");null!==t&&(t.value=e,t.dispatchEvent(new Event("change")))}}))}(e,t)},[rs]:function(e){e!==rs&&function(e,t,r){t?r<=0?(0,Ae.dispatch)("core/notices").createErrorNotice((0,q.__)("Invalid Refund Amount","woocommerce-payments")):as(L().createElement(Wa,{orderStatus:e,refundAmount:r,formattedRefundAmount:z("formattedRefundAmount"),refundedAmount:z("refundedAmount")})):(0,Ae.dispatch)("core/notices").createErrorNotice((0,q.__)("Order cannot be refunded","woocommerce-payments"))}(e,z("canRefund"),z("refundAmount"))}};function cs(e){const t=document.querySelector("button.refund-items");if(!t)return;t.disabled=!0;let r="";ce(e)?r=(0,q.__)("Refunds and order editing are disabled during disputes.","woocommerce-payments"):ue(e)?r=(0,q.__)("Refunds and order editing are disabled during an active dispute.","woocommerce-payments"):"lost"===e&&(r=(0,q.__)("Refunds and order editing have been disabled as a result of a lost dispute.","woocommerce-payments")),jQuery(t).parent().find(".woocommerce-help-tip").attr({title:r,"aria-label":r}).tipTip()}jQuery((function(e){var t,r;const o=null!==(t=z("disableManualRefunds"))&&void 0!==t&&t,n=null!==(r=z("manualRefundsTip"))&&void 0!==r?r:"",a=z("chargeId"),s=z("testMode"),i=""!==z("orderTestModeMatch");!function(){const e=document.querySelector("#wcpay-order-payment-details-container");e&&(0,x.H)(e).render((0,La.jsxs)(La.Fragment,{children:[s&&(0,La.jsx)(we,{}),a&&i&&(0,La.jsx)(Ba,{chargeId:a,onDisableOrderRefund:cs})]}))}(),e("#woocommerce-order-items").on("click","button.refund-items",(function(){const t=e(".do-manual-refund");o?t.hide():t.attr({title:n}).tipTip()})),e("select#order_status").on("change",(function(){let t=e("input#original_post_status").val()||e("input#original_order_status").val();var r;t&&!t.startsWith("wc-")&&(t="wc-"+t),(r=this.value,is[r]||ss)(t,this.value)}))}))})()})();
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка