@justifi/webcomponents 6.15.0-rc.2 → 6.15.0
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/LICENSE +21 -0
- package/dist/cjs/{Analytics-COhunq0p.js → Analytics-BjZHa0wt.js} +4 -4
- package/dist/cjs/{Api-Do6SaltY.js → Api-us3AxMRC.js} +1 -1
- package/dist/cjs/{Business-oBifyXkW.js → Business-CNaz-VLa.js} +5 -1
- package/dist/cjs/{Plaid-D85oV9FN.js → Plaid-BcOAKDaU.js} +1 -1
- package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +13 -13
- package/dist/cjs/additional-questions_4.cjs.entry.js +3 -3
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +4 -4
- package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +2 -2
- package/dist/cjs/bank-account-form.cjs.entry.js +4 -4
- package/dist/cjs/{business-form-options-CnlrfbQ6.js → business-form-options-BHBs_yiK.js} +1 -1
- package/dist/cjs/{business-identity-schema-hpDJFnB4.js → business-identity-schema-XiCLzxWM.js} +3 -3
- package/dist/cjs/{business.service-72YETCdB.js → business.service-_Sl3vWmu.js} +3 -3
- package/dist/cjs/card-form.cjs.entry.js +4 -4
- package/dist/cjs/{check-pkg-version-BxGoSXGD.js → check-pkg-version-CjJab8fX.js} +1 -1
- package/dist/cjs/{checkout-actions-BRQFQ6n-.js → checkout-actions-CQyGpVPe.js} +2 -2
- package/dist/cjs/{checkout.service-CPsXfx0Z.js → checkout.service-B_qymeqJ.js} +3 -3
- package/dist/cjs/{country-config-C1bWmF8P.js → country-config-DQQujh5h.js} +1 -1
- package/dist/cjs/dispute-notification_2.cjs.entry.js +8 -8
- package/dist/cjs/{event-types-UHzCC7Ga.js → event-types-DmY59QXs.js} +3 -3
- package/dist/cjs/form-address-fields_3.cjs.entry.js +2 -2
- package/dist/cjs/form-alert_3.cjs.entry.js +1 -1
- package/dist/cjs/form-control-number_2.cjs.entry.js +4 -4
- package/dist/cjs/{get-business-BpaRbn5S.js → get-business-BVxtiSDs.js} +3 -3
- package/dist/cjs/{get-payment-details-Cmg8gWvo.js → get-payment-details-DR1GgpyX.js} +3 -3
- package/dist/cjs/{get-subaccounts-Bp7DOmM_.js → get-subaccounts-BMY2bOFj.js} +4 -4
- package/dist/cjs/{input-handlers-_51J5q7J.js → input-handlers-v9h_2Ysi.js} +1 -1
- package/dist/cjs/justifi-apple-pay_12.cjs.entry.js +17 -11
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +6 -6
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +6 -6
- package/dist/cjs/justifi-business-details.cjs.entry.js +9 -9
- package/dist/cjs/justifi-business-form.cjs.entry.js +13 -13
- package/dist/cjs/justifi-card-form.cjs.entry.js +6 -6
- package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +6 -6
- package/dist/cjs/justifi-checkout.cjs.entry.js +6 -6
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +6 -4
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +11 -11
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +8 -8
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +33 -20
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payment-details.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payments-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payout-details.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-qr-terminal.cjs.entry.js +9 -9
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +9 -9
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +7 -7
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +9 -9
- package/dist/cjs/{package-G3Vs7Jx5.js → package-30T__1wH.js} +1 -1
- package/dist/cjs/{payment-provisioning-actions-DDooZhhk.js → payment-provisioning-actions-SVp7B8pR.js} +2 -2
- package/dist/cjs/payment-provisioning-form-buttons_2.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-CVwTrHEL.js → payment.service-DRXVT-uB.js} +3 -3
- package/dist/cjs/{payout.service-CL3VR0hN.js → payout.service-CuQ-mXKB.js} +3 -3
- package/dist/cjs/{payouts-status-1IUtW-UQ.js → payouts-status-BvHeuy9v.js} +2 -2
- package/dist/cjs/{plaid.service-Cukg5wuY.js → plaid.service-B58nzlUE.js} +3 -3
- package/dist/cjs/{schema-validations-DehT309E.js → schema-validations-sjRvL4KO.js} +5 -4
- package/dist/cjs/{terminal.service-C0KG7BqL.js → terminal.service-CmtSEgTc.js} +3 -3
- package/dist/cjs/{utils-CBriZzRC.js → utils-BScgWJC5.js} +1 -1
- package/dist/collection/api/Business.js +2 -0
- package/dist/collection/api/Checkout.js +1 -1
- package/dist/collection/components/business-forms/schemas/schema-helpers.js +2 -1
- package/dist/collection/components/business-forms/utils/helpers.js +3 -1
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +4 -2
- package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +3 -3
- package/dist/collection/components/modular-checkout/sub-components/justifi-apple-pay.js +7 -1
- package/dist/docs.json +2 -2
- package/dist/esm/{Analytics-3WmRTICF.js → Analytics-BtMYbHD0.js} +4 -4
- package/dist/esm/{Api-83B3f28Q.js → Api-nVK-rgbk.js} +1 -1
- package/dist/esm/{Business-DaDqgDrb.js → Business-CTtGaVYs.js} +5 -1
- package/dist/esm/{Plaid-BP3xNxQF.js → Plaid-CRcTLeaz.js} +1 -1
- package/dist/esm/additional-questions-form-step_15.entry.js +13 -13
- package/dist/esm/additional-questions_4.entry.js +3 -3
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +4 -4
- package/dist/esm/bank-account-document-form-inputs.entry.js +2 -2
- package/dist/esm/bank-account-form.entry.js +4 -4
- package/dist/esm/{business-form-options-BxVQL9ar.js → business-form-options-DLRkVtee.js} +1 -1
- package/dist/esm/{business-identity-schema-BkmRlnQo.js → business-identity-schema-BP61Unwf.js} +3 -3
- package/dist/esm/{business.service-CTqiKKy5.js → business.service-Cq7H5w1T.js} +3 -3
- package/dist/esm/card-form.entry.js +4 -4
- package/dist/esm/{check-pkg-version-CmFl6VLH.js → check-pkg-version-BW9zgceK.js} +1 -1
- package/dist/esm/{checkout-actions-0ftD0elo.js → checkout-actions-CWnrb317.js} +2 -2
- package/dist/esm/{checkout.service-wjFjBxIB.js → checkout.service-JA7oTq5d.js} +3 -3
- package/dist/esm/{country-config-CJwnhkdq.js → country-config-F5YwgHgR.js} +1 -1
- package/dist/esm/dispute-notification_2.entry.js +8 -8
- package/dist/esm/{event-types-cqQHLwCy.js → event-types-Dsf8IwD6.js} +3 -3
- package/dist/esm/form-address-fields_3.entry.js +2 -2
- package/dist/esm/form-alert_3.entry.js +1 -1
- package/dist/esm/form-control-number_2.entry.js +4 -4
- package/dist/esm/{get-business-BLCT-zfN.js → get-business-IZpxKRZM.js} +3 -3
- package/dist/esm/{get-payment-details-BokzuPGl.js → get-payment-details-DSI41Pq5.js} +3 -3
- package/dist/esm/{get-subaccounts-ClGG-LRZ.js → get-subaccounts-B-S2TGRa.js} +4 -4
- package/dist/esm/{input-handlers-Dfuc6aDW.js → input-handlers-Dm8jO-BT.js} +1 -1
- package/dist/esm/justifi-apple-pay_12.entry.js +17 -11
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +6 -6
- package/dist/esm/justifi-bank-account-form.entry.js +6 -6
- package/dist/esm/justifi-business-details.entry.js +9 -9
- package/dist/esm/justifi-business-form.entry.js +13 -13
- package/dist/esm/justifi-card-form.entry.js +6 -6
- package/dist/esm/justifi-checkout-qr-code.entry.js +6 -6
- package/dist/esm/justifi-checkout.entry.js +6 -6
- package/dist/esm/justifi-checkouts-list-filters.entry.js +6 -4
- package/dist/esm/justifi-checkouts-list.entry.js +11 -11
- package/dist/esm/justifi-dispute-management.entry.js +8 -8
- package/dist/esm/justifi-gross-payment-chart.entry.js +33 -20
- package/dist/esm/justifi-order-terminals.entry.js +10 -10
- package/dist/esm/justifi-payment-details.entry.js +9 -9
- package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
- package/dist/esm/justifi-payment-transactions-list.entry.js +8 -8
- package/dist/esm/justifi-payments-list.entry.js +8 -8
- package/dist/esm/justifi-payout-details.entry.js +9 -9
- package/dist/esm/justifi-payout-transactions-list.entry.js +8 -8
- package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +10 -10
- package/dist/esm/justifi-qr-terminal.entry.js +9 -9
- package/dist/esm/justifi-refund-payment.entry.js +9 -9
- package/dist/esm/justifi-season-interruption-insurance.entry.js +7 -7
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminal-orders-list.entry.js +7 -7
- package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminals-list.entry.js +9 -9
- package/dist/esm/{package-CAVi_ne1.js → package-BC9n8nB2.js} +1 -1
- package/dist/esm/{payment-provisioning-actions-VRIPjnAQ.js → payment-provisioning-actions-VtleD509.js} +2 -2
- package/dist/esm/payment-provisioning-form-buttons_2.entry.js +1 -1
- package/dist/esm/{payment.service-D7uv5vym.js → payment.service-B42sKlQE.js} +3 -3
- package/dist/esm/{payout.service-BoSyqft1.js → payout.service-BIoAgNJJ.js} +3 -3
- package/dist/esm/{payouts-status-CaiC5qpn.js → payouts-status-CnIf4XDi.js} +2 -2
- package/dist/esm/{plaid.service-DufQkxDk.js → plaid.service-C6Ltk2ef.js} +3 -3
- package/dist/esm/{schema-validations-8dbMCACI.js → schema-validations-De7Qe0VU.js} +5 -4
- package/dist/esm/{terminal.service-BM2aebB6.js → terminal.service-DV3qIwBy.js} +3 -3
- package/dist/esm/{utils-YUOJKtjO.js → utils-DaPywmTI.js} +1 -1
- package/dist/module/Business.js +5 -1
- package/dist/module/Plaid.js +1 -1
- package/dist/module/justifi-apple-pay2.js +7 -1
- package/dist/module/justifi-checkouts-list-filters.js +4 -2
- package/dist/module/justifi-checkouts-list.js +2 -2
- package/dist/module/justifi-gross-payment-chart.js +26 -13
- package/dist/module/package.js +1 -1
- package/dist/module/schema-validations.js +2 -1
- package/dist/types/api/Business.d.ts +2 -0
- package/dist/types/api/Checkout.d.ts +7 -7
- package/dist/types/components/checkouts-list/justifi-checkouts-list.d.ts +1 -1
- package/dist/types/components/modular-checkout/sub-components/justifi-apple-pay.d.ts +1 -0
- package/dist/types/components.d.ts +1 -1
- package/dist/webcomponents/p-065b854f.entry.js +1 -0
- package/dist/webcomponents/{p-b98ea26a.entry.js → p-082f912c.entry.js} +1 -1
- package/dist/webcomponents/{p-5c89dcdf.entry.js → p-0cd689f4.entry.js} +1 -1
- package/dist/webcomponents/{p-6eb65d23.entry.js → p-0e9351c4.entry.js} +1 -1
- package/dist/webcomponents/p-0f7e3515.entry.js +20 -0
- package/dist/webcomponents/{p-f3682c72.entry.js → p-13814028.entry.js} +1 -1
- package/dist/webcomponents/{p-bf3866b3.entry.js → p-16261d8a.entry.js} +1 -1
- package/dist/webcomponents/p-19cabdaf.entry.js +1 -0
- package/dist/webcomponents/{p-cb1cc88e.entry.js → p-1cfa634a.entry.js} +1 -1
- package/dist/webcomponents/p-2ef913b8.entry.js +1 -0
- package/dist/webcomponents/{p-25f70d5f.entry.js → p-3a1f8c5b.entry.js} +1 -1
- package/dist/webcomponents/{p-0aa96018.entry.js → p-429046e1.entry.js} +1 -1
- package/dist/webcomponents/{p-4cad48c1.entry.js → p-44ff4f2c.entry.js} +1 -1
- package/dist/webcomponents/{p-68e88747.entry.js → p-4740601b.entry.js} +1 -1
- package/dist/webcomponents/{p-50c2b8f0.entry.js → p-59b95eae.entry.js} +1 -1
- package/dist/webcomponents/{p-1cdbe8c1.entry.js → p-5c889829.entry.js} +1 -1
- package/dist/webcomponents/p-6c7fca1a.entry.js +1 -0
- package/dist/webcomponents/{p-5dcb1713.entry.js → p-735d397e.entry.js} +1 -1
- package/dist/webcomponents/p-8432cb42.entry.js +1 -0
- package/dist/webcomponents/{p-f5358a80.entry.js → p-88a44a02.entry.js} +1 -1
- package/dist/webcomponents/{p-f9f0cb1f.entry.js → p-89f0c2aa.entry.js} +1 -1
- package/dist/webcomponents/p-9b43b90d.entry.js +1 -0
- package/dist/webcomponents/p-9db15fac.entry.js +1 -0
- package/dist/webcomponents/{p-b23dfa13.entry.js → p-9eb00966.entry.js} +1 -1
- package/dist/webcomponents/p-BAvoKtN2.js +1 -0
- package/dist/webcomponents/p-BC9n8nB2.js +1 -0
- package/dist/webcomponents/p-BDtSw_d-.js +1 -0
- package/dist/webcomponents/{p-CIpBEUtx.js → p-B_2zgnvM.js} +1 -1
- package/dist/webcomponents/{p-CLq3Og7o.js → p-BhpaUYtS.js} +1 -1
- package/dist/webcomponents/{p-nbKvRcwU.js → p-BjjKkMO1.js} +1 -1
- package/dist/webcomponents/p-BmaQUnqv.js +1 -0
- package/dist/webcomponents/{p-DZQBPUfH.js → p-Bxc0NRj8.js} +1 -1
- package/dist/webcomponents/p-C60AkJ6a.js +1 -0
- package/dist/webcomponents/{p-vIQBTQmc.js → p-C6Jq8YDT.js} +1 -1
- package/dist/webcomponents/p-C9p1gWAC.js +1 -0
- package/dist/webcomponents/p-CTtGaVYs.js +1 -0
- package/dist/webcomponents/p-CgOgijHy.js +1 -0
- package/dist/webcomponents/{p-OReJ-ZQb.js → p-CtlBL-X6.js} +1 -1
- package/dist/webcomponents/p-D694H6co.js +1 -0
- package/dist/webcomponents/p-D7fNBSlC.js +1 -0
- package/dist/webcomponents/p-D7nyPi2Q.js +1 -0
- package/dist/webcomponents/p-DC2djVls.js +1 -0
- package/dist/webcomponents/{p-B0DHIvEj.js → p-DQmijfCN.js} +1 -1
- package/dist/webcomponents/p-Dqxyi-uK.js +1 -0
- package/dist/webcomponents/{p-BEL8sLz6.js → p-_MjmE9YT.js} +1 -1
- package/dist/webcomponents/{p-c3818a5a.entry.js → p-a10beb26.entry.js} +1 -1
- package/dist/webcomponents/{p-7002286e.entry.js → p-a71cc8e2.entry.js} +1 -1
- package/dist/webcomponents/{p-ced6f6f1.entry.js → p-a7c594d1.entry.js} +1 -1
- package/dist/webcomponents/{p-6931a1f2.entry.js → p-a8d25057.entry.js} +1 -1
- package/dist/webcomponents/{p-ee7fe3a8.entry.js → p-b9ba7c95.entry.js} +1 -1
- package/dist/webcomponents/{p-5842d4e8.entry.js → p-c385f10d.entry.js} +1 -1
- package/dist/webcomponents/p-c55fdbbf.entry.js +1 -0
- package/dist/webcomponents/{p-eb31024f.entry.js → p-cec7164e.entry.js} +1 -1
- package/dist/webcomponents/p-d3544e86.entry.js +1 -0
- package/dist/webcomponents/{p-9e9a2546.entry.js → p-de047614.entry.js} +1 -1
- package/dist/webcomponents/{p-c5424fda.entry.js → p-f2b3c7d5.entry.js} +1 -1
- package/dist/webcomponents/{p-e55216fb.entry.js → p-f39889f2.entry.js} +1 -1
- package/dist/webcomponents/{p-6c94218c.entry.js → p-f40fa614.entry.js} +1 -1
- package/dist/webcomponents/{p-5d7b3d71.entry.js → p-f5cb6a26.entry.js} +1 -1
- package/dist/webcomponents/{p-fdd087d4.entry.js → p-f9f310dc.entry.js} +1 -1
- package/dist/webcomponents/p-iA-Amt2z.js +1 -0
- package/dist/webcomponents/p-pueOrhXO.js +1 -0
- package/dist/webcomponents/{p-CJEetAx7.js → p-rFpPIJgu.js} +1 -1
- package/dist/webcomponents/{p-CawcnSoV.js → p-riZDHN5-.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +15 -17
- package/dist/webcomponents/p-27igUlku.js +0 -1
- package/dist/webcomponents/p-3642e189.entry.js +0 -1
- package/dist/webcomponents/p-5f8c30b6.entry.js +0 -1
- package/dist/webcomponents/p-74575a99.entry.js +0 -1
- package/dist/webcomponents/p-7c405573.entry.js +0 -1
- package/dist/webcomponents/p-825a7ee6.entry.js +0 -1
- package/dist/webcomponents/p-909a9828.entry.js +0 -20
- package/dist/webcomponents/p-955c06d3.entry.js +0 -1
- package/dist/webcomponents/p-BAKuMxC9.js +0 -1
- package/dist/webcomponents/p-BSxXlu9H.js +0 -1
- package/dist/webcomponents/p-CAVi_ne1.js +0 -1
- package/dist/webcomponents/p-CXsRwohv.js +0 -1
- package/dist/webcomponents/p-CbyGKcz_.js +0 -1
- package/dist/webcomponents/p-Cy2N3vAg.js +0 -1
- package/dist/webcomponents/p-CyOXIqHo.js +0 -1
- package/dist/webcomponents/p-D6uhYbLo.js +0 -1
- package/dist/webcomponents/p-DN7VhlTn.js +0 -1
- package/dist/webcomponents/p-DNuxxP2B.js +0 -1
- package/dist/webcomponents/p-D_84NsmN.js +0 -1
- package/dist/webcomponents/p-DaDqgDrb.js +0 -1
- package/dist/webcomponents/p-Do9dxNjh.js +0 -1
- package/dist/webcomponents/p-PdwJswAy.js +0 -1
- package/dist/webcomponents/p-ca13117d.entry.js +0 -1
- package/dist/webcomponents/p-d59676ea.entry.js +0 -1
- package/dist/webcomponents/p-d98bc829.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{c as s}from"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{l as i,C as r,b as o}from"./p-
|
|
1
|
+
import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{c as s}from"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{l as i,C as r,b as o}from"./p-Dqxyi-uK.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{J as c}from"./p-BjjKkMO1.js";import{c as d}from"./p-_MjmE9YT.js";import{g as p,a as h}from"./p-BhpaUYtS.js";import{P as l}from"./p-pueOrhXO.js";import{T as f,a as u,b as m,c as b,d as y,e as _,f as w,g,h as j,i as T,j as v,k,l as P}from"./p-DZr0wLGh.js";import{S as C}from"./p-05AWudQe.js";import{T as D}from"./p-CZfYo5-1.js";import{a as O}from"./p-Ds_P-dB8.js";import{a6 as S,a7 as I}from"./p-Bu7gdOaV.js";import"./p-DgTOxu8x.js";import"./p-BC9n8nB2.js";import"./p-C6Jq8YDT.js";import"./p-MPer3Rw7.js";const F={id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:S,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:S,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:S,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:S,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:S,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:S,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},q={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",processing_fee:"Processing Fee",refund_processing_fee:"Refund Processing Fee",fee_rounding_adjustment:"Fee Rounding Adjustment",platform_fee:"Platform Fee",processing_fee_return:"Processing Fee Return",platform_fee_return:"Platform Fee Return"},x={id:e=>t("td",{part:I(e.id)},e.id),account_id:e=>t("td",{part:I(e.account_id)},e.account_id),payout_id:e=>t("td",{part:I(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:I(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:I(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:I(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:I(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:I(e.currency)},e.currency),description:e=>t("td",{part:I(e.description)},e.description),source_id:e=>t("td",{part:I(e.source_id)},e.source_id),txn_type:e=>t("td",{part:I(e.txn_type)},q[e.txn_type]),created_at:e=>t("td",{part:I(e.created_at)},t("div",{class:"fw-bold"},O(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},O(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:I(e.available_on)},t("div",{class:"fw-bold"},O(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},O(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:I(e.updated_at)},t("div",{class:"fw-bold"},O(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},O(e.updated_at,{showTime:!0})))},A=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event",7),this.errorEvent=a(this,"error-event",7),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=n,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:D.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:D.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:D.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,F,x),d(),this.analytics=new c(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:n,final:c})=>{var d;try{const c=await a.fetchPayoutTransactions(t,e,s);c.error?n({error:h(c.error),code:p(null===(d=c.error)||void 0===d?void 0:d.code),severity:r.ERROR}):o({balanceTransactions:c.data.map((t=>new i(t))),pagingInfo:Object.assign({},c.page_info)})}catch(t){const e=p(null==t?void 0:t.code);n({error:h(t),code:e,severity:r.ERROR})}finally{c()}})({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,r.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(C,{key:"1572d59b82d7e4f2140fe94dbbb91c810f9ecda0"},t(u,{key:"908f08eb27b6650a86574ffb7f19e021e7ff4659"},t(m,{key:"ef8ae77a07274833c0ce56e90685d2001b32cfce"},t(b,{key:"b9672731713b7bfa60d08f67359c0fb54a3d313e"},t(y,{key:"175cfdf101b8d263af2163a7a51fef7a69036132"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"74475a34dde0dabee89d84013114f68e6e5f12ee"},t(w,{key:"5a60a046c259d614dc830e7bb2bdc950ace10ede",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(g,{key:"25c2bde71c004b7a190a80e0a92cd51be80cccd1",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"1cc2b6cc80ccd0eb6fc8d7b69f0b44a369e660f8",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(v,{key:"2a1229c56c8665515bacde6da6c96b522a2af136"},t(k,{key:"9fe927466e38927d412ffc862ddd6bda6a6abbf5"},t(P,{key:"dee4c152b024f62c1b12f542034adb894e61ac26",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"183fcc59d45b69133fba561b441bb7e63ba22ac9",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{A as justifi_payout_transactions_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./p-D9sqTVmd.js";import{P as a,a as t}from"./p-riZDHN5-.js";import{S as s,C as r}from"./p-CTtGaVYs.js";import{a as n,c as i}from"./p-CtlBL-X6.js";const l=[{label:"Choose state / province",value:""},...s.filter((e=>""!==e.value)),...a.filter((e=>""!==e.value))],d=e=>""===e?null:e,m=/^\d+$/,o=/P\.?\s?O\.?\s?Box|Postal\sBox/i,c=e().email("Enter valid email").transform(d),u=e().matches(/^\d{10}$/,"Enter valid phone number").transform(d),b=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(d),v=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(d),h=e().matches(/^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/,"Enter valid website url").transform(d),N=e().transform(d),p=e().min(2,"Industry must be at least 2 characters").max(50,"Industry must be less than 50 characters").transform(d),E=e().matches(m,"Enter valid tax id, SSN, or EIN").test("not-repeat","Enter valid tax id, SSN, or EIN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid tax id, SSN, or EIN",(e=>"123456789"!==e)).transform(d),S=a=>e().matches(t[a].postalRegex,"Enter valid postal code").transform(d),g=a=>a===r.CAN?e().matches(m,"Enter valid SIN").length(t[a].identityDigits,"Enter valid SIN").test("not-repeat","Enter valid SIN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid SIN",(e=>"123456789"!==e)).transform(d):y,w=a=>a===r.CAN?e().matches(m,"Enter valid Business Number (BN)").length(t[a].taxIdDigits,"Enter valid Business Number (BN)").test("not-repeat","Enter valid Business Number (BN)",(e=>!e||!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid Business Number (BN)",(e=>!e||"123456789"!==e)).transform(d):E,A=e().test("past-date","Date of registration must be in the past",(e=>{const a=new Date(e);return a.setDate(a.getDate()+1),a<=new Date})).transform(d),B=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(d),$=e().min(2,"Title must be at least 2 characters").max(50,"Title must be less than 50 characters").transform(d),x=a=>e().test("min","Enter a valid date",(e=>new Date(e)>=new Date("1902-01-01"))).test("age",`${a} must be at least 18 years old`,(e=>{const a=new Date(e),t=new Date;return t.setFullYear(t.getFullYear()-18),a<=t})).transform(d),y=e().matches(/^(?!000|666)\d{3}(?!00)\d{2}(?!0000)\d{4}$/,"Enter valid SSN").when("ssn_last4",{is:e=>!e||0===e.length,then:e=>e.required("Enter SSN"),otherwise:e=>e.nullable()}).test("not-repeat","Enter valid SSN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid SSN",(e=>"123456789"!==e)).transform(d),D=(a=0)=>e().matches(m,"Enter valid percentage").test("min",`Ownership percentage must be at least ${a}%`,(e=>!e||parseFloat(e)>=a)).test("max","Percentage must be at most 100",(e=>!e||parseFloat(e)<=100)).transform(d),I=D(0),f=e().min(5,"Address must be at least 5 characters").max(100,"Address must be less than 100 characters").test("not-po-box","A PO Box is not a valid address entry",(e=>!o.test(e))).transform(d),C=e().max(100,"Address must be less than 100 characters").test("not-po-box","A PO Box is not a valid address entry",(e=>!o.test(e))).transform(d),q=e().min(2,"City must be at least 2 characters").max(50,"City must be less than 50 characters").transform(d),P=e().oneOf(l.map((e=>e.value)),"Select a valid state or province").transform(d),Z=e().matches(/^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$/,"Enter valid postal code").transform(d),j=e().matches(m,"Enter valid revenue").transform(d),z=e().matches(m,"Enter valid payment volume").transform(d),O=e().oneOf(n.map((e=>e.value)),"Select when service is received").transform(d),T=e().transform(d),F=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").transform(d),_=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").transform(d),G=e().oneOf(i.map((e=>e.value)),"Select account type").transform(d),H=e().min(4,"Account number must be at least 4 digits").max(17,"Account number must be less than 17 digits").matches(m,"Enter valid account number").test("not-repeat","Enter valid account number",(e=>!/^(\d)\1+$/.test(e))).transform(d),V=e().length(9,"Routing number must be 9 digits").matches(m,"Enter valid routing number").test("not-repeat","Enter valid routing number",(e=>!e||!/^(\d)\1+$/.test(e))).test("valid","Enter valid routing number",(e=>!e||(e=>{if(!e)return!1;const a=Array.from(String(e),Number);return 9===a.length&&0==(3*(a[0]+a[3]+a[6])+7*(a[1]+a[4]+a[7])+(a[2]+a[5]+a[8]))%10})(e))).transform(d);export{P as A,l as B,H as C,G as D,_ as E,F,m as G,V as H,v as a,N as b,b as c,A as d,c as e,O as f,z as g,q as h,p as i,f as j,S as k,C as l,w as m,I as n,T as o,u as p,x as q,j as r,y as s,E as t,$ as u,B as v,h as w,D as x,g as y,Z as z}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={name:"@justifi/webcomponents",version:"6.15.0"};export{e as p}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as r}from"./p-CTtGaVYs.js";import{C as o}from"./p-Dqxyi-uK.js";import{g as s,a as e}from"./p-BhpaUYtS.js";const t=({id:t,authToken:a,service:i})=>async({onSuccess:n,onError:c,final:p})=>{var u;try{const p=await i.fetchBusiness(t,a);if(p.error){return c({error:e(p.error),code:s(null===(u=p.error)||void 0===u?void 0:u.code),severity:o.ERROR})}n({business:new r(p.data)})}catch(r){const e=s(null==r?void 0:r.code);return c({error:r.message||r,code:e,severity:o.ERROR})}finally{p()}};export{t as m}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e}from"./p-
|
|
1
|
+
import{A as e}from"./p-C6Jq8YDT.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const t=e();class s{async fetchDispute(e,s){return t.get({endpoint:`disputes/${e}`,authToken:s})}async updateDisputeResponse(e,s,n){return t.patch({endpoint:`disputes/${e}/response`,body:n,authToken:s})}async submitDisputeResponse(e,s,n){return t.post({endpoint:`disputes/${e}/response`,body:n,authToken:s})}async createDisputeEvidence(e,s,n){return t.put({endpoint:`disputes/${e}/evidence`,body:n,authToken:s})}}var n,i;!function(e){e.nextStep="nextStep",e.previousStep="previousStep",e.cancelDispute="cancelDispute",e.respondToDispute="respondToDispute",e.submit="submit"}(n||(n={})),function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(i||(i={}));export{n as D,s as a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"./p-
|
|
1
|
+
import{b as t}from"./p-Dqxyi-uK.js";const a=t=>"string"==typeof t?t:t.message,e=a=>{switch(a){case"not_authenticated":return t.NOT_AUTHENTICATED;case"invalid_parameter":return t.INVALID_PARAMETER;default:return t.FETCH_ERROR}};export{a,e as g}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t}from"./p-
|
|
1
|
+
import{p as t}from"./p-BC9n8nB2.js";import{A as s}from"./p-C6Jq8YDT.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const i=s();class e{async record(t){return i.post({endpoint:"analytics",body:t})}}class n{constructor(t){this.eventListeners=new Map,this.handleCustomEvent=async t=>{await this.service.record(t)},window.location.origin.includes("localhost")||window.location.origin.includes("docs.justifi.tech")||(this.service=new e,this.componentInstance=t,this.setUpBasicData(),this.setupLifecycleTracking(),this.trackCustomEvents())}get resourceId(){return this.componentInstance.accountId||this.componentInstance.businessId||this.componentInstance.paymentId||this.componentInstance.payoutId||this.componentInstance.checkoutId}setUpBasicData(){this.basicData={component_name:this.componentInstance.tagName,component_version:t.version,client_user_agent:navigator.userAgent,client_platform:navigator.userAgent,client_origin:window.location.origin,resource_id:this.resourceId}}trackCustomEvents(){this.eventEmitters=["submit-event","error-event"],this.eventEmitters.forEach((t=>{if("function"==typeof this.componentInstance.addEventListener){const s=s=>this.handleCustomEvent({event_type:t,data:Object.assign(Object.assign({},this.basicData),"error-event"===t&&{error:s.detail})});this.eventListeners.set(t,s),this.componentInstance.addEventListener(t,s)}}))}setupLifecycleTracking(){const t=this.componentInstance.componentDidLoad;this.componentInstance.componentDidLoad=()=>{if(this.service.record({event_type:"init",data:this.basicData}),t)return t.apply(this.componentInstance)}}cleanup(){this.eventListeners.forEach(((t,s)=>{this.componentInstance.removeEventListener(s,t)})),this.eventListeners.clear()}}export{n as J}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as t}from"./p-C6Jq8YDT.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const n=t();class a{async fetchPayments(t,a,s){return n.get({endpoint:`account/${t}/payments`,params:s,authToken:a})}async fetchPayment(t,a){return n.get({endpoint:`payments/${t}`,authToken:a})}async fetchPaymentTransactions(t,a,s){return n.get({endpoint:`payments/${t}/payment_balance_transactions`,params:s,authToken:a})}}export{a as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as t}from"./p-
|
|
1
|
+
import{C as t}from"./p-Dqxyi-uK.js";import{g as a,a as e}from"./p-BhpaUYtS.js";import{h as r}from"./p-CV0Pyo1O.js";import{B as n,a as i}from"./p-Dz8KJn2G.js";const o=({authToken:r,service:n})=>async({payoutId:i,onError:o})=>{try{const{data:t}=await n.fetchCSV(i,r),a=document.createElement("a");a.href=t.csv_url,a.click()}catch(r){o({error:e(r),code:a(null==r?void 0:r.code),severity:t.ERROR})}},d=t=>r(i,Object.assign({},{canceled:{variant:n.DANGER,title:"Transfer to your bank account failed",text:"Canceled"},failed:{variant:n.DANGER,title:"Transfer to your bank account failed",text:"Failed"},forwarded:{variant:n.SECONDARY,title:"This payout initially failed; the funds have been forwarded to your next successful payout",text:"Forwarded"},in_transit:{variant:n.PRIMARY,title:"Transfer to your bank account has been initiated",text:"In Transit"},paid:{variant:n.SUCCESS,title:"Successfully deposited into your bank account",text:"Paid"},pending:{variant:n.PRIMARY,title:"Batched and scheduled to be transferred",text:"Pending"},scheduled:{variant:n.PRIMARY,title:"Batched and scheduled to be transferred",text:"Scheduled"},withdrawn:{variant:n.SUCCESS,title:"Negative payout balance successfully withdrawn from your bank account",text:"Withdrawn"}}[t]));export{d as M,o as m}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as n}from"./p-C6Jq8YDT.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const t=n();class i{async getLinkToken(n,i,a,e){return t.post({endpoint:`plaid/${i}/link`,body:{checkout_id:a},authToken:n,signal:e})}async getLinkTokenForVerification(n,i,a){return t.post({endpoint:`entities/plaid/${i}/link_token`,body:{},authToken:n,signal:a})}async getBankAccountData(n,i,a){return t.get({endpoint:`entities/plaid/${i}/bank_account`,authToken:n,signal:a})}async postPlaidVerifiedBankAccountData(n,i,a,e){return t.post({endpoint:`entities/plaid/${i}/bank_account`,body:a,authToken:n,signal:e})}async tokenizeBankAccount(n,i,a,e,o,s){const c=`plaid/${i}/tokenize`,k={public_token:a};return e&&(k.link_token_id=e),o&&(k.payment_method_group_id=o),t.post({endpoint:c,body:k,authToken:n,signal:s})}}export{i as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as n,c as o}from"./p-B4vLfYnZ.js";import{g as t}from"./p-Ds_P-dB8.js";import{p as a}from"./p-
|
|
1
|
+
import{w as n,c as o}from"./p-B4vLfYnZ.js";import{g as t}from"./p-Ds_P-dB8.js";import{p as a}from"./p-BC9n8nB2.js";const e=()=>{async function e(e){var s,i;const{authToken:r,endpoint:d,method:p,params:u,body:c,signal:h,headers:l}=e;await n();const m=`${o.apiOrigin}/v1/${d}`,f=u?`${m}?${new URLSearchParams(u)}`:m,y=await async function(n){return n?{Authorization:`Bearer ${n}`,"Idempotency-Key":t(),"Content-Type":"application/json","Justifi-Web-Component-Version":a.version}:{"Content-Type":"application/json","Justifi-Web-Component-Version":a.version}}(r),T=Object.assign(Object.assign({},y),l),g=await fetch(f,{method:p,headers:T,body:c,signal:h});if(!g)return void function(n){console.error(`Error fetching from ${n}`)}(f);if(204===g.status)return{};const b=await g.json().catch((()=>({})));if(!g.ok){const n=new Error((null===(s=null==b?void 0:b.error)||void 0===s?void 0:s.message)||("string"==typeof(null==b?void 0:b.error)?b.error:null)||(null==b?void 0:b.message)||`Request failed: ${g.status}`);throw n.code=null===(i=null==b?void 0:b.error)||void 0===i?void 0:i.code,n.status=g.status,n.body=b,n}return b}return{get:async function(n){const{authToken:o,endpoint:t,params:a,signal:s,headers:i}=n;return e({authToken:o,endpoint:t,method:"GET",params:a,signal:s,headers:i})},post:async function(n){const{authToken:o,endpoint:t,body:a,params:s,signal:i,headers:r}=n;return e({authToken:o,endpoint:t,method:"POST",params:s,body:JSON.stringify(a),signal:i,headers:r})},put:async function(n){const{authToken:o,endpoint:t,body:a,params:s,signal:i}=n;return e({authToken:o,endpoint:t,method:"PUT",params:s,body:JSON.stringify(a),signal:i})},patch:async function(n){const{authToken:o,endpoint:t,body:a,params:s,signal:i}=n;return e({authToken:o,endpoint:t,method:"PATCH",params:s,body:JSON.stringify(a),signal:i})},destroy:async function(n){const{authToken:o,endpoint:t,params:a,signal:s}=n;return e({authToken:o,endpoint:t,method:"DELETE",params:a,signal:s})}}};export{e as A}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{e as o,C as r}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as s,a as t}from"./p-BhpaUYtS.js";const e=({id:e,authToken:i,service:a})=>async({onSuccess:p,onError:n,final:c})=>{var m;try{const c=await a.fetchPayment(e,i);if(c.error){n({error:t(c.error),code:s(null===(m=c.error)||void 0===m?void 0:m.code),severity:r.ERROR})}else p({payment:new o(c.data)})}catch(o){const e=s(null==o?void 0:o.code);n({error:t(o),code:e,severity:r.ERROR})}finally{c()}};export{e as m}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const s=[{label:"Choose state",value:""},{label:"Alabama",value:"AL"},{label:"Alaska",value:"AK"},{label:"American Samoa",value:"AS"},{label:"Arizona",value:"AZ"},{label:"Arkansas",value:"AR"},{label:"California",value:"CA"},{label:"Colorado",value:"CO"},{label:"Connecticut",value:"CT"},{label:"Delaware",value:"DE"},{label:"District Of Columbia",value:"DC"},{label:"Federated States Of Micronesia",value:"FM"},{label:"Florida",value:"FL"},{label:"Georgia",value:"GA"},{label:"Guam",value:"GU"},{label:"Hawaii",value:"HI"},{label:"Idaho",value:"ID"},{label:"Illinois",value:"IL"},{label:"Indiana",value:"IN"},{label:"Iowa",value:"IA"},{label:"Kansas",value:"KS"},{label:"Kentucky",value:"KY"},{label:"Louisiana",value:"LA"},{label:"Maine",value:"ME"},{label:"Marshall Islands",value:"MH"},{label:"Maryland",value:"MD"},{label:"Massachusetts",value:"MA"},{label:"Michigan",value:"MI"},{label:"Minnesota",value:"MN"},{label:"Mississippi",value:"MS"},{label:"Missouri",value:"MO"},{label:"Montana",value:"MT"},{label:"Nebraska",value:"NE"},{label:"Nevada",value:"NV"},{label:"New Hampshire",value:"NH"},{label:"New Jersey",value:"NJ"},{label:"New Mexico",value:"NM"},{label:"New York",value:"NY"},{label:"North Carolina",value:"NC"},{label:"North Dakota",value:"ND"},{label:"Northern Mariana Islands",value:"MP"},{label:"Ohio",value:"OH"},{label:"Oklahoma",value:"OK"},{label:"Oregon",value:"OR"},{label:"Palau",value:"PW"},{label:"Pennsylvania",value:"PA"},{label:"Puerto Rico",value:"PR"},{label:"Rhode Island",value:"RI"},{label:"South Carolina",value:"SC"},{label:"South Dakota",value:"SD"},{label:"Tennessee",value:"TN"},{label:"Texas",value:"TX"},{label:"Utah",value:"UT"},{label:"Vermont",value:"VT"},{label:"Virgin Islands",value:"VI"},{label:"Virginia",value:"VA"},{label:"Washington",value:"WA"},{label:"West Virginia",value:"WV"},{label:"Wisconsin",value:"WI"},{label:"Wyoming",value:"WY"}];function t(s){return/^\d$/.test(s)?"0"+s:s}function a(s,a,i){if(s&&a&&i)return`${s}-${t(a)}-${t(i)}`}function i(s){const t=s.value,[a,i,e]=t.split("-");return{dob_year:a,dob_month:i,dob_day:e}}function e(s){var t,a;return null!==(a=null===(t=s.provisioned)||void 0===t?void 0:t.includes("payments"))&&void 0!==a&&a}class l{constructor(s){this.address=Object.assign({},new b(s.address||{})),this.created_at=s.created_at,this.dob_day=t(s.dob_day),this.dob_month=t(s.dob_month),this.dob_year=s.dob_year,this.dob_full=a(this.dob_year,this.dob_month,this.dob_day)||"",this.documents=s.documents,this.email=s.email,this.id=s.id,this.business_id=s.business_id,this.is_owner=s.is_owner,this.metadata=s.metadata,this.name=s.name,this.phone=s.phone,this.platform_account_id=s.platform_account_id,this.identification_number=s.identification_number,this.ssn_last4=s.ssn_last4,this.title=s.title,this.ownership_percentage=s.ownership_percentage,this.updated_at=s.updated_at}get payload(){return{address:new b(this.address||{}).payload,dob_day:this.dob_day||"",dob_month:this.dob_month||"",dob_year:this.dob_year||"",email:this.email||"",identification_number:this.identification_number||void 0,is_owner:this.is_owner||!1,metadata:this.metadata||null,name:this.name||"",phone:this.phone||"",platform_account_id:this.platform_account_id||null,title:this.title||"",ownership_percentage:this.ownership_percentage||void 0}}}class h{constructor(s){this.address=Object.assign({},new b(s.address||{})),this.created_at=s.created_at,this.dob_day=t(s.dob_day),this.dob_month=t(s.dob_month),this.dob_year=s.dob_year,this.dob_full=a(this.dob_year,this.dob_month,this.dob_day)||"",this.documents=s.documents,this.email=s.email,this.id=s.id,this.business_id=s.business_id,this.is_owner=s.is_owner,this.metadata=s.metadata,this.name=s.name,this.phone=s.phone,this.platform_account_id=s.platform_account_id,this.identification_number=s.identification_number,this.ssn_last4=s.ssn_last4,this.title=s.title,this.ownership_percentage=s.ownership_percentage,this.updated_at=s.updated_at}get payload(){return{address:new b(this.address||{}).payload,dob_day:this.dob_day||"",dob_month:this.dob_month||"",dob_year:this.dob_year||"",email:this.email||"",is_owner:this.is_owner||!1,identification_number:this.identification_number||void 0,metadata:this.metadata||null,name:this.name||"",phone:this.phone||"",platform_account_id:this.platform_account_id||null,title:this.title||""}}}var n;!function(s){s.USA="USA",s.CAN="CAN"}(n||(n={}));const o=s=>{const t=(s||"").toString().trim().toUpperCase();return"US"===t||"USA"===t||t===n.USA?n.USA:"CA"===t||"CAN"===t||t===n.CAN?n.CAN:n.USA};var u,r;!function(s){s.fetchData="Error retrieving business data",s.patchData="Error updating business data"}(u||(u={})),function(s){s.sole_proprietor="sole_proprietor",s.partnership="partnership",s.corporation="corporation",s.public_company="public_company",s.limited="limited",s.non_profit="non_profit",s.government="government"}(r||(r={}));class b{constructor(t){this.id=t.id,this.platform_account_id=t.platform_account_id,this.line1=t.line1,this.line2=t.line2,this.postal_code=t.postal_code,this.city=t.city,this.state=function(t){const a=s.find((s=>s.label===t));return a?a.value:t}(t.state),this.country=o(t.country),this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{platform_account_id:this.platform_account_id||"",line1:this.line1||"",line2:this.line2||"",postal_code:this.postal_code||"",city:this.city||"",state:this.state||"",country:this.country||""}}}class v{constructor(s){this.business_revenue=s.business_revenue,this.business_payment_volume=s.business_payment_volume,this.business_average_transaction_amount=s.business_average_transaction_amount,this.business_when_service_received=s.business_when_service_received,this.business_recurring_payments=s.business_recurring_payments,this.business_recurring_payments_percentage=s.business_recurring_payments_percentage,this.business_seasonal=s.business_seasonal,this.business_other_payment_details=s.business_other_payment_details}get payload(){return{business_revenue:this.business_revenue||"",business_payment_volume:this.business_payment_volume||"",business_average_transaction_amount:this.business_average_transaction_amount||"",business_when_service_received:this.business_when_service_received||"",business_recurring_payments:this.business_recurring_payments||"",business_recurring_payments_percentage:this.business_recurring_payments_percentage||"",business_seasonal:this.business_seasonal||"",business_other_payment_details:this.business_other_payment_details||""}}}class c{constructor(s){this.classification=s.classification,this.legal_name=s.legal_name,this.doing_business_as=s.doing_business_as,this.industry=s.industry,this.tax_id=s.tax_id,this.tax_id_last4=s.tax_id_last4,this.website_url=s.website_url,this.email=s.email,this.phone=s.phone,this.date_of_incorporation=s.date_of_incorporation}get payload(){return Object.assign(Object.assign({classification:this.classification||"",legal_name:this.legal_name||"",doing_business_as:this.doing_business_as||"",industry:this.industry||""},!this.tax_id_last4&&{tax_id:this.tax_id||""}),{website_url:this.website_url||"",email:this.email||"",phone:this.phone||"",date_of_incorporation:this.date_of_incorporation||""})}}class d{constructor(s){var t;this.additional_questions=s.additional_questions?new v(s.additional_questions):null,this.associated_accounts=s.associated_accounts,this.provisioned=null!==(t=s.provisioned)&&void 0!==t?t:[],this.classification=s.classification,this.bank_accounts=s.bank_accounts,this.created_at=s.created_at,this.documents=s.documents,this.doing_business_as=s.doing_business_as,this.email=s.email,this.id=s.id,this.industry=s.industry,this.legal_address=(null==s?void 0:s.legal_address)?new b(s.legal_address):null,this.legal_name=s.legal_name,this.metadata=s.metadata,this.owners=s.owners,this.phone=s.phone,this.platform_account_id=s.platform_account_id,this.product_categories=s.product_categories,this.representative=s.representative?new h(s.representative):null,this.tax_id=s.tax_id,this.tax_id_last4=s.tax_id_last4,this.terms_conditions_accepted=s.terms_conditions_accepted,this.updated_at=s.updated_at,this.website_url=s.website_url,this.date_of_incorporation=s.date_of_incorporation,this.country_of_establishment=o(s.country_of_establishment),this.bank_account_verification=s.bank_account_verification}get payload(){return Object.assign(Object.assign({additional_questions:new v(this.additional_questions).payload,classification:this.classification||"",doing_business_as:this.doing_business_as||"",email:this.email||"",industry:this.industry||"",legal_address:new b(this.legal_address).payload,legal_name:this.legal_name||"",metadata:this.metadata||{},owners:this.owners.map((s=>({id:s.id}))),phone:this.phone||"",platform_account_id:this.platform_account_id||"",representative:new h(this.representative).payload},!this.tax_id_last4&&{tax_id:this.tax_id||""}),{tax_id_last4:this.tax_id_last4||"",website_url:this.website_url||"",date_of_incorporation:this.date_of_incorporation||"",country_of_establishment:this.country_of_establishment||n.USA})}}export{v as A,d as B,n as C,l as O,h as R,s as S,r as a,u as b,c,i as d,e,b as f}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t}from"./p-CTtGaVYs.js";const b=(t,b)=>{t.setValues(Object.assign(Object.assign({},t.values.getValue()),b))},s=(t,s)=>{b(t,{address:Object.assign(Object.assign({},t.values.getValue().address),s)})},a=(s,a)=>{const e=t(s.detail);b(a,Object.assign(Object.assign({},a.values.getValue()),{dob_day:e.dob_day,dob_month:e.dob_month,dob_year:e.dob_year}))};export{s as a,a as b,b as u}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./p-
|
|
1
|
+
import{a as e}from"./p-CTtGaVYs.js";const a=[{label:"Choose business classification",value:""},{label:"Sole Proprietor",value:e.sole_proprietor},{label:"Partnership",value:e.partnership},{label:"Corporation",value:e.corporation},{label:"Public Company",value:e.public_company},{label:"Limited Liability Company (LLC)",value:e.limited},{label:"Non Profit",value:e.non_profit},{label:"Government",value:e.government}],l=[{label:"Within 7 days",value:"Within 7 days"},{label:"Within 30 days",value:"Within 30 days"},{label:"Within 90 days",value:"Within 90 days"},{label:"Within 120 days",value:"Within 120 days"},{label:"More than 120 days",value:"More than 120 days"}],s=[{label:"Yes",value:"Yes"},{label:"No",value:"No"}],i=[{label:"Yes. The majority of the business revenue is generated in 3-6 months.",value:"Yes"},{label:"No. The business revenue is generated evenly throughout the year.",value:"No"}],r=[{label:"Choose title",value:""},{label:"Vice President",value:"Vice President"},{label:"President",value:"President"},{label:"Treasurer",value:"Treasurer"},{label:"Owner",value:"Owner"},{label:"Partner",value:"Partner"},{label:"CEO",value:"CEO"},{label:"Member LLC",value:"Member LLC"},{label:"Secretary",value:"Secretary"},{label:"Director",value:"Director"},{label:"COO",value:"COO"},{label:"CFO",value:"CFO"}],t=[{label:"Checking",value:"checking"},{label:"Savings",value:"savings"}];export{l as a,r as b,t as c,a as d,s as r,i as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,a as s}from"./p-D9sqTVmd.js";import{m as t,d as n,i as a,b as i,a as r,p as o,e as l,w as _,c,t as d,o as u,f as m,r as p,g as b,h as E,l as h,j as f,k as v,n as g,s as w,q as y,u as $,v as x,x as S,y as j}from"./p-BAvoKtN2.js";import{C as q}from"./p-CTtGaVYs.js";import{c as C}from"./p-riZDHN5-.js";const D=s=>{const t=e({legal_name:c.required("Enter legal name"),website_url:_.required("Enter business website url"),email:l.required("Enter business email"),phone:o.required("Enter phone number"),doing_business_as:r.nullable(),classification:i.required("Select business classification"),industry:a.required("Enter a business industry"),date_of_incorporation:n.required("Enter date of registration")}),u=e({legal_name:c.required("Enter legal name"),website_url:_.nullable(),email:l.nullable(),phone:o.nullable(),doing_business_as:r.nullable(),classification:i.nullable(),industry:a.nullable(),tax_id:d.nullable(),date_of_incorporation:n.nullable()});return s?u:t},N=n=>D(n).concat(e({classification:s().required("Select business classification"),tax_id:t(q.USA).when("tax_id_last4",{is:e=>!e,then:e=>e.required(`Enter valid ${C.USA.taxIdLabel} without dashes`),otherwise:e=>e.nullable()})})),T=n=>D(n).concat(e({classification:s().required("Select business classification"),tax_id:t(q.CAN).when("tax_id_last4",{is:e=>!e,then:e=>e.notRequired().nullable(),otherwise:e=>e.nullable()})})),V=s=>{const t=e({business_revenue:p.required("Enter business revenue"),business_payment_volume:b.required("Enter business payment volume"),business_average_transaction_amount:p.required("Enter average transaction amount"),business_when_service_received:m.required("Select when service is received"),business_other_payment_details:u.nullable()}),n=e({business_revenue:p.nullable(),business_payment_volume:b.nullable(),business_average_transaction_amount:p.nullable(),business_when_service_received:m.nullable(),business_other_payment_details:u.nullable()});return s?n:t},k=t=>e(t?{line1:f.nullable(),line2:h.nullable(),city:E.nullable(),state:s().nullable(),postal_code:s().nullable()}:{line1:f.required("Enter street address"),line2:h.nullable(),city:E.required("Enter city"),state:s().required("Select state"),postal_code:v(q.USA).required("Enter postal code")}),A=t=>e(t?{line1:f.nullable(),line2:h.nullable(),city:E.nullable(),state:s().nullable(),postal_code:s().nullable()}:{line1:f.required("Enter street address"),line2:h.nullable(),city:E.required("Enter city"),state:s().required("Select province or state"),postal_code:v(q.CAN).required("Enter postal code")}),B={[q.USA]:k,[q.CAN]:A},G=(t,n)=>n?(t=>e({name:x.required(`Enter ${t} name`),title:$.nullable(),email:l.nullable(),phone:o.nullable(),dob_full:y(t).nullable(),ssn_last4:s().nullable(),identification_number:w.nullable(),ownership_percentage:g.nullable(),address:k(!0)}))(t):(t=>e({name:x.required(`Enter ${t} name`),title:$.required(`Enter ${t} title`),email:l.required(`Enter ${t} email`),phone:o.required("Enter phone number"),dob_full:y(t).required("Enter date of birth"),ssn_last4:s().nullable(),identification_number:w,ownership_percentage:"owner"===t?S(25).required("Enter ownership percentage"):g.nullable(),address:k(!1)}))(t),H=(t,n)=>n?(t=>e({name:x.required(`Enter ${t} name`),title:$.nullable(),email:l.nullable(),phone:o.nullable(),dob_full:y(t).nullable(),ssn_last4:s().nullable(),identification_number:j(q.CAN).nullable(),ownership_percentage:g.nullable(),address:A(!0)}))(t):(t=>e({name:x.required(`Enter ${t} name`),title:$.required(`Enter ${t} title`),email:l.required(`Enter ${t} email`),phone:o.required("Enter phone number"),dob_full:y(t).required("Enter date of birth"),ssn_last4:s().nullable(),identification_number:j(q.CAN).nullable(),ownership_percentage:"owner"===t?S(25).required("Enter ownership percentage"):g.nullable(),address:A(!1)}))(t),K={[q.USA]:G,[q.CAN]:H};export{V as a,N as b,k as c,T as d,H as e,A as f,K as g,B as h,G as i}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as t}from"./p-C6Jq8YDT.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const e=t();class o{async fetchCheckout(t,o){return e.get({endpoint:`checkouts/${o}`,authToken:t})}async fetchCheckouts(t,o,c){return e.get({endpoint:"checkouts",params:c,headers:{Account:t},authToken:o})}async complete(t,o,c){const s=`checkouts/${o}/complete`,n={payment_mode:c.payment_mode};return c.payment_token&&(n.payment_token=c.payment_token),e.post({endpoint:s,body:n,authToken:t})}}export{o as C}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as r}from"./p-Dqxyi-uK.js";import{g as o,a as e}from"./p-BhpaUYtS.js";const t=({authToken:t,checkoutId:c,service:s})=>async({onSuccess:n,onError:a})=>{var i;try{const u=await s.fetchCheckout(t,c);if(u.error){return a({error:e(u.error),code:o(null===(i=u.error)||void 0===i?void 0:i.code),severity:r.ERROR})}n({checkout:u.data})}catch(e){const t=o(null==e?void 0:e.code);return a({error:e.message||e,code:t,severity:r.ERROR})}},c=({authToken:t,checkoutId:c,service:s})=>async({payment:n,onSuccess:a,onError:i})=>{var u;try{const v=await s.complete(t,c,n);if(v.error){return i({error:e(v.error),code:o(null===(u=v.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a({checkout:v.data})}catch(e){const t=o(null==e?void 0:e.code);return i({error:e.message||e,code:t,severity:r.ERROR})}};export{c as a,t as m}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e}from"./p-C6Jq8YDT.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const n=e();class r{async fetchTerminals(e,r,s){return n.get({endpoint:"terminals",params:s,headers:{Account:e},authToken:r})}async fetchTerminal(e,r){return n.get({endpoint:`terminals/${e}`,authToken:r})}async fetchTerminalModels(e,r){return n.get({endpoint:"terminals/order_models",headers:{"sub-account":e},authToken:r})}async orderTerminals(e,r){return n.post({endpoint:"terminals/orders",body:r,headers:{"sub-account":r.sub_account_id},authToken:e})}}export{r as T}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as r}from"./p-
|
|
1
|
+
import{C as r}from"./p-Dqxyi-uK.js";import{g as o,a as e}from"./p-BhpaUYtS.js";const n=({authToken:n,businessId:i,service:t})=>async({onSuccess:s,onError:a,final:c=()=>{}})=>{var l;try{const c=await t.fetchBusiness(i,n);if(c.error){return a({error:e(c.error),code:o(null===(l=c.error)||void 0===l?void 0:l.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{c()}},i=({authToken:n,businessId:i,service:t})=>async({payload:s,onSuccess:a,onError:c,final:l=()=>{}})=>{var v;try{const l=await t.patchBusiness(n,i,s);if(l.error){return c({error:e(l.error),code:o(null===(v=l.error)||void 0===v?void 0:v.code),severity:r.ERROR,rawError:l.error})}a(l)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR,rawError:e})}finally{l()}},t=({authToken:n,businessId:i,product:t,service:s})=>async({onSuccess:a,onError:c})=>{var l,v,d,u;try{const y=await s.postProvisioning(n,i,t);if(!(null==y?void 0:y.data)||y.error){const n=null!==(d=null!==(l=null==y?void 0:y.error)&&void 0!==l?l:null===(v=null==y?void 0:y.errors)||void 0===v?void 0:v[0])&&void 0!==d?d:"Provisioning request failed";return c({error:e(n),code:o(null===(u=null==y?void 0:y.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(y)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR})}},s=({authToken:n,identityId:i,service:t})=>async({onSuccess:s,onError:a,final:c=()=>{}})=>{var l;try{const c=await t.fetchIdentity(i,n);if(c.error){return a({error:e(c.error),code:o(null===(l=c.error)||void 0===l?void 0:l.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{c()}},a=({authToken:n,identityId:i,service:t})=>async({payload:s,onSuccess:a,onError:c,final:l=()=>{}})=>{var v;try{const l=await t.patchIdentity(n,i,s);if(l.error){return c({error:e(l.error),code:o(null===(v=l.error)||void 0===v?void 0:v.code),severity:r.ERROR})}a(l)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR})}finally{l()}},c=({authToken:n,service:i})=>async({payload:t,onSuccess:s,onError:a,final:c=()=>{}})=>{var l;try{const c=await i.postIdentity(n,t);if(c.error){return a({error:e(c.error),code:o(null===(l=c.error)||void 0===l?void 0:l.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{c()}},l=({authToken:n,service:i})=>async({payload:t,onSuccess:s,onError:a,final:c=()=>{}})=>{var l;try{const c=await i.postBankAccount(n,t);if(c.error){return a({error:e(c.error),code:o(null===(l=c.error)||void 0===l?void 0:l.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{c()}},v=({authToken:n,service:i})=>async({payload:t,onSuccess:s,onError:a,final:c=()=>{}})=>{var l;try{const c=await i.postDocumentRecord(n,t);if(c.error){return a({error:e(c.error),code:o(null===(l=c.error)||void 0===l?void 0:l.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{c()}};export{i as a,t as b,l as c,v as d,s as e,a as f,c as g,n as m}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as t}from"./p-Ds_P-dB8.js";var i,s,e,n,a,r,h,o,c,d,u,l,p,f,m,y,_,v,g,k,w,P,b,A,C,S,x,D,U,T,B,E,z;!function(t){t.IFRAME_LOAD_ERROR="iframe-load-error",t.MISSING_PROPS="missing-props",t.FETCH_ERROR="fetch-error",t.PATCH_ERROR="patch-error",t.POST_ERROR="post-error",t.UNKNOWN_ERROR="unknown-error",t.TOKENIZE_ERROR="tokenize-error",t.COMPLETE_CHECKOUT_ERROR="complete-checkout-error",t.CHECKOUT_ALREADY_COMPLETED="checkout-already-completed",t.CHECKOUT_EXPIRED="checkout-expired",t.NOT_AUTHENTICATED="not-authenticated",t.INVALID_PARAMETER="invalid-parameter",t.PROVISIONING_REQUESTED="provisioning-already-requested",t.INVALID_REFUND_AMOUNT="invalid-refund-amount",t.VALIDATION_ERROR="validation-error"}(i||(i={})),function(t){t.INFO="info",t.WARNING="warning",t.ERROR="error"}(s||(s={})),function(t){t.IFRAME_LOAD_ERROR="Payment form failed to load. Please try again.",t.NOT_AUTHENTICATED="Not authenticated. Please provide a valid auth token, checkout id, and account id.",t.CHECKOUT_ALREADY_COMPLETED="Checkout already completed. Please create a new checkout.",t.CHECKOUT_EXPIRED="Checkout expired. Please create a new checkout."}(e||(e={}));class F{constructor(t){this.payment_mode=n[t.payment_mode],this.payment_token=t.payment_token,this.payment_status=t.payment_status,this.payment_response=t.payment_response,this.payment_error_code=t.payment_error_code,this.payment_error_description=t.payment_error_description,this.checkout_id=t.checkout_id,this.additional_transactions=t.additional_transactions,this.payment_id=t.payment_id,this.payment_method_id=t.payment_method_id,this.status=t.status,this.created_at=t.created_at,this.updated_at=t.updated_at}}class I{constructor(t){var i;this.id=t.id,this.description=t.description,this.payment_intent_id=t.payment_intent_id,this.account_id=t.account_id,this.platform_account_id=t.platform_account_id,this.payment_amount=t.payment_amount,this.payment_client_id=t.payment_client_id,this.payment_description=t.payment_description,this.payment_methods=t.payment_methods,this.payment_method_group_id=t.payment_method_group_id,this.payment_settings=t.payment_settings,this.bnpl=t.bnpl,this.paypal=t.paypal,this.total_amount=t.total_amount,this.insurance_amount=t.insurance_amount,this.status=r[t.status],this.payment_currency=t.payment_currency,this.mode=t.mode,this.statement_descriptor=t.statement_descriptor,this.application_fees=t.application_fees,this.successful_payment_id=t.successful_payment_id,this.created_at=t.created_at,this.updated_at=t.updated_at,this.completions=null===(i=t.completions)||void 0===i?void 0:i.map((t=>new F(t)))}get payment_mode(){var t,i,s,e,a,r;let h=null;if(!this.completions||0===this.completions.length)return n.unknown;const o=this.completions.sort(((t,i)=>new Date(i.updated_at).getTime()-new Date(t.updated_at).getTime()))[0];return o.payment_mode?h=o.payment_mode:(null===(s=null===(i=null===(t=o.payment_response)||void 0===t?void 0:t.data)||void 0===i?void 0:i.payment_method)||void 0===s?void 0:s.card)?h=n.card:(null===(r=null===(a=null===(e=o.payment_response)||void 0===e?void 0:e.data)||void 0===a?void 0:a.payment_method)||void 0===r?void 0:r.bank_account)&&(h=n.bank_account),h}formattedPaymentAmount(i){return t(i,this.payment_currency)}}!function(t){t.bnpl="Buy Now Pay Later",t.ecom="E-commerce",t.card="Card",t.bank_account="Bank Account",t.card_present="Card Present",t.apple_pay="Apple Pay",t.paypal="PayPal",t.venmo="Venmo",t.unknown=""}(n||(n={})),function(t){t.bnpl="bnpl",t.ecom="ecom",t.apple_pay="apple_pay",t.paypal="paypal",t.venmo="venmo"}(a||(a={})),function(t){t.created="created",t.completed="completed",t.attempted="attempted",t.expired="expired"}(r||(r={})),function(t){t.failed="failed",t.succeeded="succeeded"}(h||(h={})),function(t){t.won="won",t.lost="lost",t.underReview="under_review",t.needsResponse="needs_response"}(o||(o={}));class M{get needsResponse(){return this.status==o.needsResponse}get underReview(){return this.status==o.underReview}get won(){return this.status==o.won}get lost(){return this.status==o.lost}constructor(t){this.id=t.id,this.amount=t.amount,this.currency=t.currency,this.payment_id=t.payment_id,this.reason=t.reason,this.due_date=t.due_date,this.status=t.status,this.metadata=t.metadata,this.created_at=t.created_at,this.updated_at=t.updated_at,this.dispute_response=t.dispute_response?new N(t.dispute_response):void 0}}class N{constructor(t){this.additional_statement=t.additional_statement,this.cancellation_policy_disclosure=t.cancellation_policy_disclosure,this.cancellation_rebuttal=t.cancellation_rebuttal,this.customer_billing_address=t.customer_billing_address,this.customer_email_address=t.customer_email_address,this.customer_name=t.customer_name,this.customer_purchase_ip_address=t.customer_purchase_ip_address,this.duplicate_charge_explanation=t.duplicate_charge_explanation,this.product_description=t.product_description,this.refund_policy_disclosure=t.refund_policy_disclosure,this.refund_refusal_explanation=t.refund_refusal_explanation,this.service_date=t.service_date,this.shipping_address=t.shipping_address,this.shipping_carrier=t.shipping_carrier,this.shipping_date=t.shipping_date,this.shipping_tracking_number=t.shipping_tracking_number,this.duplicate_charge_original_payment_id=t.duplicate_charge_original_payment_id}}!function(t){t.automatic="automatic",t.manual="manual"}(c||(c={})),function(t){t.card="card",t.bankAccount="bankAccount",t.sezzle="sezzle",t.plaid="plaid",t.applePay="applePay"}(d||(d={})),function(t){t.card="Card",t.bankAccount="ACH",t.unknown="Unknown"}(u||(u={})),function(t){t.pending="pending",t.automatic="automatic",t.authorized="authorized",t.succeeded="succeeded",t.failed="failed",t.canceled="canceled",t.disputed="disputed",t.fully_refunded="fully_refunded",t.partially_refunded="partially_refunded"}(l||(l={})),function(t){t.usd="usd",t.cad="cad"}(p||(p={}));class R{constructor(t){this.card=t.card?new V(t.card):void 0,this.bank_account=t.bank_account?new q(t.bank_account):void 0}get payersName(){return this.card?this.card.name:this.bank_account?this.bank_account.name:null}get lastFourDigits(){return this.card?`**** ${this.card.acct_last_four}`:this.bank_account?`**** ${this.bank_account.acct_last_four}`:null}}class q{constructor(t){this.id=t.id,this.acct_last_four=t.acct_last_four,this.name=t.name,this.brand=t.brand,this.token=t.token,this.created_at=t.created_at,this.updated_at=t.updated_at}}class V{constructor(t){this.id=t.id||"",this.acct_last_four=t.acct_last_four,this.name=t.name,this.brand=t.brand,this.token=t.token,this.created_at=t.created_at,this.updated_at=t.updated_at}}class j{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.amount_disputed=t.amount_disputed,this.amount_refundable=t.amount_refundable,this.amount_refunded=t.amount_refunded,this.balance=t.balance,this.captured=t.captured,this.capture_strategy=t.capture_strategy,this.description=t.description,this.disputed=t.disputed,this.disputes=t.disputes,this.error_code=t.error_code,this.error_description=t.error_description,this.expedited=t.expedited,this.fee_amount=t.fee_amount,this.is_test=t.is_test,this.metadata=t.metadata,this.payment_method=new R(t.payment_method),this.payment_intent_id=t.payment_intent_id,this.refunded=t.refunded,this.status=t.status,this.created_at=t.created_at,this.updated_at=t.updated_at}get disputedStatus(){const t=this.disputes.some((t=>t.status===o.lost));return this.disputed?t?o.lost:"open":null}get payment_type(){return this.payment_method?this.payment_method.card?u.card:u.bankAccount:u.unknown}get payers_name(){return this.payment_method.payersName}get last_four_digits(){return this.payment_method.lastFourDigits}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.payment="payment",t.paymentFee="payment_fee",t.payout="payout",t.refund="refund",t.feeRefund="fee_refund",t.dispute="dispute",t.disputeFee="dispute_fee",t.disputeFeeRefund="dispute_fee_refund",t.disputeRefund="dispute_refund",t.applicationFeeReturned="application_fee_returned"}(f||(f={}));class L{constructor(t){this.id=t.id,this.amount=t.amount,this.balance=t.balance,this.currency=t.currency,this.financial_transaction_id=t.financial_transaction_id,this.payment_id=t.payment_id,this.payment_balance_txn_type=t.payment_balance_txn_type,this.source_id=t.source_id,this.source_type=t.source_type,this.created_at=t.created_at,this.updated_at=t.updated_at}get displayTransactionId(){return this.payment_balance_txn_type===f.paymentFee||this.payment_balance_txn_type===f.applicationFeeReturned?"--":this.source_id}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.paid="paid",t.failed="failed",t.forwarded="forwarded",t.scheduled="scheduled",t.in_transit="in_transit",t.canceled="canceled"}(m||(m={})),function(t){t.paid="Paid",t.failed="Failed",t.forwarded="Forwarded",t.scheduled="Scheduled",t.in_transit="In Transit",t.canceled="Canceled"}(y||(y={}));class Y{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.bank_account=t.bank_account,this.delivery_method=t.delivery_method||"standard",this.description=t.description,this.deposits_at=t.deposits_at,this.fees_total=t.fees_total,this.refunds_count=t.refunds_count,this.refunds_total=t.refunds_total,this.payments_count=t.payments_count,this.payments_total=t.payments_total,this.payout_type=t.payout_type,this.other_total=t.other_total,this.status=t.status,this.metadata=t.metadata,this.created_at=t.created_at,this.updated_at=t.updated_at,this.settlement_priority=t.settlement_priority||"standard"}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.fee="fee",t.payment="payment",t.payout="payout",t.sellerPaymentRefund="seller_payment_refund",t.disputeAmountCollected="dispute_amount_collected",t.disputeFeeCollected="dispute_fee_collected",t.sellerPayment="seller_payment",t.transfer="transfer",t.partnerPlatformProceedsCredit="partner_platform_proceeds_credit"}(_||(_={}));class ${constructor(t){this.id=t.id,this.account_id=t.account_id,this.payout_id=t.payout_id,this.financial_transaction_id=t.financial_transaction_id,this.amount=t.amount,this.fee=t.fee,this.net=t.net,this.currency=t.currency,this.source_id=t.source_id,this.description=t.description,this.txn_type=t.txn_type,this.created_at=t.created_at,this.available_on=t.available_on,this.updated_at=t.updated_at}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.connected="connected",t.disconnected="disconnected",t.unknown="unknown",t.pending_configuration="pending_configuration",t.archived="archived"}(v||(v={})),function(t){t.verifone="verifone"}(g||(g={}));class H{constructor(t){this.id=t.id||"",this.status=t.status,this.account_id=t.account_id||"",this.platform_account_id=t.platform_account_id||"",this.provider=t.provider||null,this.provider_id=t.provider_id||"",this.provider_serial_number=t.provider_serial_number||"",this.created_at=t.created_at||"",this.updated_at=t.updated_at||"",this.verified_at=t.verified_at||"",this.nickname=t.nickname||"",this.model_name=t.model_name||null}}!function(t){t.boardingOnly="boarding_only",t.boardingShipping="boarding_shipping"}(k||(k={})),function(t){t.created="created",t.submitted="submitted",t.completed="completed",t.in_progress="in_progress",t.on_hold="on_hold",t.canceled="canceled"}(w||(w={}));class Q{constructor(t){this.id=t.id,this.business_id=t.business_id,this.company_name=t.company_name,this.sub_account_id=t.sub_account_id,this.provider=t.provider||g.verifone,this.order_items=[],this.order_type=t.order_type,this.order_status=t.order_status,this.terminals=t.terminals,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{business_id:this.business_id,sub_account_id:this.sub_account_id,order_type:this.order_type,order_items:this.order_items}}get totalQuantity(){return this.order_items.reduce(((t,i)=>t+i.quantity),0)}updateTerminal(t,i){if(0===i)return void(this.order_items=this.order_items.filter((i=>i.model_name!==t)));const s=this.order_items.find((i=>i.model_name===t));s?s.quantity=i:this.order_items.push({model_name:t,quantity:i})}}!function(t){t.v400="v400",t.p400="p400+",t.e285="e285"}(P||(P={}));class W{constructor(t){this.id=t.id,this.model_name=t.model_name,this.description=t.description,this.image_url=t.image_url,this.help_url=t.help_url}}!function(t){t.test="test",t.live="live"}(b||(b={})),function(t){t.created="created",t.submitted="submitted",t.information_needed="information_needed",t.rejected="rejected",t.enabled="enabled",t.disabled="disabled",t.archived="archived"}(A||(A={}));class G{constructor(t){this.id=t.id,this.name=t.name,this.account_type=t.account_type,this.status=t.status,this.currency=t.currency,this.platform_account_id=t.platform_account_id,this.payout_account_id=t.payout_account_id,this.business_id=t.business_id,this.application_fee_rates=t.application_fee_rates,this.processing_ready=t.processing_ready,this.payout_ready=t.payout_ready,this.related_accounts=t.related_accounts,this.created_at=t.created_at,this.updated_at=t.updated_at}}!function(t){t.voidedCheck="voided_check",t.balanceSheet="balance_sheet",t.bankStatement="bank_statement",t.governmentId="government_id",t.profitAndLossStatement="profit_and_loss_statement",t.taxReturn="tax_return",t.other="other",t.articlesOfIncorporation="articles_of_incorporation",t.businessRegistration="business_registration",t.passport="passport",t.driverLicense="driver_license",t.residentCard="resident_card",t.statusCard="status_card",t.nexusCard="nexus_card",t.citizenshipCard="citizenship_card",t.foreignPassport="foreign_passport",t.birthCertificate="birth_certificate",t.sinCard="sin_card",t.ssnCard="ssn_card"}(C||(C={})),function(t){t.pending="pending",t.uploaded="uploaded",t.canceled="canceled",t.needed="needed"}(S||(S={}));class J{constructor(t,i){this.fileData=null,this.file=t.file,this.document_type=t.document_type,this.presigned_url=null,this.record_data={business_id:i,document_type:this.document_type,file_name:this.file.name,file_type:this.file.type}}async getFileData(){if(this.fileData)return this.fileData;const t=new Promise(((t,i)=>{const s=new FileReader;s.onload=i=>{this.fileData=i.target.result,t(this.fileData)},s.onerror=()=>{i(new Error("Error reading file"))},s.readAsArrayBuffer(this.file)}));return await t}setPresignedUrl(t){this.presigned_url=t}}!function(t){t.succeeded="succeeded",t.failed="failed"}(x||(x={})),function(t){t.customerRequest="customer_request",t.duplicate="duplicate",t.fraudulent="fraudulent"}(D||(D={}));class K{constructor(t){this.amount=t.amount,this.reason=t.reason,this.description=t.description,this.metadata=t.metadata}}!function(t){t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_FAILURE="STATUS_FAILURE"}(U||(U={})),function(t){t.PLAIN="plain",t.BUY="buy",t.SET_UP="set-up",t.DONATE="donate",t.CHECK_OUT="check-out",t.BOOK="book",t.SUBSCRIBE="subscribe"}(T||(T={})),function(t){t.BLACK="black",t.WHITE="white",t.WHITE_OUTLINE="white-outline"}(B||(B={})),function(t){t.SUPPORTS_3DS="supports3DS",t.SUPPORTS_EMV="supportsEMV",t.SUPPORTS_CREDIT="supportsCredit",t.SUPPORTS_DEBIT="supportsDebit"}(E||(E={}));class O{constructor(t){this.merchantIdentifier=t.merchantIdentifier,this.displayName=t.displayName,this.initiative=t.initiative,this.initiativeContext=t.initiativeContext,this.buttonType=t.buttonType||T.PLAIN,this.buttonStyle=t.buttonStyle||B.BLACK,this.buttonLocale=t.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class X{constructor(t){this.countryCode=t.countryCode,this.currencyCode=t.currencyCode,this.merchantCapabilities=t.merchantCapabilities,this.supportedNetworks=t.supportedNetworks,this.total=t.total,this.lineItems=t.lineItems,this.shippingMethods=t.shippingMethods,this.applicationData=t.applicationData,this.supportedCountries=t.supportedCountries}get isValid(){var t,i,s,e;return!!(this.countryCode&&this.currencyCode&&(null===(t=this.merchantCapabilities)||void 0===t?void 0:t.length)&&(null===(i=this.supportedNetworks)||void 0===i?void 0:i.length)&&(null===(s=this.total)||void 0===s?void 0:s.label)&&(null===(e=this.total)||void 0===e?void 0:e.amount))}}class Z{static isApplePaySupported(){var t;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.supportsVersion(3))}static canMakePayments(){var t;return this.isApplePaySupported()&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(t){var i;if(!this.isApplePaySupported())return!1;try{return await(null===(i=window.ApplePaySession)||void 0===i?void 0:i.canMakePaymentsWithActiveCard(t))||!1}catch(t){return console.error("Error checking Apple Pay active card:",t),!1}}static formatAmount(t){return(t/100).toFixed(2)}static parseAmount(t){return Math.round(100*parseFloat(t))}static createLineItem(t,i,s="final"){return{label:t,amount:this.formatAmount(i),type:s}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[E.SUPPORTS_3DS,E.SUPPORTS_EMV,E.SUPPORTS_CREDIT,E.SUPPORTS_DEBIT]}}!function(t){t.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",t.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",t.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",t.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",t.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",t.PLAID_TOKEN_EXPIRED="plaid-token-expired",t.PLAID_NETWORK_ERROR="plaid-network-error",t.PLAID_USER_CANCELLED="plaid-user-cancelled",t.PLAID_TIMEOUT="plaid-timeout",t.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",t.PLAID_ACCOUNT_LOCKED="plaid-account-locked",t.PLAID_MAINTENANCE="plaid-maintenance",t.PLAID_RATE_LIMITED="plaid-rate-limited"}(z||(z={}));const tt={[z.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[z.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[z.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[z.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[z.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[z.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[z.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[z.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[z.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[z.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[z.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[z.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[z.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},it={[z.PLAID_SDK_LOAD_FAILED]:s.ERROR,[z.PLAID_LINK_INIT_FAILED]:s.ERROR,[z.PLAID_LINK_TOKEN_FAILED]:s.ERROR,[z.PLAID_AUTHENTICATION_FAILED]:s.ERROR,[z.PLAID_BANK_NOT_SUPPORTED]:s.WARNING,[z.PLAID_TOKEN_EXPIRED]:s.WARNING,[z.PLAID_NETWORK_ERROR]:s.WARNING,[z.PLAID_USER_CANCELLED]:s.INFO,[z.PLAID_TIMEOUT]:s.WARNING,[z.PLAID_INVALID_CREDENTIALS]:s.ERROR,[z.PLAID_ACCOUNT_LOCKED]:s.ERROR,[z.PLAID_MAINTENANCE]:s.WARNING,[z.PLAID_RATE_LIMITED]:s.WARNING};export{O as A,J as B,s as C,M as D,C as E,r as I,y as P,D as R,G as S,w as T,a,i as b,e as c,h as d,j as e,k as f,v as g,o as h,l as i,L as j,Y as k,$ as l,I as m,H as n,W as o,Q as p,K as q,Z as r,X as s,U as t,B as u,T as v,E as w,it as x,tt as y,z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e}from"./p-
|
|
1
|
+
import{p as e}from"./p-BC9n8nB2.js";const s="__JUSTIFI_WC_VERSION__",o=async()=>{var o,t;if((()=>{if("undefined"==typeof globalThis)return;const o=e.version,t=globalThis[s];t&&t!==o?console.error(`@justifi/webcomponents: Multiple versions detected. Version ${t} was loaded first and registered all components. Version ${o} is also present but its components will NOT be used. To fix this, add to your package.json:\n"pnpm": { "overrides": { "@justifi/webcomponents": "${o}" } }`):globalThis[s]=o})(),"undefined"!=typeof process&&("test"===(null===(o=process.env)||void 0===o?void 0:o.NODE_ENV)||(null===(t=process.env)||void 0===t?void 0:t.JEST_WORKER_ID)))return;const n=e.version,i=e.name,a=await(async e=>{const s=await fetch("https://registry.npmjs.org/"+e+"/latest");return(await s.json()).version})(i),r=a.replace(/-rc.*/,""),l=n.split("."),p=a.split(".");l[0]!==p[0]&&console.warn(`The package ${i} is out of date. The latest version is ${r}. Please update.`)};export{o as c}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{n as s,C as a,b as r}from"./p-
|
|
1
|
+
import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{n as s,C as a,b as r}from"./p-Dqxyi-uK.js";import{J as n}from"./p-BjjKkMO1.js";import{c as o}from"./p-_MjmE9YT.js";import{T as c}from"./p-DC2djVls.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{p as h}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as d,a as p}from"./p-BhpaUYtS.js";import{m,S as u}from"./p-iA-Amt2z.js";import{S as l}from"./p-05AWudQe.js";import{T as f,a as b,b as v,c as g,d as j,e as k,f as y,g as T,h as _,i as C,j as w,k as S,l as D}from"./p-DZr0wLGh.js";import{T as O}from"./p-CZfYo5-1.js";import{B as P,a as A}from"./p-Dz8KJn2G.js";import{a6 as x,a7 as I}from"./p-Bu7gdOaV.js";import{j as B}from"./p-Ds_P-dB8.js";import{o as E,g as Y}from"./p-BzjgvHHT.js";import"./p-BC9n8nB2.js";import"./p-C6Jq8YDT.js";import"./p-DgTOxu8x.js";import"./p-MPer3Rw7.js";const z={nickname:()=>t("th",{part:x,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:x,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:x,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:x,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:x,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:x,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:x,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:x,scope:"col",title:"The current status of each terminal"},"Status")},G={nickname:(e,i)=>t("td",{part:I(i)},e.nickname),model_name:(e,i)=>t("td",{part:I(i)},e.model_name),id:(e,i)=>t("td",{part:I(i)},e.id),provider:(e,i)=>t("td",{part:I(i)},B(e.provider)),provider_serial_number:(e,i)=>t("td",{part:I(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:I(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:I(i)},e.sub_account_name),status:(e,i)=>t("td",{part:I(i)},t(A,Object.assign({},{connected:{variant:P.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:P.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:P.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:P.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:P.SECONDARY,title:"This terminal is archived",text:"Archived"}}[e.status])))},M=class{constructor(t){e(this,t),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=h,this.pagingParams={},this.columns="nickname,provider_serial_number,status",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:O.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:O.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const i=this.terminals.find((t=>t.id===e));this.clickEvent.emit({name:O.row,data:i})}}componentWillLoad(){o(),this.analytics=new n(this),this.terminalsTable=new f(this.terminals,this.columns,z,G),this.initializeGetData(),this.getTerminals&&this.getSubAccounts&&this.fetchData(),E("set",(()=>{this.pagingParams={}})),E("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:e,service:i})=>async({params:r,onSuccess:n,onError:o})=>{var c,h;try{const m=await i.fetchTerminals(t,e,r);if(m.error)return o({error:p(m.error),code:d(null===(h=m.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const t=Object.assign({},m.page_info);n({terminals:(null===(c=m.data)||void 0===c?void 0:c.map((t=>new s(t))))||[],pagingInfo:t})}}catch(t){const e=d(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new u}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:e})=>{this.terminals=t,this.paging=e,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}get terminalParams(){const t=Y();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){const t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(l,{key:"47fca9f9a3285303bf0edc9f771324cdeeccc81d"},t(b,{key:"08158b4b6353b0aa178bc1999372341826dacebe"},t(v,{key:"6667e38e47b157fce34912108f303c688e891d50"},t(g,{key:"4fb637073cc3ecdea161af76a4aa63dce3572749"},t(j,{key:"aaa85ad73185d77deff24c8085a794871eae2058"},this.terminalsTable.columnData.map((t=>t)))),t(k,{key:"794e1d3efc15addf7d4638583d5c269aeec270b1"},t(y,{key:"6545c145ccba03f2e8b3ee990ee1050349b428ac",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),t(T,{key:"4464655c4eb9dfa6f5da83f41e7776488b0780c5",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),t(_,{key:"63b0460aba3b2c173d0aa94ba33c46081561d459",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((e,i)=>t(C,{"data-test-id":"table-row","data-row-entity-id":this.entityId[i],onClick:this.rowClickHandler},e)))),this.paging&&t(w,{key:"4555f7a255231f691498ec3780d0df9e8a70bfbd"},t(S,{key:"ba55004c9e60032698b79d2c15a9e06a123ef6a0"},t(D,{key:"c778a569fb066ca834730cc9ac4d7a0592c420ad",colSpan:this.terminalsTable.columnData.length},t("pagination-menu",{key:"936ef5ccd9b1d1d2043daed21006ad2bc8a9011a",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{M as justifi_terminals_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s}from"./p-CV0Pyo1O.js";import{m as i}from"./p-
|
|
1
|
+
import{r as t,c as e,h as s}from"./p-CV0Pyo1O.js";import{m as i}from"./p-D7nyPi2Q.js";import{C as h}from"./p-D7fNBSlC.js";import{C as r,b as o,I as a,c as l,d as n}from"./p-Dqxyi-uK.js";import{J as c}from"./p-BjjKkMO1.js";import{c as d}from"./p-_MjmE9YT.js";import"./p-BhpaUYtS.js";import"./p-C6Jq8YDT.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-BC9n8nB2.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const u=class{constructor(s){t(this,s),this.checkoutCompleted=e(this,"checkout-completed",7),this.checkoutExpired=e(this,"checkout-expired",7),this.errorEvent=e(this,"error-event",7),this.pollIntervalMs=3e3,this.pollTimeoutMs=6e5,this.terminalState="loading",this.paymentStatus="",this.errorMessage="",this.pollIntervalHandle=null,this.pollTimeoutHandle=null,this.failedDismissHandle=null,this.seenCompletionCreatedAts=new Set,this.inFlight=!1}componentWillLoad(){d(),this.analytics=new c(this),this.initialize()}disconnectedCallback(){var t;this.stopAll(),null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.stopAll(),this.initialize()}suppressInnerErrors(t){t.stopPropagation()}get effectivePollInterval(){return Math.max(1e3,this.pollIntervalMs)}initialize(){this.authToken&&this.checkoutId?(this.terminalState="loading",this.getCheckout=i({authToken:this.authToken,checkoutId:this.checkoutId,service:new h}),this.getCheckout({onSuccess:({checkout:t})=>this.handleInitialLoad(t),onError:({error:t,code:e,severity:s})=>{this.terminalState="error",this.errorMessage=t,this.errorEvent.emit({message:t,errorCode:e,severity:s})}})):this.errorEvent.emit({message:"authToken and checkoutId are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}handleInitialLoad(t){var e;switch(t.status){case a.expired:this.terminalState="expired",this.checkoutExpired.emit({checkoutId:this.checkoutId}),this.errorEvent.emit({message:l.CHECKOUT_EXPIRED,errorCode:o.CHECKOUT_EXPIRED,severity:r.ERROR});break;case a.completed:this.terminalState="completed",this.paymentStatus=this.resolvePaymentStatus(t),this.checkoutCompleted.emit({checkoutId:this.checkoutId,paymentStatus:this.paymentStatus});break;default:(null!==(e=t.completions)&&void 0!==e?e:[]).forEach((t=>this.seenCompletionCreatedAts.add(t.created_at))),this.terminalState="ready",this.startPolling()}}startPolling(){this.pollTimeoutHandle=setTimeout((()=>{this.stopAll(),this.terminalState="error",this.errorMessage="Checkout polling timed out",this.errorEvent.emit({message:"Checkout polling timed out",errorCode:o.FETCH_ERROR,severity:r.ERROR})}),this.pollTimeoutMs),this.pollIntervalHandle=setInterval((()=>this.tick()),this.effectivePollInterval)}tick(){this.inFlight||(this.inFlight=!0,this.getCheckout({onSuccess:({checkout:t})=>{this.inFlight=!1,this.handlePollResult(t)},onError:({error:t,code:e,severity:s})=>{this.inFlight=!1,this.stopAll(),this.terminalState="error",this.errorMessage=t,this.errorEvent.emit({message:t,errorCode:e,severity:s})}}))}handlePollResult(t){var e;const s=(null!==(e=t.completions)&&void 0!==e?e:[]).filter((t=>!this.seenCompletionCreatedAts.has(t.created_at)&&"failed"===t.payment_status));if(s.forEach((t=>this.seenCompletionCreatedAts.add(t.created_at))),s.length>0&&(this.terminalState="payment-failed",this.failedDismissHandle&&clearTimeout(this.failedDismissHandle),this.failedDismissHandle=setTimeout((()=>{"payment-failed"===this.terminalState&&(this.terminalState="ready")}),3e3)),t.status===a.completed)return this.stopAll(),this.terminalState="completed",this.paymentStatus=this.resolvePaymentStatus(t),void this.checkoutCompleted.emit({checkoutId:this.checkoutId,paymentStatus:this.paymentStatus});t.status===a.expired&&(this.stopAll(),this.terminalState="expired",this.checkoutExpired.emit({checkoutId:this.checkoutId}),this.errorEvent.emit({message:l.CHECKOUT_EXPIRED,errorCode:o.CHECKOUT_EXPIRED,severity:r.ERROR}))}resolvePaymentStatus(t){var e,s;const i=null===(s=[...null!==(e=t.completions)&&void 0!==e?e:[]].sort(((t,e)=>new Date(e.updated_at).getTime()-new Date(t.updated_at).getTime()))[0])||void 0===s?void 0:s.payment_status;return i===n.succeeded||null==i&&t.successful_payment_id?"succeeded":"pending"}stopAll(){this.pollIntervalHandle&&(clearInterval(this.pollIntervalHandle),this.pollIntervalHandle=null),this.pollTimeoutHandle&&(clearTimeout(this.pollTimeoutHandle),this.pollTimeoutHandle=null),this.failedDismissHandle&&(clearTimeout(this.failedDismissHandle),this.failedDismissHandle=null),this.inFlight=!1}render(){return this.authToken&&this.checkoutId?s("div",null,"loading"===this.terminalState&&null,("ready"===this.terminalState||"payment-failed"===this.terminalState)&&s("div",null,s("justifi-checkout-qr-code",{checkoutId:this.checkoutId}),"payment-failed"===this.terminalState&&s("p",null,"Payment failed. Please try again."),"ready"===this.terminalState&&s("p",null,"Scan to pay")),"completed"===this.terminalState&&s("div",null,s("p",null,"succeeded"===this.paymentStatus?"Payment received":"Payment pending")),"expired"===this.terminalState&&s("p",null,"Checkout expired. Please create a new checkout."),"error"===this.terminalState&&s("p",null,this.errorMessage)):null}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"]}}};export{u as justifi_qr_terminal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as n,H as t,c as i,g as o}from"./p-CV0Pyo1O.js";import{al as r,a3 as a,q as s,v as c,w as d,x as u}from"./p-Bu7gdOaV.js";import{c as l}from"./p-DgTOxu8x.js";import{g as f}from"./p-BFTU3MAI.js";import{F as h}from"./p-CLZcevBz.js";import{p as m}from"./p-CAVi_ne1.js";const w=class{constructor(n){e(this,n)}render(){return this.text?this.hideAlert?null:n("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:r},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},n("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),n("div",null,this.text)):null}},g=l({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:b,set:p}=g,y=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}focusWithoutPageScroll(e){if(e)try{e.focus({preventScroll:!0})}catch(n){const{scrollX:t,scrollY:i}=window;e.focus(),window.scrollTo(t,i)}}async componentDidLoad(){const e=await this.getBaseFontStyles();p("fontStyles",e);const n=await this.getFocusedStyles();p("focused",n);const t=await this.getFocusedAndInvalidStyles();p("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),setTimeout((()=>{this.hiddenInput.blur();const n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?a:this.errorText?s:this.isFocused?c:d}render(){return n(t,{key:"09ac1ea8407e3bf2df079f1188a7668e7d7b318e"},n("input",{key:"18b34d0fae7636e7640dd35a73ce9b369007afd5",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var v,x,k={exports:{}},z=f((v||(v=1,x=k,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,a="[iFrameSizer]",s=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},l=null,f=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){v("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){A(t,e)})).end()}):y("","Unable to bind to jQuery, it is not fully loaded.")),x.exports=H(),window.iFrameResize=window.iFrameResize||H()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function b(e){return u[e]?u[e].log:o}function p(e,n){k("log",e,n,b(e))}function y(e,n){k("info",e,n,b(e))}function v(e,n){k("warn",e,n,!0)}function k(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function z(e){function n(){t("Height"),t("Width"),C((function(){R(L),T(W),f("onResized",L)}),L,"init")}function t(e){var n=Number(u[W]["max"+e]),t=Number(u[W]["min"+e]),i=e.toLowerCase(),o=Number(L[i]);p(W,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(W,"Set "+i+" to min value")),o>n&&(o=n,p(W,"Set "+i+" to max value")),L[i]=""+o}function i(e){return A.slice(A.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=L.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(W),{x:Math.floor(Number(n.left)+Number(s.x)),y:Math.floor(Number(n.top)+Number(s.y))}}function c(e){var n=e?r(L.iframe):{x:0,y:0},t={x:Number(L.width)+n.x,y:Number(L.height)+n.y};p(W,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(s=t,d(),p(W,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):v(W,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===f("onScroll",s)?O():T(W)}function l(e){var n={};if(0===Number(L.width)&&0===Number(L.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:L.width,y:L.height};f(e,{iframe:L.iframe,screenX:Number(n.x),screenY:Number(n.y),type:L.type})}function f(e,n){return S(W,e,n)}var m,b,x,k,z,I,A=e.data,L={},W=null;"[iFrameResizerChild]Ready"===A?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():a===(""+A).slice(0,13)&&A.slice(13).split(":")[0]in u?(k=(x=A.slice(13).split(":"))[1]?parseInt(x[1],10):0,z=u[x[0]]&&u[x[0]].iframe,I=getComputedStyle(z),L={iframe:z,id:x[0],height:k+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(I)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(I),width:x[2],type:x[3]},u[W=L.id]&&(u[W].loaded=!0),(b=L.type in{true:1,false:1,undefined:1})&&p(W,"Ignoring init message from meta parent page"),!b&&function(e){var n=!0;return u[e]||(n=!1,v(L.type+" No settings for "+e+". Message was: "+A)),n}(W)&&(p(W,"Received: "+A),m=!0,null===L.iframe&&(v(W,"IFrame ("+L.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[W]&&u[W].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(W,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(W,"Checking connection is from: "+(n=u[W]&&u[W].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+L.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[W]&&u[W].firstRun&&u[W]&&(u[W].firstRun=!1),L.type){case"close":F(L.iframe);break;case"message":m=i(6),p(W,"onMessage passed: {iframe: "+L.iframe.id+", message: "+m+"}"),f("onMessage",{iframe:L.iframe,message:JSON.parse(m)}),p(W,"--");break;case"mouseenter":l("onMouseEnter");break;case"mouseleave":l("onMouseLeave");break;case"autoResize":u[W].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[W]&&u[W].iframe,W),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",g)}var t=W;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[W]&&u[W].stopPageInfo&&(u[W].stopPageInfo(),delete u[W].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(h=document.getElementById(a)||document.getElementsByName(a)[0])?(e=r(h),p(W,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),s={x:e.x,y:e.y},d(),p(W,"--")):window.top===window.self?p(W,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(W,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":j(L);break;case"init":n(),f("onInit",L.iframe);break;default:0===Number(L.width)&&0===Number(L.height)?v("Unsupported message received ("+L.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,a,h,m}())):y(W,"Ignored: "+A)}function S(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function I(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==S(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){v(e)}S(t,"onClosed",t),p(t,"--"),I(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===s&&p(n,"Get page position: "+(s={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+s.y)}function T(e){null!==s&&(window.scrollTo(s.x,s.y),p(e,"Set page position: "+s.x+","+s.y),O())}function O(){s=null}function j(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),L(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,s=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(a+n,r)):v(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||s||(s=!0,v(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function A(t,r){function a(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],v(l,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,l=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||f.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);l in u&&"iFrameResizer"in t?v(l,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[l]=Object.create(null),u[l].iframe=t,u[l].firstRun=!0,u[l].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&(u[l][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:f[n])}(e),u[l]&&(u[l].targetOrigin=!0===u[l].checkOrigin?""===(n=u[l].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(l,"IFrame scrolling "+(u[l]&&u[l].scrolling?"enabled":"disabled")+" for "+l),t.style.overflow=!1===(u[l]&&u[l].scrolling)?"hidden":"auto",u[l]&&u[l].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[l]?u[l].scrolling:"no"}}(),function(){function e(e){var n=u[l][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(l,"Set "+e+" = "+t.style[e]))}function n(e){if(u[l]["min"+e]>u[l]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[l]&&u[l].bodyMargin)&&"0"!==(u[l]&&u[l].bodyMargin)||(u[l].bodyMarginV1=u[l].bodyMargin,u[l].bodyMargin=u[l].bodyMargin+"px"),s=N(l),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&F(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",s,t,e,!0),(!u[l]||!u[l].firstRun)&&u[l]&&u[l].heightCalculationMethod in d&&j({iframe:t,height:0,width:0,type:"init"})})),E("init",s,t,e,!0),u[l]&&(u[l].iframe.iFrameResizer={close:F.bind(null,u[l].iframe),removeListeners:I.bind(null,u[l].iframe),resize:E.bind(null,"Window resize","resize",u[l].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[l].iframe,l)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[l].iframe,l)}}))}function L(e,n){null===l&&(l=setTimeout((function(){l=null,e()}),n))}function W(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),L((function(){P("Tab Visible","resize")}),16))}function P(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function H(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),A(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",z),w(window,"resize",(function(){p("window","Trigger event: resize"),L((function(){P("Window resize","resize")}),16)})),w(document,"visibilitychange",W),w(document,"-webkit-visibilitychange",W),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&v("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),k.exports));class S{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const I=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded",7),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:m.version})}async reload(){this.iframeElement.src=this.iframeSrc}initializeFrameCommunicationService(){var e;this.frameService=new S(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?a:this.isValid?this.isFocused?c:d:s}get style(){return this.isFocused?this.isValid?b.focused:b.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(b.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}get iframeSrc(){return`${this.iframeOrigin}?${this.urlParams}`}render(){return n(t,{key:"7116bdbe3d3a69fac28965fa011d016d35ec5025",class:"form-group d-flex flex-column"},n("div",{key:"e784c6f81476eb282a07714d5b789f41342c4a2a",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"d0b4341c92a4c957ec4a03485357d6cef7f22426",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"9be8449ee6b3d37aa3607ff31d5649c73e3f4206",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"093b48e69a6e8a15a4fd9877424bb0c9a3f58ad7",id:this.inputId,name:this.inputId,src:this.iframeSrc,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{z({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(h,{key:"f5897f95387e6400f35c997b2921a60fb5f4f11b",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{w as form_alert,y as hidden_input,I as iframe_input}
|
|
1
|
+
import{r as e,h as n,H as t,c as i,g as o}from"./p-CV0Pyo1O.js";import{al as r,a3 as a,q as s,v as c,w as d,x as u}from"./p-Bu7gdOaV.js";import{c as l}from"./p-DgTOxu8x.js";import{g as f}from"./p-BFTU3MAI.js";import{F as h}from"./p-CLZcevBz.js";import{p as m}from"./p-BC9n8nB2.js";const w=class{constructor(n){e(this,n)}render(){return this.text?this.hideAlert?null:n("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:r},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},n("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),n("div",null,this.text)):null}},g=l({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:b,set:p}=g,y=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}focusWithoutPageScroll(e){if(e)try{e.focus({preventScroll:!0})}catch(n){const{scrollX:t,scrollY:i}=window;e.focus(),window.scrollTo(t,i)}}async componentDidLoad(){const e=await this.getBaseFontStyles();p("fontStyles",e);const n=await this.getFocusedStyles();p("focused",n);const t=await this.getFocusedAndInvalidStyles();p("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),setTimeout((()=>{this.hiddenInput.blur();const n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?a:this.errorText?s:this.isFocused?c:d}render(){return n(t,{key:"09ac1ea8407e3bf2df079f1188a7668e7d7b318e"},n("input",{key:"18b34d0fae7636e7640dd35a73ce9b369007afd5",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var v,x,k={exports:{}},z=f((v||(v=1,x=k,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,a="[iFrameSizer]",s=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},l=null,f=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){v("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){L(t,e)})).end()}):y("","Unable to bind to jQuery, it is not fully loaded.")),x.exports=H(),window.iFrameResize=window.iFrameResize||H()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function b(e){return u[e]?u[e].log:o}function p(e,n){k("log",e,n,b(e))}function y(e,n){k("info",e,n,b(e))}function v(e,n){k("warn",e,n,!0)}function k(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function z(e){function n(){t("Height"),t("Width"),C((function(){R(W),T(A),f("onResized",W)}),W,"init")}function t(e){var n=Number(u[A]["max"+e]),t=Number(u[A]["min"+e]),i=e.toLowerCase(),o=Number(W[i]);p(A,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(A,"Set "+i+" to min value")),o>n&&(o=n,p(A,"Set "+i+" to max value")),W[i]=""+o}function i(e){return L.slice(L.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=W.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(A),{x:Math.floor(Number(n.left)+Number(s.x)),y:Math.floor(Number(n.top)+Number(s.y))}}function c(e){var n=e?r(W.iframe):{x:0,y:0},t={x:Number(W.width)+n.x,y:Number(W.height)+n.y};p(A,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(s=t,d(),p(A,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):v(A,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===f("onScroll",s)?O():T(A)}function l(e){var n={};if(0===Number(W.width)&&0===Number(W.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:W.width,y:W.height};f(e,{iframe:W.iframe,screenX:Number(n.x),screenY:Number(n.y),type:W.type})}function f(e,n){return S(A,e,n)}var m,b,x,k,z,I,L=e.data,W={},A=null;"[iFrameResizerChild]Ready"===L?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():a===(""+L).slice(0,13)&&L.slice(13).split(":")[0]in u?(k=(x=L.slice(13).split(":"))[1]?parseInt(x[1],10):0,z=u[x[0]]&&u[x[0]].iframe,I=getComputedStyle(z),W={iframe:z,id:x[0],height:k+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(I)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(I),width:x[2],type:x[3]},u[A=W.id]&&(u[A].loaded=!0),(b=W.type in{true:1,false:1,undefined:1})&&p(A,"Ignoring init message from meta parent page"),!b&&function(e){var n=!0;return u[e]||(n=!1,v(W.type+" No settings for "+e+". Message was: "+L)),n}(A)&&(p(A,"Received: "+L),m=!0,null===W.iframe&&(v(A,"IFrame ("+W.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[A]&&u[A].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(A,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(A,"Checking connection is from: "+(n=u[A]&&u[A].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+W.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[A]&&u[A].firstRun&&u[A]&&(u[A].firstRun=!1),W.type){case"close":F(W.iframe);break;case"message":m=i(6),p(A,"onMessage passed: {iframe: "+W.iframe.id+", message: "+m+"}"),f("onMessage",{iframe:W.iframe,message:JSON.parse(m)}),p(A,"--");break;case"mouseenter":l("onMouseEnter");break;case"mouseleave":l("onMouseLeave");break;case"autoResize":u[A].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[A]&&u[A].iframe,A),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",g)}var t=A;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[A]&&u[A].stopPageInfo&&(u[A].stopPageInfo(),delete u[A].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(h=document.getElementById(a)||document.getElementsByName(a)[0])?(e=r(h),p(A,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),s={x:e.x,y:e.y},d(),p(A,"--")):window.top===window.self?p(A,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(A,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":j(W);break;case"init":n(),f("onInit",W.iframe);break;default:0===Number(W.width)&&0===Number(W.height)?v("Unsupported message received ("+W.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,a,h,m}())):y(A,"Ignored: "+L)}function S(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function I(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==S(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){v(e)}S(t,"onClosed",t),p(t,"--"),I(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===s&&p(n,"Get page position: "+(s={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+s.y)}function T(e){null!==s&&(window.scrollTo(s.x,s.y),p(e,"Set page position: "+s.x+","+s.y),O())}function O(){s=null}function j(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),W(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,s=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(a+n,r)):v(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||s||(s=!0,v(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function L(t,r){function a(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],v(l,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,l=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||f.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);l in u&&"iFrameResizer"in t?v(l,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[l]=Object.create(null),u[l].iframe=t,u[l].firstRun=!0,u[l].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&(u[l][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:f[n])}(e),u[l]&&(u[l].targetOrigin=!0===u[l].checkOrigin?""===(n=u[l].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(l,"IFrame scrolling "+(u[l]&&u[l].scrolling?"enabled":"disabled")+" for "+l),t.style.overflow=!1===(u[l]&&u[l].scrolling)?"hidden":"auto",u[l]&&u[l].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[l]?u[l].scrolling:"no"}}(),function(){function e(e){var n=u[l][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(l,"Set "+e+" = "+t.style[e]))}function n(e){if(u[l]["min"+e]>u[l]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[l]&&u[l].bodyMargin)&&"0"!==(u[l]&&u[l].bodyMargin)||(u[l].bodyMarginV1=u[l].bodyMargin,u[l].bodyMargin=u[l].bodyMargin+"px"),s=N(l),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&F(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",s,t,e,!0),(!u[l]||!u[l].firstRun)&&u[l]&&u[l].heightCalculationMethod in d&&j({iframe:t,height:0,width:0,type:"init"})})),E("init",s,t,e,!0),u[l]&&(u[l].iframe.iFrameResizer={close:F.bind(null,u[l].iframe),removeListeners:I.bind(null,u[l].iframe),resize:E.bind(null,"Window resize","resize",u[l].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[l].iframe,l)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[l].iframe,l)}}))}function W(e,n){null===l&&(l=setTimeout((function(){l=null,e()}),n))}function A(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),W((function(){P("Tab Visible","resize")}),16))}function P(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function H(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),L(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",z),w(window,"resize",(function(){p("window","Trigger event: resize"),W((function(){P("Window resize","resize")}),16)})),w(document,"visibilitychange",A),w(document,"-webkit-visibilitychange",A),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&v("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),k.exports));class S{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const I=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded",7),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:m.version})}async reload(){this.iframeElement.src=this.iframeSrc}initializeFrameCommunicationService(){var e;this.frameService=new S(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?a:this.isValid?this.isFocused?c:d:s}get style(){return this.isFocused?this.isValid?b.focused:b.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(b.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}get iframeSrc(){return`${this.iframeOrigin}?${this.urlParams}`}render(){return n(t,{key:"7116bdbe3d3a69fac28965fa011d016d35ec5025",class:"form-group d-flex flex-column"},n("div",{key:"e784c6f81476eb282a07714d5b789f41342c4a2a",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"d0b4341c92a4c957ec4a03485357d6cef7f22426",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"9be8449ee6b3d37aa3607ff31d5649c73e3f4206",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"093b48e69a6e8a15a4fd9877424bb0c9a3f58ad7",id:this.inputId,name:this.inputId,src:this.iframeSrc,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{z({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(h,{key:"f5897f95387e6400f35c997b2921a60fb5f4f11b",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{w as form_alert,y as hidden_input,I as iframe_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as i,r as e,c as a}from"./p-CV0Pyo1O.js";import{S as t}from"./p-eBK-iWrz.js";import{w as r,c as s}from"./p-B4vLfYnZ.js";import{e as d}from"./p-Ds_P-dB8.js";import{c as n}from"./p-
|
|
1
|
+
import{h as i,r as e,c as a}from"./p-CV0Pyo1O.js";import{S as t}from"./p-eBK-iWrz.js";import{w as r,c as s}from"./p-B4vLfYnZ.js";import{e as d}from"./p-Ds_P-dB8.js";import{c as n}from"./p-_MjmE9YT.js";import{C as o,c,b as h}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{B as l}from"./p-CU2Dwa94.js";import"./p-CZfYo5-1.js";import"./p-Bu7gdOaV.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";import"./p-BC9n8nB2.js";const f=()=>i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(t,{height:"18px",width:"100px"}),i(t,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"80px"}),i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"30px"}),i(t,{height:"36px"})))),p=class{constructor(i){e(this,i),this.errorEvent=a(this,"error-event",7),this.iframeState="loading",this.reloadIframes=()=>{this.iframeState="loading",this.iframeElements.forEach((i=>i.reload())),this.watchIframesLoad()}}async componentWillLoad(){await r(),this.iframeOrigin=s.iframeOrigin,this.tabId=d(),n()}componentDidLoad(){this.watchIframesLoad()}disconnectedCallback(){var i;null===(i=this.loadAbortController)||void 0===i||i.abort()}async validate(){const i=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),a=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return i&&e&&a&&t}async tokenize({clientId:i,paymentMethodMetadata:e,account:a}){return await this.cardNumberIframeElement.tokenize(i,e,a)}get isReady(){return"ready"===this.iframeState}get iframeElements(){return[this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement]}watchIframesLoad(){var i;null===(i=this.loadAbortController)||void 0===i||i.abort();const{signal:e}=this.loadAbortController=new AbortController,a=new Set(this.iframeElements.map((i=>i.inputId))),t=Promise.all(this.iframeElements.map((i=>new Promise((t=>{i.addEventListener("iframeLoaded",(()=>{a.delete(i.inputId),t()}),{once:!0,signal:e})}))))),r=new Promise(((i,t)=>{const r=window.setTimeout((()=>t(new Error(`Iframes failed to load: ${Array.from(a).join(", ")}`))),1e4);e.addEventListener("abort",(()=>{window.clearTimeout(r),t(new Error("iframe load watch aborted"))}),{once:!0})}));Promise.race([t,r]).then((()=>{var i;e.aborted||(this.iframeState="ready",null===(i=this.loadAbortController)||void 0===i||i.abort())})).catch((i=>{var a;e.aborted||(this.iframeState="error",null===(a=this.loadAbortController)||void 0===a||a.abort(),this.errorEvent.emit({errorCode:h.IFRAME_LOAD_ERROR,message:c.IFRAME_LOAD_ERROR,severity:o.ERROR,data:{errorMessage:i.message}}))}))}renderIframeError(){return i("div",null,i("form-alert",{text:c.IFRAME_LOAD_ERROR,hideAlert:!1}),i(l,{variant:"link",clickHandler:this.reloadIframes,"aria-label":"Reload payment form",type:"button"},"Try again"))}render(){return i("div",{key:"a6630edeb25e19b72a6ad2588a28003ee53bda91"},"loading"===this.iframeState&&i(f,{key:"346df12a8dcfa70ff35381491c10550a44dee1c1"}),"error"===this.iframeState&&this.renderIframeError(),i("hidden-input",{key:"e63dfbd08d05c929d7f25257a0832d68246aa037"}),i("div",{key:"3cffef99661c7fc1289581c3c43cf7f2c2ec4558",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"493e63b1e26542e502fb028192a2ed1479d85c8d",class:"mb-3"},i("iframe-input",{key:"337b63edc91e78baa975bbfa067e17bd29a5b704",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"04628f41b2c78cbb68bcabfe7809c047dc394c50",class:"row"},i("div",{key:"9ea7675dcab4ad6f6bce214b79527569ffc272b9",class:"col-4 align-content-end"},i("iframe-input",{key:"ab7f0c3e68848a048104a6644b2617e9b8b94e35",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"a24a31ef92175734aa8d5a6be241ddb37f94e4d2",class:"col-4 align-content-end"},i("iframe-input",{key:"623fffa1cdc854b629314fc125b476d2541f2290",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"ab7737e03a1d6ccad1e70e575cea100040de70fd",class:"col-4 align-content-end"},i("iframe-input",{key:"b755098bc225d91125a70bcb2cae933e4cd08f2d",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{p as card_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as i,c as s}from"./p-CV0Pyo1O.js";import{S as r}from"./p-eBK-iWrz.js";import{w as e,c as a}from"./p-B4vLfYnZ.js";import{e as o}from"./p-Ds_P-dB8.js";import{c as n}from"./p-
|
|
1
|
+
import{h as t,r as i,c as s}from"./p-CV0Pyo1O.js";import{S as r}from"./p-eBK-iWrz.js";import{w as e,c as a}from"./p-B4vLfYnZ.js";import{e as o}from"./p-Ds_P-dB8.js";import{c as n}from"./p-_MjmE9YT.js";import{c as h}from"./p-Fpaf7CLD.js";import{C as l,c,b as d}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{B as m}from"./p-CU2Dwa94.js";import"./p-CZfYo5-1.js";import"./p-Bu7gdOaV.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";import"./p-BC9n8nB2.js";import"./p-DEx8fQeW.js";const p=()=>t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-end"},t(r,{height:"18px",width:"120px"}),t(r,{height:"36px"}))),t("div",{class:"row"},t("div",{class:"col-12 align-content-end"},t(r,{height:"18px",width:"110px"}),t(r,{height:"36px"})))),u=class{constructor(t){i(this,t),this.errorEvent=s(this,"error-event",7),this.iframeState="loading",this.hasLoggedAchDisabledWarning=!1,this.reloadIframes=()=>{this.iframeState="loading",this.iframeElements.forEach((t=>t.reload())),this.watchIframesLoad()}}async componentWillLoad(){await e(),this.iframeOrigin=a.iframeOrigin,this.tabId=o(),n()}componentDidRender(){!this.loadAbortController&&this.iframeElements.every(Boolean)&&this.watchIframesLoad()}disconnectedCallback(){var t;null===(t=this.loadAbortController)||void 0===t||t.abort()}isAchDisabledForCheckout(){return h.checkoutLoaded&&!h.achPaymentsEnabled}async validate(){if(this.isAchDisabledForCheckout())return!1;const t=await this.accountNumberIframeElement.validate(),i=await this.routingNumberIframeElement.validate();return t&&i}async tokenize({clientId:t,paymentMethodMetadata:i,account:s}){return this.isAchDisabledForCheckout()?{error:{message:"ACH payments are disabled for this checkout (payment_settings.ach_payments=false)."}}:await this.accountNumberIframeElement.tokenize(t,i,s)}get isReady(){return"ready"===this.iframeState}get iframeElements(){return[this.accountNumberIframeElement,this.routingNumberIframeElement]}watchIframesLoad(){var t;null===(t=this.loadAbortController)||void 0===t||t.abort();const{signal:i}=this.loadAbortController=new AbortController,s=new Set(this.iframeElements.map((t=>t.inputId))),r=Promise.all(this.iframeElements.map((t=>new Promise((r=>{t.addEventListener("iframeLoaded",(()=>{s.delete(t.inputId),r()}),{once:!0,signal:i})}))))),e=new Promise(((t,r)=>{const e=window.setTimeout((()=>r(new Error(`Iframes failed to load: ${Array.from(s).join(", ")}`))),1e4);i.addEventListener("abort",(()=>{window.clearTimeout(e),r(new Error("iframe load watch aborted"))}),{once:!0})}));Promise.race([r,e]).then((()=>{var t;i.aborted||(this.iframeState="ready",null===(t=this.loadAbortController)||void 0===t||t.abort())})).catch((t=>{var s;i.aborted||(this.iframeState="error",null===(s=this.loadAbortController)||void 0===s||s.abort(),this.errorEvent.emit({errorCode:d.IFRAME_LOAD_ERROR,message:c.IFRAME_LOAD_ERROR,severity:l.ERROR,data:{errorMessage:t.message}}))}))}renderIframeError(){return t("div",null,t("form-alert",{text:c.IFRAME_LOAD_ERROR,hideAlert:!1}),t(m,{variant:"link",clickHandler:this.reloadIframes,"aria-label":"Reload bank account form",type:"button"},"Try again"))}render(){return this.isAchDisabledForCheckout()?(this.hasLoggedAchDisabledWarning||(console.warn("[bank-account-form] ACH payments are disabled for this checkout (payment_settings.ach_payments=false)."),this.hasLoggedAchDisabledWarning=!0),null):t("div",null,"loading"===this.iframeState&&t(p,null),"error"===this.iframeState&&this.renderIframeError(),t("hidden-input",null),t("div",{class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},t("div",{class:"row mb-3"},t("iframe-input",{inputId:"accountNumber",ref:t=>this.accountNumberIframeElement=t,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),t("div",{class:"row"},t("iframe-input",{inputId:"routingNumber",ref:t=>this.routingNumberIframeElement=t,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}};export{u as bank_account_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as a}from"./p-CV0Pyo1O.js";import{c as o}from"./p-
|
|
1
|
+
import{r as t,h as a}from"./p-CV0Pyo1O.js";import{c as o}from"./p-_MjmE9YT.js";import{J as s}from"./p-BjjKkMO1.js";import{w as r}from"./p-B4vLfYnZ.js";import{S as i}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import"./p-BC9n8nB2.js";import"./p-C6Jq8YDT.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import"./p-DgTOxu8x.js";const e=class{constructor(a){t(this,a)}async componentWillLoad(){await r(),o(),this.analytics=new s(this)}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){return!!this.bankAccountFormElement&&this.bankAccountFormElement.validate()}async tokenize({clientId:t,paymentMethodMetadata:a,account:o}){return this.bankAccountFormElement?this.bankAccountFormElement.tokenize({clientId:t,paymentMethodMetadata:a,account:o}):{error:{message:"Bank account form is not available."}}}render(){return a(i,{key:"1263233d6c63c0df4a2a6a17b263651156ad6bee"},a("bank-account-form",{key:"f6c6707201ef127eafc81e12535bcfa37ddf3c5d",ref:t=>this.bankAccountFormElement=t}))}};export{e as justifi_bank_account_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,r as t,c as i}from"./p-CV0Pyo1O.js";import{P as s}from"./p-pueOrhXO.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{k as a,C as d,b as c}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as o,a as r}from"./p-BhpaUYtS.js";import{h,b as l,d as n}from"./p-Ds_P-dB8.js";import{a as f,b as p,D as b,c as u,C as v,E as y}from"./p-Bh6Q8AqQ.js";import{J as m}from"./p-BjjKkMO1.js";import{m as k,M as j}from"./p-Bxc0NRj8.js";import{c as g}from"./p-_MjmE9YT.js";import{B as C}from"./p-CU2Dwa94.js";import{S as w}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{S as x}from"./p-eBK-iWrz.js";import{a as D,B as T}from"./p-Dz8KJn2G.js";import"./p-C6Jq8YDT.js";import"./p-BC9n8nB2.js";import"./p-DgTOxu8x.js";import"./p-Bu7gdOaV.js";const B=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(x,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(x,{width:"70%"})),e("div",{class:"col-12"},e(x,{width:"40%"})),e("div",{class:"col-12"},e(x,{width:"40%"})),e("div",{class:"col-12"},e(x,{width:"100%"})),e("div",{class:"col-12"},e(x,{width:"80%"}))),S=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event",7),this.recordClickEvent=i(this,"record-click-event",7),this.enableRecordClick=!1,this.loading=!0,this.errorMessage=null,this.downloadCSV=()=>{this.getPayoutCSV({payoutId:this.payout.id,onError:({error:e,code:t,severity:i})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:i})}})},this.handleRecordClick=e=>{this.recordClickEvent.emit({id:e,type:"account"})}}componentWillLoad(){g(),this.analytics=new m(this),this.initializeServices(),this.getPayout&&this.fetchData()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeServices()}getPayoutWatcher(){this.fetchData()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:e,authToken:t,service:i})=>async({onSuccess:s,onError:c})=>{var h;try{const l=await i.fetchPayout(e,t);l.error?c({error:r(l.error),code:o(null===(h=l.error)||void 0===h?void 0:h.code),severity:d.ERROR}):s(new a(l.data))}catch(e){c({error:r(e),code:o(null==e?void 0:e.code),severity:d.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new s}),this.getPayoutCSV=k({authToken:this.authToken,service:new s})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:c.MISSING_PROPS,severity:d.ERROR}))}fetchData(){this.loading=!0,this.getPayout({onSuccess:e=>{this.errorMessage=null,this.payout=e,this.loading=!1},onError:({error:e,code:t,severity:i})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:i}),this.loading=!1}})}formatMethod(e){return"ach"===e?"ACH":h(e)}render(){var t,i,s,a;return e(w,{key:"142db792aa54d2e598071b2787e9c3225ac53561"},this.loading&&e(B,{key:"34f30e5076a727a1ac1ec3e510ee497dd2118781"}),!this.loading&&this.errorMessage&&y(this.errorMessage),!this.loading&&this.payout&&e("justifi-details",{key:"1a35e41004c25f3d1aa6f9e422dade0149d1864f",errorMessage:this.errorMessage},e(f,{key:"159e5f4ce02466d1679ab9a7288e39b58422cbc1",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},j(null===(t=this.payout)||void 0===t?void 0:t.status),e(D,"expedited"===this.payout.settlement_priority?{variant:T.WARNING,title:"Expedited",text:"Expedited"}:{variant:T.SECONDARY,title:"Standard",text:"Standard"})),title:this.payout.formattedPaymentAmount(this.payout.amount)},e(p,{key:"33852a41177edfbf5df0419dc3d09a33e8b1bea5",classes:"border-1 border-end",title:"Updated At",value:`${l(this.payout.updated_at)} ${n(this.payout.updated_at)}`}),e(p,{key:"158b9ce9844ebc705582921133e3bd8748d11722",classes:"border-1 border-end",title:"Created At",value:`${l(this.payout.created_at)} ${n(this.payout.created_at)}`}),e(p,{key:"1066d269cec1d90311add505d19c17ca2f9a0863",title:"ID",value:this.payout.id}),e("div",{key:"4dcbce85c6e11ef99b7370f03ed33acd384d5891",class:"m-4"},e(C,{key:"5206d2702ba0379db1304b77ac07c92e69754f14",variant:"outline-secondary",class:"btn btn-outline-secondary d-flex align-items-center",onClick:this.downloadCSV},"Export CSV"))),e("div",{key:"d6a4a013fb6e48f4c4ef79361a92240b6c7ee5e4",slot:"detail-sections"},e(b,{key:"170281f71a4decf37ba3a5525b38935131f68600",sectionTitle:"Details"}),e("div",{key:"500a4b494c633a9dd7a029c0b742c7316dff9c16",class:"d-flex flex-column gap-2 w-100"},e(u,{key:"72bcd40ca0b5a172e4a9854071630761e95bc0e6",title:"Date paid",value:l(this.payout.deposits_at)}),e(u,{key:"1429c2ffb77148dbaedb73e45849bbbf3f18e65e",title:"Statement Description",value:this.payout.description}),e(u,{key:"cb7541a3c40f8dc9dce258b8f2c55c68782144f6",title:"Payout Method",value:this.formatMethod(this.payout.delivery_method)}),e(u,{key:"f871fdcc0a606267b04cc3865a918c7acdad9a2a",title:"Amount",value:this.payout.formattedPaymentAmount(this.payout.amount)}),e(u,{key:"32b60dd33cc414bbe87ad24f6aec31fd6a907346",title:"Fee",value:this.payout.formattedPaymentAmount(this.payout.fees_total)})),e(b,{key:"be9b1a451d296029e7fecc3b37f7cc994dbccc05",sectionTitle:"Account"}),e("div",{key:"97e6a3b1fbf8096ee44293262e4554bbe8400b31",class:"d-flex flex-column gap-2 w-100"},e(u,{key:"48765886ae8274f95789e5262c280e4a8fc71116",title:"ID",value:this.payout.account_id,onClick:this.enableRecordClick?()=>this.handleRecordClick(this.payout.account_id):void 0}),e(u,{key:"26c552db6cae6855a50550b05258ea37d279e8c6",title:"Account Type",value:null===(i=this.payout.bank_account)||void 0===i?void 0:i.account_type}),e(u,{key:"5844b3d0c9b1b84da8111ea70233335246524244",title:"Institution",value:null===(s=this.payout.bank_account)||void 0===s?void 0:s.account_type}),e(u,{key:"d3582f8418241f330d3b02a823f32def67dd6cc3",title:"Routing Number",value:null===(a=this.payout.bank_account)||void 0===a?void 0:a.routing_number}),e(u,{key:"872d385fb085bf8c908ee47d1b4e0a851125ad3c",title:"Account Number",value:this.payout.bank_account?`**** ${this.payout.bank_account.account_number_last4}`:void 0})),this.payout.metadata&&[e(b,{key:"4e8c13627b364b0bfc59a85ee15cc8212872f279",sectionTitle:"Metadata"}),e("div",{key:"f0071fcf1edf15c19303ac1af0760312f17ed2d4",class:"d-table gap-2 w-100"},e(v,{key:"ae1ef093dac17315972e3aa5350028d08a34a90d",metadata:this.payout.metadata}))])))}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"],getPayout:["getPayoutWatcher"]}}};export{S as justifi_payout_details}
|