@justifi/webcomponents 4.16.0 → 4.17.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.
Files changed (293) hide show
  1. package/dist/cjs/{Analytics-423b2bb5.js → Analytics-80336968.js} +1 -1
  2. package/dist/cjs/{SubAccount-4f4fac22.js → SubAccount-135ff8c8.js} +1 -1
  3. package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
  4. package/dist/cjs/{business-additional-questions-schema-606d1292.js → business-additional-questions-schema-cf545610.js} +2 -2
  5. package/dist/cjs/form-alert_5.cjs.entry.js +2 -2
  6. package/dist/cjs/form-control-checkbox_5.cjs.entry.js +7 -10
  7. package/dist/cjs/form-control-date_3.cjs.entry.js +3 -3
  8. package/dist/cjs/form-control-error-text_4.cjs.entry.js +2 -2
  9. package/dist/cjs/form-control-file.cjs.entry.js +1 -1
  10. package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
  11. package/dist/cjs/form-control-number.cjs.entry.js +1 -1
  12. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +2 -2
  13. package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +8 -11
  14. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +2 -2
  15. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +13 -1678
  16. package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
  17. package/dist/cjs/justifi-business-form.cjs.entry.js +5 -5
  18. package/dist/cjs/justifi-business-list.cjs.entry.js +1 -1
  19. package/dist/cjs/justifi-card-form.cjs.entry.js +2 -2
  20. package/dist/cjs/justifi-checkout-core.cjs.entry.js +13 -5
  21. package/dist/cjs/justifi-checkout.cjs.entry.js +11 -3
  22. package/dist/cjs/justifi-details.cjs.entry.js +1 -1
  23. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
  24. package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +68 -26
  25. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +2 -2
  26. package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
  27. package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -6
  28. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1688 -0
  29. package/dist/cjs/justifi-payment-method-selector.cjs.entry.js +1 -1
  30. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
  31. package/dist/cjs/justifi-payments-list.cjs.entry.js +2 -2
  32. package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
  33. package/dist/cjs/justifi-payouts-list.cjs.entry.js +2 -2
  34. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +2 -2
  35. package/dist/cjs/justifi-refund-form.cjs.entry.js +1 -1
  36. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +3 -3
  37. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +1 -1
  38. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  39. package/dist/cjs/justifi-subaccount-details.cjs.entry.js +3 -3
  40. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +3 -3
  41. package/dist/cjs/loader.cjs.js +1 -1
  42. package/dist/cjs/{package-b40227dd.js → package-7b63c02b.js} +1 -1
  43. package/dist/cjs/{payload-parsers-6e4cf5d7.js → payload-parsers-78445405.js} +1 -1
  44. package/dist/cjs/payment-details-core.cjs.entry.js +8 -8
  45. package/dist/cjs/payments-list-core.cjs.entry.js +2 -2
  46. package/dist/cjs/payout-details-core.cjs.entry.js +2 -2
  47. package/dist/cjs/payouts-list-core.cjs.entry.js +2 -2
  48. package/dist/cjs/{schema-validations-9668fd79.js → schema-validations-2733de42.js} +3 -4
  49. package/dist/cjs/subaccount-account-details_4.cjs.entry.js +5 -5
  50. package/dist/cjs/subaccount-bank-details.cjs.entry.js +1 -1
  51. package/dist/cjs/subaccount-terms-details.cjs.entry.js +1 -1
  52. package/dist/cjs/{utils-fd644316.js → utils-742da2e3.js} +12 -3
  53. package/dist/cjs/{utils-17869710.js → utils-80191fbe.js} +6 -0
  54. package/dist/cjs/webcomponents.cjs.js +1 -1
  55. package/dist/collection/api/Checkout.js +0 -1
  56. package/dist/collection/collection-manifest.json +1 -0
  57. package/dist/collection/components/billing-form/billing-form.js +2 -2
  58. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +1 -1
  59. package/dist/collection/components/business-forms/owner-form/owner-form.js +2 -5
  60. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
  61. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +3 -2
  62. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -4
  63. package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +1 -1
  64. package/dist/collection/components/business-forms/schemas/schema-helpers.js +0 -1
  65. package/dist/collection/components/business-forms/schemas/schema-validations.js +4 -4
  66. package/dist/collection/components/checkout/checkout-core.js +64 -5
  67. package/dist/collection/components/checkout/checkout.js +59 -1
  68. package/dist/collection/components/checkout/new-payment-method.js +94 -14
  69. package/dist/collection/components/checkout/payment-method-option-utils.js +2 -0
  70. package/dist/collection/components/checkout/payment-method-options.css +8 -0
  71. package/dist/collection/components/checkout/payment-method-options.js +98 -14
  72. package/dist/collection/components/checkout/save-new-payment-method.js +38 -0
  73. package/dist/collection/components/checkout/saved-payment-method.js +11 -4
  74. package/dist/collection/components/checkout/sezzle-payment-method.js +11 -4
  75. package/dist/collection/components/details/details.js +1 -1
  76. package/dist/collection/components/form/form-control-checkbox.js +1 -1
  77. package/dist/collection/components/form/form-control-date.js +1 -1
  78. package/dist/collection/components/form/form-control-file.js +1 -1
  79. package/dist/collection/components/form/form-control-monetary.js +1 -1
  80. package/dist/collection/components/form/form-control-number-masked.js +1 -1
  81. package/dist/collection/components/form/form-control-number.js +1 -1
  82. package/dist/collection/components/form/form-control-select.js +1 -1
  83. package/dist/collection/components/form/form-control-text.js +1 -1
  84. package/dist/collection/components/form/utils.js +12 -3
  85. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  86. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance-core.js +2 -2
  87. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +1 -1
  88. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +1 -1
  89. package/dist/collection/components/payment-details/payment-details-core.js +7 -7
  90. package/dist/collection/components/payment-form/payment-form.js +3 -3
  91. package/dist/collection/components/payment-form/payment-method-selector.js +1 -1
  92. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  93. package/dist/collection/components/payout-details/payout-details-core.js +1 -1
  94. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  95. package/dist/collection/components/proceeds-list/proceeds-list.js +1 -1
  96. package/dist/collection/components/refund-form/refund-form.js +1 -1
  97. package/dist/collection/components/skeleton/skeleton.js +1 -1
  98. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +1 -1
  99. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +1 -1
  100. package/dist/collection/components/subaccount-details/subaccount-details.js +1 -1
  101. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +1 -1
  102. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +1 -1
  103. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +1 -1
  104. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +1 -1
  105. package/dist/collection/components/subaccounts-list/subaccounts-list.js +1 -1
  106. package/dist/collection/utils/utils.js +5 -0
  107. package/dist/docs.json +415 -41
  108. package/dist/esm/{Analytics-17c33e9e.js → Analytics-c52faca6.js} +1 -1
  109. package/dist/esm/{SubAccount-8bf9cb0c.js → SubAccount-7fcb1450.js} +1 -1
  110. package/dist/esm/additional-questions-details_5.entry.js +1 -1
  111. package/dist/esm/{business-additional-questions-schema-b00a73ba.js → business-additional-questions-schema-956e3caf.js} +2 -2
  112. package/dist/esm/form-alert_5.entry.js +2 -2
  113. package/dist/esm/form-control-checkbox_5.entry.js +7 -10
  114. package/dist/esm/form-control-date_3.entry.js +3 -3
  115. package/dist/esm/form-control-error-text_4.entry.js +2 -2
  116. package/dist/esm/form-control-file.entry.js +1 -1
  117. package/dist/esm/form-control-monetary.entry.js +1 -1
  118. package/dist/esm/form-control-number.entry.js +1 -1
  119. package/dist/esm/gross-payment-chart-core.entry.js +2 -2
  120. package/dist/esm/justifi-additional-questions-form-step_10.entry.js +9 -12
  121. package/dist/esm/justifi-bank-account-form.entry.js +2 -2
  122. package/dist/esm/justifi-billing-form_2.entry.js +13 -1678
  123. package/dist/esm/justifi-business-details.entry.js +2 -2
  124. package/dist/esm/justifi-business-form.entry.js +5 -5
  125. package/dist/esm/justifi-business-list.entry.js +1 -1
  126. package/dist/esm/justifi-card-form.entry.js +2 -2
  127. package/dist/esm/justifi-checkout-core.entry.js +13 -5
  128. package/dist/esm/justifi-checkout.entry.js +11 -3
  129. package/dist/esm/justifi-details.entry.js +1 -1
  130. package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
  131. package/dist/esm/justifi-new-payment-method_4.entry.js +68 -26
  132. package/dist/esm/justifi-payment-balance-transactions.entry.js +2 -2
  133. package/dist/esm/justifi-payment-details.entry.js +2 -2
  134. package/dist/esm/justifi-payment-form.entry.js +6 -6
  135. package/dist/esm/justifi-payment-method-form.entry.js +1684 -0
  136. package/dist/esm/justifi-payment-method-selector.entry.js +1 -1
  137. package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
  138. package/dist/esm/justifi-payments-list.entry.js +2 -2
  139. package/dist/esm/justifi-payout-details.entry.js +2 -2
  140. package/dist/esm/justifi-payouts-list.entry.js +2 -2
  141. package/dist/esm/justifi-proceeds-list.entry.js +2 -2
  142. package/dist/esm/justifi-refund-form.entry.js +1 -1
  143. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +3 -3
  144. package/dist/esm/justifi-season-interruption-insurance.entry.js +1 -1
  145. package/dist/esm/justifi-skeleton.entry.js +1 -1
  146. package/dist/esm/justifi-subaccount-details.entry.js +3 -3
  147. package/dist/esm/justifi-subaccounts-list.entry.js +3 -3
  148. package/dist/esm/loader.js +1 -1
  149. package/dist/esm/{package-02a6e473.js → package-8ab448a3.js} +1 -1
  150. package/dist/esm/{payload-parsers-a9e8f8cc.js → payload-parsers-57289fc4.js} +1 -1
  151. package/dist/esm/payment-details-core.entry.js +8 -8
  152. package/dist/esm/payments-list-core.entry.js +2 -2
  153. package/dist/esm/payout-details-core.entry.js +2 -2
  154. package/dist/esm/payouts-list-core.entry.js +2 -2
  155. package/dist/esm/{schema-validations-770bdf3e.js → schema-validations-a83ff220.js} +3 -4
  156. package/dist/esm/subaccount-account-details_4.entry.js +5 -5
  157. package/dist/esm/subaccount-bank-details.entry.js +1 -1
  158. package/dist/esm/subaccount-terms-details.entry.js +1 -1
  159. package/dist/esm/{utils-61a21dea.js → utils-5f4c4faa.js} +6 -1
  160. package/dist/esm/{utils-8de964da.js → utils-c7b3f21a.js} +12 -3
  161. package/dist/esm/webcomponents.js +1 -1
  162. package/dist/module/SubAccount.js +1 -1
  163. package/dist/module/additional-questions.js +1 -1
  164. package/dist/module/billing-form.js +2 -2
  165. package/dist/module/business-additional-questions-form-step.js +1 -1
  166. package/dist/module/business-core-info-form-step.js +3 -2
  167. package/dist/module/business-core-info-schema.js +1 -1
  168. package/dist/module/business-representative-form-step.js +1 -4
  169. package/dist/module/checkout-core.js +37 -21
  170. package/dist/module/details.js +1 -1
  171. package/dist/module/form-control-checkbox2.js +1 -1
  172. package/dist/module/form-control-date2.js +1 -1
  173. package/dist/module/form-control-file2.js +1 -1
  174. package/dist/module/form-control-monetary2.js +1 -1
  175. package/dist/module/form-control-number-masked2.js +1 -1
  176. package/dist/module/form-control-number.js +1 -1
  177. package/dist/module/form-control-select2.js +1 -1
  178. package/dist/module/form-control-text2.js +1 -1
  179. package/dist/module/gross-payment-chart-core2.js +1 -1
  180. package/dist/module/justifi-checkout.js +35 -20
  181. package/dist/module/justifi-payment-balance-transactions.js +2 -2
  182. package/dist/module/justifi-payment-form.js +3 -3
  183. package/dist/module/justifi-proceeds-list.js +1 -1
  184. package/dist/module/justifi-refund-form.js +1 -1
  185. package/dist/module/justifi-save-new-payment-method.d.ts +11 -0
  186. package/dist/module/justifi-save-new-payment-method.js +6 -0
  187. package/dist/module/justifi-season-interruption-insurance.js +1 -1
  188. package/dist/module/justifi-subaccount-details.js +2 -2
  189. package/dist/module/justifi-subaccounts-list.js +2 -2
  190. package/dist/module/new-payment-method.js +52 -24
  191. package/dist/module/owner-form.js +2 -5
  192. package/dist/module/package.js +1 -1
  193. package/dist/module/payment-details-core2.js +8 -8
  194. package/dist/module/payment-method-options.js +51 -26
  195. package/dist/module/payment-method-selector.js +1 -1
  196. package/dist/module/payments-list-core2.js +2 -2
  197. package/dist/module/payout-details-core2.js +2 -2
  198. package/dist/module/payouts-list-core2.js +2 -2
  199. package/dist/module/save-new-payment-method.js +36 -0
  200. package/dist/module/saved-payment-method.js +7 -2
  201. package/dist/module/schema-validations.js +3 -4
  202. package/dist/module/season-interruption-insurance-core.js +2 -2
  203. package/dist/module/sezzle-payment-method.js +5 -2
  204. package/dist/module/skeleton.js +1 -1
  205. package/dist/module/subaccount-account-details2.js +1 -1
  206. package/dist/module/subaccount-bank-details.js +1 -1
  207. package/dist/module/subaccount-merchant-details2.js +2 -2
  208. package/dist/module/subaccount-owners-details2.js +1 -1
  209. package/dist/module/subaccount-representative-details2.js +1 -1
  210. package/dist/module/subaccount-terms-details.js +1 -1
  211. package/dist/module/utils2.js +6 -1
  212. package/dist/module/utils3.js +12 -3
  213. package/dist/types/api/Checkout.d.ts +6 -0
  214. package/dist/types/components/business-forms/owner-form/owner-form.d.ts +0 -1
  215. package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.d.ts +0 -1
  216. package/dist/types/components/business-forms/schemas/schema-helpers.d.ts +0 -1
  217. package/dist/types/components/checkout/checkout-core.d.ts +5 -1
  218. package/dist/types/components/checkout/checkout.d.ts +5 -0
  219. package/dist/types/components/checkout/new-payment-method.d.ts +8 -2
  220. package/dist/types/components/checkout/payment-method-option-utils.d.ts +1 -0
  221. package/dist/types/components/checkout/payment-method-options.d.ts +6 -2
  222. package/dist/types/components/checkout/payment-method-payload.d.ts +1 -0
  223. package/dist/types/components/checkout/save-new-payment-method.d.ts +7 -0
  224. package/dist/types/components/checkout/saved-payment-method.d.ts +1 -1
  225. package/dist/types/components/checkout/sezzle-payment-method.d.ts +1 -1
  226. package/dist/types/components/form/utils.d.ts +1 -1
  227. package/dist/types/components/payment-method-form/payment-method-responses.d.ts +6 -4
  228. package/dist/types/components.d.ts +55 -12
  229. package/dist/types/utils/utils.d.ts +1 -0
  230. package/dist/webcomponents/{p-4791c1f2.entry.js → p-00de4ae0.entry.js} +1 -1
  231. package/dist/webcomponents/{p-0f10316f.entry.js → p-015ba24e.entry.js} +1 -1
  232. package/dist/webcomponents/p-0575daac.js +1 -0
  233. package/dist/webcomponents/p-0a09edbb.entry.js +1 -0
  234. package/dist/webcomponents/{p-31031d15.entry.js → p-0fc18c89.entry.js} +1 -1
  235. package/dist/webcomponents/{p-f14db665.entry.js → p-100cb35c.entry.js} +1 -1
  236. package/dist/webcomponents/{p-b01c0120.entry.js → p-189dee9f.entry.js} +1 -1
  237. package/dist/webcomponents/{p-288c95b3.entry.js → p-1c60004a.entry.js} +1 -1
  238. package/dist/webcomponents/{p-65969627.entry.js → p-30a7bebc.entry.js} +2 -2
  239. package/dist/webcomponents/{p-7ae2d26f.entry.js → p-378bb067.entry.js} +1 -1
  240. package/dist/webcomponents/p-3fd13ca3.js +1 -0
  241. package/dist/webcomponents/{p-923c37a2.entry.js → p-404d7c56.entry.js} +1 -1
  242. package/dist/webcomponents/{p-f18e63c3.entry.js → p-43326623.entry.js} +1 -1
  243. package/dist/webcomponents/{p-9228912b.entry.js → p-4c5f9260.entry.js} +1 -1
  244. package/dist/webcomponents/{p-7c28a80d.entry.js → p-5309e887.entry.js} +1 -1
  245. package/dist/webcomponents/{p-fee616cf.entry.js → p-6006e085.entry.js} +1 -1
  246. package/dist/webcomponents/{p-9c00adf1.entry.js → p-61e486ad.entry.js} +1 -1
  247. package/dist/webcomponents/{p-eefe2f29.entry.js → p-738049aa.entry.js} +1 -1
  248. package/dist/webcomponents/{p-56275f64.entry.js → p-739f1e09.entry.js} +1 -1
  249. package/dist/webcomponents/{p-4b260a52.entry.js → p-7f77d91f.entry.js} +1 -1
  250. package/dist/webcomponents/{p-ebce7b2f.entry.js → p-84b3cead.entry.js} +1 -1
  251. package/dist/webcomponents/{p-06baf263.entry.js → p-8805d083.entry.js} +1 -1
  252. package/dist/webcomponents/p-89887332.js +1 -0
  253. package/dist/webcomponents/p-95c18035.entry.js +1 -0
  254. package/dist/webcomponents/{p-fa9773c0.entry.js → p-95c8c313.entry.js} +1 -1
  255. package/dist/webcomponents/p-97220d5b.entry.js +1 -0
  256. package/dist/webcomponents/{p-8e8f5033.entry.js → p-98985c7d.entry.js} +1 -1
  257. package/dist/webcomponents/{p-e3a31451.entry.js → p-9936c393.entry.js} +1 -1
  258. package/dist/webcomponents/p-9d03464e.entry.js +1 -0
  259. package/dist/webcomponents/{p-3a7e0753.entry.js → p-a34c28af.entry.js} +1 -1
  260. package/dist/webcomponents/{p-d42e284d.entry.js → p-a6477232.entry.js} +1 -1
  261. package/dist/webcomponents/{p-2451611d.entry.js → p-a90a6703.entry.js} +1 -1
  262. package/dist/webcomponents/{p-a33c3e1c.entry.js → p-b1a24d24.entry.js} +1 -1
  263. package/dist/webcomponents/{p-9b1e7f5e.entry.js → p-b27d2ce1.entry.js} +1 -1
  264. package/dist/webcomponents/{p-3394ff6c.js → p-b7d9d9fa.js} +1 -1
  265. package/dist/webcomponents/{p-1e53021d.entry.js → p-be049573.entry.js} +1 -1
  266. package/dist/webcomponents/{p-c85fb952.entry.js → p-bfe69314.entry.js} +1 -1
  267. package/dist/webcomponents/{p-9601cf9d.entry.js → p-c2d6a5e2.entry.js} +1 -1
  268. package/dist/webcomponents/{p-4b4fc43d.js → p-c4264aaf.js} +1 -1
  269. package/dist/webcomponents/{p-808c8988.entry.js → p-c69713c2.entry.js} +1 -1
  270. package/dist/webcomponents/{p-9e5d765c.js → p-c8c08fe3.js} +1 -1
  271. package/dist/webcomponents/{p-b94bf537.entry.js → p-d779f2f2.entry.js} +1 -1
  272. package/dist/webcomponents/{p-26779944.entry.js → p-da313a7e.entry.js} +1 -1
  273. package/dist/webcomponents/{p-6ce586e0.entry.js → p-e04f7070.entry.js} +1 -1
  274. package/dist/webcomponents/p-e7915927.entry.js +1 -0
  275. package/dist/webcomponents/{p-fb53112b.js → p-e8c651b8.js} +1 -1
  276. package/dist/webcomponents/p-eb142b8a.entry.js +1 -0
  277. package/dist/webcomponents/{p-851e57f4.js → p-edb605b3.js} +1 -1
  278. package/dist/webcomponents/{p-e673e681.entry.js → p-efe744ce.entry.js} +1 -1
  279. package/dist/webcomponents/p-f6858597.entry.js +1 -0
  280. package/dist/webcomponents/p-f68cf935.entry.js +1 -0
  281. package/dist/webcomponents/{p-3f06ce2f.entry.js → p-fcf42299.entry.js} +1 -1
  282. package/dist/webcomponents/webcomponents.esm.js +1 -1
  283. package/package.json +1 -1
  284. package/dist/webcomponents/p-038fb958.entry.js +0 -1
  285. package/dist/webcomponents/p-144e4bda.js +0 -1
  286. package/dist/webcomponents/p-1feebf9c.entry.js +0 -1
  287. package/dist/webcomponents/p-306aea52.entry.js +0 -1
  288. package/dist/webcomponents/p-6b05f357.entry.js +0 -1
  289. package/dist/webcomponents/p-71800e4c.js +0 -1
  290. package/dist/webcomponents/p-88d68804.entry.js +0 -1
  291. package/dist/webcomponents/p-8a6049ed.js +0 -1
  292. package/dist/webcomponents/p-bacd9d6e.entry.js +0 -1
  293. package/dist/webcomponents/p-f3ae3cb6.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as s,g as o}from"./p-a63a6fb9.js";const h=class{constructor(e){t(this,e),this.formControlInput=i(this,"formControlInput",7),this.formControlBlur=i(this,"formControlBlur",7),this.fileSelected=i(this,"fileSelected",7),this.handleFormControlInput=t=>{const i=t.target,e=i.getAttribute("name");this.inputHandler(e,i.value),this.formControlInput.emit({name:e,value:i.value})},this.changeHandler=()=>{const t=this.fileInput.files;t&&this.fileSelected.emit({fileList:t,document_type:this.documentType})},this.files=void 0,this.fileString=void 0,this.label=void 0,this.name=void 0,this.helpText=void 0,this.errorText=void 0,this.multiple=void 0,this.documentType=void 0,this.inputHandler=void 0,this.disabled=void 0}componentDidLoad(){this.fileInput=this.el.querySelector("input")}render(){return e(s,{key:"251933346ee879057b88613bc546461d94db2fc5",exportparts:"label,input,input-invalid"},e("div",{key:"18e1655e8d66826597211fa75f2342d403957387",class:"form-group d-flex flex-column"},e("label",{key:"a125ef003eaf3e309a5f8fc571b1865ebd5ab9e5",part:"label",class:"form-label",htmlFor:this.name},this.label),e("input",{key:"c912e0bedff94de4092069f9b07a052ea26a7f7e",ref:t=>this.fileInput=t,type:"file",name:this.name,part:`input ${this.errorText?"input-invalid ":""}${this.disabled?" input-disabled":""}`,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onChange:this.changeHandler,onInput:this.handleFormControlInput,onBlur:()=>this.formControlBlur.emit()}),e("form-control-help-text",{key:"17d54a1ee673d5605431812b8c4ae8b74fbcdc2f",helpText:this.helpText,name:this.name}),e("form-control-error-text",{key:"054e01d82c2da5e616072af552dadd9fe7dda16d",errorText:this.errorText,name:this.name})))}get el(){return o(this)}};export{h as form_control_file}
1
+ import{r as t,c as i,h as e,H as s,g as o}from"./p-a63a6fb9.js";const h=class{constructor(e){t(this,e),this.formControlInput=i(this,"formControlInput",7),this.formControlBlur=i(this,"formControlBlur",7),this.fileSelected=i(this,"fileSelected",7),this.handleFormControlInput=t=>{const i=t.target,e=i.getAttribute("name");this.inputHandler(e,i.value),this.formControlInput.emit({name:e,value:i.value})},this.changeHandler=()=>{const t=this.fileInput.files;t&&this.fileSelected.emit({fileList:t,document_type:this.documentType})},this.files=void 0,this.fileString=void 0,this.label=void 0,this.name=void 0,this.helpText=void 0,this.errorText=void 0,this.multiple=void 0,this.documentType=void 0,this.inputHandler=void 0,this.disabled=void 0}componentDidLoad(){this.fileInput=this.el.querySelector("input")}render(){return e(s,{key:"2219dfef80cb3ef71148fbc4d2d29df6583d6779",exportparts:"label,input,input-invalid"},e("div",{key:"18d059b17b226815a97cf1be429857bd93e43115",class:"form-group d-flex flex-column"},e("label",{key:"91adf40d0dd7559888b7c37eeee40f363628bada",part:"label",class:"form-label",htmlFor:this.name},this.label),e("input",{key:"6aa37be009cce396e2f1268429c94b812d48167e",ref:t=>this.fileInput=t,type:"file",name:this.name,part:`input ${this.errorText?"input-invalid ":""}${this.disabled?" input-disabled":""}`,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onChange:this.changeHandler,onInput:this.handleFormControlInput,onBlur:()=>this.formControlBlur.emit()}),e("form-control-help-text",{key:"d4241aceb5a40b2dfedebc9658b128231d43fcc0",helpText:this.helpText,name:this.name}),e("form-control-error-text",{key:"af7dd8c90ea83f2f99f24100e97c9147f787aadf",errorText:this.errorText,name:this.name})))}get el(){return o(this)}};export{h as form_control_file}
@@ -1 +1 @@
1
- import{r,h as o,H as s}from"./p-a63a6fb9.js";import{A as i}from"./p-29c0b182.js";import{p as t}from"./p-56f6ce4c.js";import"./p-e8706cc4.js";import"./p-e3fab0e2.js";import{B as e}from"./p-af244664.js";import{s as a,f as n}from"./p-fb53112b.js";import{c as b}from"./p-ae263544.js";import"./p-1ff8810b.js";import"./p-6078a370.js";const c=class{constructor(o){r(this,o),this.mapProductStatusToBadge=r=>r?"bg-success":"bg-secondary",this.handleClickPrevious=r=>{const o=Object.assign({},this.params);delete o.after_cursor,this.params=Object.assign(Object.assign({},o),{before_cursor:r})},this.handleClickNext=r=>{const o=Object.assign({},this.params);delete o.before_cursor,this.params=Object.assign(Object.assign({},o),{after_cursor:r})},this.accountId=void 0,this.authToken=void 0,this.businesses=[],this.loading=!0,this.errorMessage=void 0,this.paging=t,this.params=void 0}updateOnPropChange(){this.fetchData()}connectedCallback(){this.fetchData()}async fetchData(){var r;if(!this.accountId||!this.authToken)return this.errorMessage="Can not fetch any data without an AccountID and an AuthToken",void(this.loading=!1);this.loading=!0;let o={account_id:this.accountId};const s=await i({authToken:this.authToken,apiOrigin:b.proxyApiOrigin}).get("entities/business",Object.assign(Object.assign({},o),this.params));if(s.error)this.errorMessage="string"==typeof s.error?s.error:s.error.message;else{this.paging=Object.assign(Object.assign({},this.paging),s.page_info);const o=null===(r=null==s?void 0:s.data)||void 0===r?void 0:r.map((r=>new e(r)));this.businesses=o}this.loading=!1}render(){return o(s,{key:"5804c528d78363f4857f82f769677f808cc144b9"},o("justifi-table",{key:"120a6396d239224410b24997652bde4e2c2625bf",columnData:[["Legal Name","The name associated with this Business"],["Business Classification","The business classification"],["Tax ID","The tax ID associated with this business"],["Industry","The industry this business participates in"],["Product Ready","List of our products that are used by this business"],["Created at","Date this business was created"]],rowData:this.businesses.map((r=>[r.legal_name,a(r.classification),r.tax_id,r.industry,{type:"inner",value:`\n <div class="d-flex flex-nowrap gap-1">\n <span class="badge ${this.mapProductStatusToBadge(r.product_categories.credit)}">Credit</span>\n <span class="badge ${this.mapProductStatusToBadge(r.product_categories.insurance)}">Insurance</span>\n <span class="badge ${this.mapProductStatusToBadge(r.product_categories.lending)}">Lending</span>\n <span class="badge ${this.mapProductStatusToBadge(r.product_categories.payment)}">Payment</span>\n </div>\n `},n(r.created_at)])),loading:this.loading,"error-message":this.errorMessage,params:this.params,paging:Object.assign(Object.assign({},this.paging),{handleClickNext:this.handleClickNext,handleClickPrevious:this.handleClickPrevious})}))}static get watchers(){return{accountId:["updateOnPropChange"],authToken:["updateOnPropChange"],params:["updateOnPropChange"]}}};c.style=':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}: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}';export{c as justifi_business_list}
1
+ import{r,h as o,H as s}from"./p-a63a6fb9.js";import{A as i}from"./p-29c0b182.js";import{p as t}from"./p-56f6ce4c.js";import"./p-e8706cc4.js";import"./p-e3fab0e2.js";import{B as e}from"./p-af244664.js";import{s as a,f as n}from"./p-e8c651b8.js";import{c as b}from"./p-ae263544.js";import"./p-1ff8810b.js";import"./p-6078a370.js";const c=class{constructor(o){r(this,o),this.mapProductStatusToBadge=r=>r?"bg-success":"bg-secondary",this.handleClickPrevious=r=>{const o=Object.assign({},this.params);delete o.after_cursor,this.params=Object.assign(Object.assign({},o),{before_cursor:r})},this.handleClickNext=r=>{const o=Object.assign({},this.params);delete o.before_cursor,this.params=Object.assign(Object.assign({},o),{after_cursor:r})},this.accountId=void 0,this.authToken=void 0,this.businesses=[],this.loading=!0,this.errorMessage=void 0,this.paging=t,this.params=void 0}updateOnPropChange(){this.fetchData()}connectedCallback(){this.fetchData()}async fetchData(){var r;if(!this.accountId||!this.authToken)return this.errorMessage="Can not fetch any data without an AccountID and an AuthToken",void(this.loading=!1);this.loading=!0;let o={account_id:this.accountId};const s=await i({authToken:this.authToken,apiOrigin:b.proxyApiOrigin}).get("entities/business",Object.assign(Object.assign({},o),this.params));if(s.error)this.errorMessage="string"==typeof s.error?s.error:s.error.message;else{this.paging=Object.assign(Object.assign({},this.paging),s.page_info);const o=null===(r=null==s?void 0:s.data)||void 0===r?void 0:r.map((r=>new e(r)));this.businesses=o}this.loading=!1}render(){return o(s,{key:"5804c528d78363f4857f82f769677f808cc144b9"},o("justifi-table",{key:"120a6396d239224410b24997652bde4e2c2625bf",columnData:[["Legal Name","The name associated with this Business"],["Business Classification","The business classification"],["Tax ID","The tax ID associated with this business"],["Industry","The industry this business participates in"],["Product Ready","List of our products that are used by this business"],["Created at","Date this business was created"]],rowData:this.businesses.map((r=>[r.legal_name,a(r.classification),r.tax_id,r.industry,{type:"inner",value:`\n <div class="d-flex flex-nowrap gap-1">\n <span class="badge ${this.mapProductStatusToBadge(r.product_categories.credit)}">Credit</span>\n <span class="badge ${this.mapProductStatusToBadge(r.product_categories.insurance)}">Insurance</span>\n <span class="badge ${this.mapProductStatusToBadge(r.product_categories.lending)}">Lending</span>\n <span class="badge ${this.mapProductStatusToBadge(r.product_categories.payment)}">Payment</span>\n </div>\n `},n(r.created_at)])),loading:this.loading,"error-message":this.errorMessage,params:this.params,paging:Object.assign(Object.assign({},this.paging),{handleClickNext:this.handleClickNext,handleClickPrevious:this.handleClickPrevious})}))}static get watchers(){return{accountId:["updateOnPropChange"],authToken:["updateOnPropChange"],params:["updateOnPropChange"]}}};c.style=':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}: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}';export{c as justifi_business_list}
@@ -0,0 +1 @@
1
+ import{a as e,b as s}from"./p-2eab3c90.js";import{S as t}from"./p-6078a370.js";import{b as a,a as r,r as n,s as i,c as l}from"./p-ba5fae28.js";const c=e=>""===e?null:e,o=/^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/,d=/^(?!^\s+$)[a-zA-Z\s]*$/,u=/^\d+$/,m=/^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/,h=/P\.?\s?O\.?\s?Box|Postal\sBox/i;var b,v;!function(e){e.voidedCheck="voided_check",e.balanceSheet="balance_sheet",e.bankStatement="bank_statement",e.governmentId="government_id",e.profitAndLossStatement="profit_and_loss_statement",e.taxReturn="tax_return",e.other="other"}(b||(b={})),function(e){e.pending="pending",e.uploaded="uploaded",e.canceled="canceled",e.needed="needed"}(v||(v={}));class E{constructor(){this.voided_check=[],this.balance_sheet=[],this.bank_statement=[],this.government_id=[],this.profit_and_loss_statement=[],this.tax_return=[],this.other=[]}}class p{constructor(e,s){this.file=e.file,this.fileString=this.getFileString(),this.document_type=e.document_type,this.presigned_url=null,this.record_data={business_id:s,document_type:this.document_type,file_name:this.file.name,file_type:this.file.type}}getFileString(){let e=new FileReader;return e.onload=e=>{this.fileString=e.target.result},e.readAsDataURL(this.file),this.fileString}setPresignedUrl(e){this.presigned_url=e}}const S=e().email("Enter valid email").transform(c),N=e().matches(/^\d{10}$/,"Enter valid phone number").transform(c),g=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").matches(o,"Enter valid business name").transform(c),f=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").matches(o,"Enter valid doing business as").transform(c),y=e().matches(/^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/,"Enter valid website url").transform(c),_=e().oneOf(a.map((e=>e.value)),"Select business classification").transform(c),$=e().min(2,"Industry must be at least 2 characters").max(50,"Industry must be less than 50 characters").matches(d,"Enter valid industry").transform(c),w=e().matches(u,"Enter valid tax id, SSN, or EIN").test("not-repeat","Enter valid tax id, SSN, or EIN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid tax id, SSN, or EIN",(e=>"123456789"!==e)).transform(c),A=e().test("not-future","Date of incorporation cannot be in the future",(e=>new Date(e)<=new Date)).transform(c),x=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").matches(d,"Enter valid name").transform(c),I=e().min(2,"Title must be at least 2 characters").max(50,"Title must be less than 50 characters").matches(d,"Enter valid title").transform(c),P=s=>e().test("min","Enter a valid date",(e=>new Date(e)>=new Date("1902-01-01"))).test("age",`${s} must be at least 18 years old`,(e=>{const s=new Date(e),t=new Date;return t.setFullYear(t.getFullYear()-18),s<=t})).transform(c),D=e().matches(/^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/,"Enter valid SSN").when("ssn_last4",{is:e=>!e||0===e.length,then:e=>e.required("Enter SSN"),otherwise:e=>e.nullable()}).test("not-repeat","Enter valid SSN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid SSN",(e=>"123456789"!==e)).transform(c),z=e().min(5,"Address must be at least 5 characters").max(100,"Address must be less than 100 characters").matches(m,"Enter valid address line 1").test("not-po-box","A PO Box is not a valid address entry",(e=>!h.test(e))).transform(c),k=e().max(100,"Address must be less than 100 characters").matches(m,"Enter valid address line 2").test("not-po-box","A PO Box is not a valid address entry",(e=>!h.test(e))).transform(c),B=e().min(2,"City must be at least 2 characters").max(50,"City must be less than 50 characters").matches(d,"Enter valid city").transform(c),Z=e().oneOf(t.map((e=>e.value)),"Select state").transform(c),j=e().matches(/^[0-9]{5}$/,"Enter valid postal code").transform(c),q=e().matches(u,"Enter valid revenue").transform(c),C=e().matches(u,"Enter valid payment volume").transform(c),F=e().oneOf(r.map((e=>e.value)),"Select when service is received").transform(c),O=e().oneOf(n.map((e=>e.value)),"Select recurring payments").transform(c),R=e().when("business_recurring_payments",{is:e=>"Yes"===e,then:e=>e.required("Enter recurring payments percentage"),otherwise:e=>e.nullable()}).transform(c),T=e().oneOf(i.map((e=>e.value)),"Select seasonal business").transform(c),G=e().transform(c),H=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").matches(d,"Enter valid bank name").transform(c),J=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").matches(d,"Enter valid nickname").transform(c),K=e().oneOf(l.map((e=>e.value)),"Select account type").transform(c),L=e().min(8,"Account number must be at least 8 digits").max(17,"Account number must be less than 17 digits").matches(u,"Enter valid account number").test("not-repeat","Enter valid account number",(e=>!/^(\d)\1+$/.test(e))).transform(c),M=e().length(9,"Routing number must be 9 digits").matches(u,"Enter valid routing number").test("not-repeat","Enter valid routing number",(e=>!/^(\d)\1+$/.test(e))).test("valid","Enter valid routing number",(e=>(e=>{if(!e)return!1;const s=Array.from(String(e),Number);return 9===s.length&&0==(3*(s[0]+s[3]+s[6])+7*(s[1]+s[4]+s[7])+(s[2]+s[5]+s[8]))%10})(e))).transform(c),U=s(),Y=U,Q=U,V=U,W=(e,s)=>e.some((e=>e.document_type===b.voidedCheck))||s?U.nullable():U.required("Please select one or more files"),X=(e,s,t)=>{const a=parseInt(e);return s.some((e=>e.document_type===b.bankStatement))||t?U.nullable():a>=25e4&&!t?U.required("Please select one or more files"):void 0},ee=(e,s,t)=>{const a=parseInt(e);return s.some((e=>e.document_type===b.balanceSheet))||t?U.nullable():a>=1e6&&!t?U.required("Please select one or more files"):void 0},se=(e,s,t)=>{const a=parseInt(e);return s.some((e=>e.document_type===b.profitAndLossStatement))||t?U.nullable():a>=1e6&&!t?U.required("Please select one or more files"):void 0};export{J as A,K as B,L as C,M as D,W as E,Q as F,Y as G,V as H,ee as I,X as J,se as K,p as L,E as M,b as N,k as a,I as b,B as c,N as d,S as e,P as f,D as g,g as h,x as i,f as j,_ as k,z as l,$ as m,A as n,C as o,j as p,F as q,q as r,Z as s,w as t,O as u,R as v,y as w,T as x,G as y,H as z}
@@ -0,0 +1 @@
1
+ import{r as e,c as n,h as o,H as i}from"./p-a63a6fb9.js";import{p as t}from"./p-b7d9d9fa.js";import{p as r}from"./p-e8c651b8.js";var a,s={exports:{}};a=s,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,o,i=0,t=!1,r=!1,s=7,c="[iFrameSizer]",d=c.length,f=null,u=window.requestAnimationFrame,l=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),m={},h=null,w=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){z("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),b={};window.jQuery!==e&&((o=window.jQuery).fn?o.fn.iFrameResize||(o.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,o){H(o,e)})).end()}):k("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof e&&e.amd?e([],q):a.exports=q(),window.iFrameResize=window.iFrameResize||q()}function g(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function p(e,n,o){e.addEventListener(n,o,!1)}function y(e,n,o){e.removeEventListener(n,o,!1)}function v(e){return m[e]?m[e].log:t}function j(e,n){x("log",e,n,v(e))}function k(e,n){x("info",e,n,v(e))}function z(e,n){x("warn",e,n,!0)}function x(e,n,o,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return c+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),o)}function F(e){function n(){o("Height"),o("Width"),E((function(){W(L),R(V),h("onResized",L)}),L,"init")}function o(e){var n=Number(m[V]["max"+e]),o=Number(m[V]["min"+e]),i=e.toLowerCase(),t=Number(L[i]);j(V,"Checking "+i+" is in range "+o+"-"+n),t<o&&(t=o,j(V,"Set "+i+" to min value")),t>n&&(t=n,j(V,"Set "+i+" to max value")),L[i]=""+t}function i(e){return H.slice(H.indexOf(":")+s+e)}function t(e,n){var o,i;o=function(){var o,i;N("Send Page Info","pageInfo:"+(o=document.body.getBoundingClientRect(),i=L.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-o.top,10),offsetLeft:parseInt(i.left-o.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},b[i=n]||(b[i]=setTimeout((function(){b[i]=null,o()}),32))}function r(e){var n=e.getBoundingClientRect();return O(V),{x:Math.floor(Number(n.left)+Number(f.x)),y:Math.floor(Number(n.top)+Number(f.y))}}function a(e){var n=e?r(L.iframe):{x:0,y:0},o={x:Number(L.width)+n.x,y:Number(L.height)+n.y};j(V,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(f=o,u(),j(V,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](o.x,o.y):z(V,"Unable to scroll to requested position, window.parentIFrame not found")}function u(){!1===h("onScroll",f)?T():R(V)}function l(e){var n={};if(0===Number(L.width)&&0===Number(L.height)){var o=i(9).split(":");n={x:o[1],y:o[0]}}else n={x:L.width,y:L.height};h(e,{iframe:L.iframe,screenX:Number(n.x),screenY:Number(n.y),type:L.type})}function h(e,n){return M(V,e,n)}var w,g,v,x,F,I,H=e.data,L={},V=null;"[iFrameResizerChild]Ready"===H?function(){for(var e in m)N("iFrame requested init",A(e),m[e].iframe,e)}():c===(""+H).slice(0,d)&&H.slice(d).split(":")[0]in m?(x=(v=H.slice(d).split(":"))[1]?parseInt(v[1],10):0,F=m[v[0]]&&m[v[0]].iframe,I=getComputedStyle(F),L={iframe:F,id:v[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(I)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(I),width:v[2],type:v[3]},m[V=L.id]&&(m[V].loaded=!0),(g=L.type in{true:1,false:1,undefined:1})&&j(V,"Ignoring init message from meta parent page"),!g&&function(e){var n=!0;return m[e]||(n=!1,z(L.type+" No settings for "+e+". Message was: "+H)),n}(V)&&(j(V,"Received: "+H),w=!0,null===L.iframe&&(z(V,"IFrame ("+L.id+") not found"),w=!1),w&&function(){var n,o=e.origin,i=m[V]&&m[V].checkOrigin;if(i&&""+o!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(j(V,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===o){n=!0;break}return n}():(j(V,"Checking connection is from: "+(n=m[V]&&m[V].remoteHost)),o===n)))throw new Error("Unexpected message received from: "+o+" for "+L.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(m[V]&&m[V].firstRun&&m[V]&&(m[V].firstRun=!1),L.type){case"close":S(L.iframe);break;case"message":d=i(6),j(V,"onMessage passed: {iframe: "+L.iframe.id+", message: "+d+"}"),h("onMessage",{iframe:L.iframe,message:JSON.parse(d)}),j(V,"--");break;case"mouseenter":l("onMouseEnter");break;case"mouseleave":l("onMouseLeave");break;case"autoResize":m[V].autoResize=JSON.parse(i(9));break;case"scrollTo":a(!1);break;case"scrollToOffset":a(!0);break;case"pageInfo":t(m[V]&&m[V].iframe,V),function(){function e(e,i){function r(){m[o]?t(m[o].iframe,o):n()}["scroll","resize"].forEach((function(n){j(o,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",y)}var o=V;e("Add ",p),m[o]&&(m[o].stopPageInfo=n)}();break;case"pageInfoStop":m[V]&&m[V].stopPageInfo&&(m[V].stopPageInfo(),delete m[V].stopPageInfo);break;case"inPageLink":o=i(9).split("#")[1]||"",s=decodeURIComponent(o),(c=document.getElementById(s)||document.getElementsByName(s)[0])?(e=r(c),j(V,"Moving to in page link (#"+o+") at x: "+e.x+" y: "+e.y),f={x:e.x,y:e.y},u(),j(V,"--")):window.top===window.self?j(V,"In page link #"+o+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(o):j(V,"In page link #"+o+" not found and window.parentIFrame not found");break;case"reset":C(L);break;case"init":n(),h("onInit",L.iframe);break;default:0===Number(L.width)&&0===Number(L.height)?z("Unsupported message received ("+L.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,o,s,c,d}())):k(V,"Ignored: "+H)}function M(e,n,o){var i=null,t=null;if(m[e]){if("function"!=typeof(i=m[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");t=i(o)}return t}function I(e){delete m[e.id]}function S(e){var o=e.id;if(!1!==M(o,"onClose",o)){j(o,"Removing iFrame: "+o);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){z(e)}M(o,"onClosed",o),j(o,"--"),I(e),n&&(n.disconnect(),n=null)}else j(o,"Close iframe cancelled by onClose event")}function O(n){null===f&&j(n,"Get page position: "+(f={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+f.y)}function R(e){null!==f&&(window.scrollTo(f.x,f.y),j(e,"Set page position: "+f.x+","+f.y),T())}function T(){f=null}function C(e){j(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),O(e.id),E((function(){W(e),N("reset","reset",e.iframe,e.id)}),e,"reset")}function W(e){function n(n){r||"0"!==e[n]||(r=!0,j(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(m).forEach((function(e){!function(e){function n(n){return"0px"===(m[e]&&m[e].iframe.style[n])}m[e]&&null!==m[e].iframe.offsetParent&&(n("height")||n("width"))&&N("Visibility change","resize",m[e].iframe,e)}(e)}))}function n(n){j("window","Mutation observed: "+n[0].target+" "+n[0].type),L(e,16)}var o,i=g();i&&(o=document.querySelector("body"),new i(n).observe(o,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function o(o){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",j(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):j("undefined","messageData id not set")}(o),n(o)}var i=e.iframe.id;m[i]&&(m[i].sizeHeight&&o("height"),m[i].sizeWidth&&o("width"))}function E(e,n,o){o!==n.type&&u&&!window.jasmine?(j(n.id,"Requesting animation frame"),u(e)):e()}function N(e,n,o,i,t){var r,a=!1;m[i=i||o.id]&&(o&&"contentWindow"in o&&null!==o.contentWindow?(j(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=m[i]&&m[i].targetOrigin)),o.contentWindow.postMessage(c+n,r)):z(i,"["+e+"] IFrame("+i+") not found"),t&&m[i]&&m[i].warningTimeout&&(m[i].msgTimeout=setTimeout((function(){!m[i]||m[i].loaded||a||(a=!0,z(i,"IFrame has not responded within "+m[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),m[i].warningTimeout)))}function A(e){return e+":"+m[e].bodyMarginV1+":"+m[e].sizeWidth+":"+m[e].log+":"+m[e].interval+":"+m[e].enablePublicMethods+":"+m[e].autoResize+":"+m[e].bodyMargin+":"+m[e].heightCalculationMethod+":"+m[e].bodyBackground+":"+m[e].bodyPadding+":"+m[e].tolerance+":"+m[e].inPageLinks+":"+m[e].resizeFrom+":"+m[e].widthCalculationMethod+":"+m[e].mouseEvents}function H(o,r){function a(e){var n=e.split("Callback");if(2===n.length){var o="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[o]=this[e],delete this[e],z(d,"Deprecated: '"+e+"' has been renamed '"+o+"'. The old method will be removed in the next major version.")}}var s,c,d=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(o.id=(n=r&&r.id||w.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),t=(r||{}).log,j(e,"Added missing iframe ID: "+e+" ("+o.src+")")),e}(o.id);d in m&&"iFrameResizer"in o?z(d,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},m[d]=Object.create(null),m[d].iframe=o,m[d].firstRun=!0,m[d].remoteHost=o.src&&o.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in w)Object.prototype.hasOwnProperty.call(w,n)&&(m[d][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:w[n])}(e),m[d]&&(m[d].targetOrigin=!0===m[d].checkOrigin?""===(n=m[d].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(j(d,"IFrame scrolling "+(m[d]&&m[d].scrolling?"enabled":"disabled")+" for "+d),o.style.overflow=!1===(m[d]&&m[d].scrolling)?"hidden":"auto",m[d]&&m[d].scrolling){case"omit":break;case!0:o.scrolling="yes";break;case!1:o.scrolling="no";break;default:o.scrolling=m[d]?m[d].scrolling:"no"}}(),function(){function e(e){var n=m[d][e];1/0!==n&&0!==n&&(o.style[e]="number"==typeof n?n+"px":n,j(d,"Set "+e+" = "+o.style[e]))}function n(e){if(m[d]["min"+e]>m[d]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(m[d]&&m[d].bodyMargin)&&"0"!==(m[d]&&m[d].bodyMargin)||(m[d].bodyMarginV1=m[d].bodyMargin,m[d].bodyMargin=m[d].bodyMargin+"px"),s=A(d),(c=g())&&(n=function(e){if(!o.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===o&&S(o)}))}))}));return n.observe(o.parentNode,{childList:!0}),n}(c)),p(o,"load",(function(){N("iFrame.onload",s,o,e,!0),(!m[d]||!m[d].firstRun)&&m[d]&&m[d].heightCalculationMethod in l&&C({iframe:o,height:0,width:0,type:"init"})})),N("init",s,o,e,!0),m[d]&&(m[d].iframe.iFrameResizer={close:S.bind(null,m[d].iframe),removeListeners:I.bind(null,m[d].iframe),resize:N.bind(null,"Window resize","resize",m[d].iframe),moveToAnchor:function(e){N("Move to anchor","moveToAnchor:"+e,m[d].iframe,d)},sendMessage:function(e){N("Send Message","message:"+(e=JSON.stringify(e)),m[d].iframe,d)}}))}function L(e,n){null===h&&(h=setTimeout((function(){h=null,e()}),n))}function V(){"hidden"!==document.visibilityState&&(j("document","Trigger event: Visibility change"),L((function(){P("Tab Visible","resize")}),16))}function P(e,n){Object.keys(m).forEach((function(o){(function(e){return m[e]&&"parent"===m[e].resizeFrom&&m[e].autoResize&&!m[e].firstRun})(o)&&N(e,n,m[o].iframe,o)}))}function q(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),H(n,e),o.push(n))}var o;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!u;e+=1)u=window[n[e]+"RequestAnimationFrame"];u?u=u.bind(window):j("setup","RequestAnimationFrame not supported")}(),p(window,"message",F),p(window,"resize",(function(){j("window","Trigger event: resize"),L((function(){P("Window resize","resize")}),16)})),p(document,"visibilitychange",V),p(document,"-webkit-visibilitychange",V),function(i,t){switch(o=[],function(e){e&&e.enablePublicMethods&&z("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof t){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(t||"iframe"),n.bind(e,i));break;case"object":n(i,t);break;default:throw new TypeError("Unexpected data type ("+typeof t+")")}return o}}}();const c=s.exports,d={card:{ready:"justifi.card.ready",tokenize:"justifi.card.tokenize",validate:"justifi.card.validate",resize:"justifi.card.resize",styleOverrides:"justifi.card.styleOverrides"},bankAccount:{ready:"justifi.bankAccount.ready",tokenize:"justifi.bankAccount.tokenize",validate:"justifi.bankAccount.validate",resize:"justifi.bankAccount.resize",styleOverrides:"justifi.bankAccount.styleOverrides"}};class f{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const o=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(o,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((o=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),o(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const u=class{constructor(o){e(this,o),this.paymentMethodFormReady=n(this,"paymentMethodFormReady",7),this.paymentMethodFormValidated=n(this,"paymentMethodFormValidated",7),this.paymentMethodFormTokenized=n(this,"paymentMethodFormTokenized",7),this.computedTheme=(()=>{const e=getComputedStyle(document.body);return{loadGoogleFont:e.getPropertyValue("--jfi-load-google-font"),layout:{fontFamily:e.getPropertyValue("--jfi-layout-font-family"),padding:e.getPropertyValue("--jfi-layout-padding"),formControlSpacingHorizontal:e.getPropertyValue("--jfi-layout-form-control-spacing-x"),formControlSpacingVertical:e.getPropertyValue("--jfi-layout-form-control-spacing-y")},formControl:{backgroundColor:e.getPropertyValue("--jfi-form-control-background-color"),borderColor:e.getPropertyValue("--jfi-form-control-border-color"),borderColorFocus:e.getPropertyValue("--jfi-form-control-border-color-focus"),borderColorError:e.getPropertyValue("--jfi-form-control-border-color-error"),borderWidth:e.getPropertyValue("--jfi-form-control-border-width"),borderBottomWidth:e.getPropertyValue("--jfi-form-control-border-bottom-width"),borderLeftWidth:e.getPropertyValue("--jfi-form-control-border-left-width"),borderRightWidth:e.getPropertyValue("--jfi-form-control-border-right-width"),borderTopWidth:e.getPropertyValue("--jfi-form-control-border-top-width"),borderRadius:e.getPropertyValue("--jfi-form-control-border-radius"),borderStyle:e.getPropertyValue("--jfi-form-control-border-style"),boxShadow:e.getPropertyValue("--jfi-form-control-box-shadow"),boxShadowError:e.getPropertyValue("--jfi-form-control-box-shadow-error"),boxShadowErrorFocus:e.getPropertyValue("--jfi-form-control-box-shadow-error-focus"),boxShadowFocus:e.getPropertyValue("--jfi-form-control-box-shadow-focus"),color:e.getPropertyValue("--jfi-form-control-color"),colorFocus:e.getPropertyValue("--jfi-form-control-color-focus"),fontSize:e.getPropertyValue("--jfi-form-control-font-size"),fontWeight:e.getPropertyValue("--jfi-form-control-font-weight"),lineHeight:e.getPropertyValue("--jfi-form-control-line-height"),margin:e.getPropertyValue("--jfi-form-control-margin"),padding:e.getPropertyValue("--jfi-form-control-padding")},formLabel:{color:e.getPropertyValue("--jfi-form-label-color"),fontFamily:e.getPropertyValue("--jfi-form-label-font-family"),fontSize:e.getPropertyValue("--jfi-form-label-font-size"),fontWeight:e.getPropertyValue("--jfi-form-label-font-weight"),margin:e.getPropertyValue("--jfi-form-label-margin")},errorMessage:{color:e.getPropertyValue("--jfi-error-message-color"),margin:e.getPropertyValue("--jfi-error-message-margin"),fontSize:e.getPropertyValue("--jfi-error-message-font-size")}}})(),this.dispatchMessageEvent=e=>{const{eventType:n,data:o}=e.data,i=d[this.paymentMethodFormType];n===i.ready?this.paymentMethodFormReady.emit(o):n===i.tokenize?this.paymentMethodFormTokenized.emit(o):n===i.validate&&this.paymentMethodFormValidated.emit(o)},this.postMessage=(e,n)=>{this.frameService.postMessage(e,n)},this.paymentMethodFormType=void 0,this.paymentMethodFormValidationMode=void 0,this.iframeOrigin=void 0,this.singleLine=void 0}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async resize(){this.postMessage(d[this.paymentMethodFormType].resize)}async tokenize(e,n,o){return this.frameService.postMessageWithResponseListener(d[this.paymentMethodFormType].tokenize,{clientId:e,paymentMethodMetadata:n,account:o,componentVersion:t.version})}async validate(){return this.frameService.postMessageWithResponseListener(d[this.paymentMethodFormType].validate)}sendStyleOverrides(){this.computedTheme&&this.postMessage(d[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.computedTheme})}getIframeSrc(){let e=[];return this.paymentMethodFormValidationMode&&e.push(`validationMode=${this.paymentMethodFormValidationMode}`),this.singleLine&&e.push(`singleLine=${this.singleLine}`),`${this.iframeOrigin}/${this.paymentMethodFormType}${r(e)}`}initializeFrameCommunicationService(){var e;this.frameService=new f(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}render(){return o(i,{key:"91a69ce3f918c98248d6bb5df6dc5ec0dffe3c26"},o("iframe",{key:"99c06be5a78a3849e687f7f95f8fe3382cc2c4cd",id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},onLoad:()=>{c({scrollbars:!1},this.iframeElement),this.sendStyleOverrides()}}))}};u.style=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}iframe{width:1px;min-width:100%}";export{u as justifi_payment_method_form}