/
home
/
altere25
/
labratnyc.com
/
wp-content
/
plugins
/
woocommerce-payments
/
dist
/
/home/altere25/labratnyc.com/wp-content/plugins/woocommerce-payments/dist
mkdir
upload
Name
Size
Mode
Actions
chunks/
-
0755
rm
007b2705c0a8f69dfdf6.png
70857
0644
edit
dl
rm
9d5328fb490cddd43f66.png
174369
0644
edit
dl
rm
4873-rtl.css
76114
0644
edit
dl
rm
4873.css
76110
0644
edit
dl
rm
blocks-checkout-rtl.css
19628
0644
edit
dl
rm
blocks-checkout.asset.php
304
0644
edit
dl
rm
blocks-checkout.css
19613
0644
edit
dl
rm
blocks-checkout.js
166215
0644
edit
dl
rm
cart-block-rtl.css
190
0644
edit
dl
rm
cart-block.asset.php
174
0644
edit
dl
rm
cart-block.css
189
0644
edit
dl
rm
cart-block.js
47603
0644
edit
dl
rm
cart.asset.php
167
0644
edit
dl
rm
cart.js
16056
0644
edit
dl
rm
checkout-rtl.css
4871
0644
edit
dl
rm
checkout.asset.php
124
0644
edit
dl
rm
checkout.css
4873
0644
edit
dl
rm
checkout.js
98977
0644
edit
dl
rm
express-checkout-rtl.css
1203
0644
edit
dl
rm
express-checkout.asset.php
192
0644
edit
dl
rm
express-checkout.css
1203
0644
edit
dl
rm
express-checkout.js
34477
0644
edit
dl
rm
frontend-tracks.asset.php
113
0644
edit
dl
rm
frontend-tracks.js
1577
0644
edit
dl
rm
index-rtl.css
20933
0644
edit
dl
rm
index.asset.php
487
0644
edit
dl
rm
index.css
20924
0644
edit
dl
rm
index.js
139288
0644
edit
dl
rm
index.js.LICENSE.txt
188
0644
edit
dl
rm
multi-currency-analytics.asset.php
120
0644
edit
dl
rm
multi-currency-analytics.js
2455
0644
edit
dl
rm
multi-currency-async-renderer-rtl.css
596
0644
edit
dl
rm
multi-currency-async-renderer.asset.php
97
0644
edit
dl
rm
multi-currency-async-renderer.css
595
0644
edit
dl
rm
multi-currency-async-renderer.js
21065
0644
edit
dl
rm
multi-currency-async-renderer.js.LICENSE.txt
83
0644
edit
dl
rm
multi-currency-rtl.css
22709
0644
edit
dl
rm
multi-currency-switcher-block.asset.php
275
0644
edit
dl
rm
multi-currency-switcher-block.js
25354
0644
edit
dl
rm
multi-currency.asset.php
342
0644
edit
dl
rm
multi-currency.css
22715
0644
edit
dl
rm
multi-currency.js
57394
0644
edit
dl
rm
order-rtl.css
3690
0644
edit
dl
rm
order.asset.php
332
0644
edit
dl
rm
order.css
3690
0644
edit
dl
rm
order.js
45184
0644
edit
dl
rm
plugins-page-rtl.css
1088
0644
edit
dl
rm
plugins-page.asset.php
215
0644
edit
dl
rm
plugins-page.css
1090
0644
edit
dl
rm
plugins-page.js
4267
0644
edit
dl
rm
product-details-rtl.css
1063
0644
edit
dl
rm
product-details.asset.php
97
0644
edit
dl
rm
product-details.css
1063
0644
edit
dl
rm
product-details.js
39874
0644
edit
dl
rm
reports-balance-rtl.css
11488
0644
edit
dl
rm
reports-balance.css
11477
0644
edit
dl
rm
reports-fees-rtl.css
1
0644
edit
dl
rm
reports-fees.css
1
0644
edit
dl
rm
settings-rtl.css
80367
0644
edit
dl
rm
settings.asset.php
396
0644
edit
dl
rm
settings.css
77785
0644
edit
dl
rm
settings.js
295107
0644
edit
dl
rm
settings.js.LICENSE.txt
188
0644
edit
dl
rm
subscription-edit-page.asset.php
151
0644
edit
dl
rm
subscription-edit-page.js
3151
0644
edit
dl
rm
subscription-product-onboarding-modal-rtl.css
1356
0644
edit
dl
rm
subscription-product-onboarding-modal.asset.php
209
0644
edit
dl
rm
subscription-product-onboarding-modal.css
1356
0644
edit
dl
rm
subscription-product-onboarding-modal.js
3347
0644
edit
dl
rm
subscription-product-onboarding-toast.asset.php
157
0644
edit
dl
rm
subscription-product-onboarding-toast.js
1202
0644
edit
dl
rm
subscriptions-empty-state-rtl.css
122
0644
edit
dl
rm
subscriptions-empty-state.asset.php
185
0644
edit
dl
rm
subscriptions-empty-state.css
122
0644
edit
dl
rm
subscriptions-empty-state.js
3021
0644
edit
dl
rm
success.asset.php
97
0644
edit
dl
rm
success.js
16734
0644
edit
dl
rm
tos-rtl.css
630
0644
edit
dl
rm
tos.asset.php
265
0644
edit
dl
rm
tos.css
629
0644
edit
dl
rm
tos.js
7475
0644
edit
dl
rm
wc-payments-one-and-done-notice-rtl.css
1512
0644
edit
dl
rm
wc-payments-one-and-done-notice.asset.php
210
0644
edit
dl
rm
wc-payments-one-and-done-notice.css
1508
0644
edit
dl
rm
wc-payments-one-and-done-notice.js
7997
0644
edit
dl
rm
wc-payments-post-kyc-activation-notice-rtl.css
1512
0644
edit
dl
rm
wc-payments-post-kyc-activation-notice.asset.php
210
0644
edit
dl
rm
wc-payments-post-kyc-activation-notice.css
1508
0644
edit
dl
rm
wc-payments-post-kyc-activation-notice.js
8380
0644
edit
dl
rm
wc-payments-review-prompt-rtl.css
6234
0644
edit
dl
rm
wc-payments-review-prompt.asset.php
253
0644
edit
dl
rm
wc-payments-review-prompt.css
6232
0644
edit
dl
rm
wc-payments-review-prompt.js
38304
0644
edit
dl
rm
wc-payments-review-prompt.js.LICENSE.txt
188
0644
edit
dl
rm
wc-payments-settings-spotlight-rtl.css
5778
0644
edit
dl
rm
wc-payments-settings-spotlight.asset.php
267
0644
edit
dl
rm
wc-payments-settings-spotlight.css
5776
0644
edit
dl
rm
wc-payments-settings-spotlight.js
37060
0644
edit
dl
rm
wc-payments-settings-spotlight.js.LICENSE.txt
188
0644
edit
dl
rm
wc-payments-test-to-live-notice-rtl.css
1512
0644
edit
dl
rm
wc-payments-test-to-live-notice.asset.php
210
0644
edit
dl
rm
wc-payments-test-to-live-notice.css
1508
0644
edit
dl
rm
wc-payments-test-to-live-notice.js
8002
0644
edit
dl
rm
wcpay-capital-rtl.css
2482
0644
edit
dl
rm
wcpay-capital.css
2482
0644
edit
dl
rm
wcpay-card-readers-rtl.css
5600
0644
edit
dl
rm
wcpay-card-readers.css
5601
0644
edit
dl
rm
wcpay-documents-rtl.css
7933
0644
edit
dl
rm
wcpay-documents.css
7933
0644
edit
dl
rm
wcpay-fraud-protection-rtl.css
4848
0644
edit
dl
rm
wcpay-fraud-protection.css
4847
0644
edit
dl
rm
wcpay-money-movement-rtl.css
51528
0644
edit
dl
rm
wcpay-money-movement.css
51515
0644
edit
dl
rm
wcpay-multi-currency-setup-rtl.css
7961
0644
edit
dl
rm
wcpay-multi-currency-setup.css
7961
0644
edit
dl
rm
wcpay-onboarding-rtl.css
12728
0644
edit
dl
rm
wcpay-onboarding.css
12728
0644
edit
dl
rm
wcpay-overview-rtl.css
24828
0644
edit
dl
rm
wcpay-overview.css
24822
0644
edit
dl
rm
wcpay-payouts-rtl.css
16890
0644
edit
dl
rm
wcpay-payouts.css
16893
0644
edit
dl
rm
wcpay-reports-rtl.css
5607
0644
edit
dl
rm
wcpay-reports.css
5608
0644
edit
dl
rm
woopay-direct-checkout.asset.php
200
0644
edit
dl
rm
woopay-direct-checkout.js
17765
0644
edit
dl
rm
woopay-express-button.asset.php
167
0644
edit
dl
rm
woopay-express-button.js
69297
0644
edit
dl
rm
woopay-rtl.css
32965
0644
edit
dl
rm
woopay.asset.php
224
0644
edit
dl
rm
woopay.css
30374
0644
edit
dl
rm
woopay.js
15835
0644
edit
dl
rm
Edit:
/home/altere25/labratnyc.com/wp-content/plugins/woocommerce-payments/dist/order.js
(45184B)
(()=>{var e={2291(e,t,o){"use strict";t.A=function(e){var t=e.size,o=void 0===t?24:t,n=e.onClick,i=(e.icon,e.className),c=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},s=Object.keys(e);for(n=0;n<s.length;n++)o=s[n],0<=t.indexOf(o)||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)o=s[n],0<=t.indexOf(o)||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,s),u=["gridicon","gridicons-checkmark",i,!1,!1,!1].filter(Boolean).join(" ");return r.default.createElement("svg",a({className:u,height:o,width:o,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),r.default.createElement("g",null,r.default.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414z"})))};var n,r=(n=o(1609))&&n.__esModule?n:{default:n},s=["size","onClick","icon","className"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t,o=1;o<arguments.length;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},a.apply(this,arguments)}},6947(e,t,o){"use strict";t.A=function(e){var t=e.size,o=void 0===t?24:t,n=e.onClick,i=(e.icon,e.className),c=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},s=Object.keys(e);for(n=0;n<s.length;n++)o=s[n],0<=t.indexOf(o)||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)o=s[n],0<=t.indexOf(o)||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,s),u=["gridicon","gridicons-info-outline",i,!!function(e){return 0==e%18}(o)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return r.default.createElement("svg",a({className:u,height:o,width:o,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),r.default.createElement("g",null,r.default.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"})))};var n,r=(n=o(1609))&&n.__esModule?n:{default:n},s=["size","onClick","icon","className"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t,o=1;o<arguments.length;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},a.apply(this,arguments)}},8295(e,t,o){"use strict";t.A=function(e){var t=e.size,o=void 0===t?24:t,n=e.onClick,i=(e.icon,e.className),c=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},s=Object.keys(e);for(n=0;n<s.length;n++)o=s[n],0<=t.indexOf(o)||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)o=s[n],0<=t.indexOf(o)||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,s),u=["gridicon","gridicons-notice-outline",i,!!function(e){return 0==e%18}(o)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return r.default.createElement("svg",a({className:u,height:o,width:o,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),r.default.createElement("g",null,r.default.createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))};var n,r=(n=o(1609))&&n.__esModule?n:{default:n},s=["size","onClick","icon","className"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t,o=1;o<arguments.length;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},a.apply(this,arguments)}},1609(e){"use strict";e.exports=window.React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),o.p=window.wcpayAssets.url,(()=>{"use strict";var e={};o.r(e),o.d(e,{updateCharge:()=>Y,updateErrorForCharge:()=>Q});var t={};o.r(t),o.d(t,{getCharge:()=>Z,getChargeFromOrder:()=>K});var n={};o.r(n),o.d(n,{getCharge:()=>ee,getChargeError:()=>te,getChargeFromOrder:()=>oe,getChargeFromOrderError:()=>ne});const r=window.ReactDOM;var s=o(1609);const a=window.wp.i18n,i=e=>{const t=wcpay_order_config??wc.wcSettings.getSetting("woocommerce_payments_data");return t?.[e]},c=window.moment;var u=o.n(c);const m={bank_cannot_process:{display:(0,a.__)("Bank cannot process","woocommerce-payments")},check_returned:{display:(0,a.__)("Check returned","woocommerce-payments")},credit_not_processed:{display:(0,a.__)("Credit not processed","woocommerce-payments"),overview:[(0,a.__)("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,a.__)("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,a.__)("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,a.__)("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,a.__)("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,a.__)("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,a.__)("The cardholder claims a credit was not processed.","woocommerce-payments")},customer_initiated:{display:(0,a.__)("Customer initiated","woocommerce-payments")},debit_not_authorized:{display:(0,a.__)("Debit not authorized","woocommerce-payments")},duplicate:{display:(0,a.__)("Duplicate","woocommerce-payments"),overview:[(0,a.__)("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,a.__)("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,a.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments")],required:[(0,a.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments")],respond:[(0,a.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),(0,a.__)("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,a.__)("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,a.__)("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,a.__)("The cardholder claims this is a duplicate transaction.","woocommerce-payments")},fraudulent:{display:(0,a.__)("Transaction unauthorized","woocommerce-payments"),overview:[(0,a.__)("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,a.__)("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,a.__)("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,a.__)("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,a.__)("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,a.__)("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,a.__)("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,a.__)("The cardholder claims this is an unauthorized transaction.","woocommerce-payments")},general:{display:(0,a.__)("General","woocommerce-payments"),overview:[(0,a.__)("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,a.__)("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,a.__)("Incorrect account details","woocommerce-payments")},insufficient_funds:{display:(0,a.__)("Insufficient funds","woocommerce-payments")},product_not_received:{display:(0,a.__)("Product not received","woocommerce-payments"),overview:[(0,a.__)("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,a.__)("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,a.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments")],required:[(0,a.__)("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,a.__)("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,a.__)("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,a.__)("The cardholder claims they did not receive the product.","woocommerce-payments")},product_unacceptable:{display:(0,a.__)("Product unacceptable","woocommerce-payments"),overview:[(0,a.__)("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,a.__)("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,a.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments")],required:[(0,a.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments")],respond:[(0,a.__)("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,a.__)("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,a.__)("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,a.__)("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,a.__)("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,a.__)("The cardholder claims the product was unacceptable.","woocommerce-payments")},subscription_canceled:{display:(0,a.__)("Subscription canceled","woocommerce-payments"),overview:[(0,a.__)("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,a.__)("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,a.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments")],required:[(0,a.__)("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,a.__)("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,a.__)("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,a.__)("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,a.__)("The cardholder claims a subscription was canceled.","woocommerce-payments")},unrecognized:{display:(0,a.__)("Unrecognized","woocommerce-payments"),overview:[(0,a.__)("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,a.__)("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,a.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments")],required:[(0,a.__)("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,a.__)("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,a.__)("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")]},noncompliant:{display:(0,a.__)("Non-compliant","woocommerce-payments"),claim:(0,a.__)("Your customer’s bank claims this payment violates Visa’s rules.","woocommerce-payments"),summary:[(0,a.__)("This transaction is being reviewed under Visa’s network compliance rules.","woocommerce-payments")]}},d={warning_needs_response:(0,a.__)("Inquiry: Response needed","woocommerce-payments"),warning_under_review:(0,a.__)("Inquiry: Under review","woocommerce-payments"),warning_closed:(0,a.__)("Inquiry: Closed","woocommerce-payments"),needs_response:(0,a.__)("Response needed","woocommerce-payments"),under_review:(0,a.__)("Under review","woocommerce-payments"),charge_refunded:(0,a.__)("Charge refunded","woocommerce-payments"),won:(0,a.__)("Won","woocommerce-payments"),lost:(0,a.__)("Lost","woocommerce-payments")},l=(Object.entries(d).map(([e,t])=>({label:t,value:e})).filter(function(e){return null!=e}),["needs_response","warning_needs_response"]),p=["under_review","warning_under_review"],h=((0,a.__)("Dispute currency","woocommerce-payments"),(0,a.__)("All currencies","woocommerce-payments"),(0,a.__)("Show","woocommerce-payments"),(0,a.__)("Needs response","woocommerce-payments"),(0,a.__)("All disputes","woocommerce-payments"),(0,a.__)("Advanced filters","woocommerce-payments"),(()=>{const e=window.wc?.wcSettings,t=e?.getSetting?.("wcVersion");return null==t?"":String(t)})()),y=parseFloat(h),w=(y<7.8?(0,a.__)("Disputes match {{select /}} filters","woocommerce-payments"):(0,a.__)("Disputes match <select /> filters","woocommerce-payments"),(0,a.__)("Disputed on date","woocommerce-payments"),(0,a.__)("Remove dispute date filter","woocommerce-payments"),(0,a.__)("Select a dispute date filter match","woocommerce-payments"),y<7.8?(0,a.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,a.__)("<title>Date</title> <rule /> <filter />","woocommerce-payments"),(0,a.__)("Select a dispute date","woocommerce-payments"),(0,a.__)("Before","woocommerce-payments"),(0,a.__)("After","woocommerce-payments"),(0,a.__)("Between","woocommerce-payments"),(0,a.__)("Status","woocommerce-payments"),(0,a.__)("Remove dispute status filter","woocommerce-payments"),(0,a.__)("Select a dispute status filter match","woocommerce-payments"),y<7.8?(0,a.__)("{{title}}Status{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,a.__)("<title>Status</title> <rule /> <filter />","woocommerce-payments"),(0,a.__)("Select a dispute status","woocommerce-payments"),(0,a._x)("Is","dispute status","woocommerce-payments"),(0,a._x)("Is not","dispute status","woocommerce-payments"),window.wp.domReady);var _=o.n(w);const f=(e,t={})=>{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:wcpaySettings.trackingInfo?.hosting_provider});for(const e in t)void 0===t[e]&&delete t[e]}_()(()=>{(wc?.tracks?.recordEvent??wcTracks.recordEvent)(e,t)})};(0,s.createContext)(window.wcpaySettings),(0,s.createContext)({isActive:!1,setActive:()=>null,isCompleted:!1,setCompleted:()=>null,taskId:""});const g=window.wc.currency;var v=o.n(g);const b=window.lodash;(0,a.__)("Australian dollar","woocommerce-payments"),(0,a.__)("Canadian dollar","woocommerce-payments"),(0,a.__)("Swiss franc","woocommerce-payments"),(0,a.__)("Danish krone","woocommerce-payments"),(0,a.__)("Euro","woocommerce-payments"),(0,a.__)("Pound sterling","woocommerce-payments"),(0,a.__)("Norwegian krone","woocommerce-payments"),(0,a.__)("New Zealand dollar","woocommerce-payments"),(0,a.__)("Swedish krona","woocommerce-payments"),(0,a.__)("United States (US) dollar","woocommerce-payments");const x=(e,t="USD",o=null,n=!1)=>{const r=(e=>wcpaySettings.zeroDecimalCurrencies.includes(e.toLowerCase()))(t);r||(e/=100);const s=e<0,a=s?-1*e:e,i=s?"-":"",c=n?(e=>{const t=e.toUpperCase(),{currencyData:o,connect:{country:n="US"}}=wcpaySettings;if(o[n]?.code===t)return v()(o[n]);const r=(0,b.find)(o,{code:t});if(r){const{defaultLocale:e={}}=r;return e.hasOwnProperty("decimalSeparator")&&e.hasOwnProperty("thousandSeparator")&&e.hasOwnProperty("symbolPosition")&&(r.decimalSeparator=e.decimalSeparator,r.thousandSeparator=e.thousandSeparator,r.symbolPosition=e.symbolPosition),v()(r)}return null})(t):((e,t=null)=>{const{currencyData:o,connect:{country:n="US"}}=wcpaySettings,r=(0,b.find)(o,{code:e.toUpperCase()});if(r){if(null!==t&&t.toUpperCase()!==e.toUpperCase()||o[n]){const e=t?(0,b.find)(o,{code:t.toUpperCase()}):o[n];e&&(r.decimalSeparator=e.decimalSeparator,r.thousandSeparator=e.thousandSeparator,r.symbolPosition=e.symbolPosition)}return v()(r)}return null})(t,o);if(null===c)return i+C(a,t,r);try{return i+("function"==typeof c.formatAmount?j(c.formatAmount(a)):j(c.formatCurrency(a)))}catch(e){return i+j(C(a,t,r))}},S=(e,t="USD",o=!1,n=null)=>{let r=x(e,t,n);return wcpaySettings.shouldUseExplicitPrice?(o&&(r=function(e){return e.replace(/[^0-9,.' ]/g,"").trim()}(r)),((e,t)=>(-1===e.toString().indexOf(t)&&(e=e+" "+t),e))(r,t.toUpperCase())):r};function C(e,t,o){try{return e.toLocaleString(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",dummy:o})}catch(n){return(0,a.sprintf)(o?"%s %i":"%s %.2f",t.toUpperCase(),e)}}function j(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}const E=e=>l.includes(e),k=e=>p.includes(e),I=e=>e.startsWith("warning");function O(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 R(e,t){let o,n,r=[];for(let s=0;s<e.length;s++){const a=e[s];if("string"!==a.type){if(void 0===t[a.value])throw new Error(`Invalid interpolation, missing component node: \`${a.value}\``);if("object"!=typeof t[a.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${a.value}\``);if("componentClose"===a.type)throw new Error(`Missing opening component token: \`${a.value}\``);if("componentOpen"===a.type){o=t[a.value],n=s;break}r.push(t[a.value])}else r.push(a.value)}if(o){const a=function(e,t){const o=t[e];let n=0;for(let r=e+1;r<t.length;r++){const e=t[r];if(e.value===o.value){if("componentOpen"===e.type){n++;continue}if("componentClose"===e.type){if(0===n)return r;n--}}}throw new Error("Missing closing component token `"+o.value+"`")}(n,e),i=R(e.slice(n+1,a),t),c=(0,s.cloneElement)(o,{},i);if(r.push(c),a<e.length-1){const o=R(e.slice(a+1),t);r=r.concat(o)}}return r=r.filter(Boolean),0===r.length?null:1===r.length?r[0]:(0,s.createElement)(s.Fragment,null,...r)}function D(e){const{mixedString:t,components:o,throwErrors:n}=e;if(!o)return t;if("object"!=typeof o){if(n)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const r=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(O)}(t);try{return R(r,o)}catch(e){if(n)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}const T=window.wp.components;function A(e){var t,o,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=A(e[t]))&&(n&&(n+=" "),n+=o)}else for(o in e)e[o]&&(n&&(n+=" "),n+=o);return n}const z=function(){for(var e,t,o=0,n="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=A(e))&&(n&&(n+=" "),n+=t);return n};var N=o(2291),P=o(8295),B=o(6947);const $=window.ReactJSXRuntime,F=function(e){const{icon:t,actions:o,children:n,buttonVariant:r,...s}=e;s.className=z("wcpay-inline-notice",`wcpay-inline-${s.status}-notice`,s.className);let a=t;if(!0===a)switch(s.status){case"success":a=(0,$.jsx)(N.A,{});break;case"error":case"warning":a=(0,$.jsx)(P.A,{});break;default:a=(0,$.jsx)(B.A,{})}const i="wcpay-inline-notice__action",c=o?.map((e,t)=>"url"in e?(0,$.jsx)("a",{className:i,href:e.url,children:e.label},t):(0,$.jsx)(T.Button,{className:i,onClick:e.onClick,isBusy:e.isBusy??!1,disabled:e.disabled??!1,variant:r,children:e.label},t));return(0,$.jsx)(T.Notice,{...s,children:(0,$.jsxs)(T.Flex,{align:"center",justify:"flex-start",children:[a&&(0,$.jsx)(T.FlexItem,{className:`wcpay-inline-notice__icon wcpay-inline-${s.status}-notice__icon`,children:(0,$.jsx)(T.Icon,{icon:a,size:24})}),(0,$.jsxs)(T.FlexItem,{className:`wcpay-inline-notice__content wcpay-inline-${s.status}-notice__content`,children:[n,c&&(0,$.jsx)(T.Flex,{className:"wcpay-inline-notice__content__actions",align:"baseline",justify:"flex-start",gap:4,children:c})]})]})})},q=()=>(0,$.jsx)(F,{icon:!0,status:"warning",isDismissible:!1,children:D({mixedString:(0,a.__)("WooPayments was in test mode when this order was placed. {{learnMoreLink/}}","woocommerce-payments"),components:{learnMoreLink:(0,$.jsx)(T.ExternalLink,{href:"https://woocommerce.com/document/woopayments/testing-and-troubleshooting/testing/",children:(0,a.__)("Learn more about test mode","woocommerce-payments")})}})}),M=window.wp.element,U=(window.wc.components,window.wp.url),L=window.wp.date;window.wc.number;const G=(e,t)=>{return o={page:"wc-admin",path:`/payments/${t}/details`,id:e},(0,U.addQueryArgs)("admin.php",o);var o},H=e=>e.disputes?.length?e.disputes:e.dispute?[e.dispute]:[],W={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"};function Y(e,t){return{type:W.SET_CHARGE,id:e,data:t}}function Q(e,t,o){return{type:W.SET_ERROR_FOR_CHARGE,id:e,data:t,error:o}}const V=window.wp.dataControls,J=window.wp.data,X="/wc/v3/payments";function*Z(e){try{const t=yield(0,V.apiFetch)({path:`${X}/charges/${e}`});yield Y(e,t)}catch(t){yield J.controls.dispatch("core/notices","createErrorNotice",(0,a.__)("Error retrieving transaction.","woocommerce-payments")),yield Q(e,null,t)}}function*K(e){try{const t=yield(0,V.apiFetch)({path:`${X}/charges/order/${e}`});yield Y(e,t)}catch(t){yield J.controls.dispatch("core/notices","createErrorNotice",(0,a.__)("Error retrieving transaction.","woocommerce-payments")),yield Q(e,null,t)}}const ee=(e,t)=>e.charges[t]&&e.charges[t].data?e.charges[t].data:{},te=(e,t)=>e.charges[t]&&e.charges[t].error?e.charges[t].error:{},oe=(e,t)=>ee(e,t),ne=(e,t)=>te(e,t),re="wc/payments/charges",se=(0,J.createReduxStore)(re,{reducer:(0,J.combineReducers)({charges:(e={},{type:t,id:o,data:n,error:r})=>{switch(t){case W.SET_CHARGE:e={...e,[o]:{...e[o],data:n}};break;case W.SET_ERROR_FOR_CHARGE:e={...e,[o]:{...e[o],error:r}}}return e}}),actions:e,selectors:n,resolvers:t,controls:V.controls});function ae(e,t={}){const{customFormat:o=null,includeTime:n=!1,separator:r=" / ",timezone:s}=t,a=u().utc(e).toISOString(),i=o||`${window.wcpaySettings.dateFormat}${n?`${r}${window.wcpaySettings.timeFormat}`:""}`;return(0,L.dateI18n)(i,a,s)}(0,J.register)(se);const ie=({isPreDisputeInquiry:e,disputeReason:t,formattedAmount:o,dueBy:n,countdownDays:r})=>{const s=e?(0,a.__)("Please resolve the inquiry on this order of %1$s labeled '%2$s' by %3$s.","woocommerce-payments"):(0,a.__)("Please resolve the dispute on this order of %1$s labeled '%2$s' by %3$s.","woocommerce-payments"),i=(0,a.sprintf)(s,o,m[t].display,ae(n.toISOString()));let c=(0,a.sprintf)((0,a._n)("(%s day left)","(%s days left)",r,"woocommerce-payments"),r);return r<1&&(c=(0,a.__)("(Last day today)","woocommerce-payments")),(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("strong",{children:i})," ",c]})},ce=({isPreDisputeInquiry:e,disputeReason:t,formattedAmount:o,dueBy:n})=>{const r=e?(0,a.__)("Please resolve the inquiry on this order of %1$s with reason '%2$s'.","woocommerce-payments"):(0,a.__)("This order has a payment dispute for %1$s for the reason '%2$s'. ","woocommerce-payments"),s=(0,a.sprintf)(r,o,m[t].display),i=(0,a.sprintf)((0,a.__)("Please respond before %1$s.","woocommerce-payments"),ae(n.toISOString()));return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("strong",{children:s})," ",i]})},ue=({disputeReason:e,formattedAmount:t,isPreDisputeInquiry:o,dueBy:n,countdownDays:r,disputeDetailsUrl:i})=>{(0,s.useEffect)(()=>{f("wcpay_order_dispute_notice_view",{is_inquiry:o,dispute_reason:e,due_by_days:r})},[o,e,r]);const c=r<7,u=r<1?(0,a.__)("Respond today","woocommerce-payments"):(0,a.__)("Respond now","woocommerce-payments"),m=c?(0,$.jsx)(ie,{isPreDisputeInquiry:o,disputeReason:e,formattedAmount:t,dueBy:n,countdownDays:r}):(0,$.jsx)(ce,{isPreDisputeInquiry:o,disputeReason:e,formattedAmount:t,dueBy:n});return(0,$.jsx)(F,{status:r<3?"error":"warning",isDismissible:!1,actions:[{label:u,variant:"secondary",onClick:()=>{f("wcpay_order_dispute_notice_action_click",{due_by_days:r}),window.location=i}}],children:m})},me=({disputeCount:e,isPreDisputeInquiry:t,formattedAmount:o,dueBy:n,countdownDays:r,disputeDetailsUrl:i})=>{(0,s.useEffect)(()=>{f("wcpay_order_dispute_notice_view",{is_inquiry:t,dispute_reason:"multiple",due_by_days:r,dispute_count:e})},[r,e,t]);const c=r<1?(0,a.__)("Respond today","woocommerce-payments"):(0,a.__)("Respond now","woocommerce-payments"),u=t?(0,a.sprintf)((0,a.__)("This order has %1$d payment inquiries totaling %2$s.","woocommerce-payments"),e,o):(0,a.sprintf)((0,a.__)("This order has %1$d payment disputes totaling %2$s.","woocommerce-payments"),e,o);let m=(0,a.sprintf)((0,a.__)("Please respond before %1$s.","woocommerce-payments"),ae(n.toISOString()));return r<7&&(m=`${m} ${r<1?(0,a.__)("(Last day today)","woocommerce-payments"):(0,a.sprintf)((0,a._n)("(%s day left)","(%s days left)",r,"woocommerce-payments"),r)}`),(0,$.jsxs)(F,{status:r<3?"error":"warning",isDismissible:!1,actions:[{label:c,variant:"secondary",onClick:()=>{f("wcpay_order_dispute_notice_action_click",{due_by_days:r}),window.location=i}}],children:[(0,$.jsx)("strong",{children:u})," ",m]})},de=({message:e,disputeDetailsUrl:t})=>(0,$.jsxs)(F,{status:"warning",isDismissible:!1,children:[e,(0,M.createInterpolateElement)((0,a.__)(" <a>View details</a>","woocommerce-payments"),{a:(0,$.jsx)("a",{href:t})})]}),le=({chargeId:e,onDisableOrderRefund:t})=>{const{data:o}=(e=>(0,J.useSelect)(t=>{const o=t(re);return((e,t)=>{const{getCharge:o,isResolving:n,getChargeError:r,hasFinishedResolution:s}=t;return{data:o(e),error:r(e),isLoading:n("getCharge",[e])||!s("getCharge",[e])}})(e,o)},[e]))(e),n=G(e,"transactions"),r=o?H(o):[];if((0,s.useEffect)(()=>{const e=(o?H(o):[]).find(e=>{return t=e.status,!(I(t)||"won"===t);var t});e&&t(e.status)},[o,t]),!r.length)return null;if(r.some(e=>k(e.status)&&!I(e.status)))return(0,$.jsx)(de,{message:(0,a.__)("This order has an active payment dispute. Refunds and order editing are disabled.","woocommerce-payments"),disputeDetailsUrl:n});if(r.some(e=>"lost"===e.status))return(0,$.jsx)(de,{message:(0,a.__)("Refunds and order editing have been disabled as a result of a lost dispute.","woocommerce-payments"),disputeDetailsUrl:n});const i=u()().utc(),c=r.filter(e=>!(!E(e.status)||!e.evidence_details?.due_by)&&i.isBefore(u().unix(e.evidence_details.due_by).utc()));if(!c.length)return null;if(1===c.length){const t=c[0],o=u().unix(t.evidence_details.due_by).utc();return(0,$.jsx)(ue,{chargeId:e,disputeReason:t.reason,formattedAmount:S(t.amount,t.currency),isPreDisputeInquiry:I(t.status),dueBy:o,countdownDays:Math.floor(o.diff(i,"days",!0)),disputeDetailsUrl:n})}const m=c.map(e=>u().unix(e.evidence_details.due_by).utc()).reduce((e,t)=>t.isBefore(e)?t:e),d=c.reduce((e,t)=>e+t.amount,0),l=c.every(e=>I(e.status));return(0,$.jsx)(me,{disputeCount:c.length,isPreDisputeInquiry:l,formattedAmount:S(d,c[0].currency),dueBy:m,countdownDays:Math.floor(m.diff(i,"days",!0)),disputeDetailsUrl:n})},pe=window.wp.primitives,he=({children:e,actions:t,className:o,...n})=>(0,$.jsxs)(T.Modal,{className:z("wcpay-confirmation-modal",o),...n,children:[e,(0,$.jsx)(pe.HorizontalRule,{className:"wcpay-confirmation-modal__separator"}),(0,$.jsx)("div",{className:"wcpay-confirmation-modal__footer",children:t})]}),ye=({orderStatus:e,refundAmount:t,formattedRefundAmount:o,refundedAmount:n})=>{const[r,s]=(0,M.useState)(!0),i=()=>{s(!1)},c=()=>{const t=document.querySelector("#order_status");t.value=e,t.dispatchEvent(new Event("change"))};return(0,$.jsx)($.Fragment,{children:r&&(0,$.jsx)(he,{title:(0,a.__)("Refund order in full","woocommerce-payments"),isDismissible:!1,className:"refund-confirmation-modal",actions:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(T.Button,{variant:"secondary",onClick:()=>{c(),i()},__next40pxDefaultSize:!0,children:(0,a.__)("Cancel","woocommerce-payments")}),(0,$.jsx)(T.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:n,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():(c(),(0,J.dispatch)("core/notices").createErrorNotice(e.data.error))},complete:function(){jQuery(".refund-confirmation-modal").unblock(),i()}})},__next40pxDefaultSize:!0,children:(0,a.sprintf)((0,a.__)("Refund %s","woocommerce-payments"),o)})]}),children:(0,$.jsx)("p",{children:(0,a.sprintf)((0,a.__)('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")})})})},we=({title:e,confirmButtonText:t,cancelButtonText:o,confirmationMessage:n,onConfirm:r,onCancel:s})=>{const[a,i]=(0,M.useState)(!0),c=()=>{i(!1)},u=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(T.Button,{variant:"secondary",onClick:()=>{s(),c()},children:o}),(0,$.jsx)(T.Button,{variant:"primary",onClick:()=>{r(),c()},children:t})]});return(0,$.jsx)($.Fragment,{children:a&&(0,$.jsx)(he,{title:e,isDismissible:!1,className:"generic-confirmation-modal",actions:u,onRequestClose:()=>!1,children:(0,$.jsx)("p",{children:n})})})},_e={CANCELLED:(0,a.__)("cancelled","woocommerce-payments"),COMPLETED:(0,a.__)("completed","woocommerce-payments"),FAILED:(0,a.__)("failed","woocommerce-payments"),ON_HOLD:(0,a.__)("on-hold","woocommerce-payments"),PENDING:(0,a.__)("pending","woocommerce-payments"),PROCESSING:(0,a.__)("processing","woocommerce-payments"),REFUNDED:(0,a.__)("refunded","woocommerce-payments"),TRASH:(0,a.__)("trash","woocommerce-payments")},fe="wc-cancelled",ge="wc-completed",ve="wc-failed",be="wc-on-hold",xe="wc-pending",Se="wc-processing",Ce="wc-refunded",je="wc-trash",Ee={[fe]:_e.CANCELLED,[ge]:_e.COMPLETED,[ve]:_e.FAILED,[be]:_e.ON_HOLD,[xe]:_e.PENDING,[Se]:_e.PROCESSING,[Ce]:_e.REFUNDED,[je]:_e.TRASH};function ke(e){const t=document.createElement("div");t.id="wcpay-orderstatus-confirm-container",document.body.appendChild(t),(0,r.createRoot)(t).render(e)}function Ie(){console.log("No specific action defined for this status change.")}const Oe={[fe]:function(e,t){if(e===fe)return;const o=i("hasOpenAuthorization"),n=i("canRefund"),r=i("refundAmount");if(o&&function(e,t){const o=D({mixedString:(0,a.__)("This order has been {{authorizedNotCaptured/}} yet. Changing the status to {{newOrderStatus/}} will also {{cancelAuthorization/}}. Do you want to continue?","woocommerce-payments"),components:{authorizedNotCaptured:(0,$.jsx)("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#authorize-vs-capture",rel:"noopener noreferrer",children:(0,a.__)("authorized but payment has not been captured","woocommerce-payments")}),cancelAuthorization:(0,$.jsx)("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#cancelling-authorizations",rel:"noopener noreferrer",children:(0,a.__)("cancel the payment","woocommerce-payments")}),newOrderStatus:(0,$.jsx)("b",{children:Ee[t]})}});ke((0,$.jsx)(we,{title:(0,a.__)("Cancel payment","woocommerce-payments"),confirmButtonText:(0,a.__)("Cancel order and payment","woocommerce-payments"),cancelButtonText:(0,a.__)("Cancel","woocommerce-payments"),confirmationMessage:o,onConfirm:()=>{const e=document.querySelector("#order_status")?.closest("form")||null;null!==e&&e.submit()},onCancel:()=>{const t=document.querySelector("#order_status");null!==t&&(t.value=e,t.dispatchEvent(new Event("change")))}}))}(e,t),!o&&n&&r>0){const t=D({mixedString:(0,a.__)("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:(0,$.jsx)("b",{children:(0,a.__)("Do Nothing","woocommerce-payments")}),cancelOrderBold:(0,$.jsx)("b",{children:(0,a.__)("Cancel order","woocommerce-payments")}),howtoIssueRefunds:(0,$.jsx)("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/managing-money/#refunds",rel:"noopener noreferrer",children:(0,a.__)("how to issue refunds","woocommerce-payments")})}});ke((0,$.jsx)(we,{title:(0,a.__)("Cancel order","woocommerce-payments"),confirmButtonText:(0,a.__)("Cancel order","woocommerce-payments"),cancelButtonText:(0,a.__)("Do Nothing","woocommerce-payments"),confirmationMessage:t,onConfirm:()=>{const e=document.querySelector("#order_status")?.closest("form")||null;null!==e&&e.submit()},onCancel:()=>{const t=document.querySelector("#order_status");null!==t&&(t.value=e,t.dispatchEvent(new Event("change")))}}))}},[ge]:function(e,t){e!==ge&&i("hasOpenAuthorization")&&function(e,t){const o=D({mixedString:(0,a.__)("This order has been {{authorizedNotCaptured/}} yet. Changing the status to {{newOrderStatus/}} will also {{captureAuthorization/}}. Do you want to continue?","woocommerce-payments"),components:{authorizedNotCaptured:(0,$.jsx)("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#authorize-vs-capture",rel:"noopener noreferrer",children:(0,a.__)("authorized but payment has not been captured","woocommerce-payments")}),captureAuthorization:(0,$.jsx)("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#capturing-authorized-payments",rel:"noopener noreferrer",children:(0,a.__)("capture the payment","woocommerce-payments")}),newOrderStatus:(0,$.jsx)("b",{children:Ee[t]})}});ke((0,$.jsx)(we,{title:(0,a.__)("Capture payment","woocommerce-payments"),confirmButtonText:(0,a.__)("Complete order and capture payment","woocommerce-payments"),cancelButtonText:(0,a.__)("Cancel","woocommerce-payments"),confirmationMessage:o,onConfirm:()=>{const e=document.querySelector("#order_status")?.closest("form")||null;null!==e&&e.submit()},onCancel:()=>{const t=document.querySelector("#order_status");null!==t&&(t.value=e,t.dispatchEvent(new Event("change")))}}))}(e,t)},[Ce]:function(e){e!==Ce&&function(e,t,o){t?o<=0?(0,J.dispatch)("core/notices").createErrorNotice((0,a.__)("Invalid Refund Amount","woocommerce-payments")):ke((0,$.jsx)(ye,{orderStatus:e,refundAmount:o,formattedRefundAmount:i("formattedRefundAmount"),refundedAmount:i("refundedAmount")})):(0,J.dispatch)("core/notices").createErrorNotice((0,a.__)("Order cannot be refunded","woocommerce-payments"))}(e,i("canRefund"),i("refundAmount"))}};function Re(e){const t=document.querySelector("button.refund-items");if(!t)return;t.disabled=!0;let o="";E(e)?o=(0,a.__)("Refunds and order editing are disabled during disputes.","woocommerce-payments"):k(e)?o=(0,a.__)("Refunds and order editing are disabled during an active dispute.","woocommerce-payments"):"lost"===e&&(o=(0,a.__)("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:o,"aria-label":o}).tipTip()}jQuery(function(e){const t=i("disableManualRefunds")??!1,o=i("manualRefundsTip")??"",n=i("chargeId"),s=i("testMode"),a=""!==i("orderTestModeMatch");!function(){const e=document.querySelector("#wcpay-order-payment-details-container");e&&(0,r.createRoot)(e).render((0,$.jsxs)($.Fragment,{children:[s&&(0,$.jsx)(q,{}),n&&a&&(0,$.jsx)(le,{chargeId:n,onDisableOrderRefund:Re})]}))}(),e("#woocommerce-order-items").on("click","button.refund-items",function(){const n=e(".do-manual-refund");t?n.hide():n.attr({title:o}).tipTip()}),e("select#order_status").on("change",function(){let t=e("input#original_post_status").val()||e("input#original_order_status").val();var o;t&&!t.startsWith("wc-")&&(t="wc-"+t),(o=this.value,Oe[o]||Ie)(t,this.value)})})})()})();
Save
cmd:
run