@justifi/webcomponents 6.0.6-rc.1 → 6.0.6-rc.2

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 (422) hide show
  1. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +2 -2
  2. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  3. package/dist/cjs/card-form.cjs.entry.js +2 -2
  4. package/dist/cjs/{check-pkg-version-BqQyunnf.js → check-pkg-version-BXAxVT0S.js} +1 -1
  5. package/dist/cjs/{checkout.store-Bswr7kNY.js → checkout.store-CS7dpzYF.js} +0 -4
  6. package/dist/cjs/checkouts-list-core.cjs.entry.js +1 -1
  7. package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
  8. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  9. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  10. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  11. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  12. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +2 -2
  13. package/dist/cjs/form-control-number.cjs.entry.js +2 -2
  14. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  15. package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
  16. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
  17. package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
  18. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
  19. package/dist/cjs/justifi-apple-pay.cjs.entry.js +879 -0
  20. package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +11 -11
  21. package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
  22. package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
  23. package/dist/cjs/{justifi-apple-pay_8.cjs.entry.js → justifi-checkout-summary_7.cjs.entry.js} +15 -883
  24. package/dist/cjs/justifi-checkout.cjs.entry.js +4 -4
  25. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +1 -1
  26. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +3 -3
  27. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  28. package/dist/cjs/justifi-dispute-management.cjs.entry.js +3 -3
  29. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +5 -5
  30. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
  31. package/dist/cjs/justifi-order-terminals.cjs.entry.js +3 -3
  32. package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
  33. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
  34. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +3 -3
  35. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  36. package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -3
  37. package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
  38. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +3 -3
  39. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
  40. package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -3
  41. package/dist/cjs/justifi-refund-payment.cjs.entry.js +2 -2
  42. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
  43. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
  44. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  45. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +2 -2
  46. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +3 -3
  47. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
  48. package/dist/cjs/justifi-terminals-list.cjs.entry.js +3 -3
  49. package/dist/cjs/loader.cjs.js +1 -1
  50. package/dist/cjs/{package-CeJ5geYu.js → package-D8-S3yHl.js} +1 -1
  51. package/dist/cjs/pagination-menu.cjs.entry.js +3 -3
  52. package/dist/cjs/payment-details-core.cjs.entry.js +8 -8
  53. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  54. package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
  55. package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
  56. package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
  57. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  58. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +1 -1
  59. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  60. package/dist/cjs/terminals-list-core.cjs.entry.js +1 -1
  61. package/dist/cjs/webcomponents.cjs.js +1 -1
  62. package/dist/collection/api/services/apple-pay.service.js +3 -0
  63. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  64. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  65. package/dist/collection/components/checkout/checkout.js +1 -1
  66. package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
  67. package/dist/collection/components/checkout/saved-payment-method.js +1 -1
  68. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  69. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
  70. package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
  71. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  72. package/dist/collection/components/dispute-management/dispute-management.js +1 -1
  73. package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
  74. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  75. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  76. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  77. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  78. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  79. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  80. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  81. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  82. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  83. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  84. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  85. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  86. package/dist/collection/components/modular-checkout/modular-checkout.js +6 -7
  87. package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +2 -7
  88. package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
  89. package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
  90. package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
  91. package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
  92. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  93. package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
  94. package/dist/collection/components/order-terminals/order-terminals.js +1 -1
  95. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  96. package/dist/collection/components/payment-details/payment-details-core.js +8 -8
  97. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
  98. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  99. package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
  100. package/dist/collection/components/payments-list/payments-list.js +1 -1
  101. package/dist/collection/components/payout-details/payout-details-core.js +3 -3
  102. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
  103. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  104. package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
  105. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  106. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  107. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
  108. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
  109. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  110. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  111. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  112. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
  113. package/dist/collection/store/checkout.store.js +0 -4
  114. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  115. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  116. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  117. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  118. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  119. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  120. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  121. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  122. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  123. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  124. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  125. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  126. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  127. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  128. package/dist/collection/ui-components/pagination-menu/pagination-menu.js +3 -3
  129. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  130. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  131. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  132. package/dist/docs.json +3 -11
  133. package/dist/esm/additional-questions-details_5.entry.js +2 -2
  134. package/dist/esm/{badge-CtdO-tEY.js → badge-BYEj23zk.js} +1 -1
  135. package/dist/esm/bank-account-document-form-inputs_4.entry.js +5 -5
  136. package/dist/esm/bank-account-form.entry.js +4 -4
  137. package/dist/esm/business-details-core.entry.js +3 -3
  138. package/dist/esm/{button-DtTaQHMK.js → button-BQetT-FB.js} +1 -1
  139. package/dist/esm/card-form.entry.js +4 -4
  140. package/dist/esm/{check-pkg-version-DW45blqY.js → check-pkg-version-DdZIl21c.js} +1 -1
  141. package/dist/esm/{checkout.store-4nUf2OuT.js → checkout.store-CWAkbFJL.js} +0 -4
  142. package/dist/esm/checkouts-list-core.entry.js +6 -6
  143. package/dist/esm/{checkouts-table-B6gGDtOr.js → checkouts-table-D7-slfUE.js} +2 -2
  144. package/dist/esm/custom-popper_2.entry.js +3 -3
  145. package/dist/esm/form-alert_5.entry.js +1 -1
  146. package/dist/esm/form-control-checkbox.entry.js +5 -5
  147. package/dist/esm/form-control-date.entry.js +4 -4
  148. package/dist/esm/{form-control-error-text-bprS-t9d.js → form-control-error-text-DU4UNQlE.js} +1 -1
  149. package/dist/esm/form-control-file-v2_2.entry.js +5 -5
  150. package/dist/esm/{form-control-help-text-Bvnp-IAG.js → form-control-help-text-DDLwbCDl.js} +1 -1
  151. package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
  152. package/dist/esm/form-control-monetary.entry.js +5 -5
  153. package/dist/esm/form-control-number-masked_2.entry.js +4 -4
  154. package/dist/esm/form-control-number.entry.js +5 -5
  155. package/dist/esm/form-control-radio.entry.js +3 -3
  156. package/dist/esm/form-control-select_2.entry.js +6 -6
  157. package/dist/esm/gross-payment-chart-core.entry.js +4 -4
  158. package/dist/esm/{header-1-C1Hnxki8.js → header-1-CIfsspQD.js} +1 -1
  159. package/dist/esm/{header-3-Bq8fpjm-.js → header-3-0vgSYspf.js} +1 -1
  160. package/dist/esm/hidden-input_2.entry.js +7 -7
  161. package/dist/esm/{insurance-state-CVme82j7.js → insurance-state-QGyiPZ_-.js} +1 -1
  162. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +3 -3
  163. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +2 -2
  164. package/dist/esm/justifi-additional-statement_8.entry.js +9 -9
  165. package/dist/{module/apple-pay.js → esm/justifi-apple-pay.entry.js} +26 -60
  166. package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +15 -15
  167. package/dist/esm/justifi-business-details.entry.js +4 -4
  168. package/dist/esm/justifi-business-form.entry.js +6 -6
  169. package/dist/esm/justifi-business-representative-form-inputs.entry.js +1 -1
  170. package/dist/esm/{justifi-apple-pay_8.entry.js → justifi-checkout-summary_7.entry.js} +20 -887
  171. package/dist/esm/justifi-checkout.entry.js +5 -5
  172. package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
  173. package/dist/esm/justifi-checkouts-list.entry.js +6 -6
  174. package/dist/esm/justifi-details.entry.js +2 -2
  175. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  176. package/dist/esm/justifi-dispute-management.entry.js +3 -3
  177. package/dist/esm/justifi-dispute-notification_3.entry.js +8 -8
  178. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
  179. package/dist/esm/justifi-order-terminals.entry.js +5 -5
  180. package/dist/esm/justifi-owner-form_3.entry.js +2 -2
  181. package/dist/esm/justifi-payment-details.entry.js +4 -4
  182. package/dist/esm/justifi-payment-provisioning-core.entry.js +2 -2
  183. package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
  184. package/dist/esm/justifi-payment-transactions-list.entry.js +6 -6
  185. package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
  186. package/dist/esm/justifi-payments-list.entry.js +7 -7
  187. package/dist/esm/justifi-payout-details.entry.js +4 -4
  188. package/dist/esm/justifi-payout-transactions-list.entry.js +6 -6
  189. package/dist/esm/justifi-payouts-list-filters.entry.js +3 -3
  190. package/dist/esm/justifi-payouts-list.entry.js +7 -7
  191. package/dist/esm/justifi-refund-payment.entry.js +5 -5
  192. package/dist/esm/justifi-saved-payment-method.entry.js +2 -2
  193. package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -6
  194. package/dist/esm/justifi-skeleton.entry.js +3 -3
  195. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +3 -3
  196. package/dist/esm/justifi-terminal-orders-list.entry.js +6 -6
  197. package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
  198. package/dist/esm/justifi-terminals-list.entry.js +6 -6
  199. package/dist/esm/loader.js +1 -1
  200. package/dist/esm/{package-BXUY63ga.js → package-DlT1rYmL.js} +1 -1
  201. package/dist/esm/pagination-menu.entry.js +4 -4
  202. package/dist/esm/{parts-xDbRW9xn.js → parts-DS3KdLWS.js} +1 -1
  203. package/dist/esm/payment-details-core.entry.js +13 -13
  204. package/dist/esm/payment-method-option.entry.js +2 -2
  205. package/dist/esm/payments-list-core.entry.js +7 -7
  206. package/dist/esm/{payments-status-cvtVmtY5.js → payments-status-DpKZIq0D.js} +1 -1
  207. package/dist/esm/{payments-table-D_BlyU1F.js → payments-table-BhUsDP9C.js} +2 -2
  208. package/dist/esm/payout-details-core.entry.js +9 -9
  209. package/dist/esm/payouts-list-core.entry.js +7 -7
  210. package/dist/esm/{payouts-status-D-vjrqBb.js → payouts-status-CZxWiR6g.js} +1 -1
  211. package/dist/esm/{payouts-table-Clj8YGLV.js → payouts-table-C6bACVT_.js} +2 -2
  212. package/dist/esm/{skeleton-B8EUwt4b.js → skeleton-CtxvPKqv.js} +1 -1
  213. package/dist/esm/{spinner-CYXkn1fh.js → spinner-DSSWDOaz.js} +1 -1
  214. package/dist/esm/{table-Bj20uWfu.js → table-C7Sw1Lk-.js} +2 -2
  215. package/dist/esm/table-filters-menu.entry.js +3 -3
  216. package/dist/esm/terminal-orders-list-core.entry.js +6 -6
  217. package/dist/esm/{terminal-orders-table-DzBpIW8i.js → terminal-orders-table-Cdv_O1iI.js} +2 -2
  218. package/dist/esm/terminal-quantity-selector.entry.js +2 -2
  219. package/dist/esm/terminals-list-core.entry.js +6 -6
  220. package/dist/esm/{terminals-table-BMS5tazC.js → terminals-table-BBUVz5oU.js} +2 -2
  221. package/dist/esm/{utils-DRwofES0.js → utils-DkhVjdbQ.js} +1 -1
  222. package/dist/esm/webcomponents.js +1 -1
  223. package/dist/module/additional-statement.js +1 -1
  224. package/dist/module/bank-account-billing-form-simple.js +1 -1
  225. package/dist/module/bank-account-form.js +2 -2
  226. package/dist/module/bank-account.js +2 -2
  227. package/dist/module/cancellation-policy.js +1 -1
  228. package/dist/module/card-billing-form-simple.js +1 -1
  229. package/dist/module/card-form.js +2 -2
  230. package/dist/module/card-form2.js +2 -2
  231. package/dist/module/checkout.store.js +0 -4
  232. package/dist/module/checkouts-list-core2.js +1 -1
  233. package/dist/module/custom-popper2.js +2 -2
  234. package/dist/module/customer-details.js +1 -1
  235. package/dist/module/dispute-management-core.js +1 -1
  236. package/dist/module/dispute-notification.js +1 -1
  237. package/dist/module/dispute-response-core.js +1 -1
  238. package/dist/module/dispute-response.js +1 -1
  239. package/dist/module/duplicate-charge.js +1 -1
  240. package/dist/module/electronic-evidence.js +1 -1
  241. package/dist/module/form-control-checkbox2.js +2 -2
  242. package/dist/module/form-control-date2.js +2 -2
  243. package/dist/module/form-control-file-v22.js +1 -1
  244. package/dist/module/form-control-file2.js +2 -2
  245. package/dist/module/form-control-monetary2.js +2 -2
  246. package/dist/module/form-control-number-masked2.js +2 -2
  247. package/dist/module/form-control-number.js +2 -2
  248. package/dist/module/form-control-radio2.js +2 -2
  249. package/dist/module/form-control-select2.js +2 -2
  250. package/dist/module/form-control-text2.js +2 -2
  251. package/dist/module/form-control-textarea2.js +2 -2
  252. package/dist/module/gross-payment-chart-core2.js +1 -1
  253. package/dist/module/hidden-input2.js +1 -1
  254. package/dist/module/iframe-input2.js +3 -3
  255. package/dist/module/justifi-apple-pay.js +907 -1
  256. package/dist/module/justifi-button2.js +1 -1
  257. package/dist/module/justifi-checkout.js +19 -25
  258. package/dist/module/justifi-checkouts-list-filters.js +1 -1
  259. package/dist/module/justifi-checkouts-list.js +1 -1
  260. package/dist/module/justifi-dispute-management.js +1 -1
  261. package/dist/module/justifi-header2.js +1 -1
  262. package/dist/module/justifi-order-terminals.js +1 -1
  263. package/dist/module/justifi-payment-transactions-list.js +1 -1
  264. package/dist/module/justifi-payments-list-filters.js +2 -2
  265. package/dist/module/justifi-payments-list.js +1 -1
  266. package/dist/module/justifi-payout-transactions-list.js +1 -1
  267. package/dist/module/justifi-payouts-list-filters.js +2 -2
  268. package/dist/module/justifi-payouts-list.js +1 -1
  269. package/dist/module/justifi-saved-payment-method.js +1 -1
  270. package/dist/module/justifi-skeleton.js +1 -1
  271. package/dist/module/justifi-terminal-orders-list-filters.js +2 -2
  272. package/dist/module/justifi-terminal-orders-list.js +1 -1
  273. package/dist/module/justifi-terminals-list-filters.js +1 -1
  274. package/dist/module/justifi-terminals-list.js +1 -1
  275. package/dist/module/modular-checkout.js +6 -7
  276. package/dist/module/package.js +1 -1
  277. package/dist/module/pagination-menu2.js +3 -3
  278. package/dist/module/payment-details-core2.js +8 -8
  279. package/dist/module/payment-method-option.js +1 -1
  280. package/dist/module/payments-list-core2.js +1 -1
  281. package/dist/module/payout-details-core2.js +3 -3
  282. package/dist/module/payouts-list-core2.js +1 -1
  283. package/dist/module/product-or-service.js +1 -1
  284. package/dist/module/refund-policy.js +1 -1
  285. package/dist/module/save-new-payment-method.js +1 -1
  286. package/dist/module/shipping-details.js +1 -1
  287. package/dist/module/summary.js +1 -1
  288. package/dist/module/table-filters-menu2.js +1 -1
  289. package/dist/module/terminal-orders-list-core2.js +1 -1
  290. package/dist/module/terminal-quantity-selector2.js +1 -1
  291. package/dist/module/terminals-list-core2.js +1 -1
  292. package/dist/module/tokenize-payment-method.js +1 -1
  293. package/dist/types/api/Checkout.d.ts +0 -2
  294. package/dist/types/store/checkout.store.d.ts +0 -1
  295. package/dist/webcomponents/{p-ea2cbf37.entry.js → p-064578b9.entry.js} +1 -1
  296. package/dist/webcomponents/p-065999a7.entry.js +1 -0
  297. package/dist/webcomponents/{p-9ed7b13f.entry.js → p-1162b2fc.entry.js} +1 -1
  298. package/dist/webcomponents/p-145a2370.entry.js +1 -0
  299. package/dist/webcomponents/p-185550b1.entry.js +1 -0
  300. package/dist/webcomponents/{p-447b55c0.entry.js → p-188f921f.entry.js} +1 -1
  301. package/dist/webcomponents/p-20c42901.entry.js +1 -0
  302. package/dist/webcomponents/{p-dfb2e55b.entry.js → p-22b3b0c2.entry.js} +1 -1
  303. package/dist/webcomponents/{p-63ad8ebd.entry.js → p-25dffee2.entry.js} +1 -1
  304. package/dist/webcomponents/{p-d0a2035f.entry.js → p-263ee88e.entry.js} +1 -1
  305. package/dist/webcomponents/{p-37a93597.entry.js → p-2b1b815a.entry.js} +1 -1
  306. package/dist/webcomponents/{p-a09695c4.entry.js → p-2bb49747.entry.js} +1 -1
  307. package/dist/webcomponents/{p-9d611395.entry.js → p-32b0593d.entry.js} +1 -1
  308. package/dist/webcomponents/{p-58f7c4bd.entry.js → p-341eb162.entry.js} +1 -1
  309. package/dist/webcomponents/{p-0cf71cbd.entry.js → p-368aad3e.entry.js} +1 -1
  310. package/dist/webcomponents/p-38f4b133.entry.js +1 -0
  311. package/dist/webcomponents/p-3cd7efc1.entry.js +1 -0
  312. package/dist/webcomponents/{p-9c8fb92f.entry.js → p-4633e577.entry.js} +1 -1
  313. package/dist/webcomponents/{p-5cb22cfb.entry.js → p-4941bcaf.entry.js} +1 -1
  314. package/dist/webcomponents/p-49998d80.entry.js +1 -0
  315. package/dist/webcomponents/{p-d4476052.entry.js → p-4b1a3cf6.entry.js} +1 -1
  316. package/dist/webcomponents/{p-78cb62a8.entry.js → p-4c7b6e72.entry.js} +1 -1
  317. package/dist/webcomponents/p-507ab3f1.entry.js +1 -0
  318. package/dist/webcomponents/{p-CmBCj61h.js → p-53MvfN19.js} +1 -1
  319. package/dist/webcomponents/{p-c44fcff6.entry.js → p-59b4454a.entry.js} +1 -1
  320. package/dist/webcomponents/{p-569c7dcc.entry.js → p-5ca7a03f.entry.js} +1 -1
  321. package/dist/webcomponents/p-6217eb14.entry.js +1 -0
  322. package/dist/webcomponents/{p-de95bf57.entry.js → p-62fab960.entry.js} +1 -1
  323. package/dist/webcomponents/{p-9773e1e9.entry.js → p-6de344f8.entry.js} +1 -1
  324. package/dist/webcomponents/{p-32978110.entry.js → p-72e0698c.entry.js} +1 -1
  325. package/dist/webcomponents/{p-CCmDcLao.js → p-7663hWTF.js} +1 -1
  326. package/dist/webcomponents/{p-e9b2591b.entry.js → p-789e86ef.entry.js} +1 -1
  327. package/dist/webcomponents/{p-b608add9.entry.js → p-79a55ed5.entry.js} +1 -1
  328. package/dist/webcomponents/p-7bdaf07c.entry.js +1 -0
  329. package/dist/webcomponents/p-7c4a3118.entry.js +1 -0
  330. package/dist/webcomponents/{p-fbc5fc6d.entry.js → p-7c7666ad.entry.js} +1 -1
  331. package/dist/webcomponents/p-7fc37722.entry.js +1 -0
  332. package/dist/webcomponents/{p-0217783c.entry.js → p-8696cf1e.entry.js} +3 -3
  333. package/dist/webcomponents/p-8948b298.entry.js +1 -0
  334. package/dist/webcomponents/{p-0eb69f41.entry.js → p-8e6ae277.entry.js} +1 -1
  335. package/dist/webcomponents/{p-80b2cdec.entry.js → p-924a25d4.entry.js} +1 -1
  336. package/dist/webcomponents/{p-d403bdc0.entry.js → p-96cc471a.entry.js} +1 -1
  337. package/dist/webcomponents/p-97ea8a2a.entry.js +1 -0
  338. package/dist/webcomponents/{p-80a4fba7.entry.js → p-98ae711c.entry.js} +1 -1
  339. package/dist/webcomponents/{p-c644a9f1.entry.js → p-9b14089f.entry.js} +1 -1
  340. package/dist/webcomponents/{p-50701f16.entry.js → p-9f35781b.entry.js} +1 -1
  341. package/dist/webcomponents/{p-B6IWa9Ph.js → p-B7TpAe2k.js} +1 -1
  342. package/dist/webcomponents/p-BBzXThAT.js +1 -0
  343. package/dist/webcomponents/p-BCE-dTDp.js +1 -0
  344. package/dist/webcomponents/{p-BBx_EQqR.js → p-BIKX2tSN.js} +1 -1
  345. package/dist/webcomponents/p-Baf5crBG.js +1 -0
  346. package/dist/webcomponents/{p-ClvhB3WW.js → p-BbbgFMaz.js} +1 -1
  347. package/dist/webcomponents/p-C4AUlhx6.js +1 -0
  348. package/dist/webcomponents/{p-CH8Y3GSr.js → p-CqFjmIng.js} +1 -1
  349. package/dist/webcomponents/{p-CoBppUkq.js → p-Cqe5a-d3.js} +1 -1
  350. package/dist/webcomponents/p-D5KZeFMv.js +1 -0
  351. package/dist/webcomponents/p-DFEINx3E.js +1 -0
  352. package/dist/webcomponents/{p-xDbRW9xn.js → p-DS3KdLWS.js} +1 -1
  353. package/dist/webcomponents/p-DlT1rYmL.js +1 -0
  354. package/dist/webcomponents/p-DrrHSa75.js +1 -0
  355. package/dist/webcomponents/p-DszoS3BO.js +1 -0
  356. package/dist/webcomponents/p-SPYUZxQ9.js +1 -0
  357. package/dist/webcomponents/{p-C0wTyoTh.js → p-SWI5-Jo-.js} +1 -1
  358. package/dist/webcomponents/{p-C9EQ459H.js → p-YXBIe5uT.js} +1 -1
  359. package/dist/webcomponents/p-a3a2f508.entry.js +1 -0
  360. package/dist/webcomponents/p-a44c1cae.entry.js +1 -0
  361. package/dist/webcomponents/{p-f705fc49.entry.js → p-a4a57240.entry.js} +1 -1
  362. package/dist/webcomponents/p-a6008498.entry.js +1 -0
  363. package/dist/webcomponents/{p-268a6e14.entry.js → p-a871b38b.entry.js} +1 -1
  364. package/dist/webcomponents/p-a9e7b25b.entry.js +1 -0
  365. package/dist/webcomponents/p-b2816bb2.entry.js +1 -0
  366. package/dist/webcomponents/{p-0cac8468.entry.js → p-b3517f18.entry.js} +1 -1
  367. package/dist/webcomponents/p-b57ba0c7.entry.js +1 -0
  368. package/dist/webcomponents/p-b701fcf0.entry.js +1 -0
  369. package/dist/webcomponents/{p-aeb22aa2.entry.js → p-b82b685d.entry.js} +1 -1
  370. package/dist/webcomponents/p-bcc22295.entry.js +1 -0
  371. package/dist/webcomponents/{p-ee90bbd1.entry.js → p-bcc7ebb5.entry.js} +1 -1
  372. package/dist/webcomponents/p-cf37b3bb.entry.js +1 -0
  373. package/dist/webcomponents/p-d55e5756.entry.js +1 -0
  374. package/dist/webcomponents/p-db03d37a.entry.js +1 -0
  375. package/dist/webcomponents/p-dce78317.entry.js +1 -0
  376. package/dist/webcomponents/p-e1e13e85.entry.js +1 -0
  377. package/dist/webcomponents/{p-ae8ae5bb.entry.js → p-f1915a72.entry.js} +1 -1
  378. package/dist/webcomponents/p-f605af1c.entry.js +1 -0
  379. package/dist/webcomponents/{p-hbWSMN3O.js → p-f6_r41aD.js} +1 -1
  380. package/dist/webcomponents/{p-55903cde.entry.js → p-f7977891.entry.js} +1 -1
  381. package/dist/webcomponents/{p-4b57765c.entry.js → p-fc5eeb40.entry.js} +1 -1
  382. package/dist/webcomponents/p-iT-AQTXJ.js +1 -0
  383. package/dist/webcomponents/webcomponents.esm.js +1 -1
  384. package/package.json +1 -1
  385. package/dist/webcomponents/p-02fdd7f5.entry.js +0 -1
  386. package/dist/webcomponents/p-0af5269e.entry.js +0 -1
  387. package/dist/webcomponents/p-0d3904cb.entry.js +0 -1
  388. package/dist/webcomponents/p-1f82f0cc.entry.js +0 -1
  389. package/dist/webcomponents/p-220d8503.entry.js +0 -1
  390. package/dist/webcomponents/p-28625e07.entry.js +0 -1
  391. package/dist/webcomponents/p-2d300faa.entry.js +0 -1
  392. package/dist/webcomponents/p-328117e4.entry.js +0 -1
  393. package/dist/webcomponents/p-47997bc2.entry.js +0 -1
  394. package/dist/webcomponents/p-526b7442.entry.js +0 -1
  395. package/dist/webcomponents/p-5aae36f3.entry.js +0 -1
  396. package/dist/webcomponents/p-5bd3d86e.entry.js +0 -1
  397. package/dist/webcomponents/p-6472b6db.entry.js +0 -1
  398. package/dist/webcomponents/p-67788df5.entry.js +0 -1
  399. package/dist/webcomponents/p-705dba52.entry.js +0 -1
  400. package/dist/webcomponents/p-8ca21fab.entry.js +0 -1
  401. package/dist/webcomponents/p-9ad7d724.entry.js +0 -1
  402. package/dist/webcomponents/p-BXUY63ga.js +0 -1
  403. package/dist/webcomponents/p-BoQ6_4Ks.js +0 -1
  404. package/dist/webcomponents/p-D0Peuz-m.js +0 -1
  405. package/dist/webcomponents/p-D6BImiVi.js +0 -1
  406. package/dist/webcomponents/p-DGsXKF67.js +0 -1
  407. package/dist/webcomponents/p-NAjz1Xfo.js +0 -1
  408. package/dist/webcomponents/p-RQzxYnz_.js +0 -1
  409. package/dist/webcomponents/p-T2yENPvU.js +0 -1
  410. package/dist/webcomponents/p-a8446044.entry.js +0 -1
  411. package/dist/webcomponents/p-au49QgoI.js +0 -1
  412. package/dist/webcomponents/p-bb53e2e9.entry.js +0 -1
  413. package/dist/webcomponents/p-bc099dd0.entry.js +0 -1
  414. package/dist/webcomponents/p-c12d0453.entry.js +0 -1
  415. package/dist/webcomponents/p-d1bceac6.entry.js +0 -1
  416. package/dist/webcomponents/p-e6be4e19.entry.js +0 -1
  417. package/dist/webcomponents/p-e9865d1d.entry.js +0 -1
  418. package/dist/webcomponents/p-ec9514f8.entry.js +0 -1
  419. package/dist/webcomponents/p-edfeb034.entry.js +0 -1
  420. package/dist/webcomponents/p-ffefa09c.entry.js +0 -1
  421. package/dist/webcomponents/p-h5pyZngT.js +0 -1
  422. package/dist/webcomponents/p-wQgEEOq_.js +0 -1
@@ -1,4 +1,910 @@
1
- import { A as ApplePay, d as defineCustomElement$1 } from './apple-pay.js';
1
+ import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
+ import { A as Api } from './Api.js';
3
+ import { S as StyledHost } from './styled-host.js';
4
+ import './details.js';
5
+ import './event-types.js';
6
+ import './justifi-radio-list-item2.js';
7
+ import { S as Skeleton } from './skeleton.js';
8
+ import { c as checkoutStore } from './checkout.store.js';
9
+
10
+ var ApplePaySessionStatus;
11
+ (function (ApplePaySessionStatus) {
12
+ ApplePaySessionStatus["STATUS_SUCCESS"] = "STATUS_SUCCESS";
13
+ ApplePaySessionStatus["STATUS_FAILURE"] = "STATUS_FAILURE";
14
+ })(ApplePaySessionStatus || (ApplePaySessionStatus = {}));
15
+ var ApplePayButtonType;
16
+ (function (ApplePayButtonType) {
17
+ ApplePayButtonType["PLAIN"] = "plain";
18
+ ApplePayButtonType["BUY"] = "buy";
19
+ ApplePayButtonType["SET_UP"] = "set-up";
20
+ ApplePayButtonType["DONATE"] = "donate";
21
+ ApplePayButtonType["CHECK_OUT"] = "check-out";
22
+ ApplePayButtonType["BOOK"] = "book";
23
+ ApplePayButtonType["SUBSCRIBE"] = "subscribe";
24
+ })(ApplePayButtonType || (ApplePayButtonType = {}));
25
+ var ApplePayButtonStyle;
26
+ (function (ApplePayButtonStyle) {
27
+ ApplePayButtonStyle["BLACK"] = "black";
28
+ ApplePayButtonStyle["WHITE"] = "white";
29
+ ApplePayButtonStyle["WHITE_OUTLINE"] = "white-outline";
30
+ })(ApplePayButtonStyle || (ApplePayButtonStyle = {}));
31
+ var ApplePayMerchantCapability;
32
+ (function (ApplePayMerchantCapability) {
33
+ ApplePayMerchantCapability["SUPPORTS_3DS"] = "supports3DS";
34
+ ApplePayMerchantCapability["SUPPORTS_EMV"] = "supportsEMV";
35
+ ApplePayMerchantCapability["SUPPORTS_CREDIT"] = "supportsCredit";
36
+ ApplePayMerchantCapability["SUPPORTS_DEBIT"] = "supportsDebit";
37
+ })(ApplePayMerchantCapability || (ApplePayMerchantCapability = {}));
38
+ class ApplePayConfig {
39
+ constructor(data) {
40
+ this.merchantIdentifier = data.merchantIdentifier;
41
+ this.displayName = data.displayName;
42
+ this.initiative = data.initiative;
43
+ this.initiativeContext = data.initiativeContext;
44
+ this.buttonType = data.buttonType || ApplePayButtonType.PLAIN;
45
+ this.buttonStyle = data.buttonStyle || ApplePayButtonStyle.BLACK;
46
+ this.buttonLocale = data.buttonLocale || 'en-US';
47
+ }
48
+ get isValid() {
49
+ return !!(this.merchantIdentifier &&
50
+ this.displayName &&
51
+ this.initiative &&
52
+ this.initiativeContext);
53
+ }
54
+ }
55
+ class ApplePayPaymentRequest {
56
+ constructor(data) {
57
+ this.countryCode = data.countryCode;
58
+ this.currencyCode = data.currencyCode;
59
+ this.merchantCapabilities = data.merchantCapabilities;
60
+ this.supportedNetworks = data.supportedNetworks;
61
+ this.total = data.total;
62
+ this.lineItems = data.lineItems;
63
+ this.shippingMethods = data.shippingMethods;
64
+ this.applicationData = data.applicationData;
65
+ this.supportedCountries = data.supportedCountries;
66
+ }
67
+ get isValid() {
68
+ var _a, _b, _c, _d;
69
+ return !!(this.countryCode &&
70
+ this.currencyCode &&
71
+ ((_a = this.merchantCapabilities) === null || _a === void 0 ? void 0 : _a.length) &&
72
+ ((_b = this.supportedNetworks) === null || _b === void 0 ? void 0 : _b.length) &&
73
+ ((_c = this.total) === null || _c === void 0 ? void 0 : _c.label) &&
74
+ ((_d = this.total) === null || _d === void 0 ? void 0 : _d.amount));
75
+ }
76
+ }
77
+ class ApplePayHelpers {
78
+ static isApplePaySupported() {
79
+ var _a;
80
+ return (typeof window !== 'undefined' &&
81
+ 'ApplePaySession' in window &&
82
+ ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.supportsVersion(3)));
83
+ }
84
+ static canMakePayments() {
85
+ var _a;
86
+ if (!this.isApplePaySupported()) {
87
+ return false;
88
+ }
89
+ return ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments()) || false;
90
+ }
91
+ static async canMakePaymentsWithActiveCard(merchantIdentifier) {
92
+ var _a;
93
+ if (!this.isApplePaySupported()) {
94
+ return false;
95
+ }
96
+ try {
97
+ return ((await ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePaymentsWithActiveCard(merchantIdentifier))) || false);
98
+ }
99
+ catch (error) {
100
+ console.error('Error checking Apple Pay active card:', error);
101
+ return false;
102
+ }
103
+ }
104
+ static formatAmount(amount) {
105
+ return (amount / 100).toFixed(2);
106
+ }
107
+ static parseAmount(amount) {
108
+ return Math.round(parseFloat(amount) * 100);
109
+ }
110
+ static createLineItem(label, amount, type = 'final') {
111
+ return {
112
+ label,
113
+ amount: this.formatAmount(amount),
114
+ type,
115
+ };
116
+ }
117
+ static getDefaultSupportedNetworks() {
118
+ return ['amex', 'discover', 'masterCard', 'visa'];
119
+ }
120
+ static getDefaultMerchantCapabilities() {
121
+ return [
122
+ ApplePayMerchantCapability.SUPPORTS_3DS,
123
+ ApplePayMerchantCapability.SUPPORTS_EMV,
124
+ ApplePayMerchantCapability.SUPPORTS_CREDIT,
125
+ ApplePayMerchantCapability.SUPPORTS_DEBIT,
126
+ ];
127
+ }
128
+ }
129
+
130
+ // Centralized error codes for Apple Pay service
131
+ var ApplePayServiceErrorCode;
132
+ (function (ApplePayServiceErrorCode) {
133
+ ApplePayServiceErrorCode["UNAVAILABLE"] = "UNAVAILABLE";
134
+ ApplePayServiceErrorCode["SESSION_ERROR"] = "SESSION_ERROR";
135
+ ApplePayServiceErrorCode["MERCHANT_VALIDATION_ERROR"] = "MERCHANT_VALIDATION_ERROR";
136
+ ApplePayServiceErrorCode["PAYMENT_PROCESSING_ERROR"] = "PAYMENT_PROCESSING_ERROR";
137
+ ApplePayServiceErrorCode["USER_CANCELLED"] = "USER_CANCELLED";
138
+ })(ApplePayServiceErrorCode || (ApplePayServiceErrorCode = {}));
139
+ class ApplePayService {
140
+ constructor() {
141
+ this.api = Api();
142
+ }
143
+ /**
144
+ * Initialize Apple Pay configuration
145
+ */
146
+ initialize(applePayConfig) {
147
+ this.applePayConfig = new ApplePayConfig(applePayConfig);
148
+ if (!this.applePayConfig.isValid) {
149
+ throw new Error('Invalid Apple Pay configuration provided');
150
+ }
151
+ }
152
+ /**
153
+ * Validate merchant with Apple Pay servers via API
154
+ */
155
+ async validateMerchant(authToken, accountId) {
156
+ const endpoint = 'apple_pay/merchant_session';
157
+ try {
158
+ const response = await this.api.post({
159
+ endpoint,
160
+ authToken,
161
+ headers: {
162
+ 'Sub-Account': accountId,
163
+ },
164
+ body: {
165
+ domain: window.location.host
166
+ }
167
+ });
168
+ return response;
169
+ }
170
+ catch (error) {
171
+ console.error('Backend validation failed:', error);
172
+ throw new Error('Merchant validation failed');
173
+ }
174
+ }
175
+ /**
176
+ * Process Apple Pay payment via API (fixed to match original logic)
177
+ */
178
+ async processPayment(authToken, accountId, payload) {
179
+ const endpoint = 'apple_pay/process_token';
180
+ const result = await this.api.post({
181
+ endpoint,
182
+ authToken,
183
+ body: payload,
184
+ headers: {
185
+ 'Sub-Account': accountId,
186
+ },
187
+ });
188
+ return {
189
+ success: result.id && !!result.data.token,
190
+ data: result,
191
+ };
192
+ }
193
+ /**
194
+ * Check if Apple Pay is available on this device/browser
195
+ */
196
+ isAvailable() {
197
+ return (ApplePayHelpers.isApplePaySupported() && ApplePayHelpers.canMakePayments());
198
+ }
199
+ /**
200
+ * Check if the user has an active card for the merchant
201
+ */
202
+ async canMakePaymentsWithActiveCard() {
203
+ if (!this.applePayConfig) {
204
+ throw new Error('Apple Pay not initialized. Call initialize() first.');
205
+ }
206
+ return await ApplePayHelpers.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier);
207
+ }
208
+ /**
209
+ * Start Apple Pay session
210
+ */
211
+ async startPaymentSession(paymentRequest, authToken, accountId) {
212
+ // Begin verbose diagnostics for easier debugging in the field
213
+ console.groupCollapsed('[ApplePayService] startPaymentSession called');
214
+ console.log('[ApplePayService] raw paymentRequest:', JSON.stringify(paymentRequest, null, 2));
215
+ console.log('[ApplePayService] has authToken:', Boolean(authToken));
216
+ console.log('[ApplePayService] accountId:', accountId);
217
+ console.log('[ApplePayService] has config:', Boolean(this.applePayConfig));
218
+ if (!this.applePayConfig) {
219
+ console.error('[ApplePayService] Missing applePayConfig. Did you call initialize()?');
220
+ console.groupEnd();
221
+ throw new Error('Apple Pay not initialized. Call initialize() first.');
222
+ }
223
+ // if (!this.isAvailable()) {
224
+ // throw new Error('Apple Pay is not available on this device/browser');
225
+ // }
226
+ const request = new ApplePayPaymentRequest(paymentRequest);
227
+ console.log('[ApplePayService] created ApplePayPaymentRequest:', request);
228
+ if (!request.isValid) {
229
+ const missingFields = [];
230
+ if (!request.countryCode)
231
+ missingFields.push('countryCode');
232
+ if (!request.currencyCode)
233
+ missingFields.push('currencyCode');
234
+ if (!request.merchantCapabilities ||
235
+ request.merchantCapabilities.length === 0)
236
+ missingFields.push('merchantCapabilities');
237
+ if (!request.supportedNetworks || request.supportedNetworks.length === 0)
238
+ missingFields.push('supportedNetworks');
239
+ if (!request.total || !request.total.label || !request.total.amount)
240
+ missingFields.push('total');
241
+ console.error('[ApplePayService] Payment request is invalid. Missing/invalid:', missingFields);
242
+ console.groupEnd();
243
+ throw new Error('Invalid payment request provided');
244
+ }
245
+ this.currentPaymentRequest = request;
246
+ return new Promise((resolve, reject) => {
247
+ try {
248
+ console.log('[ApplePayService] About to instantiate ApplePaySession');
249
+ // Defensive checks for Apple Pay environment
250
+ if (typeof window === 'undefined' || !('ApplePaySession' in window)) {
251
+ console.error('[ApplePayService] ApplePaySession not available on window');
252
+ console.groupEnd();
253
+ return reject({
254
+ success: false,
255
+ error: {
256
+ code: ApplePayServiceErrorCode.UNAVAILABLE,
257
+ message: 'ApplePaySession API is not available in this environment',
258
+ },
259
+ });
260
+ }
261
+ this.currentSession = new window.ApplePaySession(3, request);
262
+ console.log('[ApplePayService] ApplePaySession instantiated:', this.currentSession);
263
+ this.setupSessionEventHandlers(resolve, reject, authToken, accountId);
264
+ console.log('[ApplePayService] Event handlers set. Beginning session...');
265
+ this.currentSession.begin();
266
+ console.log('[ApplePayService] Session.begin() called');
267
+ console.groupEnd();
268
+ }
269
+ catch (error) {
270
+ console.error('[ApplePayService] Exception while starting session:', error);
271
+ console.groupEnd();
272
+ reject({
273
+ success: false,
274
+ error: {
275
+ code: ApplePayServiceErrorCode.SESSION_ERROR,
276
+ message: error instanceof Error
277
+ ? error.message
278
+ : 'Failed to start Apple Pay session',
279
+ },
280
+ });
281
+ }
282
+ });
283
+ }
284
+ /**
285
+ * Abort current Apple Pay session
286
+ */
287
+ abortPaymentSession() {
288
+ if (this.currentSession) {
289
+ this.currentSession.abort();
290
+ this.currentSession = undefined;
291
+ this.currentPaymentRequest = undefined;
292
+ }
293
+ }
294
+ /**
295
+ * Setup Apple Pay session event handlers
296
+ */
297
+ setupSessionEventHandlers(resolve, reject, authToken, accountId) {
298
+ if (!this.currentSession ||
299
+ !this.applePayConfig ||
300
+ !this.currentPaymentRequest) {
301
+ console.error('[ApplePayService] setupSessionEventHandlers called without required state', {
302
+ hasSession: Boolean(this.currentSession),
303
+ hasConfig: Boolean(this.applePayConfig),
304
+ hasPaymentRequest: Boolean(this.currentPaymentRequest),
305
+ });
306
+ return;
307
+ }
308
+ this.currentSession.onvalidatemerchant = async () => {
309
+ console.groupCollapsed('[ApplePayService] onvalidatemerchant');
310
+ try {
311
+ console.log('[ApplePayService] accountId:', accountId);
312
+ if (!authToken) {
313
+ console.error('[ApplePayService] Missing authToken for merchant validation');
314
+ throw new Error('Authentication token not provided.');
315
+ }
316
+ const merchantSession = await this.validateMerchant(authToken, accountId);
317
+ console.log('[ApplePayService] merchantSession received');
318
+ try {
319
+ this.currentSession.completeMerchantValidation(merchantSession);
320
+ console.log('[ApplePayService] completeMerchantValidation called');
321
+ }
322
+ catch (completionError) {
323
+ console.error('Error calling completeMerchantValidation:', completionError);
324
+ throw completionError;
325
+ }
326
+ }
327
+ catch (error) {
328
+ console.error('=== MERCHANT VALIDATION ERROR ===');
329
+ console.error('Error during merchant validation:', error);
330
+ if (error && error.stack) {
331
+ console.error('Error stack:', error.stack);
332
+ }
333
+ this.currentSession.abort();
334
+ reject({
335
+ success: false,
336
+ error: {
337
+ code: ApplePayServiceErrorCode.MERCHANT_VALIDATION_ERROR,
338
+ message: error instanceof Error
339
+ ? error.message
340
+ : 'Merchant validation failed',
341
+ },
342
+ });
343
+ }
344
+ console.groupEnd();
345
+ };
346
+ this.currentSession.onpaymentauthorized = async (event) => {
347
+ var _a;
348
+ console.groupCollapsed('[ApplePayService] onpaymentauthorized');
349
+ try {
350
+ const payment = event.payment;
351
+ console.log('[ApplePayService] payment payload snapshot:', {
352
+ hasToken: Boolean(payment === null || payment === void 0 ? void 0 : payment.token),
353
+ tokenType: ((_a = payment === null || payment === void 0 ? void 0 : payment.token) === null || _a === void 0 ? void 0 : _a.paymentData) ? 'paymentData' : 'raw',
354
+ });
355
+ const paymentPayload = Object.assign(Object.assign({}, payment.token), { product_details: {
356
+ name: this.currentPaymentRequest.total.label,
357
+ price: ApplePayHelpers.parseAmount(this.currentPaymentRequest.total.amount),
358
+ description: this.currentPaymentRequest.total.label,
359
+ } });
360
+ console.log('[ApplePayService] paymentPayload prepared');
361
+ const paymentResult = await this.processPayment(authToken, accountId, paymentPayload);
362
+ console.log('[ApplePayService] processPayment result:', paymentResult);
363
+ if (paymentResult.success) {
364
+ this.currentSession.completePayment({
365
+ status: ApplePaySessionStatus.STATUS_SUCCESS,
366
+ });
367
+ console.log('[ApplePayService] Payment success; resolving');
368
+ resolve({
369
+ success: true,
370
+ token: payment.token,
371
+ paymentMethodId: paymentResult.data.id,
372
+ });
373
+ }
374
+ else {
375
+ console.error('PSP reported payment failure:', paymentResult.data);
376
+ this.currentSession.completePayment({
377
+ status: ApplePaySessionStatus.STATUS_FAILURE,
378
+ });
379
+ reject({
380
+ success: false,
381
+ error: {
382
+ code: ApplePayServiceErrorCode.PAYMENT_PROCESSING_ERROR,
383
+ message: 'Payment processing failed',
384
+ },
385
+ });
386
+ }
387
+ }
388
+ catch (error) {
389
+ console.error('=== PAYMENT PROCESSING ERROR ===');
390
+ console.error('Error processing payment:', error);
391
+ if (error && error.stack) {
392
+ console.error('Error stack:', error.stack);
393
+ }
394
+ this.currentSession.completePayment({
395
+ status: ApplePaySessionStatus.STATUS_FAILURE,
396
+ });
397
+ reject({
398
+ success: false,
399
+ error: {
400
+ code: ApplePayServiceErrorCode.PAYMENT_PROCESSING_ERROR,
401
+ message: error instanceof Error
402
+ ? error.message
403
+ : 'Payment processing failed',
404
+ },
405
+ });
406
+ }
407
+ finally {
408
+ console.log('[ApplePayService] Cleaning up session state');
409
+ this.currentSession = undefined;
410
+ this.currentPaymentRequest = undefined;
411
+ }
412
+ console.groupEnd();
413
+ };
414
+ this.currentSession.onpaymentmethodselected = () => {
415
+ console.groupCollapsed('[ApplePayService] onpaymentmethodselected');
416
+ const paymentUpdate = {
417
+ newTotal: this.currentPaymentRequest.total,
418
+ newLineItems: this.currentPaymentRequest.lineItems || [],
419
+ };
420
+ try {
421
+ this.currentSession.completePaymentMethodSelection(paymentUpdate);
422
+ console.log('[ApplePayService] completePaymentMethodSelection called');
423
+ }
424
+ catch (error) {
425
+ console.error('Error completing payment method selection:', error);
426
+ this.currentSession.abort();
427
+ }
428
+ console.groupEnd();
429
+ };
430
+ this.currentSession.onshippingmethodselected = () => {
431
+ console.groupCollapsed('[ApplePayService] onshippingmethodselected');
432
+ this.currentSession.completeShippingMethodSelection({
433
+ status: ApplePaySessionStatus.STATUS_SUCCESS,
434
+ newTotal: this.currentPaymentRequest.total,
435
+ newLineItems: this.currentPaymentRequest.lineItems || [],
436
+ });
437
+ console.log('[ApplePayService] completeShippingMethodSelection called');
438
+ console.groupEnd();
439
+ };
440
+ this.currentSession.oncancel = (event) => {
441
+ console.groupCollapsed('[ApplePayService] oncancel');
442
+ if (event.sessionError) {
443
+ console.error(event.sessionError);
444
+ switch (event.sessionError.code) {
445
+ case 'unknown':
446
+ console.error('Unknown error - likely merchant validation issue');
447
+ console.error('This usually means:');
448
+ console.error('1. Merchant certificate is invalid or expired');
449
+ console.error('2. Merchant identifier mismatch');
450
+ console.error('3. Backend validation endpoint issues');
451
+ break;
452
+ case 'invalidMerchantSession':
453
+ console.error('Invalid merchant session provided');
454
+ console.error('Check that the merchant session from backend is valid');
455
+ break;
456
+ case 'userCancel':
457
+ console.error('User cancelled the payment');
458
+ break;
459
+ default:
460
+ console.error('Other error code:', event.sessionError.code);
461
+ }
462
+ }
463
+ this.currentSession = undefined;
464
+ this.currentPaymentRequest = undefined;
465
+ reject({
466
+ success: false,
467
+ error: {
468
+ code: ApplePayServiceErrorCode.USER_CANCELLED,
469
+ message: 'User cancelled the Apple Pay session',
470
+ },
471
+ });
472
+ console.groupEnd();
473
+ };
474
+ if ('onerror' in this.currentSession) {
475
+ this.currentSession.onerror = (error) => {
476
+ console.groupCollapsed('[ApplePayService] onerror');
477
+ console.error('=== APPLE PAY SESSION ERROR ===');
478
+ console.error('Session error:', error);
479
+ this.currentSession = undefined;
480
+ this.currentPaymentRequest = undefined;
481
+ reject({
482
+ success: false,
483
+ error: {
484
+ code: ApplePayServiceErrorCode.SESSION_ERROR,
485
+ message: 'Apple Pay session error occurred',
486
+ },
487
+ });
488
+ console.groupEnd();
489
+ };
490
+ }
491
+ }
492
+ /**
493
+ * Create a basic payment request
494
+ */
495
+ static createPaymentRequest(amount, label, countryCode = 'US', currencyCode = 'USD') {
496
+ return {
497
+ countryCode,
498
+ currencyCode,
499
+ merchantCapabilities: ApplePayHelpers.getDefaultMerchantCapabilities(),
500
+ supportedNetworks: ApplePayHelpers.getDefaultSupportedNetworks(),
501
+ total: ApplePayHelpers.createLineItem(label, amount),
502
+ };
503
+ }
504
+ /**
505
+ * Get current configuration
506
+ */
507
+ getApplePayConfig() {
508
+ return this.applePayConfig;
509
+ }
510
+ }
511
+
512
+ const ApplePaySkeleton = (props) => {
513
+ const { isLoading } = props;
514
+ if (!isLoading) {
515
+ return null;
516
+ }
517
+ return (h("div", { class: 'container-fluid p-0' }, h("div", { class: 'row mb-3' }, h("div", { class: 'col-12 align-content-center' }, h(Skeleton, { height: '44px', width: '100%', styles: { borderRadius: "8px" } })))));
518
+ };
519
+
520
+ const ProcessingSpinner = () => (h("div", { class: 'processing-overlay' }, h("div", { class: 'spinner' }), h("span", null, "Processing...")));
521
+ const ApplePayButton = (props) => {
522
+ const getApplePayButtonClass = () => {
523
+ let classes = "apple-pay-button";
524
+ switch (props.buttonStyle) {
525
+ case ApplePayButtonStyle.WHITE:
526
+ classes += " apple-pay-button-white";
527
+ break;
528
+ case ApplePayButtonStyle.WHITE_OUTLINE:
529
+ classes += " apple-pay-button-white-outline";
530
+ break;
531
+ case ApplePayButtonStyle.BLACK:
532
+ default:
533
+ classes += " apple-pay-button-black";
534
+ break;
535
+ }
536
+ switch (props.buttonType) {
537
+ case ApplePayButtonType.BUY:
538
+ classes += " apple-pay-button-type-buy";
539
+ break;
540
+ case ApplePayButtonType.DONATE:
541
+ classes += " apple-pay-button-type-donate";
542
+ break;
543
+ case ApplePayButtonType.PLAIN:
544
+ default:
545
+ classes += " apple-pay-button-type-plain";
546
+ break;
547
+ }
548
+ if (props.disabled || props.isProcessing || !props.isAvailable) {
549
+ classes += " disabled";
550
+ }
551
+ return classes;
552
+ };
553
+ const getButtonStyles = () => {
554
+ return {
555
+ width: props.width || "200px",
556
+ height: props.height || "48px",
557
+ };
558
+ };
559
+ const handleClick = () => {
560
+ if (!props.disabled &&
561
+ !props.isProcessing &&
562
+ props.isAvailable &&
563
+ props.clickHandler) {
564
+ props.clickHandler();
565
+ }
566
+ };
567
+ return (h("div", { class: 'apple-pay-button-container' }, h("button", Object.assign({ class: getApplePayButtonClass(), style: getButtonStyles(), onClick: handleClick, disabled: props.disabled || props.isProcessing || !props.isAvailable, "aria-label": 'Pay with Apple Pay', type: 'button' }, props), props.isProcessing && ProcessingSpinner()), h("style", null, `
568
+ .apple-pay-button-container {
569
+ display: inline-block;
570
+ position: relative;
571
+ }
572
+
573
+ /* Apple Pay CSS classes - these are the official Apple Pay button styles */
574
+ .apple-pay-button {
575
+ display: inline-block;
576
+ -webkit-appearance: -apple-pay-button;
577
+ -apple-pay-button-type: plain; /* default */
578
+ -apple-pay-button-style: black; /* default */
579
+ border-radius: 8px;
580
+ cursor: pointer;
581
+ border: none;
582
+ outline: none;
583
+ transition: opacity 0.2s ease;
584
+ position: relative;
585
+ }
586
+
587
+ /* Button styles */
588
+ .apple-pay-button.apple-pay-button-black {
589
+ -apple-pay-button-style: black;
590
+ }
591
+
592
+ .apple-pay-button.apple-pay-button-white {
593
+ -apple-pay-button-style: white;
594
+ }
595
+
596
+ .apple-pay-button.apple-pay-button-white-outline {
597
+ -apple-pay-button-style: white-outline;
598
+ }
599
+
600
+ /* Button types */
601
+ .apple-pay-button.apple-pay-button-type-plain {
602
+ -apple-pay-button-type: plain;
603
+ }
604
+
605
+ .apple-pay-button.apple-pay-button-type-buy {
606
+ -apple-pay-button-type: buy;
607
+ }
608
+
609
+ .apple-pay-button.apple-pay-button-type-donate {
610
+ -apple-pay-button-type: donate;
611
+ }
612
+
613
+ /* Hover and disabled states */
614
+ .apple-pay-button:hover:not(.disabled) {
615
+ opacity: 0.9;
616
+ }
617
+
618
+ .apple-pay-button.disabled {
619
+ opacity: 0.5;
620
+ cursor: not-allowed;
621
+ }
622
+
623
+ /* Processing overlay */
624
+ .processing-overlay {
625
+ position: absolute;
626
+ top: 0;
627
+ left: 0;
628
+ right: 0;
629
+ bottom: 0;
630
+ display: flex;
631
+ align-items: center;
632
+ justify-content: center;
633
+ gap: 8px;
634
+ background: rgba(0, 0, 0, 0.8);
635
+ color: white;
636
+ border-radius: 8px;
637
+ font-size: 14px;
638
+ font-weight: 500;
639
+ }
640
+
641
+ .spinner {
642
+ width: 16px;
643
+ height: 16px;
644
+ border: 2px solid rgba(255, 255, 255, 0.3);
645
+ border-top: 2px solid #fff;
646
+ border-radius: 50%;
647
+ animation: spin 1s linear infinite;
648
+ }
649
+
650
+ @keyframes spin {
651
+ 0% { transform: rotate(0deg); }
652
+ 100% { transform: rotate(360deg); }
653
+ }
654
+
655
+ /* Responsive design */
656
+ @media (max-width: 480px) {
657
+ .apple-pay-button {
658
+ width: 100% !important;
659
+ min-width: 200px;
660
+ }
661
+ }
662
+ `)));
663
+ };
664
+
665
+ const ApplePay = /*@__PURE__*/ proxyCustomElement(class ApplePay extends HTMLElement {
666
+ constructor(registerHost) {
667
+ super();
668
+ if (registerHost !== false) {
669
+ this.__registerHost();
670
+ }
671
+ this.__attachShadow();
672
+ this.applePayStarted = createEvent(this, "applePayStarted", 7);
673
+ this.applePayCompleted = createEvent(this, "applePayCompleted", 7);
674
+ this.applePayCancelled = createEvent(this, "applePayCancelled", 7);
675
+ this.applePayError = createEvent(this, "applePayError", 7);
676
+ this.countryCode = "US";
677
+ this.merchantIdentifier = "merchant.com.staging-justifi.checkout-dev";
678
+ this.merchantDisplayName = "JustiFi Checkout";
679
+ this.initiativeContext = "dev-checkout.justifi-staging.com";
680
+ this.buttonType = ApplePayButtonType.PLAIN;
681
+ this.buttonStyle = ApplePayButtonStyle.BLACK;
682
+ this.disabled = false;
683
+ this.showSkeleton = true;
684
+ this.isLoading = true;
685
+ this.isProcessing = false;
686
+ this.isAvailable = false;
687
+ this.canMakePayments = false;
688
+ this.isConfigValid = true;
689
+ this.error = null;
690
+ this.handleApplePayClick = async () => {
691
+ var _a, _b;
692
+ if (this.isProcessing || this.disabled || !this.isAvailable) {
693
+ return;
694
+ }
695
+ try {
696
+ this.isProcessing = true;
697
+ this.error = null;
698
+ this.applePayStarted.emit();
699
+ console.groupCollapsed('[ApplePay Component] handleApplePayClick');
700
+ console.log('[ApplePay Component] click context:', {
701
+ isProcessing: this.isProcessing,
702
+ disabled: this.disabled,
703
+ isAvailable: this.isAvailable,
704
+ canMakePayments: this.canMakePayments,
705
+ hasService: Boolean(this.applePayService),
706
+ });
707
+ const paymentRequest = {
708
+ countryCode: this.countryCode,
709
+ currencyCode: checkoutStore.paymentCurrency,
710
+ merchantCapabilities: [
711
+ ApplePayMerchantCapability.SUPPORTS_3DS,
712
+ ApplePayMerchantCapability.SUPPORTS_CREDIT,
713
+ ApplePayMerchantCapability.SUPPORTS_DEBIT,
714
+ ],
715
+ supportedNetworks: ApplePayHelpers.getDefaultSupportedNetworks(),
716
+ total: ApplePayHelpers.createLineItem(checkoutStore.paymentDescription, checkoutStore.paymentAmount),
717
+ };
718
+ console.log("[ApplePay Component] paymentRequest", paymentRequest);
719
+ console.log('[ApplePay Component] identifiers snapshot:', {
720
+ authTokenLength: checkoutStore.authToken ? String(checkoutStore.authToken).length : 0,
721
+ accountId: checkoutStore.accountId,
722
+ });
723
+ const result = await this.applePayService.startPaymentSession(paymentRequest, checkoutStore.authToken, checkoutStore.accountId);
724
+ console.log("[ApplePay Component] startPaymentSession result", result);
725
+ if (result.success) {
726
+ this.applePayCompleted.emit({
727
+ success: true,
728
+ token: result.token,
729
+ paymentMethodId: result.paymentMethodId,
730
+ });
731
+ }
732
+ else {
733
+ this.applePayCompleted.emit({
734
+ success: false,
735
+ error: result.error,
736
+ });
737
+ this.applePayError.emit({
738
+ error: ((_a = result.error) === null || _a === void 0 ? void 0 : _a.message) || "Payment failed",
739
+ code: ((_b = result.error) === null || _b === void 0 ? void 0 : _b.code) || ApplePay.ErrorCode.PAYMENT_FAILED,
740
+ });
741
+ }
742
+ }
743
+ catch (error) {
744
+ const errorMessage = error instanceof Error ? error.message : "Payment failed";
745
+ this.error = errorMessage;
746
+ this.applePayError.emit({ error: errorMessage, code: ApplePay.ErrorCode.PAYMENT_FAILED });
747
+ this.applePayCompleted.emit({
748
+ success: false,
749
+ error: errorMessage,
750
+ });
751
+ }
752
+ finally {
753
+ this.isProcessing = false;
754
+ console.groupEnd();
755
+ }
756
+ };
757
+ }
758
+ async initializeApplePay() {
759
+ try {
760
+ this.isLoading = true;
761
+ this.error = null;
762
+ this.isConfigValid = true;
763
+ console.groupCollapsed('[ApplePay Component] initializeApplePay');
764
+ console.log('[ApplePay Component] checkout state snapshot:', {
765
+ paymentAmount: checkoutStore.paymentAmount,
766
+ paymentCurrency: checkoutStore.paymentCurrency,
767
+ hasAuthToken: Boolean(checkoutStore.authToken),
768
+ accountId: checkoutStore.accountId,
769
+ });
770
+ const hasRequiredConfig = Boolean(checkoutStore.paymentAmount) &&
771
+ Boolean(checkoutStore.paymentCurrency) &&
772
+ Boolean(checkoutStore.authToken);
773
+ if (!hasRequiredConfig) {
774
+ this.error = "Missing required Apple Pay configuration";
775
+ this.isConfigValid = false;
776
+ console.error("Apple Pay config error: missing required values", {
777
+ paymentAmount: checkoutStore.paymentAmount,
778
+ paymentCurrency: checkoutStore.paymentCurrency,
779
+ hasAuthToken: Boolean(checkoutStore.authToken),
780
+ accountId: checkoutStore.accountId,
781
+ });
782
+ this.applePayError.emit({ error: this.error, code: ApplePay.ErrorCode.CONFIG_ERROR });
783
+ this.isLoading = false;
784
+ console.groupEnd();
785
+ return;
786
+ }
787
+ this.isAvailable = ApplePayHelpers.isApplePaySupported();
788
+ this.canMakePayments = ApplePayHelpers.canMakePayments();
789
+ console.log('[ApplePay Component] support check:', {
790
+ isAvailable: this.isAvailable,
791
+ canMakePayments: this.canMakePayments,
792
+ hasApplePaySessionOnWindow: typeof window !== 'undefined' && 'ApplePaySession' in window,
793
+ });
794
+ if (!this.isAvailable) {
795
+ this.error = "Apple Pay is not supported on this device";
796
+ console.error(this.error);
797
+ this.applePayError.emit({ error: this.error, code: ApplePay.ErrorCode.NOT_SUPPORTED });
798
+ this.isLoading = false;
799
+ console.groupEnd();
800
+ return;
801
+ }
802
+ if (!this.canMakePayments) {
803
+ this.error = "Apple Pay is not available";
804
+ console.error(this.error);
805
+ this.applePayError.emit({ error: this.error, code: ApplePay.ErrorCode.NOT_AVAILABLE });
806
+ this.isLoading = false;
807
+ console.groupEnd();
808
+ return;
809
+ }
810
+ const applePayConfig = {
811
+ merchantIdentifier: this.merchantIdentifier,
812
+ displayName: this.merchantDisplayName,
813
+ initiative: "web",
814
+ initiativeContext: this.initiativeContext,
815
+ buttonType: this.buttonType,
816
+ buttonStyle: this.buttonStyle,
817
+ };
818
+ console.log('[ApplePay Component] initializing service with config:', applePayConfig);
819
+ this.applePayService = new ApplePayService();
820
+ this.applePayService.initialize(applePayConfig);
821
+ const hasActiveCard = await this.applePayService.canMakePaymentsWithActiveCard();
822
+ if (!hasActiveCard) {
823
+ console.warn("No Apple Pay cards available, but continuing...");
824
+ }
825
+ }
826
+ catch (error) {
827
+ console.error("Apple Pay initialization error:", error);
828
+ this.error =
829
+ error instanceof Error
830
+ ? error.message
831
+ : "Failed to initialize Apple Pay";
832
+ this.applePayError.emit({ error: this.error, code: ApplePay.ErrorCode.INITIALIZATION_ERROR });
833
+ }
834
+ finally {
835
+ this.isLoading = false;
836
+ console.groupEnd();
837
+ }
838
+ }
839
+ async isSupported() {
840
+ return this.isAvailable && this.canMakePayments;
841
+ }
842
+ async getPaymentMethods() {
843
+ if (!this.isAvailable) {
844
+ return [];
845
+ }
846
+ return ApplePayHelpers.getDefaultSupportedNetworks();
847
+ }
848
+ async abort() {
849
+ this.applePayService.abortPaymentSession();
850
+ this.isProcessing = false;
851
+ this.applePayCancelled.emit();
852
+ }
853
+ render() {
854
+ const isReady = !this.isLoading &&
855
+ this.isAvailable &&
856
+ this.canMakePayments &&
857
+ this.isConfigValid;
858
+ return (h(StyledHost, { key: '6ffd1642666316916be6c263d6e79c44fb2d26cf' }, checkoutStore.checkoutLoaded && (h("script", { key: 'd3cea0c2fea2b9e51fd926f581dce118a7b0cc00', async: true, src: 'https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js', onLoad: () => {
859
+ console.log('[ApplePay Component] Apple Pay SDK script loaded');
860
+ this.initializeApplePay();
861
+ } })), h("div", { key: '4a2ee3cb9a98746be1a10c3836833bb408d0896b', class: 'apple-pay-container' }, h(ApplePaySkeleton, { key: 'e804a3d42e4632d224a780c2313da4fd40a35281', isLoading: this.isLoading }), isReady && (h(ApplePayButton, { key: '82c8caa32e8857797dc3071a7404d9418fcd2274', buttonType: this.buttonType, buttonStyle: this.buttonStyle, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleApplePayClick }))), h("style", { key: '022d4942b34097987ca8fe956bb6e02174a488b9' }, `
862
+ .apple-pay-container {
863
+ width: 100%;
864
+ }
865
+ `)));
866
+ }
867
+ }, [257, "justifi-apple-pay", {
868
+ "countryCode": [1, "country-code"],
869
+ "merchantIdentifier": [1, "merchant-identifier"],
870
+ "merchantDisplayName": [1, "merchant-display-name"],
871
+ "initiativeContext": [1, "initiative-context"],
872
+ "buttonType": [1, "button-type"],
873
+ "buttonStyle": [1, "button-style"],
874
+ "disabled": [4],
875
+ "showSkeleton": [4, "show-skeleton"],
876
+ "isLoading": [32],
877
+ "isProcessing": [32],
878
+ "isAvailable": [32],
879
+ "canMakePayments": [32],
880
+ "isConfigValid": [32],
881
+ "error": [32],
882
+ "isSupported": [64],
883
+ "getPaymentMethods": [64],
884
+ "abort": [64]
885
+ }]);
886
+ // Centralized error codes for the Apple Pay component layer
887
+ ApplePay.ErrorCode = {
888
+ CONFIG_ERROR: 'CONFIG_ERROR',
889
+ NOT_SUPPORTED: 'NOT_SUPPORTED',
890
+ NOT_AVAILABLE: 'NOT_AVAILABLE',
891
+ INITIALIZATION_ERROR: 'INITIALIZATION_ERROR',
892
+ PAYMENT_FAILED: 'PAYMENT_FAILED',
893
+ };
894
+ function defineCustomElement$1() {
895
+ if (typeof customElements === "undefined") {
896
+ return;
897
+ }
898
+ const components = ["justifi-apple-pay"];
899
+ components.forEach(tagName => { switch (tagName) {
900
+ case "justifi-apple-pay":
901
+ if (!customElements.get(tagName)) {
902
+ customElements.define(tagName, ApplePay);
903
+ }
904
+ break;
905
+ } });
906
+ }
907
+ defineCustomElement$1();
2
908
 
3
909
  const JustifiApplePay = ApplePay;
4
910
  const defineCustomElement = defineCustomElement$1;