@justifi/webcomponents 4.8.3 → 4.9.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/dist/cjs/{Business-42d0c522.js → Business-64dffab7.js} +6 -7
- package/dist/cjs/{BusinessFormEventTypes-863f48e9.js → BusinessFormEventTypes-62990815.js} +1 -1
- package/dist/cjs/{Payout-44b49b2d.js → Payment-89a8bc21.js} +0 -43
- package/dist/cjs/Payout-a2dd7b01.js +45 -0
- package/dist/cjs/{SubAccount-2a803b22.js → SubAccount-f8144025.js} +1 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +24 -10
- package/dist/{webcomponents/p-4ee44c76.entry.js → cjs/business-details-core.cjs.entry.js} +55 -1
- package/dist/cjs/form-control-datepart_3.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
- package/dist/cjs/form-control-select_2.cjs.entry.js +1 -1
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +11036 -0
- package/dist/cjs/{index-55950669.js → index-07ddbad2.js} +0 -3
- package/dist/cjs/justifi-additional-questions_5.cjs.entry.js +2 -2
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
- package/dist/cjs/{select-input_2.cjs.entry.js → justifi-billing-form_4.cjs.entry.js} +1818 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +43 -57
- package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +5 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +5 -4
- package/dist/cjs/justifi-business-list.cjs.entry.js +5 -4
- package/dist/cjs/justifi-business-owners.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +95 -0
- package/dist/cjs/justifi-checkout.cjs.entry.js +99 -0
- package/dist/cjs/justifi-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +39 -11008
- package/dist/cjs/justifi-new-payment-method_3.cjs.entry.js +168 -0
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-form.cjs.entry.js +5 -4
- package/dist/cjs/{justifi-billing-form_2.cjs.entry.js → justifi-payment-method-selector.cjs.entry.js} +4 -79
- package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +5 -4
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +4 -3
- package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -2
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +6 -5
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +5 -4
- package/dist/cjs/justifi-table_2.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/payment-details-core.cjs.entry.js +10 -4
- package/dist/cjs/{payment.service-605896dc.js → payment.service-0b0086dc.js} +2 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +4 -3
- package/dist/cjs/payout-details-core.cjs.entry.js +4 -4
- package/dist/cjs/{payout.service-b39f2739.js → payout.service-5cc3b4e9.js} +2 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +4 -3
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +7 -7
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +3 -3
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +3 -3
- package/dist/cjs/{utils-d126d17c.js → utils-5c3e442d.js} +5 -5
- package/dist/cjs/{utils-29a8a91d.js → utils-84208d99.js} +11 -2
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/api/Business.js +6 -7
- package/dist/collection/api/Checkout.js +1 -0
- package/dist/collection/api/index.js +1 -0
- package/dist/collection/api/services/business.service.js +8 -0
- package/dist/collection/api/services/checkout.service.js +12 -0
- package/dist/collection/api/services/reports.service.js +9 -0
- package/dist/collection/collection-manifest.json +7 -0
- package/dist/collection/components/billing-form/billing-form.js +1 -2
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +5 -2
- package/dist/collection/components/business-details/additional-questions-details/test/additional-questions.spec.js +16 -0
- package/dist/collection/components/business-details/business-details-core.js +86 -0
- package/dist/collection/components/business-details/business-details.js +20 -65
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +4 -2
- package/dist/collection/components/business-details/generic-info-details/test/generic-info-details.spec.js +16 -0
- package/dist/collection/components/business-details/get-business.js +17 -0
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +5 -2
- package/dist/collection/components/business-details/legal-address-details/test/legal-address-details.spec.js +16 -0
- package/dist/collection/components/business-details/owner-details/owner-details.js +10 -12
- package/dist/collection/components/business-details/owner-details/test/owner-details.spec.js +16 -0
- package/dist/collection/components/business-details/representative-details/representative-details.js +5 -3
- package/dist/collection/components/business-details/representative-details/test/representative-details.spec.js +16 -0
- package/dist/collection/components/business-details/test/busines-details-core.spec.js +53 -0
- package/dist/collection/components/business-details/test/business-details.spec.js +40 -0
- package/dist/collection/components/business-details/test/get-business.spec.js +60 -0
- package/dist/collection/components/checkout/checkout-actions.js +33 -0
- package/dist/collection/components/checkout/checkout-core.css +2604 -0
- package/dist/collection/components/checkout/checkout-core.js +248 -0
- package/dist/collection/components/checkout/checkout.js +112 -0
- package/dist/collection/components/checkout/new-payment-method.js +188 -0
- package/dist/collection/components/checkout/payment-method-option-utils.js +19 -0
- package/dist/collection/components/checkout/payment-method-options.css +7073 -0
- package/dist/collection/components/checkout/payment-method-options.js +248 -0
- package/dist/collection/components/checkout/saved-payment-method.js +123 -0
- package/dist/collection/components/checkout/test/checkout.js +22 -0
- package/dist/collection/components/checkout/test/checkout.spec.js +166 -0
- package/dist/collection/components/checkout/test/mockCheckout.js +19 -0
- package/dist/collection/components/details/utils.js +4 -1
- package/dist/collection/components/gross-payment-chart/get-gross-payment-chart-data.js +14 -0
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +119 -0
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +25 -73
- package/dist/collection/components/gross-payment-chart/test/get-gross-payment-chart-data.spec.js +69 -0
- package/dist/collection/components/gross-payment-chart/test/gross-payment-chart-core.spec.js +64 -0
- package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +23 -8
- package/dist/collection/components/payment-details/payment-details-core.js +8 -2
- package/dist/collection/components/payment-details/payment-details.js +0 -1
- package/dist/collection/components/payment-form/payment-form.js +1 -1
- package/dist/collection/components/payment-method-form/payment-method-form.js +1 -1
- package/dist/collection/components/payout-details/payout-details-core.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +2 -2
- package/dist/collection/utils/utils.js +9 -3
- package/dist/docs.json +1152 -187
- package/dist/esm/{Business-e9340f6b.js → Business-9921d35f.js} +6 -7
- package/dist/esm/{BusinessFormEventTypes-989960ba.js → BusinessFormEventTypes-182e20be.js} +1 -1
- package/dist/esm/{Payout-dc5f009c.js → Payment-55886c86.js} +1 -43
- package/dist/esm/Payout-dfe15b00.js +43 -0
- package/dist/esm/{SubAccount-46b4c2b1.js → SubAccount-76f6d565.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +24 -10
- package/dist/esm/business-details-core.entry.js +51 -0
- package/dist/esm/form-control-datepart_3.entry.js +1 -1
- package/dist/esm/form-control-monetary.entry.js +1 -1
- package/dist/esm/form-control-select_2.entry.js +1 -1
- package/dist/esm/gross-payment-chart-core.entry.js +11032 -0
- package/dist/esm/{index-62b8aa8a.js → index-fb5ca346.js} +0 -3
- package/dist/esm/justifi-additional-questions_5.entry.js +2 -2
- package/dist/esm/justifi-bank-account-form.entry.js +1 -1
- package/dist/esm/{select-input_2.entry.js → justifi-billing-form_4.entry.js} +1817 -2
- package/dist/esm/justifi-business-details.entry.js +42 -56
- package/dist/esm/justifi-business-form-stepped.entry.js +5 -4
- package/dist/esm/justifi-business-form.entry.js +5 -4
- package/dist/esm/justifi-business-list.entry.js +5 -4
- package/dist/esm/justifi-business-owners.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +1 -1
- package/dist/esm/justifi-checkout-core.entry.js +91 -0
- package/dist/esm/justifi-checkout.entry.js +95 -0
- package/dist/esm/justifi-details.entry.js +2 -2
- package/dist/esm/justifi-gross-payment-chart.entry.js +39 -11008
- package/dist/esm/justifi-new-payment-method_3.entry.js +162 -0
- package/dist/esm/justifi-payment-balance-transactions.entry.js +4 -3
- package/dist/esm/justifi-payment-details.entry.js +5 -4
- package/dist/esm/justifi-payment-form.entry.js +4 -3
- package/dist/esm/{justifi-billing-form_2.entry.js → justifi-payment-method-selector.entry.js} +4 -78
- package/dist/esm/justifi-payments-list.entry.js +5 -4
- package/dist/esm/justifi-payout-details.entry.js +5 -4
- package/dist/esm/justifi-payouts-list.entry.js +5 -4
- package/dist/esm/justifi-proceeds-list.entry.js +4 -3
- package/dist/esm/justifi-refund-form.entry.js +3 -2
- package/dist/esm/justifi-subaccount-details.entry.js +6 -5
- package/dist/esm/justifi-subaccounts-list.entry.js +5 -4
- package/dist/esm/justifi-table_2.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/payment-details-core.entry.js +10 -4
- package/dist/esm/{payment.service-bea02ccf.js → payment.service-f274ef98.js} +2 -1
- package/dist/esm/payments-list-core.entry.js +4 -3
- package/dist/esm/payout-details-core.entry.js +4 -4
- package/dist/esm/{payout.service-92e56814.js → payout.service-af293f61.js} +2 -1
- package/dist/esm/payouts-list-core.entry.js +4 -3
- package/dist/esm/subaccount-account-details_4.entry.js +7 -7
- package/dist/esm/subaccount-bank-details.entry.js +3 -3
- package/dist/esm/subaccount-terms-details.entry.js +3 -3
- package/dist/esm/{utils-76a93600.js → utils-5193fcd7.js} +10 -3
- package/dist/esm/{utils-576874df.js → utils-a3e96d9f.js} +5 -5
- package/dist/esm/webcomponents.js +3 -3
- package/dist/module/Business.js +6 -7
- package/dist/module/Payment.js +138 -0
- package/dist/module/Payout.js +1 -138
- package/dist/module/SubAccount.js +1 -1
- package/dist/module/additional-questions-details2.js +5 -2
- package/dist/module/billing-form.js +1 -2
- package/dist/module/business-details-core.d.ts +11 -0
- package/dist/module/business-details-core.js +6 -0
- package/dist/module/business-details-core2.js +101 -0
- package/dist/module/checkout-core.js +163 -0
- package/dist/module/generic-info-details2.js +4 -2
- package/dist/module/gross-payment-chart-core.d.ts +11 -0
- package/dist/module/gross-payment-chart-core.js +6 -0
- package/dist/module/gross-payment-chart-core2.js +11055 -0
- package/dist/module/justifi-business-details.js +51 -60
- package/dist/module/justifi-business-form-stepped.js +1 -0
- package/dist/module/justifi-business-form.js +1 -0
- package/dist/module/justifi-business-list.js +2 -1
- package/dist/module/justifi-checkout-core.d.ts +11 -0
- package/dist/module/justifi-checkout-core.js +6 -0
- package/dist/module/justifi-checkout.d.ts +11 -0
- package/dist/module/justifi-checkout.js +172 -0
- package/dist/module/justifi-gross-payment-chart.js +49 -11016
- package/dist/module/justifi-new-payment-method.d.ts +11 -0
- package/dist/module/justifi-new-payment-method.js +6 -0
- package/dist/module/justifi-payment-balance-transactions.js +3 -2
- package/dist/module/justifi-payment-details.js +2 -1
- package/dist/module/justifi-payment-form.js +2 -1
- package/dist/module/justifi-payment-method-options.d.ts +11 -0
- package/dist/module/justifi-payment-method-options.js +6 -0
- package/dist/module/justifi-payments-list.js +2 -1
- package/dist/module/justifi-payout-details.js +2 -1
- package/dist/module/justifi-payouts-list.js +2 -1
- package/dist/module/justifi-proceeds-list.js +2 -1
- package/dist/module/justifi-refund-form.js +1 -0
- package/dist/module/justifi-saved-payment-method.d.ts +11 -0
- package/dist/module/justifi-saved-payment-method.js +6 -0
- package/dist/module/justifi-subaccount-details.js +2 -1
- package/dist/module/justifi-subaccounts-list.js +2 -1
- package/dist/module/legal-address-details2.js +5 -2
- package/dist/module/new-payment-method.js +105 -0
- package/dist/module/owner-details2.js +10 -4
- package/dist/module/payment-details-core2.js +9 -3
- package/dist/module/payment-method-form.js +3 -2
- package/dist/module/payment-method-options.js +128 -0
- package/dist/module/payment-method-selector.js +2 -1
- package/dist/module/payment.service.js +1 -0
- package/dist/module/payments-list-core2.js +2 -1
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payout.service.js +1 -0
- package/dist/module/payouts-list-core2.js +3 -2
- package/dist/module/representative-details2.js +5 -3
- package/dist/module/saved-payment-method.js +66 -0
- package/dist/module/subaccount-account-details2.js +2 -2
- package/dist/module/subaccount-bank-details.js +2 -2
- package/dist/module/subaccount-merchant-details2.js +3 -3
- package/dist/module/subaccount-owners-details2.js +2 -2
- package/dist/module/subaccount-representative-details2.js +2 -2
- package/dist/module/subaccount-terms-details.js +2 -2
- package/dist/module/utils.js +4 -4
- package/dist/module/utils2.js +10 -3
- package/dist/types/api/Api.d.ts +1 -1
- package/dist/types/api/Checkout.d.ts +14 -0
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/services/business.service.d.ts +8 -0
- package/dist/types/api/services/checkout.service.d.ts +9 -0
- package/dist/types/api/services/reports.service.d.ts +5 -0
- package/dist/types/components/billing-form/billing-form.d.ts +0 -1
- package/dist/types/components/business-details/business-details-core.d.ts +16 -0
- package/dist/types/components/business-details/business-details.d.ts +3 -13
- package/dist/types/components/business-details/get-business.d.ts +8 -0
- package/dist/types/components/business-details/owner-details/owner-details.d.ts +0 -8
- package/dist/types/components/checkout/checkout-actions.d.ts +17 -0
- package/dist/types/components/checkout/checkout-core.d.ts +28 -0
- package/dist/types/components/checkout/checkout.d.ts +12 -0
- package/dist/types/components/checkout/new-payment-method.d.ts +17 -0
- package/dist/types/components/checkout/payment-method-option-utils.d.ts +16 -0
- package/dist/types/components/checkout/payment-method-options.d.ts +18 -0
- package/dist/types/components/checkout/saved-payment-method.d.ts +11 -0
- package/dist/types/components/checkout/test/checkout.d.ts +1 -0
- package/dist/types/components/checkout/test/mockCheckout.d.ts +19 -0
- package/dist/types/components/details/utils.d.ts +1 -1
- package/dist/types/components/gross-payment-chart/get-gross-payment-chart-data.d.ts +11 -0
- package/dist/types/components/gross-payment-chart/gross-payment-chart-core.d.ts +18 -0
- package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +4 -14
- package/dist/types/components/payment-details/payment-details.d.ts +0 -1
- package/dist/types/components/payment-method-form/payment-method-responses.d.ts +3 -9
- package/dist/types/components.d.ts +217 -32
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/webcomponents/p-018b71f5.entry.js +1 -0
- package/dist/webcomponents/p-0923e39c.js +1 -0
- package/dist/webcomponents/{p-7a1a06c0.entry.js → p-09b94d22.entry.js} +1 -1
- package/dist/webcomponents/p-1b04d091.entry.js +1 -0
- package/dist/webcomponents/{p-0a0cf2e6.entry.js → p-1bac1674.entry.js} +1 -1
- package/dist/webcomponents/p-1cbdca15.entry.js +1 -0
- package/dist/webcomponents/p-3134ab82.entry.js +1 -0
- package/dist/webcomponents/{p-22c1acd6.js → p-34f9fe6b.js} +1 -1
- package/dist/webcomponents/p-3bae0ed3.entry.js +1 -0
- package/dist/webcomponents/p-41031759.entry.js +1 -0
- package/dist/webcomponents/p-41490d96.entry.js +1 -0
- package/dist/webcomponents/p-44b88365.entry.js +1 -0
- package/dist/webcomponents/{p-081cf5f6.entry.js → p-4ed3a9f5.entry.js} +1 -1
- package/dist/webcomponents/{p-6478f3ca.js → p-4edd9721.js} +1 -1
- package/dist/webcomponents/p-51b0bf2a.entry.js +1 -0
- package/dist/webcomponents/p-531844f6.entry.js +1 -0
- package/dist/webcomponents/{p-4fa27a28.entry.js → p-591e29bf.entry.js} +1 -1
- package/dist/webcomponents/p-5d5d7550.entry.js +1 -0
- package/dist/webcomponents/{p-810b72b5.js → p-5ea274b8.js} +1 -1
- package/dist/webcomponents/{p-4ba2c711.entry.js → p-5f785ede.entry.js} +1 -1
- package/dist/webcomponents/p-63296409.js +1 -0
- package/dist/webcomponents/{p-4f14df36.js → p-6d05174c.js} +1 -1
- package/dist/webcomponents/p-72d1ad98.entry.js +1 -0
- package/dist/webcomponents/{p-40349ffc.entry.js → p-796cf44f.entry.js} +1 -1
- package/dist/webcomponents/p-79f99d62.entry.js +1 -0
- package/dist/webcomponents/p-7b2cddc7.js +1 -0
- package/dist/webcomponents/{p-7c0f91fa.entry.js → p-7cd06ada.entry.js} +1 -1
- package/dist/webcomponents/p-8f895ec3.entry.js +1 -0
- package/dist/webcomponents/p-92a55427.entry.js +1 -0
- package/dist/webcomponents/p-97c42345.entry.js +1 -0
- package/dist/webcomponents/p-99a8b7d0.entry.js +1 -0
- package/dist/webcomponents/p-9a63eec9.entry.js +1 -0
- package/dist/webcomponents/p-9c310f5c.entry.js +1 -0
- package/dist/webcomponents/p-9e3771b7.entry.js +19 -0
- package/dist/webcomponents/{p-6d0725ef.entry.js → p-a81229a5.entry.js} +1 -1
- package/dist/webcomponents/{p-234bc840.entry.js → p-adc96df1.entry.js} +1 -1
- package/dist/webcomponents/p-baafa7f5.js +1 -0
- package/dist/webcomponents/p-babd292f.entry.js +1 -0
- package/dist/webcomponents/{p-5c0310ee.js → p-bb037696.js} +1 -1
- package/dist/webcomponents/p-bb7f6095.entry.js +1 -0
- package/dist/webcomponents/p-c032b216.entry.js +1 -0
- package/dist/webcomponents/{p-08833966.entry.js → p-c2c3d5d1.entry.js} +1 -1
- package/dist/webcomponents/p-c8d51336.entry.js +1 -0
- package/dist/webcomponents/{p-4c01df65.entry.js → p-dc05b5c5.entry.js} +1 -1
- package/dist/webcomponents/p-e3fab0e2.js +1 -0
- package/dist/webcomponents/p-e536a4c1.entry.js +1 -0
- package/dist/webcomponents/p-ec358d69.entry.js +1 -0
- package/dist/webcomponents/p-f55ac955.entry.js +1 -0
- package/dist/webcomponents/p-f64a85cf.entry.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +3 -2
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +0 -1747
- package/dist/esm/justifi-payment-method-form.entry.js +0 -1743
- package/dist/webcomponents/p-0bc8b02e.entry.js +0 -1
- package/dist/webcomponents/p-112acd3c.entry.js +0 -1
- package/dist/webcomponents/p-1555e6b1.js +0 -1
- package/dist/webcomponents/p-16f41fd0.entry.js +0 -1
- package/dist/webcomponents/p-17715325.js +0 -1
- package/dist/webcomponents/p-3a4d4869.entry.js +0 -1
- package/dist/webcomponents/p-3cb0b96d.js +0 -1
- package/dist/webcomponents/p-5422a24b.entry.js +0 -1
- package/dist/webcomponents/p-578e0a05.entry.js +0 -1
- package/dist/webcomponents/p-640d90dc.entry.js +0 -1
- package/dist/webcomponents/p-663bfe87.js +0 -1
- package/dist/webcomponents/p-696396c7.entry.js +0 -1
- package/dist/webcomponents/p-6ab67031.entry.js +0 -1
- package/dist/webcomponents/p-8516d602.entry.js +0 -1
- package/dist/webcomponents/p-894a7475.entry.js +0 -19
- package/dist/webcomponents/p-94ebfafb.entry.js +0 -1
- package/dist/webcomponents/p-9cb3ff78.entry.js +0 -1
- package/dist/webcomponents/p-9e81808f.entry.js +0 -1
- package/dist/webcomponents/p-a432110c.entry.js +0 -1
- package/dist/webcomponents/p-b1881723.entry.js +0 -1
- package/dist/webcomponents/p-b5aba473.entry.js +0 -1
- package/dist/webcomponents/p-bd099662.entry.js +0 -1
- package/dist/webcomponents/p-bfd917b8.entry.js +0 -1
- package/dist/webcomponents/p-c90fa055.entry.js +0 -1
- package/dist/webcomponents/p-ebb91944.entry.js +0 -1
- package/dist/webcomponents/p-ec4f27e7.entry.js +0 -1
- package/dist/webcomponents/p-fa495a43.entry.js +0 -1
|
@@ -1,4 +1,1819 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, h, H as Host, c as createEvent } from './index-fb5ca346.js';
|
|
2
|
+
import { c as create$3, a as create$6 } from './index.esm-22b47398.js';
|
|
3
|
+
import { S as StateOptions } from './state-options-fc1daf67.js';
|
|
4
|
+
import { m as composeQueryParams } from './utils-5193fcd7.js';
|
|
5
|
+
|
|
6
|
+
const RegExZip = /^\d{5}/;
|
|
7
|
+
const BillingFormSchema = create$3({
|
|
8
|
+
name: create$6().required('Enter name'),
|
|
9
|
+
address_line1: create$6().required('Enter street address'),
|
|
10
|
+
address_line2: create$6(),
|
|
11
|
+
address_city: create$6().required('Enter city'),
|
|
12
|
+
address_state: create$6().required('Choose state'),
|
|
13
|
+
address_postal_code: create$6().required('Enter ZIP').matches(RegExZip, 'Enter a valid ZIP').min(5, 'Enter a valid ZIP'),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const billingFormCss = ":root,[data-bs-theme=light]{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13, 110, 253;--bs-secondary-rgb:108, 117, 125;--bs-success-rgb:25, 135, 84;--bs-info-rgb:13, 202, 240;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:220, 53, 69;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-font-sans-serif:system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33, 37, 41;--bs-body-bg:#fff;--bs-body-bg-rgb:255, 255, 255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0, 0, 0;--bs-secondary-color:rgba(33, 37, 41, 0.75);--bs-secondary-color-rgb:33, 37, 41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233, 236, 239;--bs-tertiary-color:rgba(33, 37, 41, 0.5);--bs-tertiary-color-rgb:33, 37, 41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248, 249, 250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13, 110, 253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10, 88, 202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width:0.25rem;--bs-focus-ring-opacity:0.25;--bs-focus-ring-color:rgba(13, 110, 253, 0.25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color:#dee2e6;--bs-body-color-rgb:222, 226, 230;--bs-body-bg:#212529;--bs-body-bg-rgb:33, 37, 41;--bs-emphasis-color:#fff;--bs-emphasis-color-rgb:255, 255, 255;--bs-secondary-color:rgba(222, 226, 230, 0.75);--bs-secondary-color-rgb:222, 226, 230;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52, 58, 64;--bs-tertiary-color:rgba(222, 226, 230, 0.5);--bs-tertiary-color-rgb:222, 226, 230;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43, 48, 53;--bs-primary-text-emphasis:#6ea8fe;--bs-secondary-text-emphasis:#a7acb1;--bs-success-text-emphasis:#75b798;--bs-info-text-emphasis:#6edff6;--bs-warning-text-emphasis:#ffda6a;--bs-danger-text-emphasis:#ea868f;--bs-light-text-emphasis:#f8f9fa;--bs-dark-text-emphasis:#dee2e6;--bs-primary-bg-subtle:#031633;--bs-secondary-bg-subtle:#161719;--bs-success-bg-subtle:#051b11;--bs-info-bg-subtle:#032830;--bs-warning-bg-subtle:#332701;--bs-danger-bg-subtle:#2c0b0e;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#084298;--bs-secondary-border-subtle:#41464b;--bs-success-border-subtle:#0f5132;--bs-info-border-subtle:#087990;--bs-warning-border-subtle:#997404;--bs-danger-border-subtle:#842029;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:inherit;--bs-link-color:#6ea8fe;--bs-link-hover-color:#8bb9fe;--bs-link-color-rgb:110, 168, 254;--bs-link-hover-color-rgb:139, 185, 254;--bs-code-color:#e685b5;--bs-highlight-color:#dee2e6;--bs-highlight-bg:#664d03;--bs-border-color:#495057;--bs-border-color-translucent:rgba(255, 255, 255, 0.15);--bs-form-valid-color:#75b798;--bs-form-valid-border-color:#75b798;--bs-form-invalid-color:#ea868f;--bs-form-invalid-border-color:#ea868f}.spinner-grow,.spinner-border{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg) }}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion: reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.clearfix::after{display:block;clear:both;content:\"\"}.text-bg-primary{color:#fff !important;background-color:RGBA(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-secondary{color:#fff !important;background-color:RGBA(var(--bs-secondary-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-success{color:#fff !important;background-color:RGBA(var(--bs-success-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-info{color:#000 !important;background-color:RGBA(var(--bs-info-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-warning{color:#000 !important;background-color:RGBA(var(--bs-warning-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-danger{color:#fff !important;background-color:RGBA(var(--bs-danger-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-light{color:#000 !important;background-color:RGBA(var(--bs-light-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-dark{color:#fff !important;background-color:RGBA(var(--bs-dark-rgb), var(--bs-bg-opacity, 1)) !important}.link-primary{color:RGBA(var(--bs-primary-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-primary-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-primary:hover,.link-primary:focus{color:RGBA(10, 88, 202, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(10, 88, 202, var(--bs-link-underline-opacity, 1)) !important}.link-secondary{color:RGBA(var(--bs-secondary-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-secondary-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-secondary:hover,.link-secondary:focus{color:RGBA(86, 94, 100, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(86, 94, 100, var(--bs-link-underline-opacity, 1)) !important}.link-success{color:RGBA(var(--bs-success-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-success-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-success:hover,.link-success:focus{color:RGBA(20, 108, 67, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(20, 108, 67, var(--bs-link-underline-opacity, 1)) !important}.link-info{color:RGBA(var(--bs-info-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-info-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-info:hover,.link-info:focus{color:RGBA(61, 213, 243, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(61, 213, 243, var(--bs-link-underline-opacity, 1)) !important}.link-warning{color:RGBA(var(--bs-warning-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-warning-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-warning:hover,.link-warning:focus{color:RGBA(255, 205, 57, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(255, 205, 57, var(--bs-link-underline-opacity, 1)) !important}.link-danger{color:RGBA(var(--bs-danger-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-danger-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-danger:hover,.link-danger:focus{color:RGBA(176, 42, 55, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(176, 42, 55, var(--bs-link-underline-opacity, 1)) !important}.link-light{color:RGBA(var(--bs-light-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-light-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-light:hover,.link-light:focus{color:RGBA(249, 250, 251, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(249, 250, 251, var(--bs-link-underline-opacity, 1)) !important}.link-dark{color:RGBA(var(--bs-dark-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-dark-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-dark:hover,.link-dark:focus{color:RGBA(26, 30, 33, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(26, 30, 33, var(--bs-link-underline-opacity, 1)) !important}.link-body-emphasis{color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-body-emphasis:hover,.link-body-emphasis:focus{color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-opacity, 0.75)) !important;text-decoration-color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-underline-opacity, 0.75)) !important}.focus-ring:focus{outline:0;box-shadow:var(--bs-focus-ring-x, 0) var(--bs-focus-ring-y, 0) var(--bs-focus-ring-blur, 0) var(--bs-focus-ring-width) var(--bs-focus-ring-color)}.icon-link{display:inline-flex;gap:0.375rem;align-items:center;text-decoration-color:rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 0.5));text-underline-offset:0.25em;backface-visibility:hidden}.icon-link>.bi{flex-shrink:0;width:1em;height:1em;fill:currentcolor;transition:0.2s ease-in-out transform}@media (prefers-reduced-motion: reduce){.icon-link>.bi{transition:none}}.icon-link-hover:hover>.bi,.icon-link-hover:focus-visible>.bi{transform:var(--bs-icon-link-transform, translate3d(0.25em, 0, 0))}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:\"\"}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:sticky;top:0;z-index:1020}.sticky-bottom{position:sticky;bottom:0;z-index:1020}@media (min-width: 576px){.sticky-sm-top{position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 768px){.sticky-md-top{position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 992px){.sticky-lg-top{position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 1200px){.sticky-xl-top{position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 1400px){.sticky-xxl-top{position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:sticky;bottom:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption),.visually-hidden-focusable:not(:focus):not(:focus-within):not(caption){position:absolute !important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:\"\"}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:var(--bs-border-width);min-height:1em;background-color:currentcolor;opacity:0.25}*,*::before,*::after{box-sizing:border-box}@media (prefers-reduced-motion: no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}hr{margin:1rem 0;color:inherit;border:0;border-top:var(--bs-border-width) solid;opacity:0.25}h6,h5,h4,h3,h2,h1{margin-top:0;margin-bottom:0.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color)}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width: 1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + 0.9vw)}@media (min-width: 1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + 0.6vw)}@media (min-width: 1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + 0.3vw)}@media (min-width: 1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{text-decoration:underline dotted;cursor:help;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}ol,ul,dl{margin-top:0;margin-bottom:1rem}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:0.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:0.875em}mark{padding:0.1875em;color:var(--bs-highlight-color);background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:0.75em;line-height:0;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}a{color:rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));text-decoration:underline}a:hover{--bs-link-color-rgb:var(--bs-link-hover-color-rgb)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}pre,code,kbd,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:0.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:0.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:0.1875rem 0.375rem;font-size:0.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:0.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:0.5rem;padding-bottom:0.5rem;color:var(--bs-secondary-color);text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}thead,tbody,tfoot,tr,td,th{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}input,button,select,optgroup,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none !important}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button:not(:disabled),[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:0.5rem;font-size:calc(1.275rem + 0.3vw);line-height:inherit}@media (min-width: 1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-text,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none !important}:root{--bs-breakpoint-xs:0;--bs-breakpoint-sm:576px;--bs-breakpoint-md:768px;--bs-breakpoint-lg:992px;--bs-breakpoint-xl:1200px;--bs-breakpoint-xxl:1400px}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-0.5 * var(--bs-gutter-x));margin-left:calc(-0.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * 0.5);padding-left:calc(var(--bs-gutter-x) * 0.5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.66666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width: 576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.66666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width: 768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.66666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width: 992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.66666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width: 1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.66666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width: 1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.66666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}:host{font-family:system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;display:block}justifi-billing-form{margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}";
|
|
17
|
+
|
|
18
|
+
const BillingForm = class {
|
|
19
|
+
constructor(hostRef) {
|
|
20
|
+
registerInstance(this, hostRef);
|
|
21
|
+
this.legend = undefined;
|
|
22
|
+
this.billingFields = {
|
|
23
|
+
name: '',
|
|
24
|
+
address_line1: '',
|
|
25
|
+
address_line2: '',
|
|
26
|
+
address_city: '',
|
|
27
|
+
address_state: '',
|
|
28
|
+
address_postal_code: '',
|
|
29
|
+
};
|
|
30
|
+
this.billingFieldsErrors = {};
|
|
31
|
+
}
|
|
32
|
+
setFormValue(event) {
|
|
33
|
+
const data = event.detail;
|
|
34
|
+
const billingFieldsClone = Object.assign({}, this.billingFields);
|
|
35
|
+
if (data.name) {
|
|
36
|
+
billingFieldsClone[data.name] = data.value;
|
|
37
|
+
this.billingFields = billingFieldsClone;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Method for filling the form with provided data
|
|
42
|
+
* @argument {BillingFormFields} fields - The fields to fill the form with
|
|
43
|
+
*/
|
|
44
|
+
async fill(fields) {
|
|
45
|
+
this.billingFields = Object.assign({}, fields);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Run validation on the form
|
|
49
|
+
*/
|
|
50
|
+
async validate() {
|
|
51
|
+
const newErrors = {};
|
|
52
|
+
let isValid = true;
|
|
53
|
+
try {
|
|
54
|
+
await BillingFormSchema.validate(this.billingFields, { abortEarly: false });
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
isValid = false;
|
|
58
|
+
err.inner.map((item) => {
|
|
59
|
+
newErrors[item.path] = item.message;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
this.billingFieldsErrors = newErrors;
|
|
63
|
+
return { isValid: isValid };
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Returns the values of the form as an object
|
|
67
|
+
* @returns {Promise<BillingFormFields>} The values of the form
|
|
68
|
+
*/
|
|
69
|
+
async getValues() {
|
|
70
|
+
return this.billingFields;
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("fieldset", null, this.legend && h("legend", null, this.legend), h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("text-input", { name: "name", label: "Full Name", defaultValue: this.billingFields.name, error: this.billingFieldsErrors.name })), h("div", { class: "col-12" }, h("text-input", { name: "address_line1", label: "Street Address", defaultValue: this.billingFields.address_line1, error: this.billingFieldsErrors.address_line1 })), h("div", { class: "col-12" }, h("text-input", { name: "address_line2", label: "Apartment, Suite, etc. (optional)", defaultValue: this.billingFields.address_line2, error: this.billingFieldsErrors.address_line2 })), h("div", { class: "col-12" }, h("text-input", { name: "address_city", label: "City", defaultValue: this.billingFields.address_city, error: this.billingFieldsErrors.address_city })), h("div", { class: "col-12" }, h("select-input", { name: "address_state", label: "State", options: StateOptions, defaultValue: this.billingFields.address_state, error: this.billingFieldsErrors.address_state })), h("div", { class: "col-12" }, h("text-input", { name: "address_postal_code", label: "ZIP", defaultValue: this.billingFields.address_postal_code, error: this.billingFieldsErrors.address_postal_code }))))));
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
BillingForm.style = billingFormCss;
|
|
77
|
+
|
|
78
|
+
function createCommonjsModule(fn, basedir, module) {
|
|
79
|
+
return module = {
|
|
80
|
+
path: basedir,
|
|
81
|
+
exports: {},
|
|
82
|
+
require: function (path, base) {
|
|
83
|
+
return commonjsRequire();
|
|
84
|
+
}
|
|
85
|
+
}, fn(module, module.exports), module.exports;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function commonjsRequire () {
|
|
89
|
+
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
var iframeResizer = createCommonjsModule(function (module) {
|
|
93
|
+
(function (undefined$1) {
|
|
94
|
+
if (typeof window === 'undefined') return // don't run for server side render
|
|
95
|
+
|
|
96
|
+
var count = 0,
|
|
97
|
+
logEnabled = false,
|
|
98
|
+
hiddenCheckEnabled = false,
|
|
99
|
+
msgHeader = 'message',
|
|
100
|
+
msgHeaderLen = msgHeader.length,
|
|
101
|
+
msgId = '[iFrameSizer]', // Must match iframe msg ID
|
|
102
|
+
msgIdLen = msgId.length,
|
|
103
|
+
pagePosition = null,
|
|
104
|
+
requestAnimationFrame = window.requestAnimationFrame,
|
|
105
|
+
resetRequiredMethods = Object.freeze({
|
|
106
|
+
max: 1,
|
|
107
|
+
scroll: 1,
|
|
108
|
+
bodyScroll: 1,
|
|
109
|
+
documentElementScroll: 1
|
|
110
|
+
}),
|
|
111
|
+
settings = {},
|
|
112
|
+
timer = null,
|
|
113
|
+
defaults = Object.freeze({
|
|
114
|
+
autoResize: true,
|
|
115
|
+
bodyBackground: null,
|
|
116
|
+
bodyMargin: null,
|
|
117
|
+
bodyMarginV1: 8,
|
|
118
|
+
bodyPadding: null,
|
|
119
|
+
checkOrigin: true,
|
|
120
|
+
inPageLinks: false,
|
|
121
|
+
enablePublicMethods: true,
|
|
122
|
+
heightCalculationMethod: 'bodyOffset',
|
|
123
|
+
id: 'iFrameResizer',
|
|
124
|
+
interval: 32,
|
|
125
|
+
log: false,
|
|
126
|
+
maxHeight: Infinity,
|
|
127
|
+
maxWidth: Infinity,
|
|
128
|
+
minHeight: 0,
|
|
129
|
+
minWidth: 0,
|
|
130
|
+
mouseEvents: true,
|
|
131
|
+
resizeFrom: 'parent',
|
|
132
|
+
scrolling: false,
|
|
133
|
+
sizeHeight: true,
|
|
134
|
+
sizeWidth: false,
|
|
135
|
+
warningTimeout: 5000,
|
|
136
|
+
tolerance: 0,
|
|
137
|
+
widthCalculationMethod: 'scroll',
|
|
138
|
+
onClose: function () {
|
|
139
|
+
return true
|
|
140
|
+
},
|
|
141
|
+
onClosed: function () {},
|
|
142
|
+
onInit: function () {},
|
|
143
|
+
onMessage: function () {
|
|
144
|
+
warn('onMessage function not defined');
|
|
145
|
+
},
|
|
146
|
+
onMouseEnter: function () {},
|
|
147
|
+
onMouseLeave: function () {},
|
|
148
|
+
onResized: function () {},
|
|
149
|
+
onScroll: function () {
|
|
150
|
+
return true
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
function getMutationObserver() {
|
|
155
|
+
return (
|
|
156
|
+
window.MutationObserver ||
|
|
157
|
+
window.WebKitMutationObserver ||
|
|
158
|
+
window.MozMutationObserver
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function addEventListener(el, evt, func) {
|
|
163
|
+
el.addEventListener(evt, func, false);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function removeEventListener(el, evt, func) {
|
|
167
|
+
el.removeEventListener(evt, func, false);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function setupRequestAnimationFrame() {
|
|
171
|
+
var vendors = ['moz', 'webkit', 'o', 'ms'];
|
|
172
|
+
var x;
|
|
173
|
+
|
|
174
|
+
// Remove vendor prefixing if prefixed and break early if not
|
|
175
|
+
for (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {
|
|
176
|
+
requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (requestAnimationFrame) {
|
|
180
|
+
// Firefox extension content-scripts have a globalThis object that is not the same as window.
|
|
181
|
+
// Binding `requestAnimationFrame` to window allows the function to work and prevents errors
|
|
182
|
+
// being thrown when run in that context, and should be a no-op in every other context.
|
|
183
|
+
requestAnimationFrame = requestAnimationFrame.bind(window);
|
|
184
|
+
} else {
|
|
185
|
+
log('setup', 'RequestAnimationFrame not supported');
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function getMyID(iframeId) {
|
|
190
|
+
var retStr = 'Host page: ' + iframeId;
|
|
191
|
+
|
|
192
|
+
if (window.top !== window.self) {
|
|
193
|
+
retStr =
|
|
194
|
+
window.parentIFrame && window.parentIFrame.getId
|
|
195
|
+
? window.parentIFrame.getId() + ': ' + iframeId
|
|
196
|
+
: 'Nested host page: ' + iframeId;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return retStr
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function formatLogHeader(iframeId) {
|
|
203
|
+
return msgId + '[' + getMyID(iframeId) + ']'
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function isLogEnabled(iframeId) {
|
|
207
|
+
return settings[iframeId] ? settings[iframeId].log : logEnabled
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function log(iframeId, msg) {
|
|
211
|
+
output('log', iframeId, msg, isLogEnabled(iframeId));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function info(iframeId, msg) {
|
|
215
|
+
output('info', iframeId, msg, isLogEnabled(iframeId));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function warn(iframeId, msg) {
|
|
219
|
+
output('warn', iframeId, msg, true);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function output(type, iframeId, msg, enabled) {
|
|
223
|
+
if (true === enabled && 'object' === typeof window.console) {
|
|
224
|
+
// eslint-disable-next-line no-console
|
|
225
|
+
console[type](formatLogHeader(iframeId), msg);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function iFrameListener(event) {
|
|
230
|
+
function resizeIFrame() {
|
|
231
|
+
function resize() {
|
|
232
|
+
setSize(messageData);
|
|
233
|
+
setPagePosition(iframeId);
|
|
234
|
+
on('onResized', messageData);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
ensureInRange('Height');
|
|
238
|
+
ensureInRange('Width');
|
|
239
|
+
|
|
240
|
+
syncResize(resize, messageData, 'init');
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function processMsg() {
|
|
244
|
+
var data = msg.slice(msgIdLen).split(':');
|
|
245
|
+
var height = data[1] ? parseInt(data[1], 10) : 0;
|
|
246
|
+
var iframe = settings[data[0]] && settings[data[0]].iframe;
|
|
247
|
+
var compStyle = getComputedStyle(iframe);
|
|
248
|
+
|
|
249
|
+
return {
|
|
250
|
+
iframe: iframe,
|
|
251
|
+
id: data[0],
|
|
252
|
+
height: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),
|
|
253
|
+
width: data[2],
|
|
254
|
+
type: data[3]
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function getPaddingEnds(compStyle) {
|
|
259
|
+
if (compStyle.boxSizing !== 'border-box') {
|
|
260
|
+
return 0
|
|
261
|
+
}
|
|
262
|
+
var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0;
|
|
263
|
+
var bot = compStyle.paddingBottom
|
|
264
|
+
? parseInt(compStyle.paddingBottom, 10)
|
|
265
|
+
: 0;
|
|
266
|
+
return top + bot
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
function getBorderEnds(compStyle) {
|
|
270
|
+
if (compStyle.boxSizing !== 'border-box') {
|
|
271
|
+
return 0
|
|
272
|
+
}
|
|
273
|
+
var top = compStyle.borderTopWidth
|
|
274
|
+
? parseInt(compStyle.borderTopWidth, 10)
|
|
275
|
+
: 0;
|
|
276
|
+
var bot = compStyle.borderBottomWidth
|
|
277
|
+
? parseInt(compStyle.borderBottomWidth, 10)
|
|
278
|
+
: 0;
|
|
279
|
+
return top + bot
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function ensureInRange(Dimension) {
|
|
283
|
+
var max = Number(settings[iframeId]['max' + Dimension]),
|
|
284
|
+
min = Number(settings[iframeId]['min' + Dimension]),
|
|
285
|
+
dimension = Dimension.toLowerCase(),
|
|
286
|
+
size = Number(messageData[dimension]);
|
|
287
|
+
|
|
288
|
+
log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max);
|
|
289
|
+
|
|
290
|
+
if (size < min) {
|
|
291
|
+
size = min;
|
|
292
|
+
log(iframeId, 'Set ' + dimension + ' to min value');
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (size > max) {
|
|
296
|
+
size = max;
|
|
297
|
+
log(iframeId, 'Set ' + dimension + ' to max value');
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
messageData[dimension] = '' + size;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function isMessageFromIFrame() {
|
|
304
|
+
function checkAllowedOrigin() {
|
|
305
|
+
function checkList() {
|
|
306
|
+
var i = 0,
|
|
307
|
+
retCode = false;
|
|
308
|
+
|
|
309
|
+
log(
|
|
310
|
+
iframeId,
|
|
311
|
+
'Checking connection is from allowed list of origins: ' +
|
|
312
|
+
checkOrigin
|
|
313
|
+
);
|
|
314
|
+
|
|
315
|
+
for (; i < checkOrigin.length; i++) {
|
|
316
|
+
if (checkOrigin[i] === origin) {
|
|
317
|
+
retCode = true;
|
|
318
|
+
break
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
return retCode
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function checkSingle() {
|
|
325
|
+
var remoteHost = settings[iframeId] && settings[iframeId].remoteHost;
|
|
326
|
+
log(iframeId, 'Checking connection is from: ' + remoteHost);
|
|
327
|
+
return origin === remoteHost
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
return checkOrigin.constructor === Array ? checkList() : checkSingle()
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
var origin = event.origin,
|
|
334
|
+
checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin;
|
|
335
|
+
|
|
336
|
+
if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {
|
|
337
|
+
throw new Error(
|
|
338
|
+
'Unexpected message received from: ' +
|
|
339
|
+
origin +
|
|
340
|
+
' for ' +
|
|
341
|
+
messageData.iframe.id +
|
|
342
|
+
'. Message was: ' +
|
|
343
|
+
event.data +
|
|
344
|
+
'. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'
|
|
345
|
+
)
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return true
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
function isMessageForUs() {
|
|
352
|
+
return (
|
|
353
|
+
msgId === ('' + msg).slice(0, msgIdLen) &&
|
|
354
|
+
msg.slice(msgIdLen).split(':')[0] in settings
|
|
355
|
+
) // ''+Protects against non-string msg
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function isMessageFromMetaParent() {
|
|
359
|
+
// Test if this message is from a parent above us. This is an ugly test, however, updating
|
|
360
|
+
// the message format would break backwards compatibility.
|
|
361
|
+
var retCode = messageData.type in { true: 1, false: 1, undefined: 1 };
|
|
362
|
+
|
|
363
|
+
if (retCode) {
|
|
364
|
+
log(iframeId, 'Ignoring init message from meta parent page');
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
return retCode
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
function getMsgBody(offset) {
|
|
371
|
+
return msg.slice(msg.indexOf(':') + msgHeaderLen + offset)
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
function forwardMsgFromIFrame(msgBody) {
|
|
375
|
+
log(
|
|
376
|
+
iframeId,
|
|
377
|
+
'onMessage passed: {iframe: ' +
|
|
378
|
+
messageData.iframe.id +
|
|
379
|
+
', message: ' +
|
|
380
|
+
msgBody +
|
|
381
|
+
'}'
|
|
382
|
+
);
|
|
383
|
+
|
|
384
|
+
on('onMessage', {
|
|
385
|
+
iframe: messageData.iframe,
|
|
386
|
+
message: JSON.parse(msgBody)
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
log(iframeId, '--');
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
function getPageInfo() {
|
|
393
|
+
var bodyPosition = document.body.getBoundingClientRect(),
|
|
394
|
+
iFramePosition = messageData.iframe.getBoundingClientRect();
|
|
395
|
+
|
|
396
|
+
return JSON.stringify({
|
|
397
|
+
iframeHeight: iFramePosition.height,
|
|
398
|
+
iframeWidth: iFramePosition.width,
|
|
399
|
+
clientHeight: Math.max(
|
|
400
|
+
document.documentElement.clientHeight,
|
|
401
|
+
window.innerHeight || 0
|
|
402
|
+
),
|
|
403
|
+
clientWidth: Math.max(
|
|
404
|
+
document.documentElement.clientWidth,
|
|
405
|
+
window.innerWidth || 0
|
|
406
|
+
),
|
|
407
|
+
offsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),
|
|
408
|
+
offsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),
|
|
409
|
+
scrollTop: window.pageYOffset,
|
|
410
|
+
scrollLeft: window.pageXOffset,
|
|
411
|
+
documentHeight: document.documentElement.clientHeight,
|
|
412
|
+
documentWidth: document.documentElement.clientWidth,
|
|
413
|
+
windowHeight: window.innerHeight,
|
|
414
|
+
windowWidth: window.innerWidth
|
|
415
|
+
})
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function sendPageInfoToIframe(iframe, iframeId) {
|
|
419
|
+
function debouncedTrigger() {
|
|
420
|
+
trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId);
|
|
421
|
+
}
|
|
422
|
+
debounceFrameEvents(debouncedTrigger, 32, iframeId);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function startPageInfoMonitor() {
|
|
426
|
+
function setListener(type, func) {
|
|
427
|
+
function sendPageInfo() {
|
|
428
|
+
if (settings[id]) {
|
|
429
|
+
sendPageInfoToIframe(settings[id].iframe, id);
|
|
430
|
+
} else {
|
|
431
|
+
stop();
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
['scroll', 'resize'].forEach(function (evt) {
|
|
435
|
+
log(id, type + evt + ' listener for sendPageInfo');
|
|
436
|
+
func(window, evt, sendPageInfo);
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
function stop() {
|
|
441
|
+
setListener('Remove ', removeEventListener);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
function start() {
|
|
445
|
+
setListener('Add ', addEventListener);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
var id = iframeId; // Create locally scoped copy of iFrame ID
|
|
449
|
+
|
|
450
|
+
start();
|
|
451
|
+
|
|
452
|
+
if (settings[id]) {
|
|
453
|
+
settings[id].stopPageInfo = stop;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
function stopPageInfoMonitor() {
|
|
458
|
+
if (settings[iframeId] && settings[iframeId].stopPageInfo) {
|
|
459
|
+
settings[iframeId].stopPageInfo();
|
|
460
|
+
delete settings[iframeId].stopPageInfo;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
function checkIFrameExists() {
|
|
465
|
+
var retBool = true;
|
|
466
|
+
|
|
467
|
+
if (null === messageData.iframe) {
|
|
468
|
+
warn(iframeId, 'IFrame (' + messageData.id + ') not found');
|
|
469
|
+
retBool = false;
|
|
470
|
+
}
|
|
471
|
+
return retBool
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
function getElementPosition(target) {
|
|
475
|
+
var iFramePosition = target.getBoundingClientRect();
|
|
476
|
+
|
|
477
|
+
getPagePosition(iframeId);
|
|
478
|
+
|
|
479
|
+
return {
|
|
480
|
+
x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),
|
|
481
|
+
y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
function scrollRequestFromChild(addOffset) {
|
|
486
|
+
/* istanbul ignore next */ // Not testable in Karma
|
|
487
|
+
function reposition() {
|
|
488
|
+
pagePosition = newPosition;
|
|
489
|
+
scrollTo();
|
|
490
|
+
log(iframeId, '--');
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
function calcOffset() {
|
|
494
|
+
return {
|
|
495
|
+
x: Number(messageData.width) + offset.x,
|
|
496
|
+
y: Number(messageData.height) + offset.y
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
function scrollParent() {
|
|
501
|
+
if (window.parentIFrame) {
|
|
502
|
+
window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](
|
|
503
|
+
newPosition.x,
|
|
504
|
+
newPosition.y
|
|
505
|
+
);
|
|
506
|
+
} else {
|
|
507
|
+
warn(
|
|
508
|
+
iframeId,
|
|
509
|
+
'Unable to scroll to requested position, window.parentIFrame not found'
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
var offset = addOffset
|
|
515
|
+
? getElementPosition(messageData.iframe)
|
|
516
|
+
: { x: 0, y: 0 },
|
|
517
|
+
newPosition = calcOffset();
|
|
518
|
+
|
|
519
|
+
log(
|
|
520
|
+
iframeId,
|
|
521
|
+
'Reposition requested from iFrame (offset x:' +
|
|
522
|
+
offset.x +
|
|
523
|
+
' y:' +
|
|
524
|
+
offset.y +
|
|
525
|
+
')'
|
|
526
|
+
);
|
|
527
|
+
|
|
528
|
+
if (window.top === window.self) {
|
|
529
|
+
reposition();
|
|
530
|
+
} else {
|
|
531
|
+
scrollParent();
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
function scrollTo() {
|
|
536
|
+
if (false === on('onScroll', pagePosition)) {
|
|
537
|
+
unsetPagePosition();
|
|
538
|
+
} else {
|
|
539
|
+
setPagePosition(iframeId);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
function findTarget(location) {
|
|
544
|
+
function jumpToTarget() {
|
|
545
|
+
var jumpPosition = getElementPosition(target);
|
|
546
|
+
|
|
547
|
+
log(
|
|
548
|
+
iframeId,
|
|
549
|
+
'Moving to in page link (#' +
|
|
550
|
+
hash +
|
|
551
|
+
') at x: ' +
|
|
552
|
+
jumpPosition.x +
|
|
553
|
+
' y: ' +
|
|
554
|
+
jumpPosition.y
|
|
555
|
+
);
|
|
556
|
+
pagePosition = {
|
|
557
|
+
x: jumpPosition.x,
|
|
558
|
+
y: jumpPosition.y
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
scrollTo();
|
|
562
|
+
log(iframeId, '--');
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
function jumpToParent() {
|
|
566
|
+
if (window.parentIFrame) {
|
|
567
|
+
window.parentIFrame.moveToAnchor(hash);
|
|
568
|
+
} else {
|
|
569
|
+
log(
|
|
570
|
+
iframeId,
|
|
571
|
+
'In page link #' +
|
|
572
|
+
hash +
|
|
573
|
+
' not found and window.parentIFrame not found'
|
|
574
|
+
);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
var hash = location.split('#')[1] || '',
|
|
579
|
+
hashData = decodeURIComponent(hash),
|
|
580
|
+
target =
|
|
581
|
+
document.getElementById(hashData) ||
|
|
582
|
+
document.getElementsByName(hashData)[0];
|
|
583
|
+
|
|
584
|
+
if (target) {
|
|
585
|
+
jumpToTarget();
|
|
586
|
+
} else if (window.top === window.self) {
|
|
587
|
+
log(iframeId, 'In page link #' + hash + ' not found');
|
|
588
|
+
} else {
|
|
589
|
+
jumpToParent();
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
function onMouse(event) {
|
|
594
|
+
var mousePos = {};
|
|
595
|
+
|
|
596
|
+
if (Number(messageData.width) === 0 && Number(messageData.height) === 0) {
|
|
597
|
+
var data = getMsgBody(9).split(':');
|
|
598
|
+
mousePos = {
|
|
599
|
+
x: data[1],
|
|
600
|
+
y: data[0]
|
|
601
|
+
};
|
|
602
|
+
} else {
|
|
603
|
+
mousePos = {
|
|
604
|
+
x: messageData.width,
|
|
605
|
+
y: messageData.height
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
on(event, {
|
|
610
|
+
iframe: messageData.iframe,
|
|
611
|
+
screenX: Number(mousePos.x),
|
|
612
|
+
screenY: Number(mousePos.y),
|
|
613
|
+
type: messageData.type
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
function on(funcName, val) {
|
|
618
|
+
return chkEvent(iframeId, funcName, val)
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
function actionMsg() {
|
|
622
|
+
if (settings[iframeId] && settings[iframeId].firstRun) firstRun();
|
|
623
|
+
|
|
624
|
+
switch (messageData.type) {
|
|
625
|
+
case 'close': {
|
|
626
|
+
closeIFrame(messageData.iframe);
|
|
627
|
+
break
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
case 'message': {
|
|
631
|
+
forwardMsgFromIFrame(getMsgBody(6));
|
|
632
|
+
break
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
case 'mouseenter': {
|
|
636
|
+
onMouse('onMouseEnter');
|
|
637
|
+
break
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
case 'mouseleave': {
|
|
641
|
+
onMouse('onMouseLeave');
|
|
642
|
+
break
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
case 'autoResize': {
|
|
646
|
+
settings[iframeId].autoResize = JSON.parse(getMsgBody(9));
|
|
647
|
+
break
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
case 'scrollTo': {
|
|
651
|
+
scrollRequestFromChild(false);
|
|
652
|
+
break
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
case 'scrollToOffset': {
|
|
656
|
+
scrollRequestFromChild(true);
|
|
657
|
+
break
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
case 'pageInfo': {
|
|
661
|
+
sendPageInfoToIframe(
|
|
662
|
+
settings[iframeId] && settings[iframeId].iframe,
|
|
663
|
+
iframeId
|
|
664
|
+
);
|
|
665
|
+
startPageInfoMonitor();
|
|
666
|
+
break
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
case 'pageInfoStop': {
|
|
670
|
+
stopPageInfoMonitor();
|
|
671
|
+
break
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
case 'inPageLink': {
|
|
675
|
+
findTarget(getMsgBody(9));
|
|
676
|
+
break
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
case 'reset': {
|
|
680
|
+
resetIFrame(messageData);
|
|
681
|
+
break
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
case 'init': {
|
|
685
|
+
resizeIFrame();
|
|
686
|
+
on('onInit', messageData.iframe);
|
|
687
|
+
break
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
default: {
|
|
691
|
+
if (
|
|
692
|
+
Number(messageData.width) === 0 &&
|
|
693
|
+
Number(messageData.height) === 0
|
|
694
|
+
) {
|
|
695
|
+
warn(
|
|
696
|
+
'Unsupported message received (' +
|
|
697
|
+
messageData.type +
|
|
698
|
+
'), this is likely due to the iframe containing a later ' +
|
|
699
|
+
'version of iframe-resizer than the parent page'
|
|
700
|
+
);
|
|
701
|
+
} else {
|
|
702
|
+
resizeIFrame();
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
function hasSettings(iframeId) {
|
|
709
|
+
var retBool = true;
|
|
710
|
+
|
|
711
|
+
if (!settings[iframeId]) {
|
|
712
|
+
retBool = false;
|
|
713
|
+
warn(
|
|
714
|
+
messageData.type +
|
|
715
|
+
' No settings for ' +
|
|
716
|
+
iframeId +
|
|
717
|
+
'. Message was: ' +
|
|
718
|
+
msg
|
|
719
|
+
);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
return retBool
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
function iFrameReadyMsgReceived() {
|
|
726
|
+
// eslint-disable-next-line no-restricted-syntax, guard-for-in
|
|
727
|
+
for (var iframeId in settings) {
|
|
728
|
+
trigger(
|
|
729
|
+
'iFrame requested init',
|
|
730
|
+
createOutgoingMsg(iframeId),
|
|
731
|
+
settings[iframeId].iframe,
|
|
732
|
+
iframeId
|
|
733
|
+
);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
function firstRun() {
|
|
738
|
+
if (settings[iframeId]) {
|
|
739
|
+
settings[iframeId].firstRun = false;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
var msg = event.data,
|
|
744
|
+
messageData = {},
|
|
745
|
+
iframeId = null;
|
|
746
|
+
|
|
747
|
+
if ('[iFrameResizerChild]Ready' === msg) {
|
|
748
|
+
iFrameReadyMsgReceived();
|
|
749
|
+
} else if (isMessageForUs()) {
|
|
750
|
+
messageData = processMsg();
|
|
751
|
+
iframeId = messageData.id;
|
|
752
|
+
if (settings[iframeId]) {
|
|
753
|
+
settings[iframeId].loaded = true;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
if (!isMessageFromMetaParent() && hasSettings(iframeId)) {
|
|
757
|
+
log(iframeId, 'Received: ' + msg);
|
|
758
|
+
|
|
759
|
+
if (checkIFrameExists() && isMessageFromIFrame()) {
|
|
760
|
+
actionMsg();
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
} else {
|
|
764
|
+
info(iframeId, 'Ignored: ' + msg);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
function chkEvent(iframeId, funcName, val) {
|
|
769
|
+
var func = null,
|
|
770
|
+
retVal = null;
|
|
771
|
+
|
|
772
|
+
if (settings[iframeId]) {
|
|
773
|
+
func = settings[iframeId][funcName];
|
|
774
|
+
|
|
775
|
+
if ('function' === typeof func) {
|
|
776
|
+
retVal = func(val);
|
|
777
|
+
} else {
|
|
778
|
+
throw new TypeError(
|
|
779
|
+
funcName + ' on iFrame[' + iframeId + '] is not a function'
|
|
780
|
+
)
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
return retVal
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
function removeIframeListeners(iframe) {
|
|
788
|
+
var iframeId = iframe.id;
|
|
789
|
+
delete settings[iframeId];
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
function closeIFrame(iframe) {
|
|
793
|
+
var iframeId = iframe.id;
|
|
794
|
+
if (chkEvent(iframeId, 'onClose', iframeId) === false) {
|
|
795
|
+
log(iframeId, 'Close iframe cancelled by onClose event');
|
|
796
|
+
return
|
|
797
|
+
}
|
|
798
|
+
log(iframeId, 'Removing iFrame: ' + iframeId);
|
|
799
|
+
|
|
800
|
+
try {
|
|
801
|
+
// Catch race condition error with React
|
|
802
|
+
if (iframe.parentNode) {
|
|
803
|
+
iframe.parentNode.removeChild(iframe);
|
|
804
|
+
}
|
|
805
|
+
} catch (error) {
|
|
806
|
+
warn(error);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
chkEvent(iframeId, 'onClosed', iframeId);
|
|
810
|
+
log(iframeId, '--');
|
|
811
|
+
removeIframeListeners(iframe);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
function getPagePosition(iframeId) {
|
|
815
|
+
if (null === pagePosition) {
|
|
816
|
+
pagePosition = {
|
|
817
|
+
x:
|
|
818
|
+
window.pageXOffset === undefined$1
|
|
819
|
+
? document.documentElement.scrollLeft
|
|
820
|
+
: window.pageXOffset,
|
|
821
|
+
y:
|
|
822
|
+
window.pageYOffset === undefined$1
|
|
823
|
+
? document.documentElement.scrollTop
|
|
824
|
+
: window.pageYOffset
|
|
825
|
+
};
|
|
826
|
+
log(
|
|
827
|
+
iframeId,
|
|
828
|
+
'Get page position: ' + pagePosition.x + ',' + pagePosition.y
|
|
829
|
+
);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
function setPagePosition(iframeId) {
|
|
834
|
+
if (null !== pagePosition) {
|
|
835
|
+
window.scrollTo(pagePosition.x, pagePosition.y);
|
|
836
|
+
log(
|
|
837
|
+
iframeId,
|
|
838
|
+
'Set page position: ' + pagePosition.x + ',' + pagePosition.y
|
|
839
|
+
);
|
|
840
|
+
unsetPagePosition();
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
function unsetPagePosition() {
|
|
845
|
+
pagePosition = null;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
function resetIFrame(messageData) {
|
|
849
|
+
function reset() {
|
|
850
|
+
setSize(messageData);
|
|
851
|
+
trigger('reset', 'reset', messageData.iframe, messageData.id);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
log(
|
|
855
|
+
messageData.id,
|
|
856
|
+
'Size reset requested by ' +
|
|
857
|
+
('init' === messageData.type ? 'host page' : 'iFrame')
|
|
858
|
+
);
|
|
859
|
+
getPagePosition(messageData.id);
|
|
860
|
+
syncResize(reset, messageData, 'reset');
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
function setSize(messageData) {
|
|
864
|
+
function setDimension(dimension) {
|
|
865
|
+
if (!messageData.id) {
|
|
866
|
+
log('undefined', 'messageData id not set');
|
|
867
|
+
return
|
|
868
|
+
}
|
|
869
|
+
messageData.iframe.style[dimension] = messageData[dimension] + 'px';
|
|
870
|
+
log(
|
|
871
|
+
messageData.id,
|
|
872
|
+
'IFrame (' +
|
|
873
|
+
iframeId +
|
|
874
|
+
') ' +
|
|
875
|
+
dimension +
|
|
876
|
+
' set to ' +
|
|
877
|
+
messageData[dimension] +
|
|
878
|
+
'px'
|
|
879
|
+
);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
function chkZero(dimension) {
|
|
883
|
+
// FireFox sets dimension of hidden iFrames to zero.
|
|
884
|
+
// So if we detect that set up an event to check for
|
|
885
|
+
// when iFrame becomes visible.
|
|
886
|
+
|
|
887
|
+
/* istanbul ignore next */ // Not testable in PhantomJS
|
|
888
|
+
if (!hiddenCheckEnabled && '0' === messageData[dimension]) {
|
|
889
|
+
hiddenCheckEnabled = true;
|
|
890
|
+
log(iframeId, 'Hidden iFrame detected, creating visibility listener');
|
|
891
|
+
fixHiddenIFrames();
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
function processDimension(dimension) {
|
|
896
|
+
setDimension(dimension);
|
|
897
|
+
chkZero(dimension);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
var iframeId = messageData.iframe.id;
|
|
901
|
+
|
|
902
|
+
if (settings[iframeId]) {
|
|
903
|
+
if (settings[iframeId].sizeHeight) {
|
|
904
|
+
processDimension('height');
|
|
905
|
+
}
|
|
906
|
+
if (settings[iframeId].sizeWidth) {
|
|
907
|
+
processDimension('width');
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
function syncResize(func, messageData, doNotSync) {
|
|
913
|
+
/* istanbul ignore if */ // Not testable in PhantomJS
|
|
914
|
+
if (
|
|
915
|
+
doNotSync !== messageData.type &&
|
|
916
|
+
requestAnimationFrame &&
|
|
917
|
+
// including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
|
|
918
|
+
!window.jasmine
|
|
919
|
+
) {
|
|
920
|
+
log(messageData.id, 'Requesting animation frame');
|
|
921
|
+
requestAnimationFrame(func);
|
|
922
|
+
} else {
|
|
923
|
+
func();
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {
|
|
928
|
+
function postMessageToIFrame() {
|
|
929
|
+
var target = settings[id] && settings[id].targetOrigin;
|
|
930
|
+
log(
|
|
931
|
+
id,
|
|
932
|
+
'[' +
|
|
933
|
+
calleeMsg +
|
|
934
|
+
'] Sending msg to iframe[' +
|
|
935
|
+
id +
|
|
936
|
+
'] (' +
|
|
937
|
+
msg +
|
|
938
|
+
') targetOrigin: ' +
|
|
939
|
+
target
|
|
940
|
+
);
|
|
941
|
+
iframe.contentWindow.postMessage(msgId + msg, target);
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
function iFrameNotFound() {
|
|
945
|
+
warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found');
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
function chkAndSend() {
|
|
949
|
+
if (
|
|
950
|
+
iframe &&
|
|
951
|
+
'contentWindow' in iframe &&
|
|
952
|
+
null !== iframe.contentWindow
|
|
953
|
+
) {
|
|
954
|
+
// Null test for PhantomJS
|
|
955
|
+
postMessageToIFrame();
|
|
956
|
+
} else {
|
|
957
|
+
iFrameNotFound();
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
function warnOnNoResponse() {
|
|
962
|
+
function warning() {
|
|
963
|
+
if (settings[id] && !settings[id].loaded && !errorShown) {
|
|
964
|
+
errorShown = true;
|
|
965
|
+
warn(
|
|
966
|
+
id,
|
|
967
|
+
'IFrame has not responded within ' +
|
|
968
|
+
settings[id].warningTimeout / 1000 +
|
|
969
|
+
' 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.'
|
|
970
|
+
);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
if (
|
|
975
|
+
!!noResponseWarning &&
|
|
976
|
+
settings[id] &&
|
|
977
|
+
!!settings[id].warningTimeout
|
|
978
|
+
) {
|
|
979
|
+
settings[id].msgTimeout = setTimeout(
|
|
980
|
+
warning,
|
|
981
|
+
settings[id].warningTimeout
|
|
982
|
+
);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
var errorShown = false;
|
|
987
|
+
|
|
988
|
+
id = id || iframe.id;
|
|
989
|
+
|
|
990
|
+
if (settings[id]) {
|
|
991
|
+
chkAndSend();
|
|
992
|
+
warnOnNoResponse();
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
function createOutgoingMsg(iframeId) {
|
|
997
|
+
return (
|
|
998
|
+
iframeId +
|
|
999
|
+
':' +
|
|
1000
|
+
settings[iframeId].bodyMarginV1 +
|
|
1001
|
+
':' +
|
|
1002
|
+
settings[iframeId].sizeWidth +
|
|
1003
|
+
':' +
|
|
1004
|
+
settings[iframeId].log +
|
|
1005
|
+
':' +
|
|
1006
|
+
settings[iframeId].interval +
|
|
1007
|
+
':' +
|
|
1008
|
+
settings[iframeId].enablePublicMethods +
|
|
1009
|
+
':' +
|
|
1010
|
+
settings[iframeId].autoResize +
|
|
1011
|
+
':' +
|
|
1012
|
+
settings[iframeId].bodyMargin +
|
|
1013
|
+
':' +
|
|
1014
|
+
settings[iframeId].heightCalculationMethod +
|
|
1015
|
+
':' +
|
|
1016
|
+
settings[iframeId].bodyBackground +
|
|
1017
|
+
':' +
|
|
1018
|
+
settings[iframeId].bodyPadding +
|
|
1019
|
+
':' +
|
|
1020
|
+
settings[iframeId].tolerance +
|
|
1021
|
+
':' +
|
|
1022
|
+
settings[iframeId].inPageLinks +
|
|
1023
|
+
':' +
|
|
1024
|
+
settings[iframeId].resizeFrom +
|
|
1025
|
+
':' +
|
|
1026
|
+
settings[iframeId].widthCalculationMethod +
|
|
1027
|
+
':' +
|
|
1028
|
+
settings[iframeId].mouseEvents
|
|
1029
|
+
)
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
function isNumber(value) {
|
|
1033
|
+
return typeof value === 'number'
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
function setupIFrame(iframe, options) {
|
|
1037
|
+
function setLimits() {
|
|
1038
|
+
function addStyle(style) {
|
|
1039
|
+
var styleValue = settings[iframeId][style];
|
|
1040
|
+
if (Infinity !== styleValue && 0 !== styleValue) {
|
|
1041
|
+
iframe.style[style] = isNumber(styleValue)
|
|
1042
|
+
? styleValue + 'px'
|
|
1043
|
+
: styleValue;
|
|
1044
|
+
log(iframeId, 'Set ' + style + ' = ' + iframe.style[style]);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
function chkMinMax(dimension) {
|
|
1049
|
+
if (
|
|
1050
|
+
settings[iframeId]['min' + dimension] >
|
|
1051
|
+
settings[iframeId]['max' + dimension]
|
|
1052
|
+
) {
|
|
1053
|
+
throw new Error(
|
|
1054
|
+
'Value for min' +
|
|
1055
|
+
dimension +
|
|
1056
|
+
' can not be greater than max' +
|
|
1057
|
+
dimension
|
|
1058
|
+
)
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
chkMinMax('Height');
|
|
1063
|
+
chkMinMax('Width');
|
|
1064
|
+
|
|
1065
|
+
addStyle('maxHeight');
|
|
1066
|
+
addStyle('minHeight');
|
|
1067
|
+
addStyle('maxWidth');
|
|
1068
|
+
addStyle('minWidth');
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
function newId() {
|
|
1072
|
+
var id = (options && options.id) || defaults.id + count++;
|
|
1073
|
+
if (null !== document.getElementById(id)) {
|
|
1074
|
+
id += count++;
|
|
1075
|
+
}
|
|
1076
|
+
return id
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
function ensureHasId(iframeId) {
|
|
1080
|
+
if (typeof iframeId !== 'string') {
|
|
1081
|
+
throw new TypeError('Invaild id for iFrame. Expected String')
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
if ('' === iframeId) {
|
|
1085
|
+
// eslint-disable-next-line no-multi-assign
|
|
1086
|
+
iframe.id = iframeId = newId();
|
|
1087
|
+
logEnabled = (options || {}).log;
|
|
1088
|
+
log(
|
|
1089
|
+
iframeId,
|
|
1090
|
+
'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
return iframeId
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
function setScrolling() {
|
|
1098
|
+
log(
|
|
1099
|
+
iframeId,
|
|
1100
|
+
'IFrame scrolling ' +
|
|
1101
|
+
(settings[iframeId] && settings[iframeId].scrolling
|
|
1102
|
+
? 'enabled'
|
|
1103
|
+
: 'disabled') +
|
|
1104
|
+
' for ' +
|
|
1105
|
+
iframeId
|
|
1106
|
+
);
|
|
1107
|
+
iframe.style.overflow =
|
|
1108
|
+
false === (settings[iframeId] && settings[iframeId].scrolling)
|
|
1109
|
+
? 'hidden'
|
|
1110
|
+
: 'auto';
|
|
1111
|
+
switch (settings[iframeId] && settings[iframeId].scrolling) {
|
|
1112
|
+
case 'omit': {
|
|
1113
|
+
break
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
case true: {
|
|
1117
|
+
iframe.scrolling = 'yes';
|
|
1118
|
+
break
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
case false: {
|
|
1122
|
+
iframe.scrolling = 'no';
|
|
1123
|
+
break
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
default: {
|
|
1127
|
+
iframe.scrolling = settings[iframeId]
|
|
1128
|
+
? settings[iframeId].scrolling
|
|
1129
|
+
: 'no';
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
// The V1 iFrame script expects an int, where as in V2 expects a CSS
|
|
1135
|
+
// string value such as '1px 3em', so if we have an int for V2, set V1=V2
|
|
1136
|
+
// and then convert V2 to a string PX value.
|
|
1137
|
+
function setupBodyMarginValues() {
|
|
1138
|
+
if (
|
|
1139
|
+
'number' ===
|
|
1140
|
+
typeof (settings[iframeId] && settings[iframeId].bodyMargin) ||
|
|
1141
|
+
'0' === (settings[iframeId] && settings[iframeId].bodyMargin)
|
|
1142
|
+
) {
|
|
1143
|
+
settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin;
|
|
1144
|
+
settings[iframeId].bodyMargin =
|
|
1145
|
+
'' + settings[iframeId].bodyMargin + 'px';
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
function checkReset() {
|
|
1150
|
+
// Reduce scope of firstRun to function, because IE8's JS execution
|
|
1151
|
+
// context stack is borked and this value gets externally
|
|
1152
|
+
// changed midway through running this function!!!
|
|
1153
|
+
var firstRun = settings[iframeId] && settings[iframeId].firstRun,
|
|
1154
|
+
resetRequertMethod =
|
|
1155
|
+
settings[iframeId] &&
|
|
1156
|
+
settings[iframeId].heightCalculationMethod in resetRequiredMethods;
|
|
1157
|
+
|
|
1158
|
+
if (!firstRun && resetRequertMethod) {
|
|
1159
|
+
resetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' });
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
function setupIFrameObject() {
|
|
1164
|
+
if (settings[iframeId]) {
|
|
1165
|
+
settings[iframeId].iframe.iFrameResizer = {
|
|
1166
|
+
close: closeIFrame.bind(null, settings[iframeId].iframe),
|
|
1167
|
+
|
|
1168
|
+
removeListeners: removeIframeListeners.bind(
|
|
1169
|
+
null,
|
|
1170
|
+
settings[iframeId].iframe
|
|
1171
|
+
),
|
|
1172
|
+
|
|
1173
|
+
resize: trigger.bind(
|
|
1174
|
+
null,
|
|
1175
|
+
'Window resize',
|
|
1176
|
+
'resize',
|
|
1177
|
+
settings[iframeId].iframe
|
|
1178
|
+
),
|
|
1179
|
+
|
|
1180
|
+
moveToAnchor: function (anchor) {
|
|
1181
|
+
trigger(
|
|
1182
|
+
'Move to anchor',
|
|
1183
|
+
'moveToAnchor:' + anchor,
|
|
1184
|
+
settings[iframeId].iframe,
|
|
1185
|
+
iframeId
|
|
1186
|
+
);
|
|
1187
|
+
},
|
|
1188
|
+
|
|
1189
|
+
sendMessage: function (message) {
|
|
1190
|
+
message = JSON.stringify(message);
|
|
1191
|
+
trigger(
|
|
1192
|
+
'Send Message',
|
|
1193
|
+
'message:' + message,
|
|
1194
|
+
settings[iframeId].iframe,
|
|
1195
|
+
iframeId
|
|
1196
|
+
);
|
|
1197
|
+
}
|
|
1198
|
+
};
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
// We have to call trigger twice, as we can not be sure if all
|
|
1203
|
+
// iframes have completed loading when this code runs. The
|
|
1204
|
+
// event listener also catches the page changing in the iFrame.
|
|
1205
|
+
function init(msg) {
|
|
1206
|
+
function iFrameLoaded() {
|
|
1207
|
+
trigger('iFrame.onload', msg, iframe, undefined$1, true);
|
|
1208
|
+
checkReset();
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
function createDestroyObserver(MutationObserver) {
|
|
1212
|
+
if (!iframe.parentNode) {
|
|
1213
|
+
return
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
var destroyObserver = new MutationObserver(function (mutations) {
|
|
1217
|
+
mutations.forEach(function (mutation) {
|
|
1218
|
+
var removedNodes = Array.prototype.slice.call(mutation.removedNodes); // Transform NodeList into an Array
|
|
1219
|
+
removedNodes.forEach(function (removedNode) {
|
|
1220
|
+
if (removedNode === iframe) {
|
|
1221
|
+
closeIFrame(iframe);
|
|
1222
|
+
}
|
|
1223
|
+
});
|
|
1224
|
+
});
|
|
1225
|
+
});
|
|
1226
|
+
destroyObserver.observe(iframe.parentNode, {
|
|
1227
|
+
childList: true
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
var MutationObserver = getMutationObserver();
|
|
1232
|
+
if (MutationObserver) {
|
|
1233
|
+
createDestroyObserver(MutationObserver);
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
addEventListener(iframe, 'load', iFrameLoaded);
|
|
1237
|
+
trigger('init', msg, iframe, undefined$1, true);
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
function checkOptions(options) {
|
|
1241
|
+
if ('object' !== typeof options) {
|
|
1242
|
+
throw new TypeError('Options is not an object')
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
function copyOptions(options) {
|
|
1247
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
1248
|
+
for (var option in defaults) {
|
|
1249
|
+
if (Object.prototype.hasOwnProperty.call(defaults, option)) {
|
|
1250
|
+
settings[iframeId][option] = Object.prototype.hasOwnProperty.call(
|
|
1251
|
+
options,
|
|
1252
|
+
option
|
|
1253
|
+
)
|
|
1254
|
+
? options[option]
|
|
1255
|
+
: defaults[option];
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
function getTargetOrigin(remoteHost) {
|
|
1261
|
+
return '' === remoteHost ||
|
|
1262
|
+
null !== remoteHost.match(/^(about:blank|javascript:|file:\/\/)/)
|
|
1263
|
+
? '*'
|
|
1264
|
+
: remoteHost
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
function depricate(key) {
|
|
1268
|
+
var splitName = key.split('Callback');
|
|
1269
|
+
|
|
1270
|
+
if (splitName.length === 2) {
|
|
1271
|
+
var name =
|
|
1272
|
+
'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
|
|
1273
|
+
this[name] = this[key];
|
|
1274
|
+
delete this[key];
|
|
1275
|
+
warn(
|
|
1276
|
+
iframeId,
|
|
1277
|
+
"Deprecated: '" +
|
|
1278
|
+
key +
|
|
1279
|
+
"' has been renamed '" +
|
|
1280
|
+
name +
|
|
1281
|
+
"'. The old method will be removed in the next major version."
|
|
1282
|
+
);
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
function processOptions(options) {
|
|
1287
|
+
options = options || {};
|
|
1288
|
+
|
|
1289
|
+
settings[iframeId] = Object.create(null); // Protect against prototype attacks
|
|
1290
|
+
settings[iframeId].iframe = iframe;
|
|
1291
|
+
settings[iframeId].firstRun = true;
|
|
1292
|
+
settings[iframeId].remoteHost =
|
|
1293
|
+
iframe.src && iframe.src.split('/').slice(0, 3).join('/');
|
|
1294
|
+
|
|
1295
|
+
checkOptions(options);
|
|
1296
|
+
Object.keys(options).forEach(depricate, options);
|
|
1297
|
+
copyOptions(options);
|
|
1298
|
+
|
|
1299
|
+
if (settings[iframeId]) {
|
|
1300
|
+
settings[iframeId].targetOrigin =
|
|
1301
|
+
true === settings[iframeId].checkOrigin
|
|
1302
|
+
? getTargetOrigin(settings[iframeId].remoteHost)
|
|
1303
|
+
: '*';
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
function beenHere() {
|
|
1308
|
+
return iframeId in settings && 'iFrameResizer' in iframe
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
var iframeId = ensureHasId(iframe.id);
|
|
1312
|
+
|
|
1313
|
+
if (beenHere()) {
|
|
1314
|
+
warn(iframeId, 'Ignored iFrame, already setup.');
|
|
1315
|
+
} else {
|
|
1316
|
+
processOptions(options);
|
|
1317
|
+
setScrolling();
|
|
1318
|
+
setLimits();
|
|
1319
|
+
setupBodyMarginValues();
|
|
1320
|
+
init(createOutgoingMsg(iframeId));
|
|
1321
|
+
setupIFrameObject();
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
function debouce(fn, time) {
|
|
1326
|
+
if (null === timer) {
|
|
1327
|
+
timer = setTimeout(function () {
|
|
1328
|
+
timer = null;
|
|
1329
|
+
fn();
|
|
1330
|
+
}, time);
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
var frameTimer = {};
|
|
1335
|
+
function debounceFrameEvents(fn, time, frameId) {
|
|
1336
|
+
if (!frameTimer[frameId]) {
|
|
1337
|
+
frameTimer[frameId] = setTimeout(function () {
|
|
1338
|
+
frameTimer[frameId] = null;
|
|
1339
|
+
fn();
|
|
1340
|
+
}, time);
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
// Not testable in PhantomJS
|
|
1345
|
+
/* istanbul ignore next */
|
|
1346
|
+
|
|
1347
|
+
function fixHiddenIFrames() {
|
|
1348
|
+
function checkIFrames() {
|
|
1349
|
+
function checkIFrame(settingId) {
|
|
1350
|
+
function chkDimension(dimension) {
|
|
1351
|
+
return (
|
|
1352
|
+
'0px' ===
|
|
1353
|
+
(settings[settingId] && settings[settingId].iframe.style[dimension])
|
|
1354
|
+
)
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
function isVisible(el) {
|
|
1358
|
+
return null !== el.offsetParent
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
if (
|
|
1362
|
+
settings[settingId] &&
|
|
1363
|
+
isVisible(settings[settingId].iframe) &&
|
|
1364
|
+
(chkDimension('height') || chkDimension('width'))
|
|
1365
|
+
) {
|
|
1366
|
+
trigger(
|
|
1367
|
+
'Visibility change',
|
|
1368
|
+
'resize',
|
|
1369
|
+
settings[settingId].iframe,
|
|
1370
|
+
settingId
|
|
1371
|
+
);
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
Object.keys(settings).forEach(function (key) {
|
|
1376
|
+
checkIFrame(key);
|
|
1377
|
+
});
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
function mutationObserved(mutations) {
|
|
1381
|
+
log(
|
|
1382
|
+
'window',
|
|
1383
|
+
'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type
|
|
1384
|
+
);
|
|
1385
|
+
debouce(checkIFrames, 16);
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
function createMutationObserver() {
|
|
1389
|
+
var target = document.querySelector('body'),
|
|
1390
|
+
config = {
|
|
1391
|
+
attributes: true,
|
|
1392
|
+
attributeOldValue: false,
|
|
1393
|
+
characterData: true,
|
|
1394
|
+
characterDataOldValue: false,
|
|
1395
|
+
childList: true,
|
|
1396
|
+
subtree: true
|
|
1397
|
+
},
|
|
1398
|
+
observer = new MutationObserver(mutationObserved);
|
|
1399
|
+
|
|
1400
|
+
observer.observe(target, config);
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
var MutationObserver = getMutationObserver();
|
|
1404
|
+
if (MutationObserver) {
|
|
1405
|
+
createMutationObserver();
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
function resizeIFrames(event) {
|
|
1410
|
+
function resize() {
|
|
1411
|
+
sendTriggerMsg('Window ' + event, 'resize');
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
log('window', 'Trigger event: ' + event);
|
|
1415
|
+
debouce(resize, 16);
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
// Not testable in PhantomJS
|
|
1419
|
+
/* istanbul ignore next */
|
|
1420
|
+
function tabVisible() {
|
|
1421
|
+
function resize() {
|
|
1422
|
+
sendTriggerMsg('Tab Visible', 'resize');
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
if ('hidden' !== document.visibilityState) {
|
|
1426
|
+
log('document', 'Trigger event: Visibility change');
|
|
1427
|
+
debouce(resize, 16);
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
function sendTriggerMsg(eventName, event) {
|
|
1432
|
+
function isIFrameResizeEnabled(iframeId) {
|
|
1433
|
+
return (
|
|
1434
|
+
settings[iframeId] &&
|
|
1435
|
+
'parent' === settings[iframeId].resizeFrom &&
|
|
1436
|
+
settings[iframeId].autoResize &&
|
|
1437
|
+
!settings[iframeId].firstRun
|
|
1438
|
+
)
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
Object.keys(settings).forEach(function (iframeId) {
|
|
1442
|
+
if (isIFrameResizeEnabled(iframeId)) {
|
|
1443
|
+
trigger(eventName, event, settings[iframeId].iframe, iframeId);
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
function setupEventListeners() {
|
|
1449
|
+
addEventListener(window, 'message', iFrameListener);
|
|
1450
|
+
|
|
1451
|
+
addEventListener(window, 'resize', function () {
|
|
1452
|
+
resizeIFrames('resize');
|
|
1453
|
+
});
|
|
1454
|
+
|
|
1455
|
+
addEventListener(document, 'visibilitychange', tabVisible);
|
|
1456
|
+
|
|
1457
|
+
addEventListener(document, '-webkit-visibilitychange', tabVisible);
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
function factory() {
|
|
1461
|
+
function init(options, element) {
|
|
1462
|
+
function chkType() {
|
|
1463
|
+
if (!element.tagName) {
|
|
1464
|
+
throw new TypeError('Object is not a valid DOM element')
|
|
1465
|
+
} else if ('IFRAME' !== element.tagName.toUpperCase()) {
|
|
1466
|
+
throw new TypeError(
|
|
1467
|
+
'Expected <IFRAME> tag, found <' + element.tagName + '>'
|
|
1468
|
+
)
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
if (element) {
|
|
1473
|
+
chkType();
|
|
1474
|
+
setupIFrame(element, options);
|
|
1475
|
+
iFrames.push(element);
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
function warnDeprecatedOptions(options) {
|
|
1480
|
+
if (options && options.enablePublicMethods) {
|
|
1481
|
+
warn(
|
|
1482
|
+
'enablePublicMethods option has been removed, public methods are now always available in the iFrame'
|
|
1483
|
+
);
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
var iFrames;
|
|
1488
|
+
|
|
1489
|
+
setupRequestAnimationFrame();
|
|
1490
|
+
setupEventListeners();
|
|
1491
|
+
|
|
1492
|
+
return function iFrameResizeF(options, target) {
|
|
1493
|
+
iFrames = []; // Only return iFrames past in on this call
|
|
1494
|
+
|
|
1495
|
+
warnDeprecatedOptions(options);
|
|
1496
|
+
|
|
1497
|
+
switch (typeof target) {
|
|
1498
|
+
case 'undefined':
|
|
1499
|
+
case 'string': {
|
|
1500
|
+
Array.prototype.forEach.call(
|
|
1501
|
+
document.querySelectorAll(target || 'iframe'),
|
|
1502
|
+
init.bind(undefined$1, options)
|
|
1503
|
+
);
|
|
1504
|
+
break
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
case 'object': {
|
|
1508
|
+
init(options, target);
|
|
1509
|
+
break
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
default: {
|
|
1513
|
+
throw new TypeError('Unexpected data type (' + typeof target + ')')
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
return iFrames
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
function createJQueryPublicMethod($) {
|
|
1522
|
+
if (!$.fn) {
|
|
1523
|
+
info('', 'Unable to bind to jQuery, it is not fully loaded.');
|
|
1524
|
+
} else if (!$.fn.iFrameResize) {
|
|
1525
|
+
$.fn.iFrameResize = function $iFrameResizeF(options) {
|
|
1526
|
+
function init(index, element) {
|
|
1527
|
+
setupIFrame(element, options);
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
return this.filter('iframe').each(init).end()
|
|
1531
|
+
};
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
if (window.jQuery !== undefined$1) {
|
|
1536
|
+
createJQueryPublicMethod(window.jQuery);
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
if (typeof undefined$1 === 'function' && undefined$1.amd) {
|
|
1540
|
+
undefined$1([], factory);
|
|
1541
|
+
} else {
|
|
1542
|
+
// Node for browserfy
|
|
1543
|
+
module.exports = factory();
|
|
1544
|
+
}
|
|
1545
|
+
window.iFrameResize = window.iFrameResize || factory();
|
|
1546
|
+
})();
|
|
1547
|
+
});
|
|
1548
|
+
|
|
1549
|
+
const MessageEventType = {
|
|
1550
|
+
card: {
|
|
1551
|
+
ready: 'justifi.card.ready',
|
|
1552
|
+
tokenize: 'justifi.card.tokenize',
|
|
1553
|
+
validate: 'justifi.card.validate',
|
|
1554
|
+
resize: 'justifi.card.resize',
|
|
1555
|
+
styleOverrides: 'justifi.card.styleOverrides',
|
|
1556
|
+
},
|
|
1557
|
+
bankAccount: {
|
|
1558
|
+
ready: 'justifi.bankAccount.ready',
|
|
1559
|
+
tokenize: 'justifi.bankAccount.tokenize',
|
|
1560
|
+
validate: 'justifi.bankAccount.validate',
|
|
1561
|
+
resize: 'justifi.bankAccount.resize',
|
|
1562
|
+
styleOverrides: 'justifi.bankAccount.styleOverrides',
|
|
1563
|
+
},
|
|
1564
|
+
};
|
|
1565
|
+
|
|
1566
|
+
const name = "@justifi/webcomponents";
|
|
1567
|
+
const version = "4.9.0";
|
|
1568
|
+
const description = "JustiFi Web Components";
|
|
1569
|
+
const main = "dist/module/index.js";
|
|
1570
|
+
const module = "dist/module/index.js";
|
|
1571
|
+
const types = "./dist/types/index.d.ts";
|
|
1572
|
+
const repository = {
|
|
1573
|
+
type: "git",
|
|
1574
|
+
url: "git+https://github.com/justifi-tech/web-component-library.git"
|
|
1575
|
+
};
|
|
1576
|
+
const homepage = "https://storybook.justifi.ai/?path=/docs/introduction--docs";
|
|
1577
|
+
const publishConfig = {
|
|
1578
|
+
registry: "https://registry.npmjs.org"
|
|
1579
|
+
};
|
|
1580
|
+
const files = [
|
|
1581
|
+
"dist/"
|
|
1582
|
+
];
|
|
1583
|
+
const scripts = {
|
|
1584
|
+
build: "stencil build --docs",
|
|
1585
|
+
dev: "stencil build --watch",
|
|
1586
|
+
lint: "eslint . --max-warnings 0",
|
|
1587
|
+
clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
1588
|
+
generate: "stencil generate",
|
|
1589
|
+
test: "TZ=utc stencil test --spec",
|
|
1590
|
+
"test:watch": "TZ=utc stencil test --spec --watchAll",
|
|
1591
|
+
"test:e2e": "stencil test --e2e",
|
|
1592
|
+
"test:file": "stencil test --spec --watch --"
|
|
1593
|
+
};
|
|
1594
|
+
const dependencies = {
|
|
1595
|
+
"@stencil/core": "^4.0.5",
|
|
1596
|
+
bootstrap: "^5.2.3",
|
|
1597
|
+
"chart.js": "^4.4.1",
|
|
1598
|
+
"date-fns": "^2.29.3",
|
|
1599
|
+
"dinero.js": "^1.9.1",
|
|
1600
|
+
"iframe-resizer": "^4.3.7",
|
|
1601
|
+
imask: "^7.1.3",
|
|
1602
|
+
rxjs: "^7.8.1",
|
|
1603
|
+
"ts-dedent": "^2.2.0",
|
|
1604
|
+
uuid: "^9.0.0",
|
|
1605
|
+
yup: "^1.0.0"
|
|
1606
|
+
};
|
|
1607
|
+
const devDependencies = {
|
|
1608
|
+
"@babel/preset-env": "^7.21.5",
|
|
1609
|
+
"@babel/preset-react": "^7.18.6",
|
|
1610
|
+
"@babel/preset-typescript": "^7.21.5",
|
|
1611
|
+
"@stencil/sass": "^3.0.1",
|
|
1612
|
+
"@stencil/store": "^2.0.8",
|
|
1613
|
+
"@types/jest": "27.0.3",
|
|
1614
|
+
"@types/node": "^20.1.4",
|
|
1615
|
+
"@types/react": "^18.0.37",
|
|
1616
|
+
"@types/react-dom": "^18.0.11",
|
|
1617
|
+
dotenv: "^16.3.1",
|
|
1618
|
+
jest: "^29.7.0",
|
|
1619
|
+
"jest-cli": "^29.7.0",
|
|
1620
|
+
"jest-environment-node": "^29.7.0",
|
|
1621
|
+
puppeteer: "^21.0.0",
|
|
1622
|
+
"ts-jest": "^29.1.2"
|
|
1623
|
+
};
|
|
1624
|
+
const license = "MIT";
|
|
1625
|
+
const gitHead = "507bac1d941eae6e1f56e185ecd9bc9d22637783";
|
|
1626
|
+
const pnpm = {
|
|
1627
|
+
overrides: {
|
|
1628
|
+
"ip@<1.1.9": ">=1.1.9",
|
|
1629
|
+
"ip@=2.0.0": ">=2.0.1"
|
|
1630
|
+
}
|
|
1631
|
+
};
|
|
1632
|
+
const packageJson = {
|
|
1633
|
+
name: name,
|
|
1634
|
+
version: version,
|
|
1635
|
+
description: description,
|
|
1636
|
+
main: main,
|
|
1637
|
+
module: module,
|
|
1638
|
+
types: types,
|
|
1639
|
+
repository: repository,
|
|
1640
|
+
homepage: homepage,
|
|
1641
|
+
publishConfig: publishConfig,
|
|
1642
|
+
files: files,
|
|
1643
|
+
scripts: scripts,
|
|
1644
|
+
dependencies: dependencies,
|
|
1645
|
+
devDependencies: devDependencies,
|
|
1646
|
+
license: license,
|
|
1647
|
+
gitHead: gitHead,
|
|
1648
|
+
pnpm: pnpm
|
|
1649
|
+
};
|
|
1650
|
+
|
|
1651
|
+
const getComputedTheme = () => {
|
|
1652
|
+
const computedStyles = getComputedStyle(document.body);
|
|
1653
|
+
const computedTheme = {
|
|
1654
|
+
loadGoogleFont: computedStyles.getPropertyValue('--jfi-load-google-font'),
|
|
1655
|
+
layout: {
|
|
1656
|
+
fontFamily: computedStyles.getPropertyValue('--jfi-layout-font-family'),
|
|
1657
|
+
padding: computedStyles.getPropertyValue('--jfi-layout-padding'),
|
|
1658
|
+
formControlSpacingHorizontal: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-x'),
|
|
1659
|
+
formControlSpacingVertical: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-y'),
|
|
1660
|
+
},
|
|
1661
|
+
formControl: {
|
|
1662
|
+
backgroundColor: computedStyles.getPropertyValue('--jfi-form-control-background-color'),
|
|
1663
|
+
borderColor: computedStyles.getPropertyValue('--jfi-form-control-border-color'),
|
|
1664
|
+
borderColorFocus: computedStyles.getPropertyValue('--jfi-form-control-border-color-focus'),
|
|
1665
|
+
borderColorError: computedStyles.getPropertyValue('--jfi-form-control-border-color-error'),
|
|
1666
|
+
borderWidth: computedStyles.getPropertyValue('--jfi-form-control-border-width'),
|
|
1667
|
+
borderBottomWidth: computedStyles.getPropertyValue('--jfi-form-control-border-bottom-width'),
|
|
1668
|
+
borderLeftWidth: computedStyles.getPropertyValue('--jfi-form-control-border-left-width'),
|
|
1669
|
+
borderRightWidth: computedStyles.getPropertyValue('--jfi-form-control-border-right-width'),
|
|
1670
|
+
borderTopWidth: computedStyles.getPropertyValue('--jfi-form-control-border-top-width'),
|
|
1671
|
+
borderRadius: computedStyles.getPropertyValue('--jfi-form-control-border-radius'),
|
|
1672
|
+
borderStyle: computedStyles.getPropertyValue('--jfi-form-control-border-style'),
|
|
1673
|
+
boxShadow: computedStyles.getPropertyValue('--jfi-form-control-box-shadow'),
|
|
1674
|
+
boxShadowError: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error'),
|
|
1675
|
+
boxShadowErrorFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error-focus'),
|
|
1676
|
+
boxShadowFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-focus'),
|
|
1677
|
+
color: computedStyles.getPropertyValue('--jfi-form-control-color'),
|
|
1678
|
+
colorFocus: computedStyles.getPropertyValue('--jfi-form-control-color-focus'),
|
|
1679
|
+
fontSize: computedStyles.getPropertyValue('--jfi-form-control-font-size'),
|
|
1680
|
+
fontWeight: computedStyles.getPropertyValue('--jfi-form-control-font-weight'),
|
|
1681
|
+
lineHeight: computedStyles.getPropertyValue('--jfi-form-control-line-height'),
|
|
1682
|
+
margin: computedStyles.getPropertyValue('--jfi-form-control-margin'),
|
|
1683
|
+
padding: computedStyles.getPropertyValue('--jfi-form-control-padding'),
|
|
1684
|
+
},
|
|
1685
|
+
formLabel: {
|
|
1686
|
+
color: computedStyles.getPropertyValue('--jfi-form-label-color'),
|
|
1687
|
+
fontFamily: computedStyles.getPropertyValue('--jfi-form-label-font-family'),
|
|
1688
|
+
fontSize: computedStyles.getPropertyValue('--jfi-form-label-font-size'),
|
|
1689
|
+
fontWeight: computedStyles.getPropertyValue('--jfi-form-label-font-weight'),
|
|
1690
|
+
margin: computedStyles.getPropertyValue('--jfi-form-label-margin'),
|
|
1691
|
+
},
|
|
1692
|
+
errorMessage: {
|
|
1693
|
+
color: computedStyles.getPropertyValue('--jfi-error-message-color'),
|
|
1694
|
+
margin: computedStyles.getPropertyValue('--jfi-error-message-margin'),
|
|
1695
|
+
fontSize: computedStyles.getPropertyValue('--jfi-error-message-font-size'),
|
|
1696
|
+
},
|
|
1697
|
+
};
|
|
1698
|
+
return computedTheme;
|
|
1699
|
+
};
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* This approach decouples the communication logic from PaymentMethodForm component,
|
|
1703
|
+
* making it cleaner, more maintainable, and easier to test
|
|
1704
|
+
*/
|
|
1705
|
+
class FrameCommunicationService {
|
|
1706
|
+
constructor(iframe, iframeOrigin) {
|
|
1707
|
+
this.iframe = iframe;
|
|
1708
|
+
this.iframeOrigin = iframeOrigin;
|
|
1709
|
+
}
|
|
1710
|
+
postMessage(eventType, payload) {
|
|
1711
|
+
const message = Object.assign({ eventType }, payload);
|
|
1712
|
+
this.iframe.contentWindow.postMessage(message, this.iframeOrigin);
|
|
1713
|
+
}
|
|
1714
|
+
addMessageListener(callback) {
|
|
1715
|
+
window.addEventListener('message', callback);
|
|
1716
|
+
}
|
|
1717
|
+
removeMessageListener(callback) {
|
|
1718
|
+
window.removeEventListener('message', callback);
|
|
1719
|
+
}
|
|
1720
|
+
postMessageWithResponseListener(eventType, payload) {
|
|
1721
|
+
return new Promise((resolve) => {
|
|
1722
|
+
const responseListener = (event) => {
|
|
1723
|
+
if (event.data.eventType !== eventType)
|
|
1724
|
+
return;
|
|
1725
|
+
window.removeEventListener('message', responseListener);
|
|
1726
|
+
resolve(event.data.data);
|
|
1727
|
+
};
|
|
1728
|
+
window.addEventListener('message', responseListener);
|
|
1729
|
+
this.postMessage(eventType, payload);
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
const paymentMethodFormCss = ":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}iframe{width:1px;min-width:100%}";
|
|
1735
|
+
|
|
1736
|
+
const PaymentMethodForm = class {
|
|
1737
|
+
constructor(hostRef) {
|
|
1738
|
+
registerInstance(this, hostRef);
|
|
1739
|
+
this.paymentMethodFormReady = createEvent(this, "paymentMethodFormReady", 7);
|
|
1740
|
+
this.paymentMethodFormValidated = createEvent(this, "paymentMethodFormValidated", 7);
|
|
1741
|
+
this.paymentMethodFormTokenized = createEvent(this, "paymentMethodFormTokenized", 7);
|
|
1742
|
+
this.computedTheme = getComputedTheme();
|
|
1743
|
+
this.dispatchMessageEvent = (messageEvent) => {
|
|
1744
|
+
const { eventType, data } = messageEvent.data;
|
|
1745
|
+
const eventTypeMessage = MessageEventType[this.paymentMethodFormType];
|
|
1746
|
+
if (eventType === eventTypeMessage.ready) {
|
|
1747
|
+
this.paymentMethodFormReady.emit(data);
|
|
1748
|
+
}
|
|
1749
|
+
else if (eventType === eventTypeMessage.tokenize) {
|
|
1750
|
+
this.paymentMethodFormTokenized.emit(data);
|
|
1751
|
+
}
|
|
1752
|
+
else if (eventType === eventTypeMessage.validate) {
|
|
1753
|
+
this.paymentMethodFormValidated.emit(data);
|
|
1754
|
+
}
|
|
1755
|
+
};
|
|
1756
|
+
this.postMessage = (eventType, payload) => {
|
|
1757
|
+
this.frameService.postMessage(eventType, payload);
|
|
1758
|
+
};
|
|
1759
|
+
this.paymentMethodFormType = undefined;
|
|
1760
|
+
this.paymentMethodFormValidationMode = undefined;
|
|
1761
|
+
this.iframeOrigin = undefined;
|
|
1762
|
+
this.singleLine = undefined;
|
|
1763
|
+
}
|
|
1764
|
+
disconnectedCallback() {
|
|
1765
|
+
this.frameService.removeMessageListener(this.dispatchMessageEvent);
|
|
1766
|
+
}
|
|
1767
|
+
async resize() {
|
|
1768
|
+
this.postMessage(MessageEventType[this.paymentMethodFormType].resize);
|
|
1769
|
+
}
|
|
1770
|
+
async tokenize(clientId, paymentMethodMetadata, account) {
|
|
1771
|
+
const eventType = MessageEventType[this.paymentMethodFormType].tokenize;
|
|
1772
|
+
return this.frameService.postMessageWithResponseListener(eventType, {
|
|
1773
|
+
clientId,
|
|
1774
|
+
paymentMethodMetadata,
|
|
1775
|
+
account,
|
|
1776
|
+
componentVersion: packageJson.version,
|
|
1777
|
+
});
|
|
1778
|
+
}
|
|
1779
|
+
async validate() {
|
|
1780
|
+
const eventType = MessageEventType[this.paymentMethodFormType].validate;
|
|
1781
|
+
return this.frameService.postMessageWithResponseListener(eventType);
|
|
1782
|
+
}
|
|
1783
|
+
sendStyleOverrides() {
|
|
1784
|
+
if (this.computedTheme) {
|
|
1785
|
+
this.postMessage(MessageEventType[this.paymentMethodFormType].styleOverrides, { styleOverrides: this.computedTheme });
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
getIframeSrc() {
|
|
1789
|
+
let paramsList = [];
|
|
1790
|
+
if (this.paymentMethodFormValidationMode) {
|
|
1791
|
+
paramsList.push(`validationMode=${this.paymentMethodFormValidationMode}`);
|
|
1792
|
+
}
|
|
1793
|
+
if (this.singleLine) {
|
|
1794
|
+
paramsList.push(`singleLine=${this.singleLine}`);
|
|
1795
|
+
}
|
|
1796
|
+
let iframeSrc = `${this.iframeOrigin}/${this.paymentMethodFormType}${composeQueryParams(paramsList)}`;
|
|
1797
|
+
return iframeSrc;
|
|
1798
|
+
}
|
|
1799
|
+
initializeFrameCommunicationService() {
|
|
1800
|
+
var _a;
|
|
1801
|
+
this.frameService = new FrameCommunicationService(this.iframeElement, this.iframeOrigin);
|
|
1802
|
+
(_a = this.frameService) === null || _a === void 0 ? void 0 : _a.addMessageListener(this.dispatchMessageEvent);
|
|
1803
|
+
}
|
|
1804
|
+
render() {
|
|
1805
|
+
return (h(Host, null, h("iframe", { id: `justifi-payment-method-form-${this.paymentMethodFormType}`, src: this.getIframeSrc(), ref: el => {
|
|
1806
|
+
this.iframeElement = el;
|
|
1807
|
+
}, onLoad: () => {
|
|
1808
|
+
iframeResizer({
|
|
1809
|
+
scrollbars: false,
|
|
1810
|
+
}, this.iframeElement);
|
|
1811
|
+
this.initializeFrameCommunicationService();
|
|
1812
|
+
this.sendStyleOverrides();
|
|
1813
|
+
} })));
|
|
1814
|
+
}
|
|
1815
|
+
};
|
|
1816
|
+
PaymentMethodForm.style = paymentMethodFormCss;
|
|
2
1817
|
|
|
3
1818
|
const selectInputCss = ":root,[data-bs-theme=light]{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13, 110, 253;--bs-secondary-rgb:108, 117, 125;--bs-success-rgb:25, 135, 84;--bs-info-rgb:13, 202, 240;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:220, 53, 69;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-font-sans-serif:system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33, 37, 41;--bs-body-bg:#fff;--bs-body-bg-rgb:255, 255, 255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0, 0, 0;--bs-secondary-color:rgba(33, 37, 41, 0.75);--bs-secondary-color-rgb:33, 37, 41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233, 236, 239;--bs-tertiary-color:rgba(33, 37, 41, 0.5);--bs-tertiary-color-rgb:33, 37, 41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248, 249, 250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13, 110, 253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10, 88, 202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width:0.25rem;--bs-focus-ring-opacity:0.25;--bs-focus-ring-color:rgba(13, 110, 253, 0.25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color:#dee2e6;--bs-body-color-rgb:222, 226, 230;--bs-body-bg:#212529;--bs-body-bg-rgb:33, 37, 41;--bs-emphasis-color:#fff;--bs-emphasis-color-rgb:255, 255, 255;--bs-secondary-color:rgba(222, 226, 230, 0.75);--bs-secondary-color-rgb:222, 226, 230;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52, 58, 64;--bs-tertiary-color:rgba(222, 226, 230, 0.5);--bs-tertiary-color-rgb:222, 226, 230;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43, 48, 53;--bs-primary-text-emphasis:#6ea8fe;--bs-secondary-text-emphasis:#a7acb1;--bs-success-text-emphasis:#75b798;--bs-info-text-emphasis:#6edff6;--bs-warning-text-emphasis:#ffda6a;--bs-danger-text-emphasis:#ea868f;--bs-light-text-emphasis:#f8f9fa;--bs-dark-text-emphasis:#dee2e6;--bs-primary-bg-subtle:#031633;--bs-secondary-bg-subtle:#161719;--bs-success-bg-subtle:#051b11;--bs-info-bg-subtle:#032830;--bs-warning-bg-subtle:#332701;--bs-danger-bg-subtle:#2c0b0e;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#084298;--bs-secondary-border-subtle:#41464b;--bs-success-border-subtle:#0f5132;--bs-info-border-subtle:#087990;--bs-warning-border-subtle:#997404;--bs-danger-border-subtle:#842029;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:inherit;--bs-link-color:#6ea8fe;--bs-link-hover-color:#8bb9fe;--bs-link-color-rgb:110, 168, 254;--bs-link-hover-color-rgb:139, 185, 254;--bs-code-color:#e685b5;--bs-highlight-color:#dee2e6;--bs-highlight-bg:#664d03;--bs-border-color:#495057;--bs-border-color-translucent:rgba(255, 255, 255, 0.15);--bs-form-valid-color:#75b798;--bs-form-valid-border-color:#75b798;--bs-form-invalid-color:#ea868f;--bs-form-invalid-border-color:#ea868f}.spinner-grow,.spinner-border{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg) }}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion: reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.clearfix::after{display:block;clear:both;content:\"\"}.text-bg-primary{color:#fff !important;background-color:RGBA(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-secondary{color:#fff !important;background-color:RGBA(var(--bs-secondary-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-success{color:#fff !important;background-color:RGBA(var(--bs-success-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-info{color:#000 !important;background-color:RGBA(var(--bs-info-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-warning{color:#000 !important;background-color:RGBA(var(--bs-warning-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-danger{color:#fff !important;background-color:RGBA(var(--bs-danger-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-light{color:#000 !important;background-color:RGBA(var(--bs-light-rgb), var(--bs-bg-opacity, 1)) !important}.text-bg-dark{color:#fff !important;background-color:RGBA(var(--bs-dark-rgb), var(--bs-bg-opacity, 1)) !important}.link-primary{color:RGBA(var(--bs-primary-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-primary-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-primary:hover,.link-primary:focus{color:RGBA(10, 88, 202, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(10, 88, 202, var(--bs-link-underline-opacity, 1)) !important}.link-secondary{color:RGBA(var(--bs-secondary-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-secondary-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-secondary:hover,.link-secondary:focus{color:RGBA(86, 94, 100, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(86, 94, 100, var(--bs-link-underline-opacity, 1)) !important}.link-success{color:RGBA(var(--bs-success-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-success-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-success:hover,.link-success:focus{color:RGBA(20, 108, 67, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(20, 108, 67, var(--bs-link-underline-opacity, 1)) !important}.link-info{color:RGBA(var(--bs-info-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-info-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-info:hover,.link-info:focus{color:RGBA(61, 213, 243, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(61, 213, 243, var(--bs-link-underline-opacity, 1)) !important}.link-warning{color:RGBA(var(--bs-warning-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-warning-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-warning:hover,.link-warning:focus{color:RGBA(255, 205, 57, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(255, 205, 57, var(--bs-link-underline-opacity, 1)) !important}.link-danger{color:RGBA(var(--bs-danger-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-danger-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-danger:hover,.link-danger:focus{color:RGBA(176, 42, 55, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(176, 42, 55, var(--bs-link-underline-opacity, 1)) !important}.link-light{color:RGBA(var(--bs-light-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-light-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-light:hover,.link-light:focus{color:RGBA(249, 250, 251, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(249, 250, 251, var(--bs-link-underline-opacity, 1)) !important}.link-dark{color:RGBA(var(--bs-dark-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-dark-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-dark:hover,.link-dark:focus{color:RGBA(26, 30, 33, var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(26, 30, 33, var(--bs-link-underline-opacity, 1)) !important}.link-body-emphasis{color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-opacity, 1)) !important;text-decoration-color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-underline-opacity, 1)) !important}.link-body-emphasis:hover,.link-body-emphasis:focus{color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-opacity, 0.75)) !important;text-decoration-color:RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-underline-opacity, 0.75)) !important}.focus-ring:focus{outline:0;box-shadow:var(--bs-focus-ring-x, 0) var(--bs-focus-ring-y, 0) var(--bs-focus-ring-blur, 0) var(--bs-focus-ring-width) var(--bs-focus-ring-color)}.icon-link{display:inline-flex;gap:0.375rem;align-items:center;text-decoration-color:rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 0.5));text-underline-offset:0.25em;backface-visibility:hidden}.icon-link>.bi{flex-shrink:0;width:1em;height:1em;fill:currentcolor;transition:0.2s ease-in-out transform}@media (prefers-reduced-motion: reduce){.icon-link>.bi{transition:none}}.icon-link-hover:hover>.bi,.icon-link-hover:focus-visible>.bi{transform:var(--bs-icon-link-transform, translate3d(0.25em, 0, 0))}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:\"\"}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:sticky;top:0;z-index:1020}.sticky-bottom{position:sticky;bottom:0;z-index:1020}@media (min-width: 576px){.sticky-sm-top{position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 768px){.sticky-md-top{position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 992px){.sticky-lg-top{position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 1200px){.sticky-xl-top{position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width: 1400px){.sticky-xxl-top{position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:sticky;bottom:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption),.visually-hidden-focusable:not(:focus):not(:focus-within):not(caption){position:absolute !important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:\"\"}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:var(--bs-border-width);min-height:1em;background-color:currentcolor;opacity:0.25}*,*::before,*::after{box-sizing:border-box}@media (prefers-reduced-motion: no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}hr{margin:1rem 0;color:inherit;border:0;border-top:var(--bs-border-width) solid;opacity:0.25}h6,h5,h4,h3,h2,h1{margin-top:0;margin-bottom:0.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color)}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width: 1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + 0.9vw)}@media (min-width: 1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + 0.6vw)}@media (min-width: 1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + 0.3vw)}@media (min-width: 1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{text-decoration:underline dotted;cursor:help;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}ol,ul,dl{margin-top:0;margin-bottom:1rem}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:0.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:0.875em}mark{padding:0.1875em;color:var(--bs-highlight-color);background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:0.75em;line-height:0;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}a{color:rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));text-decoration:underline}a:hover{--bs-link-color-rgb:var(--bs-link-hover-color-rgb)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}pre,code,kbd,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:0.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:0.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:0.1875rem 0.375rem;font-size:0.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:0.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:0.5rem;padding-bottom:0.5rem;color:var(--bs-secondary-color);text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}thead,tbody,tfoot,tr,td,th{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}input,button,select,optgroup,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none !important}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button:not(:disabled),[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:0.5rem;font-size:calc(1.275rem + 0.3vw);line-height:inherit}@media (min-width: 1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-text,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none !important}.form-label{margin-bottom:0.5rem}.col-form-label{padding-top:calc(0.375rem + var(--bs-border-width));padding-bottom:calc(0.375rem + var(--bs-border-width));margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(0.5rem + var(--bs-border-width));padding-bottom:calc(0.5rem + var(--bs-border-width));font-size:1.25rem}.col-form-label-sm{padding-top:calc(0.25rem + var(--bs-border-width));padding-bottom:calc(0.25rem + var(--bs-border-width));font-size:0.875rem}.form-text{margin-top:0.25rem;font-size:0.875em;color:var(--bs-secondary-color)}.form-control{display:block;width:100%;padding:0.375rem 0.75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);appearance:none;background-color:var(--bs-body-bg);background-clip:padding-box;border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);transition:border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media (prefers-reduced-motion: reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:var(--bs-body-color);background-color:var(--bs-body-bg);border-color:#86b7fe;outline:0;box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.form-control::-webkit-date-and-time-value{min-width:85px;height:1.5em;margin:0}.form-control::-webkit-datetime-edit{display:block;padding:0}.form-control::placeholder{color:var(--bs-secondary-color);opacity:1}.form-control:disabled{background-color:var(--bs-secondary-bg);opacity:1}.form-control::file-selector-button{padding:0.375rem 0.75rem;margin:-0.375rem -0.75rem;margin-inline-end:0.75rem;color:var(--bs-body-color);background-color:var(--bs-tertiary-bg);pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:var(--bs-border-width);border-radius:0;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media (prefers-reduced-motion: reduce){.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:var(--bs-secondary-bg)}.form-control-plaintext{display:block;width:100%;padding:0.375rem 0;margin-bottom:0;line-height:1.5;color:var(--bs-body-color);background-color:transparent;border:solid transparent;border-width:var(--bs-border-width) 0}.form-control-plaintext:focus{outline:0}.form-control-plaintext.form-control-sm,.form-control-plaintext.form-control-lg{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));padding:0.25rem 0.5rem;font-size:0.875rem;border-radius:var(--bs-border-radius-sm)}.form-control-sm::file-selector-button{padding:0.25rem 0.5rem;margin:-0.25rem -0.5rem;margin-inline-end:0.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));padding:0.5rem 1rem;font-size:1.25rem;border-radius:var(--bs-border-radius-lg)}.form-control-lg::file-selector-button{padding:0.5rem 1rem;margin:-0.5rem -1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2))}textarea.form-control-sm{min-height:calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2))}textarea.form-control-lg{min-height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2))}.form-control-color{width:3rem;height:calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));padding:0.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{border:0 !important;border-radius:var(--bs-border-radius)}.form-control-color::-webkit-color-swatch{border:0 !important;border-radius:var(--bs-border-radius)}.form-control-color.form-control-sm{height:calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2))}.form-control-color.form-control-lg{height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2))}.form-select{--bs-form-select-bg-img:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e\");display:block;width:100%;padding:0.375rem 2.25rem 0.375rem 0.75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);appearance:none;background-color:var(--bs-body-bg);background-image:var(--bs-form-select-bg-img), var(--bs-form-select-bg-icon, none);background-repeat:no-repeat;background-position:right 0.75rem center;background-size:16px 12px;border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);transition:border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media (prefers-reduced-motion: reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.form-select[multiple],.form-select[size]:not([size=\"1\"]){padding-right:0.75rem;background-image:none}.form-select:disabled{background-color:var(--bs-secondary-bg)}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 var(--bs-body-color)}.form-select-sm{padding-top:0.25rem;padding-bottom:0.25rem;padding-left:0.5rem;font-size:0.875rem;border-radius:var(--bs-border-radius-sm)}.form-select-lg{padding-top:0.5rem;padding-bottom:0.5rem;padding-left:1rem;font-size:1.25rem;border-radius:var(--bs-border-radius-lg)}[data-bs-theme=dark] .form-select{--bs-form-select-bg-img:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e\")}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:0.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-reverse{padding-right:1.5em;padding-left:0;text-align:right}.form-check-reverse .form-check-input{float:right;margin-right:-1.5em;margin-left:0}.form-check-input{--bs-form-check-bg:var(--bs-body-bg);flex-shrink:0;width:1em;height:1em;margin-top:0.25em;vertical-align:top;appearance:none;background-color:var(--bs-form-check-bg);background-image:var(--bs-form-check-bg-image);background-repeat:no-repeat;background-position:center;background-size:contain;border:var(--bs-border-width) solid var(--bs-border-color);print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:0.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{--bs-form-check-bg-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e\")}.form-check-input:checked[type=radio]{--bs-form-check-bg-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e\")}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;--bs-form-check-bg-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e\")}.form-check-input:disabled{pointer-events:none;filter:none;opacity:0.5}.form-check-input[disabled]~.form-check-label,.form-check-input:disabled~.form-check-label{cursor:default;opacity:0.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{--bs-form-switch-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e\");width:2em;margin-left:-2.5em;background-image:var(--bs-form-switch-bg);background-position:left center;border-radius:2em;transition:background-position 0.15s ease-in-out}@media (prefers-reduced-motion: reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{--bs-form-switch-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e\")}.form-switch .form-check-input:checked{background-position:right center;--bs-form-switch-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e\")}.form-switch.form-check-reverse{padding-right:2.5em;padding-left:0}.form-switch.form-check-reverse .form-check-input{margin-right:-2.5em;margin-left:0}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.btn-check[disabled]+.btn,.btn-check:disabled+.btn{pointer-events:none;filter:none;opacity:0.65}[data-bs-theme=dark] .form-switch .form-check-input:not(:checked):not(:focus){--bs-form-switch-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.25%29'/%3e%3c/svg%3e\")}.form-range{width:100%;height:1.5rem;padding:0;appearance:none;background-color:transparent}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-0.25rem;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;transition:background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media (prefers-reduced-motion: reduce){.form-range::-webkit-slider-thumb{transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:0.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;transition:background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media (prefers-reduced-motion: reduce){.form-range::-moz-range-thumb{transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:0.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:var(--bs-secondary-color)}.form-range:disabled::-moz-range-thumb{background-color:var(--bs-secondary-color)}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-control-plaintext,.form-floating>.form-select{height:calc(3.5rem + calc(var(--bs-border-width) * 2));min-height:calc(3.5rem + calc(var(--bs-border-width) * 2));line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;z-index:2;height:100%;padding:1rem 0.75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity 0.1s ease-in-out, transform 0.1s ease-in-out}@media (prefers-reduced-motion: reduce){.form-floating>label{transition:none}}.form-floating>.form-control,.form-floating>.form-control-plaintext{padding:1rem 0.75rem}.form-floating>.form-control::placeholder,.form-floating>.form-control-plaintext::placeholder{color:transparent}.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown),.form-floating>.form-control-plaintext:focus,.form-floating>.form-control-plaintext:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:0.625rem}.form-floating>.form-control:-webkit-autofill,.form-floating>.form-control-plaintext:-webkit-autofill{padding-top:1.625rem;padding-bottom:0.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:0.625rem}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-control-plaintext~label,.form-floating>.form-select~label{color:rgba(var(--bs-body-color-rgb), 0.65);transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem)}.form-floating>.form-control:focus~label::after,.form-floating>.form-control:not(:placeholder-shown)~label::after,.form-floating>.form-control-plaintext~label::after,.form-floating>.form-select~label::after{position:absolute;inset:1rem 0.375rem;z-index:-1;height:1.5em;content:\"\";background-color:var(--bs-body-bg);border-radius:var(--bs-border-radius)}.form-floating>.form-control:-webkit-autofill~label{color:rgba(var(--bs-body-color-rgb), 0.65);transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem)}.form-floating>.form-control-plaintext~label{border-width:var(--bs-border-width) 0}.form-floating>:disabled~label,.form-floating>.form-control:disabled~label{color:#6c757d}.form-floating>:disabled~label::after,.form-floating>.form-control:disabled~label::after{background-color:var(--bs-secondary-bg)}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-select,.input-group>.form-floating{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-select:focus,.input-group>.form-floating:focus-within{z-index:5}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:5}.input-group-text{display:flex;align-items:center;padding:0.375rem 0.75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);text-align:center;white-space:nowrap;background-color:var(--bs-tertiary-bg);border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius)}.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text,.input-group-lg>.btn{padding:0.5rem 1rem;font-size:1.25rem;border-radius:var(--bs-border-radius-lg)}.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text,.input-group-sm>.btn{padding:0.25rem 0.5rem;font-size:0.875rem;border-radius:var(--bs-border-radius-sm)}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select{border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-select{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:calc(var(--bs-border-width) * -1);border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:0.25rem;font-size:0.875em;color:var(--bs-form-valid-color)}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:0.25rem 0.5rem;margin-top:0.1rem;font-size:0.875rem;color:#fff;background-color:var(--bs-success);border-radius:var(--bs-border-radius)}.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip,.is-valid~.valid-feedback,.is-valid~.valid-tooltip{display:block}.was-validated .form-control:valid,.form-control.is-valid{border-color:var(--bs-form-valid-border-color);padding-right:calc(1.5em + 0.75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .form-control:valid:focus,.form-control.is-valid:focus{border-color:var(--bs-form-valid-border-color);box-shadow:0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + 0.75rem);background-position:top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem)}.was-validated .form-select:valid,.form-select.is-valid{border-color:var(--bs-form-valid-border-color)}.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size=\"1\"],.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size=\"1\"]{--bs-form-select-bg-icon:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");padding-right:4.125rem;background-position:right 0.75rem center, center right 2.25rem;background-size:16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .form-select:valid:focus,.form-select.is-valid:focus{border-color:var(--bs-form-valid-border-color);box-shadow:0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25)}.was-validated .form-control-color:valid,.form-control-color.is-valid{width:calc(3rem + calc(1.5em + 0.75rem))}.was-validated .form-check-input:valid,.form-check-input.is-valid{border-color:var(--bs-form-valid-border-color)}.was-validated .form-check-input:valid:checked,.form-check-input.is-valid:checked{background-color:var(--bs-form-valid-color)}.was-validated .form-check-input:valid:focus,.form-check-input.is-valid:focus{box-shadow:0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25)}.was-validated .form-check-input:valid~.form-check-label,.form-check-input.is-valid~.form-check-label{color:var(--bs-form-valid-color)}.form-check-inline .form-check-input~.valid-feedback{margin-left:0.5em}.was-validated .input-group>.form-control:not(:focus):valid,.input-group>.form-control:not(:focus).is-valid,.was-validated .input-group>.form-select:not(:focus):valid,.input-group>.form-select:not(:focus).is-valid,.was-validated .input-group>.form-floating:not(:focus-within):valid,.input-group>.form-floating:not(:focus-within).is-valid{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:0.25rem;font-size:0.875em;color:var(--bs-form-invalid-color)}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:0.25rem 0.5rem;margin-top:0.1rem;font-size:0.875rem;color:#fff;background-color:var(--bs-danger);border-radius:var(--bs-border-radius)}.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip,.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip{display:block}.was-validated .form-control:invalid,.form-control.is-invalid{border-color:var(--bs-form-invalid-border-color);padding-right:calc(1.5em + 0.75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .form-control:invalid:focus,.form-control.is-invalid:focus{border-color:var(--bs-form-invalid-border-color);box-shadow:0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + 0.75rem);background-position:top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem)}.was-validated .form-select:invalid,.form-select.is-invalid{border-color:var(--bs-form-invalid-border-color)}.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size=\"1\"],.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size=\"1\"]{--bs-form-select-bg-icon:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\");padding-right:4.125rem;background-position:right 0.75rem center, center right 2.25rem;background-size:16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .form-select:invalid:focus,.form-select.is-invalid:focus{border-color:var(--bs-form-invalid-border-color);box-shadow:0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25)}.was-validated .form-control-color:invalid,.form-control-color.is-invalid{width:calc(3rem + calc(1.5em + 0.75rem))}.was-validated .form-check-input:invalid,.form-check-input.is-invalid{border-color:var(--bs-form-invalid-border-color)}.was-validated .form-check-input:invalid:checked,.form-check-input.is-invalid:checked{background-color:var(--bs-form-invalid-color)}.was-validated .form-check-input:invalid:focus,.form-check-input.is-invalid:focus{box-shadow:0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25)}.was-validated .form-check-input:invalid~.form-check-label,.form-check-input.is-invalid~.form-check-label{color:var(--bs-form-invalid-color)}.form-check-inline .form-check-input~.invalid-feedback{margin-left:0.5em}.was-validated .input-group>.form-control:not(:focus):invalid,.input-group>.form-control:not(:focus).is-invalid,.was-validated .input-group>.form-select:not(:focus):invalid,.input-group>.form-select:not(:focus).is-invalid,.was-validated .input-group>.form-floating:not(:focus-within):invalid,.input-group>.form-floating:not(:focus-within).is-invalid{z-index:4}:host{font-family:system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;display:block}";
|
|
4
1819
|
|
|
@@ -47,4 +1862,4 @@ const TextInput = class {
|
|
|
47
1862
|
};
|
|
48
1863
|
TextInput.style = textInputCss;
|
|
49
1864
|
|
|
50
|
-
export { SelectInput as select_input, TextInput as text_input };
|
|
1865
|
+
export { BillingForm as justifi_billing_form, PaymentMethodForm as justifi_payment_method_form, SelectInput as select_input, TextInput as text_input };
|