@justifi/webcomponents 6.12.0 → 6.12.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Analytics-DZCXB2Za.js → Analytics-DN1vWC6J.js} +2 -3
- package/dist/cjs/{Plaid-DR9WDZ98.js → Plaid-6JK8xPnG.js} +47 -14
- package/dist/cjs/{additional-questions-form-step_9.cjs.entry.js → additional-questions-form-step_14.cjs.entry.js} +451 -58
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +2 -2
- package/dist/cjs/bank-account-form.cjs.entry.js +4 -4
- package/dist/cjs/bank-account-read-only-value.cjs.entry.js +15 -0
- package/dist/cjs/{business.service-mliLE8kX.js → business.service-XXjIL3rT.js} +1 -2
- package/dist/cjs/card-form.cjs.entry.js +4 -4
- package/dist/cjs/{check-pkg-version-CUhnNGii.js → check-pkg-version-DKEv2rPI.js} +1 -1
- package/dist/cjs/{checkout.service-Cok0vRot.js → checkout.service-BUpGS3Nm.js} +1 -2
- package/dist/cjs/checkouts-list-core.cjs.entry.js +2 -3
- package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
- package/dist/cjs/{dispute.service-DEH_I2G9.js → dispute.service-BC_bJL60.js} +1 -2
- package/dist/cjs/form-address-fields_3.cjs.entry.js +3 -3
- package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
- package/dist/cjs/form-control-file.cjs.entry.js +59 -0
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number_3.cjs.entry.js +2 -2
- package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
- package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
- package/dist/cjs/{get-business-DF-XBH8G.js → get-business-Dk1gjO4B.js} +4 -4
- package/dist/cjs/{get-payment-details-DNpOyUyR.js → get-payment-details-Cvi1hHGJ.js} +4 -5
- package/dist/cjs/{get-payout-csv-DE_D9y08.js → get-payout-csv-CFsWBUNg.js} +3 -3
- package/dist/cjs/{get-subaccounts-BQW_RPW5.js → get-subaccounts-BPJ2-LBo.js} +4 -5
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
- package/dist/cjs/internal-button.cjs.entry.js +1 -1
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
- package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +60 -59
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +5 -6
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -6
- package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +10 -11
- package/dist/cjs/justifi-business-form.cjs.entry.js +9 -10
- package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +5 -6
- package/dist/cjs/justifi-checkout.cjs.entry.js +6 -7
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +3 -4
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +12 -13
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +13 -14
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +19 -20
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +9 -10
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +14 -15
- package/dist/cjs/justifi-payment-details.cjs.entry.js +10 -11
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +134 -18
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +10 -11
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +11 -12
- package/dist/cjs/justifi-payout-details.cjs.entry.js +11 -12
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +10 -11
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +3 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +14 -15
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +13 -14
- package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +11 -12
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +4 -5
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +11 -12
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -3
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +13 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-CJg8qLYd.js → package-EwQYAMPH.js} +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +9 -10
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment-provisioning-actions-J6TGZZb9.js → payment-provisioning-actions-DscyasDY.js} +18 -18
- package/dist/cjs/payment-provisioning-form-buttons_2.cjs.entry.js +52 -0
- package/dist/cjs/{payment.service-Dl9UExDw.js → payment.service-DC2FVlv-.js} +1 -2
- package/dist/cjs/payments-list-core.cjs.entry.js +2 -3
- package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
- package/dist/cjs/{payout.service-kaFewwx4.js → payout.service-Bjbt6USA.js} +1 -2
- package/dist/cjs/payouts-list-core.cjs.entry.js +4 -5
- package/dist/cjs/{plaid.service-CK1ouCBC.js → plaid.service-C0ZgOkwL.js} +1 -2
- package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
- package/dist/cjs/save-new-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +3 -4
- package/dist/cjs/{terminal-orders-table-07fV7wGh.js → terminal-orders-table-j_IoYD-2.js} +1 -2
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-UUoIe0IR.js → terminal.service-YAuPfEGz.js} +1 -2
- package/dist/cjs/terminals-list-core.cjs.entry.js +2 -3
- package/dist/cjs/{utils-DvUQQLmR.js → utils-C4CgQd55.js} +4 -4
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/ApplePay.js +4 -0
- package/dist/collection/api/services/apple-pay.service.js +1 -0
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-form-inputs.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs-canada.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-read-only-value.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/justifi-payment-provisioning.js +181 -10
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +1 -1
- package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
- package/dist/collection/components/checkout/billing-form/bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/checkout/billing-form/card-billing-form-simple.js +1 -1
- package/dist/collection/components/checkout/billing-form/justifi-billing-form.js +1 -1
- package/dist/collection/components/checkout/card-form/card-form.js +2 -2
- package/dist/collection/components/checkout/justifi-checkout.js +2 -2
- package/dist/collection/components/checkout/justifi-saved-payment-method.js +1 -1
- package/dist/collection/components/checkout/save-new-payment-method/justifi-save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout/save-new-payment-method/save-new-payment-method.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
- package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/justifi-additional-statement.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/justifi-cancellation-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/justifi-customer-details.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/justifi-dispute-response.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/justifi-duplicate-charge.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/justifi-electronic-evidence.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/justifi-product-or-service.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/justifi-refund-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/justifi-shipping-details.js +1 -1
- package/dist/collection/components/dispute-management/justifi-dispute-management.js +1 -1
- package/dist/collection/components/dispute-management/justifi-dispute-notification.js +2 -2
- package/dist/collection/components/filters/table-filters-menu.js +1 -1
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
- package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-apple-pay.js +1 -0
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/order-terminals/justifi-order-terminals.js +1 -1
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
- package/dist/collection/components/payment-details/payment-details-core.js +8 -8
- package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/justifi-payments-list.js +1 -1
- package/dist/collection/components/payments-list/payments-list-core.js +1 -1
- package/dist/collection/components/payout-details/payout-details-core.js +3 -3
- package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/justifi-payouts-list.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
- package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/justifi-terminals-list.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
- package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +1 -1
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
- package/dist/collection/ui-components/form/form-control-date.js +2 -2
- package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +2 -2
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +2 -2
- package/dist/collection/ui-components/form/form-control-select.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/internal-button.js +1 -1
- package/dist/collection/ui-components/radio-list-item.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/docs.json +11 -320
- package/dist/esm/{Analytics-C2EVi4Am.js → Analytics-Ds-ogIwt.js} +3 -4
- package/dist/esm/{Api-DI0-itk3.js → Api-BrYhtpEh.js} +1 -1
- package/dist/esm/{Plaid-vwPGZ5y4.js → Plaid-D40pFwwP.js} +36 -3
- package/dist/esm/additional-questions-details_5.entry.js +1 -1
- package/dist/esm/{additional-questions-form-step_9.entry.js → additional-questions-form-step_14.entry.js} +423 -35
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +2 -2
- package/dist/esm/bank-account-form.entry.js +5 -5
- package/dist/esm/bank-account-read-only-value.entry.js +13 -0
- package/dist/esm/{business.service-M3YvwC-d.js → business.service-Bt68Uk7V.js} +2 -3
- package/dist/esm/card-form.entry.js +5 -5
- package/dist/esm/{check-pkg-version-qIHmWcbI.js → check-pkg-version-Bd_MOwNP.js} +1 -1
- package/dist/esm/{checkout.service-DdIBmfsp.js → checkout.service-B7K5LRx2.js} +2 -3
- package/dist/esm/checkouts-list-core.entry.js +4 -5
- package/dist/esm/{checkouts-table-4iLy6mvH.js → checkouts-table-BXm9GGFI.js} +1 -1
- package/dist/esm/custom-popper_2.entry.js +2 -2
- package/dist/esm/{dispute.service-BzzA0DeT.js → dispute.service-BPA0V42p.js} +2 -3
- package/dist/esm/form-address-fields_3.entry.js +3 -3
- package/dist/esm/form-control-checkbox.entry.js +2 -2
- package/dist/esm/form-control-date.entry.js +2 -2
- package/dist/esm/form-control-file-v2_2.entry.js +3 -3
- package/dist/esm/form-control-file.entry.js +57 -0
- package/dist/esm/form-control-monetary.entry.js +3 -3
- package/dist/esm/form-control-number_3.entry.js +2 -2
- package/dist/esm/form-control-radio.entry.js +2 -2
- package/dist/esm/form-control-select_2.entry.js +4 -4
- package/dist/esm/{get-business-BtJWpVs_.js → get-business-CijoB3Df.js} +2 -2
- package/dist/esm/{get-payment-details-CN7gUjBc.js → get-payment-details-B9JipaKX.js} +2 -3
- package/dist/esm/{get-payout-csv-D-Lnooki.js → get-payout-csv-CzWaTjoV.js} +2 -2
- package/dist/esm/{get-subaccounts-Mwx-aVcG.js → get-subaccounts-Dfo7wGVE.js} +3 -4
- package/dist/esm/gross-payment-chart-core.entry.js +2 -2
- package/dist/esm/hidden-input_2.entry.js +5 -5
- package/dist/esm/internal-button.entry.js +1 -1
- package/dist/esm/justifi-additional-statement_8.entry.js +8 -8
- package/dist/esm/justifi-apple-pay_11.entry.js +16 -15
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +7 -8
- package/dist/esm/justifi-bank-account-form.entry.js +7 -8
- package/dist/esm/justifi-billing-form-full.entry.js +1 -1
- package/dist/esm/justifi-billing-form.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +10 -11
- package/dist/esm/justifi-business-form.entry.js +9 -10
- package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +7 -8
- package/dist/esm/justifi-checkout.entry.js +8 -9
- package/dist/esm/justifi-checkouts-list-filters.entry.js +4 -5
- package/dist/esm/justifi-checkouts-list.entry.js +11 -12
- package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
- package/dist/esm/justifi-dispute-management.entry.js +10 -11
- package/dist/esm/justifi-dispute-notification_3.entry.js +13 -14
- package/dist/esm/justifi-gross-payment-chart.entry.js +7 -8
- package/dist/esm/justifi-order-terminals.entry.js +11 -12
- package/dist/esm/justifi-payment-details.entry.js +10 -11
- package/dist/esm/justifi-payment-provisioning.entry.js +133 -17
- package/dist/esm/justifi-payment-transactions-list.entry.js +9 -10
- package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
- package/dist/esm/justifi-payments-list.entry.js +10 -11
- package/dist/esm/justifi-payout-details.entry.js +9 -10
- package/dist/esm/justifi-payout-transactions-list.entry.js +9 -10
- package/dist/esm/justifi-payouts-list-filters.entry.js +4 -5
- package/dist/esm/justifi-payouts-list.entry.js +12 -13
- package/dist/esm/justifi-refund-payment.entry.js +9 -10
- package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
- package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +7 -8
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -6
- package/dist/esm/justifi-terminal-orders-list.entry.js +9 -10
- package/dist/esm/justifi-terminals-list-filters.entry.js +3 -4
- package/dist/esm/justifi-terminals-list.entry.js +11 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-CIYOQWsL.js → package-B5w1e9rb.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +10 -11
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment-provisioning-actions-CBvplwPf.js → payment-provisioning-actions-Bv2HP9Cx.js} +3 -3
- package/dist/esm/payment-provisioning-form-buttons_2.entry.js +49 -0
- package/dist/esm/{payment.service-0k8z2rOV.js → payment.service-J7iQtC5z.js} +2 -3
- package/dist/esm/payments-list-core.entry.js +4 -5
- package/dist/esm/{payments-table-Bz7LmU_J.js → payments-table-n1VrIKIR.js} +1 -1
- package/dist/esm/payout-details-core.entry.js +4 -4
- package/dist/esm/{payout.service-C14YvCWQ.js → payout.service-Dsz8f37z.js} +2 -3
- package/dist/esm/payouts-list-core.entry.js +4 -5
- package/dist/esm/{payouts-table-Bpt__avQ.js → payouts-table-CbzI90ci.js} +1 -1
- package/dist/esm/{plaid.service-Dtxfrsm8.js → plaid.service-D1nDrcPY.js} +2 -3
- package/dist/esm/radio-list-item.entry.js +1 -1
- package/dist/esm/save-new-payment-method.entry.js +1 -1
- package/dist/esm/table-filters-menu.entry.js +1 -1
- package/dist/esm/terminal-orders-list-core.entry.js +4 -5
- package/dist/esm/{terminal-orders-table-DRnRR4zn.js → terminal-orders-table-DlVbBgNh.js} +2 -3
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/{terminal.service-rxvEhqqF.js → terminal.service-Sg45obrZ.js} +2 -3
- package/dist/esm/terminals-list-core.entry.js +4 -5
- package/dist/esm/{terminals-table-DSDZgJ77.js → terminals-table-Bja7MP5H.js} +1 -1
- package/dist/esm/{utils-C_8ZxLti.js → utils-De6tr4ug.js} +1 -1
- package/dist/esm/{utils-BeQLScSm.js → utils-jaFbbifV.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/ApplePay.js +4 -0
- package/dist/module/Business.js +1 -1
- package/dist/module/bank-account-billing-form-simple2.js +1 -1
- package/dist/module/bank-account-document-form-inputs2.js +1 -1
- package/dist/module/bank-account-form-inputs-canada2.js +1 -1
- package/dist/module/bank-account-form-inputs2.js +1 -1
- package/dist/module/bank-account-form2.js +2 -2
- package/dist/module/bank-account-read-only-value2.js +1 -1
- package/dist/module/business-representative-form-inputs2.js +2 -2
- package/dist/module/business-terms-conditions-form-step2.js +1 -1
- package/dist/module/card-billing-form-simple2.js +1 -1
- package/dist/module/card-form2.js +2 -2
- package/dist/module/checkouts-list-core2.js +1 -1
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/dispute-management-core.js +1 -1
- package/dist/module/dispute-response-core.js +1 -1
- package/dist/module/form-address-fields2.js +1 -1
- package/dist/module/form-control-checkbox2.js +2 -2
- package/dist/module/form-control-date2.js +2 -2
- package/dist/module/form-control-file-v22.js +1 -1
- package/dist/module/form-control-file2.js +2 -2
- package/dist/module/form-control-monetary2.js +2 -2
- package/dist/module/form-control-number-masked2.js +2 -2
- package/dist/module/form-control-number2.js +2 -2
- package/dist/module/form-control-radio2.js +2 -2
- package/dist/module/form-control-select2.js +2 -2
- package/dist/module/form-control-text2.js +2 -2
- package/dist/module/form-control-textarea2.js +2 -2
- package/dist/module/gross-payment-chart-core2.js +2 -2
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/internal-button2.js +1 -1
- package/dist/module/justifi-additional-statement2.js +1 -1
- package/dist/module/justifi-apple-pay2.js +2 -0
- package/dist/module/justifi-bank-account-billing-form-simple.js +1 -1
- package/dist/module/justifi-bank-account-form.js +1 -1
- package/dist/module/justifi-billing-form-full.js +1 -1
- package/dist/module/justifi-billing-form.js +1 -1
- package/dist/module/justifi-business-form.js +1 -1
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-cancellation-policy2.js +1 -1
- package/dist/module/justifi-card-billing-form-simple.js +1 -1
- package/dist/module/justifi-card-form.js +1 -1
- package/dist/module/justifi-checkout-summary2.js +1 -1
- package/dist/module/justifi-checkout.js +2 -2
- package/dist/module/justifi-checkouts-list-filters.js +2 -2
- package/dist/module/justifi-checkouts-list.js +1 -1
- package/dist/module/justifi-customer-details2.js +1 -1
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-dispute-notification2.js +2 -2
- package/dist/module/justifi-dispute-response2.js +1 -1
- package/dist/module/justifi-duplicate-charge2.js +1 -1
- package/dist/module/justifi-electronic-evidence2.js +1 -1
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-modular-checkout2.js +1 -1
- package/dist/module/justifi-order-terminals.js +1 -1
- package/dist/module/justifi-payment-provisioning.js +182 -65
- package/dist/module/justifi-payment-transactions-list.js +1 -1
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +1 -1
- package/dist/module/justifi-payouts-list-filters.js +2 -2
- package/dist/module/justifi-payouts-list.js +1 -1
- package/dist/module/justifi-product-or-service2.js +1 -1
- package/dist/module/justifi-refund-policy2.js +1 -1
- package/dist/module/justifi-save-new-payment-method.js +1 -1
- package/dist/module/justifi-saved-payment-method.js +1 -1
- package/dist/module/justifi-shipping-details2.js +1 -1
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +3 -3
- package/dist/module/justifi-terminal-orders-list.js +1 -1
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +1 -1
- package/dist/module/justifi-tokenize-payment-method2.js +1 -1
- package/dist/module/package.js +1 -1
- package/dist/module/payment-details-core2.js +8 -8
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/payment-provisioning-form-buttons2.js +1 -1
- package/dist/module/payment-provisioning-form-steps2.js +1 -1
- package/dist/module/payments-list-core2.js +1 -1
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payouts-list-core2.js +1 -1
- package/dist/module/radio-list-item2.js +1 -1
- package/dist/module/save-new-payment-method2.js +1 -1
- package/dist/module/table-filters-menu2.js +1 -1
- package/dist/module/terminal-orders-list-core2.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/module/terminals-list-core2.js +2 -2
- package/dist/module/utils2.js +1 -1
- package/dist/types/api/ApplePay.d.ts +3 -0
- package/dist/types/components/business-forms/payment-provisioning/justifi-payment-provisioning.d.ts +26 -4
- package/dist/types/components.d.ts +4 -51
- package/dist/webcomponents/p-0b95dd8f.entry.js +1 -0
- package/dist/webcomponents/p-0ee11ceb.entry.js +1 -0
- package/dist/webcomponents/p-15377f17.entry.js +1 -0
- package/dist/webcomponents/p-15dfb893.entry.js +1 -0
- package/dist/webcomponents/{p-6372a42a.entry.js → p-15f43759.entry.js} +1 -1
- package/dist/webcomponents/p-1628613b.entry.js +1 -0
- package/dist/webcomponents/p-17fb6153.entry.js +1 -0
- package/dist/webcomponents/p-18fc10ca.entry.js +1 -0
- package/dist/webcomponents/{p-90f2c769.entry.js → p-1b92fb9a.entry.js} +1 -1
- package/dist/webcomponents/p-1c54dc53.entry.js +1 -0
- package/dist/webcomponents/p-1f2129ec.entry.js +1 -0
- package/dist/webcomponents/p-1fe99fde.entry.js +1 -0
- package/dist/webcomponents/p-20b0f88b.entry.js +1 -0
- package/dist/webcomponents/p-257597f1.entry.js +1 -0
- package/dist/webcomponents/{p-b31c9979.entry.js → p-26c419f3.entry.js} +1 -1
- package/dist/webcomponents/p-2f71285a.entry.js +1 -0
- package/dist/webcomponents/p-30662daa.entry.js +1 -0
- package/dist/webcomponents/p-30f61950.entry.js +1 -0
- package/dist/webcomponents/{p-3d135aee.entry.js → p-39bb134c.entry.js} +1 -1
- package/dist/webcomponents/p-3O6JkTxx.js +1 -0
- package/dist/webcomponents/p-3c50f7aa.entry.js +1 -0
- package/dist/webcomponents/p-3c59fe06.entry.js +1 -0
- package/dist/webcomponents/p-3e74bd93.entry.js +1 -0
- package/dist/webcomponents/p-45212820.entry.js +1 -0
- package/dist/webcomponents/p-46d8145c.entry.js +1 -0
- package/dist/webcomponents/{p-9838b5a7.entry.js → p-4db2e291.entry.js} +1 -1
- package/dist/webcomponents/{p-c07069f1.entry.js → p-55e7e239.entry.js} +1 -1
- package/dist/webcomponents/p-58e811cc.entry.js +1 -0
- package/dist/webcomponents/{p-534881d8.entry.js → p-5d2bcf39.entry.js} +1 -1
- package/dist/webcomponents/p-6ae9b2c5.entry.js +1 -0
- package/dist/webcomponents/p-6ba76fc2.entry.js +1 -0
- package/dist/webcomponents/p-6e5ec134.entry.js +1 -0
- package/dist/webcomponents/p-707e1e27.entry.js +1 -0
- package/dist/webcomponents/p-70a7c529.entry.js +1 -0
- package/dist/webcomponents/p-71de86bf.entry.js +1 -0
- package/dist/webcomponents/p-799e1a2f.entry.js +1 -0
- package/dist/webcomponents/p-80a9216a.entry.js +1 -0
- package/dist/webcomponents/p-8d215ad8.entry.js +1 -0
- package/dist/webcomponents/p-8d5138d8.entry.js +1 -0
- package/dist/webcomponents/p-8d88556f.entry.js +1 -0
- package/dist/webcomponents/p-8dc0e73a.entry.js +1 -0
- package/dist/webcomponents/p-8e9407a1.entry.js +1 -0
- package/dist/webcomponents/p-90d106c7.entry.js +1 -0
- package/dist/webcomponents/{p-d667138d.entry.js → p-938e4dc8.entry.js} +1 -1
- package/dist/webcomponents/p-99f3e1e0.entry.js +1 -0
- package/dist/webcomponents/{p-534833ca.entry.js → p-9a00cde1.entry.js} +1 -1
- package/dist/webcomponents/{p-J7WCmj-J.js → p-B--wlcf0.js} +1 -1
- package/dist/webcomponents/p-B2OPgLr1.js +1 -0
- package/dist/webcomponents/p-B5w1e9rb.js +1 -0
- package/dist/webcomponents/p-BIiEPAAI.js +1 -0
- package/dist/webcomponents/p-BMdYr88u.js +1 -0
- package/dist/webcomponents/p-BisDKGW5.js +1 -0
- package/dist/webcomponents/p-BlW92We8.js +1 -0
- package/dist/webcomponents/{p-D2muobcE.js → p-C-Uj-u5r.js} +1 -1
- package/dist/webcomponents/{p-D2TJwp13.js → p-C6IaNDXe.js} +1 -1
- package/dist/webcomponents/{p-DL0R5vDy.js → p-C95_YBmG.js} +1 -1
- package/dist/webcomponents/p-CASlE7cE.js +1 -0
- package/dist/webcomponents/{p-CMB3sNMT.js → p-CEnTtUmd.js} +1 -1
- package/dist/webcomponents/{p-Bwzxu5wV.js → p-CSW_ZzE9.js} +1 -1
- package/dist/webcomponents/{p-MkDHT9M4.js → p-CTwm3w6I.js} +1 -1
- package/dist/webcomponents/p-ChUBhd2W.js +1 -0
- package/dist/webcomponents/p-CpPclqiT.js +1 -0
- package/dist/webcomponents/{p-D0BjjvYt.js → p-DKzki_Iz.js} +1 -1
- package/dist/webcomponents/p-DtDYtwHR.js +1 -0
- package/dist/webcomponents/p-ZiYybdMz.js +1 -0
- package/dist/webcomponents/p-a00ccf58.entry.js +1 -0
- package/dist/webcomponents/p-a511a246.entry.js +1 -0
- package/dist/webcomponents/p-a9edf63a.entry.js +1 -0
- package/dist/webcomponents/p-ad785edd.entry.js +1 -0
- package/dist/webcomponents/p-afe956d9.entry.js +1 -0
- package/dist/webcomponents/p-b822ab7e.entry.js +1 -0
- package/dist/webcomponents/{p-1c95ec74.entry.js → p-bbcaa5cc.entry.js} +2 -2
- package/dist/webcomponents/p-bd3f7117.entry.js +1 -0
- package/dist/webcomponents/{p-2bec5dca.entry.js → p-c499a613.entry.js} +1 -1
- package/dist/webcomponents/p-c4d50650.entry.js +1 -0
- package/dist/webcomponents/p-c7ecb7d3.entry.js +1 -0
- package/dist/webcomponents/p-ce8de71b.entry.js +1 -0
- package/dist/webcomponents/{p-252a4f75.entry.js → p-d072a65f.entry.js} +1 -1
- package/dist/webcomponents/{p-ea84c544.entry.js → p-d34f497c.entry.js} +1 -1
- package/dist/webcomponents/p-d791e38e.entry.js +1 -0
- package/dist/webcomponents/p-d8918d5a.entry.js +1 -0
- package/dist/webcomponents/{p-42129686.entry.js → p-de4c796a.entry.js} +1 -1
- package/dist/webcomponents/p-e204efea.entry.js +1 -0
- package/dist/webcomponents/p-e70602bd.entry.js +1 -0
- package/dist/webcomponents/p-e751e2c3.entry.js +1 -0
- package/dist/webcomponents/{p-744f57f0.entry.js → p-ef30afd5.entry.js} +1 -1
- package/dist/webcomponents/p-f7522364.entry.js +1 -0
- package/dist/webcomponents/p-fNBks3-O.js +1 -0
- package/dist/webcomponents/p-facdac1b.entry.js +1 -0
- package/dist/webcomponents/p-g6a7Gl9y.js +1 -0
- package/dist/webcomponents/p-lFx33NDk.js +1 -0
- package/dist/webcomponents/p-x7WGc-xR.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +14 -14
- package/LICENSE +0 -21
- package/dist/cjs/ComponentError-D4OLnOkg.js +0 -31
- package/dist/cjs/bank-account-document-form-inputs_9.cjs.entry.js +0 -525
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +0 -151
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +0 -353
- package/dist/esm/ComponentError-Cjcsf8ku.js +0 -31
- package/dist/esm/bank-account-document-form-inputs_9.entry.js +0 -515
- package/dist/esm/justifi-payment-provisioning-core.entry.js +0 -149
- package/dist/module/justifi-payment-provisioning-core.d.ts +0 -11
- package/dist/module/justifi-payment-provisioning-core.js +0 -6
- package/dist/module/payment-provisioning-core.js +0 -367
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-core.d.ts +0 -43
- package/dist/webcomponents/p-08424d71.entry.js +0 -1
- package/dist/webcomponents/p-089bc927.entry.js +0 -1
- package/dist/webcomponents/p-0b7fa323.entry.js +0 -1
- package/dist/webcomponents/p-16ae88d0.entry.js +0 -1
- package/dist/webcomponents/p-179fe9a0.entry.js +0 -1
- package/dist/webcomponents/p-1a9aecbf.entry.js +0 -1
- package/dist/webcomponents/p-1d1c48c3.entry.js +0 -1
- package/dist/webcomponents/p-1da3ba0f.entry.js +0 -1
- package/dist/webcomponents/p-26062991.entry.js +0 -1
- package/dist/webcomponents/p-26074643.entry.js +0 -1
- package/dist/webcomponents/p-2719f4db.entry.js +0 -1
- package/dist/webcomponents/p-2a0ce169.entry.js +0 -1
- package/dist/webcomponents/p-2b8df3c0.entry.js +0 -1
- package/dist/webcomponents/p-358f7121.entry.js +0 -1
- package/dist/webcomponents/p-383798ab.entry.js +0 -1
- package/dist/webcomponents/p-485a8795.entry.js +0 -1
- package/dist/webcomponents/p-4d222f42.entry.js +0 -1
- package/dist/webcomponents/p-53dd8569.entry.js +0 -1
- package/dist/webcomponents/p-56d58041.entry.js +0 -1
- package/dist/webcomponents/p-61784c6a.entry.js +0 -1
- package/dist/webcomponents/p-7108eead.entry.js +0 -1
- package/dist/webcomponents/p-729c9798.entry.js +0 -1
- package/dist/webcomponents/p-7742cf61.entry.js +0 -1
- package/dist/webcomponents/p-774b69a0.entry.js +0 -1
- package/dist/webcomponents/p-77600a47.entry.js +0 -1
- package/dist/webcomponents/p-783580d4.entry.js +0 -1
- package/dist/webcomponents/p-83fd4eae.entry.js +0 -1
- package/dist/webcomponents/p-848ae146.entry.js +0 -1
- package/dist/webcomponents/p-865d4604.entry.js +0 -1
- package/dist/webcomponents/p-8Kt4Rhcq.js +0 -1
- package/dist/webcomponents/p-8c52d10a.entry.js +0 -1
- package/dist/webcomponents/p-8df335d4.entry.js +0 -1
- package/dist/webcomponents/p-9639d9d0.entry.js +0 -1
- package/dist/webcomponents/p-97d16844.entry.js +0 -1
- package/dist/webcomponents/p-B6sIVWJW.js +0 -1
- package/dist/webcomponents/p-BmEX2SfZ.js +0 -1
- package/dist/webcomponents/p-C1olhiO9.js +0 -1
- package/dist/webcomponents/p-CAl_N2gi.js +0 -1
- package/dist/webcomponents/p-CBqZge6m.js +0 -1
- package/dist/webcomponents/p-CIYOQWsL.js +0 -1
- package/dist/webcomponents/p-CMqX6btO.js +0 -1
- package/dist/webcomponents/p-CWv3GX8X.js +0 -1
- package/dist/webcomponents/p-Cjcsf8ku.js +0 -1
- package/dist/webcomponents/p-CmXujxGp.js +0 -1
- package/dist/webcomponents/p-DLmWCafe.js +0 -1
- package/dist/webcomponents/p-DYGIC0QH.js +0 -1
- package/dist/webcomponents/p-Dvcgmvfg.js +0 -1
- package/dist/webcomponents/p-MLfmcsbZ.js +0 -1
- package/dist/webcomponents/p-R0FDNhyd.js +0 -1
- package/dist/webcomponents/p-a53fae42.entry.js +0 -1
- package/dist/webcomponents/p-a5640aa4.entry.js +0 -1
- package/dist/webcomponents/p-b21e5a85.entry.js +0 -1
- package/dist/webcomponents/p-b2d7a9dd.entry.js +0 -1
- package/dist/webcomponents/p-b596cbb3.entry.js +0 -1
- package/dist/webcomponents/p-b7ffdb30.entry.js +0 -1
- package/dist/webcomponents/p-bac16c16.entry.js +0 -1
- package/dist/webcomponents/p-bb4cc829.entry.js +0 -1
- package/dist/webcomponents/p-bbdae5b7.entry.js +0 -1
- package/dist/webcomponents/p-c4da12e0.entry.js +0 -1
- package/dist/webcomponents/p-c5be6300.entry.js +0 -1
- package/dist/webcomponents/p-c63b8c8f.entry.js +0 -1
- package/dist/webcomponents/p-d6350138.entry.js +0 -1
- package/dist/webcomponents/p-d6c2d51d.entry.js +0 -1
- package/dist/webcomponents/p-def798df.entry.js +0 -1
- package/dist/webcomponents/p-e2650fe5.entry.js +0 -1
- package/dist/webcomponents/p-e4ba0754.entry.js +0 -1
- package/dist/webcomponents/p-e939affa.entry.js +0 -1
- package/dist/webcomponents/p-e9c20b52.entry.js +0 -1
- package/dist/webcomponents/p-rz2BF2Sz.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{C as o,B as n,c as h}from"./p-BcNb9bVO.js";import{t as a}from"./p-D50Rx76J.js";import{S as p}from"./p-BqNNwq6C.js";import{H as l}from"./p-DB_pqjwH.js";import"./p-CZfYo5-1.js";import{B as c}from"./p-XYgDHrVL.js";import{P as m}from"./p-CbM9cuX_.js";import"./p-BrO0HEFJ.js";const u=()=>s("div",{class:"row gap-3 p-5"},s("div",{class:"col-12"},s(l,{text:"Business Already Provisioned"})),s("div",{class:"col-12",part:a},s("p",null,"We have already received the onboarding information for this business."))),d=()=>s("div",{class:"row gap-3 p5"},s("div",{class:"col-12"},s(l,{text:"You're all set for now"})),s("div",{class:"col-12",part:a},s("p",null,"We're reviewing your information and working on your approval. We'll be in touch to let you know once you've been approved (or if we find anything that needs fixing). Have a good one!"))),f=class{constructor(s){t(this,s),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.submitEvent=i(this,"submit-event",7),this.loading=!1,this.businessLoading=!0,this.businessProvisioned=!1,this.formSubmitted=!1,this.currentStep=0,this.country=o.USA,this.allowOptionalFields=!1,this.setBusinessProvisioned=()=>new Promise((s=>{this.getBusiness({onSuccess:t=>{const i=new n(t.data);this.businessProvisioned=h(i),this.country=i.country_of_establishment,this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:r.PROVISIONING_REQUESTED,severity:e.INFO}),this.businessLoading=!1,s()},onError:({error:t,code:i,severity:e})=>{this.errorEvent.emit({message:t,errorCode:i,severity:e}),this.businessLoading=!1,s()}})})),this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.formSubmitted=!0,this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.refs=[],this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>this.currentStep--,this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:c.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}handleFormCompleted(){this.postProvisioningData()}async componentWillLoad(){this.getBusiness?await this.setBusinessProvisioned():this.businessLoading=!1,this.refs=[this.coreInfoRef,this.legalAddressRef,this.additionalQuestionsRef,this.representativeRef,this.ownersRef,this.bankAccountRef,this.termsRef]}get businessEndpoint(){return`entities/business/${this.businessId}`}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`Step ${this.currentStep+1} of ${this.totalSteps+1}`}handleFormLoading(s){this.loading=s.detail}render(){return s(p,null,this.businessLoading?s(m,null):this.businessProvisioned?s(u,null):this.formSubmitted?s(d,null):s("div",{class:"row gap-3"},s(l,{text:this.formTitle}),s("payment-provisioning-form-steps",{businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,country:this.country,handleFormLoading:this.handleFormLoading}),s("div",{class:"d-flex justify-content-between align-items-center"},s("div",{class:"d-flex align-items-center",part:a},this.stepCounter),s("payment-provisioning-form-buttons",{currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}};export{f as justifi_payment_provisioning_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-CKiAlBsU.js";import{f as o}from"./p-MkDHT9M4.js";import"./p-DVJaoI_m.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as h,l}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{B as c}from"./p-C-QiUcEa.js";import{S as m}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{P as d}from"./p-DLmWCafe.js";import{m as p}from"./p-C1olhiO9.js";import{J as f}from"./p-CmXujxGp.js";import{c as v}from"./p-D0BjjvYt.js";import{g as y,a as j}from"./p-D2muobcE.js";import{A as b}from"./p-CMB3sNMT.js";import{S as w}from"./p-BrO0HEFJ.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";import"./p-D50Rx76J.js";import"./p-CIYOQWsL.js";const C=t=>{const e=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${o(e)}`,(function(t){return+t<=+e})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},T=t=>{if(t)return r({amount:C(t),description:i().optional(),reason:i().optional().oneOf([h.customerRequest,h.duplicate,h.fraudulent],"Select a reason")})},g=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],I=b();class k{async postRefund(t,e,s,r){return I.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const x=b();class B{async postVoid(t,e,s){return x.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":e},authToken:s})}}const A=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),S=()=>t(m,null,t("div",{class:"row gap-5"},t(A,null),t(A,null),t(A,null))),D=class{constructor(t){e(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}componentWillLoad(){v(),this.analytics=new f(this),this.initializeApi(),this.formController=new n(T())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}isPaymentCreatedWithin25Minutes(){var t;if(!this.payment||!(null===(t=this.payment)||void 0===t?void 0:t.created_at))return!1;const e=new Date(this.payment.created_at);return((new Date).getTime()-e.getTime())/6e4<=25}initializeFormController(){const t=this.refundPayload.amount,e=t?t.toString():"0";this.formController=new n(T(e)),this.formController.setInitialValues({amount:e}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?p({id:this.paymentId,authToken:this.authToken,service:new d})({onSuccess:({payment:t})=>{this.payment=t,this.refundPayload=new l({amount:t.amount_refundable})},onError:({error:t,code:e,severity:s})=>{this.handleError(e,t,s)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const e=this.formController.values.getValue();return this.refundLoading=!0,this.isPaymentCreatedWithin25Minutes()?this.tryVoidPayment():this.processRefund(e)}async tryVoidPayment(){const t=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({onSuccess:i,onError:n,final:o})=>{var u;try{const o=await r.postVoid(s,e,t);if(o.error)return n({error:j(o.error),code:y(null===(u=o.error)||void 0===u?void 0:u.code),severity:a.ERROR});i(o)}catch(t){const e=y(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:a.ERROR})}finally{return o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new B});return new Promise((e=>{let s,r=!1;const i=this.formController.values.getValue();t({onSuccess:t=>{s=t,r=!0},onError:({error:t,code:s,severity:n})=>{r=!0,this.handleError(t,s,n),this.processRefund(i).then(e)},final:()=>{s&&!s.error&&r&&(this.submitEvent.emit({response:s}),this.submitDisabled=!0,this.refundLoading=!1,e(s.data))}})}))}async processRefund(t){const e=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({refundBody:i,onSuccess:n,onError:o,final:u})=>{var h;try{const u=await r.postRefund(s,e,t,i);if(u.error)return o({error:j(u.error),code:y(null===(h=u.error)||void 0===h?void 0:h.code),severity:a.ERROR});n(u)}catch(t){const e=y(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new k});return new Promise((s=>{let r;e({refundBody:t,onSuccess:t=>{r=t},onError:({error:t,code:e,severity:s})=>{r=t,this.handleError(t,e,s)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,s(r.data)}})}))}render(){if(this.paymentLoading)return t(S,null);const e=this.formController.getInitialValues(),s=this.refundPayload.amount;return t(m,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:e.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:e.reason,inputHandler:this.inputHandler,options:g,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:e.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(c,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${o(+s)}`))))))}};export{D as justifi_refund_payment}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,c as t,h as e,H as i}from"./p-CV0Pyo1O.js";import{C as r,a as n}from"./p-Cjcsf8ku.js";import{m as o,b as a,f as h,g as c}from"./p-R0FDNhyd.js";import{B as l,a as d,D as u}from"./p-B6sIVWJW.js";import{a as m,c as p,b}from"./p-BovgIz83.js";import{F as f,c as v,a as y,b as g,d as w}from"./p-CKiAlBsU.js";import{A as k,C as _,e as C,R as j,f as T}from"./p-BcNb9bVO.js";import{C as x,P as O}from"./p-CVaOFfrI.js";import{b as S,a2 as E,E as I,z as B,w as L,am as A}from"./p-D50Rx76J.js";import{P as D}from"./p-CbM9cuX_.js";import{b as P,c as H}from"./p-Bt4GjEWL.js";import{a as V,B as F}from"./p-XYgDHrVL.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{E as W,p as q,q as M}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{A as R,B as U,v as z,C as N,D as Y,E as J,F as X}from"./p-HT_4DkD0.js";import{B as G}from"./p-C-QiUcEa.js";import"./p-CZfYo5-1.js";import{c as Q}from"./p-_-2E_vYf.js";import{d as Z,e as $}from"./p-D8EGHc_m.js";import{A as K}from"./p-CMB3sNMT.js";import"./p-D2muobcE.js";import"./p-BFTU3MAI.js";import"./p-BrO0HEFJ.js";import"./p-D8GTwl9v.js";import"./p-MkDHT9M4.js";class ss{constructor(s){this.id=s.id,this.account_owner_name=s.account_owner_name,this.full_name=s.full_name,this.account_type=s.account_type,this.account_number=s.account_number,this.acct_last_four=s.acct_last_four,this.account_number_last4=s.account_number_last4,this.routing_number=s.routing_number,this.institution_number=s.institution_number,this.transit_number=s.transit_number,this.bank_name=s.bank_name,this.country=s.country,this.currency=s.currency,this.nickname=s.nickname,this.metadata=s.metadata,this.business_id=s.business_id,this.platform_account_id=s.platform_account_id,this.created_at=s.created_at,this.updated_at=s.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",institution_number:this.institution_number||"",transit_number:this.transit_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const ts=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.additional_questions=new k(s.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t})),this.additional_questions=new k(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}recurringPaymentsWatcher(s){this.recurringPayments="Yes"===(null==s?void 0:s.business_recurring_payments)}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{additional_questions:new k(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new f(m(this.allowOptionalFields))}componentDidLoad(){this.getBusiness&&this.getData(),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s,t,i,r,n;const o=this.formController.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Additional Questions"),e("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),e("hr",{class:"mt-2"}),e("div",{class:"row gy-3"},e("div",{class:"col-12 col-md-6"},e("form-control-monetary-provisioning",{name:"business_revenue",label:"What is your business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(s=this.errors)||void 0===s?void 0:s.business_revenue,defaultValue:null==o?void 0:o.business_revenue,maskOptions:x.WHOLE})),e("div",{class:"col-12 col-md-6"},e("form-control-monetary-provisioning",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(t=this.errors)||void 0===t?void 0:t.business_payment_volume,defaultValue:null==o?void 0:o.business_payment_volume,maskOptions:x.WHOLE})),e("div",{class:"col-12"},e("form-control-text",{name:"business_average_transaction_amount",label:"What is your average transaction size?",inputHandler:this.inputHandler,errorText:null===(i=this.errors)||void 0===i?void 0:i.business_average_transaction_amount,defaultValue:null==o?void 0:o.business_average_transaction_amount})),e("div",{class:"col-12"},e("form-control-select",{name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_when_service_received,options:P,defaultValue:null==o?void 0:o.business_when_service_received})),e("div",{class:"col-12"},e("form-control-text",{name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business? (optional)",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_other_payment_details,defaultValue:null==o?void 0:o.business_other_payment_details})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],additional_questions:["recurringPaymentsWatcher"]}}},es=(s,t)=>s.some((s=>s.document_type===t)),is=s=>s?{bank_name:Y.nullable(),nickname:N.nullable(),account_owner_name:z.nullable(),account_type:U.nullable(),account_number:R.nullable()}:{bank_name:Y.required("Enter bank name"),nickname:N.required("Enter nickname"),account_owner_name:z.required("Enter account owner name"),account_type:U.required("Select account type"),account_number:R.required("Enter account number")},rs=(s,t)=>{if(t)return{voided_check:g().nullable(),bank_statement:g().nullable()};const e=es(s,W.voidedCheck),i=es(s,W.bankStatement),r=e||i,n="Please upload either a voided check or a bank statement. Only one is required.";return{voided_check:g().when("bank_statement",{is:s=>!s&&!r,then:s=>s.required(n),otherwise:s=>s.notRequired()}),bank_statement:g().when("voided_check",{is:s=>!s&&!r,then:s=>s.required(n),otherwise:s=>s.notRequired()})}},ns={[_.USA]:(s,t=[])=>((s,t)=>{const e=Object.assign(Object.assign(Object.assign({},is(t)),(s=>s?{routing_number:X.nullable()}:{routing_number:X.required("Enter routing number")})(t)),rs(s,t));return v().shape(e,[["voided_check","bank_statement"]])})(t,s),[_.CAN]:(s,t=[])=>((s,t)=>{const e=Object.assign(Object.assign(Object.assign({},is(t)),(s=>{const t=y().length(3,"Institution number must be 3 digits").matches(J,"Enter valid institution number"),e=y().length(5,"Transit number must be 5 digits").matches(J,"Enter valid transit number");return s?{institution_number:t.nullable(),transit_number:e.nullable()}:{institution_number:t.required("Enter institution number"),transit_number:e.required("Enter transit number")}})(t)),rs(s,t));return v().shape(e,[["voided_check","bank_statement"]])})(t,s)},os=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new q,this.isLoading=!1,this.viewMode="manual",this.bankAccountVerification=!1,this.platformAccountId=null,this.getSchema=()=>(0,ns[this.country])(this.allowOptionalFields,this.existingDocuments),this.initializeFormController=()=>{this.formController=new f(this.getSchema()),this.formController.setInitialValues("readonly"===this.viewMode?Object.assign({},this.bankAccount):{business_id:this.businessId}),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.storeFiles=s=>{const t=Array.from(s.detail.fileList),e=s.detail.document_type,i=t.map((s=>new M({file:s,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.processBusinessResponse(s.data),this.determineViewMode()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.handleChangeBankAccount=()=>{this.viewMode=this.plaidAvailable?"plaid":"manual",this.documentData=new q,this.initializeFormController()},this.handleCancel=()=>{this.viewMode=this.existingBankAccount?"readonly":"plaid",this.documentData=new q,this.initializeFormController()},this.handleToggleToManualEntry=()=>{this.viewMode="manual"},this.handleToggleToPlaidVerification=()=>{this.viewMode="plaid"},this.handleSaveBankAccount=async()=>{this.formController.validateAndSubmit((()=>{this.sendData((()=>{}))}))},this.postDocumentRecordData=async s=>{this.isLoading=!0;const t=s.record_data;return new Promise((e=>{this.postDocumentRecord({payload:t,onSuccess:t=>{e(this.handleDocRecordResponse(s,t))},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({message:s,errorCode:t,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(s,t)=>t.error?(this.errorEvent.emit({errorCode:n.POST_ERROR,message:t.error.message,severity:r.ERROR,data:t.error}),!1):(s.setPresignedUrl(t.data.presigned_url),!0),this.uploadDocument=async s=>{if(!s.presigned_url)throw new Error("Presigned URL is not set");const t=await s.getFileData(),e=await fetch(s.presigned_url,{method:"PUT",body:t});return this.handleUploadResponse(e)},this.handleUploadResponse=s=>!s.error||(this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.error.message,severity:r.ERROR,data:s.error}),!1)}propChanged(){this.initializeApi()}watchHandler(s){this.formLoading.emit(s)}async validateAndSubmit({onSuccess:s}){"readonly"===this.viewMode?this.sendData(s):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData(),this.formController=new f(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.postBankAccount=h({authToken:this.authToken,service:new d}),this.postDocumentRecord=c({authToken:this.authToken,service:new u})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}get postPayload(){const s=this.formController.values.getValue();return new ss(s).payload}get existingBankAccount(){var s;return!!(null===(s=this.bankAccount)||void 0===s?void 0:s.id)}get plaidAvailable(){return this.bankAccountVerification&&!!this.platformAccountId}get showCancel(){return this.bankAccountVerification||this.existingBankAccount}processBusinessResponse(s){const{bank_accounts:t,documents:e,settings:i,platform_account_id:r}=s;t.length>0?this.bankAccount=new ss(t[t.length-1]):(this.bankAccount=new ss({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=e,this.bankAccountVerification=!0===i.bank_account_verification,this.platformAccountId=r}determineViewMode(){this.viewMode=this.existingBankAccount?"readonly":this.plaidAvailable?"plaid":"manual"}async sendData(s){try{if("manual"===this.viewMode&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;"manual"===this.viewMode&&(this.viewMode="readonly",await this.refreshBankAccountData()),s()}catch(s){this.errorEvent.emit({message:s,errorCode:n.POST_ERROR,severity:r.ERROR})}}async postBankAccountData(){let s;return this.isLoading=!0,new Promise((t=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:t=>{s=t,e=!0},onError:({error:s,code:t,severity:i})=>{e=!1,this.errorEvent.emit({message:s,errorCode:t,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:V.bankAccount}),this.isLoading=!1,t(e)}})}))}async refreshBankAccountData(){return new Promise((s=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.processBusinessResponse(s.data),this.determineViewMode(),this.initializeFormController()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.isLoading=!1,s()}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const s=Object.values(this.documentData).flat();return!s.length||!(await Promise.all(s.map((s=>this.postDocumentRecordData(s))))).includes(!1)&&!(await Promise.all(s.map((s=>this.uploadDocument(s))))).includes(!1)}finally{this.isLoading=!1}}renderBankAccountInputs(s){const t=this.formController.getInitialValues();return e(this.country===_.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:t,errors:this.errors,inputHandler:this.inputHandler,formDisabled:s})}renderReadonlyView(){return e("div",null,this.renderBankAccountInputs(!0),e("div",{class:"mt-3"},e(G,{variant:"secondary",type:"button",onClick:this.handleChangeBankAccount,disabled:this.isLoading,part:E},"Change Bank Account")))}renderPlaidView(){return e("div",{class:"mt-3"},e("plaid-verification",{authToken:this.authToken,accountId:this.platformAccountId,businessId:this.businessId,onPlaidVerificationSuccess:()=>{this.viewMode="readonly",this.refreshBankAccountData()}}),e("div",{class:"mt-3"},e(G,{type:"button",variant:"link",className:"p-0",onClick:this.handleToggleToManualEntry,disabled:this.isLoading,part:I},"Enter bank details manually (document upload required)")))}renderManualEntryView(){return e("div",null,this.plaidAvailable&&e("div",{class:"mb-3"},e(G,{type:"button",variant:"secondary",onClick:this.handleToggleToPlaidVerification,disabled:this.isLoading,part:E},"Link bank account with Plaid instead")),this.renderBankAccountInputs(!1),e("div",{class:"mt-3 d-flex gap-2"},this.showCancel&&e(G,{variant:"secondary",type:"button",onClick:this.handleCancel,disabled:this.isLoading,part:E},"Cancel"),e(G,{variant:"primary",type:"button",onClick:this.handleSaveBankAccount,disabled:this.isLoading,isLoading:this.isLoading},"Save Bank Account")))}renderDocumentUploads(){return e("fieldset",{class:"mt-4"},e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Document Uploads"),e("form-control-tooltip",{helpText:"One document (voided check or bank statement) is required for underwriting purposes. It needs to visibly show the name tied to the account and the account number. Various file formats such as PDF, DOC, DOCX, JPEG are accepted. Multiple files can be uploaded for each document category."})),e("hr",{class:"mt-2"}),e("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),e("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles}))}render(){return this.isLoading?e(D,null):e("form",null,e("fieldset",{class:"mb-4"},e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Bank Account Info"),e("form-control-tooltip",{helpText:"This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),e("hr",{class:"mt-2"}),"readonly"===this.viewMode&&this.renderReadonlyView(),"plaid"===this.viewMode&&this.renderPlaidView(),"manual"===this.viewMode&&this.renderManualEntryView()),"plaid"!==this.viewMode&&this.renderDocumentUploads())}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],isLoading:["watchHandler"]}}},as=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.coreInfo={},this.isLoading=!1,this.isEditingTaxId=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.coreInfo=new C(s.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s(),this.isEditingTaxId=!1},onError:({error:s,code:e,severity:i,rawError:r})=>{t=s,r&&"object"==typeof r&&r.param&&this.formController.setFieldError(r.param,r.message),this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.errors[s]&&this.formController.clearFieldError(s),this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return new C(this.formController.values.getValue()).payload}componentWillLoad(){this.initializeApi();const s=this.country===_.CAN?p(this.allowOptionalFields):b(this.allowOptionalFields);this.formController=new f(s),this.getData()}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s,t;const i=this.formController.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Business Information")),e("hr",{class:"mt-2"}),e("div",{class:"row gy-3"},e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)."})),e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)"})),e("div",{class:"col-12 col-md-8"},e("form-control-select",{name:"classification",label:"Business Classification",options:H,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-4"},e("form-control-date",{name:"date_of_incorporation",label:"Date of Registration",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),e("div",{class:"col-12 col-md-6"},!(null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4)||this.isEditingTaxId?e("form-control-number-masked",{name:"tax_id",label:Q[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:Q[this.country].taxIdHelpText}):e("div",null,e("label",{class:"form-label",part:B},Q[this.country].taxIdLabel),e("div",{class:"input-group mb-3"},e("input",{type:"text",class:"form-control",part:L,value:`****${null===(t=this.coreInfo)||void 0===t?void 0:t.tax_id_last4}`,disabled:!0}),e("button",{class:"btn btn-secondary",type:"button",part:E,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),e("div",{class:"col-12"},e("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler,helpText:"Don't have a live website? You can use your social media business page, app store link, or staging site URL."})),e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-6"},e("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:O.US})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},hs=class{constructor(e){s(this,e),this.clickEvent=t(this,"click-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.errorEvent=t(this,"error-event",7),this.formLoading=t(this,"formLoading",7),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.representativeIsOwner=null,this.matchRef=(s,t)=>{if(null===s)return;const e=this.ownersPayload.findIndex((s=>s.id===t));-1!==e&&(this.refs.length!==this.ownersPayload.length&&this.manageRefs(),this.refs[e]=s)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.representative=new j(s.data.representative||{}),s.data.owners.length?this.ownersPayload=s.data.owners.map((s=>({id:s.id}))):this.addOwnerForm()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=s=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],s&&this.clickEvent.emit({name:F.addOwnerForm})},this.removeOwnerForm=s=>{this.ownersPayload=this.ownersPayload.filter((t=>t.id!==s)),this.newFormOpen&&(this.newFormOpen=!1)},this.handleRepresentativeIsOwnerChange=s=>{this.representativeIsOwner=s,this.representativeIsOwner&&(this.formLoading.emit(!0),this.isLoading=!0,this.ownersPayload=this.ownersPayload.filter((s=>""!==s.id)),this.patchBusiness({payload:{owners:[{id:this.representative.id},...this.ownersPayload]},onSuccess:()=>{this.getData(),this.newFormOpen=!1},finally:()=>{this.isLoading=!1,this.formLoading.emit(!1)}}))}}propChanged(){this.initializeApi()}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((s=>s.id))}async validateAndSubmit({onSuccess:s}){const t=this.refs.map((s=>s.validate()));if(!(await Promise.all(t)).every((s=>s)))return;const e=this.refs.map((s=>s.submit()));(await Promise.all(e)).every((s=>s))&&this.sendData(s)}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(s){const t=s.detail,e=this.ownersPayload.map((s=>s.id===t.id?t:s));e.includes(t)||(e[this.ownersPayload.findIndex((s=>!s.id))]=t,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){if(this.isLoading)return e(i,null,e(D,null));const s=this.ownersPayload.some((s=>s.id===this.representative.id)),t=null===this.representativeIsOwner&&!s;return e(i,null,e("div",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Owners"),e("form-control-tooltip",{helpText:"For partnerships, LLCs or privately held corporations, the business is required to apply with all individuals with 25% or more ownership to the application. For charities and registered non-profits, the business is required to apply with 1 individual with substantial control over the entity, such as a board member or director."})),e("hr",{class:"mt-2"}),t&&e("div",{class:"alert alert-warning mb-3",part:A},e("div",{class:"card-body"},e("div",{class:"d-flex align-items-center mb-3"},e("strong",null,"Is the representative of this business also an owner?")),e("div",{class:"d-flex gap-2"},e(G,{variant:"primary",onClick:()=>this.handleRepresentativeIsOwnerChange(!0)},"Yes"),e(G,{variant:"secondary",onClick:()=>this.handleRepresentativeIsOwnerChange(!1)},"No")))),e("div",{class:"row gy-3"},this.ownersPayload.map((s=>e("owner-form",{key:s.id,authToken:this.authToken,businessId:this.businessId,ownerId:s.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,country:this.country,allowOptionalFields:this.allowOptionalFields,ref:t=>this.matchRef(t,s.id)})))),e("div",{class:"d-flex justify-content-start"},e("div",{class:"gap-2"},e(G,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner")))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],ownersPayload:["ownersWatcher"]}}},cs=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&this.formController&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.representative=new j(s.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.representative}),this.formLoading.emit(!1)}})}}propChanged(){this.initializeApi(),this.getData()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.initializeApi(),this.initializeForm()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}initializeForm(){const s=Z[this.country];s?(this.formController=new f(s("representative",this.allowOptionalFields)),this.getData()):this.errorEvent.emit({message:"Missing schema for selected country",errorCode:n.MISSING_PROPS,severity:r.ERROR})}componentDidLoad(){this.formController&&this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get patchPayload(){return{representative:new j(this.formController.values.getValue()).payload}}render(){return!this.formController||this.isLoading?e(D,null):e("business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},ls=class{constructor(e){s(this,e),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.errorEvent=t(this,"error-event",7),this.formLoading=t(this,"formLoading",7),this.formCompleted=t(this,"formCompleted",7),this.errors={},this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get({endpoint:this.businessEndpoint,authToken:this.authToken});this.acceptedTermsBefore=s.data.terms_conditions_accepted}catch(s){this.errorEvent.emit({errorCode:n.FETCH_ERROR,message:s.message,severity:r.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=this.termsPayload,e=await this.api.post({endpoint:this.termsConditionsEndpoint,body:t,authToken:this.authToken});this.handleResponse(e,s)}catch(s){this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.message,severity:r.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.acceptedTerms=t,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=K(),this.formController=new f((s=>{const t=v({accepted:w().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),e=v({accepted:w().nullable()});return s?e:t})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.error.message,severity:r.ERROR,data:s.error}):t(),this.stepCompleteEvent.emit({response:s,formStep:V.termsAndConditions}),this.formCompleted.emit()}async validateAndSubmit({onSuccess:s}){this.acceptedTermsBefore?(this.stepCompleteEvent.emit({response:null,formStep:V.termsAndConditions,metadata:"no data submitted"}),this.formCompleted.emit(),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get merchantAgreementLink(){return e("a",{href:"https://justifi.tech/merchant-agreement/",target:"_blank",rel:"noopener noreferrer"},"merchant agreement")}render(){return e("form",{key:"325cb8ddd72c0fcd8ea14eae5c8abff286c57b90"},e("fieldset",{key:"4376945ecca9dc5f462099b8a7b893b84d72ee28"},e("legend",{key:"d2c83a8d552091c1e546fe663be6674fb5cc623a",part:S},"Terms and Conditions"),e("hr",{key:"608620cec864f21eed1c0263236e160171543881"}),e("div",{key:"58942ff2e4a620695485b9e80443c9cbfae74186"},e("p",{key:"487df1718bb9a5dfc486c8589d75c627d325edd8"},"Please read and accept the ",this.merchantAgreementLink," to submit your provisioning request.")),e("br",{key:"ee3cc0ccedd353030abc05d80b20d7ae5b3f327c"}),e("div",{key:"d9ff9f7aeb18da7253f6ed1705ac0ebd4aebbc15",class:"row-gy-3"},e("div",{key:"f9e9fd3bdc0b74872fa58940af54952a138cc988",class:"col-12"},e("form-control-checkbox",{key:"63cdad138445ac5b5fa4beb678475048c5b8c589",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText,checked:this.acceptedTerms})))))}},ds=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{const t=new T((s.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},t),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{legal_address:new T(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new f((0,$[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s;const t=null===(s=this.formController)||void 0===s?void 0:s.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Legal Address of your Business"),e("form-control-tooltip",{helpText:"No PO Boxes."})),e("hr",{class:"mt-2"}),e("form-address-fields",{country:this.country,errors:this.errors,defaultValues:t,inputHandler:this.inputHandler})))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},us=class{constructor(t){s(this,t)}get showPreviousStepButton(){return this.currentStep>0}get showNextStepButton(){return this.currentStep<this.totalSteps}get showSubmitButton(){return this.currentStep===this.totalSteps}render(){return e("div",{key:"84faa27ba9737bc546ed0ff0d169cea53e3599f3",class:"d-flex gap-2"},e(G,{key:"615c83981ca574001fc7219611f512486415cbd8",variant:"secondary",type:"button",onClick:()=>this.previousStepButtonOnClick(),disabled:this.formDisabled,hidden:!this.showPreviousStepButton},"Previous"),e(G,{key:"a75dc66a0f067d9153c69cc9756291ef5ef34748",variant:"primary",type:"button",onClick:s=>this.nextStepButtonOnClick(s,F.nextStep),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showNextStepButton},"Next"),e(G,{key:"9aa26b8592823ecce24aae8bfbf230b6deab5336",variant:"primary",type:"submit",onClick:s=>this.nextStepButtonOnClick(s,F.submit),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showSubmitButton},"Submit"))}},ms=class{constructor(t){s(this,t),this.allowOptionalFields=!1,this.country=_.USA,this.componentStepMapping={0:()=>e("business-core-info-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[0]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),1:()=>e("legal-address-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[1]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),2:()=>e("additional-questions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[2]=s,allowOptionalFields:this.allowOptionalFields}),3:()=>e("business-representative-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[3]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),4:()=>e("business-owners-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[4]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),5:()=>e("business-bank-account-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[5]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),6:()=>e("business-terms-conditions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[6]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields})}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}render(){return e("div",{key:"0dc1675cbaf760028c6631eb64192c61361fdec9",class:"col-12 mb-4"},this.currentStepComponent)}};export{ts as additional_questions_form_step,os as business_bank_account_form_step,as as business_core_info_form_step,hs as business_owners_form_step,cs as business_representative_form_step,ls as business_terms_conditions_form_step,ds as legal_address_form_step,us as payment_provisioning_form_buttons,ms as payment_provisioning_form_steps}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as o}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as i,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as c,a as p}from"./p-D2muobcE.js";import{c as a}from"./p-D0BjjvYt.js";import{J as n}from"./p-CmXujxGp.js";import{C as h}from"./p-CAl_N2gi.js";import{m,S as u}from"./p-8Kt4Rhcq.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-D2TJwp13.js";import"./p-D8GTwl9v.js";import"./p-MkDHT9M4.js";import"./p-CIYOQWsL.js";import"./p-CMB3sNMT.js";import"./p-Da4efjxw.js";import"./p-D50Rx76J.js";const l=class{constructor(o){t(this,o),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){a(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){const t=this.subAccountId||this.accountId;t&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:o})=>async({params:r,onSuccess:a,onError:n})=>{var h,m;try{const u=await o.fetchCheckouts(t,s,r);if(u.error)return n({error:p(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:i.ERROR});{const t=Object.assign({},u.page_info);a({checkouts:(null===(h=u.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:i.ERROR})}})({accountId:t,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID/Sub Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return o(d,{key:"96153624befeb889e49caa063c64596eb38e38ff"},o("checkouts-list-core",{key:"b2ced4d610511630d73498422db88be9fac50b15",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],subAccountId:["propChanged"]}}};export{l as justifi_checkouts_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{c as t,a as i,F as c}from"./p-CKiAlBsU.js";import{a9 as d}from"./p-D50Rx76J.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().nullable()});var o,l;!function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(o||(o={})),function(e){e.activity_log="activity_log",e.cancellationPolicy="cancellation_policy",e.customerCommunication="customer_communication",e.customerSignature="customer_signature",e.duplicateChargeDocumentation="duplicate_charge_documentation",e.receipt="receipt",e.refundPolicy="refund_policy",e.serviceDocumentation="service_documentation",e.shippingDocumentation="shipping_documentation",e.uncategorizedFile="uncategorized_file"}(l||(l={}));class n{set presignedUrl(e){this._presignedUrl=e}get presignedUrl(){return this._presignedUrl}async getFileString(){const e=new Promise(((e,a)=>{const t=new FileReader;t.onload=a=>{e(a.target.result)},t.onerror=()=>{a(new Error("Error reading file"))},t.readAsArrayBuffer(this._file)}));return await e}constructor(e,a){this._file=e,this.file_name=e.name,this.file_type=e.type,this.dispute_evidence_type=a}}const r=(e,a)=>{const t=e.target,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},f=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.acceptedTerms=!1,this.documents={uncategorized_file:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.additionalStatement)))}componentWillLoad(){this.form=new c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"38afa726961618a321faa0a0653fe13c933cc5d4"},a("div",{key:"dcf1bbb019196719fe2f08cb38542d9e4af21797",class:"row gy-3"},a("div",{key:"30bf5043e78ba03e1cb90b931a2b9b9b7aaf8317",class:"col-12"},a("h2",{key:"176b0cbd82fc611521355d2ebb472bf21ad88790",class:"h5",part:d},"Additional Evidence")),a("div",{key:"67802f033535941d8e78c345c642ba1cc009eb61",class:"col-12"},a("form-control-textarea",{key:"947ddec697cc65faa174ec121a6fcc501a3a3ebd",label:"Is there anything else you would like to say about this dispute?",name:"additional_statement",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.additional_statement,inputHandler:this.inputHandler,errorText:this.errors.additional_statement})),a("div",{key:"9c0469c54fcc5f160963d605d9503899070e9ab8",class:"col-12"},a("form-control-file-v2",{key:"b2fb3203125da6ab27948911f8b83bcfdd845496",label:"Additional files",name:"uncategorized_file",multiple:!0,helpText:"Upload any additional pieces of evidence that have not already been provided.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.uncategorized_file}))))}},b=t({cancellation_policy_disclosure:i().nullable(),cancellation_rebuttal:i().nullable()}),h=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={cancellation_policy:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.cancellationPolicy)))}componentWillLoad(){this.form=new c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"11292b7523ea77a978c03e8a349da8d2bdbb12eb"},a("div",{key:"9ede1868d00b7df2a6e4af76bf6203a26988f20b",class:"row gy-3"},a("div",{key:"409a15cb80914863ffcbba73eea6e706393bf1b0",class:"col-12"},a("h2",{key:"4012cfad95101c0372b8ed6b6f7f3e093e28869b",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"89093d799883ff5673cbacd838c5ca3e2fa47f54",class:"col-12"},a("form-control-textarea",{key:"2646ab607bc3360ecc6491314a3e09bdc01f6597",label:"Cancellation Policy Disclosure",name:"cancellation_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.cancellation_policy_disclosure,inputHandler:this.inputHandler,errorText:this.errors.cancellation_policy_disclosure})),a("div",{key:"ab8fb47510394ff89854e8fbc74ec27ef071f227",class:"col-12"},a("form-control-textarea",{key:"8b1cbcf64fa6b7af0f3389304fd86a9d1550f957",label:"Cancellation Rebuttal",name:"cancellation_rebuttal",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.cancellation_rebuttal,inputHandler:this.inputHandler,errorText:this.errors.cancellation_rebuttal})),a("div",{key:"13f905a58086f5955ff39c39646f92c900a6b125",class:"col-12"},a("form-control-file-v2",{key:"a9dd3168ba628bb18c713618dec8c584345ca1db",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().nullable()}),v=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={customer_signature:[],customer_communication:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.customerDetails)))}componentWillLoad(){this.form=new c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"1e845fde4aacb950ac4afd82009eb6112af830ef"},a("div",{key:"dbc565d42c828f56243640d269504a95b0ff69c7",class:"row gy-3"},a("div",{key:"8fbd8fe29ae216a8759294410d8fd0cbd8c65b5e",class:"col-12"},a("h2",{key:"b852cb824cc6a0990f0e4eee04702f36ef306cc2",class:"h5",part:d},"Customer Details")),a("div",{key:"fc42b78ae5858be0ae521ac830ef5857943f6c58",class:"col-12"},a("form-control-text",{key:"c9dfe20609704edef7a2b6ffa3d3e063c3168b73",label:"Full Name",name:"customer_name",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_name,inputHandler:this.inputHandler,errorText:this.errors.customer_name})),a("div",{key:"53ceaebddfeeaad586f1924d16eaaad661ebf7a7",class:"col-12"},a("form-control-text",{key:"94e4d2fc711c157ae3c9a1addffa5022fc493afa",label:"Email",name:"customer_email_address",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.customer_email_address,inputHandler:this.inputHandler,errorText:this.errors.customer_email_address})),a("div",{key:"1a656f6dfddf5e090bb098ceab9ed235b6b06ca5",class:"col-12"},a("form-control-textarea",{key:"5e49323c520019c96eb50bb7573cf45c85848cd2",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"cc105778397e49917c91d5d2d57b1b505cf07cb4",class:"col-12"},a("form-control-file-v2",{key:"db4069f39ff645156810a0c9e265716b33257c2a",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"b7ba5f79d854fbc22052873772309e8fb02e865b",class:"col-12"},a("form-control-file-v2",{key:"49add3b24bd1471ccd2362910d1c9487dc4faedd",label:"Customer Communication",name:"customer_communication",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.customer_communication}))))}},p=t({duplicate_charge_original_payment_id:i().nullable(),duplicate_charge_explanation:i().nullable()}),m=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={duplicate_charge_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.duplicateCharge)))}componentWillLoad(){this.form=new c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"d79028dfc1949c6bf9f9c77bf427f6fea94c5cee"},a("div",{key:"7f05dd0a6ad675d1acfbf6b6dedda12914092a42",class:"row gy-3"},a("div",{key:"35a65eaf672b11812482eeb241e15ea7828f8b1a",class:"col-12"},a("h2",{key:"91ead89be2f1497469ac63266ddb922f47223da2",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"89f7a88c0d068368f0b730e501f45183e065a1f2",class:"col-12"},a("form-control-text",{key:"c35b090d20419d40dfde1a88ec34afbcbf8ab0b2",label:"Original Payment ID",name:"duplicate_charge_original_payment_id",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.duplicate_charge_original_payment_id,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_original_payment_id})),a("div",{key:"c3126552f55721c8faa39bb6c65de9740778a9e9",class:"col-12"},a("form-control-textarea",{key:"014d8ffbcddccd883d655a2f9dd4f1443c81bf3c",label:"Duplicate Charge Explanation",name:"duplicate_charge_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.duplicate_charge_explanation,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_explanation})),a("div",{key:"050e60f3b5dfe80ad1cd0b7de8472667a1c32651",class:"col-12"},a("form-control-file-v2",{key:"3f7610825c63c979655f80c68e475a7dd463956e",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().nullable()}),_=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={activity_log:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.electronicEvidence)))}componentWillLoad(){this.form=new c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"f7b24599316e8545d61370c50d28cbf5e0d90985"},a("div",{key:"d1edc60194b573078d5701a14e16ef0dd8f6b45d",class:"row gy-3"},a("div",{key:"4b7e12eb4a9b41b30d7c85334691136280679210",class:"col-12"},a("h2",{key:"b9e3721e4ff6610da877f49e263ef84b86cd81ea",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"b90b4c712c5bd02a0bf8911fcaae7b907c1a216f",class:"col-12"},a("form-control-text",{key:"468f44dc9b907b4b21e387a511e7995f88d0c53c",label:"Purchase IP Address",name:"customer_purchase_ip_address",helpText:"The IP address used by the customer during the purchase.",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_purchase_ip_address,inputHandler:this.inputHandler,errorText:this.errors.customer_purchase_ip_address})),a("div",{key:"563a949612a21b8434b80c5c025aa79567aa54a4",class:"col-12"},a("form-control-file-v2",{key:"467fbd2f55a85134b73d23764845038b7f2415ba",label:"Activity Logs",name:"activity_log",helpText:"Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.activity_log}))))}},k=t({product_description:i().nullable(),service_date:i().nullable()}),g=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={service_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.productOrService)))}componentWillLoad(){this.form=new c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"78ae891c29d08c3416f23a1a3f79f4748d76ab40"},a("div",{key:"88c19ce6ceeaaa77cbd5aaed3b2bb171c0fed44c",class:"row gy-3"},a("div",{key:"30a2df0197d01b911dce05df5b3340aab8b6af04",class:"col-12"},a("h2",{key:"ba463f9c6dbf9b28aa966b90b911c782cf14a6a3",class:"h5",part:d},"Product & Service Details")),a("div",{key:"19d497710739b9272f24ed5e1ab0ad265dfe1c3d",class:"col-12"},a("form-control-text",{key:"c6d921f51c08b5e4c6a0280b0dcb45bba9885f3e",label:"Product Description",name:"product_description",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.product_description,inputHandler:this.inputHandler,errorText:this.errors.product_description})),a("div",{key:"3074df432c0f3959179237113eef15761dcbb5fb",class:"col-12"},a("form-control-date",{key:"8edd606a143654dc458b70f9c67f1874223bb700",label:"Service Date",name:"service_date",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.service_date,inputHandler:this.inputHandler,errorText:this.errors.service_date})),a("div",{key:"dafb0b4514cdb1e87f02a92cd80d97b553519a3d",class:"col-12"},a("form-control-file-v2",{key:"32af43dfd6b9f569723db219eb9db5c7f531df55",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().nullable()}),j=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={refund_policy:[],receipt:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.refundPolicy)))}componentWillLoad(){this.form=new c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"ce05a5b2408f95dfef0d3c24edb62c34f992bc61"},a("div",{key:"41972a8136487f319d09181b110f4be93bd8846c",class:"row gy-3"},a("div",{key:"bf66351a5e8f5824e333addfacafba157728d9c7",class:"col-12"},a("h2",{key:"2d5e8505b2c38dde873677ab55841cce229d29a9",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"cce914921aadf8d18e5f455690c54f154dda7e96",class:"col-12"},a("form-control-textarea",{key:"5d59ffe00ba84d2c7fbfc4151bc86fb55b216907",label:"Refund Policy Disclosure",name:"refund_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.refund_policy_disclosure,inputHandler:this.inputHandler})),a("div",{key:"01b51f496e0d064b8fec8ad5f992f9c19a7b0d2c",class:"col-12"},a("form-control-textarea",{key:"580e58a7f90af35c187cc01b93f847b939bf7dbc",label:"Refund Refusal Explanation",name:"refund_refusal_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.refund_refusal_explanation,inputHandler:this.inputHandler})),a("div",{key:"5e428dee0d8e6a06bc9e1e0bb15c7f4d1fafe8dc",class:"col-12"},a("form-control-file-v2",{key:"c7b1eac64ac72c4fd8299f1bafd23299e3b6057d",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"e06b9507f5b91db6241d5d9628179aa946263097",class:"col-12"},a("form-control-file-v2",{key:"36a8dee9bf6f60ff705440fb9fd727be1fa11209",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().nullable()}),T=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={shipping_documentation:[]},this.documentList=[],this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.shippingDetails)))}componentWillLoad(){this.form=new c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"866cc4bbec74504766f54b7ead77905108e943a9"},a("div",{key:"fbd5066de212864ecec4a364508e348b7af3f3bc",class:"row gy-3"},a("div",{key:"f4570f4e399f800840e13edad14f77c8a1b53712",class:"col-12"},a("h2",{key:"2e5100b95fa159a119e82eb6efbc0c553861ec71",class:"h5",part:d},"Shipping Details")),a("div",{key:"872e7a523810713854895852b437cbde39fc7d7c",class:"col-12"},a("form-control-text",{key:"bfddeb4473c5d15ab6cddc555492ebbbabb4e7ff",label:"Shipping Carrier Name",name:"shipping_carrier",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.shipping_carrier,inputHandler:this.inputHandler,errorText:this.errors.shipping_carrier})),a("div",{key:"9376147e0d182470e0a280cf0c256006f4422eeb",class:"col-12"},a("form-control-text",{key:"6e62ddb611af6a69f4568fabeb90271e593998ac",label:"Tracking Number",name:"shipping_tracking_number",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.shipping_tracking_number,inputHandler:this.inputHandler,errorText:this.errors.shipping_tracking_number})),a("div",{key:"7431cd70b761dbe3183a544e179e443cd6af9761",class:"col-12"},a("form-control-date",{key:"b834fac26c825d5dc809c16e8a8519b1d330ecfc",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"f07986a66fe74289cbe778996146d8781418db57",class:"col-12"},a("form-control-textarea",{key:"c2287f560c55006a9c0cef83acb46ed02a981bb8",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"ef07786e43bda9fec564e08d2fbd34a7dc9dc3e3",class:"col-12"},a("form-control-file-v2",{key:"70743473ff8bed43562b65eb35a78466ed6d947a",label:"Shipping Documentation",name:"shipping_documentation",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.shipping_documentation}))))}};export{f as justifi_additional_statement,h as justifi_cancellation_policy,v as justifi_customer_details,m as justifi_duplicate_charge,_ as justifi_electronic_evidence,g as justifi_product_or_service,j as justifi_refund_policy,T as justifi_shipping_details}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{J as e}from"./p-CmXujxGp.js";import{c as p}from"./p-D0BjjvYt.js";import{P as a}from"./p-Dvcgmvfg.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{e as n}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as c,a as m}from"./p-D2muobcE.js";import{m as h}from"./p-DYGIC0QH.js";import{m as u,S as j}from"./p-8Kt4Rhcq.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d as f}from"./p-J7WCmj-J.js";import"./p-CIYOQWsL.js";import"./p-CMB3sNMT.js";import"./p-MkDHT9M4.js";import"./p-D8GTwl9v.js";import"./p-BJtvT9BX.js";import"./p-Da4efjxw.js";import"./p-D50Rx76J.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=f,this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){p(),this.analytics=new e(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new a};this.getPayouts=(({id:t,authToken:s,service:i})=>async({params:r,onSuccess:e,onError:p})=>{var a,h;try{const u=await i.fetchPayouts(t,s,r);if(u.error)return p({error:m(u.error),code:c(null===(h=u.error)||void 0===h?void 0:h.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);e({payouts:(null===(a=u.data)||void 0===a?void 0:a.map((t=>new n(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return p({error:t.message||t,code:s,severity:o.ERROR})}})(t),this.getPayoutCSV=h(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({primaryAccountId:this.accountId,authToken:this.authToken,service:new j}))}render(){return i(d,{key:"6b277749b0f621327a6614cbdeffe595637b92b1"},i("payouts-list-core",{key:"1c589706ad38c7e8e74f82ab29b431e6028a19bd",getPayouts:this.getPayouts,getPayoutCSV:this.getPayoutCSV,getSubAccounts:this.getSubAccounts,"onError-event":this.handleOnError,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_payouts_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{A as e}from"./p-CMB3sNMT.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{J as c}from"./p-CmXujxGp.js";import{c as l}from"./p-D0BjjvYt.js";import{c as h}from"./p-EBsfAkrP.js";import{p as d,f as p,r as u,k as v}from"./p-MkDHT9M4.js";import{v as m,i as f,a as y,H as j}from"./p-_fynNk40.js";import{t as _,B as k}from"./p-D50Rx76J.js";import{S as g}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as C}from"./p-BrO0HEFJ.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CIYOQWsL.js";import"./p-DkoufM1t.js";import"./p-HXpYMWUU.js";const b=e();class w{async fetchQuote(s,t){return b.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return b.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const T=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(C,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(C,{width:"70%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"100%"})),s("div",{class:"col-12"},s(C,{width:"80%"}))),H=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated",7),this.errorEvent=i(this,"error-event",7),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",_),s=>v(s,"p","part",_)])}componentWillLoad(){l(),this.analytics=new c(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||h.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new w};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const l=await t.fetchQuote(s,i);if(l.error)return o({error:n(l.error),code:a(null===(c=l.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var l;try{const h=await t.toggleCoverage(s,i,e);if(h.error)return c({error:n(h.error),code:a(null===(l=h.error)||void 0===l?void 0:l.code),severity:r.ERROR});o({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||h.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),f[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,y[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),f[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return y[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return h&&!1===h.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(g,null,this.isLoading?s(T,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:_,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:k},"Please select an option"),s("small",{part:_,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{H as justifi_season_interruption_insurance}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as s,g as n}from"./p-CV0Pyo1O.js";import{A as o}from"./p-CMB3sNMT.js";import{A as a,r,s as l,t as h,u as c,v as d,w as u,I as p,m as y,n as m,o as v}from"./p-CBqZge6m.js";import{S as f}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as g}from"./p-BrO0HEFJ.js";import{c as M,a as b,g as k,b as w,o as j}from"./p-EBsfAkrP.js";import{t as P,r as T}from"./p-D50Rx76J.js";import{f as A}from"./p-MkDHT9M4.js";import{w as N,c as C}from"./p-DVJaoI_m.js";import{H as I}from"./p-DB_pqjwH.js";import{H as E,b as D,h as O,i as S}from"./p-_fynNk40.js";import{H as x}from"./p-D68EHdgA.js";import{J as L}from"./p-CmXujxGp.js";import{c as z}from"./p-D0BjjvYt.js";import"./p-HXpYMWUU.js";import{C as _,a as R,b as B}from"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as U,a as F}from"./p-D2muobcE.js";import{C as Y}from"./p-CAl_N2gi.js";import{P as H}from"./p-rz2BF2Sz.js";import{P as Q,a as V,b as G}from"./p-DkoufM1t.js";import{C as q}from"./p-ZpPDShvP.js";import"./p-D8GTwl9v.js";import"./p-CIYOQWsL.js";const W=class{constructor(i){t(this,i),this.radioClick=e(this,"radio-click",7),this.checked=!1,this.hidden=!1}render(){return i(f,{key:"02955940079320bd9c6bf94e239545385ac36458"},i("radio-list-item",{key:"fc6b98e456e4326b843b2b3248b7327436767cf4",name:this.name,value:this.value,label:this.label,checked:this.checked,hidden:this.hidden,class:this.class,"onRadio-click":t=>this.radioClick.emit(t.detail)}))}};var Z;!function(t){t.UNAVAILABLE="UNAVAILABLE",t.SESSION_ERROR="SESSION_ERROR",t.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",t.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",t.USER_CANCELLED="USER_CANCELLED"}(Z||(Z={}));class J{constructor(){this.api=o()}initialize(t){if(this.applePayConfig=new a(t),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(t,e){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:t,headers:{"Sub-Account":e},body:{domain:window.location.hostname,display_name:this.applePayConfig.displayName}})}catch(t){throw console.error("Backend validation failed:",t),new Error("Merchant validation failed")}}async processPayment(t,e,i){const s=await this.api.post({endpoint:"apple_pay/process_token",authToken:t,body:i,headers:{"Sub-Account":e}});return{success:s.id&&!!s.data.token,data:s}}isAvailable(){return r.isApplePaySupported()&&r.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await r.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(t,e,i){if(!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),new Error("Apple Pay not initialized. Call initialize() first.");const s=new l(t);if(!s.isValid){const t=[];throw s.countryCode||t.push("countryCode"),s.currencyCode||t.push("currencyCode"),s.merchantCapabilities&&0!==s.merchantCapabilities.length||t.push("merchantCapabilities"),s.supportedNetworks&&0!==s.supportedNetworks.length||t.push("supportedNetworks"),s.total&&s.total.label&&s.total.amount||t.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",t),new Error("Invalid payment request provided")}return this.currentPaymentRequest=s,new Promise(((t,n)=>{try{if("undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),n({success:!1,error:{code:Z.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,s),this.setupSessionEventHandlers(t,n,e,i),this.currentSession.begin()}catch(t){console.error("[ApplePayService] Exception while starting session:",t),n({success:!1,error:{code:Z.SESSION_ERROR,message:t instanceof Error?t.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(t,e,i,s){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{try{if(!i)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const t=await this.validateMerchant(i,s);try{this.currentSession.completeMerchantValidation(t)}catch(t){throw console.error("Error calling completeMerchantValidation:",t),t}}catch(t){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.abort(),e({success:!1,error:{code:Z.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async n=>{try{const o=n.payment,a=Object.assign(Object.assign({},o.token),{product_details:{name:this.currentPaymentRequest.total.label,price:r.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),l=await this.processPayment(i,s,a);l.success?(this.currentSession.completePayment({status:h.STATUS_SUCCESS}),t({success:!0,token:o.token,paymentMethodId:l.data.id})):(console.error("PSP reported payment failure:",l.data),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:Z.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(t){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:Z.PAYMENT_PROCESSING_ERROR,message:t instanceof Error?t.message:"Payment processing failed"}})}finally{this.currentSession=void 0,this.currentPaymentRequest=void 0}},this.currentSession.onpaymentmethodselected=()=>{const t={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(t)}catch(t){console.error("Error completing payment method selection:",t),this.currentSession.abort()}},this.currentSession.onshippingmethodselected=()=>{this.currentSession.completeShippingMethodSelection({status:h.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]})},this.currentSession.oncancel=t=>{if(t.sessionError)switch(console.error(t.sessionError),t.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",t.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:Z.USER_CANCELLED,message:"User cancelled the Apple Pay session"}})},"onerror"in this.currentSession&&(this.currentSession.onerror=t=>{console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",t),this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:Z.SESSION_ERROR,message:"Apple Pay session error occurred"}})})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(t,e,i="US",s="USD"){return{countryCode:i,currencyCode:s,merchantCapabilities:r.getDefaultMerchantCapabilities(),supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const X=t=>{const{isLoading:e}=t;return e?i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-center"},i(g,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},$=t=>i("div",{class:"apple-pay-button-container"},i("button",Object.assign({class:(()=>{let e="apple-pay-button";switch(t.buttonStyle){case c.WHITE:e+=" apple-pay-button-white";break;case c.WHITE_OUTLINE:e+=" apple-pay-button-white-outline";break;default:e+=" apple-pay-button-black"}switch(t.buttonType){case d.BUY:e+=" apple-pay-button-type-buy";break;case d.DONATE:e+=" apple-pay-button-type-donate";break;default:e+=" apple-pay-button-type-plain"}return(t.disabled||t.isProcessing||!t.isAvailable)&&(e+=" disabled"),e})(),style:{width:t.width,height:t.height},onClick:()=>{!t.disabled&&!t.isProcessing&&t.isAvailable&&t.clickHandler&&t.clickHandler()},disabled:t.disabled||t.isProcessing||!t.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},t),t.isProcessing&&i("div",{class:"processing-overlay"},i("div",{class:"spinner"}),i("span",null,"Processing..."))),i("style",null,"\n .apple-pay-button-container {\n display: block;\n position: relative;\n width: 100%;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),K=class{constructor(i){t(this,i),this.applePayStarted=e(this,"applePayStarted",7),this.applePayCompleted=e(this,"applePayCompleted",7),this.applePayCancelled=e(this,"applePayCancelled",7),this.applePayError=e(this,"applePayError",7),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=d.PLAIN,this.buttonStyle=c.BLACK,this.disabled=!1,this.showSkeleton=!0,this.width="100%",this.height="48px",this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var t,e,i;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:M.paymentCurrency,merchantCapabilities:[u.SUPPORTS_3DS,u.SUPPORTS_CREDIT,u.SUPPORTS_DEBIT],supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(M.paymentDescription,M.paymentAmount)},s=await this.applePayService.startPaymentSession(i,M.authToken,M.accountId);s.success?this.applePayCompleted.emit({success:!0,token:s.token,paymentMethodId:s.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:s.error}),this.applePayError.emit({error:(null===(t=s.error)||void 0===t?void 0:t.message)||"Payment failed",code:(null===(e=s.error)||void 0===e?void 0:e.code)||K.ErrorCode.PAYMENT_FAILED}))}catch(t){if((null===(i=null==t?void 0:t.error)||void 0===i?void 0:i.code)===Z.USER_CANCELLED)this.applePayCancelled.emit();else{const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:K.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:e})}}finally{this.isProcessing=!1}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,!(Boolean(M.paymentAmount)&&Boolean(M.paymentCurrency)&&Boolean(M.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:M.paymentAmount,paymentCurrency:M.paymentCurrency,hasAuthToken:Boolean(M.authToken),accountId:M.accountId}),this.applePayError.emit({error:this.error,code:K.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=r.isApplePaySupported(),this.canMakePayments=r.canMakePayments(),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_SUPPORTED}),void(this.isLoading=!1);if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_AVAILABLE}),void(this.isLoading=!1);const t={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};this.applePayService=new J,this.applePayService.initialize(t),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(t){console.error("Apple Pay initialization error:",t),this.error=t instanceof Error?t.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:K.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?r.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!M.applePayEnabled)return null;const t=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return i(f,null,M.checkoutLoaded&&i("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{this.initializeApplePay()}}),i("div",{class:"apple-pay-container"},i(X,{isLoading:this.isLoading}),t&&i($,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),i("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};K.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const tt=class{constructor(e){t(this,e),this.variant="primary",this.type="button"}render(){return i(f,{key:"f1ac17863df571d72e7db9b748b1980218145322"},i("internal-button",{key:"0b7052d216fb79ed5d9f90aacff97d39dce87473",text:this.text,variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,type:this.type,disabled:this.disabled,class:this.class,customStyle:this.customStyle,hidden:this.hidden}))}},et=class{constructor(e){t(this,e)}render(){return i(f,{key:"43b48a771bd617b3b3481e0976aa50b6b63e2d6e"},i("section",{key:"e112a767fef56b095f002dfb272a43eda42ede46"},i("div",{key:"079ce3aa4eb74004f5ecd3a634d2b42cf9c7a863"},i("div",{key:"5d816254f104e238122080fcf43356fd7f01bcfd",part:P},null==M?void 0:M.paymentDescription),i("div",{key:"e7d28a3a4cce7399c1fb45194f4fad172e0a2751"},i("span",{key:"b1683801875c39a8de8d93e0cdc8778a669eebfd",part:P},"Total")," ",i("span",{key:"ae2efd44a3ea54d77fcb284fee7361d0ba9b87e1",part:P},A(+(null==M?void 0:M.totalAmount)))))))}},it=t=>{const{isLoading:e}=t;return e?i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-center"},i(g,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null};var st;!function(t){t.initialize="justifi.googlePay.initialize",t.ready="justifi.googlePay.ready",t.sdkLoaded="justifi.googlePay.sdkLoaded",t.initializeResult="justifi.googlePay.initializeResult",t.error="justifi.googlePay.error",t.buttonClicked="justifi.googlePay.buttonClicked",t.startPayment="justifi.googlePay.startPayment",t.paymentSuccess="justifi.googlePay.paymentSuccess",t.paymentCanceled="justifi.googlePay.paymentCanceled",t.paymentError="justifi.googlePay.paymentError"}(st||(st={}));const nt=class{constructor(i){t(this,i),this.googlePayCompleted=e(this,"googlePayCompleted",7),this.googlePayCancelled=e(this,"googlePayCancelled",7),this.environment="TEST",this.iframeReady=!1,this.sdkLoaded=!1,this.isReadyToPay=!1,this.handleMessage=t=>{if(t.origin!==this.iframeOrigin)return;const{eventType:e,data:i}=t.data||{};switch(e){case st.ready:this.iframeReady=!0;break;case st.sdkLoaded:this.sdkLoaded=!0,this.sendInitialize();break;case st.initializeResult:this.isReadyToPay=i.isReadyToPay,i.error&&console.error("Init error:",i.error);break;case st.error:console.error("Google Pay error:",i);break;case st.buttonClicked:this.sendStartPayment();break;case st.paymentSuccess:this.googlePayCompleted.emit({success:!0,paymentMethodId:i.paymentMethodId,cardNetwork:i.cardNetwork,cardDetails:i.cardDetails});break;case st.paymentCanceled:this.googlePayCancelled.emit();break;case st.paymentError:this.googlePayCompleted.emit({success:!1,error:{code:i.code,message:i.message}})}}}async componentWillLoad(){await N(),this.iframeOrigin=C.iframeOrigin}componentDidLoad(){window.addEventListener("message",this.handleMessage)}disconnectedCallback(){window.removeEventListener("message",this.handleMessage)}sendInitialize(){var t;(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow)&&this.iframeElement.contentWindow.postMessage({eventType:st.initialize,data:{environment:this.environment,gatewayMerchantId:M.accountId,merchantName:this.merchantName,authToken:M.authToken,accountId:M.accountId}},this.iframeOrigin)}sendStartPayment(){var t;if(!(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow))return;const e={totalPrice:String(M.paymentAmount/100),totalPriceStatus:"FINAL",currencyCode:M.paymentCurrency||"USD"};this.iframeElement.contentWindow.postMessage({eventType:st.startPayment,data:e},this.iframeOrigin)}render(){return M.googlePayEnabled?i(s,null,i(it,{isLoading:!this.isReadyToPay}),i("iframe",{ref:t=>this.iframeElement=t,src:`${this.iframeOrigin}/v2/googlePay`,style:{border:"none",width:"100%",height:"48px",display:this.isReadyToPay?"block":"none"}})):(console.warn("Google Pay is not enabled for this checkout"),null)}},ot=class{constructor(e){t(this,e),this.levels={h1:I,h2:E,h3:x},this.level="h1"}render(){return i(f,{key:"879e301ec35e7cc536dec135e11daf140c67eeed"},i(this.levels[this.level],{key:"1766cb9a4d84bee1b3365b4df93515274cf31565",text:this.text,class:this.class}))}},at=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event",7),this.submitEvent=e(this,"submit-event",7),this.checkoutChangedEvent=e(this,"checkout-changed",7),this.plaidService=new H,this.handleGooglePayCompleted=t=>{const{success:e,paymentMethodId:i,error:s}=t.detail||{};e&&i?(M.paymentToken=i,M.selectedPaymentMethod={type:Q.GOOGLE_PAY},this.submitCheckout()):this.errorEvent.emit({message:s&&s.message||"Google Pay payment failed",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR})},this.handleGooglePayCancelled=()=>{M.paymentToken=void 0,M.selectedPaymentMethod=void 0},this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:n}=t.detail;e&&i?(M.paymentToken=s,M.selectedPaymentMethod={type:Q.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",n),this.errorEvent.emit({message:(null==n?void 0:n.message)||"Apple Pay payment failed",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR}))},this.handleApplePayError=t=>{const{error:e,code:i}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:_.ERROR})},this.handleApplePayCancelled=()=>{M.paymentToken=void 0,M.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),M.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new Y};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:n})=>{var o;try{const a=await i.fetchCheckout(t,e);if(a.error)return n({error:F(a.error),code:U(null===(o=a.error)||void 0===o?void 0:o.code),severity:_.ERROR});s({checkout:a.data})}catch(t){const e=U(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:_.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:n,onError:o})=>{var a;try{const r=await i.complete(t,e,s);if(r.error)return o({error:F(r.error),code:U(null===(a=r.error)||void 0===a?void 0:a.code),severity:_.ERROR});n({checkout:r.data})}catch(t){const e=U(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:_.ERROR})}})(t),b((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new L(this),z(),M.authToken=this.authToken,this.fetchCheckout(),D("set",(t=>{const e=S[t];void 0!==e&&O(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners(),this.removeGooglePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==p.completed?t.status!==p.expired||this.errorEvent.emit({message:B.CHECKOUT_EXPIRED,errorCode:R.CHECKOUT_EXPIRED,severity:_.ERROR}):this.errorEvent.emit({message:B.CHECKOUT_ALREADY_COMPLETED,errorCode:R.CHECKOUT_ALREADY_COMPLETED,severity:_.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:B.NOT_AUTHENTICATED,errorCode:R.NOT_AUTHENTICATED,severity:_.ERROR})}updateStore(t){var e,i,s,n,o,a,r;M.accountId=t.account_id,M.checkoutLoaded=!0,M.paymentMethods=t.payment_methods.map((t=>new V(t))),M.paymentMethodGroupId=t.payment_method_group_id,M.paymentDescription=t.payment_description,M.totalAmount=t.total_amount,M.paymentAmount=t.payment_amount,M.bnplEnabled=t.payment_settings.bnpl_payments,M.insuranceEnabled=t.payment_settings.insurance_payments,M.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,M.applePayEnabled=null===(i=t.payment_settings)||void 0===i?void 0:i.apple_payments,M.googlePayEnabled=null===(s=t.payment_settings)||void 0===s?void 0:s.google_payments,M.bnplProviderClientId=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_client_id,M.bnplProviderMode=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_mode,M.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,M.bnplProviderCheckoutUrl=null===(r=null==t?void 0:t.bnpl)||void 0===r?void 0:r.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:k(),selectedPaymentMethod:M.selectedPaymentMethod,savedPaymentMethods:M.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){if(this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full, justifi-tokenize-payment-method"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.googlePayRef=this.hostEl.querySelector("justifi-google-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),!M.selectedPaymentMethod&&this.paymentMethodFormRef){const t=this.paymentMethodFormRef.tagName.toLowerCase();"justifi-card-form"===t?M.selectedPaymentMethod={type:Q.NEW_CARD}:"justifi-bank-account-form"===t&&(M.selectedPaymentMethod={type:Q.NEW_BANK_ACCOUNT})}this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}setupGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.addEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.addEventListener("googlePayCancelled",this.handleGooglePayCancelled))}removeGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.removeEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.removeEventListener("googlePayCancelled",this.handleGooglePayCancelled))}async tokenizePaymentMethod(t){var e,i,s;const n=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},o=Object.assign(Object.assign({},t),n),a=Object.assign({accountId:M.accountId,payment_method_group_id:void 0},o);M.savePaymentMethod&&(a.payment_method_group_id=M.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:a,account:M.accountId}));return r.error?r:(M.paymentToken=r.id,r.id)}async fillBillingForm(t){M.billingFormFields=t}async setSelectedPaymentMethod(t){M.selectedPaymentMethod=t,M.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];M.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=M.selectedPaymentMethod)||void 0===t?void 0:t.type)===Q.NEW_CARD,n=(null===(e=M.selectedPaymentMethod)||void 0===e?void 0:e.type)===Q.NEW_BANK_ACCOUNT;if((s||n)&&(this.paymentMethodFormRef&&i.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&i.push(this.billingFormRef.validate())),0===i.length)return!0;try{return!!(await Promise.all(i)).every((t=>"boolean"==typeof t?t:!1!==(null==t?void 0:t.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:R.VALIDATION_ERROR,severity:_.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,n,o;const a=await this.validate();if(!M.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:R.VALIDATION_ERROR,severity:_.ERROR});const r=(null===(e=M.selectedPaymentMethod)||void 0===e?void 0:e.type)===Q.NEW_CARD,l=(null===(i=M.selectedPaymentMethod)||void 0===i?void 0:i.type)===Q.NEW_BANK_ACCOUNT,h=(null===(s=M.selectedPaymentMethod)||void 0===s?void 0:s.type)===Q.PLAID;if(r||l){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:R.TOKENIZE_ERROR,severity:_.ERROR})}if(h&&!M.paymentToken){const t=M.plaidPublicToken,e=M.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(M.authToken,M.accountId,t,e||void 0,M.savePaymentMethod?M.paymentMethodGroupId:void 0);if(null==i?void 0:i.error)return void this.errorEvent.emit({message:"string"==typeof i.error?i.error:i.error.message||"Failed to tokenize bank account",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR});const s=null==i?void 0:i.data,o=(null===(n=null==s?void 0:s.bank_account)||void 0===n?void 0:n.token)||(null==s?void 0:s.token)||(null==s?void 0:s.id);M.paymentToken=o}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR})}}if(!a)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:R.VALIDATION_ERROR,severity:_.ERROR});if(!M.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR});let c;if(c={payment_mode:(t=>{switch(t){case Q.NEW_CARD:case Q.SAVED_CARD:case Q.NEW_BANK_ACCOUNT:case Q.SAVED_BANK_ACCOUNT:case Q.PLAID:return G.ECOM;case Q.SEZZLE:return G.BNPL;case Q.APPLE_PAY:return G.APPLE_PAY;case Q.GOOGLE_PAY:return G.GOOGLE_PAY;default:return}})(null===(o=M.selectedPaymentMethod)||void 0===o?void 0:o.type),payment_token:M.paymentToken},this.preCompleteHook){const t=w();try{await new Promise(((e,i)=>{this.preCompleteHook(t,(()=>e()),(()=>i()))}))}catch(t){return void console.log("Checkout cancelled by preCompleteHook",t)}}this.completeCheckout({payment:c,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:R.COMPLETE_CHECKOUT_ERROR,severity:_.ERROR})}})}render(){return i(s,{key:"f97e00da82355bfd1bf1ce34acefc4adfe0863dc"})}get hostEl(){return n(this)}},rt=class{constructor(i){t(this,i),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected",7),this.plaidError=e(this,"plaidError",7),this.plaidErrorRecovered=e(this,"plaidErrorRecovered",7),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new H,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{M.authToken&&M.accountId&&M.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:v.PLAID_SDK_LOAD_FAILED,message:m[v.PLAID_SDK_LOAD_FAILED],severity:y[v.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:v.PLAID_LINK_TOKEN_FAILED,message:m[v.PLAID_LINK_TOKEN_FAILED],severity:y[v.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const t=window.Plaid;this.plaidLink=t.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(t){this.handleError({code:v.PLAID_LINK_INIT_FAILED,message:m[v.PLAID_LINK_INIT_FAILED],severity:y[v.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,n;try{if(!M.authToken||!M.accountId)return void this.handleError({code:v.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:_.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(M.authToken,M.accountId,M.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=(null==e?void 0:e.id)||(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)||null,this.linkTokenId&&(M.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let o=v.PLAID_LINK_TOKEN_FAILED,a=m[o],r=!0;"AbortError"===t.name?(o=v.PLAID_TIMEOUT,a=m[o],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(o=v.PLAID_NETWORK_ERROR,a=m[o],r=!0):((null===(s=t.message)||void 0===s?void 0:s.includes("401"))||(null===(n=t.message)||void 0===n?void 0:n.includes("unauthorized")))&&(o=v.PLAID_INVALID_CREDENTIALS,a="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:o,message:a,severity:y[o],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return v.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return v.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return v.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return v.PLAID_RATE_LIMITED;case"maintenance":return v.PLAID_MAINTENANCE;case"not_authenticated":return v.PLAID_INVALID_CREDENTIALS;default:return v.PLAID_LINK_TOKEN_FAILED}return v.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=t=>{this.publicToken=t,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,M.selectedPaymentMethod={type:Q.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:_.INFO}),M.plaidPublicToken=t},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=v.PLAID_AUTHENTICATION_FAILED,i=m[e],s=!0,n="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=v.PLAID_INVALID_CREDENTIALS,i=m[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=v.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=v.PLAID_ACCOUNT_LOCKED,i=m[e],s=!1,n="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=v.PLAID_MAINTENANCE,i=m[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=v.PLAID_RATE_LIMITED,i=m[e],s=!0;break;case"INVALID_REQUEST":e=v.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=v.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",s=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const o=t.error_message.toLowerCase();o.includes("not supported")||o.includes("unsupported")?(e=v.PLAID_BANK_NOT_SUPPORTED,i=m[e],s=!1,n="Try a different payment method"):(o.includes("expired")||o.includes("timeout"))&&(e=v.PLAID_TOKEN_EXPIRED,i=m[e],s=!0)}this.handleError({code:e,message:i,severity:y[e],originalError:t,retryable:s,userAction:n}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.plaidError.emit({code:t.code,message:t.message,severity:t.severity,data:{originalError:t.originalError,retryable:t.retryable,userAction:t.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",t),t.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{var t;const e=(null===(t=M.selectedPaymentMethod)||void 0===t?void 0:t.type)===Q.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=M.selectedPaymentMethod)||void 0===e?void 0:e.type)!==Q.PLAID&&(M.selectedPaymentMethod={type:Q.PLAID}),!t||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:v.PLAID_SDK_LOAD_FAILED,message:m[v.PLAID_SDK_LOAD_FAILED],severity:y[v.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=M.selectedPaymentMethod)||void 0===t?void 0:t.type)===Q.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return M.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,M.selectedPaymentMethod={type:Q.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(M.selectedPaymentMethod={type:Q.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=j("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==M.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[JustifiPlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const t=i("img",{class:"plaid-logo-img",src:"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=",alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return i(f,{class:"payment-method"},i("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),i("div",{title:"Pay with Plaid"},i("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",t," "),(()=>this.error?i("div",{class:(this.error.severity===_.ERROR?"text-danger":this.error.severity===_.WARNING?"text-warning":"text-info")+" mt-2"},i("small",null,this.error.message),i("br",null),i("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&i("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?i("div",{class:"text-info mt-2"},i("small",null,"Connecting to your bank...")):this.publicToken?i("div",{class:"text-success mt-2"},i("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:i("div",{class:"text-muted mt-2"},i("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},lt=class{constructor(e){t(this,e),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),M.selectedPaymentMethod={id:t.id,type:t.type},M.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===Q.SAVED_CARD&&M.disableCreditCard||t===Q.SAVED_BANK_ACCOUNT&&M.disableBankAccount)}componentWillLoad(){M.paymentMethods.length||console.warn("No saved payment methods available."),M.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return M.disablePaymentMethodGroup?null:i(f,null,i("div",{class:"saved-payment-methods"},M.paymentMethods.length?M.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((t=>i("div",{class:"radio-list-item p-3",part:T,onClick:this.onPaymentMethodOptionClick(t)},i("form-control-radio",{name:"paymentMethodType",value:null==t?void 0:t.id,checked:M.paymentToken===(null==t?void 0:t.id),label:`${q[null==t?void 0:t.brand]||""} *${null==t?void 0:t.acct_last_four}`})))):null))}},ht=i("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),ct=class{constructor(i){t(this,i),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected",7),this.paymentMethodOptionId=Q.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(M.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:M.bnplProviderClientId,apiMode:M.bnplProviderMode,apiVersion:M.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:M.bnplProviderCheckoutUrl})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){M.selectedPaymentMethod={type:Q.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var t,e;return M.bnplEnabled?i(f,{class:"payment-method"},i("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),i("div",null,i("div",null,"Buy now, pay later with ",ht),this.installmentPlan&&i("small",null,i("span",null,null===(t=this.installmentPlan)||void 0===t?void 0:t.installments.length)," ",i("span",null,this.installmentPlan.schedule," payments of")," ",i("span",{class:"fw-bold"},A(null===(e=this.installmentPlan)||void 0===e?void 0:e.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}},dt={[Q.NEW_BANK_ACCOUNT]:"New bank account",[Q.NEW_CARD]:"New credit or debit card"},ut="Payment form not ready",pt="Validation error",yt=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event",7),this.submitEvent=e(this,"submit-event",7),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){z(),this.analytics=new L(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,M.selectedPaymentMethod={type:t.detail}}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:R.TOKENIZE_ERROR,message:pt}),void(this.isLoading=!1);const t=await this.resolvePaymentMethod({isValid:!0});return t.error&&this.emitError({errorCode:t.error.code,message:t.error.message}),this.submitEvent.emit({response:t}),t}catch(t){const e=this.createErrorResponse(R.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:R.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async fillBillingForm(t){M.billingFormFields=t}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:ut}};const[t,e]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async getValues(){return this.billingFormRef.getValues()}async tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||M.authToken,account:this.accountId||M.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||M.authToken||this.emitError({errorCode:R.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||M.accountId||this.emitError({errorCode:R.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethod||(this.disableCreditCard?this.disableBankAccount||(this.selectedPaymentMethod=Q.NEW_BANK_ACCOUNT,M.selectedPaymentMethod={type:Q.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=Q.NEW_CARD,M.selectedPaymentMethod={type:Q.NEW_CARD}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const t=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=t}isSlottedWithinModularCheckout(){var t;let e=null===(t=this.host)||void 0===t?void 0:t.parentElement;for(;e;){if("JUSTIFI-MODULAR-CHECKOUT"===e.tagName)return!0;e=e.parentElement}return!1}get availablePaymentMethods(){const t=[];return this.disableCreditCard||t.push(Q.NEW_CARD),this.disableBankAccount||t.push(Q.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:_.ERROR}))}createErrorResponse(t,e){return{error:{code:t,message:e,decline_code:void 0}}}async resolvePaymentMethod(t){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",ut);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||pt;return{validationError:!0,error:{code:"validation_error",message:String(t),decline_code:void 0}}}return await this.performTokenization()}catch(t){return{error:t}}}async performTokenization(){var t,e;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(t=s.card)||void 0===t?void 0:t.token)||(null===(e=s.bank_account)||void 0===e?void 0:e.token),data:s}}buildPaymentMethodMetadata(t){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},t)}get paymentMethodGroupID(){return this.paymentMethodGroupId||M.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!M.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const e=this.selectedPaymentMethod===t&&void 0===M.selectedPaymentMethod.id;return i("div",{class:"payment-method"},i("radio-list-item",{name:"paymentMethodType",value:t,checked:e,label:dt[t],hidden:this.shouldHideRadioInput}),e&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return i("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),i("div",{class:"mt-4"},i("billing-form",{ref:t=>{t&&(this.billingFormRef=t)},hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),i("div",{class:"mt-4"},i("save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return i(t===Q.NEW_CARD?"card-form":"bank-account-form",{ref:t=>{t&&(this.paymentMethodFormRef=t)}})}render(){return i(f,{key:"2d4349f3e5ad632981cdeb14dbe4e483f79379da"},i("form",{key:"754afee2c5229cf016bd8fc0cf81041cf37270a8"},i("fieldset",{key:"01867151a09d384e1258ef7f62fbc88c526706cc"},i("div",{key:"7ba453d4629a0c2ef583daddcb9cf02ac5eee265",class:"row gy-3"},i("div",{key:"4148f2269c738a00f2684d69d4a83a4ab2424f2b",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),i("div",{key:"e67b09357571aadfb3d2712f55954506748b3826",class:"col-12"},i("internal-button",{key:"c2e805060ff7e9e97144533ffad3b4a02433e792",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return n(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}};export{K as justifi_apple_pay,tt as justifi_button,et as justifi_checkout_summary,nt as justifi_google_pay,ot as justifi_header,at as justifi_modular_checkout,rt as justifi_plaid_payment_method,W as justifi_radio_list_item,lt as justifi_saved_payment_methods,ct as justifi_sezzle_payment_method,yt as justifi_tokenize_payment_method}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as a}from"./p-CV0Pyo1O.js";import{S as s}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";const o=class{constructor(a){e(this,a),this.checkboxChanged=t(this,"checkboxChanged",7),this.label="Save New Payment Method"}render(){return a(s,{key:"58ca6f98ace8aba5658fa38215b0c0756907ce9f"},a("save-new-payment-method",{key:"6bfd3950c0bdf26bca6866ebf1b155ac39466516",label:this.label,hidden:this.hidden,onCheckboxChanged:e=>this.checkboxChanged.emit(e.detail)}))}};export{o as justifi_save_new_payment_method}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,r as t}from"./p-CV0Pyo1O.js";import{S as i}from"./p-BrO0HEFJ.js";import{w as a,c as s}from"./p-DVJaoI_m.js";import{j as c}from"./p-MkDHT9M4.js";import{c as r}from"./p-D0BjjvYt.js";import"./p-D50Rx76J.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-CIYOQWsL.js";const d=t=>{const{isReady:a}=t;return a?null:e("div",{class:"container-fluid p-0"},e("div",{class:"row mb-3"},e("div",{class:"col-12 align-content-end"},e(i,{height:"18px",width:"120px"}),e(i,{height:"36px"}))),e("div",{class:"row"},e("div",{class:"col-12 align-content-end"},e(i,{height:"18px",width:"110px"}),e(i,{height:"36px"}))))},o=class{constructor(e){t(this,e),this.isReady=!1}async componentWillLoad(){await a(),this.iframeOrigin=s.iframeOrigin,this.tabId=c(),r()}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((e=>new Promise((t=>{e.addEventListener("iframeLoaded",(()=>{t()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const e=await this.accountNumberIframeElement.validate(),t=await this.routingNumberIframeElement.validate();return e&&t}async tokenize({clientId:e,paymentMethodMetadata:t,account:i}){return await this.accountNumberIframeElement.tokenize(e,t,i)}render(){return e("div",{key:"73e3f3c28652ec1a0256ea8668db6ebe56e929ba"},e(d,{key:"cf8bd04492e821a4c39c61c549dec728fc24696e",isReady:this.isReady}),e("hidden-input",{key:"877eeb9963fb9971e372a05eb3de1bee66d5b765"}),e("div",{key:"8a5c6dced3dfd9ce2486712e6a7d90b3710721bc",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},e("div",{key:"35f116944ac3fbda6f46cd3335dd442fc5284fc3",class:"row mb-3"},e("iframe-input",{key:"c9bfd6124f3107b703ee4c43946560940b93899f",inputId:"accountNumber",ref:e=>this.accountNumberIframeElement=e,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),e("div",{key:"43a3d810081ad218ce3fd57627c1c93efc4fb1eb",class:"row"},e("iframe-input",{key:"4b2d6d3213c4ba44cf63a1297d34975c894010f6",inputId:"routingNumber",ref:e=>this.routingNumberIframeElement=e,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}};export{o as bank_account_form}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{P as e}from"./p-DLmWCafe.js";import{m as r}from"./p-C1olhiO9.js";import{E as o}from"./p-CjuaXEuI.js";import{C as p,a}from"./p-Cjcsf8ku.js";import{J as m}from"./p-CmXujxGp.js";import{c as h}from"./p-D0BjjvYt.js";import"./p-CMB3sNMT.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-MkDHT9M4.js";import"./p-HXpYMWUU.js";import"./p-CBqZge6m.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-D2muobcE.js";import"./p-D50Rx76J.js";import"./p-CIYOQWsL.js";const n=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.recordClickEvent=s(this,"record-click-event",7),this.errorMessage=null,this.paymentService=new e,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.handleRecordClickEvent=t=>{this.recordClickEvent.emit({id:t.detail.id,type:t.detail.type})}}componentWillLoad(){h(),this.analytics=new m(this),this.initializeGetPaymentDetails()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?this.getPaymentDetails=r({id:this.paymentId,authToken:this.authToken,service:new e}):(this.errorMessage="Payment ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:a.MISSING_PROPS,severity:p.ERROR}))}render(){return this.errorMessage?o(this.errorMessage):i("payment-details-core",{getPaymentDetails:this.getPaymentDetails,"onError-event":this.handleErrorEvent,"onRecord-click-event":this.handleRecordClickEvent,"enable-record-click":"true"})}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"]}}};export{n as justifi_payment_details}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import{T as i,a,b as r,c as h,d as c,e as o,f as n,g as p,h as f,i as d,j as m,k as b,l as j}from"./p-CwdQ1VdH.js";import{T as g}from"./p-CZfYo5-1.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-CBqZge6m.js";import{p as u}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{t as l,a as y}from"./p-MLfmcsbZ.js";import{o as k,g as C}from"./p-BPTtWj7E.js";import"./p-D50Rx76J.js";import"./p-Df9FVwA7.js";import"./p-D8GTwl9v.js";import"./p-MkDHT9M4.js";import"./p-Da4efjxw.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.terminalOrders=[],this.loading=!0,this.paging=u,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:g.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:g.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.terminalOrders.find((t=>t.id===s));this.clickEvent.emit({name:g.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalOrdersTable=new i(this.terminalOrders,this.columns,l,y),this.getTerminalOrders&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminalOrders({params:this.terminalOrderParams,onSuccess:async({terminalOrders:t,pagingInfo:s})=>{this.terminalOrders=t,this.paging=s,this.terminalOrdersTable.collectionData=this.terminalOrders},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e})},final:()=>{this.loading=!1}})}get terminalOrderParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.terminalOrders.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalOrdersTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(j,{key:"f5539d7232ffae0622211694f56cccb41138c02d"},e(a,{key:"1bc37edeb7bc456c911037f36fef12104ad10f7e"},e(r,{key:"2996ee96df8a41716a8439e73079198883a9995a"},e(h,{key:"8553c2e768f8c7e45b81ca5bc58854f83b924510"},this.terminalOrdersTable.columnData.map((t=>t)))),e(c,{key:"480a71ee3bd46b05529d5f13559623aff0fbcc9e"},e(o,{key:"1d8775dc53fc2ce68eef0cd2a74507f2ca761966",columnSpan:this.terminalOrdersTable.columnKeys.length,isLoading:this.loading}),e(n,{key:"85d296df5357b39d367c18483b95671cda80c584",isEmpty:this.showEmptyState,columnSpan:this.terminalOrdersTable.columnKeys.length}),e(p,{key:"234dca2f99c174127834fd0c0709771e0a8e0fd8",columnSpan:this.terminalOrdersTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalOrdersTable.rowData.map(((t,s)=>e(f,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(d,{key:"3f8867b439f2e258f2b861b363e4e6ddcc519425"},e(m,{key:"c9b64263c7047b28eb4a4319a7285bee7898fc56"},e(b,{key:"98c6a8a9d429e5d67657fcc20ffe1304c1312459",colSpan:this.terminalOrdersTable.columnData.length},e("pagination-menu",{key:"f7ebd8cb669c409581ccee316effd0745afacb13",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminalOrders:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{w as terminal_orders_list_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,H as i}from"./p-CV0Pyo1O.js";import{M as h,N as a,O as r,P as o,Q as c,z as f}from"./p-D50Rx76J.js";const l=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.errorText="",this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.inputHandler(s,this.value),this.formControlInput.emit({name:s,value:this.value})}}get part(){return this.errorText?h:this.isFocused&&this.checked?a:this.checked?r:this.isFocused?o:c}render(){return e(i,{key:"155f8db94cbc78a33daeaace0ea6b9e403d6856d",class:"form-group d-flex flex-column"},e("div",{key:"f2c34e5513e584a68c6117775124eeb40d8a4de3",class:"form-check"},e("input",{key:"50114b7a8428cc78b963442cf92eda6d0146f824",ref:t=>this.radioElement=t,type:"radio",id:`${this.name}-${this.value}`,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onChange:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,value:this.value,checked:this.checked}),e("label",{key:"759a69de65a6fc043494d394a118c55b1e948e75",class:"form-check-label",htmlFor:`${this.name}-${this.value}`,part:f},this.label)),e("form-control-help-text",{key:"18ca0f0b27657d1a159b9eb4839290969f349d7e",helpText:this.helpText,name:this.name}),e("form-control-error-text",{key:"e4bffdf3cd4596a3b42fb6098be620005d68296e",errorText:this.errorText,name:this.name}))}};export{l as form_control_radio}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as i}from"./p-CV0Pyo1O.js";import{S as s}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";const a=class{constructor(i){r(this,i)}async getValues(){var r,i;return null!==(i=null===(r=this.cardBillingFormSimpleRef)||void 0===r?void 0:r.getValues())&&void 0!==i?i:{}}async validate(){var r,i;return null!==(i=null===(r=this.cardBillingFormSimpleRef)||void 0===r?void 0:r.validate())&&void 0!==i?i:{isValid:!1,errors:{}}}render(){return i(s,{key:"cb3b6670a547232d21c917eac7d9423901055dd1"},i("card-billing-form-simple",{key:"15ac287b3a9aa91f481817450d87e967e7f95ae8",legend:this.legend,ref:r=>this.cardBillingFormSimpleRef=r}))}};export{a as justifi_card_billing_form_simple}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,h as e}from"./p-CV0Pyo1O.js";import{f as t,p as s,c as r}from"./p-AMVhBsGv.js";import{f as l,a as c}from"./p-D50Rx76J.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as i,a as o}from"./p-MkDHT9M4.js";import"./p-DVJaoI_m.js";import"./p-Cjcsf8ku.js";import{P as p}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const f=class{constructor(e){a(this,e),this.setParamsOnChange=(a,e)=>{t[a]=e},this.handleDateInput=(a,e)=>{const t=i(e,{setEndOfDay:!0});this.setParamsOnChange(a,t)}}componentWillLoad(){Object.entries({status:this.status,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([a,e])=>{e&&(s[a]=e)}))}get statusOptions(){return[{label:"All",value:""},{label:p.paid,value:"paid"},{label:p.failed,value:"failed"},{label:p.forwarded,value:"forwarded"},{label:p.scheduled,value:"scheduled"},{label:p.in_transit,value:"in_transit"},{label:p.canceled,value:"canceled"}]}render(){const a=Object.assign({},t);return e(d,{key:"8be08663402766ca7c59a8e13a5dd6c375921274"},e("table-filters-menu",{key:"a93fc8c2a91a6cd751e9a666534a3fa011e8035a",params:a,clearParams:r,part:l},e("div",{key:"550cc64313b40f3a86022bdf1c5381b9bcccb61d",class:"grid-cols-2 gap-3 p-1"},e("div",{key:"c7a331add778b6089b42faac0cf9647af3dff0d0",class:"p-2"},e("form-control-select",{key:"60ad687908b8bb7b08ff3b84d8feec19e1508d1a",name:"status",label:"Status",options:this.statusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.status||t.status||"",disabled:!!this.status,part:c})),e("div",{key:"1144dab54cc77610ab2a7d12cb5ea22d615e5831",class:"p-2"},e("form-control-date",{key:"1570cffe6b35742441c081314f4c5fb0dc8e4be4",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:o(this.createdAfter,{showInputDate:!0})||o(t.created_after,{showInputDate:!0}),disabled:!!this.createdAfter,part:c})),e("div",{key:"1fba24a82ce558bf2362eba2745be47dca4f7024",class:"p-2"},e("form-control-date",{key:"d52f8bdbb1616aa7951a669e0fa1a76b64ef1f3c",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:o(this.createdBefore,{showInputDate:!0})||o(t.created_before,{showInputDate:!0}),disabled:!!this.createdBefore,part:c})))))}};export{f as justifi_payouts_list_filters}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,c as t,h as r}from"./p-CV0Pyo1O.js";import{P as o}from"./p-DLmWCafe.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as i,a as e}from"./p-Cjcsf8ku.js";import{b as a}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as p,a as n}from"./p-D2muobcE.js";import{J as m}from"./p-CmXujxGp.js";import{c}from"./p-D0BjjvYt.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d as h}from"./p-Bwzxu5wV.js";import"./p-CMB3sNMT.js";import"./p-MkDHT9M4.js";import"./p-D8GTwl9v.js";import"./p-CIYOQWsL.js";import"./p-CzdAS9Jo.js";import"./p-Da4efjxw.js";import"./p-D50Rx76J.js";const j=class{constructor(r){s(this,r),this.errorEvent=t(this,"error-event",7),this.errorMessage=null,this.columns=h,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){c(),this.analytics=new m(this),this.initializeGetPayments()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:s,authToken:t,service:r})=>async({params:o,onSuccess:e,onError:m,final:c})=>{var d,h;try{const c=await r.fetchPayments(s,t,o);if(c.error)return m({error:n(c.error),code:p(null===(h=c.error)||void 0===h?void 0:h.code),severity:i.ERROR});{const s=Object.assign({},c.page_info);e({payments:(null===(d=c.data)||void 0===d?void 0:d.map((s=>new a(s))))||[],pagingInfo:s})}}catch(s){const t=p(null==s?void 0:s.code);return m({error:s.message||s,code:t,severity:i.ERROR})}finally{return c()}})({id:this.accountId,authToken:this.authToken,service:new o}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}render(){return r(d,{key:"a8562a3d7d7d1efda16f86c1bccbd3417fe8f198"},r("payments-list-core",{key:"03a88647d46be6ea09bdd26dc226a4faa1bddf72",getPayments:this.getPayments,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{j as justifi_payments_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as i}from"./p-CV0Pyo1O.js";import{J as o}from"./p-CmXujxGp.js";import{c as r}from"./p-D0BjjvYt.js";import{w as t}from"./p-DVJaoI_m.js";import{S as a}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-CIYOQWsL.js";import"./p-CMB3sNMT.js";import"./p-MkDHT9M4.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-CBqZge6m.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-D8GTwl9v.js";const p=class{constructor(i){s(this,i)}async componentWillLoad(){await t(),r(),this.analytics=new o(this)}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}async getValues(){var s,i;return null!==(i=null===(s=this.bankAccountBillingFormSimpleRef)||void 0===s?void 0:s.getValues())&&void 0!==i?i:{}}async validate(){var s,i;return null!==(i=null===(s=this.bankAccountBillingFormSimpleRef)||void 0===s?void 0:s.validate())&&void 0!==i?i:{isValid:!1,errors:{}}}render(){return i(a,{key:"a172aac4c90a5056ab32c1d146e3420b6307b53a"},i("bank-account-billing-form-simple",{key:"c3a15c1a55f446e1a905382ee70f97e57a0136ac",legend:this.legend,ref:s=>this.bankAccountBillingFormSimpleRef=s}))}};export{p as justifi_bank_account_billing_form_simple}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,c as s,h as t}from"./p-CV0Pyo1O.js";import{S as i}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as e}from"./p-D0BjjvYt.js";import{d as o}from"./p-MLfmcsbZ.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as a,a as n}from"./p-Cjcsf8ku.js";import{j as p}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as m,a as c}from"./p-D2muobcE.js";import{A as d}from"./p-CMB3sNMT.js";import{J as h}from"./p-CmXujxGp.js";import"./p-CIYOQWsL.js";import"./p-D50Rx76J.js";import"./p-MkDHT9M4.js";import"./p-Da4efjxw.js";import"./p-D8GTwl9v.js";const l=d();class j{async fetchTerminalOrders(r,s,t){return l.get({endpoint:"terminals/orders",params:t,headers:{account:r},authToken:s})}}const u=class{constructor(t){r(this,t),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=o,this.handleErrorEvent=r=>{this.errorMessage=r.detail.message,this.errorEvent.emit(r.detail)}}componentWillLoad(){e(),this.analytics=new h(this),this.initializeGetData()}disconnectedCallback(){var r;null===(r=this.analytics)||void 0===r||r.cleanup()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:r,authToken:s,service:t})=>async({params:i,onSuccess:e,onError:o,final:n})=>{var d,h;try{const n=await t.fetchTerminalOrders(r,s,i);if(n.error)return o({error:c(n.error),code:m(null===(h=n.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const r=Object.assign({},n.page_info);e({terminalOrders:(null===(d=n.data)||void 0===d?void 0:d.map((r=>new p(r))))||[],pagingInfo:r})}}catch(r){const s=m(null==r?void 0:r.code);return o({error:r.message||r,code:s,severity:a.ERROR})}finally{return n()}})({id:this.accountId,authToken:this.authToken,service:new j}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:n.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}render(){return t(i,{key:"f7854de93d0916c5d01cd14772715290bd149d09"},t("terminal-orders-list-core",{key:"965d8e73e7def3508b59bf35940872f05ebe8c80",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{u as justifi_terminal_orders_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t}from"./p-CV0Pyo1O.js";import{B as a}from"./p-C-QiUcEa.js";import{a5 as r,a6 as s}from"./p-D50Rx76J.js";const d=e=>{const t=["after_cursor","before_cursor"];return!!Object.keys(e).filter((e=>!t.includes(e))).length},o=class{constructor(t){e(this,t),this.showClearButton=!1}watchParamsHandler(e){this.showClearButton=d(e)}show(){this.menu.classList.add("show")}hide(){this.menu.classList.remove("show")}componentWillLoad(){this.showClearButton=d(this.params)}render(){return t("div",{key:"b2995f302e9627d876ff6ac21295d41ce69d4f7b",class:"d-flex gap-2"},t("div",{key:"998fd281023ac31e826e5288d4b6d47292cdf6ef",class:"dropdown pb-3"},t("button",{key:"fc3ee216db9069418fcc0c53f0910185934b4ad9",type:"button dropdown-toggle",ref:e=>this.anchorButton=e,class:"btn btn-primary dropdown-toggle",part:r,"data-test-id":"open-filters-button","data-bs-toggle":"dropdown"},"Filters"),t("custom-popper",{key:"276206711bc368554023e0545852cc2dd05bbc84",offset:[20,10],strategy:"fixed",anchorRef:this.anchorButton,trigger:"click"},t("form",{key:"099fa4a9981bf956e2bab4b938595ed5414d0c49",class:"dropdown-menu",part:s,"data-test-id":"filter-menu",ref:e=>this.menu=e,onSubmit:e=>e.preventDefault()},t("slot",{key:"7d4e6e5b97effc0ccddce3333795b1fc43f63e43"})))),t("div",{key:"422589b336e1e9d0a1aac49ce05f7febf804759c"},t(a,{key:"1ae668bea62082a84fe47d75697d2b0cbb9ed617",variant:"secondary",onClick:()=>this.clearParams(),hidden:!this.showClearButton,"data-test-id":"clear-filters-button"},"Clear Filters")))}static get watchers(){return{params:["watchParamsHandler"]}}};export{o as table_filters_menu}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{J as o}from"./p-CmXujxGp.js";import{c as p}from"./p-D0BjjvYt.js";import{D as a}from"./p-BH0Xfn-F.js";import{g as n,a as h}from"./p-D2muobcE.js";import{D as c}from"./p-CWv3GX8X.js";import"./p-CIYOQWsL.js";import"./p-CMB3sNMT.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-MkDHT9M4.js";import"./p-HXpYMWUU.js";import"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const m=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){p(),this.analytics=new o(this),this.initializeGetDispute()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:t,authToken:s,service:i})=>async({onSuccess:r,onError:o})=>{var p;try{const c=await i.fetchDispute(t,s);if(c.error)return o({error:h(c.error),code:n(null===(p=c.error)||void 0===p?void 0:p.code),severity:e.ERROR});{const t=Object.assign({},c.page_info);r({dispute:new a(c.data),pagingInfo:t})}}catch(t){const s=n(null==t?void 0:t.code);return o({error:t.message||t,code:s,severity:e.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new c}):(this.errorMessage="Dispute ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:r.MISSING_PROPS,severity:e.ERROR}))}render(){return i("justifi-dispute-management-core",{key:"d69df58c862b817e39c773ef80ae95b24cac8be3",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{m as justifi_dispute_management}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s}from"./p-CV0Pyo1O.js";import{J as o}from"./p-CmXujxGp.js";import{c as a}from"./p-D0BjjvYt.js";import{w as r}from"./p-DVJaoI_m.js";import{S as p}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-CIYOQWsL.js";import"./p-CMB3sNMT.js";import"./p-MkDHT9M4.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-CBqZge6m.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-D8GTwl9v.js";const i=class{constructor(s){t(this,s)}async componentWillLoad(){await r(),a(),this.analytics=new o(this)}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){return this.cardFormElement.validate()}async tokenize({clientId:t,paymentMethodMetadata:s,account:o}){return this.cardFormElement.tokenize({clientId:t,paymentMethodMetadata:s,account:o})}render(){return s(p,{key:"50a01710ce00b5821259ca5742df7d4dce97fba4"},s("card-form",{key:"bd5426a1aa6270dc45492115000bb5aac9466fd8",ref:t=>this.cardFormElement=t}))}};export{i as justifi_card_form}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as a}from"./p-CV0Pyo1O.js";import{D as s,E as d,F as i}from"./p-D50Rx76J.js";const c=class{constructor(a){e(this,a),this.selectedQuantityChange=t(this,"selectedQuantityChange",7),this.limit=1/0,this.selectedQuantity=0,this.removeUnit=()=>{this.selectedQuantity>0&&(this.selectedQuantity--,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))},this.addUnit=()=>{this.limit>0&&(this.selectedQuantity++,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))}}render(){return a("div",{key:"8be4d665fc9a9d59623fa4fed1e659b55e79f598",class:"rounded shadow-sm card p-2",part:i},a("div",{key:"007e76def4d3ffbac8734df4281857e5623043ad",class:"d-flex gap-3"},a("div",{key:"30bea8b3eefbd08971568f06eb7718e83d964f1f",class:"d-flex align-items-center"},a("img",{key:"4fd64ed37d53cda9c8f0bde15e4e24d310ef6fcb",src:this.imageUrl,alt:this.modelName,height:75,width:75,part:s})),a("div",{key:"6b61b5e6f3aaef6c4be94ea52c3b5eec4f6d5d0c",class:"d-flex flex-column flex-grow-1 gap-3 p-4 justify-content-center"},a("div",{key:"593b1e00bd6aa3d99f677e6aaa34cf3b36a8401e",class:"row"},a("div",{key:"98690539987c508c8e158bf7c3d3eb1eadc59ee7",class:"col-6 d-flex gap-2"},this.modelName,a("form-control-tooltip",{key:"f062a7cef0c23eda70c269639ef2a90114d21e75",helpText:this.description})),a("div",{key:"110e58b0aeff60bf4e2f8f1ea758a14002676bdb",class:"col-6 d-flex justify-content-end align-items-center"},a("button",{key:"2617b5f6de942a23dd12ad8694e84b6ca213c963",class:"p-0 minus btn",onClick:this.removeUnit,part:d},"-"),a("div",{key:"9bc6bd84bb4794e80de2e74ed68b7e8ab55a2508",class:"w-25 text-center"},this.selectedQuantity),a("button",{key:"09a2aaa55627d5ee64639f729de9fb3d21e7244b",class:"p-0 plus btn",onClick:this.addUnit,part:d},"+"))))))}};export{c as terminal_quantity_selector}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as o}from"./p-CV0Pyo1O.js";import{c as s}from"./p-D0BjjvYt.js";import{J as p}from"./p-CmXujxGp.js";import{w as r}from"./p-DVJaoI_m.js";import{S as a}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-CIYOQWsL.js";import"./p-CMB3sNMT.js";import"./p-MkDHT9M4.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-CBqZge6m.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-D8GTwl9v.js";const i=class{constructor(o){t(this,o)}async componentWillLoad(){await r(),s(),this.analytics=new p(this)}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){return this.bankAccountFormElement.validate()}async tokenize({clientId:t,paymentMethodMetadata:o,account:s}){return this.bankAccountFormElement.tokenize({clientId:t,paymentMethodMetadata:o,account:s})}render(){return o(a,{key:"5f3b8fbc0592dce5def5def74cbc724338acf93c"},o("bank-account-form",{key:"3c8e92e35ea8faf35b08df04190413770211d42f",ref:t=>this.bankAccountFormElement=t}))}};export{i as justifi_bank_account_form}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as o}from"./p-CMB3sNMT.js";import{C as s}from"./p-Cjcsf8ku.js";import{S as r}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{g as t,a as c}from"./p-D2muobcE.js";const n=o();class a{async fetchSubAccounts(o,s,r){return n.get({authToken:s,endpoint:"sub_accounts",params:r,headers:{Account:o}})}}const p=({primaryAccountId:o,authToken:n,service:a})=>async({params:p,onSuccess:e,onError:i})=>{var m,u;try{const j=await a.fetchSubAccounts(o,n,p);if(j.error){return i({error:c(j.error),code:t(null===(u=j.error)||void 0===u?void 0:u.code),severity:s.ERROR})}{const o=Object.assign({},j.page_info);e({subAccounts:(null===(m=j.data)||void 0===m?void 0:m.map((o=>new r(o))))||[],pagingInfo:o})}}catch(o){const r=t(null==o?void 0:o.code);return i({error:o.message||o,code:r,severity:s.ERROR})}};export{a as S,p as m}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,c as i,h as t}from"./p-CV0Pyo1O.js";import{J as o}from"./p-CmXujxGp.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{m as p,a as n}from"./p-R0FDNhyd.js";import{B as a}from"./p-B6sIVWJW.js";import{A as h}from"./p-CMB3sNMT.js";import"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{c as m}from"./p-D0BjjvYt.js";import{i as u}from"./p-MkDHT9M4.js";import"./p-CIYOQWsL.js";import"./p-D2muobcE.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const c=h();class d{async postProvisioning(s,i,t){return c.post({endpoint:"entities/provisioning",body:{business_id:i,product_category:t},authToken:s})}}const j=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.allowOptionalFields=!1,this.formTitle="Business Information"}propChanged(){this.initializeApi()}componentWillLoad(){m(),this.analytics=new o(this),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeApi(){this.authToken&&this.businessId?u(this.authToken)?this.errorEvent.emit({message:"auth-token is expired",errorCode:r.NOT_AUTHENTICATED,severity:e.ERROR}):(this.getBusiness=p({authToken:this.authToken,businessId:this.businessId,service:new a}),this.postProvisioning=n({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new d})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:r.MISSING_PROPS,severity:e.ERROR})}render(){return t("justifi-payment-provisioning-core",{key:"e0e707c564262573b709f427a31f6d532b0e82c3",businessId:this.businessId,authToken:this.authToken,allowOptionalFields:this.allowOptionalFields,formTitle:this.formTitle,getBusiness:this.getBusiness,postProvisioning:this.postProvisioning})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{j as justifi_payment_provisioning}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t}from"./p-CV0Pyo1O.js";import{r as o}from"./p-D50Rx76J.js";import{S as s}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";const a=class{constructor(t){e(this,t)}render(){return t(s,{key:"f6ea315f33580dcc2ea72448888637fa681d2f3f",class:"payment-method"},t("div",{key:"b9e8d0fa9b5444ce6f25f9719258e6b9b6b11f28",class:"radio-list-item p-3",part:o,onClick:this.clickHandler,hidden:this.radioButtonHidden},t("form-control-radio",{key:"59bdbd03be9200a367b9c75c52815cbf12c36912",name:"paymentMethodType",value:this.paymentMethodOptionId,checked:this.isSelected,label:this.label})))}};export{a as payment_method_option}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as i,a}from"./p-Cjcsf8ku.js";import"./p-CBqZge6m.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{T as o,a as h,b as c,c as n,d as p,e as f,f as d,g as b,h as m,i as u,j as y,k as g,l as j}from"./p-CwdQ1VdH.js";import{T as l}from"./p-CZfYo5-1.js";import{p as k,a as C}from"./p-J7WCmj-J.js";import{o as v,g as w}from"./p-AMVhBsGv.js";import"./p-D8GTwl9v.js";import"./p-MkDHT9M4.js";import"./p-D50Rx76J.js";import"./p-Df9FVwA7.js";import"./p-BJtvT9BX.js";import"./p-Da4efjxw.js";const S=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=r,this.pagingParams={},this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:l.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:l.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const i=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:l.row,data:i})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.payoutsTable=new o(this.payouts,this.columns,k,C(this.downloadCSV)),this.getPayouts&&this.getSubAccounts&&this.fetchData(),v("set",(()=>{this.pagingParams={}})),v("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=w();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(j,{key:"fc1f3f0ae5303b725825fb85511c1b82d1859e51"},e(h,{key:"39cc756942ee907a4f28d393f9394f3b2fe8de65"},e(c,{key:"14a32b75bcc3c5acf3ebb991138551158e77f1f0"},e(n,{key:"54994adbec3b9e989e310061342fb39254f676e8"},this.payoutsTable.columnData.map((t=>t)))),e(p,{key:"589a1bd6a80eb70597905cb5158c7fb957f139c4"},e(f,{key:"04e43f7dc4762d202dc1e8a6eacf398ca4f0a491",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),e(d,{key:"4111b8f9acdf91495661001feab7f608611b3fcc",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),e(b,{key:"de53388b6812ea1663140799c9e1278e0bfb1a05",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((t,s)=>e(m,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(u,{key:"6d4b26f00c3610881e0984f8cc12ce81b400b5f4"},e(y,{key:"874f4bb62fae785bf940b6ad14dd352c4c76ec81"},e(g,{key:"27283f9f1bbf3608d094da4b72bb3aadcf0e3e88",colSpan:this.payoutsTable.columnData.length},e("pagination-menu",{key:"746ef2cfbdab63f03fa1910999d7da0dcdd5d108",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{S as payouts_list_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-C_ifLmT1.js";import{c as s,a as i}from"./p-MkDHT9M4.js";import{f as r,p as l,c as d}from"./p-Dw63wyhO.js";import{f as c,a as b}from"./p-D50Rx76J.js";import{S as o}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-DVJaoI_m.js";import"./p-Cjcsf8ku.js";import{d as f}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";const p=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{r[e]=a},this.handleDateInput=(e,a)=>{const t=s(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId,provider_id:this.providerId,serial_number:this.serialNumber,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(l[e]=a)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:f.connected},{label:"Disconnected",value:f.disconnected},{label:"Unknown",value:f.unknown},{label:"Pending Configuration",value:f.pending_configuration},{label:"Archived",value:f.archived}]}render(){const e=Object.assign({},r);return a(o,{key:"a74ed2422b669401402664c77542412f3763ba76"},a("table-filters-menu",{key:"9158ca6884cb610dc712fb1b3a69ca6803a7dce7",params:e,clearParams:d,part:c},a("div",{key:"e24cfc9c7f078f9eb7d5f1f5b4d5cef8374378ce",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"cce1419064f7e7cdc687437416327f7daebe5eae",class:"p-2"},a("form-control-text",{key:"750c30bc7e281f40646bdfaf0a29393d0ce7f72b",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||r.terminal_id,disabled:!!this.terminalId,part:b})),a("div",{key:"512ccc43edb3aab2ec6ab7d9c76bebf6369df73d",class:"p-2"},a("form-control-text",{key:"6320c75ecd89ad00162c764998c1c703a5965787",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||r.terminal_order_id,disabled:!!this.terminalOrderId,part:b})),a("div",{key:"6f0d58b200a36516ede61609aad03ca191f240c2",class:"p-2"},a("form-control-text",{key:"f786e9fbbd7c9604429c5f43935121245f2943d2",name:"provider_id",label:"Device ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.providerId||r.provider_id,disabled:!!this.providerId,part:b})),a("div",{key:"b4d84761c2f5de192669012acc41bb5ba2b76750",class:"p-2"},a("form-control-text",{key:"deb1c3b5cc3b72b2724a296b1024f8f66ae69683",name:"serial_number",label:"Serial Number",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.serialNumber||r.serial_number,disabled:!!this.serialNumber,part:b})),a("div",{key:"b90c15ba9fa6bbe5eac425152753d1cb508b1710",class:"p-2"},a("form-control-select",{key:"beb78ebcd076b7b26a0cb5115ae9b619584fc307",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||r.status||"",disabled:!!this.terminalStatus,part:b})),a("div",{key:"e6109b7758b998d41d2ff555bf26ee9de1011c94",class:"p-2"},a("form-control-date",{key:"e407111678baea094666e8789175ce15d40c2ee8",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:i(this.createdAfter||r.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:b})),a("div",{key:"edc59eb19b58592803ffba665adae26d34fdfe0c",class:"p-2"},a("form-control-date",{key:"21c995d7eef08082ca7996eaf9286aeaa80fd2e9",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:i(this.createdBefore||r.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:b})))))}};export{p as justifi_terminals_list_filters}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as t}from"./p-CMB3sNMT.js";import"./p-Cjcsf8ku.js";import"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const n=t();class e{async fetchBusiness(t,e){return n.get({endpoint:`entities/business/${t}`,authToken:e})}async patchBusiness(t,e,s){return n.patch({endpoint:`entities/business/${e}`,body:s,authToken:t})}}class s{async fetchIdentity(t,e){return n.get({endpoint:`entities/identity/${t}`,authToken:e})}async patchIdentity(t,e,s){return n.patch({endpoint:`entities/identity/${e}`,body:s,authToken:t})}async postIdentity(t,e){return n.post({endpoint:"entities/identity",body:e,authToken:t})}}class i{async postBankAccount(t,e){return n.post({endpoint:"entities/bank_accounts",body:e,authToken:t})}}class o{async postDocumentRecord(t,e){return n.post({endpoint:"entities/document",body:e,authToken:t})}}export{e as B,o as D,s as I,i as a}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e}from"./p-CMB3sNMT.js";import"./p-Cjcsf8ku.js";import"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const r=e();class n{async fetchTerminals(e,n,s){return r.get({endpoint:"terminals",params:s,headers:{Account:e},authToken:n})}async fetchTerminal(e,n){return r.get({endpoint:`terminals/${e}`,authToken:n})}async fetchTerminalModels(e,n){return r.get({endpoint:"terminals/order_models",headers:{"sub-account":e},authToken:n})}async orderTerminals(e,n){return r.post({endpoint:"terminals/orders",body:n,headers:{"sub-account":n.sub_account_id},authToken:e})}}export{n as T}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as o}from"./p-Cjcsf8ku.js";import{b as r}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as s,a as i}from"./p-D2muobcE.js";const p=({id:p,authToken:t,service:e})=>async({onSuccess:a,onError:m,final:c})=>{var n;try{const c=await e.fetchPayment(p,t);if(c.error){m({error:i(c.error),code:s(null===(n=c.error)||void 0===n?void 0:n.code),severity:o.ERROR})}else a({payment:new r(c.data)})}catch(r){const p=s(null==r?void 0:r.code);m({error:i(r),code:p,severity:o.ERROR})}finally{c()}};export{p as m}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as t}from"./p-CMB3sNMT.js";import"./p-Cjcsf8ku.js";import"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const e=t();class o{async fetchCheckout(t,o){return e.get({endpoint:`checkouts/${o}`,authToken:t})}async fetchCheckouts(t,o,s){return e.get({endpoint:"checkouts",params:s,headers:{Account:t},authToken:o})}async complete(t,o,s){const c=`checkouts/${o}/complete`,n={payment_mode:s.payment_mode};return s.payment_token&&(n.payment_token=s.payment_token),e.post({endpoint:c,body:n,authToken:t})}}export{o as C}
|