@foxy.io/elements 1.45.0-beta.5 → 1.46.0-beta.1

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 (326) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-admin-transaction-card.js +1 -0
  7. package/dist/cdn/foxy-api-browser.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  9. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  10. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-card.js +1 -1
  12. package/dist/cdn/foxy-attribute-form.js +1 -1
  13. package/dist/cdn/foxy-billing-address-card.js +1 -1
  14. package/dist/cdn/foxy-cancellation-form.js +1 -1
  15. package/dist/cdn/foxy-cart-card.js +1 -1
  16. package/dist/cdn/foxy-cart-form.js +2 -2
  17. package/dist/cdn/foxy-client-card.js +1 -1
  18. package/dist/cdn/foxy-client-form.js +1 -1
  19. package/dist/cdn/foxy-collection-page.js +1 -1
  20. package/dist/cdn/foxy-collection-pages.js +1 -1
  21. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  22. package/dist/cdn/foxy-coupon-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  24. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  26. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  27. package/dist/cdn/foxy-coupon-form.js +1 -1
  28. package/dist/cdn/foxy-custom-field-card.js +1 -1
  29. package/dist/cdn/foxy-custom-field-form.js +1 -1
  30. package/dist/cdn/foxy-customer-api.js +1 -1
  31. package/dist/cdn/foxy-customer-card.js +1 -1
  32. package/dist/cdn/foxy-customer-form.js +1 -1
  33. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  34. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  35. package/dist/cdn/foxy-customer-portal.js +11 -11
  36. package/dist/cdn/foxy-customer.js +1 -1
  37. package/dist/cdn/foxy-customers-table.js +1 -1
  38. package/dist/cdn/foxy-discount-builder.js +1 -1
  39. package/dist/cdn/foxy-discount-card.js +1 -1
  40. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  41. package/dist/cdn/foxy-donation.js +1 -1
  42. package/dist/cdn/foxy-downloadable-card.js +1 -1
  43. package/dist/cdn/foxy-downloadable-form.js +1 -1
  44. package/dist/cdn/foxy-email-template-card.js +1 -1
  45. package/dist/cdn/foxy-email-template-form.js +1 -1
  46. package/dist/cdn/foxy-error-entry-card.js +1 -1
  47. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  48. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  49. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  50. package/dist/cdn/foxy-form-dialog.js +1 -1
  51. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  52. package/dist/cdn/foxy-gift-card-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  54. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  55. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  56. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  57. package/dist/cdn/foxy-gift-card-form.js +1 -1
  58. package/dist/cdn/foxy-i18n-editor.js +1 -1
  59. package/dist/cdn/foxy-i18n.js +1 -1
  60. package/dist/cdn/foxy-integration-card.js +1 -1
  61. package/dist/cdn/foxy-integration-form.js +1 -1
  62. package/dist/cdn/foxy-item-card.js +1 -1
  63. package/dist/cdn/foxy-item-category-card.js +1 -1
  64. package/dist/cdn/foxy-item-category-form.js +1 -1
  65. package/dist/cdn/foxy-item-form.js +1 -1
  66. package/dist/cdn/foxy-item-option-card.js +1 -1
  67. package/dist/cdn/foxy-item-option-form.js +1 -1
  68. package/dist/cdn/foxy-items-form.js +1 -1
  69. package/dist/cdn/foxy-native-integration-card.js +1 -1
  70. package/dist/cdn/foxy-native-integration-form.js +1 -1
  71. package/dist/cdn/foxy-nucleon-element.js +1 -1
  72. package/dist/cdn/foxy-pagination.js +1 -1
  73. package/dist/cdn/foxy-passkey-card.js +1 -1
  74. package/dist/cdn/foxy-passkey-form.js +1 -1
  75. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  76. package/dist/cdn/foxy-payment-card.js +1 -1
  77. package/dist/cdn/foxy-payment-method-card.js +1 -1
  78. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  79. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  82. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  83. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  84. package/dist/cdn/foxy-payments-api.js +1 -1
  85. package/dist/cdn/foxy-query-builder.js +1 -1
  86. package/dist/cdn/foxy-report-form.js +1 -1
  87. package/dist/cdn/foxy-reports-table.js +1 -1
  88. package/dist/cdn/foxy-shipment-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  90. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  91. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  92. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  93. package/dist/cdn/foxy-sign-in-form.js +1 -1
  94. package/dist/cdn/foxy-spinner.js +1 -1
  95. package/dist/cdn/foxy-store-card.js +1 -1
  96. package/dist/cdn/foxy-store-form.js +1 -1
  97. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  98. package/dist/cdn/foxy-store-transaction-folder-card.js +1 -0
  99. package/dist/cdn/foxy-store-transaction-folder-form.js +1 -0
  100. package/dist/cdn/foxy-subscription-card.js +1 -1
  101. package/dist/cdn/foxy-subscription-form.js +1 -1
  102. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  103. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  104. package/dist/cdn/foxy-swipe-actions.js +1 -1
  105. package/dist/cdn/foxy-table.js +1 -1
  106. package/dist/cdn/foxy-tax-card.js +1 -1
  107. package/dist/cdn/foxy-tax-form.js +1 -1
  108. package/dist/cdn/foxy-template-config-form.js +1 -1
  109. package/dist/cdn/foxy-template-form.js +1 -1
  110. package/dist/cdn/foxy-template-set-card.js +1 -1
  111. package/dist/cdn/foxy-template-set-form.js +1 -1
  112. package/dist/cdn/foxy-transaction-card.js +1 -1
  113. package/dist/cdn/foxy-transaction.js +1 -1
  114. package/dist/cdn/foxy-transactions-table.js +1 -1
  115. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  116. package/dist/cdn/foxy-user-card.js +1 -1
  117. package/dist/cdn/foxy-user-form.js +1 -1
  118. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  119. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  120. package/dist/cdn/foxy-users-table.js +1 -1
  121. package/dist/cdn/foxy-webhook-card.js +1 -1
  122. package/dist/cdn/foxy-webhook-form.js +1 -1
  123. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  124. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  125. package/dist/cdn/{shared-6c25eb72.js → shared-0557539b.js} +1 -1
  126. package/dist/cdn/{shared-1e14a3fe.js → shared-0b8768db.js} +1 -1
  127. package/dist/cdn/{shared-cc0d9412.js → shared-0db4e843.js} +3 -3
  128. package/dist/cdn/{shared-e1e4d8f5.js → shared-0e19bda5.js} +1 -1
  129. package/dist/cdn/{shared-85ed835a.js → shared-0e25ac65.js} +1 -1
  130. package/dist/cdn/{shared-4e1bff30.js → shared-0e5484c2.js} +1 -1
  131. package/dist/cdn/{shared-7dc40542.js → shared-11de7969.js} +1 -1
  132. package/dist/cdn/{shared-fd5ff448.js → shared-14cc889b.js} +1 -1
  133. package/dist/cdn/{shared-f9d1baff.js → shared-15a75e70.js} +1 -1
  134. package/dist/cdn/{shared-946a7af6.js → shared-16776ac6.js} +1 -1
  135. package/dist/cdn/{shared-c6b1b119.js → shared-18dc7a8a.js} +1 -1
  136. package/dist/cdn/{shared-c929504f.js → shared-1c985317.js} +1 -1
  137. package/dist/cdn/{shared-f1e48b0e.js → shared-2111aa44.js} +1 -1
  138. package/dist/cdn/shared-257dd725.js +1 -0
  139. package/dist/cdn/{shared-a268320e.js → shared-27c16d99.js} +1 -1
  140. package/dist/cdn/{shared-4cc42648.js → shared-28ceb7f7.js} +1 -1
  141. package/dist/cdn/{shared-a1297ca4.js → shared-2df3c589.js} +1 -1
  142. package/dist/cdn/{shared-85668fe8.js → shared-2f8d04dc.js} +1 -1
  143. package/dist/cdn/{shared-e54135f0.js → shared-32b2d003.js} +1 -1
  144. package/dist/cdn/{shared-005168e0.js → shared-34a87829.js} +1 -1
  145. package/dist/cdn/{shared-5963a49e.js → shared-360196ad.js} +1 -1
  146. package/dist/cdn/shared-3d353eb8.js +1 -0
  147. package/dist/cdn/{shared-3c94ab84.js → shared-4158f91e.js} +1 -1
  148. package/dist/cdn/{shared-809d503c.js → shared-4194ffe7.js} +1 -1
  149. package/dist/cdn/{shared-c782b9fa.js → shared-41c9c53f.js} +1 -1
  150. package/dist/cdn/{shared-8340f3ab.js → shared-4498a367.js} +1 -1
  151. package/dist/cdn/shared-47f3f5f5.js +29 -0
  152. package/dist/cdn/{shared-788173f2.js → shared-4eb52fc7.js} +1 -1
  153. package/dist/cdn/{shared-f8519b17.js → shared-57e94234.js} +1 -1
  154. package/dist/cdn/{shared-a704aaa4.js → shared-58add5b4.js} +1 -1
  155. package/dist/cdn/{shared-e502a7be.js → shared-59128d82.js} +1 -1
  156. package/dist/cdn/{shared-433eea12.js → shared-5a469962.js} +1 -1
  157. package/dist/cdn/shared-5c8931a0.js +1 -0
  158. package/dist/cdn/{shared-d3414cf0.js → shared-64231b81.js} +1 -1
  159. package/dist/cdn/{shared-64e243c4.js → shared-66278c21.js} +1 -1
  160. package/dist/cdn/shared-6740e365.js +1 -0
  161. package/dist/cdn/{shared-65b2760f.js → shared-69c98b7b.js} +1 -1
  162. package/dist/cdn/{shared-b5a0d106.js → shared-6bf89411.js} +1 -1
  163. package/dist/cdn/{shared-50f8f2bd.js → shared-6f071960.js} +1 -1
  164. package/dist/cdn/{shared-138959d7.js → shared-6f90d987.js} +1 -1
  165. package/dist/cdn/{shared-e4792d4a.js → shared-730acf1d.js} +1 -1
  166. package/dist/cdn/{shared-1ae16c80.js → shared-742640c2.js} +1 -1
  167. package/dist/cdn/shared-791b4510.js +1 -0
  168. package/dist/cdn/{shared-3b4148ad.js → shared-7f7d6ceb.js} +1 -1
  169. package/dist/cdn/{shared-be30b940.js → shared-803be1e4.js} +1 -1
  170. package/dist/cdn/{shared-2d1b1ab2.js → shared-845f968f.js} +1 -1
  171. package/dist/cdn/shared-8498f274.js +1 -0
  172. package/dist/cdn/{shared-bea6e6a7.js → shared-84e97597.js} +1 -1
  173. package/dist/cdn/{shared-597193f7.js → shared-8df4ab18.js} +1 -1
  174. package/dist/cdn/{shared-7fec42f2.js → shared-8f9014ff.js} +1 -1
  175. package/dist/cdn/{shared-0ea750af.js → shared-930e68b7.js} +1 -1
  176. package/dist/cdn/{shared-d6a0954b.js → shared-9496e995.js} +1 -1
  177. package/dist/cdn/{shared-0fb0732a.js → shared-97fac71c.js} +1 -1
  178. package/dist/cdn/shared-9b138652.js +1 -0
  179. package/dist/cdn/{shared-c5c123c5.js → shared-9e0b104a.js} +1 -1
  180. package/dist/cdn/{shared-21a945fd.js → shared-a08e5a5f.js} +5 -5
  181. package/dist/cdn/shared-a449033a.js +1 -0
  182. package/dist/cdn/{shared-3615b419.js → shared-a6ddec3d.js} +1 -1
  183. package/dist/cdn/{shared-e7a2b31d.js → shared-b01c3b62.js} +1 -1
  184. package/dist/cdn/{shared-5b0c206b.js → shared-b2cbe727.js} +1 -1
  185. package/dist/cdn/{shared-529a82a3.js → shared-b3fe8c63.js} +1 -1
  186. package/dist/cdn/{shared-51376cac.js → shared-bdc981e3.js} +1 -1
  187. package/dist/cdn/{shared-1091aa45.js → shared-be2ce0e6.js} +1 -1
  188. package/dist/cdn/{shared-937e58bf.js → shared-bf8d95b9.js} +1 -1
  189. package/dist/cdn/{shared-85feff39.js → shared-c5a44ef2.js} +1 -1
  190. package/dist/cdn/shared-c7796413.js +1 -0
  191. package/dist/cdn/{shared-12973e93.js → shared-c84333db.js} +1 -1
  192. package/dist/cdn/{shared-5380e27d.js → shared-d46230dc.js} +1 -1
  193. package/dist/cdn/{shared-9e8344bf.js → shared-d4b77609.js} +1 -1
  194. package/dist/cdn/{shared-7d15992f.js → shared-d9378323.js} +1 -1
  195. package/dist/cdn/{shared-37869bac.js → shared-da4f9115.js} +1 -1
  196. package/dist/cdn/shared-e2d5673b.js +1 -0
  197. package/dist/cdn/{shared-636d6e33.js → shared-e41960a0.js} +1 -1
  198. package/dist/cdn/{shared-278b8790.js → shared-e55c8dc4.js} +1 -1
  199. package/dist/cdn/{shared-5bcf861e.js → shared-eb49be2e.js} +1 -1
  200. package/dist/cdn/{shared-95d34ae8.js → shared-f2a7eb85.js} +5 -5
  201. package/dist/cdn/{shared-df7d368c.js → shared-fb859ece.js} +1 -1
  202. package/dist/cdn/shared-fc155659.js +1 -0
  203. package/dist/cdn/translations/admin-subscription-form/en.json +6 -6
  204. package/dist/cdn/translations/admin-transaction-card/en.json +35 -0
  205. package/dist/cdn/translations/coupon-code-form/en.json +6 -6
  206. package/dist/cdn/translations/store-transaction-folder-card/en.json +8 -0
  207. package/dist/cdn/translations/store-transaction-folder-form/en.json +61 -0
  208. package/dist/cdn/translations/transaction/en.json +4 -0
  209. package/dist/elements/internal/InternalCard/InternalCard.js +1 -1
  210. package/dist/elements/internal/InternalCard/InternalCard.js.map +1 -1
  211. package/dist/elements/internal/InternalDateControl/getMonthNames.js +2 -2
  212. package/dist/elements/internal/InternalDateControl/getMonthNames.js.map +1 -1
  213. package/dist/elements/internal/InternalForm/InternalForm.d.ts +2 -4
  214. package/dist/elements/internal/InternalForm/InternalForm.js +17 -9
  215. package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
  216. package/dist/elements/internal/InternalForm/types.d.ts +9 -0
  217. package/dist/elements/internal/InternalForm/types.js.map +1 -1
  218. package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +2 -1
  219. package/dist/elements/internal/InternalTextControl/InternalTextControl.js +39 -0
  220. package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
  221. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +1 -2
  222. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
  223. package/dist/elements/public/AdminSubscriptionForm/index.d.ts +1 -1
  224. package/dist/elements/public/AdminSubscriptionForm/index.js +1 -1
  225. package/dist/elements/public/AdminSubscriptionForm/index.js.map +1 -1
  226. package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.d.ts +21 -0
  227. package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.js +166 -0
  228. package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.js.map +1 -0
  229. package/dist/elements/public/AdminTransactionCard/index.d.ts +6 -0
  230. package/dist/elements/public/AdminTransactionCard/index.js +8 -0
  231. package/dist/elements/public/AdminTransactionCard/index.js.map +1 -0
  232. package/dist/elements/public/AdminTransactionCard/types.d.ts +5 -0
  233. package/dist/elements/public/AdminTransactionCard/types.js +2 -0
  234. package/dist/elements/public/AdminTransactionCard/types.js.map +1 -0
  235. package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/InternalCartFormTotalsControl.js +6 -6
  236. package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/InternalCartFormTotalsControl.js.map +1 -1
  237. package/dist/elements/public/CartForm/types.d.ts +1 -1
  238. package/dist/elements/public/CartForm/types.js.map +1 -1
  239. package/dist/elements/public/CouponCodeForm/CouponCodeForm.d.ts +1 -0
  240. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +13 -1
  241. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
  242. package/dist/elements/public/CouponCodeForm/index.d.ts +1 -1
  243. package/dist/elements/public/CouponCodeForm/index.js +1 -1
  244. package/dist/elements/public/CouponCodeForm/index.js.map +1 -1
  245. package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js +7 -3
  246. package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js.map +1 -1
  247. package/dist/elements/public/FormDialog/FormDialog.js +1 -0
  248. package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
  249. package/dist/elements/public/NucleonElement/NucleonElement.d.ts +2 -2
  250. package/dist/elements/public/NucleonElement/NucleonElement.js +19 -13
  251. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  252. package/dist/elements/public/PaymentsApi/api/types.d.ts +6 -0
  253. package/dist/elements/public/PaymentsApi/api/types.js.map +1 -1
  254. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +31 -42
  255. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -1
  256. package/dist/elements/public/StoreForm/StoreForm.js +0 -2
  257. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  258. package/dist/elements/public/StoreTransactionFolderCard/StoreTransactionFolderCard.d.ts +27 -0
  259. package/dist/elements/public/StoreTransactionFolderCard/StoreTransactionFolderCard.js +134 -0
  260. package/dist/elements/public/StoreTransactionFolderCard/StoreTransactionFolderCard.js.map +1 -0
  261. package/dist/elements/public/StoreTransactionFolderCard/index.d.ts +5 -0
  262. package/dist/elements/public/StoreTransactionFolderCard/index.js +7 -0
  263. package/dist/elements/public/StoreTransactionFolderCard/index.js.map +1 -0
  264. package/dist/elements/public/StoreTransactionFolderCard/types.d.ts +3 -0
  265. package/dist/elements/public/StoreTransactionFolderCard/types.js +2 -0
  266. package/dist/elements/public/StoreTransactionFolderCard/types.js.map +1 -0
  267. package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.d.ts +18 -0
  268. package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.js +76 -0
  269. package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.js.map +1 -0
  270. package/dist/elements/public/StoreTransactionFolderForm/index.d.ts +7 -0
  271. package/dist/elements/public/StoreTransactionFolderForm/index.js +9 -0
  272. package/dist/elements/public/StoreTransactionFolderForm/index.js.map +1 -0
  273. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/InternalStoreTransactionFolderFormColorControl.d.ts +8 -0
  274. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/InternalStoreTransactionFolderFormColorControl.js +68 -0
  275. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/InternalStoreTransactionFolderFormColorControl.js.map +1 -0
  276. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/index.d.ts +3 -0
  277. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/index.js +5 -0
  278. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/index.js.map +1 -0
  279. package/dist/elements/public/StoreTransactionFolderForm/types.d.ts +3 -0
  280. package/dist/elements/public/StoreTransactionFolderForm/types.js +2 -0
  281. package/dist/elements/public/StoreTransactionFolderForm/types.js.map +1 -0
  282. package/dist/elements/public/SwipeActions/SwipeActions.d.ts +0 -1
  283. package/dist/elements/public/SwipeActions/SwipeActions.js +6 -7
  284. package/dist/elements/public/SwipeActions/SwipeActions.js.map +1 -1
  285. package/dist/elements/public/TaxCard/TaxCard.js +2 -2
  286. package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
  287. package/dist/elements/public/TaxForm/TaxForm.js +0 -2
  288. package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
  289. package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControl.js +1 -3
  290. package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControl.js.map +1 -1
  291. package/dist/elements/public/Transaction/Transaction.d.ts +2 -3
  292. package/dist/elements/public/Transaction/Transaction.js +30 -6
  293. package/dist/elements/public/Transaction/Transaction.js.map +1 -1
  294. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.d.ts +5 -1
  295. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +87 -18
  296. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
  297. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.d.ts +1 -0
  298. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js +1 -0
  299. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js.map +1 -1
  300. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +6 -6
  301. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +1 -1
  302. package/dist/elements/public/Transaction/types.d.ts +1 -3
  303. package/dist/elements/public/Transaction/types.js.map +1 -1
  304. package/dist/elements/public/WebhookCard/types.d.ts +1 -3
  305. package/dist/elements/public/WebhookCard/types.js.map +1 -1
  306. package/dist/elements/public/index.d.ts +3 -0
  307. package/dist/elements/public/index.defined.d.ts +3 -0
  308. package/dist/elements/public/index.defined.js +3 -0
  309. package/dist/elements/public/index.defined.js.map +1 -1
  310. package/dist/elements/public/index.js +3 -0
  311. package/dist/elements/public/index.js.map +1 -1
  312. package/dist/mixins/themeable.js +106 -4
  313. package/dist/mixins/themeable.js.map +1 -1
  314. package/package.json +2 -2
  315. package/dist/cdn/shared-10da9bf0.js +0 -1
  316. package/dist/cdn/shared-1da47f50.js +0 -1
  317. package/dist/cdn/shared-4b24accb.js +0 -1
  318. package/dist/cdn/shared-5905fca4.js +0 -1
  319. package/dist/cdn/shared-69074dae.js +0 -1
  320. package/dist/cdn/shared-77829fbb.js +0 -1
  321. package/dist/cdn/shared-7a87cd33.js +0 -29
  322. package/dist/cdn/shared-a6e889a8.js +0 -1
  323. package/dist/cdn/shared-c66ca1f5.js +0 -1
  324. package/dist/cdn/shared-cb4ac1d2.js +0 -1
  325. package/dist/cdn/shared-f8e1143e.js +0 -1
  326. package/dist/cdn/shared-fc784ca0.js +0 -1
@@ -1 +1 @@
1
- import"./shared-597193f7.js";import"./shared-4cc42648.js";import"./shared-d3414cf0.js";import"./shared-e502a7be.js";import"./shared-f8519b17.js";import"./shared-fc784ca0.js";import{I as e}from"./shared-77829fbb.js";import"./foxy-nucleon-element.js";import"./shared-10da9bf0.js";import{I as t,a as o}from"./shared-1e14a3fe.js";import{l as n}from"./shared-cf613436.js";import{c as i}from"./shared-4e709717.js";import{h as s,s as r}from"./shared-ba5c42c7.js";import{_ as a,B as l}from"./shared-7fec42f2.js";import{i as c}from"./shared-53e42a77.js";import{R as u,a as _}from"./shared-7a87cd33.js";import"./shared-005168e0.js";import"./shared-433eea12.js";import"./shared-64e243c4.js";import"./shared-b5a0d106.js";import"./shared-9e8344bf.js";import"./shared-5bcf861e.js";import"./shared-937e58bf.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-53e476fd.js";import"./shared-df7d368c.js";import"./shared-809d503c.js";import"./shared-a268320e.js";import"./shared-e54135f0.js";import"./shared-85ed835a.js";import"./shared-529a82a3.js";import"./shared-278b8790.js";import"./shared-5963a49e.js";import"./shared-c929504f.js";import"./shared-a704aaa4.js";import"./shared-65b2760f.js";import"./shared-c782b9fa.js";import"./shared-0ea750af.js";import"./foxy-copy-to-clipboard.js";import"./shared-5b0c206b.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-69074dae.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-5212ef4f.js";let d,p,f=e=>e;customElements.define("foxy-internal-template-config-form-supported-cards-control",class extends t{renderControl(){const e={amex:"American Express",diners:"Diners Club",discover:"Discover",jcb:"JCB",maestro:"Maestro",mastercard:"Mastercard",unionpay:"UnionPay",visa:"Visa"};return s(d||(d=f` <div class="flex flex-wrap -m-xs"> ${0} </div> `),Object.entries(n).map((([t,o])=>{if(!e[t])return;const n=this._value.includes(t);return s(p||(p=f` <div data-testid="${0}" class="${0}"> <label class="${0}"> <div class="h-s">${0}</div> <div class="text-s font-medium mx-s my-auto leading-none">${0}</div> <input type="checkbox" class="sr-only" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </label> </div> `),t,i({"m-xs rounded":!0,"opacity-50 cursor-default":this.disabled,"cursor-pointer ring-primary-50 focus-within-ring-2":!this.disabled}),i({"overflow-hidden transition-colors flex rounded-s border":!0,"border-primary bg-primary-10 text-primary":n&&!this.readonly,"border-contrast bg-contrast-5 text-secondary":n&&this.readonly,"hover-text-body":n&&!this.disabled&&!this.readonly,"border-contrast-10":!n,"hover-border-primary":!n&&!this.disabled&&!this.readonly,"hover-text-primary":!n&&!this.disabled&&!this.readonly}),o,e[t],this.disabled,this.readonly,n,(e=>{if(this.readonly)return e.preventDefault();e.stopPropagation();const o=[...this._value];e.currentTarget.checked?o.push(t):o.splice(o.indexOf(t),1),this._value=o}))})))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:[]}set _value(e){super._value=e}});let g,h,y,m,b,x=e=>e;let v,w,j,$,k=e=>e;customElements.define("foxy-internal-template-config-form-filter-values-control-item",class extends o{constructor(){super(...arguments),this.options={},this.regions=[],this.name="",this.code="",this.__newRegion=""}static get properties(){return a(a({},super.properties),{},{__newRegion:{attribute:!1},options:{type:Object},regions:{type:Array},name:{type:String},code:{type:String}})}render(){const e=Object.values(this.options),t=e.filter((e=>!this.regions.includes(e.c)));return s(g||(g=x` <div class="${0}"> <div data-testid="country" class="h-m flex justify-between items-center bg-contrast-5"> <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <span>${0}</span> </div> <button aria-label="${0}" class="${0}" style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:close" class="icon-inline text-m"></iron-icon> </button> </div> ${0} </div> `),i({"border border-contrast-5 rounded-s font-medium overflow-hidden":!0,"text-disabled":this.disabled}),this.name||this.code,this.t("delete"),i({"mr-xs items-center justify-center rounded-full transition-colors":!0,"hover-bg-error-10 hover-text-error":!this.disabled,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!this.disabled,"cursor-default":this.disabled,flex:!this.readonly,hidden:this.readonly}),this.disabled,(()=>this.dispatchEvent(new CustomEvent("delete"))),0===e.length?"":s(h||(h=x` <div data-testid="regions" class="flex flex-wrap p-xs text-s"> ${0} ${0} </div> `),this.regions.map((e=>{var t;return s(y||(y=x` <div class="flex items-center rounded-s border border-contrast-10 h-s m-xs"> <span class="mx-s">${0}</span> <button aria-label="${0}" class="${0}" style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:close" class="icon-inline text-m"></iron-icon> </button> </div> `),(null===(t=this.options[e])||void 0===t?void 0:t.n)||e,this.t("delete"),i({"items-center justify-center rounded-s transition-colors":!0,"hover-bg-error-10 hover-text-error":!this.disabled,"focus-outline-none focus-ring-2 ring-inset ring-primary-50":!this.disabled,"cursor-default":this.disabled,flex:!this.readonly,hidden:this.readonly}),this.disabled,(()=>{this.regions=this.regions.filter((t=>t!==e)),this.dispatchEvent(new CustomEvent("update:regions"))}))})),0===t.length?"":s(m||(m=x` <div data-testid="new-region" class="${0}"> <select class="${0}" ?disabled="${0}" @change="${0}"> <option value="" disabled="disabled" selected="selected">${0}</option> ${0} </select> </div> `),i({"h-s m-xs items-center transition-colors border border-contrast-10 rounded-s":!0,"focus-within-ring-1 ring-primary-50 focus-within-border-primary-50":!this.disabled,flex:!this.readonly,hidden:this.readonly}),i({"appearance-none bg-transparent h-s text-s px-s font-medium":!0,"transition-colors rounded-s focus-outline-none":!0,"cursor-pointer hover-bg-contrast-5":!this.disabled}),this.disabled,(e=>{const t=e.currentTarget;this.__newRegion=t.value,this.__addRegion(),t.value=""}),this.t("add_region"),t.map((e=>s(b||(b=x`<option value="${0}">${0}</option>`),e.c,e.n))))))}__addRegion(){this.regions=[...new Set([...this.regions,this.__newRegion])],this.__newRegion="",this.dispatchEvent(new CustomEvent("update:regions"))}}),customElements.define("foxy-internal-template-config-form-filter-values-control",class extends t{constructor(){super(...arguments),this.countries=null,this.__newCountry=""}static get properties(){return a(a({},super.properties),{},{__newCountry:{attribute:!1},countries:{}})}renderControl(){var e,t,o,n;const r=Object.values(null!==(o=null===(t=null===(e=this.__countriesLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values)&&void 0!==o?o:{}),l=r.filter((e=>!(e.cc2 in this._value)));return s(v||(v=k` <div class="space-y-s" data-testid="countries"> ${0} ${0} </div> <foxy-nucleon infer="" href="${0}" id="countriesLoader" @update="${0}"> </foxy-nucleon> `),Object.entries(this._value).map((([e,t])=>{var o;const n=r.find((t=>t.cc2===e));return s(w||(w=k` <foxy-internal-template-config-form-filter-values-control-item regions="${0}" options="${0}" infer="" code="${0}" name="${0}" ?disabled="${0}" ?readonly="${0}" @update:regions="${0}" @delete="${0}"> </foxy-internal-template-config-form-filter-values-control-item> `),JSON.stringify("*"===t?[]:t),JSON.stringify(Array.isArray(null==n?void 0:n.regions)?{}:null!==(o=null==n?void 0:n.regions)&&void 0!==o?o:{}),e,c(null==n?void 0:n.default),this.disabled,this.readonly,(t=>{const o=a({},this._value),n=t.currentTarget.regions;o[e]=n.length?n:"*",this._value=o}),(()=>{const t=a({},this._value);delete t[e],this._value=t}))})),0===l.length&&0!==r.length?"":s(j||(j=k` <div data-testid="new-country" class="${0}"> <select class="${0}" ?disabled="${0}" @change="${0}"> <option value="" disabled="disabled" selected="selected">${0}</option> ${0} </select> </div> `),i({"h-m flex items-center rounded-s transition-colors":!0,"border border-contrast-10 ring-primary-50":!0,"focus-within-ring-1 focus-within-border-primary-50":!this.disabled,flex:!this.readonly,hidden:this.readonly}),i({"appearance-none bg-transparent h-m text-m px-s flex-1 font-medium":!0,"transition-colors rounded-s focus-outline-none":!0,"cursor-pointer hover-bg-contrast-5":!this.disabled,"text-disabled":this.disabled}),this.disabled,(e=>{const t=e.currentTarget;this.__newCountry=t.value,this.__addCountry(),t.value=""}),this.t("add_country"),l.map((e=>s($||($=k`<option value="${0}">${0}</option>`),e.cc2,e.default)))),c(null!==(n=this.countries)&&void 0!==n?n:void 0),(()=>this.requestUpdate()))}__addCountry(){this._value=a(a({},this._value),{},{[this.__newCountry]:"*"}),this.__newCountry=""}get __countriesLoader(){return this.renderRoot.querySelector("#countriesLoader")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:{}}set _value(e){super._value=e}});let S,O,q,F,J,N,C,V,D,R,T,U,A,z,E=e=>e;const G=u(_(e,"template-config-form"));class B extends G{constructor(){super(...arguments),this.countries=null,this.regions=null,this.store=null,this.__customCheckoutFieldCouponEntryRequirementsOptions=JSON.stringify([{label:"option_enabled",value:"enabled"},{label:"option_disabled",value:"disabled"}]),this.__customCheckoutFieldRequirementsOptions=JSON.stringify([{label:"option_default",value:"default"},{label:"option_optional",value:"optional"},{label:"option_required",value:"required"},{label:"option_hidden",value:"hidden"}]),this.__tosCheckboxSettingsInitialStateOptions=JSON.stringify([{label:"option_checked",value:"checked"},{label:"option_unchecked",value:"unchecked"}]),this.__locationFilteringFilterTypeOptions=JSON.stringify([{label:"option_blocklist",value:"blacklist"},{label:"option_allowlist",value:"whitelist"}]),this.__foxycompleteShowComboboxOptions=JSON.stringify([{label:"option_combobox",value:"combobox"},{label:"option_search",value:"search"}]),this.__tosCheckboxSettingsUsageOptions=JSON.stringify([{label:"option_none",value:"none"},{label:"option_optional",value:"optional"},{label:"option_required",value:"required"}]),this.__locationFilteringUsageOptions=JSON.stringify([{label:"option_none",value:"none"},{label:"option_shipping",value:"shipping"},{label:"option_billing",value:"billing"},{label:"option_both",value:"both"},{label:"option_independent",value:"independent"}]),this.__cscRequirementsValueOptions=JSON.stringify([{label:"option_all_cards",value:"all_cards"},{label:"option_sso_only",value:"sso_only"},{label:"option_new_cards_only",value:"new_cards_only"}]),this.__checkoutTypeDefaultOptions=JSON.stringify([{label:"option_default_account",value:"default_account"},{label:"option_default_guest",value:"default_guest"}]),this.__checkoutTypeAccountOptions=JSON.stringify([{label:"option_account",value:"account_only"},{label:"option_guest",value:"guest_only"},{label:"option_both",value:"default_guest"}]),this.__cartTypeOptions=JSON.stringify([{label:"option_default",value:"default"},{label:"option_fullpage",value:"fullpage"},{label:"option_custom",value:"custom"}]),this.__locationFilteringFilterValuesSetValue=e=>{const t=this.__formJson,o=a(a({},t.location_filtering),{},{shipping_filter_values:e,billing_filter_values:e});this.edit({json:JSON.stringify(a(a({},t),{},{location_filtering:o}))})},this.__locationFilteringFilterTypeSetValue=e=>{const t=this.__formJson,o=a(a({},t.location_filtering),{},{shipping_filter_type:e,billing_filter_type:e});this.edit({json:JSON.stringify(a(a({},t),{},{location_filtering:o}))})},this.__foxycompleteShowComboboxGetValue=()=>this.__formJson.foxycomplete.show_combobox?"combobox":"search",this.__foxycompleteShowComboboxSetValue=e=>{const t="combobox"===e,o=a(a({},this.__formJson.foxycomplete),{},{show_combobox:t});this.edit({json:JSON.stringify(a(a({},this.__formJson),{},{foxycomplete:o}))})},this.__checkoutTypeAccountGetValue=()=>{const e=this.__formJson;return e.checkout_type.includes("default")?"default_guest":e.checkout_type},this.__customConfigGetValue=()=>{const e=this.__formJson;return"string"==typeof e.custom_config?e.custom_config:JSON.stringify(e.custom_config,null,2)},this.__customConfigSetValue=e=>{const t=this.__formJson;try{t.custom_config=JSON.parse(e)}catch(o){t.custom_config=e}this.edit({json:JSON.stringify(t)})},this.__cspUsageGetValue=()=>{const e=this.__formJson.csp.usage;return"enforce"===e||"both"===e},this.__cspUsageSetValue=e=>{const t=this.__formJson,o=t.csp.usage,n={false:{both:"report",enforce:"none"},true:{report:"both",none:"enforce"}}[String(e)][o];if(n){const e=a(a({},t),{},{csp:a(a({},t.csp),{},{usage:n})});this.edit({json:JSON.stringify(e)})}},this.__cspRoUsageGetValue=()=>{const e=this.__formJson.csp.usage;return"report"===e||"both"===e},this.__cspRoUsageSetValue=e=>{const t=this.__formJson,o=t.csp.usage,n={false:{both:"enforce",report:"none"},true:{enforce:"both",none:"report"}}[String(e)][o];if(n){const e=a(a({},t),{},{csp:a(a({},t.csp),{},{usage:n})});this.edit({json:JSON.stringify(e)})}},this.__defaultJSON=JSON.stringify({cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}})}static get properties(){return a(a({},super.properties),{},{countries:{},regions:{},store:{}})}static get v8n(){return[({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_enforce)||void 0===t?void 0:t.reporting_endpoint)&&void 0!==o?o:"").length<=1e3||"csp-policy-enforce-reporting-endpoint:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_report)||void 0===t?void 0:t.reporting_endpoint)&&void 0!==o?o:"").length<=1e3||"csp-policy-report-reporting-endpoint:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_enforce)||void 0===t?void 0:t.script_src)&&void 0!==o?o:[]).every((e=>e.length<=1e3))||"csp-policy-enforce-script-src:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_report)||void 0===t?void 0:t.script_src)&&void 0!==o?o:[]).every((e=>e.length<=1e3))||"csp-policy-report-script-src:v8n_too_long"}]}get hiddenSelector(){var e,t;const o=[super.hiddenSelector.toString()],n=this.__dataJson,i=this.__formJson,s=i.location_filtering.usage,r=i.checkout_type;return"required"!==i.cart_display_config.usage&&o.unshift("cart-group-two","cart-group-three","cart-group-four"),"required"!==i.foxycomplete.usage&&o.unshift("country-and-region-group-one:foxycomplete-show-combobox","country-and-region-group-one:foxycomplete-combobox-open","country-and-region-group-one:foxycomplete-combobox-close","country-and-region-group-one:foxycomplete-show-flags"),!1===i.foxycomplete.show_combobox&&o.unshift("country-and-region-group-one:foxycomplete-combobox-open","country-and-region-group-one:foxycomplete-combobox-close"),"both"!==s&&o.unshift("country-and-region-group-two"),"shipping"!==s&&"independent"!==s&&o.unshift("country-and-region-group-three"),"billing"!==s&&"independent"!==s&&o.unshift("country-and-region-group-four"),"default_account"!==r&&"default_guest"!==r&&o.unshift("customer-accounts:checkout-type-default"),"none"===i.tos_checkbox_settings.usage&&o.unshift("consent-group-one:tos-checkbox-settings-url","consent-group-one:tos-checkbox-settings-initial-state","consent-group-one:tos-checkbox-settings-is-hidden"),"required"!==i.analytics_config.usage&&o.unshift("analytics-config-google-analytics","analytics-config-google-tag"),"required"!==(null==n?void 0:n.analytics_config.google_analytics.usage)&&o.unshift("analytics-config-google-analytics"),"required"!==i.analytics_config.google_analytics.usage&&o.unshift("analytics-config-google-analytics:analytics-config-google-analytics-account-id","analytics-config-google-analytics:analytics-config-google-analytics-include-on-site"),"required"!==i.analytics_config.google_tag.usage&&(o.unshift("analytics-config-google-tag:analytics-config-google-tag-account-id"),o.unshift("analytics-config-google-tag:analytics-config-google-tag-send-to")),!0!==(null===(t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.features_multiship)&&o.unshift("custom-script-values-multiship-checkout-fields"),new l(o.join(" ").trim())}renderBody(){var e,t,o,n,i,a,l;const u=[["billing_address1","billing_address2","billing_city","billing_region","billing_postal_code","billing_country"],["billing_first_name","billing_last_name","billing_company","billing_tax_id","billing_phone","coupon_entry"]],_=[["show_product_weight","show_product_category","show_product_code","show_product_options"],["show_sub_frequency","show_sub_startdate","show_sub_nextdate","show_sub_enddate"]],d=this.__formJson.csp.usage,p=null===(t=null===(e=this.__dataJson)||void 0===e?void 0:e.csp)||void 0===t?void 0:t.usage;return s(S||(S=E` ${0} <foxy-internal-summary-control infer="cart-group-one"> <foxy-internal-select-control json-template="${0}" json-path="cart_type" property="json" options="${0}" layout="summary-item" infer="cart-type"> </foxy-internal-select-control> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="cart_display_config.usage" property="json" infer="cart-display-config-usage" invert> </foxy-internal-switch-control> </foxy-internal-summary-control> <div class="grid sm-grid-cols-2 gap-m" ?hidden="${0}"> ${0} </div> <foxy-internal-summary-control infer="cart-group-four"> <foxy-internal-editable-list-control json-template="${0}" json-path="cart_display_config.hidden_product_options" property="json" layout="summary-item" infer="cart-display-config-hidden-product-options" simple-value> </foxy-internal-editable-list-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-one"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="foxycomplete.usage" property="json" infer="foxycomplete-usage"> </foxy-internal-switch-control> <foxy-internal-select-control options="${0}" layout="summary-item" infer="foxycomplete-show-combobox" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> <foxy-internal-text-control json-template="${0}" json-path="foxycomplete.combobox_open" property="json" layout="summary-item" infer="foxycomplete-combobox-open"> </foxy-internal-text-control> <foxy-internal-text-control json-template="${0}" json-path="foxycomplete.combobox_close" property="json" layout="summary-item" infer="foxycomplete-combobox-close"> </foxy-internal-text-control> <foxy-internal-switch-control json-template="${0}" json-path="foxycomplete.show_flags" property="json" infer="foxycomplete-show-flags"> </foxy-internal-switch-control> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="enabled" json-path="postal_code_lookup.usage" property="json" infer="postal-code-lookup"> </foxy-internal-switch-control> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.usage" property="json" options="${0}" layout="summary-item" infer="location-filtering-usage"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-two"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.shipping_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-filter-type" .setValue="${0}"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.shipping_filter_values" countries="${0}" property="json" infer="location-filtering-filter-values" .setValue="${0}"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-three"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.shipping_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-shipping-filter-type"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.shipping_filter_values" countries="${0}" property="json" infer="location-filtering-shipping-filter-values"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-four"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.billing_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-billing-filter-type"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.billing_filter_values" countries="${0}" property="json" infer="location-filtering-billing-filter-values"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="customer-accounts"> <foxy-internal-select-control json-template="${0}" json-path="checkout_type" property="json" options="${0}" layout="summary-item" infer="checkout-type-account" .getValue="${0}"> </foxy-internal-select-control> <foxy-internal-select-control json-template="${0}" json-path="checkout_type" property="json" options="${0}" layout="summary-item" infer="checkout-type-default"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-one"> <foxy-internal-select-control json-template="${0}" json-path="tos_checkbox_settings.usage" property="json" options="${0}" layout="summary-item" infer="tos-checkbox-settings-usage"> </foxy-internal-select-control> <foxy-internal-text-control json-template="${0}" json-path="tos_checkbox_settings.url" property="json" layout="summary-item" infer="tos-checkbox-settings-url"> </foxy-internal-text-control> <foxy-internal-select-control json-template="${0}" json-path="tos_checkbox_settings.initial_state" property="json" options="${0}" layout="summary-item" infer="tos-checkbox-settings-initial-state"> </foxy-internal-select-control> <foxy-internal-switch-control json-template="${0}" json-path="tos_checkbox_settings.is_hidden" property="json" infer="tos-checkbox-settings-is-hidden"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-two"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="eu_secure_data_transfer_consent.usage" property="json" infer="eu-secure-data-transfer-consent-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-three"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="newsletter_subscribe.usage" property="json" infer="newsletter-subscribe-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="supported-cards-group"> <foxy-internal-template-config-form-supported-cards-control json-template="${0}" json-path="supported_payment_cards" property="json" infer="supported-payment-cards"> </foxy-internal-template-config-form-supported-cards-control> <p class="flex items-start gap-s"> ${0} <foxy-i18n infer="" key="disclaimer"></foxy-i18n> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="csc-requirements-group"> <foxy-internal-select-control json-template="${0}" json-path="csc_requirements" property="json" options="${0}" layout="summary-item" infer="csc-requirements"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="checkout-fields-group-one"> <foxy-internal-switch-control json-template="${0}" false-alias="disabled" true-alias="enabled" json-path="custom_checkout_field_requirements.cart_controls" property="json" infer="custom-checkout-field-requirements-cart-controls"> </foxy-internal-switch-control> </foxy-internal-summary-control> <div class="grid sm-grid-cols-2 gap-m" ?hidden="${0}"> ${0} </div> <foxy-internal-summary-control infer="csp" class="space-y-m" layout="section"> <foxy-internal-summary-control infer="csp-group-one"> <foxy-internal-switch-control json-template="${0}" json-path="csp.usage" property="json" infer="csp-enable-ro-csp" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="csp-group-two"> <foxy-internal-switch-control json-template="${0}" json-path="csp.usage" property="json" infer="csp-enable-csp" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.usage" property="json" infer="analytics-config-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config-google-analytics"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.google_analytics.usage" property="json" infer="analytics-config-google-analytics-usage"> </foxy-internal-switch-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_analytics.account_id" property="json" layout="summary-item" infer="analytics-config-google-analytics-account-id"> </foxy-internal-text-control> <foxy-internal-switch-control json-template="${0}" json-path="analytics_config.google_analytics.include_on_site" property="json" infer="analytics-config-google-analytics-include-on-site"> </foxy-internal-switch-control> <p class="flex items-start gap-s bg-error-10 text-error"> ${0} <foxy-i18n infer="" key="deprecation_notice"></foxy-i18n> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config-google-tag"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.google_tag.usage" property="json" infer="analytics-config-google-tag-usage"> </foxy-internal-switch-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_tag.account_id" property="json" layout="summary-item" infer="analytics-config-google-tag-account-id"> </foxy-internal-text-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_tag.send_to" property="json" layout="summary-item" infer="analytics-config-google-tag-send-to"> </foxy-internal-text-control> <p class="flex items-start gap-s"> ${0} <span> <foxy-i18n infer="" key="usage_notice"></foxy-i18n> <br> <a target="_blank" class="cursor-pointer group text-primary rounded-s font-medium focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://wiki.foxycart.com/v/2.0/analytics#google_tag_ga4_google_ads" rel="nofollow noreferrer noopener"> <foxy-i18n class="transition-opacity group-hover-opacity-80" infer="" key="docs_link"> </foxy-i18n> </a> </span> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="debug"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="debug.usage" property="json" infer="debug-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-source-control infer="custom-config" .getValue="${0}" .setValue="${0}"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.header" property="json" infer="custom-script-values-header"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.checkout_fields" property="json" infer="custom-script-values-checkout-fields"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.multiship_checkout_fields" property="json" infer="custom-script-values-multiship-checkout-fields"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.footer" property="json" infer="custom-script-values-footer"> </foxy-internal-source-control> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="storeLoader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__defaultJSON,this.__cartTypeOptions,this.__defaultJSON,_.every(((e,t)=>e.every((e=>{const o=`cart-group-${0===t?"two":"three"}:cart-display-config-${e.replace(/_/g,"-")}`;return this.hiddenSelector.matches(o,!0)})))),_.map(((e,t)=>s(O||(O=E` <foxy-internal-summary-control infer="cart-group-${0}"> ${0} </foxy-internal-summary-control> `),0===t?"two":"three",e.map((e=>s(q||(q=E` <foxy-internal-switch-control json-template="${0}" json-path="cart_display_config.${0}" property="json" infer="cart-display-config-${0}"> </foxy-internal-switch-control> `),this.__defaultJSON,e,e.replace(/_/g,"-"))))))),this.__defaultJSON,this.__defaultJSON,this.__foxycompleteShowComboboxOptions,this.__foxycompleteShowComboboxGetValue,this.__foxycompleteShowComboboxSetValue,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__locationFilteringUsageOptions,this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__locationFilteringFilterTypeSetValue,this.__defaultJSON,c(null!==(o=this.countries)&&void 0!==o?o:void 0),this.__locationFilteringFilterValuesSetValue,this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__defaultJSON,c(null!==(n=this.countries)&&void 0!==n?n:void 0),this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__defaultJSON,c(null!==(i=this.countries)&&void 0!==i?i:void 0),this.__defaultJSON,this.__checkoutTypeAccountOptions,this.__checkoutTypeAccountGetValue,this.__defaultJSON,this.__checkoutTypeDefaultOptions,this.__defaultJSON,this.__tosCheckboxSettingsUsageOptions,this.__defaultJSON,this.__defaultJSON,this.__tosCheckboxSettingsInitialStateOptions,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(F||(F=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__cscRequirementsValueOptions,this.__defaultJSON,u.every(((e,t)=>e.every((e=>{const o=`checkout-fields-group-${0===t?"two":"three"}:custom-checkout-field-requirements-${e.replace(/_/g,"-").replace("1","-one").replace("2","-two")}`;return this.hiddenSelector.matches(o,!0)})))),u.map(((e,t)=>s(J||(J=E` <foxy-internal-summary-control infer="checkout-fields-group-${0}"> ${0} </foxy-internal-summary-control> `),0===t?"two":"three",e.map((e=>{const t=e.replace(/_/g,"-").replace("1","-one").replace("2","-two"),o=`custom_checkout_field_requirements.${e}`;return s(N||(N=E` <foxy-internal-select-control json-template="${0}" json-path="${0}" property="json" options="${0}" layout="summary-item" infer="custom-checkout-field-requirements-${0}"> </foxy-internal-select-control> `),this.__defaultJSON,o,"coupon_entry"===e?this.__customCheckoutFieldCouponEntryRequirementsOptions:this.__customCheckoutFieldRequirementsOptions,t)}))))),this.__defaultJSON,this.__cspRoUsageGetValue,this.__cspRoUsageSetValue,"report"===d||"both"===d?s(C||(C=E` <foxy-internal-text-control json-template="${0}" json-path="csp.policy_report.reporting_endpoint" property="json" layout="summary-item" infer="csp-policy-report-reporting-endpoint"> </foxy-internal-text-control> <foxy-internal-editable-list-control json-template="${0}" json-path="csp.policy_report.script_src" property="json" layout="summary-item" infer="csp-policy-report-script-src" simple-value> </foxy-internal-editable-list-control> ${0} `),this.__defaultJSON,this.__defaultJSON,"none"===p||"enforce"===p?s(V||(V=E` <div class="flex items-start bg-primary-10" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="warning"></foxy-i18n> <a target="_blank" class="inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://wiki.foxycart.com/v/2.0/content_security_policy"> wiki.foxycart.com </a> </p> </div> `),r(D||(D=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z" clip-rule="evenodd" /></svg>`))):""):"",this.__defaultJSON,this.__cspUsageGetValue,this.__cspUsageSetValue,"enforce"===d||"both"===d?s(R||(R=E` <foxy-internal-text-control json-template="${0}" json-path="csp.policy_enforce.reporting_endpoint" property="json" layout="summary-item" infer="csp-policy-enforce-reporting-endpoint"> </foxy-internal-text-control> <foxy-internal-editable-list-control json-template="${0}" json-path="csp.policy_enforce.script_src" property="json" layout="summary-item" infer="csp-policy-enforce-script-src" simple-value> </foxy-internal-editable-list-control> ${0} `),this.__defaultJSON,this.__defaultJSON,"none"===p||"report"===p?s(T||(T=E` <div class="flex items-start bg-error-10" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="warning"></foxy-i18n> <a target="_blank" class="inline-block rounded font-medium text-error transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-error-50" href="https://wiki.foxycart.com/v/2.0/content_security_policy"> wiki.foxycart.com </a> </p> </div> `),r(U||(U=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>`))):""):"",this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(A||(A=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(z||(z=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__customConfigGetValue,this.__customConfigSetValue,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,super.renderBody(),c(null!==(a=this.store)&&void 0!==a?a:null===(l=this.data)||void 0===l?void 0:l._links["fx:store"].href),(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector("#storeLoader")}get __formJson(){return this.form.json?JSON.parse(this.form.json):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}}get __dataJson(){var e;return(null===(e=this.data)||void 0===e?void 0:e.json)?JSON.parse(this.data.json):null}}customElements.define("foxy-template-config-form",B);export{B as TemplateConfigForm};
1
+ import"./shared-8df4ab18.js";import"./shared-28ceb7f7.js";import"./shared-64231b81.js";import"./shared-59128d82.js";import"./shared-57e94234.js";import"./shared-5c8931a0.js";import{I as e}from"./shared-fc155659.js";import"./foxy-nucleon-element.js";import"./shared-3d353eb8.js";import{I as t,a as o}from"./shared-0b8768db.js";import{l as n}from"./shared-cf613436.js";import{c as i}from"./shared-4e709717.js";import{h as s,s as r}from"./shared-ba5c42c7.js";import{_ as l,B as a}from"./shared-8f9014ff.js";import{i as c}from"./shared-53e42a77.js";import{R as u,a as _}from"./shared-47f3f5f5.js";import"./shared-34a87829.js";import"./shared-5a469962.js";import"./shared-66278c21.js";import"./shared-6bf89411.js";import"./shared-d4b77609.js";import"./shared-eb49be2e.js";import"./shared-bf8d95b9.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-53e476fd.js";import"./shared-fb859ece.js";import"./shared-4194ffe7.js";import"./shared-27c16d99.js";import"./shared-32b2d003.js";import"./shared-0e25ac65.js";import"./shared-b3fe8c63.js";import"./shared-e55c8dc4.js";import"./shared-360196ad.js";import"./shared-1c985317.js";import"./shared-58add5b4.js";import"./shared-69c98b7b.js";import"./shared-41c9c53f.js";import"./shared-930e68b7.js";import"./foxy-copy-to-clipboard.js";import"./shared-b2cbe727.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-9b138652.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./shared-5212ef4f.js";let d,p,f=e=>e;customElements.define("foxy-internal-template-config-form-supported-cards-control",class extends t{renderControl(){const e={amex:"American Express",diners:"Diners Club",discover:"Discover",jcb:"JCB",maestro:"Maestro",mastercard:"Mastercard",unionpay:"UnionPay",visa:"Visa"};return s(d||(d=f` <div class="flex flex-wrap -m-xs"> ${0} </div> `),Object.entries(n).map((([t,o])=>{if(!e[t])return;const n=this._value.includes(t);return s(p||(p=f` <div data-testid="${0}" class="${0}"> <label class="${0}"> <div class="h-s">${0}</div> <div class="text-s font-medium mx-s my-auto leading-none">${0}</div> <input type="checkbox" class="sr-only" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </label> </div> `),t,i({"m-xs rounded":!0,"opacity-50 cursor-default":this.disabled,"cursor-pointer ring-primary-50 focus-within-ring-2":!this.disabled}),i({"overflow-hidden transition-colors flex rounded-s border":!0,"border-primary bg-primary-10 text-primary":n&&!this.readonly,"border-contrast bg-contrast-5 text-secondary":n&&this.readonly,"hover-text-body":n&&!this.disabled&&!this.readonly,"border-contrast-10":!n,"hover-border-primary":!n&&!this.disabled&&!this.readonly,"hover-text-primary":!n&&!this.disabled&&!this.readonly}),o,e[t],this.disabled,this.readonly,n,(e=>{if(this.readonly)return e.preventDefault();e.stopPropagation();const o=[...this._value];e.currentTarget.checked?o.push(t):o.splice(o.indexOf(t),1),this._value=o}))})))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:[]}set _value(e){super._value=e}});let g,h,y,m,b,x=e=>e;let v,w,j,$,k=e=>e;customElements.define("foxy-internal-template-config-form-filter-values-control-item",class extends o{constructor(){super(...arguments),this.options={},this.regions=[],this.name="",this.code="",this.__newRegion=""}static get properties(){return l(l({},super.properties),{},{__newRegion:{attribute:!1},options:{type:Object},regions:{type:Array},name:{type:String},code:{type:String}})}render(){const e=Object.values(this.options),t=e.filter((e=>!this.regions.includes(e.c)));return s(g||(g=x` <div class="${0}"> <div data-testid="country" class="h-m flex justify-between items-center bg-contrast-5"> <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <span>${0}</span> </div> <button aria-label="${0}" class="${0}" style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:close" class="icon-inline text-m"></iron-icon> </button> </div> ${0} </div> `),i({"border border-contrast-5 rounded-s font-medium overflow-hidden":!0,"text-disabled":this.disabled}),this.name||this.code,this.t("delete"),i({"mr-xs items-center justify-center rounded-full transition-colors":!0,"hover-bg-error-10 hover-text-error":!this.disabled,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!this.disabled,"cursor-default":this.disabled,flex:!this.readonly,hidden:this.readonly}),this.disabled,(()=>this.dispatchEvent(new CustomEvent("delete"))),0===e.length?"":s(h||(h=x` <div data-testid="regions" class="flex flex-wrap p-xs text-s"> ${0} ${0} </div> `),this.regions.map((e=>{var t;return s(y||(y=x` <div class="flex items-center rounded-s border border-contrast-10 h-s m-xs"> <span class="mx-s">${0}</span> <button aria-label="${0}" class="${0}" style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:close" class="icon-inline text-m"></iron-icon> </button> </div> `),(null===(t=this.options[e])||void 0===t?void 0:t.n)||e,this.t("delete"),i({"items-center justify-center rounded-s transition-colors":!0,"hover-bg-error-10 hover-text-error":!this.disabled,"focus-outline-none focus-ring-2 ring-inset ring-primary-50":!this.disabled,"cursor-default":this.disabled,flex:!this.readonly,hidden:this.readonly}),this.disabled,(()=>{this.regions=this.regions.filter((t=>t!==e)),this.dispatchEvent(new CustomEvent("update:regions"))}))})),0===t.length?"":s(m||(m=x` <div data-testid="new-region" class="${0}"> <select class="${0}" ?disabled="${0}" @change="${0}"> <option value="" disabled="disabled" selected="selected">${0}</option> ${0} </select> </div> `),i({"h-s m-xs items-center transition-colors border border-contrast-10 rounded-s":!0,"focus-within-ring-1 ring-primary-50 focus-within-border-primary-50":!this.disabled,flex:!this.readonly,hidden:this.readonly}),i({"appearance-none bg-transparent h-s text-s px-s font-medium":!0,"transition-colors rounded-s focus-outline-none":!0,"cursor-pointer hover-bg-contrast-5":!this.disabled}),this.disabled,(e=>{const t=e.currentTarget;this.__newRegion=t.value,this.__addRegion(),t.value=""}),this.t("add_region"),t.map((e=>s(b||(b=x`<option value="${0}">${0}</option>`),e.c,e.n))))))}__addRegion(){this.regions=[...new Set([...this.regions,this.__newRegion])],this.__newRegion="",this.dispatchEvent(new CustomEvent("update:regions"))}}),customElements.define("foxy-internal-template-config-form-filter-values-control",class extends t{constructor(){super(...arguments),this.countries=null,this.__newCountry=""}static get properties(){return l(l({},super.properties),{},{__newCountry:{attribute:!1},countries:{}})}renderControl(){var e,t,o,n;const r=Object.values(null!==(o=null===(t=null===(e=this.__countriesLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values)&&void 0!==o?o:{}),a=r.filter((e=>!(e.cc2 in this._value)));return s(v||(v=k` <div class="space-y-s" data-testid="countries"> ${0} ${0} </div> <foxy-nucleon infer="" href="${0}" id="countriesLoader" @update="${0}"> </foxy-nucleon> `),Object.entries(this._value).map((([e,t])=>{var o;const n=r.find((t=>t.cc2===e));return s(w||(w=k` <foxy-internal-template-config-form-filter-values-control-item regions="${0}" options="${0}" infer="" code="${0}" name="${0}" ?disabled="${0}" ?readonly="${0}" @update:regions="${0}" @delete="${0}"> </foxy-internal-template-config-form-filter-values-control-item> `),JSON.stringify("*"===t?[]:t),JSON.stringify(Array.isArray(null==n?void 0:n.regions)?{}:null!==(o=null==n?void 0:n.regions)&&void 0!==o?o:{}),e,c(null==n?void 0:n.default),this.disabled,this.readonly,(t=>{const o=l({},this._value),n=t.currentTarget.regions;o[e]=n.length?n:"*",this._value=o}),(()=>{const t=l({},this._value);delete t[e],this._value=t}))})),0===a.length&&0!==r.length?"":s(j||(j=k` <div data-testid="new-country" class="${0}"> <select class="${0}" ?disabled="${0}" @change="${0}"> <option value="" disabled="disabled" selected="selected">${0}</option> ${0} </select> </div> `),i({"h-m flex items-center rounded-s transition-colors":!0,"border border-contrast-10 ring-primary-50":!0,"focus-within-ring-1 focus-within-border-primary-50":!this.disabled,flex:!this.readonly,hidden:this.readonly}),i({"appearance-none bg-transparent h-m text-m px-s flex-1 font-medium":!0,"transition-colors rounded-s focus-outline-none":!0,"cursor-pointer hover-bg-contrast-5":!this.disabled,"text-disabled":this.disabled}),this.disabled,(e=>{const t=e.currentTarget;this.__newCountry=t.value,this.__addCountry(),t.value=""}),this.t("add_country"),a.map((e=>s($||($=k`<option value="${0}">${0}</option>`),e.cc2,e.default)))),c(null!==(n=this.countries)&&void 0!==n?n:void 0),(()=>this.requestUpdate()))}__addCountry(){this._value=l(l({},this._value),{},{[this.__newCountry]:"*"}),this.__newCountry=""}get __countriesLoader(){return this.renderRoot.querySelector("#countriesLoader")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:{}}set _value(e){super._value=e}});let S,O,q,F,J,N,C,V,D,R,T,U,A,z,E=e=>e;const G=u(_(e,"template-config-form"));class B extends G{constructor(){super(...arguments),this.countries=null,this.regions=null,this.store=null,this.__customCheckoutFieldCouponEntryRequirementsOptions=JSON.stringify([{label:"option_enabled",value:"enabled"},{label:"option_disabled",value:"disabled"}]),this.__customCheckoutFieldRequirementsOptions=JSON.stringify([{label:"option_default",value:"default"},{label:"option_optional",value:"optional"},{label:"option_required",value:"required"},{label:"option_hidden",value:"hidden"}]),this.__tosCheckboxSettingsInitialStateOptions=JSON.stringify([{label:"option_checked",value:"checked"},{label:"option_unchecked",value:"unchecked"}]),this.__locationFilteringFilterTypeOptions=JSON.stringify([{label:"option_blocklist",value:"blacklist"},{label:"option_allowlist",value:"whitelist"}]),this.__foxycompleteShowComboboxOptions=JSON.stringify([{label:"option_combobox",value:"combobox"},{label:"option_search",value:"search"}]),this.__tosCheckboxSettingsUsageOptions=JSON.stringify([{label:"option_none",value:"none"},{label:"option_optional",value:"optional"},{label:"option_required",value:"required"}]),this.__locationFilteringUsageOptions=JSON.stringify([{label:"option_none",value:"none"},{label:"option_shipping",value:"shipping"},{label:"option_billing",value:"billing"},{label:"option_both",value:"both"},{label:"option_independent",value:"independent"}]),this.__cscRequirementsValueOptions=JSON.stringify([{label:"option_all_cards",value:"all_cards"},{label:"option_sso_only",value:"sso_only"},{label:"option_new_cards_only",value:"new_cards_only"}]),this.__checkoutTypeDefaultOptions=JSON.stringify([{label:"option_default_account",value:"default_account"},{label:"option_default_guest",value:"default_guest"}]),this.__checkoutTypeAccountOptions=JSON.stringify([{label:"option_account",value:"account_only"},{label:"option_guest",value:"guest_only"},{label:"option_both",value:"default_guest"}]),this.__cartTypeOptions=JSON.stringify([{label:"option_default",value:"default"},{label:"option_fullpage",value:"fullpage"},{label:"option_custom",value:"custom"}]),this.__locationFilteringFilterValuesSetValue=e=>{const t=this.__formJson,o=l(l({},t.location_filtering),{},{shipping_filter_values:e,billing_filter_values:e});this.edit({json:JSON.stringify(l(l({},t),{},{location_filtering:o}))})},this.__locationFilteringFilterTypeSetValue=e=>{const t=this.__formJson,o=l(l({},t.location_filtering),{},{shipping_filter_type:e,billing_filter_type:e});this.edit({json:JSON.stringify(l(l({},t),{},{location_filtering:o}))})},this.__foxycompleteShowComboboxGetValue=()=>this.__formJson.foxycomplete.show_combobox?"combobox":"search",this.__foxycompleteShowComboboxSetValue=e=>{const t="combobox"===e,o=l(l({},this.__formJson.foxycomplete),{},{show_combobox:t});this.edit({json:JSON.stringify(l(l({},this.__formJson),{},{foxycomplete:o}))})},this.__checkoutTypeAccountGetValue=()=>{const e=this.__formJson;return e.checkout_type.includes("default")?"default_guest":e.checkout_type},this.__customConfigGetValue=()=>{const e=this.__formJson;return"string"==typeof e.custom_config?e.custom_config:JSON.stringify(e.custom_config,null,2)},this.__customConfigSetValue=e=>{const t=this.__formJson;try{t.custom_config=JSON.parse(e)}catch(o){t.custom_config=e}this.edit({json:JSON.stringify(t)})},this.__cspUsageGetValue=()=>{const e=this.__formJson.csp.usage;return"enforce"===e||"both"===e},this.__cspUsageSetValue=e=>{const t=this.__formJson,o=t.csp.usage,n={false:{both:"report",enforce:"none"},true:{report:"both",none:"enforce"}}[String(e)][o];if(n){const e=l(l({},t),{},{csp:l(l({},t.csp),{},{usage:n})});this.edit({json:JSON.stringify(e)})}},this.__cspRoUsageGetValue=()=>{const e=this.__formJson.csp.usage;return"report"===e||"both"===e},this.__cspRoUsageSetValue=e=>{const t=this.__formJson,o=t.csp.usage,n={false:{both:"enforce",report:"none"},true:{enforce:"both",none:"report"}}[String(e)][o];if(n){const e=l(l({},t),{},{csp:l(l({},t.csp),{},{usage:n})});this.edit({json:JSON.stringify(e)})}},this.__defaultJSON=JSON.stringify({cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}})}static get properties(){return l(l({},super.properties),{},{countries:{},regions:{},store:{}})}static get v8n(){return[({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_enforce)||void 0===t?void 0:t.reporting_endpoint)&&void 0!==o?o:"").length<=1e3||"csp-policy-enforce-reporting-endpoint:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_report)||void 0===t?void 0:t.reporting_endpoint)&&void 0!==o?o:"").length<=1e3||"csp-policy-report-reporting-endpoint:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_enforce)||void 0===t?void 0:t.script_src)&&void 0!==o?o:[]).every((e=>e.length<=1e3))||"csp-policy-enforce-script-src:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_report)||void 0===t?void 0:t.script_src)&&void 0!==o?o:[]).every((e=>e.length<=1e3))||"csp-policy-report-script-src:v8n_too_long"}]}get hiddenSelector(){var e,t;const o=[super.hiddenSelector.toString()],n=this.__dataJson,i=this.__formJson,s=i.location_filtering.usage,r=i.checkout_type;return"required"!==i.cart_display_config.usage&&o.unshift("cart-group-two","cart-group-three","cart-group-four"),"required"!==i.foxycomplete.usage&&o.unshift("country-and-region-group-one:foxycomplete-show-combobox","country-and-region-group-one:foxycomplete-combobox-open","country-and-region-group-one:foxycomplete-combobox-close","country-and-region-group-one:foxycomplete-show-flags"),!1===i.foxycomplete.show_combobox&&o.unshift("country-and-region-group-one:foxycomplete-combobox-open","country-and-region-group-one:foxycomplete-combobox-close"),"both"!==s&&o.unshift("country-and-region-group-two"),"shipping"!==s&&"independent"!==s&&o.unshift("country-and-region-group-three"),"billing"!==s&&"independent"!==s&&o.unshift("country-and-region-group-four"),"default_account"!==r&&"default_guest"!==r&&o.unshift("customer-accounts:checkout-type-default"),"none"===i.tos_checkbox_settings.usage&&o.unshift("consent-group-one:tos-checkbox-settings-url","consent-group-one:tos-checkbox-settings-initial-state","consent-group-one:tos-checkbox-settings-is-hidden"),"required"!==i.analytics_config.usage&&o.unshift("analytics-config-google-analytics","analytics-config-google-tag"),"required"!==(null==n?void 0:n.analytics_config.google_analytics.usage)&&o.unshift("analytics-config-google-analytics"),"required"!==i.analytics_config.google_analytics.usage&&o.unshift("analytics-config-google-analytics:analytics-config-google-analytics-account-id","analytics-config-google-analytics:analytics-config-google-analytics-include-on-site"),"required"!==i.analytics_config.google_tag.usage&&(o.unshift("analytics-config-google-tag:analytics-config-google-tag-account-id"),o.unshift("analytics-config-google-tag:analytics-config-google-tag-send-to")),!0!==(null===(t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.features_multiship)&&o.unshift("custom-script-values-multiship-checkout-fields"),new a(o.join(" ").trim())}renderBody(){var e,t,o,n,i,l,a;const u=[["billing_address1","billing_address2","billing_city","billing_region","billing_postal_code","billing_country"],["billing_first_name","billing_last_name","billing_company","billing_tax_id","billing_phone","coupon_entry"]],_=[["show_product_weight","show_product_category","show_product_code","show_product_options"],["show_sub_frequency","show_sub_startdate","show_sub_nextdate","show_sub_enddate"]],d=this.__formJson.csp.usage,p=null===(t=null===(e=this.__dataJson)||void 0===e?void 0:e.csp)||void 0===t?void 0:t.usage;return s(S||(S=E` ${0} <foxy-internal-summary-control infer="cart-group-one"> <foxy-internal-select-control json-template="${0}" json-path="cart_type" property="json" options="${0}" layout="summary-item" infer="cart-type"> </foxy-internal-select-control> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="cart_display_config.usage" property="json" infer="cart-display-config-usage" invert> </foxy-internal-switch-control> </foxy-internal-summary-control> <div class="grid sm-grid-cols-2 gap-m" ?hidden="${0}"> ${0} </div> <foxy-internal-summary-control infer="cart-group-four"> <foxy-internal-editable-list-control json-template="${0}" json-path="cart_display_config.hidden_product_options" property="json" layout="summary-item" infer="cart-display-config-hidden-product-options" simple-value> </foxy-internal-editable-list-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-one"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="foxycomplete.usage" property="json" infer="foxycomplete-usage"> </foxy-internal-switch-control> <foxy-internal-select-control options="${0}" layout="summary-item" infer="foxycomplete-show-combobox" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> <foxy-internal-text-control json-template="${0}" json-path="foxycomplete.combobox_open" property="json" layout="summary-item" infer="foxycomplete-combobox-open"> </foxy-internal-text-control> <foxy-internal-text-control json-template="${0}" json-path="foxycomplete.combobox_close" property="json" layout="summary-item" infer="foxycomplete-combobox-close"> </foxy-internal-text-control> <foxy-internal-switch-control json-template="${0}" json-path="foxycomplete.show_flags" property="json" infer="foxycomplete-show-flags"> </foxy-internal-switch-control> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="enabled" json-path="postal_code_lookup.usage" property="json" infer="postal-code-lookup"> </foxy-internal-switch-control> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.usage" property="json" options="${0}" layout="summary-item" infer="location-filtering-usage"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-two"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.shipping_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-filter-type" .setValue="${0}"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.shipping_filter_values" countries="${0}" property="json" infer="location-filtering-filter-values" .setValue="${0}"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-three"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.shipping_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-shipping-filter-type"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.shipping_filter_values" countries="${0}" property="json" infer="location-filtering-shipping-filter-values"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-four"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.billing_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-billing-filter-type"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.billing_filter_values" countries="${0}" property="json" infer="location-filtering-billing-filter-values"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="customer-accounts"> <foxy-internal-select-control json-template="${0}" json-path="checkout_type" property="json" options="${0}" layout="summary-item" infer="checkout-type-account" .getValue="${0}"> </foxy-internal-select-control> <foxy-internal-select-control json-template="${0}" json-path="checkout_type" property="json" options="${0}" layout="summary-item" infer="checkout-type-default"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-one"> <foxy-internal-select-control json-template="${0}" json-path="tos_checkbox_settings.usage" property="json" options="${0}" layout="summary-item" infer="tos-checkbox-settings-usage"> </foxy-internal-select-control> <foxy-internal-text-control json-template="${0}" json-path="tos_checkbox_settings.url" property="json" layout="summary-item" infer="tos-checkbox-settings-url"> </foxy-internal-text-control> <foxy-internal-select-control json-template="${0}" json-path="tos_checkbox_settings.initial_state" property="json" options="${0}" layout="summary-item" infer="tos-checkbox-settings-initial-state"> </foxy-internal-select-control> <foxy-internal-switch-control json-template="${0}" json-path="tos_checkbox_settings.is_hidden" property="json" infer="tos-checkbox-settings-is-hidden"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-two"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="eu_secure_data_transfer_consent.usage" property="json" infer="eu-secure-data-transfer-consent-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-three"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="newsletter_subscribe.usage" property="json" infer="newsletter-subscribe-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="supported-cards-group"> <foxy-internal-template-config-form-supported-cards-control json-template="${0}" json-path="supported_payment_cards" property="json" infer="supported-payment-cards"> </foxy-internal-template-config-form-supported-cards-control> <p class="flex items-start gap-s"> ${0} <foxy-i18n infer="" key="disclaimer"></foxy-i18n> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="csc-requirements-group"> <foxy-internal-select-control json-template="${0}" json-path="csc_requirements" property="json" options="${0}" layout="summary-item" infer="csc-requirements"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="checkout-fields-group-one"> <foxy-internal-switch-control json-template="${0}" false-alias="disabled" true-alias="enabled" json-path="custom_checkout_field_requirements.cart_controls" property="json" infer="custom-checkout-field-requirements-cart-controls"> </foxy-internal-switch-control> </foxy-internal-summary-control> <div class="grid sm-grid-cols-2 gap-m" ?hidden="${0}"> ${0} </div> <foxy-internal-summary-control infer="csp" class="space-y-m" layout="section"> <foxy-internal-summary-control infer="csp-group-one"> <foxy-internal-switch-control json-template="${0}" json-path="csp.usage" property="json" infer="csp-enable-ro-csp" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="csp-group-two"> <foxy-internal-switch-control json-template="${0}" json-path="csp.usage" property="json" infer="csp-enable-csp" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.usage" property="json" infer="analytics-config-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config-google-analytics"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.google_analytics.usage" property="json" infer="analytics-config-google-analytics-usage"> </foxy-internal-switch-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_analytics.account_id" property="json" layout="summary-item" infer="analytics-config-google-analytics-account-id"> </foxy-internal-text-control> <foxy-internal-switch-control json-template="${0}" json-path="analytics_config.google_analytics.include_on_site" property="json" infer="analytics-config-google-analytics-include-on-site"> </foxy-internal-switch-control> <p class="flex items-start gap-s bg-error-10 text-error"> ${0} <foxy-i18n infer="" key="deprecation_notice"></foxy-i18n> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config-google-tag"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.google_tag.usage" property="json" infer="analytics-config-google-tag-usage"> </foxy-internal-switch-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_tag.account_id" property="json" layout="summary-item" infer="analytics-config-google-tag-account-id"> </foxy-internal-text-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_tag.send_to" property="json" layout="summary-item" infer="analytics-config-google-tag-send-to"> </foxy-internal-text-control> <p class="flex items-start gap-s"> ${0} <span> <foxy-i18n infer="" key="usage_notice"></foxy-i18n> <br> <a target="_blank" class="cursor-pointer group text-primary rounded-s font-medium focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://wiki.foxycart.com/v/2.0/analytics#google_tag_ga4_google_ads" rel="nofollow noreferrer noopener"> <foxy-i18n class="transition-opacity group-hover-opacity-80" infer="" key="docs_link"> </foxy-i18n> </a> </span> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="debug"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="debug.usage" property="json" infer="debug-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-source-control infer="custom-config" .getValue="${0}" .setValue="${0}"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.header" property="json" infer="custom-script-values-header"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.checkout_fields" property="json" infer="custom-script-values-checkout-fields"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.multiship_checkout_fields" property="json" infer="custom-script-values-multiship-checkout-fields"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.footer" property="json" infer="custom-script-values-footer"> </foxy-internal-source-control> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="storeLoader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__defaultJSON,this.__cartTypeOptions,this.__defaultJSON,_.every(((e,t)=>e.every((e=>{const o=`cart-group-${0===t?"two":"three"}:cart-display-config-${e.replace(/_/g,"-")}`;return this.hiddenSelector.matches(o,!0)})))),_.map(((e,t)=>s(O||(O=E` <foxy-internal-summary-control infer="cart-group-${0}"> ${0} </foxy-internal-summary-control> `),0===t?"two":"three",e.map((e=>s(q||(q=E` <foxy-internal-switch-control json-template="${0}" json-path="cart_display_config.${0}" property="json" infer="cart-display-config-${0}"> </foxy-internal-switch-control> `),this.__defaultJSON,e,e.replace(/_/g,"-"))))))),this.__defaultJSON,this.__defaultJSON,this.__foxycompleteShowComboboxOptions,this.__foxycompleteShowComboboxGetValue,this.__foxycompleteShowComboboxSetValue,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__locationFilteringUsageOptions,this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__locationFilteringFilterTypeSetValue,this.__defaultJSON,c(null!==(o=this.countries)&&void 0!==o?o:void 0),this.__locationFilteringFilterValuesSetValue,this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__defaultJSON,c(null!==(n=this.countries)&&void 0!==n?n:void 0),this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__defaultJSON,c(null!==(i=this.countries)&&void 0!==i?i:void 0),this.__defaultJSON,this.__checkoutTypeAccountOptions,this.__checkoutTypeAccountGetValue,this.__defaultJSON,this.__checkoutTypeDefaultOptions,this.__defaultJSON,this.__tosCheckboxSettingsUsageOptions,this.__defaultJSON,this.__defaultJSON,this.__tosCheckboxSettingsInitialStateOptions,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(F||(F=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__cscRequirementsValueOptions,this.__defaultJSON,u.every(((e,t)=>e.every((e=>{const o=`checkout-fields-group-${0===t?"two":"three"}:custom-checkout-field-requirements-${e.replace(/_/g,"-").replace("1","-one").replace("2","-two")}`;return this.hiddenSelector.matches(o,!0)})))),u.map(((e,t)=>s(J||(J=E` <foxy-internal-summary-control infer="checkout-fields-group-${0}"> ${0} </foxy-internal-summary-control> `),0===t?"two":"three",e.map((e=>{const t=e.replace(/_/g,"-").replace("1","-one").replace("2","-two"),o=`custom_checkout_field_requirements.${e}`;return s(N||(N=E` <foxy-internal-select-control json-template="${0}" json-path="${0}" property="json" options="${0}" layout="summary-item" infer="custom-checkout-field-requirements-${0}"> </foxy-internal-select-control> `),this.__defaultJSON,o,"coupon_entry"===e?this.__customCheckoutFieldCouponEntryRequirementsOptions:this.__customCheckoutFieldRequirementsOptions,t)}))))),this.__defaultJSON,this.__cspRoUsageGetValue,this.__cspRoUsageSetValue,"report"===d||"both"===d?s(C||(C=E` <foxy-internal-text-control json-template="${0}" json-path="csp.policy_report.reporting_endpoint" property="json" layout="summary-item" infer="csp-policy-report-reporting-endpoint"> </foxy-internal-text-control> <foxy-internal-editable-list-control json-template="${0}" json-path="csp.policy_report.script_src" property="json" layout="summary-item" infer="csp-policy-report-script-src" simple-value> </foxy-internal-editable-list-control> ${0} `),this.__defaultJSON,this.__defaultJSON,"none"===p||"enforce"===p?s(V||(V=E` <div class="flex items-start bg-primary-10" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="warning"></foxy-i18n> <a target="_blank" class="inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://wiki.foxycart.com/v/2.0/content_security_policy"> wiki.foxycart.com </a> </p> </div> `),r(D||(D=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z" clip-rule="evenodd" /></svg>`))):""):"",this.__defaultJSON,this.__cspUsageGetValue,this.__cspUsageSetValue,"enforce"===d||"both"===d?s(R||(R=E` <foxy-internal-text-control json-template="${0}" json-path="csp.policy_enforce.reporting_endpoint" property="json" layout="summary-item" infer="csp-policy-enforce-reporting-endpoint"> </foxy-internal-text-control> <foxy-internal-editable-list-control json-template="${0}" json-path="csp.policy_enforce.script_src" property="json" layout="summary-item" infer="csp-policy-enforce-script-src" simple-value> </foxy-internal-editable-list-control> ${0} `),this.__defaultJSON,this.__defaultJSON,"none"===p||"report"===p?s(T||(T=E` <div class="flex items-start bg-error-10" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="warning"></foxy-i18n> <a target="_blank" class="inline-block rounded font-medium text-error transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-error-50" href="https://wiki.foxycart.com/v/2.0/content_security_policy"> wiki.foxycart.com </a> </p> </div> `),r(U||(U=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>`))):""):"",this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(A||(A=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(z||(z=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__customConfigGetValue,this.__customConfigSetValue,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,super.renderBody(),c(null!==(l=this.store)&&void 0!==l?l:null===(a=this.data)||void 0===a?void 0:a._links["fx:store"].href),(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector("#storeLoader")}get __formJson(){return this.form.json?JSON.parse(this.form.json):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}}get __dataJson(){var e;return(null===(e=this.data)||void 0===e?void 0:e.json)?JSON.parse(this.data.json):null}}customElements.define("foxy-template-config-form",B);export{B as TemplateConfigForm};
@@ -1 +1 @@
1
- import"./shared-4cc42648.js";import"./shared-f8519b17.js";import"./shared-fc784ca0.js";import{I as e}from"./shared-77829fbb.js";import"./shared-5963a49e.js";import{a as t}from"./shared-1e14a3fe.js";import"./shared-10da9bf0.js";import{_ as r,B as s}from"./shared-7fec42f2.js";import{N as a}from"./shared-69074dae.js";import{h as o}from"./shared-ba5c42c7.js";import{a as i}from"./shared-7a87cd33.js";import{i as n}from"./shared-53e42a77.js";import"./shared-5fd5805c.js";import"./shared-529a82a3.js";import"./shared-b5a0d106.js";import"./shared-433eea12.js";import"./shared-278b8790.js";import"./shared-a268320e.js";import"./shared-85ed835a.js";import"./shared-64e243c4.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-c929504f.js";import"./shared-a704aaa4.js";import"./shared-65b2760f.js";import"./shared-c782b9fa.js";import"./shared-0ea750af.js";import"./foxy-copy-to-clipboard.js";import"./shared-005168e0.js";import"./shared-9e8344bf.js";import"./shared-5bcf861e.js";import"./shared-937e58bf.js";import"./shared-5b0c206b.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-5212ef4f.js";import"./shared-1da47f50.js";import"./shared-d6a0954b.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-e1e4d8f5.js";let h,c=e=>e;customElements.define("foxy-internal-template-form-async-action",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return r(r({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const e=this.__state,t="fail"===e?"error":"";return o(h||(h=c` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),`${this.theme} ${null!=t?t:""}`.trim(),"busy"===e||this.disabled,this.__submit,e)}async __submit(){var e,t;if("busy"!==this.__state)try{this.__state="busy";const r=new a.API(this),s=await r.fetch(null!==(e=this.href)&&void 0!==e?e:"",{method:"POST"});this.__state=s.ok?"idle":"fail",s.ok&&(null===(t=this.nucleon)||void 0===t||t.refresh())}catch(e){this.__state="fail"}}});let d,f=e=>e;const l=i(e,"template-form");class m extends l{get readonlySelector(){const e=[super.readonlySelector.toString()];return this.form.content_url&&e.unshift("content"),new s(e.join(" ").trim())}get disabledSelector(){const e=[super.disabledSelector.toString()];return this.in({idle:{snapshot:"clean"}})&&this.data.content_url||e.unshift("source:cache"),new s(e.join(" ").trim())}get hiddenSelector(){var e;const t=[super.hiddenSelector.toString()];return(null===(e=this.data)||void 0===e?void 0:e.content_url)||t.unshift("source:cache"),new s(t.join(" ").trim())}renderBody(){var e;return o(d||(d=f` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="description"> </foxy-internal-text-control> </foxy-internal-summary-control> ${0} <foxy-internal-source-control infer="content"></foxy-internal-source-control> <foxy-internal-summary-control infer="source"> <foxy-internal-text-control layout="summary-item" infer="content-url"> </foxy-internal-text-control> <foxy-internal-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-template-form-async-action> </foxy-internal-summary-control> ${0} `),this.renderHeader(),this.renderTemplateOrSlot(),n(null===(e=this.data)||void 0===e?void 0:e._links["fx:cache"].href),super.renderBody())}async _sendPost(e){const t=await super._sendPost(e);if(e.content_url){const e=t._links["fx:cache"].href;if(!(await new m.API(this).fetch(e,{method:"POST"})).ok)throw["error:failed_to_cache"]}return await this._fetch(t._links.self.href)}async _sendPatch(e){const t=await super._sendPatch(e);if(!e.content_url)return t;const r=t._links["fx:cache"].href;if(!(await new m.API(this).fetch(r,{method:"POST"})).ok)throw["error:failed_to_cache"];return await this._fetch(t._links.self.href)}}customElements.define("foxy-template-form",m);export{m as TemplateForm};
1
+ import"./shared-28ceb7f7.js";import"./shared-57e94234.js";import"./shared-5c8931a0.js";import{I as e}from"./shared-fc155659.js";import"./shared-360196ad.js";import{a as t}from"./shared-0b8768db.js";import"./shared-3d353eb8.js";import{_ as r,B as s}from"./shared-8f9014ff.js";import{N as o}from"./shared-9b138652.js";import{h as i}from"./shared-ba5c42c7.js";import{a}from"./shared-47f3f5f5.js";import{i as n}from"./shared-53e42a77.js";import"./shared-5fd5805c.js";import"./shared-b3fe8c63.js";import"./shared-6bf89411.js";import"./shared-5a469962.js";import"./shared-e55c8dc4.js";import"./shared-27c16d99.js";import"./shared-0e25ac65.js";import"./shared-66278c21.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-1c985317.js";import"./shared-58add5b4.js";import"./shared-69c98b7b.js";import"./shared-41c9c53f.js";import"./shared-930e68b7.js";import"./foxy-copy-to-clipboard.js";import"./shared-34a87829.js";import"./shared-d4b77609.js";import"./shared-eb49be2e.js";import"./shared-bf8d95b9.js";import"./shared-b2cbe727.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-5212ef4f.js";import"./shared-791b4510.js";import"./shared-9496e995.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-0e19bda5.js";let c,h=e=>e;customElements.define("foxy-internal-template-form-async-action",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return r(r({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const e=this.__state,t="fail"===e?"error":"";return i(c||(c=h` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),`${this.theme} ${null!=t?t:""}`.trim(),"busy"===e||this.disabled,this.__submit,e)}async __submit(){var e,t;if("busy"!==this.__state)try{this.__state="busy";const r=new o.API(this),s=await r.fetch(null!==(e=this.href)&&void 0!==e?e:"",{method:"POST"});this.__state=s.ok?"idle":"fail",s.ok&&(null===(t=this.nucleon)||void 0===t||t.refresh())}catch(e){this.__state="fail"}}});let d,l=e=>e;const m=a(e,"template-form");class f extends m{get readonlySelector(){const e=[super.readonlySelector.toString()];return this.form.content_url&&e.unshift("content"),new s(e.join(" ").trim())}get disabledSelector(){const e=[super.disabledSelector.toString()];return this.in({idle:{snapshot:"clean"}})&&this.data.content_url||e.unshift("source:cache"),new s(e.join(" ").trim())}get hiddenSelector(){var e;const t=[super.hiddenSelector.toString()];return(null===(e=this.data)||void 0===e?void 0:e.content_url)||t.unshift("source:cache"),new s(t.join(" ").trim())}renderBody(){var e;return i(d||(d=l` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="description"> </foxy-internal-text-control> </foxy-internal-summary-control> ${0} <foxy-internal-source-control infer="content"></foxy-internal-source-control> <foxy-internal-summary-control infer="source"> <foxy-internal-text-control layout="summary-item" infer="content-url"> </foxy-internal-text-control> <foxy-internal-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-template-form-async-action> </foxy-internal-summary-control> ${0} `),this.renderHeader(),this.renderTemplateOrSlot(),n(null===(e=this.data)||void 0===e?void 0:e._links["fx:cache"].href),super.renderBody())}async _sendPost(e){const t=await super._sendPost(e);if(e.content_url){const e=t._links["fx:cache"].href;if(!(await new f.API(this).fetch(e,{method:"POST"})).ok)throw["error:failed_to_cache"]}return await this._fetch(t._links.self.href)}async _sendPatch(e){const t=await super._sendPatch(e);if(!e.content_url)return t;const r=t._links["fx:cache"].href;if(!(await new f.API(this).fetch(r,{method:"POST"})).ok)throw["error:failed_to_cache"];return await this._fetch(t._links.self.href)}}customElements.define("foxy-template-form",f);export{f as TemplateForm};
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./foxy-spinner.js";import{a as e}from"./shared-7a87cd33.js";import{T as r}from"./shared-e4792d4a.js";import{h as s}from"./shared-ba5c42c7.js";import"./shared-9e8344bf.js";import"./shared-5bcf861e.js";import"./shared-433eea12.js";import"./shared-5b0c206b.js";import"./shared-10da9bf0.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-4b24accb.js";import"./shared-69074dae.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let a,t,d=e=>e;const o=e(r,"template-set-card");class m extends o{renderBody(){return super.renderBody({title:e=>s(a||(a=d`${0}`),e.description),subtitle:e=>s(t||(t=d`${0}`),e.code)})}}customElements.define("foxy-template-set-card",m);export{m as TemplateSetCard};
1
+ import"./shared-5212ef4f.js";import"./foxy-spinner.js";import{a as r}from"./shared-47f3f5f5.js";import{T as s}from"./shared-730acf1d.js";import{h as e}from"./shared-ba5c42c7.js";import"./shared-d4b77609.js";import"./shared-eb49be2e.js";import"./shared-5a469962.js";import"./shared-b2cbe727.js";import"./shared-3d353eb8.js";import"./shared-8f9014ff.js";import"./shared-930e68b7.js";import"./shared-41c9c53f.js";import"./shared-53e42a77.js";import"./shared-6740e365.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./shared-4e709717.js";let t,d,a=r=>r;const o=r(s,"template-set-card");class m extends o{renderBody(){return super.renderBody({title:r=>e(t||(t=a`${0}`),r.description),subtitle:r=>e(d||(d=a`${0}`),r.code)})}}customElements.define("foxy-template-set-card",m);export{m as TemplateSetCard};
@@ -1 +1 @@
1
- import"./shared-138959d7.js";import"./shared-e502a7be.js";import"./shared-fc784ca0.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-77829fbb.js";import"./foxy-payments-api-payment-preset-card.js";import"./foxy-nucleon-element.js";import"./foxy-i18n-editor.js";import{_ as r,B as o}from"./shared-7fec42f2.js";import{R as t,a}from"./shared-7a87cd33.js";import{i as s}from"./shared-53e42a77.js";import{h as i}from"./shared-ba5c42c7.js";import"./shared-5963a49e.js";import"./shared-b5a0d106.js";import"./shared-433eea12.js";import"./shared-64e243c4.js";import"./shared-788173f2.js";import"./shared-5bcf861e.js";import"./shared-c5c123c5.js";import"./shared-df7d368c.js";import"./shared-809d503c.js";import"./shared-a268320e.js";import"./shared-e54135f0.js";import"./shared-85ed835a.js";import"./shared-529a82a3.js";import"./shared-278b8790.js";import"./shared-4cc42648.js";import"./shared-1e14a3fe.js";import"./shared-10da9bf0.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-69074dae.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-9e8344bf.js";import"./shared-5b0c206b.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-c929504f.js";import"./shared-a704aaa4.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-1ae16c80.js";import"./shared-1091aa45.js";import"./foxy-copy-to-clipboard.js";import"./shared-005168e0.js";import"./shared-937e58bf.js";import"./shared-bab2ea2c.js";import"./shared-d0aed1c1.js";import"./shared-e4792d4a.js";import"./shared-4b24accb.js";import"./shared-3615b419.js";let d,n,l=e=>e;const c=t(a(e,"template-set-form"));class p extends c{constructor(){super(...arguments),this.paymentMethodSets=null,this.languageStrings=null,this.localeCodes=null,this.languages=null,this.__localeCodesLoaderId="localeCodesLoader",this.__languagesLoaderId="languagesLoader"}static get properties(){return r(r({},super.properties),{},{paymentMethodSets:{attribute:"payment-method-sets"},languageStrings:{attribute:"language-strings"},localeCodes:{attribute:"locale-codes"},languages:{}})}static get v8n(){return[({description:e})=>!!e||"description:v8n_required",({description:e})=>!!e&&e.length<=100||"description:v8n_too_long",({code:e})=>!!e||"code:v8n_required",({code:e})=>!!e&&e.length<=50||"code:v8n_too_long",({language:e})=>!!e||"language:v8n_required",({locale_code:e})=>!!e||"locale_code:v8n_required"]}get headerSubtitleOptions(){var e;return r(r({},super.headerSubtitleOptions),{},{context:"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)?"default":""})}get disabledSelector(){var e,r;const t=[];return(null===(e=this.__languagesLoader)||void 0===e?void 0:e.data)||t.push("language"),(null===(r=this.__localeCodesLoader)||void 0===r?void 0:r.data)||t.push("locale-code"),new o(`${t.join(" ")} ${super.disabledSelector}`)}get hiddenSelector(){var e;const r=[];return"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&r.push("delete","code","description"),new o(`${r.join(" ")} ${super.hiddenSelector}`)}renderBody(){var e,r,o,t,a,c,p,h;const m=Object.entries(null!==(o=null===(r=null===(e=this.__localeCodesLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r.values)&&void 0!==o?o:{}).map((([e,r])=>({value:e,rawLabel:r}))),u=Object.entries(null!==(c=null===(a=null===(t=this.__languagesLoader)||void 0===t?void 0:t.data)||void 0===a?void 0:a.values)&&void 0!==c?c:{}).map((([e,r])=>({value:e,label:r})));return i(d||(d=l` ${0} <div class="grid grid-cols-1 gap-m sm-grid-cols-2"> <foxy-internal-text-control infer="description"></foxy-internal-text-control> <foxy-internal-text-control infer="code"></foxy-internal-text-control> <foxy-internal-select-control infer="language" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="locale-code" .options="${0}"> </foxy-internal-select-control> </div> <foxy-internal-resource-picker-control infer="payment-method-set-uri" first="${0}" item="foxy-payments-api-payment-preset-card"> </foxy-internal-resource-picker-control> ${0} ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),u,m,this.paymentMethodSets,this.data&&this.languageStrings&&!this.hiddenSelector.matches("language-overrides",!0)?i(n||(n=l` <div> ${0} <foxy-i18n-editor language-overrides="${0}" selected-language="${0}" infer="language-overrides" href="${0}"> </foxy-i18n-editor> ${0} </div> `),this.renderTemplateOrSlot("language-overrides:before"),this.data._links["fx:language_overrides"].href,this.form.language,this.languageStrings,this.renderTemplateOrSlot("language-overrides:after")):"",super.renderBody(),s(null!==(p=this.languages)&&void 0!==p?p:void 0),this.__languagesLoaderId,(()=>this.requestUpdate()),s(null!==(h=this.localeCodes)&&void 0!==h?h:void 0),this.__localeCodesLoaderId,(()=>this.requestUpdate()))}get __localeCodesLoader(){return this.renderRoot.querySelector(`#${this.__localeCodesLoaderId}`)}get __languagesLoader(){return this.renderRoot.querySelector(`#${this.__languagesLoaderId}`)}}customElements.define("foxy-template-set-form",p);export{p as TemplateSetForm};
1
+ import"./shared-6f90d987.js";import"./shared-59128d82.js";import"./shared-5c8931a0.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-fc155659.js";import"./foxy-payments-api-payment-preset-card.js";import"./foxy-nucleon-element.js";import"./foxy-i18n-editor.js";import{_ as r,B as o}from"./shared-8f9014ff.js";import{R as t,a as s}from"./shared-47f3f5f5.js";import{i as a}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";import"./shared-360196ad.js";import"./shared-6bf89411.js";import"./shared-5a469962.js";import"./shared-66278c21.js";import"./shared-4eb52fc7.js";import"./shared-eb49be2e.js";import"./shared-9e0b104a.js";import"./shared-fb859ece.js";import"./shared-4194ffe7.js";import"./shared-27c16d99.js";import"./shared-32b2d003.js";import"./shared-0e25ac65.js";import"./shared-b3fe8c63.js";import"./shared-e55c8dc4.js";import"./shared-28ceb7f7.js";import"./shared-0b8768db.js";import"./shared-3d353eb8.js";import"./shared-930e68b7.js";import"./shared-41c9c53f.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-d4b77609.js";import"./shared-b2cbe727.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-1c985317.js";import"./shared-58add5b4.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-742640c2.js";import"./shared-be2ce0e6.js";import"./foxy-copy-to-clipboard.js";import"./shared-34a87829.js";import"./shared-bf8d95b9.js";import"./shared-bab2ea2c.js";import"./shared-d0aed1c1.js";import"./shared-730acf1d.js";import"./shared-6740e365.js";import"./shared-a6ddec3d.js";let i,n,l=e=>e;const c=t(s(e,"template-set-form"));class p extends c{constructor(){super(...arguments),this.paymentMethodSets=null,this.languageStrings=null,this.localeCodes=null,this.languages=null,this.__localeCodesLoaderId="localeCodesLoader",this.__languagesLoaderId="languagesLoader"}static get properties(){return r(r({},super.properties),{},{paymentMethodSets:{attribute:"payment-method-sets"},languageStrings:{attribute:"language-strings"},localeCodes:{attribute:"locale-codes"},languages:{}})}static get v8n(){return[({description:e})=>!!e||"description:v8n_required",({description:e})=>!!e&&e.length<=100||"description:v8n_too_long",({code:e})=>!!e||"code:v8n_required",({code:e})=>!!e&&e.length<=50||"code:v8n_too_long",({language:e})=>!!e||"language:v8n_required",({locale_code:e})=>!!e||"locale_code:v8n_required"]}get headerSubtitleOptions(){var e;return r(r({},super.headerSubtitleOptions),{},{context:"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)?"default":""})}get disabledSelector(){var e,r;const t=[];return(null===(e=this.__languagesLoader)||void 0===e?void 0:e.data)||t.push("language"),(null===(r=this.__localeCodesLoader)||void 0===r?void 0:r.data)||t.push("locale-code"),new o(`${t.join(" ")} ${super.disabledSelector}`)}get hiddenSelector(){var e;const r=[];return"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&r.push("delete","code","description"),new o(`${r.join(" ")} ${super.hiddenSelector}`)}renderBody(){var e,r,o,t,s,c,p,h;const m=Object.entries(null!==(o=null===(r=null===(e=this.__localeCodesLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r.values)&&void 0!==o?o:{}).map((([e,r])=>({value:e,rawLabel:r}))),u=Object.entries(null!==(c=null===(s=null===(t=this.__languagesLoader)||void 0===t?void 0:t.data)||void 0===s?void 0:s.values)&&void 0!==c?c:{}).map((([e,r])=>({value:e,label:r})));return d(i||(i=l` ${0} <div class="grid grid-cols-1 gap-m sm-grid-cols-2"> <foxy-internal-text-control infer="description"></foxy-internal-text-control> <foxy-internal-text-control infer="code"></foxy-internal-text-control> <foxy-internal-select-control infer="language" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="locale-code" .options="${0}"> </foxy-internal-select-control> </div> <foxy-internal-resource-picker-control infer="payment-method-set-uri" first="${0}" item="foxy-payments-api-payment-preset-card"> </foxy-internal-resource-picker-control> ${0} ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),u,m,this.paymentMethodSets,this.data&&this.languageStrings&&!this.hiddenSelector.matches("language-overrides",!0)?d(n||(n=l` <div> ${0} <foxy-i18n-editor language-overrides="${0}" selected-language="${0}" infer="language-overrides" href="${0}"> </foxy-i18n-editor> ${0} </div> `),this.renderTemplateOrSlot("language-overrides:before"),this.data._links["fx:language_overrides"].href,this.form.language,this.languageStrings,this.renderTemplateOrSlot("language-overrides:after")):"",super.renderBody(),a(null!==(p=this.languages)&&void 0!==p?p:void 0),this.__languagesLoaderId,(()=>this.requestUpdate()),a(null!==(h=this.localeCodes)&&void 0!==h?h:void 0),this.__localeCodesLoaderId,(()=>this.requestUpdate()))}get __localeCodesLoader(){return this.renderRoot.querySelector(`#${this.__localeCodesLoaderId}`)}get __languagesLoader(){return this.renderRoot.querySelector(`#${this.__languagesLoaderId}`)}}customElements.define("foxy-template-set-form",p);export{p as TemplateSetForm};
@@ -1 +1 @@
1
- import"./shared-005168e0.js";import"./shared-5212ef4f.js";import"./shared-a6e889a8.js";import"./shared-10da9bf0.js";import"./shared-7fec42f2.js";import{g as e}from"./shared-bab2ea2c.js";import{C as t}from"./shared-c782b9fa.js";import{a as s}from"./shared-7a87cd33.js";import{I as i}from"./shared-4b24accb.js";import{c as r}from"./shared-4e709717.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-433eea12.js";import"./shared-64e243c4.js";import"./shared-b5a0d106.js";import"./shared-9e8344bf.js";import"./shared-5bcf861e.js";import"./shared-937e58bf.js";import"./foxy-spinner.js";import"./shared-5b0c206b.js";import"./shared-0ea750af.js";import"./shared-53e42a77.js";import"./shared-69074dae.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";let n,a,d,c,l,p,u,m,f,h,y,v,_,x,$,b,g=e=>e;const j=t(s(i,"transaction-card"));class S extends j{constructor(){super(...arguments),this.__currencyDisplay=""}renderBody(){var e,t;const s=this.hiddenSelector,i=!s.matches("total",!0),d=!s.matches("status",!0);return o(n||(n=g` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),r({"transition-opacity":!0,"opacity-0":!this.data}),i||d?o(a||(a=g` <div class="flex items-center justify-between gap-s"> ${0} ${0} </div> `),i?this.__renderIdAndTotal():"",d?this.__renderStatus():""):"",s.matches("description",!0)?"":this.__renderSummary(),s.matches("customer",!0)?"":this.__renderCustomer(),r({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}async _sendGet(){var e;const t=await super._sendGet(),s=null===(e=t._links["fx:store"])||void 0===e?void 0:e.href;if("string"==typeof s){const e=await super._fetch(s);this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol"}else this.__currencyDisplay="symbol";return t}__renderIdAndTotal(){const t=this.data;let s;if(t){const i={amount:`${t.total_order} ${t.currency_code}`,currencyDisplay:this.__currencyDisplay};s=o(d||(d=g` <span class="truncate">ID ${0}</span> ${0} ${0} `),t.display_id||e(t._links.self.href),"updateinfo"!==t.type&&"subscription_cancellation"!==t.type?o(c||(c=g` <span>&bull;</span> <foxy-i18n .options="${0}" infer="" class="whitespace-nowrap" key="price"> </foxy-i18n> `),i):"",(null==t?void 0:t.is_test)?o(l||(l=g` <foxy-i18n infer="" class="inline-block text-xs font-medium uppercase bg-contrast-5 text-tertiary rounded-s p-xs leading-none tracking-wider" key="test"> </foxy-i18n> `)):"")}else s=o(p||(p=g`&ZeroWidthSpace;`));return o(u||(u=g` <div class="min-w-0" data-testid="total"> ${0} <div class="font-medium flex items-center gap-xs">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),s,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var e,t,s,i,r,n,a;const d=(null===(e=this.data)||void 0===e?void 0:e.status)||"completed",c=null===(s=null===(t=this.data)||void 0===t?void 0:t.source)||void 0===s?void 0:s.substring(0,3).toUpperCase();return o(m||(m=g` <div class="flex-shrink-0" data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-xs"> ${0} ${0} <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline cursor-default text-l ${0}" id="status" icon="${0}"> </iron-icon> <vcf-tooltip for="status" theme="light" position="top"> <foxy-i18n infer="" key="status_${0}"></foxy-i18n> </vcf-tooltip> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),(null===(i=this.data)||void 0===i?void 0:i.hide_transaction)?o(f||(f=g` <vcf-tooltip for="hidden" theme="light" position="top"> <foxy-i18n infer="" key="hidden_hint"></foxy-i18n> </vcf-tooltip> <iron-icon class="icon-inline cursor-default" icon="icons:visibility-off" id="hidden"> </iron-icon> `)):"",c?o(h||(h=g` <vcf-tooltip for="source" theme="light" position="top"> <foxy-i18n infer="" key="source_${0}"></foxy-i18n> </vcf-tooltip> <span class="cursor-default" id="source">${0}</span> `),c,c):"",JSON.stringify({value:null===(r=this.data)||void 0===r?void 0:r.transaction_date}),this.lang,this.ns,null!==(n={authorized:"text-success",completed:"text-success",capturing:"text-success",captured:"text-success",approved:"text-success",pending:"text-success",pending_fraud_review:"text-error",declined:"text-error",rejected:"text-error",problem:"text-error"}[d])&&void 0!==n?n:"text-tertiary",null!==(a={authorized:"icons:done",capturing:"icons:done",captured:"icons:done",approved:"icons:done",pending:"icons:done",completed:"icons:done-all",pending_fraud_review:"icons:info-outline",declined:"icons:highlight-off",rejected:"icons:highlight-off",problem:"icons:info-outline",refunded:"icons:restore",voided:"icons:remove-circle-outline"}[d])&&void 0!==a?a:"icons:schedule",d,this.renderTemplateOrSlot("status:after"))}__renderSummary(){var e,t,s;const i=null===(t=null===(e=this.data)||void 0===e?void 0:e._embedded)||void 0===t?void 0:t["fx:items"],r=null===(s=this.data)||void 0===s?void 0:s.type;let n,a;if(a="updateinfo"===r?"summary_payment_method_change":"subscription_modification"===r?"summary_subscription_modification":"subscription_cancellation"===r?"summary_subscription_cancellation":"summary",i){const e={count_minus_one:i.length-1,first_item:i[0],count:i.length};n=o(y||(y=g`<foxy-i18n .options="${0}" infer="" key="${0}"></foxy-i18n>`),e,a)}else n=o(v||(v=g`&ZeroWidthSpace;`));return o(_||(_=g` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),n,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const e=this.data,t=e?o(x||(x=g`${0} ${0} (${0})`),e.customer_first_name,e.customer_last_name,e.customer_email):o($||($=g`&ZeroWidthSpace;`));return o(b||(b=g` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),t,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",S);export{S as TransactionCard};
1
+ import"./shared-34a87829.js";import"./shared-5212ef4f.js";import"./shared-e2d5673b.js";import"./shared-3d353eb8.js";import"./shared-8f9014ff.js";import{g as e}from"./shared-bab2ea2c.js";import{C as t}from"./shared-41c9c53f.js";import{a as s}from"./shared-47f3f5f5.js";import{I as i}from"./shared-6740e365.js";import{c as r}from"./shared-4e709717.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-5a469962.js";import"./shared-66278c21.js";import"./shared-6bf89411.js";import"./shared-d4b77609.js";import"./shared-eb49be2e.js";import"./shared-bf8d95b9.js";import"./foxy-spinner.js";import"./shared-b2cbe727.js";import"./shared-930e68b7.js";import"./shared-53e42a77.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";let n,a,d,c,l,p,u,m,f,h,y,v,_,x,b,$,g=e=>e;const j=t(s(i,"transaction-card"));class S extends j{constructor(){super(...arguments),this.__currencyDisplay=""}renderBody(){var e,t;const s=this.hiddenSelector,i=!s.matches("total",!0),d=!s.matches("status",!0);return o(n||(n=g` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),r({"transition-opacity":!0,"opacity-0":!this.data}),i||d?o(a||(a=g` <div class="flex items-center justify-between gap-s"> ${0} ${0} </div> `),i?this.__renderIdAndTotal():"",d?this.__renderStatus():""):"",s.matches("description",!0)?"":this.__renderSummary(),s.matches("customer",!0)?"":this.__renderCustomer(),r({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}async _sendGet(){var e;const t=await super._sendGet(),s=null===(e=t._links["fx:store"])||void 0===e?void 0:e.href;if("string"==typeof s){const e=await super._fetch(s);this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol"}else this.__currencyDisplay="symbol";return t}__renderIdAndTotal(){const t=this.data;let s;if(t){const i={amount:`${t.total_order} ${t.currency_code}`,currencyDisplay:this.__currencyDisplay};s=o(d||(d=g` <span class="truncate">ID ${0}</span> ${0} ${0} `),t.display_id||e(t._links.self.href),"updateinfo"!==t.type&&"subscription_cancellation"!==t.type?o(c||(c=g` <span>&bull;</span> <foxy-i18n .options="${0}" infer="" class="whitespace-nowrap" key="price"> </foxy-i18n> `),i):"",(null==t?void 0:t.is_test)?o(l||(l=g` <foxy-i18n infer="" class="inline-block text-xs font-medium uppercase bg-contrast-5 text-tertiary rounded-s p-xs leading-none tracking-wider" key="test"> </foxy-i18n> `)):"")}else s=o(p||(p=g`&ZeroWidthSpace;`));return o(u||(u=g` <div class="min-w-0" data-testid="total"> ${0} <div class="font-medium flex items-center gap-xs">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),s,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var e,t,s,i,r,n,a;const d=(null===(e=this.data)||void 0===e?void 0:e.status)||"completed",c=null===(s=null===(t=this.data)||void 0===t?void 0:t.source)||void 0===s?void 0:s.substring(0,3).toUpperCase();return o(m||(m=g` <div class="flex-shrink-0" data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-xs"> ${0} ${0} <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline cursor-default text-l ${0}" id="status" icon="${0}"> </iron-icon> <vcf-tooltip for="status" theme="light" position="top"> <foxy-i18n infer="" key="status_${0}"></foxy-i18n> </vcf-tooltip> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),(null===(i=this.data)||void 0===i?void 0:i.hide_transaction)?o(f||(f=g` <vcf-tooltip for="hidden" theme="light" position="top"> <foxy-i18n infer="" key="hidden_hint"></foxy-i18n> </vcf-tooltip> <iron-icon class="icon-inline cursor-default" icon="icons:visibility-off" id="hidden"> </iron-icon> `)):"",c?o(h||(h=g` <vcf-tooltip for="source" theme="light" position="top"> <foxy-i18n infer="" key="source_${0}"></foxy-i18n> </vcf-tooltip> <span class="cursor-default" id="source">${0}</span> `),c,c):"",JSON.stringify({value:null===(r=this.data)||void 0===r?void 0:r.transaction_date}),this.lang,this.ns,null!==(n={authorized:"text-success",completed:"text-success",capturing:"text-success",captured:"text-success",approved:"text-success",pending:"text-success",pending_fraud_review:"text-error",declined:"text-error",rejected:"text-error",problem:"text-error"}[d])&&void 0!==n?n:"text-tertiary",null!==(a={authorized:"icons:done",capturing:"icons:done",captured:"icons:done",approved:"icons:done",pending:"icons:done",completed:"icons:done-all",pending_fraud_review:"icons:info-outline",declined:"icons:highlight-off",rejected:"icons:highlight-off",problem:"icons:info-outline",refunded:"icons:restore",voided:"icons:remove-circle-outline"}[d])&&void 0!==a?a:"icons:schedule",d,this.renderTemplateOrSlot("status:after"))}__renderSummary(){var e,t,s;const i=null===(t=null===(e=this.data)||void 0===e?void 0:e._embedded)||void 0===t?void 0:t["fx:items"],r=null===(s=this.data)||void 0===s?void 0:s.type;let n,a;if(a="updateinfo"===r?"summary_payment_method_change":"subscription_modification"===r?"summary_subscription_modification":"subscription_cancellation"===r?"summary_subscription_cancellation":"summary",i){const e={count_minus_one:i.length-1,first_item:i[0],count:i.length};n=o(y||(y=g`<foxy-i18n .options="${0}" infer="" key="${0}"></foxy-i18n>`),e,a)}else n=o(v||(v=g`&ZeroWidthSpace;`));return o(_||(_=g` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),n,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const e=this.data,t=e?o(x||(x=g`${0} ${0} (${0})`),e.customer_first_name,e.customer_last_name,e.customer_email):o(b||(b=g`&ZeroWidthSpace;`));return o($||($=g` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),t,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",S);export{S as TransactionCard};
@@ -1 +1 @@
1
- import"./foxy-billing-address-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-webhook-card.js";import"./foxy-webhook-form.js";import"./foxy-address-form.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-10da9bf0.js";import"./shared-5963a49e.js";import{a as e}from"./shared-1e14a3fe.js";import"./foxy-spinner.js";import{_ as t,B as i}from"./shared-7fec42f2.js";import{h as o,s}from"./shared-ba5c42c7.js";import{D as r}from"./shared-a704aaa4.js";import{A as n}from"./shared-65b2760f.js";import{i as a}from"./shared-53e42a77.js";import"./shared-788173f2.js";import"./shared-4cc42648.js";import"./shared-d3414cf0.js";import{I as d}from"./shared-77829fbb.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import{g as l}from"./shared-bab2ea2c.js";import{c}from"./shared-4e709717.js";import{R as u,a as f}from"./shared-7a87cd33.js";import"./shared-a6e889a8.js";import"./shared-4b24accb.js";import"./shared-69074dae.js";import"./shared-cd96ff03.js";import"./shared-0ea750af.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-5b0c206b.js";import"./shared-9e8344bf.js";import"./shared-5bcf861e.js";import"./shared-433eea12.js";import"./shared-5212ef4f.js";import"./shared-c782b9fa.js";import"./shared-f9d1baff.js";import"./shared-b5a0d106.js";import"./shared-64e243c4.js";import"./shared-278b8790.js";import"./shared-f8519b17.js";import"./shared-5fd5805c.js";import"./shared-5380e27d.js";import"./shared-c5c123c5.js";import"./shared-e4792d4a.js";import"./shared-005168e0.js";import"./shared-937e58bf.js";import"./shared-12973e93.js";import"./shared-cf613436.js";import"./shared-3c94ab84.js";import"./shared-50f8f2bd.js";import"./shared-a268320e.js";import"./shared-529a82a3.js";import"./shared-85ed835a.js";import"./shared-e502a7be.js";import"./shared-df7d368c.js";import"./shared-809d503c.js";import"./shared-e54135f0.js";import"./shared-fc784ca0.js";import"./shared-d0aed1c1.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./shared-c929504f.js";import"./shared-c66ca1f5.js";import"./shared-138959d7.js";import"./foxy-form-dialog.js";import"./shared-53e476fd.js";import"./shared-4e1bff30.js";import"./shared-1091aa45.js";import"./shared-7d15992f.js";import"./shared-85feff39.js";import"./shared-1ae16c80.js";import"./shared-bea6e6a7.js";import"./shared-95d34ae8.js";import"./shared-e7a2b31d.js";import"./shared-2061be9a.js";import"./shared-f0fa0a88.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";let h,p,m,v,_,y,x,b=e=>e;let g,j=e=>e;customElements.define("foxy-internal-post-action-control",class extends e{constructor(){super(...arguments),this.messageOptions={},this.theme=null,this.href=null}static get properties(){return t(t({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},theme:{},href:{}})}renderControl(){var e,t;return o(g||(g=j` <foxy-internal-post-action-control-dialog message-options="${0}" infer="" href="${0}" @hide="${0}"> </foxy-internal-post-action-control-dialog> <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button"></foxy-i18n> </vaadin-button> `),JSON.stringify(this.messageOptions),a(null!==(e=this.href)&&void 0!==e?e:void 0),(e=>{e.detail.cancelled||this.dispatchEvent(new CustomEvent("success"))}),a(null!==(t=this.theme)&&void 0!==t?t:void 0),this.disabled||this.readonly,(e=>{const t=e.currentTarget,i=this.renderRoot.querySelector("foxy-internal-post-action-control-dialog");null==i||i.show(t)}))}}),customElements.define("foxy-internal-post-action-control-dialog",class extends r{constructor(){super(...arguments),this.messageOptions={},this.closable=!0,this.header="header",this.alert=!0,this.href=null,this.__api=new n(this),this.__state="idle"}static get properties(){return t(t({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},href:{},__state:{attribute:!1}})}get hiddenSelector(){const e=["close-button",super.hiddenSelector.toString()];return new i(e.join(" ").trim())}render(){var e=this;return super.render((()=>o(h||(h=b` <div class="relative"> <div class="mb-m mt-xs flex justify-center"> ${0} </div> <foxy-i18n class="block font-lumo text-m text-body text-center mb-l" infer="" key="message_${0}" .options="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> ${0} </div> ${0} </div> `),"done"===this.__state?s(p||(p=b`<svg class="text-success" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" /></svg>`)):"fail"===this.__state?s(m||(m=b`<svg class="text-error" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z" /></svg>`)):s(v||(v=b`<svg class="text-primary" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),"busy"===this.__state?"idle":this.__state,this.messageOptions,"done"===this.__state||"fail"===this.__state?o(_||(_=b` <vaadin-button class="col-span-2" theme="contrast" @click="${0}"> <foxy-i18n infer="" key="button_close"></foxy-i18n> </vaadin-button> `),(()=>this.hide())):o(y||(y=b` <vaadin-button ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_cancel"></foxy-i18n> </vaadin-button> <vaadin-button theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_confirm"></foxy-i18n> </vaadin-button> `),this.disabled||this.readonly,(()=>this.hide()),this.disabled||this.readonly,(async function(){if(e.href&&"idle"===e.__state){e.__state="busy",e.closable=!1;const t=await e.__api.fetch(e.href,{method:"POST"});e.__state=t.ok?"done":"fail",e.closable=!0}})),"busy"===this.__state?o(x||(x=b` <div class="bg-base absolute inset-0 flex items-center justify-center"> <foxy-spinner layout="vertical" infer=""></foxy-spinner> </div> `)):"")))}async hide(){await super.hide("done"!==this.__state),this.__state="idle"}});let w,k,$,S,P=e=>e;customElements.define("foxy-internal-transaction-customer-control",class extends e{constructor(){super(...arguments),this.__copyEmailState="idle",this.__copyIdState="idle"}static get properties(){return t(t({},super.properties),{},{__copyEmailState:{attribute:!1},__copyIdState:{attribute:!1}})}renderControl(){var e,t,i,r;const n=this.nucleon,d=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e._links["fx:customer"].href,u=d?null===(t=null==n?void 0:n.getCustomerPageHref)||void 0===t?void 0:t.call(n,d):void 0;return o(w||(w=P` <foxy-i18n infer="" class="block text-l font-medium leading-xs mb-s" key="label"> </foxy-i18n> <foxy-swipe-actions> <a class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" href="${0}"> <foxy-customer-card infer="" href="${0}"></foxy-customer-card> </a> <div class="h-full grid grid-cols-2 gap-s ml-s" slot="action"> ${0} ${0} </div> </foxy-swipe-actions> `),c({"block ring-inset rounded transition-colors bg-contrast-5":!0,"cursor-pointer hover-bg-contrast-10":!!u,"focus-outline-none focus-ring-2 focus-ring-primary-50":!!u}),a(u),a(d),this.__renderCopyAction(s(k||(k=P`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M9.493 2.852a.75.75 0 0 0-1.486-.204L7.545 6H4.198a.75.75 0 0 0 0 1.5h3.14l-.69 5H3.302a.75.75 0 0 0 0 1.5h3.14l-.435 3.148a.75.75 0 0 0 1.486.204L7.955 14h2.986l-.434 3.148a.75.75 0 0 0 1.486.204L12.456 14h3.346a.75.75 0 0 0 0-1.5h-3.14l.69-5h3.346a.75.75 0 0 0 0-1.5h-3.14l.435-3.148a.75.75 0 0 0-1.486-.204L12.045 6H9.059l.434-3.148ZM8.852 7.5l-.69 5h2.986l.69-5H8.852Z" clip-rule="evenodd" /></svg>`)),"copy_id_caption","__copyIdState",d?String(l(d)):""),this.__renderCopyAction(s($||($=P`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M5.404 14.596A6.5 6.5 0 1 1 16.5 10a1.25 1.25 0 0 1-2.5 0 4 4 0 1 0-.571 2.06A2.75 2.75 0 0 0 18 10a8 8 0 1 0-2.343 5.657.75.75 0 0 0-1.06-1.06 6.5 6.5 0 0 1-9.193 0ZM10 7.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z" clip-rule="evenodd" /></svg>`)),"copy_email_caption","__copyEmailState",null!==(r=null===(i=null==n?void 0:n.data)||void 0===i?void 0:i.customer_email)&&void 0!==r?r:""))}__renderCopyAction(e,t,i,s){const r=this[i],n="fail"===r?"error":"done"===r?"end":"busy";return o(S||(S=P` <button class="relative transition-colors bg-contrast-5 text-body hover-bg-contrast-10 rounded h-full py-0 px-m focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50" ?disabled="${0}" @click="${0}" @focusout="${0}" @mouseout="${0}"> <div class="${0}"> ${0} <foxy-i18n class="mt-xs text-s font-medium leading-none" infer="" key="${0}"> </foxy-i18n> </div> <div class="${0}"> <foxy-spinner layout="no-label" state="${0}" infer="spinner"> </foxy-spinner> </div> </button> `),"idle"!==r,(()=>"idle"===r&&this.__copy(s,i)),(e=>"idle"!==r&&e.stopPropagation()),(e=>"idle"!==r&&e.stopPropagation()),c({"relative flex flex-col items-center justify-center transition-opacity":!0,"opacity-0":"idle"!==r}),e,t,c({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===r}),n)}async __copy(e,t){this[t]="busy";try{await navigator.clipboard.writeText(e),this[t]="done"}catch(e){this[t]="fail"}setTimeout((()=>this[t]="idle"),3e3)}});let C,A,H,L,E,O,B,R=e=>e;customElements.define("foxy-internal-transaction-actions-control",class extends e{renderControl(){var e,t,i,s,r,n,a,d,l,c,u,f;const h=this.nucleon;return o(C||(C=R` <div class="flex flex-wrap gap-x-m gap-y-xs"> ${0} ${0} ${0} ${0} ${0} ${0} <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="archive" key="caption_${0}"> </foxy-i18n> </vaadin-button> </div> `),(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:capture"])?this.__renderCaptureAction():"",(null===(s=null===(i=this.nucleon)||void 0===i?void 0:i.data)||void 0===s?void 0:s._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(r=this.nucleon)||void 0===r?void 0:r.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"",(null===(c=null===(l=this.nucleon)||void 0===l?void 0:l.data)||void 0===c?void 0:c._links["fx:subscription"])?this.__renderSubscriptionAction():"",(null===(f=null===(u=this.nucleon)||void 0===u?void 0:u.data)||void 0===f?void 0:f._links["fx:receipt"])?this.__renderReceiptAction():"",this.disabledSelector.matches("archive",!0),(()=>{null==h||h.edit({hide_transaction:!(null==h?void 0:h.form.hide_transaction)}),null==h||h.submit()}),(null==h?void 0:h.form.hide_transaction)?"unarchive":"archive")}__renderSendEmailsAction(){var e,t;return o(A||(A=R` <foxy-internal-post-action-control infer="send-emails" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:send_emails"].href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderCaptureAction(){var e,t;return o(H||(H=R` <foxy-internal-post-action-control theme="tertiary-inline success" infer="capture" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:capture"].href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderVoidAction(){var e,t,i;return o(L||(L=R` <foxy-internal-post-action-control theme="tertiary-inline error" infer="void" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(i=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:void"])||void 0===i?void 0:i.href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderRefundAction(){var e,t,i;return o(E||(E=R` <foxy-internal-post-action-control infer="refund" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(i=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:refund"])||void 0===i?void 0:i.href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderSubscriptionAction(){var e,t,i;const s=this.nucleon,r=null===(t=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e._links["fx:subscription"])||void 0===t?void 0:t.href,n=r?null===(i=null==s?void 0:s.getSubscriptionPageHref)||void 0===i?void 0:i.call(s,r):void 0;return o(O||(O=R` <a class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="subscription" key="caption"></foxy-i18n> </a> `),a(n))}__renderReceiptAction(){var e,t;const i=this.nucleon;return o(B||(B=R` <a target="_blank" class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="receipt" key="caption"></foxy-i18n> </a> `),a(null===(t=null===(e=null==i?void 0:i.data)||void 0===e?void 0:e._links["fx:receipt"])||void 0===t?void 0:t.href))}});let Z,I,M,q,G,T,U,W,z,D,V,J=e=>e;customElements.define("foxy-internal-transaction-summary-control",class extends e{constructor(){super(...arguments),this.__storeLoaderId="storeLoader"}renderControl(){var e,t,i,s,r,n,d,l,c;const u=null===(e=this.nucleon)||void 0===e?void 0:e.data;if(!u)return o(Z||(Z=J``));const f=null!==(i=null===(t=null==u?void 0:u._embedded)||void 0===t?void 0:t["fx:applied_taxes"])&&void 0!==i?i:[],h=null!==(r=null===(s=u._embedded)||void 0===s?void 0:s["fx:shipments"])&&void 0!==r?r:[];return o(I||(I=J` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <p class="grid gap-x-s text-right text-s leading-m border-dashed border rounded border-contrast-20 whitespace-nowrap overflow-auto" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 2px);grid-template-columns:1fr min-content"> <span><foxy-i18n key="subtotal" infer=""></foxy-i18n>&colon;</span> <span>${0}</span> ${0} ${0} ${0} ${0} <span class="col-span-2 border-t border-dashed border-contrast-20 my-s"></span> <span class="col-span-2 flex gap-s justify-between items-center"> ${0} <span class="text-xl font-medium leading-xs"> <foxy-i18n infer="" key="total"></foxy-i18n>&colon; ${0} </span> </span> </p> `),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.__renderPrice(u.total_item_price),0===h.length||0===u.total_shipping?o(M||(M=J` <span><foxy-i18n infer="" key="total_shipping"></foxy-i18n>&colon;</span> <span>${0} </span> `),this.__renderPrice(u.total_shipping,!0)):h.map((e=>o(q||(q=J` <span>${0}&colon;</span> <span>${0}</span> `),e.shipping_service_description,this.__renderPrice(e.total_shipping,!0)))),0===f.length||0===u.total_tax?o(G||(G=J` <span><foxy-i18n infer="" key="total_tax"></foxy-i18n>&colon;</span> <span>${0}</span> `),this.__renderPrice(u.total_tax,!0)):f.map((e=>o(T||(T=J` <span>${0}&colon;</span> <span>${0}</span> `),e.name,this.__renderPrice(e.amount,!0)))),null===(d=null===(n=null==u?void 0:u._embedded)||void 0===n?void 0:n["fx:gift_card_code_logs"])||void 0===d?void 0:d.map((e=>{var t,i,s,r,n;const a=null===(i=null===(t=e._embedded)||void 0===t?void 0:t["fx:gift_card"])||void 0===i?void 0:i.name,d=null===(r=null===(s=e._embedded)||void 0===s?void 0:s["fx:gift_card_code"])||void 0===r?void 0:r.code;if(a&&d)return o(U||(U=J` <span data-testclass="gift-card-code">${0} &bull; ${0}&colon;</span> <span>${0}</span> `),a,d,this.__renderPrice(null!==(n=e.balance_adjustment)&&void 0!==n?n:0,!0))})),null===(c=null===(l=null==u?void 0:u._embedded)||void 0===l?void 0:l["fx:discounts"])||void 0===c?void 0:c.map((({name:e,code:t,amount:i})=>o(W||(W=J` <span data-testclass="discount">${0}${0}&colon;</span> <span>${0}</span> `),e,t?o(z||(z=J` &bull; ${0}`),t):"",this.__renderPrice(i,!0)))),this.__renderStatus(),this.__renderPrice(u.total_order))}get __storeHref(){var e,t,i;return null===(i=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:store"])||void 0===i?void 0:i.href}get __store(){var e,t;const i=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}__renderPrice(e,t=!1){var i,s,r;const n=(null===(i=this.__store)||void 0===i?void 0:i.use_international_currency_symbol)?"code":"symbol",a=null===(r=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===r?void 0:r.currency_code;return o(D||(D=J` <foxy-i18n class="${0}" infer="" key="price" .options="${0}"> </foxy-i18n> `),t&&0!==e?e>0?"text-success":"text-error":"",{currencyDisplay:n,signDisplay:t?"exceptZero":"auto",amount:`${e} ${a}`})}__renderStatus(){var e,t;const i=(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t.status)||"completed";let s="";return s=["capturing","captured","approved","authorized","pending"].includes(i)?"text-success bg-success-10":i&&"completed"!==i?["problem","pending_fraud_review","rejected","declined"].includes(i)?"text-error-contrast bg-error":"bg-contrast-5 text-body":"text-success-contrast bg-success",o(V||(V=J` <foxy-i18n infer="" class="${0} rounded-s py-xs px-s font-medium text-s leading-xs" key="status_${0}"></foxy-i18n> `),s,i)}});let N,F,K,Q=e=>e;const X=u(f(d,"transaction"));class Y extends X{constructor(){var e;super(...arguments),e=this,this.hostedPaymentGatewaysHelper=null,this.paymentGatewaysHelper=null,this.localeCodes=null,this.getSubscriptionPageHref=null,this.getCustomerPageHref=null,this.__webhooksBulkActions=[{name:"refeed",onClick:async function(t){if(!e.data)return;const i=e.data._links["fx:send_webhooks"].href,o=new Y.API(e),s=await o.fetch(i,{method:"POST",body:JSON.stringify({refeed_hooks:t.map((e=>l(e._links.self.href))),event:"refeed"})});if(t.forEach((e=>{Y.Rumour("").share({related:[...t.map((e=>e._links["fx:logs"].href)),...t.map((e=>e._links["fx:statuses"].href))],source:e._links.self.href,data:e})})),!s.ok)throw new Error(await s.text())}}]}static get properties(){return t(t({},super.properties),{},{hostedPaymentGatewaysHelper:{attribute:"hosted-payment-gateways-helper"},paymentGatewaysHelper:{attribute:"payment-gateways-helper"},getSubscriptionPageHref:{attribute:!1},getCustomerPageHref:{attribute:!1},localeCodes:{attribute:"locale-codes"}})}get readonlySelector(){var e,t,o;const s=["billing-addresses","datafeed:data-is-fed","webhooks:dialog:url",super.readonlySelector];return Boolean(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:void"])&&void 0!==t?t:null===(o=this.data)||void 0===o?void 0:o._links["fx:refund"])||s.push("items","attributes","custom-fields"),new i(s.join(" ").trim())}get hiddenSelector(){var e,t,o,s;const r=["billing-addresses:dialog:delete","billing-addresses:dialog:timestamps","webhooks:dialog:header:copy-json","webhooks:dialog:header:copy-id","webhooks:dialog:timestamps","webhooks:dialog:name","webhooks:dialog:query","webhooks:dialog:encryption-key","webhooks:dialog:delete",super.readonlySelector],n=null===(e=this.data)||void 0===e?void 0:e.type;return(null===(t=this.data)||void 0===t?void 0:t._links["fx:subscription"])||r.unshift("subscription"),"subscription_modification"===n&&r.unshift("actions"),"updateinfo"===n&&r.unshift("not=customer,subscription,payments,custom-fields,attributes"),"subscription_cancellation"===n&&r.unshift("not=customer,subscription,custom-fields,attributes"),(null===(s=null===(o=this.__storeLoader)||void 0===o?void 0:o.data)||void 0===s?void 0:s.use_webhook)||r.unshift("datafeed"),new i(r.join(" ").trim())}get headerSubtitleOptions(){var e,t,i,o,s;const r=null===(e=this.data)||void 0===e?void 0:e.source,n=null===(t=this.data)||void 0===t?void 0:t.type;let a="";return"updateinfo"===n?a=!r||(null==r?void 0:r.startsWith("cit_"))?"customer_changed_payment_method":"mit_uoe"===r?"admin_changed_payment_method_with_uoe":"mit_api"===r?"integration_changed_payment_method":"admin_changed_payment_method":"subscription_modification"===n?a=!r||(null==r?void 0:r.startsWith("cit_"))?"customer_changed_subscription":"mit_uoe"===r?"admin_changed_subscription_with_uoe":"mit_api"===r?"integration_changed_subscription":"admin_changed_subscription":"subscription_renewal"===n?"mit_recurring"===r?a="subscription_renewal_attempt":"mit_recurring_reattempt_automated"===r?a="subscription_renewal_automated_reattempt":"mit_recurring_reattempt_manual"===r&&(a="subscription_renewal_manual_reattempt"):"subscription_cancellation"===n?"cit_recurring_cancellation"===r?a="customer_canceled_subscription":"mit_recurring_cancellation"===r&&(a="admin_canceled_subscription"):(null===(i=this.data)||void 0===i?void 0:i._links["fx:subscription"])?(null==r?void 0:r.startsWith("cit_"))?a="customer_subscribed":"mit_uoe"===r?a="admin_subscribed_with_uoe":"mit_api"===r&&(a="integration_subscribed"):(null==r?void 0:r.startsWith("cit_"))?a="customer_placed_order":"mit_uoe"===r?a="admin_placed_order_with_uoe":"mit_api"===r&&(a="integration_placed_order"),{transaction_date:null===(o=this.data)||void 0===o?void 0:o.transaction_date,ip_country:null===(s=this.data)||void 0===s?void 0:s.ip_country,context:a}}get headerSubtitleBadges(){var e,t;const i=super.headerSubtitleBadges;return(null===(e=this.data)||void 0===e?void 0:e.is_test)&&i.push({key:"test"}),(null===(t=this.data)||void 0===t?void 0:t.hide_transaction)&&i.push({key:"archived"}),i}get headerCopyIdValue(){var e,t,i;return null!==(i=null===(t=null===(e=this.data)||void 0===e?void 0:e.display_id)||void 0===t?void 0:t.toString())&&void 0!==i?i:""}renderHeaderActions(){return o(N||(N=Q` <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> `))}renderBody(){var e,t,i,s,r,n,d,l,c,u,f,h,p,m,v,_;let y,x,b;const g=this.hiddenSelector;if(this.data)try{const o=new URL(this.data._links["fx:shipments"].href),s=new URL(null!==(i=null===(t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:webhooks"].href)&&void 0!==i?i:""),r=new URL(this.data._links["fx:items"].href);o.searchParams.set("zoom","items:item_category"),s.searchParams.set("event_resource","transaction"),r.searchParams.set("zoom","item_options"),y=o.toString(),x=s.toString(),b=r.toString()}catch(e){}return o(F||(F=Q` ${0} ${0} <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <div class="grid gap-s" ?hidden="${0}"> <foxy-internal-async-list-control infer="items" class="min-w-0" first="${0}" limit="10" item="foxy-item-card" form="foxy-item-form" alert wide .related="${0}" .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-transaction-summary-control infer="summary" class="min-w-0"> </foxy-internal-transaction-summary-control> </div> <foxy-internal-async-list-control infer="billing-addresses" first="${0}" item="foxy-billing-address-card" form="foxy-address-form" hide-create-button hide-delete-button alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="payments" first="${0}" item="foxy-payment-card" .itemProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="custom-fields" class="min-w-0" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="shipments" first="${0}" item="foxy-shipment-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="webhooks" first="${0}" item="foxy-webhook-card" form="foxy-webhook-form" hide-create-button hide-delete-button alert .bulkActions="${0}" .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-summary-control infer="datafeed"> <foxy-internal-switch-control infer="data-is-fed"></foxy-internal-switch-control> <foxy-internal-post-action-control infer="process-webhook" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> </foxy-internal-summary-control> <foxy-nucleon class="hidden" infer="" href="${0}" id="storeLoader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),["problem","pending_fraud_review","rejected","declined"].includes(null!==(r=null===(s=this.data)||void 0===s?void 0:s.status)&&void 0!==r?r:"")?o(K||(K=Q` <p class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n infer="header" key="alert_status_${0}"></foxy-i18n> </p> `),null===(n=this.data)||void 0===n?void 0:n.status):"",g.matches("items",!0)&&g.matches("summary",!0),a(b),[this.href],{"locale-codes":this.localeCodes},{"item-categories":null===(l=null===(d=this.__storeLoader)||void 0===d?void 0:d.data)||void 0===l?void 0:l._links["fx:item_categories"].href,"locale-codes":this.localeCodes,store:null===(c=this.data)||void 0===c?void 0:c._links["fx:store"].href},a(null===(u=this.data)||void 0===u?void 0:u._links["fx:billing_addresses"].href),a(null===(f=this.data)||void 0===f?void 0:f._links["fx:payments"].href),{"hosted-payment-gateways-helper":this.hostedPaymentGatewaysHelper,"payment-gateways-helper":this.paymentGatewaysHelper},a(null===(h=this.data)||void 0===h?void 0:h._links["fx:custom_fields"].href),a(null===(p=this.data)||void 0===p?void 0:p._links["fx:attributes"].href),a(y),a(x),this.__webhooksBulkActions,{"resource-uri":this.href},{"resource-uri":this.href},a(null===(v=null===(m=this.data)||void 0===m?void 0:m._links["fx:process_webhook"])||void 0===v?void 0:v.href),(()=>this.refresh()),a(null===(_=this.data)||void 0===_?void 0:_._links["fx:store"].href),(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector("#storeLoader")}}customElements.define("foxy-transaction",Y);export{Y as Transaction};
1
+ import"./foxy-billing-address-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-webhook-card.js";import"./foxy-webhook-form.js";import"./foxy-address-form.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-3d353eb8.js";import"./shared-360196ad.js";import{a as e}from"./shared-0b8768db.js";import"./foxy-spinner.js";import{_ as t,B as o}from"./shared-8f9014ff.js";import{h as i,s as r}from"./shared-ba5c42c7.js";import{D as s}from"./shared-58add5b4.js";import{A as n}from"./shared-69c98b7b.js";import{i as a}from"./shared-53e42a77.js";import"./shared-4eb52fc7.js";import"./shared-28ceb7f7.js";import"./shared-64231b81.js";import{I as l}from"./shared-fc155659.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import{g as d}from"./shared-bab2ea2c.js";import{c}from"./shared-4e709717.js";import{R as u,a as f}from"./shared-47f3f5f5.js";import"./shared-e2d5673b.js";import"./shared-6740e365.js";import"./shared-9b138652.js";import"./shared-cd96ff03.js";import"./shared-930e68b7.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./shared-b2cbe727.js";import"./shared-d4b77609.js";import"./shared-eb49be2e.js";import"./shared-5a469962.js";import"./shared-5212ef4f.js";import"./shared-41c9c53f.js";import"./shared-15a75e70.js";import"./shared-6bf89411.js";import"./shared-66278c21.js";import"./shared-e55c8dc4.js";import"./shared-57e94234.js";import"./shared-5fd5805c.js";import"./shared-d46230dc.js";import"./shared-9e0b104a.js";import"./shared-730acf1d.js";import"./shared-34a87829.js";import"./shared-bf8d95b9.js";import"./shared-c84333db.js";import"./shared-cf613436.js";import"./shared-4158f91e.js";import"./shared-6f071960.js";import"./shared-27c16d99.js";import"./shared-b3fe8c63.js";import"./shared-0e25ac65.js";import"./shared-59128d82.js";import"./shared-fb859ece.js";import"./shared-4194ffe7.js";import"./shared-32b2d003.js";import"./shared-5c8931a0.js";import"./shared-d0aed1c1.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./shared-1c985317.js";import"./shared-8498f274.js";import"./shared-6f90d987.js";import"./foxy-form-dialog.js";import"./shared-53e476fd.js";import"./shared-0e5484c2.js";import"./shared-be2ce0e6.js";import"./shared-d9378323.js";import"./shared-c5a44ef2.js";import"./shared-742640c2.js";import"./shared-84e97597.js";import"./shared-f2a7eb85.js";import"./shared-b01c3b62.js";import"./shared-2061be9a.js";import"./shared-f0fa0a88.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";let h,p,m,v,_,y,x,b=e=>e;let g,w=e=>e;customElements.define("foxy-internal-post-action-control",class extends e{constructor(){super(...arguments),this.messageOptions={},this.theme=null,this.href=null}static get properties(){return t(t({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},theme:{},href:{}})}renderControl(){var e,t;return i(g||(g=w` <foxy-internal-post-action-control-dialog message-options="${0}" infer="" href="${0}" @hide="${0}"> </foxy-internal-post-action-control-dialog> <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button"></foxy-i18n> </vaadin-button> `),JSON.stringify(this.messageOptions),a(null!==(e=this.href)&&void 0!==e?e:void 0),(e=>{e.detail.cancelled||this.dispatchEvent(new CustomEvent("success"))}),a(null!==(t=this.theme)&&void 0!==t?t:void 0),this.disabled||this.readonly,(e=>{const t=e.currentTarget,o=this.renderRoot.querySelector("foxy-internal-post-action-control-dialog");null==o||o.show(t)}))}}),customElements.define("foxy-internal-post-action-control-dialog",class extends s{constructor(){super(...arguments),this.messageOptions={},this.closable=!0,this.header="header",this.alert=!0,this.href=null,this.__api=new n(this),this.__state="idle"}static get properties(){return t(t({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},href:{},__state:{attribute:!1}})}get hiddenSelector(){const e=["close-button",super.hiddenSelector.toString()];return new o(e.join(" ").trim())}render(){var e=this;return super.render((()=>i(h||(h=b` <div class="relative"> <div class="mb-m mt-xs flex justify-center"> ${0} </div> <foxy-i18n class="block font-lumo text-m text-body text-center mb-l" infer="" key="message_${0}" .options="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> ${0} </div> ${0} </div> `),"done"===this.__state?r(p||(p=b`<svg class="text-success" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" /></svg>`)):"fail"===this.__state?r(m||(m=b`<svg class="text-error" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z" /></svg>`)):r(v||(v=b`<svg class="text-primary" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),"busy"===this.__state?"idle":this.__state,this.messageOptions,"done"===this.__state||"fail"===this.__state?i(_||(_=b` <vaadin-button class="col-span-2" theme="contrast" @click="${0}"> <foxy-i18n infer="" key="button_close"></foxy-i18n> </vaadin-button> `),(()=>this.hide())):i(y||(y=b` <vaadin-button ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_cancel"></foxy-i18n> </vaadin-button> <vaadin-button theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_confirm"></foxy-i18n> </vaadin-button> `),this.disabled||this.readonly,(()=>this.hide()),this.disabled||this.readonly,(async function(){if(e.href&&"idle"===e.__state){e.__state="busy",e.closable=!1;const t=await e.__api.fetch(e.href,{method:"POST"});e.__state=t.ok?"done":"fail",e.closable=!0}})),"busy"===this.__state?i(x||(x=b` <div class="bg-base absolute inset-0 flex items-center justify-center"> <foxy-spinner layout="vertical" infer=""></foxy-spinner> </div> `)):"")))}async hide(){await super.hide("done"!==this.__state),this.__state="idle"}});let $,j,k,S,A=e=>e;customElements.define("foxy-internal-transaction-customer-control",class extends e{constructor(){super(...arguments),this.__copyEmailState="idle",this.__copyIdState="idle"}static get properties(){return t(t({},super.properties),{},{__copyEmailState:{attribute:!1},__copyIdState:{attribute:!1}})}renderControl(){var e,t,o,s;const n=this.nucleon,l=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e._links["fx:customer"].href,u=l?null===(t=null==n?void 0:n.getCustomerPageHref)||void 0===t?void 0:t.call(n,l):void 0;return i($||($=A` <foxy-i18n infer="" class="block text-l font-medium leading-xs mb-s" key="label"> </foxy-i18n> <foxy-swipe-actions> <a class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" href="${0}"> <foxy-customer-card infer="" href="${0}"></foxy-customer-card> </a> <div class="h-full grid grid-cols-2 gap-s ml-s" slot="action"> ${0} ${0} </div> </foxy-swipe-actions> `),c({"block ring-inset rounded transition-colors bg-contrast-5":!0,"cursor-pointer hover-bg-contrast-10":!!u,"focus-outline-none focus-ring-2 focus-ring-primary-50":!!u}),a(u),a(l),this.__renderCopyAction(r(j||(j=A`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M9.493 2.852a.75.75 0 0 0-1.486-.204L7.545 6H4.198a.75.75 0 0 0 0 1.5h3.14l-.69 5H3.302a.75.75 0 0 0 0 1.5h3.14l-.435 3.148a.75.75 0 0 0 1.486.204L7.955 14h2.986l-.434 3.148a.75.75 0 0 0 1.486.204L12.456 14h3.346a.75.75 0 0 0 0-1.5h-3.14l.69-5h3.346a.75.75 0 0 0 0-1.5h-3.14l.435-3.148a.75.75 0 0 0-1.486-.204L12.045 6H9.059l.434-3.148ZM8.852 7.5l-.69 5h2.986l.69-5H8.852Z" clip-rule="evenodd" /></svg>`)),"copy_id_caption","__copyIdState",l?String(d(l)):""),this.__renderCopyAction(r(k||(k=A`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M5.404 14.596A6.5 6.5 0 1 1 16.5 10a1.25 1.25 0 0 1-2.5 0 4 4 0 1 0-.571 2.06A2.75 2.75 0 0 0 18 10a8 8 0 1 0-2.343 5.657.75.75 0 0 0-1.06-1.06 6.5 6.5 0 0 1-9.193 0ZM10 7.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z" clip-rule="evenodd" /></svg>`)),"copy_email_caption","__copyEmailState",null!==(s=null===(o=null==n?void 0:n.data)||void 0===o?void 0:o.customer_email)&&void 0!==s?s:""))}__renderCopyAction(e,t,o,r){const s=this[o],n="fail"===s?"error":"done"===s?"end":"busy";return i(S||(S=A` <button class="relative transition-colors bg-contrast-5 text-body hover-bg-contrast-10 rounded h-full py-0 px-m focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50" ?disabled="${0}" @click="${0}" @focusout="${0}" @mouseout="${0}"> <div class="${0}"> ${0} <foxy-i18n class="mt-xs text-s font-medium leading-none" infer="" key="${0}"> </foxy-i18n> </div> <div class="${0}"> <foxy-spinner layout="no-label" state="${0}" infer="spinner"> </foxy-spinner> </div> </button> `),"idle"!==s,(()=>"idle"===s&&this.__copy(r,o)),(e=>"idle"!==s&&e.stopPropagation()),(e=>"idle"!==s&&e.stopPropagation()),c({"relative flex flex-col items-center justify-center transition-opacity":!0,"opacity-0":"idle"!==s}),e,t,c({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===s}),n)}async __copy(e,t){this[t]="busy";try{await navigator.clipboard.writeText(e),this[t]="done"}catch(e){this[t]="fail"}setTimeout((()=>this[t]="idle"),3e3)}});let P,C,H,L,E,B,Z,O,R,M,I,q=e=>e;customElements.define("foxy-internal-transaction-actions-control",class extends e{constructor(){super(...arguments),this.folders=null}static get properties(){return t(t({},super.properties),{},{folders:{}})}renderControl(){var e,t,o,r,s,n,a,l,d,c,u,f;return i(P||(P=q` <div class="flex flex-wrap gap-x-m gap-y-xs"> ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} </div> `),(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:capture"])?this.__renderCaptureAction():"",(null===(r=null===(o=this.nucleon)||void 0===o?void 0:o.data)||void 0===r?void 0:r._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(l=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===l?void 0:l._links["fx:send_emails"])?this.__renderSendEmailsAction():"",(null===(c=null===(d=this.nucleon)||void 0===d?void 0:d.data)||void 0===c?void 0:c._links["fx:subscription"])?this.__renderSubscriptionAction():"",(null===(f=null===(u=this.nucleon)||void 0===u?void 0:u.data)||void 0===f?void 0:f._links["fx:receipt"])?this.__renderReceiptAction():"",this.__renderArchiveAction(),this.folders?this.__renderFolderSelector(this.folders):"")}__renderSendEmailsAction(){var e,t;return i(C||(C=q` <foxy-internal-post-action-control infer="send-emails" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:send_emails"].href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderCaptureAction(){var e,t;return i(H||(H=q` <foxy-internal-post-action-control theme="tertiary-inline success" infer="capture" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:capture"].href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderVoidAction(){var e,t,o;return i(L||(L=q` <foxy-internal-post-action-control theme="tertiary-inline error" infer="void" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(o=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:void"])||void 0===o?void 0:o.href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderRefundAction(){var e,t,o;return i(E||(E=q` <foxy-internal-post-action-control infer="refund" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(o=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:refund"])||void 0===o?void 0:o.href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderSubscriptionAction(){var e,t,o;const r=this.nucleon,s=null===(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._links["fx:subscription"])||void 0===t?void 0:t.href,n=s?null===(o=null==r?void 0:r.getSubscriptionPageHref)||void 0===o?void 0:o.call(r,s):void 0;return i(B||(B=q` <a class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="subscription" key="caption"></foxy-i18n> </a> `),a(n))}__renderReceiptAction(){var e,t;const o=this.nucleon;return i(Z||(Z=q` <a target="_blank" class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="receipt" key="caption"></foxy-i18n> </a> `),a(null===(t=null===(e=null==o?void 0:o.data)||void 0===e?void 0:e._links["fx:receipt"])||void 0===t?void 0:t.href))}__renderArchiveAction(){const e=this.nucleon;return i(O||(O=q` <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="archive" key="caption_${0}"> </foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("archive",!0),(()=>{null==e||e.edit({hide_transaction:!(null==e?void 0:e.form.hide_transaction)}),null==e||e.submit()}),(null==e?void 0:e.form.hide_transaction)?"unarchive":"archive")}__renderFolderSelector(e){var t,o,s;const n=this.renderRoot.querySelector("#foldersLoader"),a=Array.from(null!==(s=null===(o=null===(t=null==n?void 0:n.data)||void 0===t?void 0:t._embedded)||void 0===o?void 0:o["fx:transaction_folders"])&&void 0!==s?s:[]),l=this.nucleon;return i(R||(R=q` <foxy-nucleon class="hidden" infer="" href="${0}" id="foldersLoader" @update="${0}"> </foxy-nucleon> <label class="group relative rounded focus-within-ring-2 focus-within-ring-primary-50" ?hidden="${0}"> <span class="inline-flex items-center gap-xs relative transition-opacity group-hover-opacity-80"> <foxy-i18n class="font-medium text-primary" infer="folder" key="caption"></foxy-i18n> ${0} </span> <select class="absolute inset-0 opacity-0 cursor-pointer" ?disabled="${0}" ?readonly="${0}" @change="${0}"> <option value="" ?selected="${0}" ?disabled="${0}"> ${0} </option> ${0} </select> </label> `),e,(()=>this.requestUpdate()),0===a.length,r(M||(M=q`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="text-primary transform scale-125" style="width: 1em; height: 1em"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),this.disabled,this.readonly,(e=>{null==l||l.edit({folder_uri:e.currentTarget.value}),null==l||l.submit(!1)}),!(null==l?void 0:l.form.folder_uri),!(null==l?void 0:l.form.folder_uri),this.t("folder.option_none"),a.sort(((e,t)=>e.sort_order-t.sort_order)).map((e=>{const t=e._links.self.href,o=(null==l?void 0:l.form.folder_uri)===t;return i(I||(I=q` <option value="${0}" ?selected="${0}" ?disabled="${0}"> ${0} </option> `),t,o,o,e.name)})))}});let G,T,U,V,W,z,D,F,J,N,K,Q=e=>e;customElements.define("foxy-internal-transaction-summary-control",class extends e{constructor(){super(...arguments),this.__storeLoaderId="storeLoader"}renderControl(){var e,t,o,r,s,n,l,d,c;const u=null===(e=this.nucleon)||void 0===e?void 0:e.data;if(!u)return i(G||(G=Q``));const f=null!==(o=null===(t=null==u?void 0:u._embedded)||void 0===t?void 0:t["fx:applied_taxes"])&&void 0!==o?o:[],h=null!==(s=null===(r=u._embedded)||void 0===r?void 0:r["fx:shipments"])&&void 0!==s?s:[];return i(T||(T=Q` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <p class="grid gap-x-s text-right text-s leading-m border-dashed border rounded border-contrast-20 whitespace-nowrap overflow-auto" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 2px);grid-template-columns:1fr min-content"> <span><foxy-i18n key="subtotal" infer=""></foxy-i18n>&colon;</span> <span>${0}</span> ${0} ${0} ${0} ${0} <span class="col-span-2 border-t border-dashed border-contrast-20 my-s"></span> <span class="col-span-2 flex gap-s justify-between items-center"> ${0} <span class="text-xl font-medium leading-xs"> <foxy-i18n infer="" key="total"></foxy-i18n>&colon; ${0} </span> </span> </p> `),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.__renderPrice(u.total_item_price),0===h.length||0===u.total_shipping?i(U||(U=Q` <span><foxy-i18n infer="" key="total_shipping"></foxy-i18n>&colon;</span> <span>${0} </span> `),this.__renderPrice(u.total_shipping,!0)):h.map((e=>i(V||(V=Q` <span>${0}&colon;</span> <span>${0}</span> `),e.shipping_service_description,this.__renderPrice(e.total_shipping,!0)))),0===f.length||0===u.total_tax?i(W||(W=Q` <span><foxy-i18n infer="" key="total_tax"></foxy-i18n>&colon;</span> <span>${0}</span> `),this.__renderPrice(u.total_tax,!0)):f.map((e=>i(z||(z=Q` <span>${0}&colon;</span> <span>${0}</span> `),e.name,this.__renderPrice(e.amount,!0)))),null===(l=null===(n=null==u?void 0:u._embedded)||void 0===n?void 0:n["fx:gift_card_code_logs"])||void 0===l?void 0:l.map((e=>{var t,o,r,s,n;const a=null===(o=null===(t=e._embedded)||void 0===t?void 0:t["fx:gift_card"])||void 0===o?void 0:o.name,l=null===(s=null===(r=e._embedded)||void 0===r?void 0:r["fx:gift_card_code"])||void 0===s?void 0:s.code;if(a&&l)return i(D||(D=Q` <span data-testclass="gift-card-code">${0} &bull; ${0}&colon;</span> <span>${0}</span> `),a,l,this.__renderPrice(null!==(n=e.balance_adjustment)&&void 0!==n?n:0,!0))})),null===(c=null===(d=null==u?void 0:u._embedded)||void 0===d?void 0:d["fx:discounts"])||void 0===c?void 0:c.map((({name:e,code:t,amount:o})=>i(F||(F=Q` <span data-testclass="discount">${0}${0}&colon;</span> <span>${0}</span> `),e,t?i(J||(J=Q` &bull; ${0}`),t):"",this.__renderPrice(o,!0)))),this.__renderStatus(),this.__renderPrice(u.total_order))}get __storeHref(){var e,t,o;return null===(o=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:store"])||void 0===o?void 0:o.href}get __store(){var e,t;const o=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(o))||void 0===e?void 0:e.data)&&void 0!==t?t:null}__renderPrice(e,t=!1){var o,r,s;const n=(null===(o=this.__store)||void 0===o?void 0:o.use_international_currency_symbol)?"code":"symbol",a=null===(s=null===(r=this.nucleon)||void 0===r?void 0:r.data)||void 0===s?void 0:s.currency_code;return i(N||(N=Q` <foxy-i18n class="${0}" infer="" key="price" .options="${0}"> </foxy-i18n> `),t&&0!==e?e>0?"text-success":"text-error":"",{currencyDisplay:n,signDisplay:t?"exceptZero":"auto",amount:`${e} ${a}`})}__renderStatus(){var e,t;const o=(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t.status)||"completed";let r="";return r=["capturing","captured","approved","authorized","pending"].includes(o)?"text-success bg-success-10":o&&"completed"!==o?["problem","pending_fraud_review","rejected","declined"].includes(o)?"text-error-contrast bg-error":"bg-contrast-5 text-body":"text-success-contrast bg-success",i(K||(K=Q` <foxy-i18n infer="" class="${0} rounded-s py-xs px-s font-medium text-s leading-xs" key="status_${0}"></foxy-i18n> `),r,o)}});let X,Y,ee,te,oe=e=>e;const ie=u(f(l,"transaction"));class re extends ie{constructor(){var e;super(...arguments),e=this,this.hostedPaymentGatewaysHelper=null,this.paymentGatewaysHelper=null,this.localeCodes=null,this.getSubscriptionPageHref=null,this.getCustomerPageHref=null,this.__webhooksBulkActions=[{name:"refeed",onClick:async function(t){if(!e.data)return;const o=e.data._links["fx:send_webhooks"].href,i=new re.API(e),r=await i.fetch(o,{method:"POST",body:JSON.stringify({refeed_hooks:t.map((e=>d(e._links.self.href))),event:"refeed"})});if(t.forEach((e=>{re.Rumour("").share({related:[...t.map((e=>e._links["fx:logs"].href)),...t.map((e=>e._links["fx:statuses"].href))],source:e._links.self.href,data:e})})),!r.ok)throw new Error(await r.text())}}]}static get properties(){return t(t({},super.properties),{},{hostedPaymentGatewaysHelper:{attribute:"hosted-payment-gateways-helper"},paymentGatewaysHelper:{attribute:"payment-gateways-helper"},getSubscriptionPageHref:{attribute:!1},getCustomerPageHref:{attribute:!1},localeCodes:{attribute:"locale-codes"}})}get readonlySelector(){var e,t,i;const r=["billing-addresses","datafeed:data-is-fed","webhooks:dialog:url",super.readonlySelector];return Boolean(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:void"])&&void 0!==t?t:null===(i=this.data)||void 0===i?void 0:i._links["fx:refund"])||r.push("items","attributes","custom-fields"),new o(r.join(" ").trim())}get hiddenSelector(){var e,t,i,r;const s=["billing-addresses:dialog:delete","billing-addresses:dialog:timestamps","webhooks:dialog:header:copy-json","webhooks:dialog:header:copy-id","webhooks:dialog:timestamps","webhooks:dialog:name","webhooks:dialog:query","webhooks:dialog:encryption-key","webhooks:dialog:delete",super.readonlySelector],n=null===(e=this.data)||void 0===e?void 0:e.type;return(null===(t=this.data)||void 0===t?void 0:t._links["fx:subscription"])||s.unshift("subscription"),"subscription_modification"===n&&s.unshift("actions"),"updateinfo"===n&&s.unshift("not=customer,subscription,payments,custom-fields,attributes"),"subscription_cancellation"===n&&s.unshift("not=customer,subscription,custom-fields,attributes"),(null===(r=null===(i=this.__storeLoader)||void 0===i?void 0:i.data)||void 0===r?void 0:r.use_webhook)||s.unshift("datafeed"),new o(s.join(" ").trim())}get headerSubtitleOptions(){var e,t,o,i,r;const s=null===(e=this.data)||void 0===e?void 0:e.source,n=null===(t=this.data)||void 0===t?void 0:t.type;let a="";return"updateinfo"===n?a=!s||(null==s?void 0:s.startsWith("cit_"))?"customer_changed_payment_method":"mit_uoe"===s?"admin_changed_payment_method_with_uoe":"mit_api"===s?"integration_changed_payment_method":"admin_changed_payment_method":"subscription_modification"===n?a=!s||(null==s?void 0:s.startsWith("cit_"))?"customer_changed_subscription":"mit_uoe"===s?"admin_changed_subscription_with_uoe":"mit_api"===s?"integration_changed_subscription":"admin_changed_subscription":"subscription_renewal"===n?"mit_recurring"===s?a="subscription_renewal_attempt":"mit_recurring_reattempt_automated"===s?a="subscription_renewal_automated_reattempt":"mit_recurring_reattempt_manual"===s&&(a="subscription_renewal_manual_reattempt"):"subscription_cancellation"===n?"cit_recurring_cancellation"===s?a="customer_canceled_subscription":"mit_recurring_cancellation"===s&&(a="admin_canceled_subscription"):(null===(o=this.data)||void 0===o?void 0:o._links["fx:subscription"])?(null==s?void 0:s.startsWith("cit_"))?a="customer_subscribed":"mit_uoe"===s?a="admin_subscribed_with_uoe":"mit_api"===s&&(a="integration_subscribed"):(null==s?void 0:s.startsWith("cit_"))?a="customer_placed_order":"mit_uoe"===s?a="admin_placed_order_with_uoe":"mit_api"===s&&(a="integration_placed_order"),{transaction_date:null===(i=this.data)||void 0===i?void 0:i.transaction_date,ip_country:null===(r=this.data)||void 0===r?void 0:r.ip_country,context:a}}get headerSubtitleBadges(){var e,t,o,i,s;const n=super.headerSubtitleBadges,a=null===(t=null===(e=this.data)||void 0===e?void 0:e._embedded)||void 0===t?void 0:t["fx:folder"];if(null==a?void 0:a.name){const e=null!==(o=a.color)&&void 0!==o?o:"",t={red:"bg-folder-red text-white",red_pale:"bg-folder-red-pale text-black",green:"bg-folder-green text-white",green_pale:"bg-folder-green-pale text-black",blue:"bg-folder-blue text-white",blue_pale:"bg-folder-blue-pale text-black",orange:"bg-folder-orange text-white",orange_pale:"bg-folder-orange-pale text-black",violet:"bg-folder-violet text-white",violet_pale:"bg-folder-violet-pale text-black","":"bg-contrast-5 text-body"};n.push({class:t[e in t?e:""],icon:r(X||(X=oe`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em;"><path d="M3.75 3A1.75 1.75 0 0 0 2 4.75v3.26a3.235 3.235 0 0 1 1.75-.51h12.5c.644 0 1.245.188 1.75.51V6.75A1.75 1.75 0 0 0 16.25 5h-4.836a.25.25 0 0 1-.177-.073L9.823 3.513A1.75 1.75 0 0 0 8.586 3H3.75ZM3.75 9A1.75 1.75 0 0 0 2 10.75v4.5c0 .966.784 1.75 1.75 1.75h12.5A1.75 1.75 0 0 0 18 15.25v-4.5A1.75 1.75 0 0 0 16.25 9H3.75Z" /></svg>`)),text:a.name})}return(null===(i=this.data)||void 0===i?void 0:i.hide_transaction)&&n.push({key:"archived"}),(null===(s=this.data)||void 0===s?void 0:s.is_test)&&n.push({key:"test"}),n}get headerCopyIdValue(){var e,t,o;return null!==(o=null===(t=null===(e=this.data)||void 0===e?void 0:e.display_id)||void 0===t?void 0:t.toString())&&void 0!==o?o:""}renderHeaderActions(){var e,t;const o=null===(t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:transaction_folders"].href;return i(Y||(Y=oe` <foxy-internal-transaction-actions-control folders="${0}" infer="actions"> </foxy-internal-transaction-actions-control> `),a(o))}renderBody(){var e,t,o,r,s,n,l,d,c,u,f,h,p,m,v,_;let y,x,b;const g=this.hiddenSelector;if(this.data)try{const i=new URL(this.data._links["fx:shipments"].href),r=new URL(null!==(o=null===(t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:webhooks"].href)&&void 0!==o?o:""),s=new URL(this.data._links["fx:items"].href);i.searchParams.set("zoom","items:item_category"),r.searchParams.set("event_resource","transaction"),s.searchParams.set("zoom","item_options"),y=i.toString(),x=r.toString(),b=s.toString()}catch(e){}return i(ee||(ee=oe` ${0} ${0} <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <div class="grid gap-s" ?hidden="${0}"> <foxy-internal-async-list-control infer="items" class="min-w-0" first="${0}" limit="10" item="foxy-item-card" form="foxy-item-form" alert wide .related="${0}" .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-transaction-summary-control infer="summary" class="min-w-0"> </foxy-internal-transaction-summary-control> </div> <foxy-internal-async-list-control infer="billing-addresses" first="${0}" item="foxy-billing-address-card" form="foxy-address-form" hide-create-button hide-delete-button alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="payments" first="${0}" item="foxy-payment-card" .itemProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="custom-fields" class="min-w-0" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="shipments" first="${0}" item="foxy-shipment-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="webhooks" first="${0}" item="foxy-webhook-card" form="foxy-webhook-form" hide-create-button hide-delete-button alert .bulkActions="${0}" .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-summary-control infer="datafeed"> <foxy-internal-switch-control infer="data-is-fed"></foxy-internal-switch-control> <foxy-internal-post-action-control infer="process-webhook" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> </foxy-internal-summary-control> <foxy-nucleon class="hidden" infer="" href="${0}" id="storeLoader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),["problem","pending_fraud_review","rejected","declined"].includes(null!==(s=null===(r=this.data)||void 0===r?void 0:r.status)&&void 0!==s?s:"")?i(te||(te=oe` <p class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n infer="header" key="alert_status_${0}"></foxy-i18n> </p> `),null===(n=this.data)||void 0===n?void 0:n.status):"",g.matches("items",!0)&&g.matches("summary",!0),a(b),[this.href],{"locale-codes":this.localeCodes},{"item-categories":null===(d=null===(l=this.__storeLoader)||void 0===l?void 0:l.data)||void 0===d?void 0:d._links["fx:item_categories"].href,"locale-codes":this.localeCodes,store:null===(c=this.data)||void 0===c?void 0:c._links["fx:store"].href},a(null===(u=this.data)||void 0===u?void 0:u._links["fx:billing_addresses"].href),a(null===(f=this.data)||void 0===f?void 0:f._links["fx:payments"].href),{"hosted-payment-gateways-helper":this.hostedPaymentGatewaysHelper,"payment-gateways-helper":this.paymentGatewaysHelper},a(null===(h=this.data)||void 0===h?void 0:h._links["fx:custom_fields"].href),a(null===(p=this.data)||void 0===p?void 0:p._links["fx:attributes"].href),a(y),a(x),this.__webhooksBulkActions,{"resource-uri":this.href},{"resource-uri":this.href},a(null===(v=null===(m=this.data)||void 0===m?void 0:m._links["fx:process_webhook"])||void 0===v?void 0:v.href),(()=>this.refresh()),a(null===(_=this.data)||void 0===_?void 0:_._links["fx:store"].href),(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector("#storeLoader")}}customElements.define("foxy-transaction",re);export{re as Transaction};
@@ -1,4 +1,4 @@
1
- import"./shared-5b0c206b.js";import"./shared-9e8344bf.js";import"./foxy-spinner.js";import"./shared-10da9bf0.js";import{T as t}from"./shared-8340f3ab.js";import{a as s}from"./shared-7a87cd33.js";import"./shared-433eea12.js";import"./shared-5bcf861e.js";import"./shared-7fec42f2.js";import"./shared-ba5c42c7.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./foxy-nucleon-element.js";import"./shared-69074dae.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let e,a,n,o,r,i,l=t=>t;class m extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[m.priceColumn,m.summaryColumn,m.statusColumn,m.idColumn,m.dateColumn,m.receiptColumn]}}m.priceColumn={cell:t=>t.html(e||(e=l`
1
+ import"./shared-b2cbe727.js";import"./shared-d4b77609.js";import"./foxy-spinner.js";import"./shared-3d353eb8.js";import{T as t}from"./shared-4498a367.js";import{a as s}from"./shared-47f3f5f5.js";import"./shared-5a469962.js";import"./shared-eb49be2e.js";import"./shared-8f9014ff.js";import"./shared-ba5c42c7.js";import"./shared-930e68b7.js";import"./shared-41c9c53f.js";import"./shared-53e42a77.js";import"./foxy-nucleon-element.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./shared-4e709717.js";let e,a,n,o,r,i,l=t=>t;class m extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[m.priceColumn,m.summaryColumn,m.statusColumn,m.idColumn,m.dateColumn,m.receiptColumn]}}m.priceColumn={cell:t=>t.html(e||(e=l`
2
2
  <foxy-i18n
3
3
  data-testclass="i18n totals"
4
4
  class="text-m font-medium font-tnum"