@justifi/webcomponents 6.0.6-rc.3 → 6.0.6-rc.4
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/{check-pkg-version-D2O-HBMD.js → check-pkg-version-DDYyouYC.js} +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +3 -2
- package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkout.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +2 -2
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +2 -2
- package/dist/cjs/{package-B8AreocB.js → package-VjPC5nqK.js} +1 -1
- package/dist/collection/ui-components/apple-pay-button.js +1 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{check-pkg-version-f6satvrI.js → check-pkg-version-D0SJTGUq.js} +1 -1
- package/dist/esm/hidden-input_2.entry.js +1 -1
- package/dist/esm/justifi-apple-pay_8.entry.js +3 -2
- package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +2 -2
- package/dist/esm/justifi-business-form.entry.js +2 -2
- package/dist/esm/justifi-checkout.entry.js +2 -2
- package/dist/esm/justifi-checkouts-list.entry.js +2 -2
- package/dist/esm/justifi-dispute-management.entry.js +2 -2
- package/dist/esm/justifi-dispute-notification_3.entry.js +2 -2
- package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
- package/dist/esm/justifi-order-terminals.entry.js +2 -2
- package/dist/esm/justifi-payment-details.entry.js +2 -2
- package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
- package/dist/esm/justifi-payment-transactions-list.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +2 -2
- package/dist/esm/justifi-payout-details.entry.js +2 -2
- package/dist/esm/justifi-payout-transactions-list.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +2 -2
- package/dist/esm/justifi-refund-payment.entry.js +2 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +2 -2
- package/dist/esm/justifi-terminal-orders-list.entry.js +2 -2
- package/dist/esm/justifi-terminals-list.entry.js +2 -2
- package/dist/esm/{package-DOrxxtCs.js → package-NMTsmUsG.js} +1 -1
- package/dist/module/apple-pay.js +1 -0
- package/dist/module/package.js +1 -1
- package/dist/webcomponents/p-02c1d94b.entry.js +1 -0
- package/dist/webcomponents/{p-bf5593bb.entry.js → p-03e1d695.entry.js} +1 -1
- package/dist/webcomponents/{p-2dfbbc7a.entry.js → p-125b8d74.entry.js} +1 -1
- package/dist/webcomponents/{p-cf26936c.entry.js → p-1d5f8765.entry.js} +1 -1
- package/dist/webcomponents/{p-51ac9f40.entry.js → p-20c458f7.entry.js} +1 -1
- package/dist/webcomponents/p-2e82ff3a.entry.js +1 -0
- package/dist/webcomponents/{p-293c4517.entry.js → p-336db71a.entry.js} +1 -1
- package/dist/webcomponents/{p-96694f7d.entry.js → p-50b811f4.entry.js} +1 -1
- package/dist/webcomponents/{p-7f018623.entry.js → p-5ccb728c.entry.js} +1 -1
- package/dist/webcomponents/p-69e5695c.entry.js +1 -0
- package/dist/webcomponents/{p-38668717.entry.js → p-6be4cdf0.entry.js} +1 -1
- package/dist/webcomponents/p-702a1d50.entry.js +1 -0
- package/dist/webcomponents/{p-c9cfab30.entry.js → p-73ebd7e7.entry.js} +1 -1
- package/dist/webcomponents/{p-24817d58.entry.js → p-7b6027c4.entry.js} +1 -1
- package/dist/webcomponents/p-7c20ec17.entry.js +1 -0
- package/dist/webcomponents/p-7f5df31e.entry.js +1 -0
- package/dist/webcomponents/{p-6df72e0f.entry.js → p-8590f629.entry.js} +1 -1
- package/dist/webcomponents/{p-Cq_f4KEI.js → p-BSyMsqda.js} +1 -1
- package/dist/webcomponents/p-NMTsmUsG.js +1 -0
- package/dist/webcomponents/{p-a5fc94fe.entry.js → p-a849d9e2.entry.js} +1 -1
- package/dist/webcomponents/{p-17abfc00.entry.js → p-adeff733.entry.js} +1 -1
- package/dist/webcomponents/{p-3ff3bb90.entry.js → p-ae7fb4f2.entry.js} +1 -1
- package/dist/webcomponents/{p-451c8e1b.entry.js → p-c194d17a.entry.js} +1 -1
- package/dist/webcomponents/{p-be5c5154.entry.js → p-f46fb2d9.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-88fcb530.entry.js +0 -1
- package/dist/webcomponents/p-8be7fbf6.entry.js +0 -1
- package/dist/webcomponents/p-8f84883e.entry.js +0 -1
- package/dist/webcomponents/p-DOrxxtCs.js +0 -1
- package/dist/webcomponents/p-abbe97eb.entry.js +0 -1
- package/dist/webcomponents/p-cc5c6425.entry.js +0 -1
- package/dist/webcomponents/p-d2b922cc.entry.js +0 -1
|
@@ -7,7 +7,7 @@ import './Business-BCoP0TAV.js';
|
|
|
7
7
|
import './Dispute-BH0Xfn-F.js';
|
|
8
8
|
import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
|
|
9
9
|
import { E as ErrorState } from './utils-DRwofES0.js';
|
|
10
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
10
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
11
11
|
import './config-state-DiHV-4QK.js';
|
|
12
12
|
import './index-DJ9G-4S-.js';
|
|
13
13
|
import './utils-BOijEGPV.js';
|
|
@@ -15,7 +15,7 @@ import './dinero-HXpYMWUU.js';
|
|
|
15
15
|
import './helpers-Mu7LQT-w.js';
|
|
16
16
|
import './state-options-BX8GieXu.js';
|
|
17
17
|
import './parts-xDbRW9xn.js';
|
|
18
|
-
import './package-
|
|
18
|
+
import './package-NMTsmUsG.js';
|
|
19
19
|
|
|
20
20
|
const api = Api();
|
|
21
21
|
class ReportsService {
|
|
@@ -2,7 +2,7 @@ import { h, r as registerInstance, c as createEvent } from './index-DOjVAAtq.js'
|
|
|
2
2
|
import { am as heading5, aj as heading4, af as buttonPrimary, D as text } from './parts-xDbRW9xn.js';
|
|
3
3
|
import { S as StyledHost } from './styled-host-OalOsPBp.js';
|
|
4
4
|
import './event-types-CZfYo5-1.js';
|
|
5
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
5
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
6
6
|
import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError-Cjcsf8ku.js';
|
|
7
7
|
import { B as BusinessService } from './business.service-D55OVyco.js';
|
|
8
8
|
import { B as Business } from './Business-BCoP0TAV.js';
|
|
@@ -16,7 +16,7 @@ import './Dispute-BH0Xfn-F.js';
|
|
|
16
16
|
import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
|
|
17
17
|
import { T as TerminalService } from './terminal.service-l6zTIPZ3.js';
|
|
18
18
|
import { l as formatPhoneNumber } from './utils-BOijEGPV.js';
|
|
19
|
-
import './package-
|
|
19
|
+
import './package-NMTsmUsG.js';
|
|
20
20
|
import './Api-DhiA2e_P.js';
|
|
21
21
|
import './helpers-Mu7LQT-w.js';
|
|
22
22
|
import './state-options-BX8GieXu.js';
|
|
@@ -3,7 +3,7 @@ import { P as PaymentService } from './payment.service-BoQ1MW1k.js';
|
|
|
3
3
|
import { m as makeGetPaymentDetails } from './get-payment-details-sGoWyAat.js';
|
|
4
4
|
import { E as ErrorState } from './utils-DRwofES0.js';
|
|
5
5
|
import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError-Cjcsf8ku.js';
|
|
6
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
6
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
7
7
|
import './Api-DhiA2e_P.js';
|
|
8
8
|
import './config-state-DiHV-4QK.js';
|
|
9
9
|
import './index-DJ9G-4S-.js';
|
|
@@ -17,7 +17,7 @@ import './helpers-Mu7LQT-w.js';
|
|
|
17
17
|
import './state-options-BX8GieXu.js';
|
|
18
18
|
import './utils-BeQLScSm.js';
|
|
19
19
|
import './parts-xDbRW9xn.js';
|
|
20
|
-
import './package-
|
|
20
|
+
import './package-NMTsmUsG.js';
|
|
21
21
|
|
|
22
22
|
const PaymentDetails = class {
|
|
23
23
|
constructor(hostRef) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-DOjVAAtq.js';
|
|
2
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
2
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
3
3
|
import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError-Cjcsf8ku.js';
|
|
4
4
|
import { m as makeGetBusiness, a as makePostProvisioning } from './payment-provisioning-actions-ONP8lDnV.js';
|
|
5
5
|
import { B as BusinessService } from './business.service-D55OVyco.js';
|
|
@@ -8,7 +8,7 @@ import './Refund-B-iOTRxz.js';
|
|
|
8
8
|
import './Pagination-CLHwhyvu.js';
|
|
9
9
|
import './Business-BCoP0TAV.js';
|
|
10
10
|
import './Dispute-BH0Xfn-F.js';
|
|
11
|
-
import './package-
|
|
11
|
+
import './package-NMTsmUsG.js';
|
|
12
12
|
import './utils-BeQLScSm.js';
|
|
13
13
|
import './config-state-DiHV-4QK.js';
|
|
14
14
|
import './index-DJ9G-4S-.js';
|
|
@@ -6,7 +6,7 @@ import { g as PaymentBalanceTransaction } from './Refund-B-iOTRxz.js';
|
|
|
6
6
|
import { p as pagingDefaults } from './Pagination-CLHwhyvu.js';
|
|
7
7
|
import './Business-BCoP0TAV.js';
|
|
8
8
|
import './Dispute-BH0Xfn-F.js';
|
|
9
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
9
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
10
10
|
import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
|
|
11
11
|
import { P as PaymentService } from './payment.service-BoQ1MW1k.js';
|
|
12
12
|
import { T as Table, l as TableWrapper, a as TableComponent, b as TableHead, c as TableHeadRow, d as TableBody, e as TableLoadingState, f as TableEmptyState, g as TableErrorState, h as TableRow, i as TableFoot, j as TableFootRow, k as TableFootCell } from './table-Bj20uWfu.js';
|
|
@@ -17,7 +17,7 @@ import { S as tableHeadCell, T as getAlternateTableCellPart } from './parts-xDbR
|
|
|
17
17
|
import './index-DJ9G-4S-.js';
|
|
18
18
|
import './helpers-Mu7LQT-w.js';
|
|
19
19
|
import './state-options-BX8GieXu.js';
|
|
20
|
-
import './package-
|
|
20
|
+
import './package-NMTsmUsG.js';
|
|
21
21
|
import './Api-DhiA2e_P.js';
|
|
22
22
|
import './spinner-CYXkn1fh.js';
|
|
23
23
|
|
|
@@ -8,7 +8,7 @@ import './Pagination-CLHwhyvu.js';
|
|
|
8
8
|
import './Business-BCoP0TAV.js';
|
|
9
9
|
import './Dispute-BH0Xfn-F.js';
|
|
10
10
|
import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
|
|
11
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
11
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
12
12
|
import { S as StyledHost } from './styled-host-OalOsPBp.js';
|
|
13
13
|
import './event-types-CZfYo5-1.js';
|
|
14
14
|
import { d as defaultColumnsKeys } from './payments-table-D_BlyU1F.js';
|
|
@@ -17,7 +17,7 @@ import './utils-BOijEGPV.js';
|
|
|
17
17
|
import './index-DJ9G-4S-.js';
|
|
18
18
|
import './helpers-Mu7LQT-w.js';
|
|
19
19
|
import './state-options-BX8GieXu.js';
|
|
20
|
-
import './package-
|
|
20
|
+
import './package-NMTsmUsG.js';
|
|
21
21
|
import './payments-status-cvtVmtY5.js';
|
|
22
22
|
import './badge-CtdO-tEY.js';
|
|
23
23
|
import './parts-xDbRW9xn.js';
|
|
@@ -9,7 +9,7 @@ import './Business-BCoP0TAV.js';
|
|
|
9
9
|
import './Dispute-BH0Xfn-F.js';
|
|
10
10
|
import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
|
|
11
11
|
import { E as ErrorState } from './utils-DRwofES0.js';
|
|
12
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
12
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
13
13
|
import { m as makeGetPayoutCSV } from './get-payout-csv-D-Lnooki.js';
|
|
14
14
|
import './Api-DhiA2e_P.js';
|
|
15
15
|
import './utils-BOijEGPV.js';
|
|
@@ -17,7 +17,7 @@ import './index-DJ9G-4S-.js';
|
|
|
17
17
|
import './helpers-Mu7LQT-w.js';
|
|
18
18
|
import './state-options-BX8GieXu.js';
|
|
19
19
|
import './parts-xDbRW9xn.js';
|
|
20
|
-
import './package-
|
|
20
|
+
import './package-NMTsmUsG.js';
|
|
21
21
|
|
|
22
22
|
const makeGetPayoutDetails = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
|
|
23
23
|
var _a;
|
|
@@ -6,7 +6,7 @@ import { h as PayoutBalanceTransaction } from './Refund-B-iOTRxz.js';
|
|
|
6
6
|
import { p as pagingDefaults } from './Pagination-CLHwhyvu.js';
|
|
7
7
|
import './Business-BCoP0TAV.js';
|
|
8
8
|
import './Dispute-BH0Xfn-F.js';
|
|
9
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
9
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
10
10
|
import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
|
|
11
11
|
import { P as PayoutService } from './payout.service-xcBdom3q.js';
|
|
12
12
|
import { T as Table, l as TableWrapper, a as TableComponent, b as TableHead, c as TableHeadRow, d as TableBody, e as TableLoadingState, f as TableEmptyState, g as TableErrorState, h as TableRow, i as TableFoot, j as TableFootRow, k as TableFootCell } from './table-Bj20uWfu.js';
|
|
@@ -17,7 +17,7 @@ import { S as tableHeadCell, T as getAlternateTableCellPart } from './parts-xDbR
|
|
|
17
17
|
import './index-DJ9G-4S-.js';
|
|
18
18
|
import './helpers-Mu7LQT-w.js';
|
|
19
19
|
import './state-options-BX8GieXu.js';
|
|
20
|
-
import './package-
|
|
20
|
+
import './package-NMTsmUsG.js';
|
|
21
21
|
import './Api-DhiA2e_P.js';
|
|
22
22
|
import './spinner-CYXkn1fh.js';
|
|
23
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-DOjVAAtq.js';
|
|
2
2
|
import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError-Cjcsf8ku.js';
|
|
3
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
3
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
4
4
|
import { P as PayoutService } from './payout.service-xcBdom3q.js';
|
|
5
5
|
import './config-state-DiHV-4QK.js';
|
|
6
6
|
import './dinero-HXpYMWUU.js';
|
|
@@ -14,7 +14,7 @@ import { m as makeGetSubAccounts, S as SubAccountService } from './get-subaccoun
|
|
|
14
14
|
import { S as StyledHost } from './styled-host-OalOsPBp.js';
|
|
15
15
|
import './event-types-CZfYo5-1.js';
|
|
16
16
|
import { d as defaultColumnsKeys } from './payouts-table-Clj8YGLV.js';
|
|
17
|
-
import './package-
|
|
17
|
+
import './package-NMTsmUsG.js';
|
|
18
18
|
import './Api-DhiA2e_P.js';
|
|
19
19
|
import './utils-BOijEGPV.js';
|
|
20
20
|
import './index-DJ9G-4S-.js';
|
|
@@ -12,7 +12,7 @@ import { S as StyledHost } from './styled-host-OalOsPBp.js';
|
|
|
12
12
|
import './event-types-CZfYo5-1.js';
|
|
13
13
|
import { P as PaymentService } from './payment.service-BoQ1MW1k.js';
|
|
14
14
|
import { m as makeGetPaymentDetails } from './get-payment-details-sGoWyAat.js';
|
|
15
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
15
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
16
16
|
import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
|
|
17
17
|
import { A as Api } from './Api-DhiA2e_P.js';
|
|
18
18
|
import { S as Skeleton } from './skeleton-B8EUwt4b.js';
|
|
@@ -22,7 +22,7 @@ import './index-DJ9G-4S-.js';
|
|
|
22
22
|
import './helpers-Mu7LQT-w.js';
|
|
23
23
|
import './state-options-BX8GieXu.js';
|
|
24
24
|
import './parts-xDbRW9xn.js';
|
|
25
|
-
import './package-
|
|
25
|
+
import './package-NMTsmUsG.js';
|
|
26
26
|
|
|
27
27
|
const amountValidation = (maxAmount) => {
|
|
28
28
|
const max = +maxAmount;
|
|
@@ -6,7 +6,7 @@ import './Pagination-CLHwhyvu.js';
|
|
|
6
6
|
import './Business-BCoP0TAV.js';
|
|
7
7
|
import './Dispute-BH0Xfn-F.js';
|
|
8
8
|
import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
|
|
9
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
9
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
10
10
|
import { c as checkoutStore } from './checkout.store-4nUf2OuT.js';
|
|
11
11
|
import { p as processHTML, f as formatCurrency, r as removeAttribute, j as addAttribute } from './utils-BOijEGPV.js';
|
|
12
12
|
import { v as validateInsuranceValues, i as insuranceValues, a as insuranceErrors, H as Header2 } from './insurance-state-CVme82j7.js';
|
|
@@ -18,7 +18,7 @@ import './config-state-DiHV-4QK.js';
|
|
|
18
18
|
import './index-DJ9G-4S-.js';
|
|
19
19
|
import './helpers-Mu7LQT-w.js';
|
|
20
20
|
import './state-options-BX8GieXu.js';
|
|
21
|
-
import './package-
|
|
21
|
+
import './package-NMTsmUsG.js';
|
|
22
22
|
import './index-DCIW8z1f.js';
|
|
23
23
|
import './dinero-HXpYMWUU.js';
|
|
24
24
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-DOjVAAtq.js';
|
|
2
2
|
import { S as StyledHost } from './styled-host-OalOsPBp.js';
|
|
3
3
|
import './event-types-CZfYo5-1.js';
|
|
4
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
4
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
5
5
|
import { d as defaultColumnsKeys } from './terminal-orders-table-DzBpIW8i.js';
|
|
6
6
|
import './config-state-DiHV-4QK.js';
|
|
7
7
|
import './dinero-HXpYMWUU.js';
|
|
@@ -12,7 +12,7 @@ import './Business-BCoP0TAV.js';
|
|
|
12
12
|
import './Dispute-BH0Xfn-F.js';
|
|
13
13
|
import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
|
|
14
14
|
import { A as Api } from './Api-DhiA2e_P.js';
|
|
15
|
-
import './package-
|
|
15
|
+
import './package-NMTsmUsG.js';
|
|
16
16
|
import './parts-xDbRW9xn.js';
|
|
17
17
|
import './utils-BOijEGPV.js';
|
|
18
18
|
import './badge-CtdO-tEY.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-DOjVAAtq.js';
|
|
2
2
|
import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError-Cjcsf8ku.js';
|
|
3
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
3
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D0SJTGUq.js';
|
|
4
4
|
import { T as TerminalService } from './terminal.service-l6zTIPZ3.js';
|
|
5
5
|
import './config-state-DiHV-4QK.js';
|
|
6
6
|
import './dinero-HXpYMWUU.js';
|
|
@@ -13,7 +13,7 @@ import { m as makeGetSubAccounts, S as SubAccountService } from './get-subaccoun
|
|
|
13
13
|
import { S as StyledHost } from './styled-host-OalOsPBp.js';
|
|
14
14
|
import './event-types-CZfYo5-1.js';
|
|
15
15
|
import { d as defaultColumnsKeys } from './terminals-table-BMS5tazC.js';
|
|
16
|
-
import './package-
|
|
16
|
+
import './package-NMTsmUsG.js';
|
|
17
17
|
import './Api-DhiA2e_P.js';
|
|
18
18
|
import './utils-BOijEGPV.js';
|
|
19
19
|
import './index-DJ9G-4S-.js';
|
package/dist/module/apple-pay.js
CHANGED
package/dist/module/package.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,c as a}from"./p-DOjVAAtq.js";import{c as s}from"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{C as i,a as o}from"./p-Cjcsf8ku.js";import{h as r}from"./p-C98BC5W5.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{c as n,J as p}from"./p-BSyMsqda.js";import{g as h,a as d}from"./p-D2muobcE.js";import{P as l}from"./p-8S_ROmnq.js";import{T as f,l as u,a as m,b as y,c as b,d as _,e as w,f as T,g as j,h as v,i as g,j as k,k as C}from"./p-C0wTyoTh.js";import{S as D}from"./p-BhCH9S0e.js";import{T as S}from"./p-CZfYo5-1.js";import{a as P}from"./p-Bgnhf5c9.js";import{S as I,T as q}from"./p-xDbRW9xn.js";import"./p-DdMxswn1.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-NMTsmUsG.js";import"./p-DdZLLkQ5.js";import"./p-h5pyZngT.js";const O={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")},x={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"},A={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)},x[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})))},B=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,O,A),n(),this.analytics=new p(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 p;try{const n=await a.fetchPayoutTransactions(t,e,s);n.error?c({error:d(n.error),code:h(null===(p=n.error)||void 0===p?void 0:p.code),severity:i.ERROR}):o({balanceTransactions:n.data.map((t=>new r(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=h(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(D,{key:"a0ff80867bc3c0bf198165229f693d7748ffc7a4"},t(u,{key:"779cc5602f6221e0f704484bf962b72b266d95f8"},t(m,{key:"7b4b56e9712533ba2b50a875d282ef4bd5efdcaf"},t(y,{key:"8ecd93d56bdbdb1417b260dd013315b21958f363"},t(b,{key:"9fa0fea238a9f76c71d5b8fc5443ca2c9e56b13b"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"f7d94388eddaf848e4868005e985a1158577c70f"},t(w,{key:"c83742e9e3ecbcdaba29f2aa121ec4c101a55632",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(T,{key:"fa0404328357e11527cff2c3eb15536ee458557b",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"71add0ef95310fd49e403d65c2a23ea8f73c71b6",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(v,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(g,{key:"073af8dce5dabb2db604ae50e6ace6a4ace18e6f"},t(k,{key:"3f3906a106b3c41311a0e1309aea779e865bf0f5"},t(C,{key:"85b46ef2a297aab3a450d49dd086ec6e7e1ab027",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"548131521a5fcf1562b286097635f5f62414a28c",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{B as justifi_payout_transactions_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-DOjVAAtq.js";import{P as o}from"./p-8S_ROmnq.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{C as r,a as e}from"./p-Cjcsf8ku.js";import{d as p}from"./p-C98BC5W5.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-D2muobcE.js";import{E as n}from"./p-CH8Y3GSr.js";import{c as m,J as c}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-DOjVAAtq.js";import{P as o}from"./p-8S_ROmnq.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{C as r,a as e}from"./p-Cjcsf8ku.js";import{d as p}from"./p-C98BC5W5.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-D2muobcE.js";import{E as n}from"./p-CH8Y3GSr.js";import{c as m,J as c}from"./p-BSyMsqda.js";import{m as d}from"./p-DYGIC0QH.js";import"./p-DdZLLkQ5.js";import"./p-Bgnhf5c9.js";import"./p-DdMxswn1.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-xDbRW9xn.js";import"./p-NMTsmUsG.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:a(null===(n=m.error)||void 0===n?void 0:n.code),severity:r.ERROR}):o(new p(m.data))}catch(t){e({error:h(t),code:a(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 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as a,H as i}from"./p-DOjVAAtq.js";import{c as s,F as c}from"./p-DiJD6Iqx.js";import{k as d,l as r,m as n,n as l,q as o,y as h}from"./p-PSJOKMWp.js";import{r as f,aw as b}from"./p-xDbRW9xn.js";import{S as m}from"./p-BhCH9S0e.js";import"./p-CZfYo5-1.js";import{S as p}from"./p-T2yENPvU.js";import{c as u,J as y}from"./p-Cq_f4KEI.js";import{w as v,c as k}from"./p-a6tcNl_T.js";import{P as g}from"./p-DCIW8z1f.js";import{H as _}from"./p-BoQ6_4Ks.js";import{n as j}from"./p-BnjCmwMr.js";import{S as x}from"./p-BX8GieXu.js";import{B as w}from"./p-C9EQ459H.js";import{c as C}from"./p-DGsXKF67.js";import"./p-BFTU3MAI.js";import"./p-yH3TC3ZQ.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-DOrxxtCs.js";import"./p-DdZLLkQ5.js";import"./p-Bgnhf5c9.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-C98BC5W5.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-DdMxswn1.js";const V=class{constructor(a){e(this,a),this.radioClick=t(this,"radio-click"),this.checked=!1,this.hidden=!1,this.handleClick=()=>{this.radioClick.emit(this.value)}}render(){return a(m,{key:"b0501b66bcfdd697d88c01835b8f97fb2c0861ab"},a("div",{key:"ada4dda7868086b1ea4cadd6c8824f87d3cb2301",class:`radio-list-item p-3 ${this.class||""}`,part:f,onClick:this.handleClick,hidden:this.hidden},a("form-control-radio",{key:"72c6d07dd2a664ca6bd2be9b446584d7344bc2b0",name:this.name,value:this.value,checked:this.checked,label:this.label,inputHandler:()=>null})))}},H=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new c(s({name:h.required("Enter full name"),address_line1:o.nullable(),address_line2:l.nullable(),address_city:n.nullable(),address_state:r.nullable(),address_postal_code:d.nullable()}))}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate(),errors:this.formController.errors.getValue()}}render(){const e=this.formController.getInitialValues();return a(m,{key:"2429d26c0338ec1732337718ca4e7693f30a0f8a"},a("div",{key:"774911ce7d594bc1f44c15060136356acc349cbb",part:b,class:"mt-4"},a("form",{key:"5c93f5a6af372fdf24a20870ef6ae69f554efec4"},a("fieldset",{key:"38ac8adb2592b7799825d63c4a8e9bde61510cd0"},this.legend&&a("legend",{key:"abbce27bb8ae2ef564b8aeef755050fc096cb81f"},this.legend),a("div",{key:"5a0350fe7f635600d746f1f3979757a045cc09f0",class:"row gy-3"},a("div",{key:"71aac995514b7fea7254204df825eb8b381e21c7",class:"col-12"},a("form-control-text",{key:"f33d26eddfc9f3d307e05a48afec9472213b2822",name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})))))))}},O=e=>{const{isReady:t}=e;return t?null:a("div",{class:"container-fluid p-0"},a("div",{class:"row mb-3"},a("div",{class:"col-12 align-content-end"},a(p,{height:"18px",width:"120px"}),a(p,{height:"36px"}))),a("div",{class:"row"},a("div",{class:"col-12 align-content-end"},a(p,{height:"18px",width:"110px"}),a(p,{height:"36px"}))))},D=class{constructor(t){e(this,t),this.isReady=!1}async componentWillLoad(){await v(),this.iframeOrigin=k.iframeOrigin,u(),this.analytics=new y(this)}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((e=>new Promise((t=>{e.addEventListener("iframeLoaded",(()=>{t()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}async validate(){const e=await this.accountNumberIframeElement.validate(),t=await this.routingNumberIframeElement.validate();return e&&t}async tokenize({clientId:e,paymentMethodMetadata:t,account:a}){return this.accountNumberIframeElement.tokenize(e,t,a)}render(){return a(m,{key:"a2fd28c8b8202e0d702d02761cbcf3f568298265"},a(O,{key:"6777d110d3ccf3a688a763687c7087a3520643ac",isReady:this.isReady}),a("hidden-input",{key:"513e1cdaaf464a741d4312a6d359c4af665e0ade"}),a("div",{key:"2b4e473c7bb062a78148537d2cad02caf503330d",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},a("div",{key:"e706151f3e04835efab49fc0fb7a48f4657ab2c4",class:"row mb-3"},a("iframe-input",{key:"a70e0deac68d04f9ffa37790c33d801cfce8dc46",inputId:"accountNumber",ref:e=>this.accountNumberIframeElement=e,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber`})),a("div",{key:"3f488f86388b2fc797c49ddc81c7de3a815ca74f",class:"row"},a("iframe-input",{key:"a09d3cec373c5bab5b38ebc090724178e65d2de2",inputId:"routingNumber",ref:e=>this.routingNumberIframeElement=e,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber`}))))}},L=class{constructor(t){e(this,t)}get showSimpleCardBillingForm(){return this.paymentMethodType===g.NEW_CARD&&this.hideCardBillingForm}get showSimpleBankAccountBillingForm(){return this.paymentMethodType===g.NEW_BANK_ACCOUNT&&this.hideBankAccountBillingForm}async getValues(){var e;return null===(e=this.selectedFormRef)||void 0===e?void 0:e.getValues()}async fill(e){var t;null===(t=this.selectedFormRef)||void 0===t||t.fill(e)}async validate(){var e;return null===(e=this.selectedFormRef)||void 0===e?void 0:e.validate()}render(){return a(i,null,a(this.showSimpleBankAccountBillingForm?"justifi-bank-account-billing-form-simple":this.showSimpleCardBillingForm?"justifi-card-billing-form-simple":"justifi-billing-form-full",{legend:this.legend,ref:e=>this.selectedFormRef=e}))}},N=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new c(s({name:h.required("Enter full name"),address_line1:o.required("Enter street address"),address_line2:l.nullable(),address_city:n.required("Enter city"),address_state:r.required("Select state"),address_postal_code:d.required("Enter postal code")})),this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate(),errors:this.formController.errors.getValue()}}render(){if(!this.formController)return null;const e=this.formController.getInitialValues();return a(m,null,a("div",{part:b,class:"mt-4"},a(_,{text:"Billing address",class:"fs-6 fw-bold lh-lg mb-4"}),a("form",null,a("fieldset",null,this.legend&&a("legend",null,this.legend),a("div",{class:"row gy-3"},a("div",{class:"col-12"},a("form-control-text",{name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{class:"col-12"},a("form-control-text",{name:"address_line1",label:"Street Address",defaultValue:e.address_line1,errorText:this.errors.address_line1,inputHandler:this.inputHandler})),a("div",{class:"col-12"},a("form-control-text",{name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:e.address_line2,errorText:this.errors.address_line2,inputHandler:this.inputHandler})),a("div",{class:"col-12"},a("form-control-text",{name:"address_city",label:"City",defaultValue:e.address_city,errorText:this.errors.address_city,inputHandler:this.inputHandler})),a("div",{class:"col-12"},a("form-control-select",{name:"address_state",label:"State",options:x,defaultValue:e.address_state,errorText:this.errors.address_state,inputHandler:this.inputHandler})),a("div",{class:"col-12"},a("form-control-text",{name:"address_postal_code",label:"ZIP",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:j})))))))}},B=class{constructor(t){e(this,t),this.variant="primary",this.type="button"}render(){return a(m,{key:"7c146b9ccaf8c4c37adde6c8af054dc4796d78bd"},a(w,{key:"879d05664b808abcbc32a38bc98fcd673dba0dea",variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,class:this.class,type:this.type,disabled:this.disabled,style:this.customStyle},this.text))}},I=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new c(s({name:h.nullable(),address_line1:o.nullable(),address_line2:l.nullable(),address_city:n.nullable(),address_state:r.nullable(),address_postal_code:d.required("Enter postal code")}))}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate(),errors:this.formController.errors.getValue()}}render(){const e=this.formController.getInitialValues();return a(m,{key:"2523873a34180694357ab780bd4b9768f9ea267d"},a("div",{key:"30204a976bba8a843830a905cec86d5aaf486f30",part:b},a("form",{key:"479e65b39fbecc80ba6281648bd390c4cd2a688e"},a("fieldset",{key:"93613aa83561aaba46efff4e6d64e240e1ddbc84"},this.legend&&a("legend",{key:"4d6da7c78c5b1a84bc4b37dfca80d9c7f0be462f"},this.legend),a("div",{key:"11259470415c62c15c0ef9217f91f4d6b5c8651b",class:"row gy-3"},a("div",{key:"2b85b5b820991faee8d8b14c121a69ab4974da98",class:"col-12"},a("form-control-text",{key:"d7632e0d32832491bfdf911ae45e67efe0ec6555",name:"address_postal_code",label:"ZIP",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:j})))))))}},M=e=>{const{isReady:t}=e;return t?null:a("div",{class:"container-fluid p-0"},a("div",{class:"mb-3"},a(p,{height:"18px",width:"100px"}),a(p,{height:"36px"})),a("div",{class:"row"},a("div",{class:"col-4 align-content-end"},a(p,{height:"18px",width:"80px"}),a(p,{height:"36px"})),a("div",{class:"col-4 align-content-end"},a(p,{height:"36px"})),a("div",{class:"col-4 align-content-end"},a(p,{height:"18px",width:"30px"}),a(p,{height:"36px"}))))},S=class{constructor(t){e(this,t),this.isReady=!1}async componentWillLoad(){await v(),this.iframeOrigin=k.iframeOrigin,u(),this.analytics=new y(this)}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((e=>new Promise((t=>{e.addEventListener("iframeLoaded",(()=>{t()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}async validate(){const e=await this.cardNumberIframeElement.validate(),t=await this.expirationMonthIframeElement.validate(),a=await this.expirationYearIframeElement.validate(),i=await this.cvvIframeElement.validate();return e&&t&&a&&i}async tokenize({clientId:e,paymentMethodMetadata:t,account:a}){return this.cardNumberIframeElement.tokenize(e,t,a)}render(){return a(m,{key:"64d9bda2ce54aa06788509ae294bcb1eefdb173a"},a(M,{key:"a1f233464393512652fc37a31b769bb9f48f3797",isReady:this.isReady}),a("hidden-input",{key:"4405ec6e9a510f670a137d33c83a5ad38a19a0aa"}),a("div",{key:"e704d33d8b3cbcd55798afb537b2b16d37d0077d",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},a("div",{key:"c519dafa0657af1372836a2a30301849f2e422b3",class:"mb-3"},a("iframe-input",{key:"6c6a0154ed62e0e684784ff0f327e3bc282da10c",inputId:"cardNumber",ref:e=>this.cardNumberIframeElement=e,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber`})),a("div",{key:"7efcb6e9fed504ea8f0470f55b8c48b7d82b537b",class:"row"},a("div",{key:"e216e57f82d04325cedeca9f3945285ab8675c7d",class:"col-4 align-content-end"},a("iframe-input",{key:"c3ffef01705152180c66adaf482e67a1d2f114e9",inputId:"expirationMonth",ref:e=>this.expirationMonthIframeElement=e,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth`})),a("div",{key:"97666cb9d9e4b272c033913527c4b6a60b6067c5",class:"col-4 align-content-end"},a("iframe-input",{key:"4d2f7f56f2a0d5717776c6ef164eef5f7dbc4d8d",inputId:"expirationYear",ref:e=>this.expirationYearIframeElement=e,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear`})),a("div",{key:"ecc6fff75106b265a7cb00febef40a7b14651a0a",class:"col-4 align-content-end"},a("iframe-input",{key:"9a756344f1d47f69c0702b57d15d66a658b57e3d",inputId:"CVV",ref:e=>this.cvvIframeElement=e,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV`})))))}},P=class{constructor(a){e(this,a),this.checkboxChanged=t(this,"checkboxChanged"),this.label="Save New Payment Method",this.isChecked=!1,this.handleCheckboxChange=(e,t)=>{this.isChecked=t,C.savePaymentMethod=t,this.checkboxChanged.emit(this.isChecked)}}render(){return a(m,{key:"9aa9ce812c0cb2fdc809c47060ed150903ad7cd5"},a("form-control-checkbox",{key:"596bc9a145e363c751c8610f4b9f23ad31dab299",label:this.label||"Save New Payment Method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange}))}};export{H as justifi_bank_account_billing_form_simple,D as justifi_bank_account_form,L as justifi_billing_form,N as justifi_billing_form_full,B as justifi_button,I as justifi_card_billing_form_simple,S as justifi_card_form,V as justifi_radio_list_item,P as justifi_save_new_payment_method}
|
|
1
|
+
import{r as e,c as t,h as a,H as i}from"./p-DOjVAAtq.js";import{c as s,F as c}from"./p-DiJD6Iqx.js";import{k as d,l as r,m as n,n as l,q as o,y as h}from"./p-PSJOKMWp.js";import{r as f,aw as b}from"./p-xDbRW9xn.js";import{S as m}from"./p-BhCH9S0e.js";import"./p-CZfYo5-1.js";import{S as p}from"./p-T2yENPvU.js";import{c as u,J as y}from"./p-BSyMsqda.js";import{w as v,c as k}from"./p-a6tcNl_T.js";import{P as g}from"./p-DCIW8z1f.js";import{H as j}from"./p-BoQ6_4Ks.js";import{n as _}from"./p-BnjCmwMr.js";import{S as w}from"./p-BX8GieXu.js";import{B as x}from"./p-C9EQ459H.js";import{c as V}from"./p-DGsXKF67.js";import"./p-BFTU3MAI.js";import"./p-yH3TC3ZQ.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-NMTsmUsG.js";import"./p-DdZLLkQ5.js";import"./p-Bgnhf5c9.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-C98BC5W5.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-DdMxswn1.js";const H=class{constructor(a){e(this,a),this.radioClick=t(this,"radio-click"),this.checked=!1,this.hidden=!1,this.handleClick=()=>{this.radioClick.emit(this.value)}}render(){return a(m,{key:"b0501b66bcfdd697d88c01835b8f97fb2c0861ab"},a("div",{key:"ada4dda7868086b1ea4cadd6c8824f87d3cb2301",class:`radio-list-item p-3 ${this.class||""}`,part:f,onClick:this.handleClick,hidden:this.hidden},a("form-control-radio",{key:"72c6d07dd2a664ca6bd2be9b446584d7344bc2b0",name:this.name,value:this.value,checked:this.checked,label:this.label,inputHandler:()=>null})))}},C=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new c(s({name:h.required("Enter full name"),address_line1:o.nullable(),address_line2:l.nullable(),address_city:n.nullable(),address_state:r.nullable(),address_postal_code:d.nullable()}))}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate(),errors:this.formController.errors.getValue()}}render(){const e=this.formController.getInitialValues();return a(m,{key:"2429d26c0338ec1732337718ca4e7693f30a0f8a"},a("div",{key:"774911ce7d594bc1f44c15060136356acc349cbb",part:b,class:"mt-4"},a("form",{key:"5c93f5a6af372fdf24a20870ef6ae69f554efec4"},a("fieldset",{key:"38ac8adb2592b7799825d63c4a8e9bde61510cd0"},this.legend&&a("legend",{key:"abbce27bb8ae2ef564b8aeef755050fc096cb81f"},this.legend),a("div",{key:"5a0350fe7f635600d746f1f3979757a045cc09f0",class:"row gy-3"},a("div",{key:"71aac995514b7fea7254204df825eb8b381e21c7",class:"col-12"},a("form-control-text",{key:"f33d26eddfc9f3d307e05a48afec9472213b2822",name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})))))))}},O=e=>{const{isReady:t}=e;return t?null:a("div",{class:"container-fluid p-0"},a("div",{class:"row mb-3"},a("div",{class:"col-12 align-content-end"},a(p,{height:"18px",width:"120px"}),a(p,{height:"36px"}))),a("div",{class:"row"},a("div",{class:"col-12 align-content-end"},a(p,{height:"18px",width:"110px"}),a(p,{height:"36px"}))))},N=class{constructor(t){e(this,t),this.isReady=!1}async componentWillLoad(){await v(),this.iframeOrigin=k.iframeOrigin,u(),this.analytics=new y(this)}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((e=>new Promise((t=>{e.addEventListener("iframeLoaded",(()=>{t()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}async validate(){const e=await this.accountNumberIframeElement.validate(),t=await this.routingNumberIframeElement.validate();return e&&t}async tokenize({clientId:e,paymentMethodMetadata:t,account:a}){return this.accountNumberIframeElement.tokenize(e,t,a)}render(){return a(m,{key:"a2fd28c8b8202e0d702d02761cbcf3f568298265"},a(O,{key:"6777d110d3ccf3a688a763687c7087a3520643ac",isReady:this.isReady}),a("hidden-input",{key:"513e1cdaaf464a741d4312a6d359c4af665e0ade"}),a("div",{key:"2b4e473c7bb062a78148537d2cad02caf503330d",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},a("div",{key:"e706151f3e04835efab49fc0fb7a48f4657ab2c4",class:"row mb-3"},a("iframe-input",{key:"a70e0deac68d04f9ffa37790c33d801cfce8dc46",inputId:"accountNumber",ref:e=>this.accountNumberIframeElement=e,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber`})),a("div",{key:"3f488f86388b2fc797c49ddc81c7de3a815ca74f",class:"row"},a("iframe-input",{key:"a09d3cec373c5bab5b38ebc090724178e65d2de2",inputId:"routingNumber",ref:e=>this.routingNumberIframeElement=e,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber`}))))}},L=class{constructor(t){e(this,t)}get showSimpleCardBillingForm(){return this.paymentMethodType===g.NEW_CARD&&this.hideCardBillingForm}get showSimpleBankAccountBillingForm(){return this.paymentMethodType===g.NEW_BANK_ACCOUNT&&this.hideBankAccountBillingForm}async getValues(){var e;return null===(e=this.selectedFormRef)||void 0===e?void 0:e.getValues()}async fill(e){var t;null===(t=this.selectedFormRef)||void 0===t||t.fill(e)}async validate(){var e;return null===(e=this.selectedFormRef)||void 0===e?void 0:e.validate()}render(){return a(i,null,a(this.showSimpleBankAccountBillingForm?"justifi-bank-account-billing-form-simple":this.showSimpleCardBillingForm?"justifi-card-billing-form-simple":"justifi-billing-form-full",{legend:this.legend,ref:e=>this.selectedFormRef=e}))}},M=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new c(s({name:h.required("Enter full name"),address_line1:o.required("Enter street address"),address_line2:l.nullable(),address_city:n.required("Enter city"),address_state:r.required("Select state"),address_postal_code:d.required("Enter postal code")})),this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate(),errors:this.formController.errors.getValue()}}render(){if(!this.formController)return null;const e=this.formController.getInitialValues();return a(m,null,a("div",{part:b,class:"mt-4"},a(j,{text:"Billing address",class:"fs-6 fw-bold lh-lg mb-4"}),a("form",null,a("fieldset",null,this.legend&&a("legend",null,this.legend),a("div",{class:"row gy-3"},a("div",{class:"col-12"},a("form-control-text",{name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{class:"col-12"},a("form-control-text",{name:"address_line1",label:"Street Address",defaultValue:e.address_line1,errorText:this.errors.address_line1,inputHandler:this.inputHandler})),a("div",{class:"col-12"},a("form-control-text",{name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:e.address_line2,errorText:this.errors.address_line2,inputHandler:this.inputHandler})),a("div",{class:"col-12"},a("form-control-text",{name:"address_city",label:"City",defaultValue:e.address_city,errorText:this.errors.address_city,inputHandler:this.inputHandler})),a("div",{class:"col-12"},a("form-control-select",{name:"address_state",label:"State",options:w,defaultValue:e.address_state,errorText:this.errors.address_state,inputHandler:this.inputHandler})),a("div",{class:"col-12"},a("form-control-text",{name:"address_postal_code",label:"ZIP",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:_})))))))}},B=class{constructor(t){e(this,t),this.variant="primary",this.type="button"}render(){return a(m,{key:"7c146b9ccaf8c4c37adde6c8af054dc4796d78bd"},a(x,{key:"879d05664b808abcbc32a38bc98fcd673dba0dea",variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,class:this.class,type:this.type,disabled:this.disabled,style:this.customStyle},this.text))}},D=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new c(s({name:h.nullable(),address_line1:o.nullable(),address_line2:l.nullable(),address_city:n.nullable(),address_state:r.nullable(),address_postal_code:d.required("Enter postal code")}))}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate(),errors:this.formController.errors.getValue()}}render(){const e=this.formController.getInitialValues();return a(m,{key:"2523873a34180694357ab780bd4b9768f9ea267d"},a("div",{key:"30204a976bba8a843830a905cec86d5aaf486f30",part:b},a("form",{key:"479e65b39fbecc80ba6281648bd390c4cd2a688e"},a("fieldset",{key:"93613aa83561aaba46efff4e6d64e240e1ddbc84"},this.legend&&a("legend",{key:"4d6da7c78c5b1a84bc4b37dfca80d9c7f0be462f"},this.legend),a("div",{key:"11259470415c62c15c0ef9217f91f4d6b5c8651b",class:"row gy-3"},a("div",{key:"2b85b5b820991faee8d8b14c121a69ab4974da98",class:"col-12"},a("form-control-text",{key:"d7632e0d32832491bfdf911ae45e67efe0ec6555",name:"address_postal_code",label:"ZIP",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:_})))))))}},S=e=>{const{isReady:t}=e;return t?null:a("div",{class:"container-fluid p-0"},a("div",{class:"mb-3"},a(p,{height:"18px",width:"100px"}),a(p,{height:"36px"})),a("div",{class:"row"},a("div",{class:"col-4 align-content-end"},a(p,{height:"18px",width:"80px"}),a(p,{height:"36px"})),a("div",{class:"col-4 align-content-end"},a(p,{height:"36px"})),a("div",{class:"col-4 align-content-end"},a(p,{height:"18px",width:"30px"}),a(p,{height:"36px"}))))},I=class{constructor(t){e(this,t),this.isReady=!1}async componentWillLoad(){await v(),this.iframeOrigin=k.iframeOrigin,u(),this.analytics=new y(this)}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((e=>new Promise((t=>{e.addEventListener("iframeLoaded",(()=>{t()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}async validate(){const e=await this.cardNumberIframeElement.validate(),t=await this.expirationMonthIframeElement.validate(),a=await this.expirationYearIframeElement.validate(),i=await this.cvvIframeElement.validate();return e&&t&&a&&i}async tokenize({clientId:e,paymentMethodMetadata:t,account:a}){return this.cardNumberIframeElement.tokenize(e,t,a)}render(){return a(m,{key:"64d9bda2ce54aa06788509ae294bcb1eefdb173a"},a(S,{key:"a1f233464393512652fc37a31b769bb9f48f3797",isReady:this.isReady}),a("hidden-input",{key:"4405ec6e9a510f670a137d33c83a5ad38a19a0aa"}),a("div",{key:"e704d33d8b3cbcd55798afb537b2b16d37d0077d",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},a("div",{key:"c519dafa0657af1372836a2a30301849f2e422b3",class:"mb-3"},a("iframe-input",{key:"6c6a0154ed62e0e684784ff0f327e3bc282da10c",inputId:"cardNumber",ref:e=>this.cardNumberIframeElement=e,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber`})),a("div",{key:"7efcb6e9fed504ea8f0470f55b8c48b7d82b537b",class:"row"},a("div",{key:"e216e57f82d04325cedeca9f3945285ab8675c7d",class:"col-4 align-content-end"},a("iframe-input",{key:"c3ffef01705152180c66adaf482e67a1d2f114e9",inputId:"expirationMonth",ref:e=>this.expirationMonthIframeElement=e,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth`})),a("div",{key:"97666cb9d9e4b272c033913527c4b6a60b6067c5",class:"col-4 align-content-end"},a("iframe-input",{key:"4d2f7f56f2a0d5717776c6ef164eef5f7dbc4d8d",inputId:"expirationYear",ref:e=>this.expirationYearIframeElement=e,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear`})),a("div",{key:"ecc6fff75106b265a7cb00febef40a7b14651a0a",class:"col-4 align-content-end"},a("iframe-input",{key:"9a756344f1d47f69c0702b57d15d66a658b57e3d",inputId:"CVV",ref:e=>this.cvvIframeElement=e,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV`})))))}},T=class{constructor(a){e(this,a),this.checkboxChanged=t(this,"checkboxChanged"),this.label="Save New Payment Method",this.isChecked=!1,this.handleCheckboxChange=(e,t)=>{this.isChecked=t,V.savePaymentMethod=t,this.checkboxChanged.emit(this.isChecked)}}render(){return a(m,{key:"9aa9ce812c0cb2fdc809c47060ed150903ad7cd5"},a("form-control-checkbox",{key:"596bc9a145e363c751c8610f4b9f23ad31dab299",label:this.label||"Save New Payment Method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange}))}};export{C as justifi_bank_account_billing_form_simple,N as justifi_bank_account_form,L as justifi_billing_form,M as justifi_billing_form_full,B as justifi_button,D as justifi_card_billing_form_simple,I as justifi_card_form,H as justifi_radio_list_item,T as justifi_save_new_payment_method}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as s,r as t,c as i}from"./p-DOjVAAtq.js";import{A as e}from"./p-DdZLLkQ5.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import"./p-C98BC5W5.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as l}from"./p-
|
|
1
|
+
import{h as s,r as t,c as i}from"./p-DOjVAAtq.js";import{A as e}from"./p-DdZLLkQ5.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import"./p-C98BC5W5.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as l}from"./p-BSyMsqda.js";import{c as h}from"./p-DGsXKF67.js";import{p as d,f as p,r as u,j as v}from"./p-Bgnhf5c9.js";import{v as m,i as y,a as f,H as j}from"./p-wQgEEOq_.js";import{D as _,E as g}from"./p-xDbRW9xn.js";import{S as k}from"./p-BhCH9S0e.js";import"./p-CZfYo5-1.js";import{S as w}from"./p-T2yENPvU.js";import"./p-a6tcNl_T.js";import"./p-DdMxswn1.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-NMTsmUsG.js";import"./p-DCIW8z1f.js";import"./p-HXpYMWUU.js";const C=e();class b{async fetchQuote(s,t){return C.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return C.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const T=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(w,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(w,{width:"70%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"100%"})),s("div",{class:"col-12"},s(w,{width:"80%"}))),D=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",_),s=>v(s,"p","part",_)])}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 b};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(k,null,this.isLoading?s(T,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:_,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:g},"Please select an option"),s("small",{part:_,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{D as justifi_season_interruption_insurance}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as t,h as r}from"./p-DOjVAAtq.js";import{A as o}from"./p-DdZLLkQ5.js";import{C as i,a as e}from"./p-Cjcsf8ku.js";import"./p-C98BC5W5.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{E as p}from"./p-CH8Y3GSr.js";import{c,J as h}from"./p-
|
|
1
|
+
import{r as s,c as t,h as r}from"./p-DOjVAAtq.js";import{A as o}from"./p-DdZLLkQ5.js";import{C as i,a as e}from"./p-Cjcsf8ku.js";import"./p-C98BC5W5.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{E as p}from"./p-CH8Y3GSr.js";import{c,J as h}from"./p-BSyMsqda.js";import"./p-a6tcNl_T.js";import"./p-DdMxswn1.js";import"./p-Bgnhf5c9.js";import"./p-HXpYMWUU.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-xDbRW9xn.js";import"./p-NMTsmUsG.js";const m=o();class u{async fetchGrossVolumeChartData(s,t){return m.get({endpoint:`account/${s}/reports/gross_volume`,authToken:t})}}const d=class{constructor(r){s(this,r),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){c(),this.analytics=new h(this),this.initializeGetGrossPayment()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:s,authToken:t,service:r})=>async({onSuccess:o,onError:e})=>{var p;try{const c=await r.fetchGrossVolumeChartData(s,t);c.error?e({error:n(c.error),code:a(null===(p=c.error)||void 0===p?void 0:p.code),severity:i.ERROR}):o(c.data)}catch(s){const t=a(null==s?void 0:s.code);e({error:n(s),code:t,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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,r as t,c as i,H as s,g as n}from"./p-DOjVAAtq.js";import{A as o}from"./p-DdZLLkQ5.js";import{S as a}from"./p-BhCH9S0e.js";import"./p-CZfYo5-1.js";import{S as r}from"./p-T2yENPvU.js";import{c as l,o as c,g as h,a as d}from"./p-DGsXKF67.js";import{D as p,r as u}from"./p-xDbRW9xn.js";import{f as y}from"./p-Bgnhf5c9.js";import{H as m}from"./p-RQzxYnz_.js";import{H as v,b as M,h as f,i as b}from"./p-wQgEEOq_.js";import{H as g}from"./p-BoQ6_4Ks.js";import{J as k,c as A}from"./p-BSyMsqda.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{C as w,a as P,b as j}from"./p-Cjcsf8ku.js";import{I as T}from"./p-C98BC5W5.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as C,a as N}from"./p-D2muobcE.js";import{C as S}from"./p-CEk3bv0x.js";import{P as E,a as I,b as D}from"./p-DCIW8z1f.js";import{C as O}from"./p-ZpPDShvP.js";import"./p-DdMxswn1.js";import"./p-NMTsmUsG.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";var x,L,z,_,R;!function(e){e.STATUS_SUCCESS="STATUS_SUCCESS",e.STATUS_FAILURE="STATUS_FAILURE"}(x||(x={})),function(e){e.PLAIN="plain",e.BUY="buy",e.SET_UP="set-up",e.DONATE="donate",e.CHECK_OUT="check-out",e.BOOK="book",e.SUBSCRIBE="subscribe"}(L||(L={})),function(e){e.BLACK="black",e.WHITE="white",e.WHITE_OUTLINE="white-outline"}(z||(z={})),function(e){e.SUPPORTS_3DS="supports3DS",e.SUPPORTS_EMV="supportsEMV",e.SUPPORTS_CREDIT="supportsCredit",e.SUPPORTS_DEBIT="supportsDebit"}(_||(_={}));class B{constructor(e){this.merchantIdentifier=e.merchantIdentifier,this.displayName=e.displayName,this.initiative=e.initiative,this.initiativeContext=e.initiativeContext,this.buttonType=e.buttonType||L.PLAIN,this.buttonStyle=e.buttonStyle||z.BLACK,this.buttonLocale=e.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class U{constructor(e){this.countryCode=e.countryCode,this.currencyCode=e.currencyCode,this.merchantCapabilities=e.merchantCapabilities,this.supportedNetworks=e.supportedNetworks,this.total=e.total,this.lineItems=e.lineItems,this.shippingMethods=e.shippingMethods,this.applicationData=e.applicationData,this.supportedCountries=e.supportedCountries}get isValid(){var e,t,i,s;return!!(this.countryCode&&this.currencyCode&&(null===(e=this.merchantCapabilities)||void 0===e?void 0:e.length)&&(null===(t=this.supportedNetworks)||void 0===t?void 0:t.length)&&(null===(i=this.total)||void 0===i?void 0:i.label)&&(null===(s=this.total)||void 0===s?void 0:s.amount))}}class Y{static isApplePaySupported(){var e;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(e=window.ApplePaySession)||void 0===e?void 0:e.supportsVersion(3))}static canMakePayments(){var e;return this.isApplePaySupported()&&(null===(e=window.ApplePaySession)||void 0===e?void 0:e.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(e){var t;if(!this.isApplePaySupported())return!1;try{return await(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePaymentsWithActiveCard(e))||!1}catch(e){return console.error("Error checking Apple Pay active card:",e),!1}}static formatAmount(e){return(e/100).toFixed(2)}static parseAmount(e){return Math.round(100*parseFloat(e))}static createLineItem(e,t,i="final"){return{label:e,amount:this.formatAmount(t),type:i}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[_.SUPPORTS_3DS,_.SUPPORTS_EMV,_.SUPPORTS_CREDIT,_.SUPPORTS_DEBIT]}}!function(e){e.UNAVAILABLE="UNAVAILABLE",e.SESSION_ERROR="SESSION_ERROR",e.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",e.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",e.USER_CANCELLED="USER_CANCELLED"}(R||(R={}));class F{constructor(){this.api=o()}initialize(e){if(this.applePayConfig=new B(e),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(e,t){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:e,headers:{"Sub-Account":t}})}catch(e){throw console.error("Backend validation failed:",e),new Error("Merchant validation failed")}}async processPayment(e,t,i){const s=await this.api.post({endpoint:"apple_pay/process_token",authToken:e,body:i,headers:{"Sub-Account":t}});return{success:s.id&&!!s.data.token,data:s}}isAvailable(){return Y.isApplePaySupported()&&Y.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await Y.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(e,t,i){if(console.groupCollapsed("[ApplePayService] startPaymentSession called"),console.log("[ApplePayService] raw paymentRequest:",JSON.stringify(e,null,2)),console.log("[ApplePayService] has authToken:",Boolean(t)),console.log("[ApplePayService] accountId:",i),console.log("[ApplePayService] has config:",Boolean(this.applePayConfig)),!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),console.groupEnd(),new Error("Apple Pay not initialized. Call initialize() first.");const s=new U(e);if(console.log("[ApplePayService] created ApplePayPaymentRequest:",s),!s.isValid){const e=[];throw s.countryCode||e.push("countryCode"),s.currencyCode||e.push("currencyCode"),s.merchantCapabilities&&0!==s.merchantCapabilities.length||e.push("merchantCapabilities"),s.supportedNetworks&&0!==s.supportedNetworks.length||e.push("supportedNetworks"),s.total&&s.total.label&&s.total.amount||e.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",e),console.groupEnd(),new Error("Invalid payment request provided")}return this.currentPaymentRequest=s,new Promise(((e,n)=>{try{if(console.log("[ApplePayService] About to instantiate ApplePaySession"),"undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),console.groupEnd(),n({success:!1,error:{code:R.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,s),console.log("[ApplePayService] ApplePaySession instantiated:",this.currentSession),this.setupSessionEventHandlers(e,n,t,i),console.log("[ApplePayService] Event handlers set. Beginning session..."),this.currentSession.begin(),console.log("[ApplePayService] Session.begin() called"),console.groupEnd()}catch(e){console.error("[ApplePayService] Exception while starting session:",e),console.groupEnd(),n({success:!1,error:{code:R.SESSION_ERROR,message:e instanceof Error?e.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(e,t,i,s){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{console.groupCollapsed("[ApplePayService] onvalidatemerchant");try{if(console.log("[ApplePayService] accountId:",s),!i)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const e=await this.validateMerchant(i,s);console.log("[ApplePayService] merchantSession received");try{this.currentSession.completeMerchantValidation(e),console.log("[ApplePayService] completeMerchantValidation called")}catch(e){throw console.error("Error calling completeMerchantValidation:",e),e}}catch(e){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",e),e&&e.stack&&console.error("Error stack:",e.stack),this.currentSession.abort(),t({success:!1,error:{code:R.MERCHANT_VALIDATION_ERROR,message:e instanceof Error?e.message:"Merchant validation failed"}})}console.groupEnd()},this.currentSession.onpaymentauthorized=async n=>{var o;console.groupCollapsed("[ApplePayService] onpaymentauthorized");try{const a=n.payment;console.log("[ApplePayService] payment payload snapshot:",{hasToken:Boolean(null==a?void 0:a.token),tokenType:(null===(o=null==a?void 0:a.token)||void 0===o?void 0:o.paymentData)?"paymentData":"raw"});const r=Object.assign(Object.assign({},a.token),{product_details:{name:this.currentPaymentRequest.total.label,price:Y.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}});console.log("[ApplePayService] paymentPayload prepared");const l=await this.processPayment(i,s,r);console.log("[ApplePayService] processPayment result:",l),l.success?(this.currentSession.completePayment({status:x.STATUS_SUCCESS}),console.log("[ApplePayService] Payment success; resolving"),e({success:!0,token:a.token,paymentMethodId:l.data.id})):(console.error("PSP reported payment failure:",l.data),this.currentSession.completePayment({status:x.STATUS_FAILURE}),t({success:!1,error:{code:R.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(e){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",e),e&&e.stack&&console.error("Error stack:",e.stack),this.currentSession.completePayment({status:x.STATUS_FAILURE}),t({success:!1,error:{code:R.PAYMENT_PROCESSING_ERROR,message:e instanceof Error?e.message:"Payment processing failed"}})}finally{console.log("[ApplePayService] Cleaning up session state"),this.currentSession=void 0,this.currentPaymentRequest=void 0}console.groupEnd()},this.currentSession.onpaymentmethodselected=()=>{console.groupCollapsed("[ApplePayService] onpaymentmethodselected");const e={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(e),console.log("[ApplePayService] completePaymentMethodSelection called")}catch(e){console.error("Error completing payment method selection:",e),this.currentSession.abort()}console.groupEnd()},this.currentSession.onshippingmethodselected=()=>{console.groupCollapsed("[ApplePayService] onshippingmethodselected"),this.currentSession.completeShippingMethodSelection({status:x.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]}),console.log("[ApplePayService] completeShippingMethodSelection called"),console.groupEnd()},this.currentSession.oncancel=e=>{if(console.groupCollapsed("[ApplePayService] oncancel"),e.sessionError)switch(console.error(e.sessionError),e.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:",e.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,t({success:!1,error:{code:R.USER_CANCELLED,message:"User cancelled the Apple Pay session"}}),console.groupEnd()},"onerror"in this.currentSession&&(this.currentSession.onerror=e=>{console.groupCollapsed("[ApplePayService] onerror"),console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",e),this.currentSession=void 0,this.currentPaymentRequest=void 0,t({success:!1,error:{code:R.SESSION_ERROR,message:"Apple Pay session error occurred"}}),console.groupEnd()})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(e,t,i="US",s="USD"){return{countryCode:i,currencyCode:s,merchantCapabilities:Y.getDefaultMerchantCapabilities(),supportedNetworks:Y.getDefaultSupportedNetworks(),total:Y.createLineItem(t,e)}}getApplePayConfig(){return this.applePayConfig}}const Q=t=>{const{isLoading:i}=t;return i?e("div",{class:"container-fluid p-0"},e("div",{class:"row mb-3"},e("div",{class:"col-12 align-content-center"},e(r,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},V=t=>e("div",{class:"apple-pay-button-container"},e("button",Object.assign({class:(()=>{let e="apple-pay-button";switch(t.buttonStyle){case z.WHITE:e+=" apple-pay-button-white";break;case z.WHITE_OUTLINE:e+=" apple-pay-button-white-outline";break;default:e+=" apple-pay-button-black"}switch(t.buttonType){case L.BUY:e+=" apple-pay-button-type-buy";break;case L.DONATE:e+=" apple-pay-button-type-donate";break;default:e+=" apple-pay-button-type-plain"}return(t.disabled||t.isProcessing||!t.isAvailable)&&(e+=" disabled"),e})(),style:{width:t.width,height:t.height},onClick:()=>{!t.disabled&&!t.isProcessing&&t.isAvailable&&t.clickHandler&&t.clickHandler()},disabled:t.disabled||t.isProcessing||!t.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},t),t.isProcessing&&e("div",{class:"processing-overlay"},e("div",{class:"spinner"}),e("span",null,"Processing..."))),e("style",null,"\n .apple-pay-button-container {\n display: inline-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 ")),H=class{constructor(e){t(this,e),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=L.PLAIN,this.buttonStyle=z.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 e,t;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit(),console.groupCollapsed("[ApplePay Component] handleApplePayClick"),console.log("[ApplePay Component] click context:",{isProcessing:this.isProcessing,disabled:this.disabled,isAvailable:this.isAvailable,canMakePayments:this.canMakePayments,hasService:Boolean(this.applePayService)});const i={countryCode:this.countryCode,currencyCode:l.paymentCurrency,merchantCapabilities:[_.SUPPORTS_3DS,_.SUPPORTS_CREDIT,_.SUPPORTS_DEBIT],supportedNetworks:Y.getDefaultSupportedNetworks(),total:Y.createLineItem(l.paymentDescription,l.paymentAmount)};console.log("[ApplePay Component] paymentRequest",i),console.log("[ApplePay Component] identifiers snapshot:",{authTokenLength:l.authToken?String(l.authToken).length:0,accountId:l.accountId});const s=await this.applePayService.startPaymentSession(i,l.authToken,l.accountId);console.log("[ApplePay Component] startPaymentSession result",s),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===(e=s.error)||void 0===e?void 0:e.message)||"Payment failed",code:(null===(t=s.error)||void 0===t?void 0:t.code)||H.ErrorCode.PAYMENT_FAILED}))}catch(e){const t=e instanceof Error?e.message:"Payment failed";this.error=t,this.applePayError.emit({error:t,code:H.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:t})}finally{this.isProcessing=!1,console.groupEnd()}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,console.groupCollapsed("[ApplePay Component] initializeApplePay"),console.log("[ApplePay Component] checkout state snapshot:",{paymentAmount:l.paymentAmount,paymentCurrency:l.paymentCurrency,hasAuthToken:Boolean(l.authToken),accountId:l.accountId}),!(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:H.ErrorCode.CONFIG_ERROR}),this.isLoading=!1,void console.groupEnd();if(this.isAvailable=Y.isApplePaySupported(),this.canMakePayments=Y.canMakePayments(),console.log("[ApplePay Component] support check:",{isAvailable:this.isAvailable,canMakePayments:this.canMakePayments,hasApplePaySessionOnWindow:"undefined"!=typeof window&&"ApplePaySession"in window}),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:H.ErrorCode.NOT_SUPPORTED}),this.isLoading=!1,void console.groupEnd();if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:H.ErrorCode.NOT_AVAILABLE}),this.isLoading=!1,void console.groupEnd();const e={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};console.log("[ApplePay Component] initializing service with config:",e),this.applePayService=new F,this.applePayService.initialize(e),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(e){console.error("Apple Pay initialization error:",e),this.error=e instanceof Error?e.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:H.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1,console.groupEnd()}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?Y.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!l.applePayEnabled)return console.log("[ApplePay Component] Apple Pay disabled in checkout settings; not rendering"),null;const t=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return e(a,null,l.checkoutLoaded&&e("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{console.log("[ApplePay Component] Apple Pay SDK script loaded"),this.initializeApplePay()}}),e("div",{class:"apple-pay-container"},e(Q,{isLoading:this.isLoading}),t&&e(V,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),e("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};H.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const q=class{constructor(e){t(this,e)}render(){return e(a,{key:"abd92b499208321582b08a490c78c9167be2ebd4"},e("section",{key:"38e15cef5a19a43249d7ecf3d4eb4ea8e032f248"},e("div",{key:"747f811012ed9707265369e59dbde8cd7ad3bca6"},e("div",{key:"8575f50759664d5c64d235025699c81f055267ca",part:p},null==l?void 0:l.paymentDescription),e("div",{key:"af77776bbe21bce77586447bbf445e4c5d8c1165"},e("span",{key:"5cdaaec454118197b3e37a942d83907e72444342",part:p},"Total")," ",e("span",{key:"ccc35217ac9740d5a00b7abbcec4133848afcc28",part:p},y(+(null==l?void 0:l.totalAmount)))))))}},W=class{constructor(e){t(this,e),this.levels={h1:m,h2:v,h3:g},this.level="h1"}render(){return e(a,{key:"e1d39365c2ff2c291a42b53d6bcbe1d97d602778"},e(this.levels[this.level],{key:"0b8c8c3a42ff2151e3b293cafeeaeda72e94d767",text:this.text,class:this.class}))}},Z=o();class G{async getLinkToken(e,t,i,s){return Z.post({endpoint:`plaid/${t}/link`,body:{checkout_id:i},authToken:e,signal:s})}async tokenizeBankAccount(e,t,i,s,n,o){const a=`plaid/${t}/tokenize`,r={public_token:i};return s&&(r.link_token_id=s),n&&(r.payment_method_group_id=n),Z.post({endpoint:a,body:r,authToken:e,signal:o})}}const J=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.checkoutChangedEvent=i(this,"checkout-changed"),this.plaidService=new G,this.handleApplePayCompleted=e=>{const{success:t,token:i,paymentMethodId:s,error:n}=e.detail;t&&i?(l.paymentToken=s,l.selectedPaymentMethod={type:E.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:P.TOKENIZE_ERROR,severity:w.ERROR}))},this.handleApplePayError=e=>{const{error:t,code:i}=e.detail;console.error("Apple Pay error:",t),this.errorEvent.emit({message:t||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:w.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 e={authToken:this.authToken,checkoutId:this.checkoutId,service:new S};this.getCheckout=(({authToken:e,checkoutId:t,service:i})=>async({onSuccess:s,onError:n})=>{var o;try{const a=await i.fetchCheckout(e,t);if(a.error)return n({error:N(a.error),code:C(null===(o=a.error)||void 0===o?void 0:o.code),severity:w.ERROR});s({checkout:a.data})}catch(e){const t=C(null==e?void 0:e.code);return n({error:e.message||e,code:t,severity:w.ERROR})}})(e),this.completeCheckout=(({authToken:e,checkoutId:t,service:i})=>async({payment:s,onSuccess:n,onError:o})=>{var a;try{const r=await i.complete(e,t,s);if(r.error)return o({error:N(r.error),code:C(null===(a=r.error)||void 0===a?void 0:a.code),severity:w.ERROR});n({checkout:r.data})}catch(e){const t=C(null==e?void 0:e.code);return o({error:e.message||e,code:t,severity:w.ERROR})}})(e),c((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new k(this),A(),l.authToken=this.authToken,this.fetchCheckout(),M("set",(e=>{const t=b[e];void 0!==t&&f(e,t)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.removeApplePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:e})=>{this.updateStore(e),e.status!==T.completed?e.status!==T.expired||this.errorEvent.emit({message:j.CHECKOUT_EXPIRED,errorCode:P.CHECKOUT_EXPIRED,severity:w.ERROR}):this.errorEvent.emit({message:j.CHECKOUT_ALREADY_COMPLETED,errorCode:P.CHECKOUT_ALREADY_COMPLETED,severity:w.ERROR})},onError:e=>{this.errorEvent.emit({message:e.message,errorCode:e.code,severity:e.severity})}}):this.errorEvent.emit({message:j.NOT_AUTHENTICATED,errorCode:P.NOT_AUTHENTICATED,severity:w.ERROR})}updateStore(e){var t,i,s,n,o,a;l.accountId=e.account_id,l.checkoutLoaded=!0,l.paymentMethods=e.payment_methods.map((e=>new I(e))),l.paymentMethodGroupId=e.payment_method_group_id,l.paymentDescription=e.payment_description,l.totalAmount=e.total_amount,l.paymentAmount=e.payment_amount,l.bnplEnabled=e.payment_settings.bnpl_payments,l.insuranceEnabled=e.payment_settings.insurance_payments,l.bankAccountVerification=null===(t=e.payment_settings)||void 0===t?void 0:t.bank_account_verification,l.applePayEnabled=Boolean(null===(i=e.payment_settings)||void 0===i?void 0:i.apple_payments),l.bnplProviderClientId=null===(s=null==e?void 0:e.bnpl)||void 0===s?void 0:s.provider_client_id,l.bnplProviderMode=null===(n=null==e?void 0:e.bnpl)||void 0===n?void 0:n.provider_mode,l.bnplProviderApiVersion=null===(o=null==e?void 0:e.bnpl)||void 0===o?void 0:o.provider_api_version,l.bnplProviderCheckoutUrl=null===(a=null==e?void 0:e.bnpl)||void 0===a?void 0:a.provider_checkout_url}emitCheckoutChanged(){const e={availablePaymentMethodTypes:h(),selectedPaymentMethod:l.selectedPaymentMethod,savedPaymentMethods:l.paymentMethods};this.checkoutChangedEvent.emit(e)}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(e){var t,i,s;const n=null!==(i=await(null===(t=this.billingFormRef)||void 0===t?void 0:t.getValues()))&&void 0!==i?i:{},o=Object.assign(Object.assign({},e),n),a=Object.assign({accountId:l.accountId,payment_method_group_id:void 0},o);l.savePaymentMethod&&(a.payment_method_group_id=l.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:a,account:l.accountId}));return r.error?r:(l.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(e){l.selectedPaymentMethod=e,l.paymentToken=e.id||void 0}async validate(){var e,t;const i=[];l.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)===E.NEW_CARD,n=(null===(t=l.selectedPaymentMethod)||void 0===t?void 0:t.type)===E.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((e=>"boolean"==typeof e?e:!1!==(null==e?void 0:e.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:P.VALIDATION_ERROR,severity:w.ERROR}),!1)}catch(e){return!1}}async submitCheckout(e){var t,i,s,n,o;const a=await this.validate();if(!l.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:P.VALIDATION_ERROR,severity:w.ERROR});const r=(null===(t=l.selectedPaymentMethod)||void 0===t?void 0:t.type)===E.NEW_CARD,c=(null===(i=l.selectedPaymentMethod)||void 0===i?void 0:i.type)===E.NEW_BANK_ACCOUNT,h=(null===(s=l.selectedPaymentMethod)||void 0===s?void 0:s.type)===E.PLAID;if(r||c){const t=await this.tokenizePaymentMethod(e);if(null==t?void 0:t.error)return void this.errorEvent.emit({message:t.error.message,errorCode:P.TOKENIZE_ERROR,severity:w.ERROR})}if(h&&!l.paymentToken){const e=l.plaidPublicToken,t=l.plaidLinkTokenId;if(!e)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:P.TOKENIZE_ERROR,severity:w.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(l.authToken,l.accountId,e,t||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:P.TOKENIZE_ERROR,severity:w.ERROR});const s=null==i?void 0:i.data,o=(null===(n=null==s?void 0:s.bank_account)||void 0===n?void 0:n.token)||(null==s?void 0:s.token)||(null==s?void 0:s.id);l.paymentToken=o}catch(e){return void this.errorEvent.emit({message:(null==e?void 0:e.message)||"Plaid exchange error",errorCode:P.TOKENIZE_ERROR,severity:w.ERROR})}}if(!a)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:P.VALIDATION_ERROR,severity:w.ERROR});if(!l.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:P.TOKENIZE_ERROR,severity:w.ERROR});let d;d={payment_mode:(e=>{switch(e){case E.NEW_CARD:case E.SAVED_CARD:case E.NEW_BANK_ACCOUNT:case E.SAVED_BANK_ACCOUNT:case E.PLAID:return D.ECOM;case E.SEZZLE:return D.BNPL;case E.APPLE_PAY:return D.APPLE_PAY;default:return}})(null===(o=l.selectedPaymentMethod)||void 0===o?void 0:o.type),payment_token:l.paymentToken},this.completeCheckout({payment:d,onSuccess:({checkout:e})=>{this.submitEvent.emit({checkout:e,message:"Checkout completed successfully"})},onError:e=>{this.errorEvent.emit({message:e.message,errorCode:P.COMPLETE_CHECKOUT_ERROR,severity:w.ERROR})}})}render(){return e(s,{key:"63acafa8f4819ac63e564807779976e352ccbdfb"})}get hostEl(){return n(this)}};var X;!function(e){e.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",e.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",e.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",e.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",e.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",e.PLAID_TOKEN_EXPIRED="plaid-token-expired",e.PLAID_NETWORK_ERROR="plaid-network-error",e.PLAID_USER_CANCELLED="plaid-user-cancelled",e.PLAID_TIMEOUT="plaid-timeout",e.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",e.PLAID_ACCOUNT_LOCKED="plaid-account-locked",e.PLAID_MAINTENANCE="plaid-maintenance",e.PLAID_RATE_LIMITED="plaid-rate-limited"}(X||(X={}));const K={[X.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[X.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[X.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[X.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[X.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[X.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[X.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[X.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[X.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[X.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[X.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[X.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[X.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},$={[X.PLAID_SDK_LOAD_FAILED]:w.ERROR,[X.PLAID_LINK_INIT_FAILED]:w.ERROR,[X.PLAID_LINK_TOKEN_FAILED]:w.ERROR,[X.PLAID_AUTHENTICATION_FAILED]:w.ERROR,[X.PLAID_BANK_NOT_SUPPORTED]:w.WARNING,[X.PLAID_TOKEN_EXPIRED]:w.WARNING,[X.PLAID_NETWORK_ERROR]:w.WARNING,[X.PLAID_USER_CANCELLED]:w.INFO,[X.PLAID_TIMEOUT]:w.WARNING,[X.PLAID_INVALID_CREDENTIALS]:w.ERROR,[X.PLAID_ACCOUNT_LOCKED]:w.ERROR,[X.PLAID_MAINTENANCE]:w.WARNING,[X.PLAID_RATE_LIMITED]:w.WARNING},ee=class{constructor(e){t(this,e),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 G,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:X.PLAID_SDK_LOAD_FAILED,message:K[X.PLAID_SDK_LOAD_FAILED],severity:$[X.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:X.PLAID_LINK_TOKEN_FAILED,message:K[X.PLAID_LINK_TOKEN_FAILED],severity:$[X.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const e=window.Plaid;this.plaidLink=e.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(e){this.handleError({code:X.PLAID_LINK_INIT_FAILED,message:K[X.PLAID_LINK_INIT_FAILED],severity:$[X.PLAID_LINK_INIT_FAILED],originalError:e,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var e,t,i,s,n;try{if(!l.authToken||!l.accountId)return void this.handleError({code:X.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:w.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var e;null===(e=this.abortController)||void 0===e||e.abort()}),3e4);const t=await this.plaidService.getLinkToken(l.authToken,l.accountId,l.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),t.error)throw new Error("string"==typeof t.error?t.error:t.error.message||"Failed to get link token");this.linkToken=t.data.link_token,this.linkTokenId=(null==t?void 0:t.id)||(null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.id)||null,this.linkTokenId&&(l.plaidLinkTokenId=this.linkTokenId)}catch(e){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let o=X.PLAID_LINK_TOKEN_FAILED,a=K[o],r=!0;"AbortError"===e.name?(o=X.PLAID_TIMEOUT,a=K[o],r=!0):(null===(t=e.message)||void 0===t?void 0:t.includes("network"))||(null===(i=e.message)||void 0===i?void 0:i.includes("fetch"))?(o=X.PLAID_NETWORK_ERROR,a=K[o],r=!0):((null===(s=e.message)||void 0===s?void 0:s.includes("401"))||(null===(n=e.message)||void 0===n?void 0:n.includes("unauthorized")))&&(o=X.PLAID_INVALID_CREDENTIALS,a="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:o,message:a,severity:$[o],originalError:e,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=e=>{if("string"==typeof e){if(e.includes("rate_limit"))return X.PLAID_RATE_LIMITED;if(e.includes("maintenance"))return X.PLAID_MAINTENANCE;if(e.includes("not_authenticated"))return X.PLAID_INVALID_CREDENTIALS}if(null==e?void 0:e.code)switch(e.code){case"rate_limited":return X.PLAID_RATE_LIMITED;case"maintenance":return X.PLAID_MAINTENANCE;case"not_authenticated":return X.PLAID_INVALID_CREDENTIALS;default:return X.PLAID_LINK_TOKEN_FAILED}return X.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=e=>{this.publicToken=e,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,l.selectedPaymentMethod={type:E.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:w.INFO}),l.plaidPublicToken=e},this.handlePlaidExit=e=>{this.isAuthenticating=!1,e&&this.handlePlaidError(e)},this.handlePlaidEvent=(e,t)=>{switch(e){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(t)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=e=>{let t=X.PLAID_AUTHENTICATION_FAILED,i=K[t],s=!0,n="Click to try again";if(e.error_code)switch(e.error_code){case"INVALID_CREDENTIALS":t=X.PLAID_INVALID_CREDENTIALS,i=K[t],s=!0;break;case"ITEM_LOGIN_REQUIRED":t=X.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":t=X.PLAID_ACCOUNT_LOCKED,i=K[t],s=!1,n="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":t=X.PLAID_MAINTENANCE,i=K[t],s=!0;break;case"RATE_LIMIT_EXCEEDED":t=X.PLAID_RATE_LIMITED,i=K[t],s=!0;break;case"INVALID_REQUEST":t=X.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":t=X.PLAID_AUTHENTICATION_FAILED,i=e.error_message||"Bank authentication failed. Please try again.",s=!0;break;default:e.error_message&&(i=e.error_message)}if(e.error_message){const o=e.error_message.toLowerCase();o.includes("not supported")||o.includes("unsupported")?(t=X.PLAID_BANK_NOT_SUPPORTED,i=K[t],s=!1,n="Try a different payment method"):(o.includes("expired")||o.includes("timeout"))&&(t=X.PLAID_TOKEN_EXPIRED,i=K[t],s=!0)}this.handleError({code:t,message:i,severity:$[t],originalError:e,retryable:s,userAction:n}),this.isAuthenticating=!1},this.handleError=e=>{this.error=e,this.plaidError.emit({code:e.code,message:e.message,severity:e.severity,data:{originalError:e.originalError,retryable:e.retryable,userAction:e.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",e),e.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 e;const t=(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)===E.PLAID;this.isSelected!==t&&(this.isSelected=t)}}onSelectionChange(e){var t;e&&(null===(t=l.selectedPaymentMethod)||void 0===t?void 0:t.type)!==E.PLAID&&(l.selectedPaymentMethod={type:E.PLAID}),!e||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:X.PLAID_SDK_LOAD_FAILED,message:K[X.PLAID_SDK_LOAD_FAILED],severity:$[X.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var e;this.isSelected=(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)===E.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:E.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(e){this.isSelected=e,e&&(l.selectedPaymentMethod={type:E.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 e=d("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=e}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 t=e("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 e(a,{class:"payment-method"},e("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:e=>this.scriptRef=e}),e("div",{title:"Pay with Plaid"},e("div",{onClick:e=>{e.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",t," "),(()=>this.error?e("div",{class:(this.error.severity===w.ERROR?"text-danger":this.error.severity===w.WARNING?"text-warning":"text-info")+" mt-2"},e("small",null,this.error.message),e("br",null),e("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&e("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?e("div",{class:"text-info mt-2"},e("small",null,"Connecting to your bank...")):this.publicToken?e("div",{class:"text-success mt-2"},e("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:e("div",{class:"text-muted mt-2"},e("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},te=class{constructor(e){t(this,e),this.onPaymentMethodOptionClick=e=>t=>{t.preventDefault(),l.selectedPaymentMethod={id:e.id,type:e.type},l.paymentToken=e.id},this.isAllowedPaymentMethod=e=>!(e===E.SAVED_CARD&&l.disableCreditCard||e===E.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:e(a,null,e("div",{class:"saved-payment-methods"},l.paymentMethods.length?l.paymentMethods.filter((e=>this.isAllowedPaymentMethod(e.type))).map((t=>e("div",{class:"radio-list-item p-3",part:u,onClick:this.onPaymentMethodOptionClick(t)},e("form-control-radio",{name:"paymentMethodType",value:null==t?void 0:t.id,checked:l.paymentToken===(null==t?void 0:t.id),label:`${O[null==t?void 0:t.brand]||""} *${null==t?void 0:t.acct_last_four}`})))):null))}},ie=e("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"}}),se=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.paymentMethodOptionId=E.SEZZLE,this.initializeSezzleCheckout=()=>{let e;this.sezzlePromise=new Promise((t=>{e=t}));const t=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(e){e.preventDefault(),i.startCheckout({checkout_url:l.bnplProviderCheckoutUrl})},onComplete:t=>e({bnpl:t.data}),onCancel:t=>e({bnpl:t.data}),onFailure:t=>e({bnpl:t.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(t)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(e){return e.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){l.selectedPaymentMethod={type:E.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var t,i;return l.bnplEnabled?e(a,{class:"payment-method"},e("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:e=>this.scriptRef=e}),e("div",null,e("div",null,"Buy now, pay later with ",ie),this.installmentPlan&&e("small",null,e("span",null,null===(t=this.installmentPlan)||void 0===t?void 0:t.installments.length)," ",e("span",null,this.installmentPlan.schedule," payments of")," ",e("span",{class:"fw-bold"},y(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)}},ne={[E.NEW_BANK_ACCOUNT]:"New bank account",[E.NEW_CARD]:"New credit or debit card"},oe="Payment form not ready",ae="Validation error",re=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){A(),this.analytics=new k(this)}handleRadioClick(e){this.selectedPaymentMethod=e.detail,l.selectedPaymentMethod={type:e.detail}}async fillBillingForm(e){var t;null===(t=this.billingFormRef)||void 0===t||t.fill(e)}async tokenizePaymentMethod(e){null==e||e.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:P.TOKENIZE_ERROR,message:ae}),void(this.isLoading=!1);const e=await this.resolvePaymentMethod({isValid:!0});return e.error&&this.emitError({errorCode:e.error.code,message:e.error.message}),this.submitEvent.emit({response:e}),e}catch(e){const t=this.createErrorResponse(P.TOKENIZE_ERROR,e.message);return this.emitError({errorCode:P.TOKENIZE_ERROR,message:e.message}),this.submitEvent.emit({response:t}),t}finally{this.isLoading=!1}}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:oe}};const[e,t]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:e.isValid&&t.isValid,errors:Object.assign(Object.assign({},e.errors),t.errors)}}async tokenize(){try{const e=await this.billingFormRef.getValues(),t={clientId:this.authToken||l.authToken,account:this.accountId||l.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(e)};return await this.paymentMethodFormRef.tokenize(t)}catch(e){return e}}validateRequiredProps(){this.authToken||l.authToken||this.emitError({errorCode:P.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||l.accountId||this.emitError({errorCode:P.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=E.NEW_BANK_ACCOUNT,l.selectedPaymentMethod={type:E.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=E.NEW_CARD,l.selectedPaymentMethod={type:E.NEW_CARD}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const e=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=e}isSlottedWithinModularCheckout(){var e;let t=null===(e=this.host)||void 0===e?void 0:e.parentElement;for(;t;){if("JUSTIFI-MODULAR-CHECKOUT"===t.tagName)return!0;t=t.parentElement}return!1}get availablePaymentMethods(){const e=[];return this.disableCreditCard||e.push(E.NEW_CARD),this.disableBankAccount||e.push(E.NEW_BANK_ACCOUNT),e}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(e){this.errorEvent.emit(Object.assign(Object.assign({},e),{severity:w.ERROR}))}createErrorResponse(e,t){return{error:{code:e,message:t,decline_code:void 0}}}async resolvePaymentMethod(e){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",oe);try{const t=await this.validate();if(!t.isValid||!e.isValid){const e=Object.values(t.errors)[0]||ae;return{validationError:!0,error:{code:"validation_error",message:String(e),decline_code:void 0}}}return await this.performTokenization()}catch(e){return{error:e}}}async performTokenization(){var e,t;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(e=s.card)||void 0===e?void 0:e.token)||(null===(t=s.bank_account)||void 0===t?void 0:t.token),data:s}}buildPaymentMethodMetadata(e){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},e),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},e)}get paymentMethodGroupID(){return this.paymentMethodGroupId||l.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!l.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const i=this.selectedPaymentMethod===t&&void 0===l.selectedPaymentMethod.id;return e("div",{class:"payment-method"},e("justifi-radio-list-item",{name:"paymentMethodType",value:t,checked:i,label:ne[t],hidden:this.shouldHideRadioInput}),i&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return e("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),e("div",{class:"mt-4"},e("justifi-billing-form",{ref:e=>this.billingFormRef=e,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),e("div",{class:"mt-4"},e("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return e(t===E.NEW_CARD?"justifi-card-form":"justifi-bank-account-form",{ref:e=>this.paymentMethodFormRef=e})}render(){return e(a,{key:"bf221d17739bf70c3f581f3b9791a725e76c3f35"},e("form",{key:"df117d42d4160f31df1fca5d6903967cc48ad573"},e("fieldset",{key:"550e670feffb405c669d44c44eb9073f535c6cb6"},e("div",{key:"8eff7d3ab19618da54161220b92641bf19bfa82d",class:"row gy-3"},e("div",{key:"bf9d19e92be74abf48ce65c97efb3f9df52d4c3c",class:"col-12"},this.availablePaymentMethods.map((e=>this.renderPaymentMethodOption(e)))),e("div",{key:"eef1f4e1e03c2263efb51ae94085c5a3d73a9166",class:"col-12"},e("justifi-button",{key:"f0e5697e658236610da45c34e64a8cbb3f0f9d95",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:e=>this.tokenizePaymentMethod(e),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return n(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}};export{H as justifi_apple_pay,q as justifi_checkout_summary,W as justifi_header,J as justifi_modular_checkout,ee as justifi_plaid_payment_method,te as justifi_saved_payment_methods,se as justifi_sezzle_payment_method,re as justifi_tokenize_payment_method}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-DOjVAAtq.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{c as e,J as a}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-DOjVAAtq.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{c as e,J as a}from"./p-BSyMsqda.js";import{P as p}from"./p-8S_ROmnq.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{d as n}from"./p-C98BC5W5.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as h,a as c}from"./p-D2muobcE.js";import{m}from"./p-DYGIC0QH.js";import{m as u,S as d}from"./p-DfV3dFDB.js";import{S as j}from"./p-BhCH9S0e.js";import"./p-CZfYo5-1.js";import{d as l}from"./p-D0Peuz-m.js";import"./p-NMTsmUsG.js";import"./p-DdZLLkQ5.js";import"./p-Bgnhf5c9.js";import"./p-DdMxswn1.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-au49QgoI.js";import"./p-hbWSMN3O.js";import"./p-xDbRW9xn.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=l,this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){e(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new p};this.getPayouts=(({id:t,authToken:s,service:i})=>async({params:r,onSuccess:e,onError:a})=>{var p,m;try{const u=await i.fetchPayouts(t,s,r);if(u.error)return a({error:c(u.error),code:h(null===(m=u.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);e({payouts:(null===(p=u.data)||void 0===p?void 0:p.map((t=>new n(t))))||[],pagingInfo:t})}}catch(t){const s=h(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:o.ERROR})}})(t),this.getPayoutCSV=m(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({accountId:this.accountId,authToken:this.authToken,service:new d}))}render(){return i(j,{key:"fb8e3e21a4e5a0aa971a91eed4ef0b603dbd1b23"},i("payouts-list-core",{key:"c9fb97bd0d77d1989f346285cd5124121ad4ac83",getPayouts:this.getPayouts,getPayoutCSV:this.getPayoutCSV,getSubAccounts:this.getSubAccounts,"onError-event":this.handleOnError,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_payouts_list}
|