1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7b6bee91-658f-5749-8d91-68e0bb66e44a")}catch(e){}}(); 3import{j as e,r as C,F}from"./chunk-62JRHF6Z-Cg50Stu2.js";import{D as B}from"./drawer-dialog-DAJHXVW0.js";import{L as f}from"./loader-button-jS9UC2d-.js";import{S as b,B as D}from"./spacer-y5aqkyMZ.js";import{S as P}from"./status-banner-CB2IEtyO.js";import{a as _}from"./currency-to-string-RiBuxXPH.js";import{c as L}from"./capitalize-only-first-letter-B5_Q5yNL.js";import{g as N}from"./wallet-badge-DQilJz9V.js";import{a as R}from"./use-disable-spa-navigation-DEjxOnI0.js";import{S as $,u as A}from"./use-stripe-3d-secure-flow-C-H-yC6N.js";import{u as k}from"./use-3d-secure-handler-BaXt54lF.js";function I({hasCard:u,hasMultipleInvoices:a,invoiceCount:n,handleRetryPaymentMultiInvoice:l,handleUpdatePaymentMethod:s,threeDSecureEnabled:o,threeDSecurePaymentEnabled:t}){const i=C.useRef(null),{threeDSecureInProgress:m,submitting:c,on3dSecureInProgressChange:d,onSubmitClick:p}=k("pay-overdue-balance"),{reset3dSecureAuthentication:y}=A({formDataRef:i,threeDSecureEnabled:o,threeDSecurePaymentEnabled:t,on3dSecureInProgressChange:d}),h=g=>{y(),i.current=new FormData(g.currentTarget)},r=c||m;return e.jsxs(F,{method:"post",onSubmit:h,children:[e.jsx("input",{type:"hidden",name:"intent",value:"pay-overdue-balance"}),e.jsx("input",{type:"hidden",name:"invoice_count",value:n??0}),e.jsx("input",{type:"hidden",name:"stripe-enabled",value:"true"}),o?e.jsx("input",{type:"hidden",name:"three-d-secure-enabled",value:"true"}):null,t?e.jsx("input",{type:"hidden",name:"three_d_secure_payment_enabled",value:"true"}):null,u?a?e.jsx(f,{type:"button",variant:"primary",className:"body-strong mt-4 w-full",onClick:l,children:"Retry payment"}):e.jsx(D,{type:"submit",variant:"primary",className:"body-strong mt-4 w-full",onClick:p,loading:r,children:"Retry payment"}):null,e.jsx(f,{type:"button",variant:"secondary",className:"body-strong mt-4 w-full",onClick:s,disabled:r,children:"Update payment method"})]})}function J({unpaidBalance:u,cardType:a,cardLast4:n,cardWalletType:l,invoiceCount:s,open:o,paymentError:t,stripeConfig:i,threeDSecureEnabled:m,threeDSecurePaymentEnabled:c,handleClose:d,handleUpdatePaymentMethod:p,handleRetryPaymentMultiInvoice:y}){const{PAY_BALANCE_3DS_ENABLED:h}=R(),r=a&&n,g=h&&(s??0)>1,{stripePromise:j,customerSessionClientSecret:S}=i??{},x=N(l),v=(()=>{const w=r?`using ${L(a)}${x?` (${x})`:""} ending in ${n} now, or update your payment method`:"by updating your payment method";return`Retry payment of ${_(u)} ${w}.`})();return e.jsxs(B,{open:o,handleClose:d,title:"Pay unpaid balance",children:[t?e.jsxs(e.Fragment,{children:[e.jsx(P,{variant:"error",message:{text:t},shouldScrollToTop:!0}),e.jsx(b,{variant:"height16"})]}):null,e.jsx("p",{className:"body",children:v}),e.jsx(b,{variant:"height16"}),e.jsx($,{stripePromise:j,customerSessionClientSecret:S,children:e.jsx(I,{hasCard:r,hasMultipleInvoices:g,invoiceCount:s,handleRetryPaymentMultiInvoice:y,handleUpdatePaymentMethod:p,threeDSecureEnabled:m,threeDSecurePaymentEnabled:c})})]})}export{J as P}; 4//# sourceMappingURL=pay-overdue-balance-drawer-dialog-DRvX-A3m.js.map 5 6//# debugId=7b6bee91-658f-5749-8d91-68e0bb66e44a
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.