@justifi/webcomponents 6.4.3 → 6.5.0-rc.1
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/{Refund-BnhHNKLz.js → GooglePay-D3zN44IX.js} +415 -0
- package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +8 -7
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business.service-DIlSj5KT.js → business.service-88yKWtbE.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-CnAkXgrN.js → check-pkg-version-DV1hwzA2.js} +2 -2
- package/dist/cjs/{checkout.service-Ce0F8cOf.js → checkout.service-Cj1RxduX.js} +1 -1
- package/dist/cjs/checkouts-list-core.cjs.entry.js +3 -2
- package/dist/cjs/custom-popper.cjs.entry.js +2 -2
- package/dist/cjs/{dispute.service-DuYeSUgK.js → dispute.service-AXzLxuOs.js} +1 -1
- package/dist/cjs/form-alert_5.cjs.entry.js +6 -6
- 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-monetary-provisioning.cjs.entry.js +2 -2
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number-masked_3.cjs.entry.js +4 -4
- package/dist/cjs/form-control-number.cjs.entry.js +2 -2
- package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
- package/dist/cjs/form-control-select_3.cjs.entry.js +4 -4
- package/dist/cjs/{get-payment-details-vVIxYblm.js → get-payment-details-DVBTf7h5.js} +2 -2
- package/dist/cjs/{get-subaccounts-yo2pT61R.js → get-subaccounts-DuYNs7Ny.js} +2 -2
- 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/{index-C2ITzalN.js → index-CajjbB9t.js} +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +23 -24
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +6 -5
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +12 -11
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
- package/dist/cjs/{justifi-apple-pay_7.cjs.entry.js → justifi-apple-pay_8.cjs.entry.js} +903 -253
- package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +5 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +5 -4
- package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkout.cjs.entry.js +14 -15
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +9 -8
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +8 -7
- package/dist/cjs/justifi-details.cjs.entry.js +1 -1
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +6 -5
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +9 -8
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -3
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -9
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +7 -6
- package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -6
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -6
- package/dist/cjs/justifi-payout-details.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -6
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +8 -7
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +10 -9
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +7 -8
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +12 -11
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +7 -6
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +8 -7
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -7
- package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-CfJO8jEa.js → package-MS7_CYge.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +3 -3
- package/dist/cjs/payment-details-core.cjs.entry.js +11 -10
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-DLvoJ2K6.js → payment.service-7Ayen6ud.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +3 -2
- package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
- package/dist/cjs/{payout.service-CrBp8aru.js → payout.service-6PsVtHcu.js} +1 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +3 -2
- package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +4 -3
- package/dist/cjs/{terminal-orders-table-8PxObvu8.js → terminal-orders-table-BQXO4z_E.js} +3 -3
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-D0fIw59V.js → terminal.service-DgE2p1j0.js} +1 -1
- package/dist/cjs/terminals-list-core.cjs.entry.js +3 -2
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/GooglePay.js +181 -0
- package/dist/collection/api/index.js +2 -0
- package/dist/collection/api/services/google-pay.service.js +240 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +7 -6
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +8 -7
- package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +7 -6
- package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +1 -1
- package/dist/collection/components/business-forms/owner-form/owner-form-core.js +1 -1
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +8 -7
- package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-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/bank-account/business-bank-account-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.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/business-representative/business-representative-form-step.js +1 -1
- 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/form-control-monetary-provisioning.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +1 -1
- 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/payment-provisioning.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/card-form/card-form.js +2 -2
- package/dist/collection/components/checkout/checkout.js +2 -2
- package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout/saved-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 +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management.js +1 -1
- package/dist/collection/components/dispute-management/dispute-notification.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/customer-details.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/dispute-response.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
- 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/ModularCheckout.js +1 -0
- package/dist/collection/components/modular-checkout/modular-checkout.js +46 -9
- package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/google-pay-skeleton.js +10 -0
- package/dist/collection/components/modular-checkout/sub-components/google-pay.js +609 -0
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
- package/dist/collection/components/order-terminals/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/payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/payments-list-core.js +1 -1
- package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/payments-list.js +1 -1
- package/dist/collection/components/payout-details/payout-details-core.js +3 -3
- package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/payouts-list.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
- package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list.js +1 -1
- package/dist/collection/components/tokenize-payment-method/internal-tokenize-payment-method.js +3 -4
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +5 -10
- package/dist/collection/store/checkout.store.js +4 -0
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/details/details.js +1 -1
- 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/google-pay-button.js +255 -0
- package/dist/collection/ui-components/pagination-menu/pagination-menu.js +3 -3
- 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-radio-list-item.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/docs.json +567 -119
- package/dist/esm/{Refund-L_muwEAh.js → GooglePay-ChLgDgG7.js} +405 -1
- package/dist/esm/bank-account-document-form-inputs_6.entry.js +8 -7
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/{business.service-CaEVmi4X.js → business.service-C0JaOBMs.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-DrJd3vkn.js → check-pkg-version-BQxLpn00.js} +2 -2
- package/dist/esm/{checkout.service-BpaVN1_f.js → checkout.service-gxuAcx_d.js} +1 -1
- package/dist/esm/checkouts-list-core.entry.js +3 -2
- package/dist/esm/custom-popper.entry.js +2 -2
- package/dist/esm/{dispute.service-Dq1SPI2m.js → dispute.service-DmYLDaWO.js} +1 -1
- package/dist/esm/form-alert_5.entry.js +6 -6
- 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-monetary-provisioning.entry.js +2 -2
- package/dist/esm/form-control-monetary.entry.js +2 -2
- package/dist/esm/form-control-number-masked_3.entry.js +4 -4
- package/dist/esm/form-control-number.entry.js +2 -2
- package/dist/esm/form-control-radio.entry.js +2 -2
- package/dist/esm/form-control-select_3.entry.js +4 -4
- package/dist/esm/{get-payment-details-C2YiQBG7.js → get-payment-details-CJ6fHbft.js} +1 -1
- package/dist/esm/{get-subaccounts-Cjz3-2D3.js → get-subaccounts-3zYjlgWb.js} +1 -1
- package/dist/esm/gross-payment-chart-core.entry.js +1 -1
- package/dist/esm/hidden-input_2.entry.js +5 -5
- package/dist/esm/{index-DCIW8z1f.js → index-DkoufM1t.js} +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal-tokenize-payment-method_7.entry.js +12 -13
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +2 -1
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +12 -11
- package/dist/esm/justifi-additional-statement_8.entry.js +8 -8
- package/dist/esm/{justifi-apple-pay_7.entry.js → justifi-apple-pay_8.entry.js} +786 -137
- package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +5 -4
- package/dist/esm/justifi-business-form.entry.js +5 -4
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
- package/dist/esm/justifi-checkout.entry.js +7 -8
- package/dist/esm/justifi-checkouts-list-filters.entry.js +3 -2
- package/dist/esm/justifi-checkouts-list.entry.js +7 -6
- package/dist/esm/justifi-details.entry.js +1 -1
- package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
- package/dist/esm/justifi-dispute-management.entry.js +6 -5
- package/dist/esm/justifi-dispute-notification_3.entry.js +9 -8
- package/dist/esm/justifi-gross-payment-chart.entry.js +4 -3
- package/dist/esm/justifi-order-terminals.entry.js +7 -6
- package/dist/esm/justifi-owner-form_3.entry.js +7 -6
- package/dist/esm/justifi-payment-details.entry.js +6 -5
- package/dist/esm/justifi-payment-provisioning-core.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +6 -5
- package/dist/esm/justifi-payment-transactions-list.entry.js +6 -5
- package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +6 -5
- package/dist/esm/justifi-payout-details.entry.js +5 -4
- package/dist/esm/justifi-payout-transactions-list.entry.js +6 -5
- package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +7 -6
- package/dist/esm/justifi-refund-payment.entry.js +6 -5
- package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -5
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +4 -3
- package/dist/esm/justifi-terminal-orders-list.entry.js +6 -5
- package/dist/esm/justifi-terminals-list-filters.entry.js +3 -2
- package/dist/esm/justifi-terminals-list.entry.js +7 -6
- package/dist/esm/justifi-tokenize-payment-method.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-DUwyoa82.js → package-CYxDR985.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +3 -3
- package/dist/esm/payment-details-core.entry.js +10 -9
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment.service-4wGt-zDW.js → payment.service-CtzbcN40.js} +1 -1
- package/dist/esm/payments-list-core.entry.js +3 -2
- package/dist/esm/payout-details-core.entry.js +3 -3
- package/dist/esm/{payout.service-BYigYrQu.js → payout.service-BSepoyj1.js} +1 -1
- package/dist/esm/payouts-list-core.entry.js +3 -2
- package/dist/esm/table-filters-menu.entry.js +1 -1
- package/dist/esm/terminal-orders-list-core.entry.js +4 -3
- package/dist/esm/{terminal-orders-table-CMWBIr9y.js → terminal-orders-table-BDQyyZp2.js} +1 -1
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/{terminal.service-RAu777Qf.js → terminal.service-DFPVyp0k.js} +1 -1
- package/dist/esm/terminals-list-core.entry.js +3 -2
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Analytics.js +2 -0
- package/dist/module/ApplePay.js +121 -0
- package/dist/module/GooglePay.js +184 -0
- package/dist/module/ModularCheckout.js +1 -0
- package/dist/module/additional-questions.js +2 -2
- package/dist/module/additional-statement.js +1 -1
- package/dist/module/apple-pay.js +1 -120
- package/dist/module/bank-account-billing-form-simple.js +1 -1
- package/dist/module/bank-account-document-inputs.js +3 -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-form.js +2 -2
- package/dist/module/bank-account-read-only-value2.js +1 -1
- package/dist/module/bank-account.js +2 -2
- package/dist/module/business-additional-questions-form-step.js +1 -1
- package/dist/module/business-bank-account-form-step-core.js +2 -0
- package/dist/module/business-bank-account-form-step.js +3 -1
- package/dist/module/business-core-info-form-step.js +1 -1
- package/dist/module/business-core-info.js +2 -2
- package/dist/module/business-owners-form-step.js +1 -1
- package/dist/module/business-representative-form-inputs.js +2 -2
- package/dist/module/business-representative-form-step.js +1 -1
- package/dist/module/business-representative.js +3 -3
- package/dist/module/business-terms-conditions-form-step.js +3 -1
- package/dist/module/business.service.js +2 -0
- package/dist/module/cancellation-policy.js +1 -1
- package/dist/module/card-billing-form-simple.js +1 -1
- package/dist/module/card-form.js +2 -2
- package/dist/module/card-form2.js +2 -2
- package/dist/module/checkout.service.js +2 -0
- package/dist/module/checkout.store.js +4 -0
- package/dist/module/checkouts-list-core2.js +3 -1
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/customer-details.js +1 -1
- package/dist/module/details.js +1 -1
- package/dist/module/dispute-management-core.js +1 -1
- package/dist/module/dispute-notification.js +2 -2
- package/dist/module/dispute-response-actions.js +2 -0
- package/dist/module/dispute-response-core.js +1 -1
- package/dist/module/dispute-response.js +1 -1
- package/dist/module/duplicate-charge.js +1 -1
- package/dist/module/electronic-evidence.js +1 -1
- package/dist/module/form-address-fields.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-monetary-provisioning2.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-number.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/get-payment-details.js +2 -0
- package/dist/module/get-subaccounts.js +2 -0
- package/dist/module/google-pay.js +785 -0
- package/dist/module/gross-payment-chart-core2.js +1 -1
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/identity-address-form.js +1 -1
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/internal-tokenize-payment-method2.js +3 -1
- package/dist/module/justifi-business-form.js +2 -0
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-checkout.js +46 -40
- package/dist/module/justifi-checkouts-list-filters.js +3 -1
- package/dist/module/justifi-checkouts-list.js +3 -1
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-google-pay.d.ts +11 -0
- package/dist/module/justifi-google-pay.js +6 -0
- package/dist/module/justifi-gross-payment-chart.js +2 -0
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-order-terminals.js +3 -1
- package/dist/module/justifi-payment-provisioning.js +3 -1
- package/dist/module/justifi-payment-transactions-list.js +3 -1
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +3 -1
- package/dist/module/justifi-payout-details.js +2 -0
- package/dist/module/justifi-payout-transactions-list.js +3 -1
- package/dist/module/justifi-payouts-list-filters.js +2 -2
- package/dist/module/justifi-payouts-list.js +3 -1
- package/dist/module/justifi-radio-list-item2.js +1 -1
- package/dist/module/justifi-refund-payment.js +2 -0
- package/dist/module/justifi-saved-payment-method.js +1 -1
- package/dist/module/justifi-season-interruption-insurance.js +2 -0
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +4 -2
- package/dist/module/justifi-terminal-orders-list.js +3 -1
- package/dist/module/justifi-terminals-list-filters.js +3 -1
- package/dist/module/justifi-terminals-list.js +3 -1
- package/dist/module/justifi-tokenize-payment-method.js +1 -1
- package/dist/module/legal-address-form-step.js +1 -1
- package/dist/module/legal-address-form.js +2 -2
- package/dist/module/modular-checkout.js +46 -6
- package/dist/module/owner-form-core2.js +1 -1
- package/dist/module/owner-form-inputs2.js +3 -3
- package/dist/module/owner-form.js +1 -1
- package/dist/module/package.js +1 -1
- package/dist/module/pagination-menu2.js +3 -3
- package/dist/module/payment-details-core2.js +10 -8
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/payment-provisioning-core.js +1 -1
- package/dist/module/payment-provisioning-form-buttons.js +1 -1
- package/dist/module/payment-provisioning-form-steps.js +1 -1
- package/dist/module/payment.service.js +2 -0
- package/dist/module/payments-list-core2.js +3 -1
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payout.service.js +2 -0
- package/dist/module/payouts-list-core2.js +3 -1
- package/dist/module/plaid.service.js +2 -0
- package/dist/module/product-or-service.js +1 -1
- package/dist/module/refund-policy.js +1 -1
- package/dist/module/save-new-payment-method.js +1 -1
- package/dist/module/shipping-details.js +1 -1
- package/dist/module/summary.js +1 -1
- package/dist/module/table-filters-menu2.js +1 -1
- package/dist/module/terminal-orders-list-core2.js +3 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/module/terminal.service.js +2 -0
- package/dist/module/terminals-list-core2.js +3 -1
- package/dist/types/api/Checkout.d.ts +2 -0
- package/dist/types/api/GooglePay.d.ts +271 -0
- package/dist/types/api/index.d.ts +2 -0
- package/dist/types/api/services/google-pay.service.d.ts +60 -0
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +3 -3
- package/dist/types/components/checkout/checkout.d.ts +1 -0
- package/dist/types/components/modular-checkout/ModularCheckout.d.ts +2 -1
- package/dist/types/components/modular-checkout/modular-checkout.d.ts +5 -0
- package/dist/types/components/modular-checkout/sub-components/google-pay-skeleton.d.ts +6 -0
- package/dist/types/components/modular-checkout/sub-components/google-pay.d.ts +59 -0
- package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +1 -1
- package/dist/types/components.d.ts +160 -22
- package/dist/types/store/checkout.store.d.ts +1 -0
- package/dist/types/ui-components/google-pay-button.d.ts +18 -0
- package/dist/webcomponents/index.esm.js +1 -1
- package/dist/webcomponents/p-032ee5b7.entry.js +1 -0
- package/dist/webcomponents/{p-aec9185f.entry.js → p-03c8c754.entry.js} +1 -1
- package/dist/webcomponents/p-0772719b.entry.js +1 -0
- package/dist/webcomponents/p-0c7db215.entry.js +1 -0
- package/dist/webcomponents/p-136b29e3.entry.js +1 -0
- package/dist/webcomponents/{p-1193a1ac.entry.js → p-19dabeab.entry.js} +1 -1
- package/dist/webcomponents/p-19ea1354.entry.js +1 -0
- package/dist/webcomponents/p-1ce0e372.entry.js +1 -0
- package/dist/webcomponents/p-1f196690.entry.js +1 -0
- package/dist/webcomponents/{p-800660f2.entry.js → p-270bf699.entry.js} +1 -1
- package/dist/webcomponents/{p-e23219c6.entry.js → p-2a14111e.entry.js} +1 -1
- package/dist/webcomponents/p-2aa04490.entry.js +1 -0
- package/dist/webcomponents/p-2da4e6ca.entry.js +1 -0
- package/dist/webcomponents/p-2eb123a3.entry.js +1 -0
- package/dist/webcomponents/p-34a87967.entry.js +1 -0
- package/dist/webcomponents/p-36ad1db9.entry.js +1 -0
- package/dist/webcomponents/p-383f8a27.entry.js +1 -0
- package/dist/webcomponents/p-3ac5ab7e.entry.js +1 -0
- package/dist/webcomponents/p-3ad906c1.entry.js +1 -0
- package/dist/webcomponents/p-3ae12b98.entry.js +1 -0
- package/dist/webcomponents/{p-58ae4f9e.entry.js → p-3bacf834.entry.js} +1 -1
- package/dist/webcomponents/p-4040df88.entry.js +1 -0
- package/dist/webcomponents/{p-e2e6c201.entry.js → p-48d1bc83.entry.js} +1 -1
- package/dist/webcomponents/{p-af48a6bb.entry.js → p-4e71de94.entry.js} +1 -1
- package/dist/webcomponents/p-4f102cfd.entry.js +1 -0
- package/dist/webcomponents/p-5ac8f679.entry.js +1 -0
- package/dist/webcomponents/p-5ba28ff0.entry.js +1 -0
- package/dist/webcomponents/p-6794a435.entry.js +1 -0
- package/dist/webcomponents/{p-CxPieTnF.js → p-7SgMy3r5.js} +1 -1
- package/dist/webcomponents/p-81c1ebd3.entry.js +1 -0
- package/dist/webcomponents/p-8332592a.entry.js +1 -0
- package/dist/webcomponents/p-849ad4d3.entry.js +1 -0
- package/dist/webcomponents/{p-1edec396.entry.js → p-86111a0a.entry.js} +1 -1
- package/dist/webcomponents/p-8b6b7e20.entry.js +1 -0
- package/dist/webcomponents/p-8fcd277c.entry.js +1 -0
- package/dist/webcomponents/p-914b590d.entry.js +1 -0
- package/dist/webcomponents/p-9a3225e2.entry.js +1 -0
- package/dist/webcomponents/{p-BItPr6Gj.js → p-B-9GGR7s.js} +1 -1
- package/dist/webcomponents/p-Boe55CYS.js +1 -0
- package/dist/webcomponents/{p-Do561C8g.js → p-BusXmwDe.js} +1 -1
- package/dist/webcomponents/{p-C9_8N76_.js → p-ByJiG6HY.js} +1 -1
- package/dist/webcomponents/p-CQsNLuzi.js +1 -0
- package/dist/webcomponents/{p-XqsvHFg_.js → p-CUkHRggn.js} +1 -1
- package/dist/webcomponents/p-CYxDR985.js +1 -0
- package/dist/webcomponents/{p-ZrJKEEoy.js → p-DELUWNSY.js} +1 -1
- package/dist/webcomponents/{p-wYnnDDuR.js → p-DjhbNep7.js} +1 -1
- package/dist/webcomponents/p-DkoufM1t.js +1 -0
- package/dist/webcomponents/{p-CriWtqRc.js → p-Ds2u5A8P.js} +1 -1
- package/dist/webcomponents/{p-jTVpG8Gt.js → p-E0ZPuuI7.js} +1 -1
- package/dist/webcomponents/p-a020c889.entry.js +1 -0
- package/dist/webcomponents/{p-0082f428.entry.js → p-a22d1078.entry.js} +1 -1
- package/dist/webcomponents/p-a6e816f6.entry.js +1 -0
- package/dist/webcomponents/{p-8681f258.entry.js → p-aaed4997.entry.js} +1 -1
- package/dist/webcomponents/p-ad9307c1.entry.js +1 -0
- package/dist/webcomponents/p-b46223fa.entry.js +1 -0
- package/dist/webcomponents/p-ba76226e.entry.js +1 -0
- package/dist/webcomponents/p-be3caaf8.entry.js +1 -0
- package/dist/webcomponents/p-c11f5079.entry.js +1 -0
- package/dist/webcomponents/p-c41191e7.entry.js +1 -0
- package/dist/webcomponents/p-c4c1c6d4.entry.js +1 -0
- package/dist/webcomponents/p-c621e7af.entry.js +1 -0
- package/dist/webcomponents/p-c8d15694.entry.js +1 -0
- package/dist/webcomponents/p-d13edf9f.entry.js +1 -0
- package/dist/webcomponents/p-d36351e9.entry.js +1 -0
- package/dist/webcomponents/p-d4738115.entry.js +1 -0
- package/dist/webcomponents/p-d913cb6b.entry.js +1 -0
- package/dist/webcomponents/p-dd0ac112.entry.js +1 -0
- package/dist/webcomponents/p-dd75958b.entry.js +1 -0
- package/dist/webcomponents/{p-2769f945.entry.js → p-e6507b93.entry.js} +1 -1
- package/dist/webcomponents/{p-ed55d333.entry.js → p-e7e5fee9.entry.js} +1 -1
- package/dist/webcomponents/{p-4e23116c.entry.js → p-f2650bfc.entry.js} +1 -1
- package/dist/webcomponents/p-f2a03f5d.entry.js +1 -0
- package/dist/webcomponents/p-f4cb581f.entry.js +1 -0
- package/dist/webcomponents/p-f528da70.entry.js +1 -0
- package/dist/webcomponents/p-f632894a.entry.js +1 -0
- package/dist/webcomponents/{p-9f70ce93.entry.js → p-fe862786.entry.js} +1 -1
- package/dist/webcomponents/p-ff2e2879.entry.js +1 -0
- package/dist/webcomponents/p-ffed8f86.entry.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +13 -13
- package/LICENSE +0 -21
- package/dist/cjs/checkout.store-BA6h-dp2.js +0 -107
- package/dist/esm/checkout.store-CaS_htQd.js +0 -101
- package/dist/webcomponents/p-087a81ff.entry.js +0 -1
- package/dist/webcomponents/p-1242bbf1.entry.js +0 -1
- package/dist/webcomponents/p-14d2f6c6.entry.js +0 -1
- package/dist/webcomponents/p-170700b1.entry.js +0 -1
- package/dist/webcomponents/p-1939d1e3.entry.js +0 -1
- package/dist/webcomponents/p-20a8b0c0.entry.js +0 -1
- package/dist/webcomponents/p-22f74666.entry.js +0 -1
- package/dist/webcomponents/p-30f61f44.entry.js +0 -1
- package/dist/webcomponents/p-3b49fc33.entry.js +0 -1
- package/dist/webcomponents/p-3c38cec5.entry.js +0 -1
- package/dist/webcomponents/p-45936490.entry.js +0 -1
- package/dist/webcomponents/p-4761e0aa.entry.js +0 -1
- package/dist/webcomponents/p-4c3eea2b.entry.js +0 -1
- package/dist/webcomponents/p-4da3e157.entry.js +0 -1
- package/dist/webcomponents/p-4dcbc0af.entry.js +0 -1
- package/dist/webcomponents/p-58dee174.entry.js +0 -1
- package/dist/webcomponents/p-69195676.entry.js +0 -1
- package/dist/webcomponents/p-716ddc27.entry.js +0 -1
- package/dist/webcomponents/p-7218c312.entry.js +0 -1
- package/dist/webcomponents/p-75c65531.entry.js +0 -1
- package/dist/webcomponents/p-8432a466.entry.js +0 -1
- package/dist/webcomponents/p-84a44362.entry.js +0 -1
- package/dist/webcomponents/p-84e2bd93.entry.js +0 -1
- package/dist/webcomponents/p-89518b26.entry.js +0 -1
- package/dist/webcomponents/p-8b2026d3.entry.js +0 -1
- package/dist/webcomponents/p-9d914297.entry.js +0 -1
- package/dist/webcomponents/p-CPKSE7M4.js +0 -1
- package/dist/webcomponents/p-D0YDz3L6.js +0 -1
- package/dist/webcomponents/p-DCIW8z1f.js +0 -1
- package/dist/webcomponents/p-DU8dqq9U.js +0 -1
- package/dist/webcomponents/p-DUwyoa82.js +0 -1
- package/dist/webcomponents/p-a655b996.entry.js +0 -1
- package/dist/webcomponents/p-a8f7cf9b.entry.js +0 -1
- package/dist/webcomponents/p-aa51df2c.entry.js +0 -1
- package/dist/webcomponents/p-ae7a027b.entry.js +0 -1
- package/dist/webcomponents/p-b4d8a3f6.entry.js +0 -1
- package/dist/webcomponents/p-bd73fba1.entry.js +0 -1
- package/dist/webcomponents/p-c1831747.entry.js +0 -1
- package/dist/webcomponents/p-c3b71a1f.entry.js +0 -1
- package/dist/webcomponents/p-c7279bc6.entry.js +0 -1
- package/dist/webcomponents/p-c7bfea00.entry.js +0 -1
- package/dist/webcomponents/p-c7f2cf51.entry.js +0 -1
- package/dist/webcomponents/p-c988bd84.entry.js +0 -1
- package/dist/webcomponents/p-cef213c3.entry.js +0 -1
- package/dist/webcomponents/p-d4b8274f.entry.js +0 -1
- package/dist/webcomponents/p-db651f27.entry.js +0 -1
- package/dist/webcomponents/p-dc0d3484.entry.js +0 -1
- package/dist/webcomponents/p-def857b8.entry.js +0 -1
- package/dist/webcomponents/p-df0e5377.entry.js +0 -1
- package/dist/webcomponents/p-e5caab42.entry.js +0 -1
- package/dist/webcomponents/p-eb56ba9b.entry.js +0 -1
- package/dist/webcomponents/p-edcb84bf.entry.js +0 -1
- package/dist/webcomponents/p-f1af630f.entry.js +0 -1
- package/dist/webcomponents/p-f5fb1af2.entry.js +0 -1
- package/dist/webcomponents/p-fab28b02.entry.js +0 -1
- package/dist/webcomponents/p-ff968ab6.entry.js +0 -1
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { c as createStore } from './index-B-fWxE5e.js';
|
|
2
|
-
import { P as PAYMENT_METHODS } from './index-DCIW8z1f.js';
|
|
3
|
-
|
|
4
|
-
const initialState = {
|
|
5
|
-
accountId: '',
|
|
6
|
-
authToken: '',
|
|
7
|
-
billingFormFields: {
|
|
8
|
-
address_postal_code: '',
|
|
9
|
-
},
|
|
10
|
-
bnplEnabled: false,
|
|
11
|
-
applePayEnabled: false,
|
|
12
|
-
insuranceEnabled: false,
|
|
13
|
-
bnplProviderApiVersion: '',
|
|
14
|
-
bnplProviderCheckoutUrl: '',
|
|
15
|
-
bnplProviderClientId: '',
|
|
16
|
-
bnplProviderMode: '',
|
|
17
|
-
checkoutId: '',
|
|
18
|
-
checkoutLoaded: false,
|
|
19
|
-
bankAccountVerification: undefined,
|
|
20
|
-
disableBankAccount: false,
|
|
21
|
-
disableCreditCard: false,
|
|
22
|
-
disablePaymentMethodGroup: false,
|
|
23
|
-
paymentAmount: 0,
|
|
24
|
-
paymentCurrency: 'USD',
|
|
25
|
-
paymentDescription: '',
|
|
26
|
-
paymentMethodGroupId: undefined,
|
|
27
|
-
paymentMethods: [],
|
|
28
|
-
paymentToken: undefined,
|
|
29
|
-
savePaymentMethod: false,
|
|
30
|
-
selectedPaymentMethod: undefined,
|
|
31
|
-
totalAmount: 0,
|
|
32
|
-
plaidPublicToken: undefined,
|
|
33
|
-
plaidLinkTokenId: undefined,
|
|
34
|
-
};
|
|
35
|
-
const { state: checkoutStore, onChange } = createStore(initialState);
|
|
36
|
-
Object.keys(initialState).forEach((key) => {
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
onChange(key, (newValue) => {
|
|
39
|
-
checkoutStore[key] = newValue;
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
// Helper: compute available payment methods based on store flags
|
|
43
|
-
function getAvailablePaymentMethodTypes() {
|
|
44
|
-
var _a;
|
|
45
|
-
const methods = [];
|
|
46
|
-
if (!checkoutStore.disablePaymentMethodGroup &&
|
|
47
|
-
((_a = checkoutStore.paymentMethods) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
48
|
-
const hasSavedCard = checkoutStore.paymentMethods.some((pm) => pm.type === PAYMENT_METHODS.SAVED_CARD);
|
|
49
|
-
const hasSavedBank = checkoutStore.paymentMethods.some((pm) => pm.type === PAYMENT_METHODS.SAVED_BANK_ACCOUNT);
|
|
50
|
-
if (hasSavedCard && !checkoutStore.disableCreditCard) {
|
|
51
|
-
methods.push(PAYMENT_METHODS.SAVED_CARD);
|
|
52
|
-
}
|
|
53
|
-
if (hasSavedBank && !checkoutStore.disableBankAccount) {
|
|
54
|
-
methods.push(PAYMENT_METHODS.SAVED_BANK_ACCOUNT);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
if (!checkoutStore.disableCreditCard) {
|
|
58
|
-
methods.push(PAYMENT_METHODS.NEW_CARD);
|
|
59
|
-
}
|
|
60
|
-
if (!checkoutStore.disableBankAccount) {
|
|
61
|
-
methods.push(PAYMENT_METHODS.NEW_BANK_ACCOUNT);
|
|
62
|
-
}
|
|
63
|
-
if (checkoutStore.bnplEnabled) {
|
|
64
|
-
methods.push(PAYMENT_METHODS.SEZZLE);
|
|
65
|
-
}
|
|
66
|
-
if (checkoutStore.applePayEnabled) {
|
|
67
|
-
methods.push(PAYMENT_METHODS.APPLE_PAY);
|
|
68
|
-
}
|
|
69
|
-
if (checkoutStore.bankAccountVerification === true &&
|
|
70
|
-
!checkoutStore.disableBankAccount) {
|
|
71
|
-
methods.push(PAYMENT_METHODS.PLAID);
|
|
72
|
-
}
|
|
73
|
-
return methods;
|
|
74
|
-
}
|
|
75
|
-
function getCheckoutState() {
|
|
76
|
-
var _a;
|
|
77
|
-
return {
|
|
78
|
-
selectedPaymentMethod: checkoutStore.selectedPaymentMethod,
|
|
79
|
-
paymentAmount: checkoutStore.paymentAmount,
|
|
80
|
-
totalAmount: checkoutStore.totalAmount,
|
|
81
|
-
paymentCurrency: checkoutStore.paymentCurrency,
|
|
82
|
-
paymentDescription: checkoutStore.paymentDescription,
|
|
83
|
-
savedPaymentMethods: checkoutStore.paymentMethods,
|
|
84
|
-
savePaymentMethod: checkoutStore.savePaymentMethod,
|
|
85
|
-
bnplEnabled: checkoutStore.bnplEnabled,
|
|
86
|
-
applePayEnabled: checkoutStore.applePayEnabled,
|
|
87
|
-
insuranceEnabled: checkoutStore.insuranceEnabled,
|
|
88
|
-
disableBankAccount: checkoutStore.disableBankAccount,
|
|
89
|
-
disableCreditCard: checkoutStore.disableCreditCard,
|
|
90
|
-
disablePaymentMethodGroup: checkoutStore.disablePaymentMethodGroup,
|
|
91
|
-
paymentToken: (_a = checkoutStore.paymentToken) !== null && _a !== void 0 ? _a : undefined,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
function onAnyChange(callback) {
|
|
95
|
-
Object.keys(initialState).forEach((key) => {
|
|
96
|
-
// @ts-ignore - onChange is generically typed by stencil/store but not exported here
|
|
97
|
-
onChange(key, (newValue) => callback(key, newValue));
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export { getCheckoutState as a, onChange as b, checkoutStore as c, getAvailablePaymentMethodTypes as g, onAnyChange as o };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,r as s,c as e}from"./p-DwYM91AU.js";import{a as i,c as r,b as o}from"./p-dgG_o6wN.js";import{F as n,c as a,a as h,b as l}from"./p-DiJD6Iqx.js";import{A as c,C as d,e as u,R as m,f as p}from"./p-B5rtFhtR.js";import{C as f,P as b}from"./p-CVaOFfrI.js";import{G as v,l as y,U as g,_}from"./p-wtuY7MT2.js";import{S as w}from"./p-c7MCfTgE.js";import"./p-CZfYo5-1.js";import{b as j,r as x,s as O,c as k}from"./p-CPpUGsw5.js";import{a as S,B as C}from"./p-XYgDHrVL.js";import{E as T,l as E,m as D}from"./p-CPKSE7M4.js";import{C as L,D as H,y as B,E as P,F as V,G as A,H as W}from"./p-avgjSJ1d.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as I,a as F}from"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{c as U}from"./p-DfKxeSrC.js";import{B as q}from"./p-Bqlcv3ZV.js";import{d as Y,e as G}from"./p-D1WQG4I7.js";import"./p-BFTU3MAI.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";class M{constructor(t){this.id=t.id,this.account_owner_name=t.account_owner_name,this.full_name=t.full_name,this.account_type=t.account_type,this.account_number=t.account_number,this.acct_last_four=t.acct_last_four,this.account_number_last4=t.account_number_last4,this.routing_number=t.routing_number,this.institution_number=t.institution_number,this.transit_number=t.transit_number,this.bank_name=t.bank_name,this.country=t.country,this.currency=t.currency,this.nickname=t.nickname,this.metadata=t.metadata,this.business_id=t.business_id,this.platform_account_id=t.platform_account_id,this.created_at=t.created_at,this.updated_at=t.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 R=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"25%"})),t("div",{class:"col-12"},t(w,{width:"100%"})),t("div",{class:"col-12 d-flex gap-3"},t(w,{width:"50%"}),t(w,{width:"50%"})),t("div",{class:"col-12 d-flex gap-3"},t(w,{width:"65%"}),t(w,{width:"35%"}))),N=()=>t("div",{class:"row gap-5"},t("div",{class:"col-12"},t(w,{width:"40%",height:"40px"})),t(R,null),t(R,null),t(R,null)),X=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.additional_questions=new c(t.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:S.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s})),this.additional_questions=new c(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}recurringPaymentsWatcher(t){this.recurringPayments="Yes"===(null==t?void 0:t.business_recurring_payments)}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{additional_questions:new c(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new n(i(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e,i,r,o,n,a;const h=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Additional Questions"),t("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12 col-md-6"},t("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==h?void 0:h.business_revenue,maskOptions:f.WHOLE})),t("div",{class:"col-12 col-md-6"},t("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===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==h?void 0:h.business_payment_volume,maskOptions:f.WHOLE})),t("div",{class:"col-12"},t("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===(i=this.errors)||void 0===i?void 0:i.business_when_service_received,options:j,defaultValue:null==h?void 0:h.business_when_service_received})),t("div",{class:"col-12"},t("form-control-select",{name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_recurring_payments,options:x,defaultValue:null==h?void 0:h.business_recurring_payments})),t("div",{class:"col-12",hidden:!this.recurringPayments},t("form-control-text",{name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(o=this.errors)||void 0===o?void 0:o.business_recurring_payments_percentage,defaultValue:null==h?void 0:h.business_recurring_payments_percentage,helpText:"For example: 50% monthly, 50% annual."})),t("div",{class:"col-12"},t("form-control-select",{name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_seasonal,options:O,defaultValue:null==h?void 0:h.business_seasonal})),t("div",{class:"col-12"},t("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===(a=this.errors)||void 0===a?void 0:a.business_other_payment_details,defaultValue:null==h?void 0:h.business_other_payment_details})))))}static get watchers(){return{additional_questions:["recurringPaymentsWatcher"]}}},J=(t,s)=>t.some((t=>t.document_type===s)),Q=t=>t?{bank_name:V.nullable(),nickname:P.nullable(),account_owner_name:B.nullable(),account_type:H.nullable(),account_number:L.nullable()}:{bank_name:V.required("Enter bank name"),nickname:P.required("Enter nickname"),account_owner_name:B.required("Enter account owner name"),account_type:H.required("Select account type"),account_number:L.required("Enter account number")},K=(t,s)=>{if(s)return{voided_check:l().nullable(),bank_statement:l().nullable()};const e=J(t,T.voidedCheck),i=J(t,T.bankStatement),r=e||i,o="Please upload either a voided check or a bank statement. Only one is required.";return{voided_check:l().when("bank_statement",{is:t=>!t&&!r,then:t=>t.required(o),otherwise:t=>t.notRequired()}),bank_statement:l().when("voided_check",{is:t=>!t&&!r,then:t=>t.required(o),otherwise:t=>t.notRequired()})}},Z={[d.USA]:(t,s=[])=>((t,s)=>{const e=Object.assign(Object.assign(Object.assign({},Q(s)),(t=>t?{routing_number:W.nullable()}:{routing_number:W.required("Enter routing number")})(s)),K(t,s));return a().shape(e,[["voided_check","bank_statement"]])})(s,t),[d.CAN]:(t,s=[])=>((t,s)=>{const e=Object.assign(Object.assign(Object.assign({},Q(s)),(t=>{const s=h().length(3,"Institution number must be 3 digits").matches(A,"Enter valid institution number"),e=h().length(5,"Transit number must be 5 digits").matches(A,"Enter valid transit number");return t?{institution_number:s.nullable(),transit_number:e.nullable()}:{institution_number:s.required("Enter institution number"),transit_number:e.required("Enter transit number")}})(s)),K(t,s));return a().shape(e,[["voided_check","bank_statement"]])})(s,t)},$=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new E,this.isLoading=!1,this.getSchema=()=>(0,Z[this.country])(this.allowOptionalFields,this.existingDocuments),this.initializeFormController=()=>{this.formController=new n(this.getSchema()),this.formController.setInitialValues(Object.assign({},this.bankAccount)),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))},this.storeFiles=t=>{const s=Array.from(t.detail.fileList),e=t.detail.document_type,i=s.map((t=>new D({file:t,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{t.data.bank_accounts.length>0?this.bankAccount=new M(t.data.bank_accounts[0]):(this.bankAccount=new M({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=t.data.documents},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.postDocumentRecordData=async t=>{this.isLoading=!0;const s=t.record_data;return new Promise((e=>{this.postDocumentRecord({payload:s,onSuccess:s=>{e(this.handleDocRecordResponse(t,s))},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({message:t,errorCode:s,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(t,s)=>s.error?(this.errorEvent.emit({errorCode:F.POST_ERROR,message:s.error.message,severity:I.ERROR,data:s.error}),!1):(t.setPresignedUrl(s.data.presigned_url),!0),this.uploadDocument=async t=>{if(!t.presigned_url)throw new Error("Presigned URL is not set");const s=await t.getFileData(),e=await fetch(t.presigned_url,{method:"PUT",body:s});return this.handleUploadResponse(e)},this.handleUploadResponse=t=>!t.error||(this.errorEvent.emit({errorCode:F.POST_ERROR,message:t.error.message,severity:I.ERROR,data:t.error}),!1)}watchHandler(t){this.formLoading.emit(t)}async validateAndSubmit({onSuccess:t}){this.existingBankAccount?this.sendData(t):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new n(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get postPayload(){const t=this.formController.values.getValue();return new M(t).payload}get existingBankAccount(){var t;return!!(null===(t=this.bankAccount)||void 0===t?void 0:t.id)}async sendData(t){try{if(!this.existingBankAccount&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;t()}catch(t){this.errorEvent.emit({message:t,errorCode:F.POST_ERROR,severity:I.ERROR})}}async postBankAccountData(){let t;return this.isLoading=!0,new Promise((s=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:s=>{t=s,e=!0},onError:({error:t,code:s,severity:i})=>{e=!1,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:S.bankAccount}),this.isLoading=!1,s(e)}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const t=Object.values(this.documentData).flat();return!t.length||!(await Promise.all(t.map((t=>this.postDocumentRecordData(t))))).includes(!1)&&!(await Promise.all(t.map((t=>this.uploadDocument(t))))).includes(!1)}finally{this.isLoading=!1}}render(){const s=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",{class:"mb-4"},t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Bank Account Info"),t("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."})),t("hr",{class:"mt-2"}),t(this.country===d.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:s,errors:this.errors,inputHandler:this.inputHandler,formDisabled:this.existingBankAccount})),t("fieldset",{class:"mt-4"},t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Document Uploads"),t("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."})),t("hr",{class:"mt-2"}),t("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),t("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles})))}static get watchers(){return{isLoading:["watchHandler"]}}},z=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.coreInfo={},this.isLoading=!1,this.isEditingTaxId=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.coreInfo=new u(t.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t(),this.isEditingTaxId=!1},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:S.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return new u(this.formController.values.getValue()).payload}componentWillLoad(){const t=this.country===d.CAN?r(this.allowOptionalFields):o(this.allowOptionalFields);this.formController=new n(t),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e;const i=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Business Information")),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("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)."})),t("div",{class:"col-12"},t("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)"})),t("div",{class:"col-12 col-md-8"},t("form-control-select",{name:"classification",label:"Business Classification",options:k,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-4"},t("form-control-date",{name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),t("div",{class:"col-12 col-md-6"},!(null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4)||this.isEditingTaxId?t("form-control-number-masked",{name:"tax_id",label:U[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:U[this.country].taxIdHelpText}):t("div",null,t("label",{class:"form-label",part:y},U[this.country].taxIdLabel),t("div",{class:"input-group mb-3"},t("input",{type:"text",class:"form-control",part:g,value:`****${null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4}`,disabled:!0}),t("button",{class:"btn btn-secondary",type:"button",part:_,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),t("div",{class:"col-12"},t("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."})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-6"},t("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:b.US})))))}},tt=class{constructor(t){s(this,t),this.clickEvent=e(this,"click-event"),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.matchRef=(t,s)=>{const e=this.refs.findIndex((t=>t===s));-1!==e&&(this.refs[e]=t)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{t.data.owners.length?this.ownersPayload=t.data.owners.map((t=>({id:t.id}))):this.addOwnerForm()},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:S.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=t=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],t&&this.clickEvent.emit({name:C.addOwnerForm})},this.removeOwnerForm=t=>{this.ownersPayload=this.ownersPayload.filter((s=>s.id!==t)),this.newFormOpen&&(this.newFormOpen=!1)}}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((t=>t.id))}async validateAndSubmit({onSuccess:t}){const s=this.refs.map((t=>t.validate()));if(!(await Promise.all(s)).every((t=>t)))return;const e=this.refs.map((t=>t.submit()));(await Promise.all(e)).every((t=>t))&&this.sendData(t)}componentWillLoad(){this.getBusiness&&this.getData()}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(t){const s=t.detail,e=this.ownersPayload.map((t=>t.id===s.id?s:t));e.includes(s)||(e[this.ownersPayload.findIndex((t=>!t.id))]=s,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){return this.isLoading?t(N,null):t("div",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Owners"),t("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."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},this.ownersPayload.map((s=>t("justifi-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)})))),t("div",{class:"d-flex justify-content-start"},t("div",{class:"gap-2"},t(q,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner"))))}static get watchers(){return{ownersPayload:["ownersWatcher"]}}},st=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new m(t.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:S.representative}),this.formLoading.emit(!1)}})}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{representative:new m(this.formController.values.getValue()).payload}}componentWillLoad(){this.formController=new n((0,Y[this.country])("representative",this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){return this.isLoading?t(N,null):t("justifi-business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country})}},et=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{const s=new p((t.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},s),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:S.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{legal_address:new p(this.formController.values.getValue()).payload}}componentWillLoad(){this.formController=new n((0,G[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){const s=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Legal Address of your Business"),t("form-control-tooltip",{helpText:"No PO Boxes."})),t("hr",{class:"mt-2"}),t("justifi-form-address-fields",{country:this.country,errors:this.errors,defaultValues:s,inputHandler:this.inputHandler})))}};export{X as justifi_additional_questions_form_step_core,$ as justifi_business_bank_account_form_step_core,z as justifi_business_core_info_form_step_core,tt as justifi_business_owners_form_step_core,st as justifi_business_representative_form_step_core,et as justifi_legal_address_form_step_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as r}from"./p-DwYM91AU.js";import{A as o}from"./p-C8yN3uBj.js";import{C as i,a as e}from"./p-Cjcsf8ku.js";import"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{E as p}from"./p-BNqo3kt0.js";import{c as h,J as c}from"./p-XqsvHFg_.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-wtuY7MT2.js";import"./p-DUwyoa82.js";const m=o();class u{async fetchGrossVolumeChartData(t,s){return m.get({endpoint:`account/${t}/reports/gross_volume`,authToken:s})}}const d=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){h(),this.analytics=new c(this),this.initializeGetGrossPayment()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:t,authToken:s,service:r})=>async({onSuccess:o,onError:e})=>{var p;try{const h=await r.fetchGrossVolumeChartData(t,s);h.error?e({error:n(h.error),code:a(null===(p=h.error)||void 0===p?void 0:p.code),severity:i.ERROR}):o(h.data)}catch(t){const s=a(null==t?void 0:t.code);e({error:n(t),code:s,severity:i.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}render(){return this.errorMessage?p(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_gross_payment_chart}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as s}from"./p-DwYM91AU.js";import{c as i,d as r,e as a}from"./p-5aA7gjr5.js";import{I as o}from"./p-wYnnDDuR.js";import{F as h}from"./p-DiJD6Iqx.js";import{O as n}from"./p-B5rtFhtR.js";import{d as c}from"./p-D1WQG4I7.js";import{B as d}from"./p-Bqlcv3ZV.js";import{W as l,l as f,U as m,_ as b}from"./p-wtuY7MT2.js";import"./p-CZfYo5-1.js";import{B as u}from"./p-XYgDHrVL.js";import{I as p,P as y}from"./p-CVaOFfrI.js";import{u as v,a as j,b as w}from"./p-C77ElQ41.js";import{c as k}from"./p-DfKxeSrC.js";import"./p-Cjcsf8ku.js";import"./p-D2muobcE.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-CPKSE7M4.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BFTU3MAI.js";import"./p-avgjSJ1d.js";import"./p-CPpUGsw5.js";const g=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event")}async validate(){return this.coreComponent.validate()}async submit(){return this.coreComponent.submit()}async validateAndSubmit({onSuccess:t}){this.coreComponent.validateAndSubmit({onSuccess:t})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&(this.getOwner=i({authToken:this.authToken,identityId:this.ownerId,service:new o}),this.patchOwner=r({authToken:this.authToken,identityId:this.ownerId,service:new o}),this.postOwner=a({authToken:this.authToken,service:new o}))}render(){return s("owner-form-core",{key:"d3765b80461f8222189643b378ae5d63886163c3",ownerId:this.ownerId,businessId:this.businessId,getOwner:this.getOwner,patchOwner:this.patchOwner,postOwner:this.postOwner,allowOptionalFields:this.allowOptionalFields,removeOwner:this.removeOwner,newFormOpen:this.newFormOpen,ownersLength:this.ownersLength,country:this.country,ref:t=>this.coreComponent=t})}},x=class{loadingWatcher(){this.formLoading.emit(this.isLoading)}constructor(s){t(this,s),this.clickEvent=e(this,"click-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.ownerSubmitted=e(this,"ownerSubmitted"),this.isLoading=!1,this.errors={},this.owner={},this.getData=()=>{this.isLoading=!0,this.getOwner({onSuccess:t=>{this.instantiateOwner(t.data)},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>this.isLoading=!1})},this.sendData=()=>(this.isLoading=!0,new Promise((t=>{this.ownerId?this.patchOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1}):this.postOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1})}))),this.instantiateOwner=async t=>{this.owner=Object.assign({},new n(t)),await this.formController.setInitialValues(this.owner)},this.handleAddOwner=()=>{this.clickEvent.emit({name:this.ownerId?u.updateOwner:u.addOwner})},this.handleRemoveOwner=()=>{this.removeOwner(this.ownerId),this.clickEvent.emit({name:u.removeOwner})},this.validate=this.validate.bind(this),this.submit=this.submit.bind(this),this.validateAndSubmit=this.validateAndSubmit.bind(this)}async returnOwnerData(){return this.ownerId}async validate(){return this.formController.validate()}async submit(){if(await this.validate())return this.sendData()}async validateAndSubmit(t){t.preventDefault(),await this.validate()&&this.submit()}get payload(){let t=new n(this.formController.values.getValue()).payload;return this.ownerId?t:Object.assign(Object.assign({},t),{business_id:this.businessId})}get formTitle(){return this.ownerId?"Edit Business Owner":"Add Business Owner"}get submitButtonText(){return this.ownerId?"Update":"Add"}get showRemoveButton(){return!(this.ownersLength<=1)&&(!(this.ownerId||!this.newFormOpen)||!(!this.ownerId||this.newFormOpen)||void 0)}componentWillLoad(){this.formController=new h((0,c[this.country])("owner",this.allowOptionalFields)),this.ownerId?this.getData():this.instantiateOwner({})}componentDidLoad(){this.formController.errors.subscribe((t=>this.errors=Object.assign({},t)))}render(){return s("form",{key:"ee00e580c90a942bde7cf0c483e99ef417dce3d6",onSubmit:this.validateAndSubmit},s("fieldset",{key:"39904e046ca0f24c296fe99a43fc41f104091ecc"},s("legend",{key:"db92e079906c797790f5de7c424cfebab4c9cf63",class:"fw-semibold fs-5",part:l},this.formTitle),s("br",{key:"896303e22939d419ac624d9948e6c5765ad75aec"}),s("div",{key:"8705189e44fe2d5ff76057d6e961b7b5b396fcf5",class:"row gy-3"},s("owner-form-inputs",{key:"f14872c9ecf75f8d6e7bd1147b58aad8a8124f0d",ownerDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country}),s("div",{key:"9333d749fb940ca5aa9d5b6c227b229c473ed06a",class:"d-flex gap-2 justify-content-start"},s(d,{key:"00911c37ed00097d5cd55be0c6a5e503f0b087ed",variant:"secondary",type:"button",onClick:this.handleRemoveOwner,hidden:!this.showRemoveButton},"Remove"),s(d,{key:"84a311d76d65310f994a5c5e473e7e1e1cc5e249",variant:"primary",type:"submit",onClick:this.handleAddOwner,disabled:this.isLoading},this.submitButtonText))),s("hr",{key:"1d4ec7836ea466b48cdf04ac2af0769d68f808d1"})))}static get watchers(){return{isLoading:["loadingWatcher"]}}},C=class{constructor(e){t(this,e),this.isEditingIdentification=!1,this.inputHandler=(t,e)=>{v(this.formController,{[t]:e})},this.onAddressFormUpdate=t=>{j(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),t))}}render(){var t,e;return s("div",{key:"2dea97a8711ac74a5973bab13ffa9d0cbe5cdac4",class:"row gy-3"},s("div",{key:"c666e5f65e175db737c2192e2e83f80eb0df3633",class:"col-12 col-md-8"},s("form-control-text",{key:"a598efd8f1e898335dae5527cb1b39fc348112e4",name:"name",label:"Full Name",defaultValue:this.ownerDefaultValue.name,errorText:this.errors.name,inputHandler:this.inputHandler})),s("div",{key:"caadd033a1c510ce222b8b45408677dfd69463bf",class:"col-12 col-md-4"},s("form-control-text",{key:"8b65c536b51f0d3ab50fef8a5a33b5031eb57af4",name:"title",label:"Title",defaultValue:this.ownerDefaultValue.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),s("div",{key:"b2011382dd1d5ebb060fb9c09a402aacdb3c1778",class:"col-12 col-md-6"},s("form-control-text",{key:"3d540ddff95a999de1329bceaf9bc059d6128963",name:"email",label:"Email Address",defaultValue:this.ownerDefaultValue.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{key:"0bcad2552b4adb76549649b249e33f329bfdf85b",class:"col-12 col-md-6"},s("form-control-number-masked",{key:"8c26d1e8b350fce2c03836fdef244f4b28117d76",name:"phone",label:"Phone Number",defaultValue:this.ownerDefaultValue.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:y.US})),s("div",{key:"c6fcb2e3972cc6b32c2ea1ef125ad49c4fe084b7",class:"col-12 col-md-4"},s("form-control-date",{key:"549fb157eaa9a91f446522e48cb90b0b750c0a91",name:"dob_full",label:"Birth Date",defaultValue:this.ownerDefaultValue.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:t=>w(t,this.formController),helpText:"Must be 18 or older."})),s("div",{key:"728304b41b7083df8cc8cec50f3d22681497b484",class:"col-12 col-md-8"},!(null===(t=this.ownerDefaultValue)||void 0===t?void 0:t.ssn_last4)||this.isEditingIdentification?s("form-control-number-masked",{name:"identification_number",label:k[this.country].idNumberLabel,defaultValue:this.isEditingIdentification?"":this.ownerDefaultValue.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:p[this.country],helpText:k[this.country].identityHelpText}):s("div",null,s("label",{class:"form-label",part:f},k[this.country].idNumberLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:m,value:`****${null===(e=this.ownerDefaultValue)||void 0===e?void 0:e.ssn_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:b,onClick:()=>{this.isEditingIdentification=!0,v(this.formController,{ssn_last4:null,identification_number:""})}},"Change")))),s("div",{key:"9496ee53f65c46f66437817fd7ec80a48ce7d000",class:"col-12"},s("justifi-identity-address-form",{key:"55463847557a8d8285a5be69ba0b5ab77f3749af",errors:this.errors.address,defaultValues:this.ownerDefaultValue.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))}};export{g as justifi_owner_form,x as owner_form_core,C as owner_form_inputs}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,c as s,h as t}from"./p-DwYM91AU.js";import{S as i}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{c as e,J as o}from"./p-XqsvHFg_.js";import{d as a}from"./p-jTVpG8Gt.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as n,a as p}from"./p-Cjcsf8ku.js";import{i as c}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as m,a as d}from"./p-D2muobcE.js";import{A as h}from"./p-C8yN3uBj.js";import"./p-DUwyoa82.js";import"./p-wtuY7MT2.js";import"./p-BS7OgSQe.js";import"./p-DOLBAxYf.js";import"./p-BYsgavgS.js";const l=h();class u{async fetchTerminalOrders(r,s,t){return l.get({endpoint:"terminals/orders",params:t,headers:{account:r},authToken:s})}}const f=class{constructor(t){r(this,t),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=a,this.handleErrorEvent=r=>{this.errorMessage=r.detail.message,this.errorEvent.emit(r.detail)}}componentWillLoad(){e(),this.analytics=new o(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:a})=>{var p,h;try{const a=await t.fetchTerminalOrders(r,s,i);if(a.error)return o({error:d(a.error),code:m(null===(h=a.error)||void 0===h?void 0:h.code),severity:n.ERROR});{const r=Object.assign({},a.page_info);e({terminalOrders:(null===(p=a.data)||void 0===p?void 0:p.map((r=>new c(r))))||[],pagingInfo:r})}}catch(r){const s=m(null==r?void 0:r.code);return o({error:r.message||r,code:s,severity:n.ERROR})}finally{return a()}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return t(i,{key:"f89cb75d014a5d43c6766f0e0e7a572807c3df9f"},t("terminal-orders-list-core",{key:"c38fd6424ebca672c9577255d81b9e97712f3b9b",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{f as justifi_terminal_orders_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,r as s,c as e}from"./p-DwYM91AU.js";import{c as r,a as i,F as o}from"./p-DiJD6Iqx.js";import{f as n}from"./p-BS7OgSQe.js";import"./p-tGDdRx0W.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as l,k as h}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{B as m}from"./p-Bqlcv3ZV.js";import{S as c}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{P as p}from"./p-C9_8N76_.js";import{m as d}from"./p-Do561C8g.js";import{c as f,J as v}from"./p-XqsvHFg_.js";import{g as j,a as y}from"./p-D2muobcE.js";import{A as b}from"./p-C8yN3uBj.js";import{S as w}from"./p-c7MCfTgE.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-BYsgavgS.js";import"./p-wtuY7MT2.js";import"./p-DUwyoa82.js";const g=t=>{const s=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${n(s)}`,(function(t){return+t<=+s})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},C=t=>{if(t)return r({amount:g(t),description:i().optional(),reason:i().optional().oneOf([l.customerRequest,l.duplicate,l.fraudulent],"Select a reason")})},x=[{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"}],S=b();class T{async postRefund(t,s,e,r){return S.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":s},body:r,authToken:e})}}const B=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),A=()=>t(c,null,t("div",{class:"row gap-5"},t(B,null),t(B,null),t(B,null))),R=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}componentWillLoad(){f(),this.analytics=new v(this),this.initializeApi(),this.formController=new o(C())}handleError(t,s,e){this.errorEvent.emit({errorCode:t,message:s,severity:e})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}initializeFormController(){const t=this.refundPayload.amount,s=t?t.toString():"0";this.formController=new o(C(s)),this.formController.setInitialValues({amount:s}),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?d({id:this.paymentId,authToken:this.authToken,service:new p})({onSuccess:({payment:t})=>{this.refundPayload=new h({amount:t.amount_refundable})},onError:({error:t,code:s,severity:e})=>{this.handleError(s,t,e)},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 s=(({authToken:t,accountId:s,paymentId:e,service:r})=>async({refundBody:i,onSuccess:o,onError:n,final:u})=>{var l;try{const u=await r.postRefund(e,s,t,i);if(u.error)return n({error:y(u.error),code:j(null===(l=u.error)||void 0===l?void 0:l.code),severity:a.ERROR});o(u)}catch(t){const s=j(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new T}),e=this.formController.values.getValue();return this.refundLoading=!0,new Promise((t=>{let r;s({refundBody:e,onSuccess:t=>{r=t},onError:({error:t,code:s,severity:e})=>{r=t,this.handleError(t,s,e)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,t(r.data)}})}))}render(){if(this.paymentLoading)return t(A,null);const s=this.formController.getInitialValues(),e=this.refundPayload.amount;return t(c,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:s.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:s.reason,inputHandler:this.inputHandler,options:x,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:s.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(m,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${n(+e)}`))))))}};export{R as justifi_refund_payment}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,H as a}from"./p-DwYM91AU.js";import{az as s,G as i,l,U as d,_ as c}from"./p-wtuY7MT2.js";import{b as o,r,s as n,c as b}from"./p-CPpUGsw5.js";import{C as f,I as u,P as h}from"./p-CVaOFfrI.js";import{e as m,d as v}from"./p-B5rtFhtR.js";import{c as p}from"./p-DfKxeSrC.js";const y=class{constructor(t){e(this,t)}render(){return this.text?this.hideAlert?null:t("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:s},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},t("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),t("div",null,this.text)):null}},k=class{constructor(t){e(this,t),this.errors={},this.additional_questions={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.additional_questions=Object.assign({},e.additional_questions)))}inputHandler(e,t){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{additional_questions:Object.assign(Object.assign({},this.formController.values.getValue().additional_questions),{[e]:t})}))}render(){var e,s,l,d,c,b,u,h,m,v,p,y,k,j;const x=this.formController.getInitialValues().additional_questions;return t(a,{key:"e3e354a7cf470f658e0f95d37186b1f45771b673"},t("fieldset",{key:"7fb001177a4f907d513eb5955063d446234ede0c"},t("legend",{key:"ee6b045a438be9f56345daad752e105640f1ca3d",part:i},"Additional Questions"),t("div",{key:"ed114675357f3b70c34a3eb941fdb30e6219cdc9",class:"row gy-3"},t("div",{key:"b85c27c827cf5e5d0d556c343315e5eec736f538",class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{key:"4576f67fa74ba7c2ca9730468ddc52b055a3c496",name:"business_revenue",label:"What is the business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(s=null===(e=this.errors)||void 0===e?void 0:e.additional_questions)||void 0===s?void 0:s.business_revenue,defaultValue:null==x?void 0:x.business_revenue,maskOptions:f.WHOLE})),t("div",{key:"0614c60cc7daaf890ccb4888d41b0260a26f9a0e",class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{key:"2c435c1553714d75542e0e3bcf1d723f26b37da8",name:"business_payment_volume",label:"What is the business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(d=null===(l=this.errors)||void 0===l?void 0:l.additional_questions)||void 0===d?void 0:d.business_payment_volume,defaultValue:null==x?void 0:x.business_payment_volume,maskOptions:f.WHOLE})),t("div",{key:"8d4a19eb0b6b5707f4a423543d86ae50f6492efc",class:"col-12"},t("form-control-select",{key:"2e49f907bae85cd4901e4aa4413284596fbed365",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===(b=null===(c=this.errors)||void 0===c?void 0:c.additional_questions)||void 0===b?void 0:b.business_when_service_received,options:o,defaultValue:null==x?void 0:x.business_when_service_received})),t("div",{key:"11bc4e0bbe2122b977cf8bc29ac0601ef941881c",class:"col-12"},t("form-control-select",{key:"c511b728971250dc3272c1ef9ff96131a9ac6a2e",name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.additional_questions)||void 0===h?void 0:h.business_recurring_payments,options:r,defaultValue:null==x?void 0:x.business_recurring_payments})),t("div",{key:"5a40dfe41a9fca815cdf0eb7455b41615d1e6c76",class:"col-12"},t("form-control-text",{key:"d8aaf0f6d7d44b1b15ec76af198a0117493f08c6",name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(v=null===(m=this.errors)||void 0===m?void 0:m.additional_questions)||void 0===v?void 0:v.business_recurring_payments_percentage,defaultValue:null==x?void 0:x.business_recurring_payments_percentage})),t("div",{key:"b211bb865a60baf1ea00c81f76f000ff2a31d7bd",class:"col-12"},t("form-control-select",{key:"4b693e7425e690a59e2c70646cca2b886b8a8796",name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(y=null===(p=this.errors)||void 0===p?void 0:p.additional_questions)||void 0===y?void 0:y.business_seasonal,options:n,defaultValue:null==x?void 0:x.business_seasonal})),t("div",{key:"e85b7fceb9cdc808afaf3559609b7519c9630266",class:"col-12"},t("form-control-text",{key:"ae4a6518c7499826f30376f1c902f694244059c7",name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business?",inputHandler:this.inputHandler,errorText:null===(j=null===(k=this.errors)||void 0===k?void 0:k.additional_questions)||void 0===j?void 0:j.business_other_payment_details,defaultValue:null==x?void 0:x.business_other_payment_details})))))}},j=class{constructor(t){e(this,t),this.errors={},this.coreInfo={},this.isEditingTaxId=!1,this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.values.subscribe((e=>this.coreInfo=Object.assign({},new m(e)))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}inputHandler(e,t){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}render(){var e,s;const o=this.formController.getInitialValues();return t(a,{key:"0dba6443b063d02368f93f3a336a8051364b5fca"},t("fieldset",{key:"42eabe1f20623241291a8bc374c14b0727fae5cd"},t("legend",{key:"b74d116fa26b843eee56201c3997ecf916453a23",part:i},"General Info"),t("div",{key:"8370be848754f5730d1f5bffbfb51875cec01218",class:"row gy-3"},t("div",{key:"b891b5ce1820755b44a4d4d14240cd6f6f705114",class:"col-12"},t("form-control-text",{key:"712f62f8feb4c34eb90048f29158c03cf71b38db",name:"legal_name",label:"Legal Name",defaultValue:o.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler})),t("div",{key:"52cb8a48648bb036b04fba034dc27a4b286bf7ce",class:"col-12"},t("form-control-text",{key:"655edd4ae78b47fea221308ce9e582eb731454a7",name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:o.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler})),t("div",{key:"0cd13bcea3e7e1ef90e5d071ea40690f7a8ea022",class:"col-12 col-md-8"},t("form-control-select",{key:"00a2173bda66d059f9ef7534b3535a4f36dbbbc1",name:"classification",label:"Business Classification",options:b,defaultValue:o.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),t("div",{key:"4c157888deded84baa24ffdd5c5d74e90590c5f8",class:"col-12 col-md-4"},t("form-control-date",{key:"7af97d93cf2a9f7ff988621d53e528a8930932ed",name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:o.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),t("div",{key:"b5d0493b01ad9a0853bea95b76220c939cd43828",class:"col-12 col-md-6"},t("form-control-text",{key:"5df583e04316c0afeaef771177dff20f6d266362",name:"industry",label:"Industry",defaultValue:o.industry,errorText:this.errors.industry,inputHandler:this.inputHandler})),t("div",{key:"0bd63d995778469190a97a21190e3da742a468fa",class:"col-12 col-md-6"},!(null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4)||this.isEditingTaxId?t("form-control-number-masked",{name:"tax_id",label:p[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":o.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:u[this.country],helpText:p[this.country].taxIdHelpText}):t("div",null,t("label",{class:"form-label",part:l},p[this.country].taxIdLabel),t("div",{class:"input-group mb-3"},t("input",{type:"text",class:"form-control",part:d,value:`****${null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4}`,disabled:!0}),t("button",{class:"btn btn-secondary",type:"button",part:c,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:""}))}},"Change")))),t("div",{key:"3decd3a593098a1c36e4baf1aeb846603b4a6769",class:"col-12"},t("form-control-text",{key:"e3cb697846ad086ca6f4998d302574bb4de4c4a6",name:"website_url",label:"Website URL",defaultValue:o.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler})),t("div",{key:"69c357ad3d2b5464d0c333c8fdc82353044b7301",class:"col-12 col-md-6"},t("form-control-text",{key:"49857dc20c817d8c600dbeae9c8191452ec1898f",name:"email",label:"Email Address",defaultValue:o.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{key:"1c9279a56b389fcd71ffeaad66df8a067a035334",class:"col-12 col-md-6"},t("form-control-number-masked",{key:"7c329ae3c7dcff34d88bce2a64d9ccaa09384055",name:"phone",label:"Phone Number",defaultValue:o.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:h.US})))))}},x=class{constructor(t){e(this,t),this.errors={},this.representative={},this.isEditingIdentification=!1,this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{[e]:t})}))},this.onAddressFormUpdate=e=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{address:Object.assign(Object.assign({},this.formController.values.getValue().representative.address),e)})}))},this.onDateOfBirthUpdate=e=>{const t=v(e.detail);this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{dob_day:t.dob_day,dob_month:t.dob_month,dob_year:t.dob_year})}))}}get identificationNumberLabel(){var e;return(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)?p[this.country].idNumberLabelOptional:p[this.country].idNumberLabel}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e.representative))),this.formController.values.subscribe((e=>this.representative=Object.assign({},e.representative)))}render(){var e,s;const o=this.formController.getInitialValues().representative;return t(a,{key:"2d8a5324bfea8bd297b5db5f1e5aaf5d9aa51cb4"},t("fieldset",{key:"c25884a7aaa0ffb19316002e8ce9e158a1f0b8e9"},t("legend",{key:"af36d94625e4b82c8418079b60cade953ac53e8e",part:i},"Representative"),t("div",{key:"c3ad5ca5e1c636db05fa3994c443975ecc363e62",class:"row gy-3"},t("div",{key:"8b27315feb79cf08d69c5a108426705cb6445c71",class:"col-12 col-md-8"},t("form-control-text",{key:"f6ffb2619c6537f99bed5a35602d3d7d68f821ad",name:"name",label:"Full Name",defaultValue:null==o?void 0:o.name,errorText:this.errors.name,inputHandler:this.inputHandler})),t("div",{key:"cde914c872fcfbe0395f358b570d9cefbf14872e",class:"col-12 col-md-4"},t("form-control-text",{key:"c70330625ed26d8d5e8d00af7df55571ef4ff32a",name:"title",label:"Title",defaultValue:null==o?void 0:o.title,errorText:this.errors.title,inputHandler:this.inputHandler})),t("div",{key:"64bba44c0facd07c8648fba1ce31385b33f94513",class:"col-12 col-md-6"},t("form-control-text",{key:"33c7c4a365f6d7ce43e6b98b9ca3646f2263abd1",name:"email",label:"Email Address",defaultValue:null==o?void 0:o.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{key:"5b96d76754918f37fc4f226a5c6656529b77b63f",class:"col-12 col-md-6"},t("form-control-number-masked",{key:"c7cf814cf84a0c69e547c0b60f643b7fb78490af",name:"phone",label:"Phone Number",defaultValue:null==o?void 0:o.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:h.US})),t("div",{key:"e5c486242e9fb47c81a28831a9a648bee28e95d5",class:"col-12 col-md-4"},t("form-control-date",{key:"519cc94edb63b5f465d0ada9fe905e68aca54e1e",name:"dob_full",label:"Birth Date",defaultValue:null==o?void 0:o.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:this.onDateOfBirthUpdate})),t("div",{key:"b971e1320a57061d9d1eae7adb28eda19ce855a4",class:"col-12 col-md-8"},!(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)||this.isEditingIdentification?t("form-control-number-masked",{name:"identification_number",label:this.identificationNumberLabel,defaultValue:this.isEditingIdentification?"":null==o?void 0:o.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:u[this.country],helpText:p[this.country].identityHelpText}):t("div",null,t("label",{class:"form-label",part:l},this.identificationNumberLabel),t("div",{class:"input-group mb-3"},t("input",{type:"text",class:"form-control",part:d,value:`****${null===(s=this.representative)||void 0===s?void 0:s.ssn_last4}`,disabled:!0}),t("button",{class:"btn btn-secondary",type:"button",part:c,onClick:()=>{this.isEditingIdentification=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{ssn_last4:null,identification_number:""})}))}},"Change")))),t("div",{key:"92b0c2109f98ac67a32ad57ca91c4f663d3de307",class:"col-12"},t("justifi-identity-address-form",{key:"187ac4670413b762f4f78dcde5a33ae2a73f203f",errors:this.errors.address,defaultValues:null==o?void 0:o.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}},_=class{constructor(t){e(this,t),this.errors={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.legal_address=Object.assign({},e.legal_address)))}inputHandler(e,t){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{legal_address:Object.assign(Object.assign({},this.formController.values.getValue().legal_address),{[e]:t})}))}render(){var e;const s=this.formController.getInitialValues().legal_address;return t(a,{key:"020c1a41ff7fa0881464463322b54754e7664957"},t("fieldset",{key:"cb1ae50abc99f8915cead7ef850de52f62bab304"},t("legend",{key:"74d2bba4a9557ff2ac5b9b34d0947e9a076ddb84",part:i},"Business Legal Address"),t("justifi-form-address-fields",{key:"86d9fc1d344ace729cdc75b1a9239b74865f306b",country:this.country,errors:null===(e=this.errors)||void 0===e?void 0:e.legal_address,defaultValues:s,inputHandler:this.inputHandler})))}};export{y as form_alert,k as justifi_additional_questions,j as justifi_business_core_info,x as justifi_business_representative,_ as justifi_legal_address_form}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as t}from"./p-DwYM91AU.js";import{E as a}from"./p-BNqo3kt0.js";import"./p-wtuY7MT2.js";const e=class{constructor(t){s(this,t)}render(){return t("div",{key:"3c1c4e729711c6676c176a5a04228ec7ebb7acfa"},this.errorMessage?a(this.errorMessage):t("main",{class:"p-2"},t("slot",{name:"head-info"}),t("slot",{name:"detail-sections"})))}};export{e as justifi_details}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as t}from"./p-DwYM91AU.js";import{S as e}from"./p-BP2sTIQV.js";import{S as c}from"./p-c7MCfTgE.js";import"./p-wtuY7MT2.js";const r=class{constructor(t){s(this,t)}render(){return t(e,{key:"79c2def38d099c6c146b89b6d33f8b1ca403bace"},t(c,{key:"d73576f82a88f9282caebaeb66cf4c444e8318a6",component:this.component,height:this.height,width:this.width,className:this.class,styles:this.customStyle}))}};export{r as justifi_skeleton}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,r as e,c as a}from"./p-DwYM91AU.js";import{c as s}from"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as i,a as o}from"./p-Cjcsf8ku.js";import{h as r}from"./p-CPKSE7M4.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as n,J as h}from"./p-XqsvHFg_.js";import{g as p,a as d}from"./p-D2muobcE.js";import{P as l}from"./p-D0YDz3L6.js";import{T as f,l as u,a as m,b,c as y,d as _,e as w,f as T,g as j,h as g,i as v,j as k,k as D}from"./p-BTzt8N0l.js";import{S as C}from"./p-BP2sTIQV.js";import{T as S}from"./p-CZfYo5-1.js";import{a as P}from"./p-BS7OgSQe.js";import{S as I,T as q}from"./p-wtuY7MT2.js";import"./p-BYsgavgS.js";import"./p-DUwyoa82.js";import"./p-C8yN3uBj.js";import"./p-B-0a8Xqm.js";const B={id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:I,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:I,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:I,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:I,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:I,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:I,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},E={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit"},O={id:e=>t("td",{part:q(e.id)},e.id),account_id:e=>t("td",{part:q(e.account_id)},e.account_id),payout_id:e=>t("td",{part:q(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:q(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:q(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:q(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:q(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:q(e.currency)},e.currency),description:e=>t("td",{part:q(e.description)},e.description),source_id:e=>t("td",{part:q(e.source_id)},e.source_id),txn_type:e=>t("td",{part:q(e.txn_type)},E[e.txn_type]),created_at:e=>t("td",{part:q(e.created_at)},t("div",{class:"fw-bold"},P(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:q(e.available_on)},t("div",{class:"fw-bold"},P(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:q(e.updated_at)},t("div",{class:"fw-bold"},P(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.updated_at,{showTime:!0})))},F=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event"),this.errorEvent=a(this,"error-event"),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=c,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:S.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:S.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:S.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,B,O),n(),this.analytics=new h(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:s,onSuccess:o,onError:c,final:n})=>{var h;try{const n=await a.fetchPayoutTransactions(t,e,s);n.error?c({error:d(n.error),code:p(null===(h=n.error)||void 0===h?void 0:h.code),severity:i.ERROR}):o({balanceTransactions:n.data.map((t=>new r(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=p(null==t?void 0:t.code);c({error:d(t),code:e,severity:i.ERROR})}finally{n()}})({accountId:s.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payout-id and auth-token props are required",this.handleError(o.MISSING_PROPS,this.errorMessage,i.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(C,{key:"ab6de6bc1bd8b389c3853cc8c9ff0a52ac79e139"},t(u,{key:"3946c0161a51c292e53776df23ef0aa297ab8a24"},t(m,{key:"7f7acd0813a8eb710889d540b6c5b7ae6831e47a"},t(b,{key:"eb0b11273c85116093d119bdbc8984f7c71729f0"},t(y,{key:"5485e54cca61a69a48b4a0eb70ff4cfbf409cfab"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"778592bd28c2ed42fcb751f695ef97b75c911c17"},t(w,{key:"2123dc933b4e16f2bc4588a6ec4357d3067a919f",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(T,{key:"e13e4ba98217c4c41cc406d7f6bde34831771952",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"c837011abb597d3811cdc5636a457afab49224f6",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(g,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(v,{key:"a189800b2a36f8880bb7fb2ab60b8b2afd24d760"},t(k,{key:"ae78dbea1986d6c0ee493bf26d8bb01ad294a1e2"},t(D,{key:"2146861e294be47a5c63f3354ff6744ad71b4d70",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"2ab6bfa9a7534c063e603eaf25e4e6f44cbda859",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{F as justifi_payout_transactions_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-DwYM91AU.js";import{B as a}from"./p-Bqlcv3ZV.js";import{ah as r,ai as s}from"./p-wtuY7MT2.js";const c=t=>{const e=["after_cursor","before_cursor"];return!!Object.keys(t).filter((t=>!e.includes(t))).length},d=class{constructor(e){t(this,e),this.showClearButton=!1}watchParamsHandler(t){this.showClearButton=c(t)}show(){this.menu.classList.add("show")}hide(){this.menu.classList.remove("show")}componentWillLoad(){this.showClearButton=c(this.params)}render(){return e("div",{key:"14b8c9b28e6db7921a0b504cdac9d09cc51e250c",class:"d-flex gap-2"},e("div",{key:"8017069d76200797bb796062c500f5139dd103e1",class:"dropdown pb-3"},e("button",{key:"12e81650b0c2649d3be74f82744ed6195af4bdae",type:"button dropdown-toggle",ref:t=>this.anchorButton=t,class:"btn btn-primary dropdown-toggle",part:r,"data-test-id":"open-filters-button","data-bs-toggle":"dropdown"},"Filters"),e("custom-popper",{key:"f123c078509a97e24499f909457cefa697c3f18d",offset:[20,10],strategy:"fixed",anchorRef:this.anchorButton,trigger:"click"},e("form",{key:"f983f848d4bebd40c734ecc7e44a28fa8bcae060",class:"dropdown-menu",part:s,"data-test-id":"filter-menu",ref:t=>this.menu=t,onSubmit:t=>t.preventDefault()},e("slot",{key:"22ab7f6e07726f2a92008937a7cd1a7dc0b95727"})))),e("div",{key:"51e56c9fea70c03e1738e5baacbdf88432cc78cb"},e(a,{key:"d33af17298a3fa68906ba8b490133db9b294c695",variant:"secondary",onClick:()=>this.clearParams(),hidden:!this.showClearButton,"data-test-id":"clear-filters-button"},"Clear Filters")))}static get watchers(){return{params:["watchParamsHandler"]}}};export{d as table_filters_menu}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,h as e,H as s}from"./p-DwYM91AU.js";import{E as c}from"./p-CLHwhyvu.js";import{aa as t,ab as i,ac as b,ad as d,ae as f}from"./p-wtuY7MT2.js";const n=class{constructor(e){a(this,e),this.paging=c,this.params={}}render(){return e(s,{key:"7b821154b627026ef8624af6e4759e2176004676"},e("nav",{key:"7990aee285d0cc3e6f83cb59bb216439e5364df5","aria-label":"Table pagination",class:"d-flex justify-content-end gap-3"},e("ul",{key:"02c68163934ce1aabf4abd607cc28e549e20ebe1",class:"pagination m-0"},e("li",{key:"aab661ae85fc61eecd230d058f135483796769c0",class:"page-item "+(this.paging.has_previous?"":" disabled")},e("button",{key:"ef42a41831a9890186c333418b161877761674e1",class:"page-link",onClick:a=>{a.preventDefault(),this.paging.handleClickPrevious(this.paging.start_cursor)},part:this.paging.has_previous?t:i},e("span",{key:"a898a92687e4a5fec37d9dab4208430260a9f274",class:"me-1",part:b},"«"),e("span",{key:"ecc2eeedc064d405ad178b9a98ed088e12f1b2fb",part:d},"Previous"))),e("li",{key:"56569cd9f9803ead8b1180e2f982a98d7009be1f",class:"page-item "+(this.paging.has_next?"":" disabled")},e("button",{key:"c39d389ab89609e8ce11b3dd81eb5c4a50d3521f",class:"page-link",onClick:a=>{a.preventDefault(),this.paging.handleClickNext(this.paging.end_cursor)},part:this.paging.has_next?t:i},e("span",{key:"6a01458a048a524931b03df6a964fa4a0ac403ac",part:d},"Next"),e("span",{key:"f4cb3d084647c00dff30b99f751180564463443f",class:"ms-1",part:f},"»"))))))}};export{n as pagination_menu}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as s,H as a}from"./p-DwYM91AU.js";import{I as i}from"./p-Ce_F4E0f.js";import{b as d,U as o,a as r,c as l,l as c}from"./p-wtuY7MT2.js";import{F as f}from"./p-BuCKkdLM.js";import"./p-CZfYo5-1.js";import{C as n}from"./p-B5rtFhtR.js";import{n as h}from"./p-BnjCmwMr.js";import{b,c as u}from"./p-DfKxeSrC.js";const m=class{constructor(s){e(this,s),this.formControlInput=t(this,"formControlInput"),this.formControlBlur=t(this,"formControlBlur"),this.imask=null,this.isFocused=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=i(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?d:this.disabled?o:this.isFocused?r:l}render(){return s(a,{key:"5252b2a1d8f6275cdaaa803c1c3a58294b35ef5c"},s("div",{key:"7fe65f7797268ebc964a1b02ac61166254a0c409",class:"form-group d-flex flex-column"},s("div",{key:"843bf1cf8ff7bf245760d0f65ea844768aa78ad2",class:"d-flex align-items-start gap-2"},s("label",{key:"2ba6512c6a6dfa9aa4105f069809173f01262c60",part:c,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"ec179bc366c9286246134133510bcd35fd9de891",helpText:this.helpText})),s("input",{key:"546e50189acc596e7b1c1826edb7473084f93754",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(f,{key:"6da86dcebd7e427cce68d7b88d07b94daec26f21",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},v=class{constructor(t){e(this,t),this.country=n.USA}render(){var e,t,i,d,o,r,l,c,f,m;const v=u[this.country],p=b[this.country];return s(a,{key:"2943b7ea4042efedfffd589359f719057c976943"},s("div",{key:"e60164507ebf9a668d096eb39a78a968d00ab83d",class:"row gy-3"},s("div",{key:"358efebc35eb48f25f3b804c02483acaff94143a",class:"col-12"},s("form-control-text",{key:"a17cef7d46163763c1b84db11e255f5e93b7cb6d",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(t=this.errors)||void 0===t?void 0:t.line1,helpText:"No PO Boxes."})),s("div",{key:"069ea65dc0f8869be84b8faa91bc49b0a6cbb76a",class:"col-12"},s("form-control-text",{key:"5c7086dbccec99a6e25f8e940e4d234aeac7f373",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(i=this.defaultValues)||void 0===i?void 0:i.line2,errorText:null===(d=this.errors)||void 0===d?void 0:d.line2})),s("div",{key:"6e935727697564f3f58a3a2568d9f042eb566e6f",class:"col-12"},s("form-control-text",{key:"65a6af1e9b7fec9c3180183f248dee7b7273a022",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(o=this.defaultValues)||void 0===o?void 0:o.city,errorText:null===(r=this.errors)||void 0===r?void 0:r.city})),s("div",{key:"6ac0db8fbecd98ffb2a02a6617280fbaf4f51bfc",class:"col-12"},s("form-control-select",{key:"1f9f893c24d0a5cc9151268e692891767361da6e",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(l=this.defaultValues)||void 0===l?void 0:l.state,errorText:null===(c=this.errors)||void 0===c?void 0:c.state})),s("div",{key:"8fd58d225a2fea2019f5bad56cd4c3e5c14ab32a",class:"col-12"},s("form-control-text",{key:"52bee859b031431cd56456ed2a1f7280c4acc6c6",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(f=this.defaultValues)||void 0===f?void 0:f.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===n.USA?5:7,keyDownHandler:this.country===n.USA?h:void 0}))))}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return s(a,{key:"86c91933676745470d6b28cf6843624d092adc57"},s("justifi-form-address-fields",{key:"7cbee24003b6b0446fb1203c9863151b0d2f4f15",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_control_number_masked,v as justifi_form_address_fields,p as justifi_identity_address_form}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,H as a,c as l,g as s}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import{E as o}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{a as n}from"./p-CPpUGsw5.js";import"./p-XYgDHrVL.js";import{n as i}from"./p-BnjCmwMr.js";import{D as r,Z as c,G as d,ap as u,S as h,ay as b,c as f,l as m,b as p,U as v,a as y}from"./p-wtuY7MT2.js";import{s as k,e as x,o as _}from"./p-BS7OgSQe.js";import{S as T}from"./p-c7MCfTgE.js";import"./p-CZfYo5-1.js";import{F as g}from"./p-BuCKkdLM.js";import"./p-BYsgavgS.js";const w=class{constructor(t){e(this,t)}render(){return t("div",{key:"92e97e95c2875dcfad6c2e4ad5e42a4ae250c7e7",class:"row gy-3"},t("div",{key:"e24529f3c9a3e4db9e676c7c1e2e32b9f123e9e5",class:"col-12"},t("form-control-file",{key:"09d5b83dfe3ab52c56fa589deb5bd744d2a883f1",name:"voided_check",label:"Voided Check",documentType:o.voidedCheck,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.voided_check,multiple:!0})),t("div",{key:"887a7e0f3751e57dd08ddc1a8ce3c45380efbf9f",class:"col-12"},t("form-control-file",{key:"e427c222b43de52cf51d19ffbab7137a5d603d8a",name:"bank_statement",label:"Bank Statement",documentType:o.bankStatement,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.bank_statement,multiple:!0})))}},H=class{constructor(t){e(this,t)}render(){var e,a,l,s,o,r;return t("div",{key:"6414bcb6ef5fd6948154f69b56fd7f20881f091c",class:"row gy-3"},t("div",{key:"f025f35d2b84fc5672d2a6335dd5bf21d925c960",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Bank Name",value:null===(e=this.defaultValue)||void 0===e?void 0:e.bank_name}):t("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),t("div",{key:"3cf2e75befc249d6b7e996d46206e470cf47ddbf",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Nickname",value:null===(a=this.defaultValue)||void 0===a?void 0:a.nickname}):t("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),t("div",{key:"16ec731916e67fc42060372fb6222893cb159483",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Owner Name",value:null===(l=this.defaultValue)||void 0===l?void 0:l.account_owner_name}):t("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),t("div",{key:"38460bb83c32289d3494f6ef386b45943f2f78e9",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Type",value:null===(s=this.defaultValue)||void 0===s?void 0:s.account_type}):t("form-control-select",{name:"account_type",label:"Account Type",options:n,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),t("div",{key:"cfbb7ffa2a56ee1c7d1bb7e0b01d872c37d5d5df",class:"col-6"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Number",value:(null===(o=this.defaultValue)||void 0===o?void 0:o.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):t("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:i,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),t("div",{key:"8d844071f3e37c92938e65209ff89170c8e09dc7",class:"col-6"},this.formDisabled?t("bank-account-read-only-value",{label:"Routing Number",value:(null===(r=this.defaultValue)||void 0===r?void 0:r.routing_number)||""}):t("form-control-text",{name:"routing_number",label:"Routing Number",defaultValue:this.defaultValue.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:i,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))}},N=class{constructor(t){e(this,t)}render(){var e,a,l,s,o,r,c;return t("div",{key:"4badae2dd74e7b618730114e3ca6086f970a4b16",class:"row gy-3"},t("div",{key:"39c645b2a10d384ec357e4a5c117bad22d8cd1a5",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Bank Name",value:null===(e=this.defaultValue)||void 0===e?void 0:e.bank_name}):t("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),t("div",{key:"c1605cd3d83ea214580da9ea59dbe59401420863",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Nickname",value:null===(a=this.defaultValue)||void 0===a?void 0:a.nickname}):t("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),t("div",{key:"6aaced2f6c0c8b46e6a3593d8ad13c7527451a23",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Owner Name",value:null===(l=this.defaultValue)||void 0===l?void 0:l.account_owner_name}):t("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),t("div",{key:"d381212bea7f03818ce8ea6a33f5183081363fa8",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Type",value:null===(s=this.defaultValue)||void 0===s?void 0:s.account_type}):t("form-control-select",{name:"account_type",label:"Account Type",options:n,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),t("div",{key:"6f8fa0aa9f01c34440277ae56375e99f4e00259f",class:"col-3"},this.formDisabled?t("bank-account-read-only-value",{label:"Transit Number",value:(null===(o=this.defaultValue)||void 0===o?void 0:o.transit_number)||""}):t("form-control-text",{name:"transit_number",label:"Transit Number",defaultValue:this.defaultValue.transit_number,maxLength:5,errorText:this.errors.transit_number,inputHandler:this.inputHandler,keyDownHandler:i,helpText:"5 digits"})),t("div",{key:"5b5d8fbd0144c30bb830415da675bb466e735b0d",class:"col-3"},this.formDisabled?t("bank-account-read-only-value",{label:"Institution Number",value:(null===(r=this.defaultValue)||void 0===r?void 0:r.institution_number)||""}):t("form-control-text",{name:"institution_number",label:"Institution Number",defaultValue:this.defaultValue.institution_number,maxLength:3,errorText:this.errors.institution_number,inputHandler:this.inputHandler,keyDownHandler:i,helpText:"3 digits"})),t("div",{key:"d1de061b7d721dbfb9539212415ceff9655aeed3",class:"col-6"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Number",value:(null===(c=this.defaultValue)||void 0===c?void 0:c.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):t("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:i,helpText:"Please copy the account number as shown on your statement. Do not include spaces or dashes."})))}},j=class{constructor(t){e(this,t)}render(){return t("div",{key:"99b3b6a22eecad258b65287c4f9c8a1485a95d4d"},t("label",{key:"fcd00510470fa322ee4c2a4a7179de3064569c0e",class:"form-label",part:r},this.label),t("div",{key:"30e4d925bb41664887d41871d87f3bcf2709dcff",part:r},this.value||""))}},A=class{constructor(t){e(this,t),this.documents=[],this.isLoading=!1}render(){return this.isLoading?t(T,{height:"50px"}):this.documents.length?t(a,null,t("div",{class:"card",part:c},t("div",{class:"card-body"},t("h5",{class:"card-title",part:d},"Documents Already on File"),t("div",{class:"table-responsive"},t("table",{class:"table table-sm table-borderless",part:u},t("thead",null,t("tr",null,t("th",{style:{width:"25%"},part:h,scope:"col"},"File Name"),t("th",{style:{width:"25%"},part:h,scope:"col"},"File Type"),t("th",{style:{width:"25%"},part:h,scope:"col"},"Document Type"),t("th",{style:{width:"25%"},part:h,scope:"col"},"Date Uploaded"))),t("tbody",null,this.documents.sort(((e,t)=>e.document_type.localeCompare(t.document_type))).map(((e,a)=>t("tr",{class:0===a?"border-bottom border-top":"border-bottom"},t("td",{part:b},e.file_name),t("td",{part:b},e.file_type),t("td",{part:b},k(e.document_type)),t("td",{part:b},`${x(e.created_at)} - ${_(e.created_at)}`))))))))),t("hr",null)):null}},D=class{constructor(t){e(this,t),this.formControlInput=l(this,"formControlInput"),this.formControlBlur=l(this,"formControlBlur"),this.fileSelected=l(this,"fileSelected"),this.isFocused=!1,this.handleFormControlInput=e=>{const t=e.target,a=t.getAttribute("name");this.inputHandler(a,t.value),this.formControlInput.emit({name:a,value:t.value})},this.changeHandler=()=>{const e=this.fileInput.files;e&&this.fileSelected.emit({fileList:e,document_type:this.documentType})}}componentDidLoad(){this.fileInput=this.el.querySelector("input")}get part(){let e=f;return this.errorText&&(e=p),this.disabled&&(e=v),this.isFocused&&(e=y),e}render(){return t(a,{key:"c1d92b4464500d430ad828ce374b864f0abf79dc"},t("div",{key:"7753e5875afe4c6da178a088721b62590e104039",class:"form-group d-flex flex-column"},t("div",{key:"35732250f1da24e5d8af9d6c984360402aa8c749",class:"d-flex align-items-start gap-2"},t("label",{key:"1dbdb4c74c82415714295d882a48ea3634265cae",part:m,class:"form-label",htmlFor:this.name},this.label),t("form-control-tooltip",{key:"132b4e5b01986aba2f1999db2f19373477b0af9d",helpText:this.helpText})),t("input",{key:"4c371be7c4d784fb7ba3dc3244aaab5ef7dea763",ref:e=>this.fileInput=e,type:"file",name:this.name,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onChange:this.changeHandler,onInput:this.handleFormControlInput,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()}}),t(g,{key:"f9c2a057b20ccf863331c90156a5a9df65bb85a6",errorText:this.errorText,name:this.name})))}get el(){return s(this)}};export{w as bank_account_document_form_inputs,H as bank_account_form_inputs,N as bank_account_form_inputs_canada,j as bank_account_read_only_value,A as business_documents_on_file,D as form_control_file}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,c as i,h as t}from"./p-DwYM91AU.js";import{c as o,J as r}from"./p-XqsvHFg_.js";import{C as e,a as n}from"./p-Cjcsf8ku.js";import{m as p,a}from"./p-5aA7gjr5.js";import{B as h}from"./p-wYnnDDuR.js";import{A as m}from"./p-C8yN3uBj.js";import"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import"./p-DUwyoa82.js";import"./p-D2muobcE.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";const u=m();class d{async postProvisioning(s,i,t){return u.post({endpoint:"entities/provisioning",body:{business_id:i,product_category:t},authToken:s})}}const c=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event"),this.allowOptionalFields=!1,this.formTitle="Business Information"}propChanged(){this.initializeApi()}componentWillLoad(){o(),this.analytics=new r(this),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=p({authToken:this.authToken,businessId:this.businessId,service:new h}),this.postProvisioning=a({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new d})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:n.MISSING_PROPS,severity:e.ERROR})}render(){return t("justifi-payment-provisioning-core",{key:"80baf93d680fd610755fdfb6be030178140568da",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{c as justifi_payment_provisioning}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,h as e}from"./p-DwYM91AU.js";import{f as t,p as s,c as r}from"./p-BOqOio4U.js";import{m as d,n as f,o}from"./p-wtuY7MT2.js";import{S as c}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{c as i,a as p}from"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-HXpYMWUU.js";const b=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({created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([a,e])=>{e&&(s[a]=e)}))}render(){const a=Object.assign({},t);return e(c,{key:"c9fe17cad3d56aa5f8c9ef6b23b90b77e378d256"},e("table-filters-menu",{key:"e5d55040d356e8aeb60419a52891deca0cb2940a",params:a,clearParams:r,part:d},e("div",{key:"a155ff5b6a89c233ad37a3697ed8ab7f03d22a9f",class:"grid-cols-2 gap-3 p-1"},e("div",{key:"e13495766b1d817a93606fb35ca6c2222c48d0e5",class:"p-2"},e("form-control-date",{key:"fc510fa12504d70efa1fc74a36f4a49b89fff4d4",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:p(this.createdAfter,{showInputDate:!0})||p(t.created_after,{showInputDate:!0}),disabled:!!this.createdAfter,part:f})),e("div",{key:"dd521da828ccf3d26460130cbcb89d20822ff42d",class:"p-2"},e("form-control-date",{key:"091b8e21f62c6bad5b6e1e47fde86be51abcb25a",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:p(this.createdBefore,{showInputDate:!0})||p(t.created_before,{showInputDate:!0}),disabled:!!this.createdBefore,part:o})))))}};export{b as justifi_payouts_list_filters}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as s,H as a}from"./p-DwYM91AU.js";import{S as r}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{c as n,J as d}from"./p-XqsvHFg_.js";import{w as o,c}from"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{a as h,C as l}from"./p-Cjcsf8ku.js";import"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as f}from"./p-DU8dqq9U.js";import{P as u}from"./p-DCIW8z1f.js";import{S as m}from"./p-c7MCfTgE.js";import{B as b}from"./p-Bqlcv3ZV.js";import{r as p}from"./p-wtuY7MT2.js";import"./p-DUwyoa82.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";const y=class{constructor(i){t(this,i),this.radioClick=e(this,"radio-click"),this.checked=!1,this.hidden=!1,this.handleClick=()=>{this.radioClick.emit(this.value)}}render(){return i(r,{key:"1ae40f787970160e38b72f917bda96f480d2a890"},i("div",{key:"2130596c8294cc38365e6126806735da0f93ef4a",class:`radio-list-item p-3 ${this.class||""}`,part:p,onClick:this.handleClick,hidden:this.hidden},i("form-control-radio",{key:"7d5524f518430f2bfd1c9863f354318929353cfb",name:this.name,value:this.value,checked:this.checked,label:this.label,inputHandler:()=>null})))}},v={[u.NEW_BANK_ACCOUNT]:"New bank account",[u.NEW_CARD]:"New credit or debit card"},g="Payment form not ready",k="Validation error",w=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),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(){n(),this.analytics=new d(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,f.selectedPaymentMethod={type:t.detail}}async fillBillingForm(t){var e;null===(e=this.billingFormRef)||void 0===e||e.fill(t)}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:h.TOKENIZE_ERROR,message:k}),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(h.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:h.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:g}};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 tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||f.authToken,account:this.accountId||f.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||f.authToken||this.emitError({errorCode:h.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||f.accountId||this.emitError({errorCode:h.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=u.NEW_BANK_ACCOUNT,f.selectedPaymentMethod={type:u.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=u.NEW_CARD,f.selectedPaymentMethod={type:u.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(u.NEW_CARD),this.disableBankAccount||t.push(u.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:l.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",g);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||k;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||f.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!f.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const e=this.selectedPaymentMethod===t&&void 0===f.selectedPaymentMethod.id;return i("div",{class:"payment-method"},i("justifi-radio-list-item",{name:"paymentMethodType",value:t,checked:e,label:v[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("justifi-billing-form",{ref:t=>this.billingFormRef=t,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),i("div",{class:"mt-4"},i("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return i(t===u.NEW_CARD?"justifi-card-form":"justifi-bank-account-form",{ref:t=>this.paymentMethodFormRef=t})}render(){return i(r,{key:"e1ee33f08d3eaff9a2951bd30ef9814a5d959b35"},i("form",{key:"df73d7965968c0efc3ee2b35a9a85d551915e5a1"},i("fieldset",{key:"2967ed65f1c0af42082a8b7c255db5fdc1c78019"},i("div",{key:"f45b8e074f39ec6abefc8f7e30bdf0ae57b1272c",class:"row gy-3"},i("div",{key:"fe9c90b34d60802f4d0dc51863874151f4a17b2b",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),i("div",{key:"ff1b8332d70fe68c3d3140c5a173dd8b419b6a8e",class:"col-12"},i("justifi-button",{key:"bf2ced1a5164a9c9af2bf2c5b750c5f9734dc86b",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 s(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}},j=t=>{const{isReady:e}=t;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-end"},i(m,{height:"18px",width:"120px"}),i(m,{height:"36px"}))),i("div",{class:"row"},i("div",{class:"col-12 align-content-end"},i(m,{height:"18px",width:"110px"}),i(m,{height:"36px"}))))},C=class{constructor(e){t(this,e),this.isReady=!1}async componentWillLoad(){await o(),this.iframeOrigin=c.iframeOrigin,n(),this.analytics=new d(this)}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){const t=await this.accountNumberIframeElement.validate(),e=await this.routingNumberIframeElement.validate();return t&&e}async tokenize({clientId:t,paymentMethodMetadata:e,account:i}){return this.accountNumberIframeElement.tokenize(t,e,i)}render(){return i(r,{key:"62431aba939585a8a341942d9847e8d491b0a658"},i(j,{key:"2da8452c73e52a6fc67d80e483c40a2d0dd276f9",isReady:this.isReady}),i("hidden-input",{key:"c34bc48ee7e1925ae272b5fe60fd362ddf2433eb"}),i("div",{key:"3fefe63e9f9c98d7e08e0ceac5df0f8008303aec",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"6c19ea238eb0bff6b245f2f39028d651438c55d0",class:"row mb-3"},i("iframe-input",{key:"b5588dc21d24ec873fecedd91fbcb0344fbe324c",inputId:"accountNumber",ref:t=>this.accountNumberIframeElement=t,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber`})),i("div",{key:"910f130a307449a3d60ef76eee6cc27fc86c3fe0",class:"row"},i("iframe-input",{key:"72756b92912c3031cc472dee5bbf945f06c38920",inputId:"routingNumber",ref:t=>this.routingNumberIframeElement=t,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber`}))))}},M=class{constructor(e){t(this,e)}get showSimpleCardBillingForm(){return this.paymentMethodType===u.NEW_CARD&&this.hideCardBillingForm}get showSimpleBankAccountBillingForm(){return this.paymentMethodType===u.NEW_BANK_ACCOUNT&&this.hideBankAccountBillingForm}async getValues(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.getValues()}async fill(t){var e;null===(e=this.selectedFormRef)||void 0===e||e.fill(t)}async validate(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.validate()}render(){return i(a,null,i(this.showSimpleBankAccountBillingForm?"justifi-bank-account-billing-form-simple":this.showSimpleCardBillingForm?"justifi-card-billing-form-simple":"justifi-billing-form-full",{legend:this.legend,ref:t=>this.selectedFormRef=t}))}},_=class{constructor(e){t(this,e),this.variant="primary",this.type="button"}render(){return i(r,{key:"e3b353dac8bf4c078fed17a4854c6ee1891df140"},i(b,{key:"76bfcc8763775a3442fe7f8c307400c1fa829da0",variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,class:this.class,type:this.type,disabled:this.disabled,style:this.customStyle},this.text))}},x=t=>{const{isReady:e}=t;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(m,{height:"18px",width:"100px"}),i(m,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(m,{height:"18px",width:"80px"}),i(m,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(m,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(m,{height:"18px",width:"30px"}),i(m,{height:"36px"}))))},P=class{constructor(e){t(this,e),this.isReady=!1}async componentWillLoad(){await o(),this.iframeOrigin=c.iframeOrigin,n(),this.analytics=new d(this)}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){const t=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),i=await this.expirationYearIframeElement.validate(),s=await this.cvvIframeElement.validate();return t&&e&&i&&s}async tokenize({clientId:t,paymentMethodMetadata:e,account:i}){return this.cardNumberIframeElement.tokenize(t,e,i)}render(){return i(r,{key:"0db53b1dace76a8e02bab9f65fdc70e20f440a62"},i(x,{key:"ea756f1799b01b81a678ce5bd2592551edd81211",isReady:this.isReady}),i("hidden-input",{key:"a6203630db26bfbb683e2b45174c79d753154eda"}),i("div",{key:"dbb6328ba3a27106474f6b9af6fc3c347b99ae7d",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"64055e42612ce94da35022d7e8314ed917f90f8a",class:"mb-3"},i("iframe-input",{key:"e99008d298b6ec6e22ff5a4e73042e3e8805f09b",inputId:"cardNumber",ref:t=>this.cardNumberIframeElement=t,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber`})),i("div",{key:"34ed1849877a47fe6ec32f443472fa9c913dae67",class:"row"},i("div",{key:"39bfdd5c8dd6271315a09cd3022083fe4b45f5ea",class:"col-4 align-content-end"},i("iframe-input",{key:"981b65ebd142396312d09df8927fd5d08a5dea72",inputId:"expirationMonth",ref:t=>this.expirationMonthIframeElement=t,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth`})),i("div",{key:"a6fee6c1cc609b665b3ba9935190a43a118c5e5c",class:"col-4 align-content-end"},i("iframe-input",{key:"257b738139e182dc6e9f6a6893f8b6a0bc3f6b69",inputId:"expirationYear",ref:t=>this.expirationYearIframeElement=t,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear`})),i("div",{key:"523316b64f673cdf89b5d01c1ecf4cf25ccef246",class:"col-4 align-content-end"},i("iframe-input",{key:"37305b54e421d759ded57b0f9de7743a07be4b5b",inputId:"CVV",ref:t=>this.cvvIframeElement=t,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV`})))))}},O=class{constructor(i){t(this,i),this.checkboxChanged=e(this,"checkboxChanged"),this.label="Save New Payment Method",this.isChecked=!1,this.handleCheckboxChange=(t,e)=>{this.isChecked=e,f.savePaymentMethod=e,this.checkboxChanged.emit(this.isChecked)}}render(){return i(r,{key:"9aa9ce812c0cb2fdc809c47060ed150903ad7cd5"},i("form-control-checkbox",{key:"596bc9a145e363c751c8610f4b9f23ad31dab299",label:this.label||"Save New Payment Method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange}))}};export{w as internal_tokenize_payment_method,C as justifi_bank_account_form,M as justifi_billing_form,_ as justifi_button,P as justifi_card_form,y as justifi_radio_list_item,O as justifi_save_new_payment_method}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,r as e,c as i,H as s,g as n}from"./p-DwYM91AU.js";import{A as a}from"./p-C8yN3uBj.js";import{S as o}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{S as r}from"./p-c7MCfTgE.js";import{c as l,o as c,g as h,a as d,b as u}from"./p-DU8dqq9U.js";import{D as p,r as y}from"./p-wtuY7MT2.js";import{f as m}from"./p-BS7OgSQe.js";import{H as v}from"./p-zNSPsvs3.js";import{H as M,b as f,h as g,i as b}from"./p-nrZ9yHcl.js";import{H as k}from"./p-C-2kW6Al.js";import{J as w,c as A}from"./p-XqsvHFg_.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as j,a as T,b as N}from"./p-Cjcsf8ku.js";import{I as P}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as E,a as I}from"./p-D2muobcE.js";import{C}from"./p-BItPr6Gj.js";import{P as D,a as S,b as x}from"./p-DCIW8z1f.js";import{C as O}from"./p-ZpPDShvP.js";import"./p-BYsgavgS.js";import"./p-DUwyoa82.js";var L,z,R,_,U;!function(t){t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_FAILURE="STATUS_FAILURE"}(L||(L={})),function(t){t.PLAIN="plain",t.BUY="buy",t.SET_UP="set-up",t.DONATE="donate",t.CHECK_OUT="check-out",t.BOOK="book",t.SUBSCRIBE="subscribe"}(z||(z={})),function(t){t.BLACK="black",t.WHITE="white",t.WHITE_OUTLINE="white-outline"}(R||(R={})),function(t){t.SUPPORTS_3DS="supports3DS",t.SUPPORTS_EMV="supportsEMV",t.SUPPORTS_CREDIT="supportsCredit",t.SUPPORTS_DEBIT="supportsDebit"}(_||(_={}));class B{constructor(t){this.merchantIdentifier=t.merchantIdentifier,this.displayName=t.displayName,this.initiative=t.initiative,this.initiativeContext=t.initiativeContext,this.buttonType=t.buttonType||z.PLAIN,this.buttonStyle=t.buttonStyle||R.BLACK,this.buttonLocale=t.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class Y{constructor(t){this.countryCode=t.countryCode,this.currencyCode=t.currencyCode,this.merchantCapabilities=t.merchantCapabilities,this.supportedNetworks=t.supportedNetworks,this.total=t.total,this.lineItems=t.lineItems,this.shippingMethods=t.shippingMethods,this.applicationData=t.applicationData,this.supportedCountries=t.supportedCountries}get isValid(){var t,e,i,s;return!!(this.countryCode&&this.currencyCode&&(null===(t=this.merchantCapabilities)||void 0===t?void 0:t.length)&&(null===(e=this.supportedNetworks)||void 0===e?void 0:e.length)&&(null===(i=this.total)||void 0===i?void 0:i.label)&&(null===(s=this.total)||void 0===s?void 0:s.amount))}}class Q{static isApplePaySupported(){var t;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.supportsVersion(3))}static canMakePayments(){var t;return this.isApplePaySupported()&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(t){var e;if(!this.isApplePaySupported())return!1;try{return await(null===(e=window.ApplePaySession)||void 0===e?void 0:e.canMakePaymentsWithActiveCard(t))||!1}catch(t){return console.error("Error checking Apple Pay active card:",t),!1}}static formatAmount(t){return(t/100).toFixed(2)}static parseAmount(t){return Math.round(100*parseFloat(t))}static createLineItem(t,e,i="final"){return{label:t,amount:this.formatAmount(e),type:i}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[_.SUPPORTS_3DS,_.SUPPORTS_EMV,_.SUPPORTS_CREDIT,_.SUPPORTS_DEBIT]}}!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"}(U||(U={}));class F{constructor(){this.api=a()}initialize(t){if(this.applePayConfig=new B(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.host,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 Q.isApplePaySupported()&&Q.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await Q.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 Y(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:U.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:U.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:U.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async n=>{try{const a=n.payment,o=Object.assign(Object.assign({},a.token),{product_details:{name:this.currentPaymentRequest.total.label,price:Q.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),r=await this.processPayment(i,s,o);r.success?(this.currentSession.completePayment({status:L.STATUS_SUCCESS}),t({success:!0,token:a.token,paymentMethodId:r.data.id})):(console.error("PSP reported payment failure:",r.data),this.currentSession.completePayment({status:L.STATUS_FAILURE}),e({success:!1,error:{code:U.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:L.STATUS_FAILURE}),e({success:!1,error:{code:U.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:L.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:U.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:U.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:Q.getDefaultMerchantCapabilities(),supportedNetworks:Q.getDefaultSupportedNetworks(),total:Q.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const V=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(r,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},H=e=>t("div",{class:"apple-pay-button-container"},t("button",Object.assign({class:(()=>{let t="apple-pay-button";switch(e.buttonStyle){case R.WHITE:t+=" apple-pay-button-white";break;case R.WHITE_OUTLINE:t+=" apple-pay-button-white-outline";break;default:t+=" apple-pay-button-black"}switch(e.buttonType){case z.BUY:t+=" apple-pay-button-type-buy";break;case z.DONATE:t+=" apple-pay-button-type-donate";break;default:t+=" apple-pay-button-type-plain"}return(e.disabled||e.isProcessing||!e.isAvailable)&&(t+=" disabled"),t})(),style:{width:e.width,height:e.height},onClick:()=>{!e.disabled&&!e.isProcessing&&e.isAvailable&&e.clickHandler&&e.clickHandler()},disabled:e.disabled||e.isProcessing||!e.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},e),e.isProcessing&&t("div",{class:"processing-overlay"},t("div",{class:"spinner"}),t("span",null,"Processing..."))),t("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 ")),W=class{constructor(t){e(this,t),this.applePayStarted=i(this,"applePayStarted"),this.applePayCompleted=i(this,"applePayCompleted"),this.applePayCancelled=i(this,"applePayCancelled"),this.applePayError=i(this,"applePayError"),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=z.PLAIN,this.buttonStyle=R.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;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:l.paymentCurrency,merchantCapabilities:[_.SUPPORTS_3DS,_.SUPPORTS_CREDIT,_.SUPPORTS_DEBIT],supportedNetworks:Q.getDefaultSupportedNetworks(),total:Q.createLineItem(l.paymentDescription,l.paymentAmount)},s=await this.applePayService.startPaymentSession(i,l.authToken,l.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)||W.ErrorCode.PAYMENT_FAILED}))}catch(t){const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:W.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(l.paymentAmount)&&Boolean(l.paymentCurrency)&&Boolean(l.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:l.paymentAmount,paymentCurrency:l.paymentCurrency,hasAuthToken:Boolean(l.authToken),accountId:l.accountId}),this.applePayError.emit({error:this.error,code:W.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=Q.isApplePaySupported(),this.canMakePayments=Q.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:W.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:W.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 F,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:W.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?Q.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!l.applePayEnabled)return null;const e=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return t(o,null,l.checkoutLoaded&&t("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{this.initializeApplePay()}}),t("div",{class:"apple-pay-container"},t(V,{isLoading:this.isLoading}),e&&t(H,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),t("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};W.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const Z=class{constructor(t){e(this,t)}render(){return t(o,{key:"fd2c61dcafdc800d0064c19d29c6e007aed5adb5"},t("section",{key:"f2abef1233f3ccad3982d10c61ec5765e13e27a5"},t("div",{key:"713d66ef6f7e2fc73135e765069baba6df976f52"},t("div",{key:"b8dd28f257948aa317366fe3ea6d2bc4911ef164",part:p},null==l?void 0:l.paymentDescription),t("div",{key:"675676b40de7dc27d07bfafc0eee77eb855a3d26"},t("span",{key:"cbd47994d9c3f1518741a298de3f5d62a0ad5313",part:p},"Total")," ",t("span",{key:"614748853f666f1b072d4fa9b14ee15ef5717112",part:p},m(+(null==l?void 0:l.totalAmount)))))))}},q=class{constructor(t){e(this,t),this.levels={h1:v,h2:M,h3:k},this.level="h1"}render(){return t(o,{key:"d4871da09451d40b27220a207ee72317ed9b1b9f"},t(this.levels[this.level],{key:"f7de159fa6395ef4024f48b868369f8d10edf64e",text:this.text,class:this.class}))}},G=a();class X{async getLinkToken(t,e,i,s){return G.post({endpoint:`plaid/${e}/link`,body:{checkout_id:i},authToken:t,signal:s})}async tokenizeBankAccount(t,e,i,s,n,a){const o=`plaid/${e}/tokenize`,r={public_token:i};return s&&(r.link_token_id=s),n&&(r.payment_method_group_id=n),G.post({endpoint:o,body:r,authToken:t,signal:a})}}const J=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.checkoutChangedEvent=i(this,"checkout-changed"),this.plaidService=new X,this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:n}=t.detail;e&&i?(l.paymentToken=s,l.selectedPaymentMethod={type:D.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:T.TOKENIZE_ERROR,severity:j.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:j.ERROR})},this.handleApplePayCancelled=()=>{l.paymentToken=void 0,l.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),l.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new C};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:n})=>{var a;try{const o=await i.fetchCheckout(t,e);if(o.error)return n({error:I(o.error),code:E(null===(a=o.error)||void 0===a?void 0:a.code),severity:j.ERROR});s({checkout:o.data})}catch(t){const e=E(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:j.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:n,onError:a})=>{var o;try{const r=await i.complete(t,e,s);if(r.error)return a({error:I(r.error),code:E(null===(o=r.error)||void 0===o?void 0:o.code),severity:j.ERROR});n({checkout:r.data})}catch(t){const e=E(null==t?void 0:t.code);return a({error:t.message||t,code:e,severity:j.ERROR})}})(t),c((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new w(this),A(),l.authToken=this.authToken,this.fetchCheckout(),f("set",(t=>{const e=b[t];void 0!==e&&g(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners()}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:N.CHECKOUT_EXPIRED,errorCode:T.CHECKOUT_EXPIRED,severity:j.ERROR}):this.errorEvent.emit({message:N.CHECKOUT_ALREADY_COMPLETED,errorCode:T.CHECKOUT_ALREADY_COMPLETED,severity:j.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:N.NOT_AUTHENTICATED,errorCode:T.NOT_AUTHENTICATED,severity:j.ERROR})}updateStore(t){var e,i,s,n,a,o;l.accountId=t.account_id,l.checkoutLoaded=!0,l.paymentMethods=t.payment_methods.map((t=>new S(t))),l.paymentMethodGroupId=t.payment_method_group_id,l.paymentDescription=t.payment_description,l.totalAmount=t.total_amount,l.paymentAmount=t.payment_amount,l.bnplEnabled=t.payment_settings.bnpl_payments,l.insuranceEnabled=t.payment_settings.insurance_payments,l.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,l.applePayEnabled=null===(i=t.payment_settings)||void 0===i?void 0:i.apple_payments,l.bnplProviderClientId=null===(s=null==t?void 0:t.bnpl)||void 0===s?void 0:s.provider_client_id,l.bnplProviderMode=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_mode,l.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,l.bnplProviderCheckoutUrl=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:h(),selectedPaymentMethod:l.selectedPaymentMethod,savedPaymentMethods:l.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),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))}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:{},a=Object.assign(Object.assign({},t),n),o=Object.assign({accountId:l.accountId,payment_method_group_id:void 0},a);l.savePaymentMethod&&(o.payment_method_group_id=l.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:o,account:l.accountId}));return r.error?r:(l.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){l.selectedPaymentMethod=t,l.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];l.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=l.selectedPaymentMethod)||void 0===t?void 0:t.type)===D.NEW_CARD,n=(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)===D.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:T.VALIDATION_ERROR,severity:j.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,n,a;const o=await this.validate();if(!l.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:T.VALIDATION_ERROR,severity:j.ERROR});const r=(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)===D.NEW_CARD,c=(null===(i=l.selectedPaymentMethod)||void 0===i?void 0:i.type)===D.NEW_BANK_ACCOUNT,h=(null===(s=l.selectedPaymentMethod)||void 0===s?void 0:s.type)===D.PLAID;if(r||c){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:T.TOKENIZE_ERROR,severity:j.ERROR})}if(h&&!l.paymentToken){const t=l.plaidPublicToken,e=l.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:T.TOKENIZE_ERROR,severity:j.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(l.authToken,l.accountId,t,e||void 0,l.savePaymentMethod?l.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:T.TOKENIZE_ERROR,severity:j.ERROR});const s=null==i?void 0:i.data,a=(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);l.paymentToken=a}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:T.TOKENIZE_ERROR,severity:j.ERROR})}}if(!o)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:T.VALIDATION_ERROR,severity:j.ERROR});if(!l.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:T.TOKENIZE_ERROR,severity:j.ERROR});let u;if(u={payment_mode:(t=>{switch(t){case D.NEW_CARD:case D.SAVED_CARD:case D.NEW_BANK_ACCOUNT:case D.SAVED_BANK_ACCOUNT:case D.PLAID:return x.ECOM;case D.SEZZLE:return x.BNPL;case D.APPLE_PAY:return x.APPLE_PAY;default:return}})(null===(a=l.selectedPaymentMethod)||void 0===a?void 0:a.type),payment_token:l.paymentToken},this.preCompleteHook){const t=d();try{await new Promise(((e,i)=>{this.preCompleteHook(t,(()=>e()),(()=>i()))}))}catch(t){return}}this.completeCheckout({payment:u,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:T.COMPLETE_CHECKOUT_ERROR,severity:j.ERROR})}})}render(){return t(s,{key:"56a003ca1e1ac4bdc1baa8f862cdb05b2d8af4b1"})}get hostEl(){return n(this)}};var $;!function(t){t.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",t.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",t.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",t.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",t.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",t.PLAID_TOKEN_EXPIRED="plaid-token-expired",t.PLAID_NETWORK_ERROR="plaid-network-error",t.PLAID_USER_CANCELLED="plaid-user-cancelled",t.PLAID_TIMEOUT="plaid-timeout",t.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",t.PLAID_ACCOUNT_LOCKED="plaid-account-locked",t.PLAID_MAINTENANCE="plaid-maintenance",t.PLAID_RATE_LIMITED="plaid-rate-limited"}($||($={}));const K={[$.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[$.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[$.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[$.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[$.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[$.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[$.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[$.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[$.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[$.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[$.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[$.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[$.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},tt={[$.PLAID_SDK_LOAD_FAILED]:j.ERROR,[$.PLAID_LINK_INIT_FAILED]:j.ERROR,[$.PLAID_LINK_TOKEN_FAILED]:j.ERROR,[$.PLAID_AUTHENTICATION_FAILED]:j.ERROR,[$.PLAID_BANK_NOT_SUPPORTED]:j.WARNING,[$.PLAID_TOKEN_EXPIRED]:j.WARNING,[$.PLAID_NETWORK_ERROR]:j.WARNING,[$.PLAID_USER_CANCELLED]:j.INFO,[$.PLAID_TIMEOUT]:j.WARNING,[$.PLAID_INVALID_CREDENTIALS]:j.ERROR,[$.PLAID_ACCOUNT_LOCKED]:j.ERROR,[$.PLAID_MAINTENANCE]:j.WARNING,[$.PLAID_RATE_LIMITED]:j.WARNING},et=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.plaidError=i(this,"plaidError"),this.plaidErrorRecovered=i(this,"plaidErrorRecovered"),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 X,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{l.authToken&&l.accountId&&l.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:$.PLAID_SDK_LOAD_FAILED,message:K[$.PLAID_SDK_LOAD_FAILED],severity:tt[$.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:$.PLAID_LINK_TOKEN_FAILED,message:K[$.PLAID_LINK_TOKEN_FAILED],severity:tt[$.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:$.PLAID_LINK_INIT_FAILED,message:K[$.PLAID_LINK_INIT_FAILED],severity:tt[$.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,n;try{if(!l.authToken||!l.accountId)return void this.handleError({code:$.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:j.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(l.authToken,l.accountId,l.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&&(l.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let a=$.PLAID_LINK_TOKEN_FAILED,o=K[a],r=!0;"AbortError"===t.name?(a=$.PLAID_TIMEOUT,o=K[a],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"))?(a=$.PLAID_NETWORK_ERROR,o=K[a],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")))&&(a=$.PLAID_INVALID_CREDENTIALS,o="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:a,message:o,severity:tt[a],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 $.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return $.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return $.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return $.PLAID_RATE_LIMITED;case"maintenance":return $.PLAID_MAINTENANCE;case"not_authenticated":return $.PLAID_INVALID_CREDENTIALS;default:return $.PLAID_LINK_TOKEN_FAILED}return $.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,l.selectedPaymentMethod={type:D.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:j.INFO}),l.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=$.PLAID_AUTHENTICATION_FAILED,i=K[e],s=!0,n="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=$.PLAID_INVALID_CREDENTIALS,i=K[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=$.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=$.PLAID_ACCOUNT_LOCKED,i=K[e],s=!1,n="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=$.PLAID_MAINTENANCE,i=K[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=$.PLAID_RATE_LIMITED,i=K[e],s=!0;break;case"INVALID_REQUEST":e=$.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=$.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 a=t.error_message.toLowerCase();a.includes("not supported")||a.includes("unsupported")?(e=$.PLAID_BANK_NOT_SUPPORTED,i=K[e],s=!1,n="Try a different payment method"):(a.includes("expired")||a.includes("timeout"))&&(e=$.PLAID_TOKEN_EXPIRED,i=K[e],s=!0)}this.handleError({code:e,message:i,severity:tt[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=l.selectedPaymentMethod)||void 0===t?void 0:t.type)===D.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)!==D.PLAID&&(l.selectedPaymentMethod={type:D.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:$.PLAID_SDK_LOAD_FAILED,message:K[$.PLAID_SDK_LOAD_FAILED],severity:tt[$.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=l.selectedPaymentMethod)||void 0===t?void 0:t.type)===D.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return l.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,l.selectedPaymentMethod={type:D.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(l.selectedPaymentMethod={type:D.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=u("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==l.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const e=t("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 t(o,{class:"payment-method"},t("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),t("div",{title:"Pay with Plaid"},t("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",e," "),(()=>this.error?t("div",{class:(this.error.severity===j.ERROR?"text-danger":this.error.severity===j.WARNING?"text-warning":"text-info")+" mt-2"},t("small",null,this.error.message),t("br",null),t("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&t("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?t("div",{class:"text-info mt-2"},t("small",null,"Connecting to your bank...")):this.publicToken?t("div",{class:"text-success mt-2"},t("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:t("div",{class:"text-muted mt-2"},t("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},it=class{constructor(t){e(this,t),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),l.selectedPaymentMethod={id:t.id,type:t.type},l.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===D.SAVED_CARD&&l.disableCreditCard||t===D.SAVED_BANK_ACCOUNT&&l.disableBankAccount)}componentWillLoad(){l.paymentMethods.length||console.warn("No saved payment methods available."),l.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return l.disablePaymentMethodGroup?null:t(o,null,t("div",{class:"saved-payment-methods"},l.paymentMethods.length?l.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((e=>t("div",{class:"radio-list-item p-3",part:y,onClick:this.onPaymentMethodOptionClick(e)},t("form-control-radio",{name:"paymentMethodType",value:null==e?void 0:e.id,checked:l.paymentToken===(null==e?void 0:e.id),label:`${O[null==e?void 0:e.brand]||""} *${null==e?void 0:e.acct_last_four}`})))):null))}},st=t("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"}}),nt=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.paymentMethodOptionId=D.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(l.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:l.bnplProviderClientId,apiMode:l.bnplProviderMode,apiVersion:l.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:l.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(){l.selectedPaymentMethod={type:D.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var e,i;return l.bnplEnabled?t(o,{class:"payment-method"},t("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),t("div",null,t("div",null,"Buy now, pay later with ",st),this.installmentPlan&&t("small",null,t("span",null,null===(e=this.installmentPlan)||void 0===e?void 0:e.installments.length)," ",t("span",null,this.installmentPlan.schedule," payments of")," ",t("span",{class:"fw-bold"},m(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}};export{W as justifi_apple_pay,Z as justifi_checkout_summary,q as justifi_header,J as justifi_modular_checkout,et as justifi_plaid_payment_method,it as justifi_saved_payment_methods,nt as justifi_sezzle_payment_method}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-DwYM91AU.js";import{l as t}from"./p-Bde7dY9t.js";import{f as s,p as i,c as r}from"./p-Uqevvbqm.js";import{y as l,z as d,A as o,B as p}from"./p-wtuY7MT2.js";import{S as f}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import{c}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import"./p-BFTU3MAI.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";const b=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{s[e]=a}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId}).forEach((([e,a])=>{a&&(i[e]=a)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:c.connected},{label:"Disconnected",value:c.disconnected},{label:"Unknown",value:c.unknown},{label:"Pending Configuration",value:c.pending_configuration},{label:"Archived",value:c.archived}]}render(){const e=Object.assign({},s);return a(f,{key:"572f99cbf9fe8b4b01a6e4e34575ba83f5c62f25"},a("table-filters-menu",{key:"21513ea58fa052e458af8a21691935cb9caed5f4",params:e,clearParams:r,part:l},a("div",{key:"6bfe4487288dacdb4c56651d7431cfffcf715755",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"9cba47fa96feb4d8cde9a54a7a98023d9b470f7a",class:"p-2"},a("form-control-text",{key:"4cf78e13a31c8f6b7efeca735d31fd298c0f465a",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:d})),a("div",{key:"1b3f105d54261c711b52d8730f99c7459c9d12e2",class:"p-2"},a("form-control-text",{key:"09f4d86fb281bd84c2a47446e4dc5b263c034d8e",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||s.terminal_order_id,disabled:!!this.terminalOrderId,part:o})),a("div",{key:"fb373b529881adee6b2bf3e3e55be3246623b956",class:"p-2"},a("form-control-select",{key:"373348087fe077b04bd76fbd3cd3d5ab85ca77b8",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status||"",disabled:!!this.terminalStatus,part:p})))))}};export{b as justifi_terminals_list_filters}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t}from"./p-DwYM91AU.js";import{r as a}from"./p-wtuY7MT2.js";import{S as s}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";const o=class{constructor(t){e(this,t)}render(){return t(s,{key:"8885a071427ab2d9e6ae371f7706ada2e4f5e5bc",class:"payment-method"},t("div",{key:"1ccfb0f7ffa2f357117e749f6a80c203406718b5",class:"radio-list-item p-3",part:a,onClick:this.clickHandler,hidden:this.radioButtonHidden},t("form-control-radio",{key:"785ee47041948799fedd4a49ce8982db04002f89",name:"paymentMethodType",value:this.paymentMethodOptionId,checked:this.isSelected,label:this.label})))}};export{o as payment_method_option}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-CPKSE7M4.js";import{p as i}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{T as a,a as r,b as h,c,d as o,e as n,f as d,g as p,h as m,i as b,j as f,k as u,l as g}from"./p-BTzt8N0l.js";import{T as l}from"./p-CZfYo5-1.js";import{t as j,a as y}from"./p-DkOiS6Zr.js";import{o as k,g as S}from"./p-Uqevvbqm.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-wtuY7MT2.js";import"./p-B-0a8Xqm.js";import"./p-DOLBAxYf.js";const v=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=i,this.pagingParams={},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").dataset.rowEntityId;if(!s)return;const e=this.terminals.find((t=>t.id===s));this.clickEvent.emit({name:l.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalsTable=new a(this.terminals,this.columns,j,y),this.getTerminals&&this.getSubAccounts&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:s})=>{this.terminals=t,this.paging=s,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await 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.terminals=this.terminals.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 terminalParams(){const t=S();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"7e7b972d8a3c58efc8fb40f1d624ada5a20e71ca"},e(r,{key:"e778996b05716c01f44b98da22f2fe3b58456454"},e(h,{key:"d01507e960cfc8bbc8d728817681fbfc4fb2e9b7"},e(c,{key:"278ca7b14f201c42bd31126fdb1da36832aea545"},this.terminalsTable.columnData.map((t=>t)))),e(o,{key:"7ed5c139ccc346e3e301298e036a9c0db60a5bed"},e(n,{key:"3abc3c6bcc4d197c7e854d607f5098798c6105f5",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),e(d,{key:"d802709566ad9f5273f07b2bc210e9ca20b6ab33",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),e(p,{key:"7a80f72254c005e10d82afe97c9e6ee0da21d887",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.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(b,{key:"72c9888413f02ca800bcbac63f98e266a2dd841d"},e(f,{key:"a56d4a7d580cdaf71466aa4b91b8d788baa9e377"},e(u,{key:"53b604f7db687d554e7e380b763fdc0b4f6ba6cd",colSpan:this.terminalsTable.columnData.length},e("pagination-menu",{key:"fa44f5486ff2d194c6ee06246e34dda7b6add4ce",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{v as terminals_list_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{P as o}from"./p-D0YDz3L6.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as r,a as e}from"./p-Cjcsf8ku.js";import{d as a}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as p,a as h}from"./p-D2muobcE.js";import{E as n}from"./p-BNqo3kt0.js";import{c as m,J as c}from"./p-XqsvHFg_.js";import{m as d}from"./p-DYGIC0QH.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-wtuY7MT2.js";import"./p-DUwyoa82.js";const u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.enableRecordClick=!1,this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){m(),this.analytics=new c(this),this.initializeServices()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:e})=>{var n;try{const m=await i.fetchPayout(t,s);m.error?e({error:h(m.error),code:p(null===(n=m.error)||void 0===n?void 0:n.code),severity:r.ERROR}):o(new a(m.data))}catch(t){e({error:h(t),code:p(null==t?void 0:t.code),severity:r.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new o}),this.getPayoutCSV=d({authToken:this.authToken,service:new o})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:e.MISSING_PROPS,severity:r.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent,enableRecordClick:this.enableRecordClick})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payout_details}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s,r as t,c as i}from"./p-DwYM91AU.js";import{A as e}from"./p-C8yN3uBj.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as l}from"./p-XqsvHFg_.js";import{c as h}from"./p-DU8dqq9U.js";import{p as d,f as p,r as u,j as v}from"./p-BS7OgSQe.js";import{v as m,i as y,a as f,H as j}from"./p-nrZ9yHcl.js";import{D as g,E as _}from"./p-wtuY7MT2.js";import{S as w}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{S as C}from"./p-c7MCfTgE.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-DUwyoa82.js";import"./p-DCIW8z1f.js";import"./p-HXpYMWUU.js";const k=e();class T{async fetchQuote(s,t){return k.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return k.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const b=()=>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"),this.errorEvent=i(this,"error-event"),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",g),s=>v(s,"p","part",g)])}componentWillLoad(){c(),this.analytics=new l(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 T};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),y[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,f[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),y[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 f[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(w,null,this.isLoading?s(b,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:g,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:_},"Please select an option"),s("small",{part:g,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{H as justifi_season_interruption_insurance}
|