@foxy.io/elements 1.18.0-beta.1 → 1.18.0-beta.11

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 (477) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +2 -2
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-api-browser.js +1 -1
  5. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-card.js +1 -1
  7. package/dist/cdn/foxy-attribute-form.js +1 -1
  8. package/dist/cdn/foxy-cancellation-form.js +1 -1
  9. package/dist/cdn/foxy-collection-page.js +1 -1
  10. package/dist/cdn/foxy-collection-pages.js +1 -1
  11. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  12. package/dist/cdn/foxy-coupon-card.js +1 -1
  13. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  14. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  15. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  16. package/dist/cdn/foxy-coupon-form.js +1 -1
  17. package/dist/cdn/foxy-custom-field-card.js +1 -1
  18. package/dist/cdn/foxy-custom-field-form.js +1 -1
  19. package/dist/cdn/foxy-customer-api.js +1 -1
  20. package/dist/cdn/foxy-customer-card.js +1 -1
  21. package/dist/cdn/foxy-customer-form.js +1 -1
  22. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  23. package/dist/cdn/foxy-customer-portal.js +15 -15
  24. package/dist/cdn/foxy-customer.js +5 -86
  25. package/dist/cdn/foxy-customers-table.js +1 -1
  26. package/dist/cdn/foxy-discount-builder.js +1 -1
  27. package/dist/cdn/foxy-discount-card.js +1 -1
  28. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  29. package/dist/cdn/foxy-donation.js +1 -1
  30. package/dist/cdn/foxy-email-template-card.js +1 -0
  31. package/dist/cdn/foxy-email-template-form.js +1 -1
  32. package/dist/cdn/foxy-error-entry-card.js +1 -1
  33. package/dist/cdn/foxy-form-dialog.js +1 -1
  34. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  35. package/dist/cdn/foxy-gift-card-card.js +1 -1
  36. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  37. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -0
  38. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  39. package/dist/cdn/foxy-gift-card-form.js +1 -1
  40. package/dist/cdn/foxy-i18n.js +1 -1
  41. package/dist/cdn/foxy-item-card.js +1 -1
  42. package/dist/cdn/foxy-item-category-card.js +1 -0
  43. package/dist/cdn/foxy-item-category-form.js +1 -0
  44. package/dist/cdn/foxy-item-form.js +1 -1
  45. package/dist/cdn/foxy-item-option-card.js +1 -1
  46. package/dist/cdn/foxy-item-option-form.js +1 -1
  47. package/dist/cdn/foxy-items-form.js +1 -1
  48. package/dist/cdn/foxy-nucleon-element.js +1 -1
  49. package/dist/cdn/foxy-pagination.js +1 -1
  50. package/dist/cdn/foxy-payment-card.js +1 -1
  51. package/dist/cdn/foxy-payment-method-card.js +1 -1
  52. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -0
  53. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -0
  54. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -0
  55. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -0
  56. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -0
  57. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -0
  58. package/dist/cdn/foxy-payments-api.js +1 -0
  59. package/dist/cdn/foxy-query-builder.js +1 -1
  60. package/dist/cdn/foxy-report-form.js +1 -1
  61. package/dist/cdn/foxy-reports-table.js +6 -6
  62. package/dist/cdn/foxy-shipment-card.js +1 -1
  63. package/dist/cdn/foxy-sign-in-form.js +1 -1
  64. package/dist/cdn/foxy-spinner.js +2 -2
  65. package/dist/cdn/foxy-store-shipping-method-form.js +1 -150
  66. package/dist/cdn/foxy-subscription-card.js +1 -1
  67. package/dist/cdn/foxy-subscription-form.js +6 -6
  68. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  69. package/dist/cdn/foxy-swipe-actions.js +1 -1
  70. package/dist/cdn/foxy-table.js +1 -1
  71. package/dist/cdn/foxy-tax-card.js +1 -1
  72. package/dist/cdn/foxy-tax-form.js +1 -1
  73. package/dist/cdn/foxy-template-config-form.js +1 -1
  74. package/dist/cdn/foxy-template-form.js +1 -1
  75. package/dist/cdn/foxy-transaction-card.js +1 -1
  76. package/dist/cdn/foxy-transaction.js +1 -1
  77. package/dist/cdn/foxy-transactions-table.js +1 -1
  78. package/dist/cdn/foxy-user-form.js +1 -1
  79. package/dist/cdn/foxy-users-table.js +1 -1
  80. package/dist/cdn/foxy-webhook-card.js +1 -1
  81. package/dist/cdn/foxy-webhook-form.js +1 -318
  82. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  83. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  84. package/dist/cdn/{shared-18fa34a8.js → shared-0008cf8e.js} +1 -1
  85. package/dist/cdn/{shared-97654b20.js → shared-02c6c308.js} +4 -4
  86. package/dist/cdn/{shared-e1c1e8e2.js → shared-0479553e.js} +1 -1
  87. package/dist/cdn/{shared-c13674cb.js → shared-0ca312eb.js} +1 -1
  88. package/dist/cdn/{shared-fd001fd3.js → shared-0ffa1afb.js} +1 -1
  89. package/dist/cdn/{shared-99940888.js → shared-11c2efc8.js} +1 -1
  90. package/dist/cdn/{shared-4b85b408.js → shared-14afc5c6.js} +1 -1
  91. package/dist/cdn/shared-164a791e.js +1 -0
  92. package/dist/cdn/{shared-e06de519.js → shared-19bdb896.js} +1 -1
  93. package/dist/cdn/{shared-33b47806.js → shared-1c9fd2b1.js} +2 -2
  94. package/dist/cdn/{shared-98497473.js → shared-24d650cd.js} +1 -1
  95. package/dist/cdn/shared-27089ebf.js +1 -0
  96. package/dist/cdn/shared-3214ee1b.js +11 -0
  97. package/dist/cdn/shared-39cb3be1.js +1 -0
  98. package/dist/cdn/{shared-9d905cdc.js → shared-3ba0d0e8.js} +1 -1
  99. package/dist/cdn/{shared-48ef8a04.js → shared-3c7489d6.js} +1 -1
  100. package/dist/cdn/{shared-2b077e01.js → shared-3d245899.js} +3 -3
  101. package/dist/cdn/{shared-a64ead08.js → shared-3fd94d2f.js} +1 -1
  102. package/dist/cdn/shared-425d906a.js +1 -0
  103. package/dist/cdn/{shared-8936b109.js → shared-4a2e1638.js} +1 -1
  104. package/dist/cdn/shared-4a4eab8b.js +1 -0
  105. package/dist/cdn/shared-4cd53ea2.js +1 -0
  106. package/dist/cdn/{shared-1eb23210.js → shared-4e2e233c.js} +1 -1
  107. package/dist/cdn/shared-4f037e43.js +1 -0
  108. package/dist/cdn/{shared-93d93d79.js → shared-54deb3dc.js} +1 -1
  109. package/dist/cdn/shared-5a823202.js +1 -0
  110. package/dist/cdn/{shared-12f8034b.js → shared-5f751bfc.js} +1 -1
  111. package/dist/cdn/{shared-80ca2f70.js → shared-61174bec.js} +12 -22
  112. package/dist/cdn/{shared-d539ee69.js → shared-66a0263f.js} +1 -1
  113. package/dist/cdn/{shared-7b7b6065.js → shared-6d175df8.js} +1 -1
  114. package/dist/cdn/shared-6d69487b.js +318 -0
  115. package/dist/cdn/shared-73ac094b.js +1 -0
  116. package/dist/cdn/shared-74e79000.js +553 -0
  117. package/dist/cdn/{shared-1bbd9b73.js → shared-75e78c70.js} +1 -1
  118. package/dist/cdn/shared-7c8b3ce0.js +15 -0
  119. package/dist/cdn/{shared-dc73b9a5.js → shared-7f33a83a.js} +1 -1
  120. package/dist/cdn/{shared-c5a638d1.js → shared-8dd640bf.js} +2 -2
  121. package/dist/cdn/{shared-17331dc5.js → shared-96695c93.js} +1 -1
  122. package/dist/cdn/{shared-0eb966c5.js → shared-99065f2a.js} +1 -1
  123. package/dist/cdn/shared-9aab51c0.js +1 -0
  124. package/dist/cdn/shared-a03d948d.js +1 -0
  125. package/dist/cdn/shared-a2efb819.js +1 -0
  126. package/dist/cdn/{shared-9f9cdbb0.js → shared-a6263179.js} +1 -1
  127. package/dist/cdn/shared-a8ced8bf.js +1 -0
  128. package/dist/cdn/{shared-0561e4c0.js → shared-a93f4ae9.js} +1 -1
  129. package/dist/cdn/{shared-d6dd67a5.js → shared-ad70817d.js} +1 -1
  130. package/dist/cdn/{shared-7c8bb60c.js → shared-b0ba62ff.js} +1 -1
  131. package/dist/cdn/{shared-4fc53390.js → shared-b1304f5b.js} +1 -1
  132. package/dist/cdn/shared-b7787aae.js +64 -0
  133. package/dist/cdn/shared-b866f3a7.js +150 -0
  134. package/dist/cdn/{shared-7ed7818e.js → shared-ba4053b3.js} +1 -1
  135. package/dist/cdn/shared-bc7f58ef.js +1 -0
  136. package/dist/cdn/{shared-6bcd6831.js → shared-c566fe52.js} +1 -1
  137. package/dist/cdn/{shared-32b15545.js → shared-c99a75d8.js} +1 -1
  138. package/dist/cdn/{shared-dbdc2a38.js → shared-ccb96675.js} +1 -1
  139. package/dist/cdn/shared-d187b584.js +1 -0
  140. package/dist/cdn/{shared-9803aa7c.js → shared-d3bf9ac0.js} +2 -2
  141. package/dist/cdn/{shared-a0c6a159.js → shared-d519a301.js} +2 -2
  142. package/dist/cdn/shared-d5ef2683.js +1 -0
  143. package/dist/cdn/{shared-26ce8d23.js → shared-d8faafc7.js} +1 -1
  144. package/dist/cdn/shared-d9c5e26e.js +1 -0
  145. package/dist/cdn/shared-dbb66347.js +1 -0
  146. package/dist/cdn/{shared-40689cd2.js → shared-dc891fc4.js} +1 -1
  147. package/dist/cdn/shared-de5fc645.js +82 -0
  148. package/dist/cdn/shared-dfdf021a.js +1 -0
  149. package/dist/cdn/{shared-f9f9ed5b.js → shared-e6f3e9f0.js} +1 -1
  150. package/dist/cdn/{shared-4de4a8bc.js → shared-ea58e244.js} +1 -1
  151. package/dist/cdn/{shared-e28fb2ef.js → shared-f00d31e0.js} +1 -1
  152. package/dist/cdn/{shared-59796faa.js → shared-f0591b3e.js} +1 -1
  153. package/dist/cdn/{shared-22ba9566.js → shared-f3b35364.js} +1 -1
  154. package/dist/cdn/shared-ff31023c.js +1 -0
  155. package/dist/cdn/translations/email-template-card/en.json +8 -0
  156. package/dist/cdn/translations/email-template-form/en.json +5 -0
  157. package/dist/cdn/translations/gift-card-code-form/en.json +32 -0
  158. package/dist/cdn/translations/gift-card-code-log-card/en.json +10 -0
  159. package/dist/cdn/translations/gift-card-form/en.json +58 -1
  160. package/dist/cdn/translations/item-category-form/en.json +196 -0
  161. package/dist/cdn/translations/payments-api-fraud-protection-card/en.json +10 -0
  162. package/dist/cdn/translations/payments-api-fraud-protection-form/en.json +34 -0
  163. package/dist/cdn/translations/payments-api-payment-method-card/en.json +10 -0
  164. package/dist/cdn/translations/payments-api-payment-method-form/en.json +61 -0
  165. package/dist/cdn/translations/payments-api-payment-preset-card/en.json +11 -0
  166. package/dist/cdn/translations/payments-api-payment-preset-form/en.json +84 -0
  167. package/dist/cdn/translations/store-shipping-method-form/en.json +8 -1
  168. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts +1 -0
  169. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +13 -0
  170. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
  171. package/dist/elements/internal/InternalAsyncDetailsControl/InternalAsyncDetailsControl.js +3 -1
  172. package/dist/elements/internal/InternalAsyncDetailsControl/InternalAsyncDetailsControl.js.map +1 -1
  173. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +23 -0
  174. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +167 -0
  175. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -0
  176. package/dist/elements/internal/InternalAsyncListControl/index.d.ts +12 -0
  177. package/dist/elements/internal/InternalAsyncListControl/index.js +14 -0
  178. package/dist/elements/internal/InternalAsyncListControl/index.js.map +1 -0
  179. package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js +11 -5
  180. package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js.map +1 -1
  181. package/dist/elements/internal/InternalControl/InternalControl.js +3 -2
  182. package/dist/elements/internal/InternalControl/InternalControl.js.map +1 -1
  183. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +1 -1
  184. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
  185. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +1 -1
  186. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
  187. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +17 -0
  188. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +57 -0
  189. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -0
  190. package/dist/elements/internal/InternalSelectControl/index.d.ts +5 -0
  191. package/dist/elements/internal/InternalSelectControl/index.js +7 -0
  192. package/dist/elements/internal/InternalSelectControl/index.js.map +1 -0
  193. package/dist/elements/internal/InternalSelectControl/types.d.ts +6 -0
  194. package/dist/elements/{public/StoreShippingMethodCard → internal/InternalSelectControl}/types.js +0 -0
  195. package/dist/elements/internal/InternalSelectControl/types.js.map +1 -0
  196. package/dist/elements/internal/InternalTextControl/InternalTextControl.js +1 -0
  197. package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
  198. package/dist/elements/private/I18N/I18N.js +3 -0
  199. package/dist/elements/private/I18N/I18N.js.map +1 -1
  200. package/dist/elements/private/Switch/Switch.js +1 -1
  201. package/dist/elements/private/Switch/Switch.js.map +1 -1
  202. package/dist/elements/public/CustomerApi/CustomerApi.d.ts +2 -0
  203. package/dist/elements/public/CustomerApi/CustomerApi.js +14 -0
  204. package/dist/elements/public/CustomerApi/CustomerApi.js.map +1 -1
  205. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +10 -23
  206. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
  207. package/dist/elements/public/{StoreShippingMethodCard/StoreShippingMethodCard.d.ts → EmailTemplateCard/EmailTemplateCard.d.ts} +1 -7
  208. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js +24 -0
  209. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js.map +1 -0
  210. package/dist/elements/public/EmailTemplateCard/index.d.ts +6 -0
  211. package/dist/elements/public/EmailTemplateCard/index.js +8 -0
  212. package/dist/elements/public/EmailTemplateCard/index.js.map +1 -0
  213. package/dist/elements/public/EmailTemplateCard/types.d.ts +3 -0
  214. package/dist/elements/public/EmailTemplateCard/types.js +2 -0
  215. package/dist/elements/public/EmailTemplateCard/types.js.map +1 -0
  216. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +3 -0
  217. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +17 -0
  218. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
  219. package/dist/elements/public/EmailTemplateForm/index.d.ts +1 -0
  220. package/dist/elements/public/EmailTemplateForm/index.js +1 -0
  221. package/dist/elements/public/EmailTemplateForm/index.js.map +1 -1
  222. package/dist/elements/public/FormDialog/FormDialog.js +1 -1
  223. package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
  224. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +4 -0
  225. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +32 -0
  226. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
  227. package/dist/elements/public/GiftCardCodeForm/index.d.ts +7 -4
  228. package/dist/elements/public/GiftCardCodeForm/index.js +7 -4
  229. package/dist/elements/public/GiftCardCodeForm/index.js.map +1 -1
  230. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.d.ts +5 -0
  231. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js +23 -0
  232. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js.map +1 -0
  233. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.d.ts +6 -0
  234. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js +8 -0
  235. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js.map +1 -0
  236. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.d.ts +12 -0
  237. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js +108 -0
  238. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js.map +1 -0
  239. package/dist/elements/public/GiftCardCodeLogCard/index.d.ts +6 -0
  240. package/dist/elements/public/GiftCardCodeLogCard/index.js +8 -0
  241. package/dist/elements/public/GiftCardCodeLogCard/index.js.map +1 -0
  242. package/dist/elements/public/GiftCardCodeLogCard/types.d.ts +3 -0
  243. package/dist/elements/public/GiftCardCodeLogCard/types.js +2 -0
  244. package/dist/elements/public/GiftCardCodeLogCard/types.js.map +1 -0
  245. package/dist/elements/public/GiftCardForm/GiftCardForm.js +25 -0
  246. package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
  247. package/dist/elements/public/GiftCardForm/index.d.ts +1 -2
  248. package/dist/elements/public/GiftCardForm/index.js +1 -2
  249. package/dist/elements/public/GiftCardForm/index.js.map +1 -1
  250. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.d.ts +14 -0
  251. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js +93 -0
  252. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js.map +1 -0
  253. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.d.ts +6 -0
  254. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js +8 -0
  255. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js.map +1 -0
  256. package/dist/elements/public/ItemCard/ItemCard.js +8 -6
  257. package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
  258. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.d.ts +6 -0
  259. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js +16 -0
  260. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js.map +1 -0
  261. package/dist/elements/public/ItemCategoryCard/index.d.ts +3 -0
  262. package/dist/elements/public/ItemCategoryCard/index.js +5 -0
  263. package/dist/elements/public/ItemCategoryCard/index.js.map +1 -0
  264. package/dist/elements/public/ItemCategoryCard/types.d.ts +3 -0
  265. package/dist/elements/public/ItemCategoryCard/types.js +2 -0
  266. package/dist/elements/public/ItemCategoryCard/types.js.map +1 -0
  267. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +31 -0
  268. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +309 -0
  269. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -0
  270. package/dist/elements/public/ItemCategoryForm/index.d.ts +10 -0
  271. package/dist/elements/public/ItemCategoryForm/index.js +12 -0
  272. package/dist/elements/public/ItemCategoryForm/index.js.map +1 -0
  273. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.d.ts +8 -0
  274. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js +52 -0
  275. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js.map +1 -0
  276. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.d.ts +6 -0
  277. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js +8 -0
  278. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js.map +1 -0
  279. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.d.ts +11 -0
  280. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js +85 -0
  281. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js.map +1 -0
  282. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.d.ts +5 -0
  283. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js +7 -0
  284. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js.map +1 -0
  285. package/dist/elements/public/ItemCategoryForm/types.d.ts +3 -0
  286. package/dist/elements/public/ItemCategoryForm/types.js +2 -0
  287. package/dist/elements/public/ItemCategoryForm/types.js.map +1 -0
  288. package/dist/elements/public/NucleonElement/API.js +1 -1
  289. package/dist/elements/public/NucleonElement/API.js.map +1 -1
  290. package/dist/elements/public/NucleonElement/NucleonElement.d.ts +6 -4
  291. package/dist/elements/public/NucleonElement/NucleonElement.js +66 -38
  292. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  293. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.d.ts +1 -1
  294. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js +2 -2
  295. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js.map +1 -1
  296. package/dist/elements/public/PaymentsApi/PaymentsApi.d.ts +18 -0
  297. package/dist/elements/public/PaymentsApi/PaymentsApi.js +92 -0
  298. package/dist/elements/public/PaymentsApi/PaymentsApi.js.map +1 -0
  299. package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.d.ts +6 -0
  300. package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.js +95 -0
  301. package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.js.map +1 -0
  302. package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.d.ts +11 -0
  303. package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.js +15 -0
  304. package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.js.map +1 -0
  305. package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.d.ts +10 -0
  306. package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.js +20 -0
  307. package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.js.map +1 -0
  308. package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.d.ts +10 -0
  309. package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.js +39 -0
  310. package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.js.map +1 -0
  311. package/dist/elements/public/PaymentsApi/api/composers/payment_method.d.ts +18 -0
  312. package/dist/elements/public/PaymentsApi/api/composers/payment_method.js +25 -0
  313. package/dist/elements/public/PaymentsApi/api/composers/payment_method.js.map +1 -0
  314. package/dist/elements/public/PaymentsApi/api/composers/payment_methods.d.ts +14 -0
  315. package/dist/elements/public/PaymentsApi/api/composers/payment_methods.js +59 -0
  316. package/dist/elements/public/PaymentsApi/api/composers/payment_methods.js.map +1 -0
  317. package/dist/elements/public/PaymentsApi/api/composers/payment_preset.d.ts +8 -0
  318. package/dist/elements/public/PaymentsApi/api/composers/payment_preset.js +22 -0
  319. package/dist/elements/public/PaymentsApi/api/composers/payment_preset.js.map +1 -0
  320. package/dist/elements/public/PaymentsApi/api/composers/payment_presets.d.ts +8 -0
  321. package/dist/elements/public/PaymentsApi/api/composers/payment_presets.js +36 -0
  322. package/dist/elements/public/PaymentsApi/api/composers/payment_presets.js.map +1 -0
  323. package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.d.ts +12 -0
  324. package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js +34 -0
  325. package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js.map +1 -0
  326. package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.d.ts +16 -0
  327. package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js +44 -0
  328. package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js.map +1 -0
  329. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.d.ts +17 -0
  330. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js +68 -0
  331. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js.map +1 -0
  332. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.d.ts +17 -0
  333. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js +77 -0
  334. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js.map +1 -0
  335. package/dist/elements/public/PaymentsApi/api/handlers/payment_method.d.ts +22 -0
  336. package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js +97 -0
  337. package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js.map +1 -0
  338. package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.d.ts +21 -0
  339. package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js +113 -0
  340. package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js.map +1 -0
  341. package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.d.ts +14 -0
  342. package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js +42 -0
  343. package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js.map +1 -0
  344. package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.d.ts +14 -0
  345. package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js +47 -0
  346. package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js.map +1 -0
  347. package/dist/elements/public/PaymentsApi/api/index.d.ts +11 -0
  348. package/dist/elements/public/PaymentsApi/api/index.js +35 -0
  349. package/dist/elements/public/PaymentsApi/api/index.js.map +1 -0
  350. package/dist/elements/public/PaymentsApi/api/types.d.ts +154 -0
  351. package/dist/elements/public/PaymentsApi/api/types.js +2 -0
  352. package/dist/elements/public/PaymentsApi/api/types.js.map +1 -0
  353. package/dist/elements/public/PaymentsApi/api/utils.d.ts +1 -0
  354. package/dist/elements/public/PaymentsApi/api/utils.js +7 -0
  355. package/dist/elements/public/PaymentsApi/api/utils.js.map +1 -0
  356. package/dist/elements/public/PaymentsApi/index.d.ts +2 -0
  357. package/dist/elements/public/PaymentsApi/index.js +4 -0
  358. package/dist/elements/public/PaymentsApi/index.js.map +1 -0
  359. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.d.ts +14 -0
  360. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js +52 -0
  361. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js.map +1 -0
  362. package/dist/elements/public/PaymentsApiFraudProtectionCard/index.d.ts +4 -0
  363. package/dist/elements/public/PaymentsApiFraudProtectionCard/index.js +6 -0
  364. package/dist/elements/public/PaymentsApiFraudProtectionCard/index.js.map +1 -0
  365. package/dist/elements/public/PaymentsApiFraudProtectionCard/types.d.ts +1 -0
  366. package/dist/elements/public/PaymentsApiFraudProtectionCard/types.js +2 -0
  367. package/dist/elements/public/PaymentsApiFraudProtectionCard/types.js.map +1 -0
  368. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.d.ts +17 -0
  369. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js +217 -0
  370. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js.map +1 -0
  371. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.d.ts +11 -0
  372. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.js +13 -0
  373. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.js.map +1 -0
  374. package/dist/elements/public/PaymentsApiFraudProtectionForm/types.d.ts +3 -0
  375. package/dist/elements/public/PaymentsApiFraudProtectionForm/types.js +2 -0
  376. package/dist/elements/public/PaymentsApiFraudProtectionForm/types.js.map +1 -0
  377. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.d.ts +15 -0
  378. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js +54 -0
  379. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js.map +1 -0
  380. package/dist/elements/public/PaymentsApiPaymentMethodCard/index.d.ts +4 -0
  381. package/dist/elements/public/PaymentsApiPaymentMethodCard/index.js +6 -0
  382. package/dist/elements/public/PaymentsApiPaymentMethodCard/index.js.map +1 -0
  383. package/dist/elements/public/PaymentsApiPaymentMethodCard/types.d.ts +1 -0
  384. package/dist/elements/public/PaymentsApiPaymentMethodCard/types.js +2 -0
  385. package/dist/elements/public/PaymentsApiPaymentMethodCard/types.js.map +1 -0
  386. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.d.ts +20 -0
  387. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +428 -0
  388. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -0
  389. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.d.ts +10 -0
  390. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js +12 -0
  391. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js.map +1 -0
  392. package/dist/elements/public/PaymentsApiPaymentMethodForm/types.d.ts +3 -0
  393. package/dist/elements/public/PaymentsApiPaymentMethodForm/types.js +2 -0
  394. package/dist/elements/public/PaymentsApiPaymentMethodForm/types.js.map +1 -0
  395. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.d.ts +10 -0
  396. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js +31 -0
  397. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js.map +1 -0
  398. package/dist/elements/public/PaymentsApiPaymentPresetCard/index.d.ts +4 -0
  399. package/dist/elements/public/PaymentsApiPaymentPresetCard/index.js +6 -0
  400. package/dist/elements/public/PaymentsApiPaymentPresetCard/index.js.map +1 -0
  401. package/dist/elements/public/PaymentsApiPaymentPresetCard/types.d.ts +1 -0
  402. package/dist/elements/public/PaymentsApiPaymentPresetCard/types.js +2 -0
  403. package/dist/elements/public/PaymentsApiPaymentPresetCard/types.js.map +1 -0
  404. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.d.ts +22 -0
  405. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js +145 -0
  406. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js.map +1 -0
  407. package/dist/elements/public/PaymentsApiPaymentPresetForm/index.d.ts +10 -0
  408. package/dist/elements/public/PaymentsApiPaymentPresetForm/index.js +12 -0
  409. package/dist/elements/public/PaymentsApiPaymentPresetForm/index.js.map +1 -0
  410. package/dist/elements/public/PaymentsApiPaymentPresetForm/types.d.ts +1 -0
  411. package/dist/elements/public/PaymentsApiPaymentPresetForm/types.js +2 -0
  412. package/dist/elements/public/PaymentsApiPaymentPresetForm/types.js.map +1 -0
  413. package/dist/elements/public/QueryBuilder/components/Input.js +10 -8
  414. package/dist/elements/public/QueryBuilder/components/Input.js.map +1 -1
  415. package/dist/elements/public/QueryBuilder/components/RangeValue.js +7 -5
  416. package/dist/elements/public/QueryBuilder/components/RangeValue.js.map +1 -1
  417. package/dist/elements/public/QueryBuilder/components/Select.js +3 -1
  418. package/dist/elements/public/QueryBuilder/components/Select.js.map +1 -1
  419. package/dist/elements/public/ShipmentCard/ShipmentCard.js +1 -1
  420. package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
  421. package/dist/elements/public/ShipmentCard/types.d.ts +2 -16
  422. package/dist/elements/public/ShipmentCard/types.js.map +1 -1
  423. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +3 -3
  424. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +79 -34
  425. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
  426. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js +1 -1
  427. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js.map +1 -1
  428. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js +1 -1
  429. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js.map +1 -1
  430. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +1 -2
  431. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
  432. package/dist/elements/public/TaxCard/TaxCard.d.ts +4 -4
  433. package/dist/elements/public/TaxCard/TaxCard.js +12 -8
  434. package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
  435. package/dist/elements/public/TaxCard/index.d.ts +1 -3
  436. package/dist/elements/public/TaxCard/index.js +1 -3
  437. package/dist/elements/public/TaxCard/index.js.map +1 -1
  438. package/dist/elements/public/index.d.ts +11 -1
  439. package/dist/elements/public/index.defined.d.ts +11 -1
  440. package/dist/elements/public/index.defined.js +11 -1
  441. package/dist/elements/public/index.defined.js.map +1 -1
  442. package/dist/elements/public/index.js +11 -1
  443. package/dist/elements/public/index.js.map +1 -1
  444. package/dist/mixins/configurable.js +16 -8
  445. package/dist/mixins/configurable.js.map +1 -1
  446. package/dist/mixins/inferrable.js +25 -23
  447. package/dist/mixins/inferrable.js.map +1 -1
  448. package/dist/mixins/themeable.js +84 -16
  449. package/dist/mixins/themeable.js.map +1 -1
  450. package/dist/utils/serialize-date.d.ts +1 -0
  451. package/dist/utils/serialize-date.js +7 -0
  452. package/dist/utils/serialize-date.js.map +1 -1
  453. package/package.json +2 -2
  454. package/dist/cdn/foxy-store-shipping-method-card.js +0 -1
  455. package/dist/cdn/shared-2061be9a.js +0 -1
  456. package/dist/cdn/shared-354e0ed8.js +0 -1
  457. package/dist/cdn/shared-45feee83.js +0 -1
  458. package/dist/cdn/shared-4eae0021.js +0 -1
  459. package/dist/cdn/shared-593c3727.js +0 -1
  460. package/dist/cdn/shared-7c977470.js +0 -1
  461. package/dist/cdn/shared-91a28cfe.js +0 -1
  462. package/dist/cdn/shared-92327224.js +0 -15
  463. package/dist/cdn/shared-ac44429d.js +0 -1
  464. package/dist/cdn/shared-b52c7edf.js +0 -64
  465. package/dist/cdn/shared-c73ca2c5.js +0 -1
  466. package/dist/cdn/shared-e144edd2.js +0 -1
  467. package/dist/cdn/shared-e8312a29.js +0 -1
  468. package/dist/cdn/shared-e9a4a204.js +0 -1
  469. package/dist/cdn/shared-fadcb2e1.js +0 -1
  470. package/dist/cdn/translations/store-shipping-method-card/en.json +0 -15
  471. package/dist/elements/public/StoreShippingMethodCard/StoreShippingMethodCard.js +0 -60
  472. package/dist/elements/public/StoreShippingMethodCard/StoreShippingMethodCard.js.map +0 -1
  473. package/dist/elements/public/StoreShippingMethodCard/index.d.ts +0 -6
  474. package/dist/elements/public/StoreShippingMethodCard/index.js +0 -8
  475. package/dist/elements/public/StoreShippingMethodCard/index.js.map +0 -1
  476. package/dist/elements/public/StoreShippingMethodCard/types.d.ts +0 -5
  477. package/dist/elements/public/StoreShippingMethodCard/types.js.map +0 -1
@@ -1 +1 @@
1
- import{_ as t}from"./shared-fadcb2e1.js";import"./shared-d539ee69.js";import{L as e,c as i,h as s}from"./shared-dc73b9a5.js";import{p as r}from"./shared-c73ca2c5.js";import"./shared-fd001fd3.js";import"./shared-8936b109.js";import"./shared-dbdc2a38.js";import{w as a,S as n,y as o}from"./shared-33b47806.js";import"./shared-97654b20.js";import"./shared-354e0ed8.js";import{I as l,D as c}from"./shared-80ca2f70.js";import{E as h}from"./shared-6bcd6831.js";import"./shared-12f8034b.js";import"./shared-32b15545.js";import"./shared-a64ead08.js";import"./shared-c5a638d1.js";import"./shared-4fc53390.js";import{s as d}from"./shared-99940888.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var y;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(y||(y={}));class f extends e{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return t(t({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(y.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(y.Default);this.quantity>1&&this.__insertImage(y.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,y.Previous),e&&(this.__setImageState(e,y.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(y.BeforeEnter),y.Default)):t&&this.__setImageState(t,y.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,y.Default),i=t):(t&&this.__setImageState(t,y.Excluded),i=e),i&&(this.__setImageState(i,y.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(y.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,y.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),i.addEventListener("error",(()=>i.src=f.placeholder)),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}f.placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E';let v,b,w,x,q,I,E,$,C=t=>t;class S extends(n(e)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return t(t({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=C`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=d({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,l,c,h]=this.data;return s(b||(b=C` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,l?s(x||(x=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,c?s(q||(q=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,e,t>102?s(I||(I=C`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s(E||(E=C`<div class="m-auto text-xxxl">+${0}</div>`),t-3),h?s($||($=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,e,i,e)}}let D,k,L=t=>t;class A extends S{static get scopedElements(){return{"x-pic":f}}}class N extends S{static get scopedElements(){return{"x-pic":A}}}class P extends(n(e)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":f,"x-bundle-grid":N}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=d({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(D||(D=L`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(k||(k=L`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class j extends o{static get properties(){return t(t({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let F,T,O,V,M,H,B,Z=t=>t;class R extends j{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=R.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(F||(F=Z`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":h,"x-preview":P,"x-i18n":l}}static get properties(){return t(t({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(T||(T=Z`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(O||(O=Z` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(V||(V=Z` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(M||(M=Z` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(H||(H=Z`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(B||(B=Z` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=R.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return R.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}R.__existingIds=[];let z,Q,W,J,U,X,G=t=>t;class K extends j{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");K.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":h,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":c,"x-item":R}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>K.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>K.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:t=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!K.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return e.filter(K.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(Q||(Q=G` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(W||(W=G` ${0}`),[...this.__data.entries()].map((([t,e])=>s(J||(J=G`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(U||(U=G` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(X||(X=G` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(z||(z=G`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(()=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!K.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(K.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",K),customElements.define("foxy-item",R);export{K as I,P,R as a};
1
+ import{_ as t}from"./shared-a8ced8bf.js";import"./shared-66a0263f.js";import{L as e,c as i,h as s}from"./shared-7f33a83a.js";import{p as r}from"./shared-d9c5e26e.js";import"./shared-0ffa1afb.js";import"./shared-4a2e1638.js";import"./shared-ccb96675.js";import{w as a,S as n,y as o}from"./shared-1c9fd2b1.js";import"./shared-02c6c308.js";import"./shared-164a791e.js";import{I as l,D as c}from"./shared-3214ee1b.js";import{E as h}from"./shared-c566fe52.js";import"./shared-5f751bfc.js";import"./shared-c99a75d8.js";import"./shared-3fd94d2f.js";import"./shared-8dd640bf.js";import"./shared-b1304f5b.js";import{s as d}from"./shared-11c2efc8.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var y;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(y||(y={}));class f extends e{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return t(t({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(y.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(y.Default);this.quantity>1&&this.__insertImage(y.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,y.Previous),e&&(this.__setImageState(e,y.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(y.BeforeEnter),y.Default)):t&&this.__setImageState(t,y.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,y.Default),i=t):(t&&this.__setImageState(t,y.Excluded),i=e),i&&(this.__setImageState(i,y.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(y.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,y.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),i.addEventListener("error",(()=>i.src=f.placeholder)),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}f.placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E';let v,b,w,x,q,I,E,$,C=t=>t;class S extends(n(e)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return t(t({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=C`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=d({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,l,c,h]=this.data;return s(b||(b=C` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,l?s(x||(x=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,c?s(q||(q=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,e,t>102?s(I||(I=C`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s(E||(E=C`<div class="m-auto text-xxxl">+${0}</div>`),t-3),h?s($||($=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,e,i,e)}}let D,k,L=t=>t;class A extends S{static get scopedElements(){return{"x-pic":f}}}class N extends S{static get scopedElements(){return{"x-pic":A}}}class P extends(n(e)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":f,"x-bundle-grid":N}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=d({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(D||(D=L`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(k||(k=L`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class j extends o{static get properties(){return t(t({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let F,T,O,V,M,H,B,Z=t=>t;class R extends j{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=R.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(F||(F=Z`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":h,"x-preview":P,"x-i18n":l}}static get properties(){return t(t({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(T||(T=Z`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(O||(O=Z` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(V||(V=Z` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(M||(M=Z` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(H||(H=Z`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(B||(B=Z` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=R.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return R.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}R.__existingIds=[];let z,Q,W,J,U,X,G=t=>t;class K extends j{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");K.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":h,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":c,"x-item":R}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>K.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>K.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:t=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!K.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return e.filter(K.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(Q||(Q=G` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(W||(W=G` ${0}`),[...this.__data.entries()].map((([t,e])=>s(J||(J=G`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(U||(U=G` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(X||(X=G` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(z||(z=G`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(()=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!K.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(K.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",K),customElements.define("foxy-item",R);export{K as I,P,R as a};
@@ -0,0 +1,318 @@
1
+ import{E as e,C as t,T as r,D as o}from"./shared-4a2e1638.js";import{h as i,G as s,P as a}from"./shared-0ca312eb.js";import"./shared-c99a75d8.js";import{F as n}from"./shared-0ffa1afb.js";import{I as l}from"./shared-39cb3be1.js";import"./shared-d9c5e26e.js";import{_ as d}from"./shared-a8ced8bf.js";import{i as h}from"./shared-d3bf9ac0.js";import{h as c}from"./shared-7f33a83a.js";const u=i`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
2
+ <template>
3
+ <style>
4
+ :host {
5
+ -webkit-tap-highlight-color: transparent;
6
+ -webkit-user-select: none;
7
+ -moz-user-select: none;
8
+ -ms-user-select: none;
9
+ user-select: none;
10
+ cursor: default;
11
+ outline: none;
12
+ }
13
+
14
+ [part="label"]:not([empty]) {
15
+ margin: 0.1875em 0.875em 0.1875em 0.375em;
16
+ }
17
+
18
+ [part="radio"] {
19
+ width: calc(1em + 2px);
20
+ height: calc(1em + 2px);
21
+ margin: 0.1875em;
22
+ position: relative;
23
+ border-radius: 50%;
24
+ background-color: var(--lumo-contrast-20pct);
25
+ transition: transform 0.2s cubic-bezier(.12, .32, .54, 2), background-color 0.15s;
26
+ pointer-events: none;
27
+ will-change: transform;
28
+ line-height: 1.2;
29
+ transform: translateZ(0); /* Workaround IE11 jumpiness */
30
+ }
31
+
32
+ /* Used for activation "halo" */
33
+ [part="radio"]::before {
34
+ /* Needed to align the radio-button nicely on the baseline */
35
+ content: "\\2003";
36
+ color: transparent;
37
+ display: inline-block;
38
+ width: 100%;
39
+ height: 100%;
40
+ border-radius: inherit;
41
+ background-color: inherit;
42
+ transform: scale(1.4);
43
+ opacity: 0;
44
+ transition: transform 0.1s, opacity 0.8s;
45
+ will-change: transform, opacity;
46
+ }
47
+
48
+ /* Used for the dot */
49
+ [part="radio"]::after {
50
+ content: "";
51
+ width: 0;
52
+ height: 0;
53
+ border: 3px solid var(--lumo-primary-contrast-color);
54
+ border-radius: 50%;
55
+ position: absolute;
56
+ top: 50%;
57
+ left: 50%;
58
+ transform: translate(-50%, -50%) scale(0);
59
+ transition: 0.25s transform;
60
+ will-change: transform;
61
+ background-clip: content-box;
62
+ }
63
+
64
+ :host([checked]) [part="radio"] {
65
+ background-color: var(--lumo-primary-color);
66
+ }
67
+
68
+ :host([checked]) [part="radio"]::after {
69
+ transform: translate(-50%, -50%) scale(1);
70
+ }
71
+
72
+ :host(:not([checked]):not([indeterminate]):not([disabled]):hover) [part="radio"] {
73
+ background-color: var(--lumo-contrast-30pct);
74
+ }
75
+
76
+ :host([active]) [part="radio"] {
77
+ transform: scale(0.9);
78
+ transition-duration: 0.05s;
79
+ }
80
+
81
+ :host([active][checked]) [part="radio"] {
82
+ transform: scale(1.1);
83
+ }
84
+
85
+ :host([active]:not([checked])) [part="radio"]::before {
86
+ transition-duration: 0.01s, 0.01s;
87
+ transform: scale(0);
88
+ opacity: 0.4;
89
+ }
90
+
91
+ :host([focus-ring]) [part="radio"] {
92
+ box-shadow: 0 0 0 3px var(--lumo-primary-color-50pct);
93
+ }
94
+
95
+ :host([disabled]) {
96
+ pointer-events: none;
97
+ color: var(--lumo-disabled-text-color);
98
+ }
99
+
100
+ :host([disabled]) ::slotted(*) {
101
+ color: inherit;
102
+ }
103
+
104
+ :host([disabled]) [part="radio"] {
105
+ background-color: var(--lumo-contrast-10pct);
106
+ }
107
+
108
+ :host([disabled]) [part="radio"]::after {
109
+ border-color: var(--lumo-contrast-30pct);
110
+ }
111
+
112
+ /* IE11 only */
113
+ ::-ms-backdrop,
114
+ [part="radio"] {
115
+ line-height: 1;
116
+ }
117
+
118
+ /* RTL specific styles */
119
+
120
+ :host([dir="rtl"]) [part="label"]:not([empty]) {
121
+ margin: 0.1875em 0.375em 0.1875em 0.875em;
122
+ }
123
+ </style>
124
+ </template>
125
+ </dom-module>`;document.head.appendChild(u.content);
126
+ /**
127
+ @license
128
+ Copyright (c) 2017 Vaadin Ltd.
129
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
130
+ */
131
+ class p extends(e(t(r(s(a))))){static get template(){return i`
132
+ <style>
133
+ :host {
134
+ display: inline-block;
135
+ }
136
+
137
+ label {
138
+ display: inline-flex;
139
+ align-items: baseline;
140
+ outline: none;
141
+ }
142
+
143
+ [part="radio"] {
144
+ position: relative;
145
+ display: inline-block;
146
+ flex: none;
147
+ }
148
+
149
+ input[type="radio"] {
150
+ position: absolute;
151
+ top: 0;
152
+ left: 0;
153
+ right: 0;
154
+ width: 100%;
155
+ height: 100%;
156
+ opacity: 0;
157
+ cursor: inherit;
158
+ margin: 0;
159
+ }
160
+
161
+ :host([disabled]) {
162
+ -webkit-tap-highlight-color: transparent;
163
+ }
164
+ </style>
165
+
166
+ <label>
167
+ <span part="radio">
168
+ <input type="radio" checked="[[checked]]" disabled\$="[[disabled]]" role="presentation" on-change="_onChange" tabindex="-1">
169
+ </span>
170
+
171
+ <span part="label">
172
+ <slot></slot>
173
+ </span>
174
+ </label>
175
+ `}static get is(){return"vaadin-radio-button"}static get version(){return"1.5.4"}static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,observer:"_checkedChanged",reflectToAttribute:!0},name:String,value:{type:String,value:"on"}}}get name(){return this.checked?this._storedName:""}set name(e){this._storedName=e}attributeChangedCallback(e,t,r){if(super.attributeChangedCallback(e,t,r),/^(disabled|checked)$/.test(e)){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&this.shadowRoot&&parseInt(navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1],10)){const e="-webkit-backface-visibility";this.shadowRoot.querySelectorAll("*").forEach((t=>{t.style[e]="visible",t.style[e]=""}))}}}ready(){super.ready(),this.setAttribute("role","radio"),this._addListeners();const e=this.getAttribute("name");e&&(this.name=e),this.shadowRoot.querySelector('[part~="label"]').querySelector("slot").addEventListener("slotchange",this._updateLabelAttribute.bind(this)),this._updateLabelAttribute()}_updateLabelAttribute(){const e=this.shadowRoot.querySelector('[part~="label"]'),t=e.firstElementChild.assignedNodes();this._isAssignedNodesEmpty(t)?e.setAttribute("empty",""):e.removeAttribute("empty")}_isAssignedNodesEmpty(e){return 0===e.length||1==e.length&&e[0].nodeType==Node.TEXT_NODE&&""===e[0].textContent.trim()}_checkedChanged(e){this.setAttribute("aria-checked",e)}_addListeners(){this._addEventListenerToNode(this,"down",(e=>{this.disabled||this.setAttribute("active","")})),this._addEventListenerToNode(this,"up",(e=>{this.removeAttribute("active"),this.checked||this.disabled||this.click()})),this.addEventListener("keydown",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.setAttribute("active",""))})),this.addEventListener("keyup",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.click(),this.removeAttribute("active"))}))}click(){this.disabled||this.shadowRoot.querySelector("input").dispatchEvent(new MouseEvent("click"))}get focusElement(){return this.shadowRoot.querySelector("input")}_onChange(e){this.checked=e.target.checked;const t=new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable});this.dispatchEvent(t)}}customElements.define(p.is,p);const b=i`<dom-module id="lumo-radio-group" theme-for="vaadin-radio-group">
176
+ <template>
177
+ <style include="lumo-required-field">
178
+ :host {
179
+ color: var(--lumo-body-text-color);
180
+ font-size: var(--lumo-font-size-m);
181
+ font-family: var(--lumo-font-family);
182
+ -webkit-font-smoothing: antialiased;
183
+ -moz-osx-font-smoothing: grayscale;
184
+ -webkit-tap-highlight-color: transparent;
185
+ padding: var(--lumo-space-xs) 0;
186
+ }
187
+
188
+ :host::before {
189
+ height: var(--lumo-size-m);
190
+ box-sizing: border-box;
191
+ display: inline-flex;
192
+ align-items: center;
193
+ }
194
+
195
+ :host([theme~="vertical"]) [part="group-field"] {
196
+ display: flex;
197
+ flex-direction: column;
198
+ }
199
+
200
+ [part="label"] {
201
+ padding-bottom: 0.7em;
202
+ }
203
+
204
+ :host([focused]:not([readonly])) [part="label"] {
205
+ color: var(--lumo-primary-text-color);
206
+ }
207
+
208
+ :host(:hover:not([readonly]):not([focused])) [part="label"],
209
+ :host(:hover:not([readonly])) [part="helper-text"],
210
+ :host(:hover:not([readonly])) [part="helper-text"] ::slotted(*) {
211
+ color: var(--lumo-body-text-color);
212
+ }
213
+
214
+ :host([has-helper]) [part="helper-text"]::before {
215
+ content: "";
216
+ display: block;
217
+ height: 0.4em;
218
+ }
219
+
220
+ [part="helper-text"],
221
+ [part="helper-text"] ::slotted(*) {
222
+ display: block;
223
+ color: var(--lumo-secondary-text-color);
224
+ font-size: var(--lumo-font-size-xs);
225
+ line-height: var(--lumo-line-height-xs);
226
+ margin-left: calc(var(--lumo-border-radius-m) / 4);
227
+ transition: color 0.2s;
228
+ }
229
+
230
+ /* helper-text position */
231
+
232
+ :host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::before {
233
+ display: none;
234
+ }
235
+
236
+ :host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::after {
237
+ content: "";
238
+ display: block;
239
+ height: 0.4em;
240
+ }
241
+
242
+ :host([has-helper][theme~="helper-above-field"]) [part="label"] {
243
+ order: 0;
244
+ padding-bottom: 0.4em;
245
+ }
246
+
247
+ :host([has-helper][theme~="helper-above-field"]) [part="helper-text"] {
248
+ order: 1;
249
+ }
250
+
251
+ :host([has-helper][theme~="helper-above-field"]) [part="group-field"] {
252
+ order: 2;
253
+ }
254
+
255
+ :host([has-helper][theme~="helper-above-field"]) [part="error-message"] {
256
+ order: 3;
257
+ }
258
+
259
+ /* Touch device adjustment */
260
+ @media (pointer: coarse) {
261
+ :host(:hover:not([readonly]):not([focused])) [part="label"] {
262
+ color: var(--lumo-secondary-text-color);
263
+ }
264
+ }
265
+ </style>
266
+ </template>
267
+ </dom-module>`;document.head.appendChild(b.content);
268
+ /**
269
+ @license
270
+ Copyright (c) 2017 Vaadin Ltd.
271
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
272
+ */
273
+ class m extends(r(o(a))){static get template(){return i`
274
+ <style>
275
+ :host {
276
+ display: inline-flex;
277
+
278
+ /* Prevent horizontal overflow in IE 11 instead of wrapping radios */
279
+ max-width: 100%;
280
+ }
281
+
282
+ :host::before {
283
+ content: "\\2003";
284
+ width: 0;
285
+ display: inline-block;
286
+ }
287
+
288
+ :host([hidden]) {
289
+ display: none !important;
290
+ }
291
+
292
+ .vaadin-group-field-container {
293
+ display: flex;
294
+ flex-direction: column;
295
+
296
+ /* Prevent horizontal overflow in IE 11 instead of wrapping radios */
297
+ width: 100%;
298
+ }
299
+
300
+ [part="label"]:empty {
301
+ display: none;
302
+ }
303
+ </style>
304
+
305
+ <div class="vaadin-group-field-container">
306
+ <label part="label">[[label]]</label>
307
+
308
+ <div part="group-field">
309
+ <slot id="slot"></slot>
310
+ </div>
311
+
312
+ <div part="helper-text" id="[[_helperTextId]]" aria-live="assertive" aria-hidden\$="[[_getHelperTextAriaHidden(helperText, _helperTextId, _hasSlottedHelper)]]">
313
+ <slot name="helper">[[helperText]]</slot>
314
+ </div>
315
+
316
+ <div part="error-message" id="[[_errorId]]" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage, _errorId)]]">[[errorMessage]]</div>
317
+ </div>
318
+ `}static get is(){return"vaadin-radio-group"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,observer:"_disabledChanged"},readonly:{type:Boolean,reflectToAttribute:!0,observer:"_readonlyChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0},errorMessage:{type:String,value:"",observer:"_errorMessageChanged"},_errorId:{type:String},_helperTextId:{type:String},_hasSlottedHelper:Boolean,_checkedButton:{type:Object},label:{type:String,value:"",observer:"_labelChanged"},helperText:{type:String,value:"",observer:"_helperTextChanged"},value:{type:String,notify:!0,observer:"_valueChanged"}}}ready(){super.ready(),this._addListeners(),this._observer=new n(this,(e=>{const t=e=>{e.target.checked&&this._changeSelectedButton(e.target)};this._filterRadioButtons(e.addedNodes).reverse().forEach((e=>{e.addEventListener("checked-changed",t),this.disabled&&(e.disabled=!0),e.checked&&this._changeSelectedButton(e)})),this._filterRadioButtons(e.removedNodes).forEach((e=>{e.removeEventListener("checked-changed",t),e==this._checkedButton&&(this.value=void 0)})),this._setOrToggleHasHelperAttribute()})),this._radioButtons.length&&this._setFocusable(0),this.setAttribute("role","radiogroup");const e=m._uniqueId=1+m._uniqueId||0;this._errorId=`${this.constructor.is}-error-${e}`,this._helperTextId=`${this.constructor.is}-helper-${e}`}get _radioButtons(){return this._filterRadioButtons(this.querySelectorAll("*"))}_setFocused(e){e?this.setAttribute("focused",""):this.removeAttribute("focused")}_filterRadioButtons(e){return Array.from(e).filter((e=>e instanceof p))}_disabledChanged(e){this.setAttribute("aria-disabled",e),this._updateDisableButtons()}_updateDisableButtons(){this._radioButtons.forEach((e=>{this.disabled?e.disabled=!0:this.readonly?e.disabled=e!==this._checkedButton&&this.readonly:e.disabled=!1}))}_readonlyChanged(e,t){(e||t)&&this._updateDisableButtons()}_addListeners(){this.addEventListener("keydown",(e=>{var t=e.target==this?this._checkedButton:e.target;const r="rtl"===this.getAttribute("dir")&&"vertical"!==this.theme;37!==e.keyCode&&38!==e.keyCode||(e.preventDefault(),this._selectIncButton(r,t)),39!==e.keyCode&&40!==e.keyCode||(e.preventDefault(),this._selectIncButton(!r,t))})),this.addEventListener("focusin",(()=>this._setFocused(this._containsFocus()))),this.addEventListener("focusout",(e=>{e.composed&&this.validate(),this._setFocused(!1)}))}_selectIncButton(e,t){e?this._selectNextButton(t):this._selectPreviousButton(t)}_selectButton(e,t){this._containsFocus()&&(e.focus(),t&&e.setAttribute("focus-ring","")),this._changeSelectedButton(e,t)}_containsFocus(){const e=this.getRootNode(),t=void 0!==e._activeElement?e._activeElement:e.activeElement;return this.contains(t)}_hasEnabledButtons(){return!this._radioButtons.every((e=>e.disabled))}_selectNextButton(e){if(this._hasEnabledButtons()){var t=e.nextElementSibling||this.firstElementChild;t.disabled?this._selectNextButton(t):this._selectButton(t,!0)}}_selectPreviousButton(e){if(this._hasEnabledButtons()){var t=e.previousElementSibling||this.lastElementChild;t.disabled?this._selectPreviousButton(t):this._selectButton(t,!0)}}_changeSelectedButton(e,t){this._checkedButton!==e&&(this._checkedButton=e,this._checkedButton&&(this.value=this._checkedButton.value),this._radioButtons.forEach((e=>{e===this._checkedButton?t?e.click():e.checked=!0:e.checked=!1})),this.validate(),this.readonly&&this._updateDisableButtons(),e&&this._setFocusable(this._radioButtons.indexOf(e)))}_valueChanged(e,t){if(t&&(""===e||null==e))return this._changeSelectedButton(null),void this.removeAttribute("has-value");if(!this._checkedButton||e!=this._checkedButton.value){const t=this._radioButtons.filter((t=>t.value==e))[0];this._selectButton(t)}this._checkedButton?this.setAttribute("has-value",""):console.warn(`No <vaadin-radio-button> with value ${e} found.`)}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){return!this.required||!!this.value}_setFocusable(e){const t=this._radioButtons;t.forEach((r=>r.tabindex=r===t[e]?0:-1))}_labelChanged(e){this._setOrToggleAttribute("has-label",!!e)}_errorMessageChanged(e){this._setOrToggleAttribute("has-error-message",!!e)}_helperTextChanged(e){this._setOrToggleAttribute("has-helper",!!e)}_setOrToggleAttribute(e,t){e&&(t?this.setAttribute(e,"boolean"==typeof t?"":t):this.removeAttribute(e))}_setOrToggleHasHelperAttribute(){const e=this.shadowRoot.querySelector('[name="helper"]').assignedNodes();this._hasSlottedHelper=e.filter((e=>3!==e.nodeType)).length>0,this._setOrToggleAttribute("has-helper",this._hasSlottedHelper?"slotted":!!this.helperText)}_getActiveErrorId(e,t,r){return t&&e?r:void 0}_getErrorMessageAriaHidden(e,t,r){return(!this._getActiveErrorId(e,t,r)).toString()}_getHelperTextAriaHidden(e,t,r){return(!(e||r)).toString()}}customElements.define(m.is,m);let v,g,f=e=>e;customElements.define("foxy-internal-radio-group-control",class extends l{constructor(){super(...arguments),this.options=[],this.theme=null}static get properties(){return d(d({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){var e;return c(v||(v=f` <vaadin-radio-group error-message="${0}" helper-text="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" .checkValidity="${0}" .value="${0}" @change="${0}"> ${0} </vaadin-radio-group> `),h(this._errorMessage),this.helperText,this.label,h(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled||this.readonly,this._checkValidity,this._value,(e=>{const t=e.currentTarget;this._value=t.value}),this.options.map((e=>c(g||(g=f` <vaadin-radio-button value="${0}"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </vaadin-radio-button> `),e.value,e.label))))}});
@@ -0,0 +1 @@
1
+ import"./shared-c99a75d8.js";import{I as e}from"./shared-39cb3be1.js";import{i as t}from"./shared-d3bf9ac0.js";import{h as r}from"./shared-7f33a83a.js";let a,l=e=>e;customElements.define("foxy-internal-text-control",class extends e{renderControl(){return r(a||(a=l` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" clear-button-visible .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> `),t(this._errorMessage),this.helperText,this.placeholder,this.label,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});