@foxy.io/elements 1.20.2 → 1.21.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (877) hide show
  1. package/README.md +6 -1
  2. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  3. package/dist/cdn/foxy-address-card.js +2 -2
  4. package/dist/cdn/foxy-address-form.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-card.js +1 -0
  6. package/dist/cdn/foxy-api-browser.js +3 -3
  7. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -0
  8. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -0
  9. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-form.js +1 -1
  12. package/dist/cdn/foxy-cancellation-form.js +1 -1
  13. package/dist/cdn/foxy-cart-card.js +1 -0
  14. package/dist/cdn/foxy-cart-form.js +1 -0
  15. package/dist/cdn/foxy-collection-page.js +1 -1
  16. package/dist/cdn/foxy-collection-pages.js +1 -1
  17. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  18. package/dist/cdn/foxy-coupon-card.js +1 -1
  19. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  20. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  21. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  22. package/dist/cdn/foxy-coupon-form.js +1 -1
  23. package/dist/cdn/foxy-custom-field-card.js +1 -1
  24. package/dist/cdn/foxy-custom-field-form.js +1 -1
  25. package/dist/cdn/foxy-customer-api.js +1 -1
  26. package/dist/cdn/foxy-customer-card.js +1 -1
  27. package/dist/cdn/foxy-customer-form.js +1 -1
  28. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  29. package/dist/cdn/foxy-customer-portal.js +16 -15
  30. package/dist/cdn/foxy-customer.js +5 -5
  31. package/dist/cdn/foxy-customers-table.js +1 -1
  32. package/dist/cdn/foxy-discount-builder.js +1 -1
  33. package/dist/cdn/foxy-discount-card.js +1 -1
  34. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  35. package/dist/cdn/foxy-donation.js +1 -1
  36. package/dist/cdn/foxy-email-template-card.js +1 -0
  37. package/dist/cdn/foxy-email-template-form.js +1 -1
  38. package/dist/cdn/foxy-error-entry-card.js +1 -1
  39. package/dist/cdn/foxy-form-dialog.js +1 -1
  40. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  41. package/dist/cdn/foxy-gift-card-card.js +1 -1
  42. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  43. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -0
  44. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  45. package/dist/cdn/foxy-gift-card-form.js +1 -1
  46. package/dist/cdn/foxy-i18n-editor.js +2 -0
  47. package/dist/cdn/foxy-i18n.js +1 -1
  48. package/dist/cdn/foxy-integration-card.js +1 -0
  49. package/dist/cdn/foxy-integration-form.js +1 -0
  50. package/dist/cdn/foxy-item-card.js +1 -1
  51. package/dist/cdn/foxy-item-category-card.js +1 -0
  52. package/dist/cdn/foxy-item-category-form.js +1 -0
  53. package/dist/cdn/foxy-item-form.js +1 -1
  54. package/dist/cdn/foxy-item-option-card.js +1 -1
  55. package/dist/cdn/foxy-item-option-form.js +1 -1
  56. package/dist/cdn/foxy-items-form.js +1 -1
  57. package/dist/cdn/foxy-nucleon-element.js +1 -1
  58. package/dist/cdn/foxy-pagination.js +1 -1
  59. package/dist/cdn/foxy-payment-card.js +1 -1
  60. package/dist/cdn/foxy-payment-method-card.js +1 -1
  61. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -0
  62. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -0
  63. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -0
  64. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -0
  65. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -0
  66. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -0
  67. package/dist/cdn/foxy-payments-api.js +1 -0
  68. package/dist/cdn/foxy-query-builder.js +1 -1
  69. package/dist/cdn/foxy-report-form.js +14 -14
  70. package/dist/cdn/foxy-reports-table.js +3 -3
  71. package/dist/cdn/foxy-shipment-card.js +1 -1
  72. package/dist/cdn/foxy-shipping-method-card.js +1 -0
  73. package/dist/cdn/foxy-sign-in-form.js +1 -1
  74. package/dist/cdn/foxy-spinner.js +2 -2
  75. package/dist/cdn/foxy-store-form.js +1 -0
  76. package/dist/cdn/foxy-store-shipping-method-form.js +1 -0
  77. package/dist/cdn/foxy-subscription-card.js +1 -1
  78. package/dist/cdn/foxy-subscription-form.js +4 -16
  79. package/dist/cdn/foxy-subscription-settings-form.js +1 -0
  80. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  81. package/dist/cdn/foxy-swipe-actions.js +1 -1
  82. package/dist/cdn/foxy-table.js +1 -1
  83. package/dist/cdn/foxy-tax-card.js +1 -1
  84. package/dist/cdn/foxy-tax-form.js +1 -1
  85. package/dist/cdn/foxy-template-config-form.js +1 -1
  86. package/dist/cdn/foxy-template-form.js +1 -1
  87. package/dist/cdn/foxy-template-set-card.js +1 -0
  88. package/dist/cdn/foxy-template-set-form.js +1 -0
  89. package/dist/cdn/foxy-transaction-card.js +1 -1
  90. package/dist/cdn/foxy-transaction.js +1 -1
  91. package/dist/cdn/foxy-transactions-table.js +60 -1
  92. package/dist/cdn/foxy-user-form.js +1 -1
  93. package/dist/cdn/foxy-users-table.js +1 -1
  94. package/dist/cdn/foxy-webhook-card.js +1 -1
  95. package/dist/cdn/foxy-webhook-form.js +1 -318
  96. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  97. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  98. package/dist/cdn/{shared-e1c1e8e2.js → shared-0479553e.js} +1 -1
  99. package/dist/cdn/{shared-d28ac9dc.js → shared-08156595.js} +5 -5
  100. package/dist/cdn/shared-0821cfdc.js +1 -0
  101. package/dist/cdn/shared-08e27fe9.js +25 -0
  102. package/dist/cdn/shared-09eb558f.js +1 -0
  103. package/dist/cdn/{shared-ae415a98.js → shared-0ce006b9.js} +1 -1
  104. package/dist/cdn/shared-1000b848.js +1 -0
  105. package/dist/cdn/{shared-ce24fef8.js → shared-101d1234.js} +13 -18
  106. package/dist/cdn/{shared-99940888.js → shared-11c2efc8.js} +1 -1
  107. package/dist/cdn/shared-181f51bd.js +1 -0
  108. package/dist/cdn/shared-1c94a156.js +1 -0
  109. package/dist/cdn/{shared-8e9a3bbb.js → shared-2092d86f.js} +1 -1
  110. package/dist/cdn/shared-21679ebd.js +1 -0
  111. package/dist/cdn/shared-2add595d.js +150 -0
  112. package/dist/cdn/shared-2cc638ad.js +29 -0
  113. package/dist/cdn/{shared-1ba08bcc.js → shared-2f7dcefa.js} +1 -1
  114. package/dist/cdn/shared-39c10b22.js +1 -0
  115. package/dist/cdn/shared-404aa9cc.js +6 -0
  116. package/dist/cdn/{shared-b791079c.js → shared-4393ad93.js} +5 -5
  117. package/dist/cdn/shared-43bcce74.js +1 -0
  118. package/dist/cdn/shared-4849ef5b.js +169 -0
  119. package/dist/cdn/shared-486d7bb5.js +1 -0
  120. package/dist/cdn/shared-4979dca4.js +1 -0
  121. package/dist/cdn/shared-4f037e43.js +1 -0
  122. package/dist/cdn/{shared-dd6d3c18.js → shared-5378bd8c.js} +1 -1
  123. package/dist/cdn/{shared-31c43743.js → shared-5a4829e3.js} +1 -1
  124. package/dist/cdn/shared-5ea18e60.js +1 -0
  125. package/dist/cdn/shared-62a54a6c.js +1 -0
  126. package/dist/cdn/{shared-2188d5f7.js → shared-62c088b7.js} +1 -1
  127. package/dist/cdn/shared-63139d9e.js +1 -0
  128. package/dist/cdn/shared-639c666f.js +553 -0
  129. package/dist/cdn/shared-6581241a.js +1 -0
  130. package/dist/cdn/{shared-a052131e.js → shared-6cb1015f.js} +27 -51
  131. package/dist/cdn/{shared-8d937ae4.js → shared-71d8d167.js} +3 -3
  132. package/dist/cdn/shared-71f2ef1f.js +1 -0
  133. package/dist/cdn/shared-744cf66b.js +64 -0
  134. package/dist/cdn/{shared-1bbd9b73.js → shared-75e78c70.js} +1 -1
  135. package/dist/cdn/{shared-c87447a4.js → shared-76b3d76a.js} +2 -2
  136. package/dist/cdn/{shared-dc23b751.js → shared-7d4fb1a2.js} +1 -1
  137. package/dist/cdn/{shared-dc73b9a5.js → shared-7f33a83a.js} +1 -1
  138. package/dist/cdn/shared-80fc2b6a.js +1 -0
  139. package/dist/cdn/{shared-3b2dedf9.js → shared-83596b46.js} +3 -3
  140. package/dist/cdn/shared-839dd3a8.js +1 -0
  141. package/dist/cdn/shared-868065de.js +1 -0
  142. package/dist/cdn/{shared-d699348f.js → shared-88c4cfec.js} +2 -2
  143. package/dist/cdn/shared-8b6addec.js +1 -0
  144. package/dist/cdn/{shared-0b65fb12.js → shared-8dd0af4d.js} +1 -1
  145. package/dist/cdn/shared-988ec916.js +1 -0
  146. package/dist/cdn/{shared-0eb966c5.js → shared-99065f2a.js} +1 -1
  147. package/dist/cdn/shared-9bdacf65.js +1 -0
  148. package/dist/cdn/{shared-f1317609.js → shared-9f436277.js} +1 -1
  149. package/dist/cdn/shared-a0c8faf2.js +1 -0
  150. package/dist/cdn/shared-a37abe4c.js +318 -0
  151. package/dist/cdn/{shared-86d93838.js → shared-a41234b4.js} +15 -15
  152. package/dist/cdn/shared-a85afa33.js +1 -0
  153. package/dist/cdn/shared-a8ced8bf.js +1 -0
  154. package/dist/cdn/shared-af226a9a.js +1 -0
  155. package/dist/cdn/shared-b40cf0dd.js +1 -0
  156. package/dist/cdn/shared-bb0e33c3.js +1 -0
  157. package/dist/cdn/shared-bc7f58ef.js +1 -0
  158. package/dist/cdn/{shared-c5c60417.js → shared-bc814810.js} +1 -1
  159. package/dist/cdn/shared-bcc6e13b.js +1 -0
  160. package/dist/cdn/{shared-4e201e09.js → shared-bd252323.js} +1 -1
  161. package/dist/cdn/{shared-195fd5af.js → shared-be66c2e7.js} +1 -1
  162. package/dist/cdn/shared-c774d080.js +1 -0
  163. package/dist/cdn/shared-c95c17e6.js +1 -0
  164. package/dist/cdn/shared-cba08e1c.js +1 -0
  165. package/dist/cdn/{shared-9803aa7c.js → shared-d3bf9ac0.js} +2 -2
  166. package/dist/cdn/shared-d518bd55.js +1 -0
  167. package/dist/cdn/{shared-a0c6a159.js → shared-d519a301.js} +2 -2
  168. package/dist/cdn/shared-d61b3e4f.js +1 -0
  169. package/dist/cdn/shared-d6276c83.js +1 -0
  170. package/dist/cdn/shared-d8dc97f0.js +1 -0
  171. package/dist/cdn/{shared-6cc99375.js → shared-de036570.js} +1 -1
  172. package/dist/cdn/{shared-f9f9ed5b.js → shared-e6f3e9f0.js} +1 -1
  173. package/dist/cdn/{shared-ca05dcb3.js → shared-ea67b3f3.js} +1 -1
  174. package/dist/cdn/shared-ed0dee03.js +134 -0
  175. package/dist/cdn/{shared-22ba9566.js → shared-f3b35364.js} +1 -1
  176. package/dist/cdn/shared-f7e4cd67.js +1 -0
  177. package/dist/cdn/{shared-321572bc.js → shared-f80f402a.js} +1 -1
  178. package/dist/cdn/translations/admin-subscription-card/en.json +27 -0
  179. package/dist/cdn/translations/api-browser/en.json +1 -0
  180. package/dist/cdn/translations/applied-coupon-code-card/en.json +7 -0
  181. package/dist/cdn/translations/applied-coupon-code-form/en.json +26 -0
  182. package/dist/cdn/translations/cart-card/en.json +15 -0
  183. package/dist/cdn/translations/cart-form/en.json +762 -0
  184. package/dist/cdn/translations/country/{zh-CN.json → zh-cn.json} +0 -0
  185. package/dist/cdn/translations/country/{zh-HK.json → zh-hk.json} +0 -0
  186. package/dist/cdn/translations/coupon-card/en.json +2 -2
  187. package/dist/cdn/translations/customer/en.json +2 -2
  188. package/dist/cdn/translations/customer-portal/de.json +1 -1
  189. package/dist/cdn/translations/customer-portal/en.json +10 -10
  190. package/dist/cdn/translations/customer-portal/es.json +1 -1
  191. package/dist/cdn/translations/customer-portal/fr.json +2 -2
  192. package/dist/cdn/translations/customer-portal/nl.json +1 -1
  193. package/dist/cdn/translations/customer-portal/pl.json +1 -1
  194. package/dist/cdn/translations/customer-portal/se.json +1 -1
  195. package/dist/cdn/translations/email-template-card/en.json +12 -0
  196. package/dist/cdn/translations/email-template-form/en.json +10 -0
  197. package/dist/cdn/translations/gift-card-code-form/en.json +35 -0
  198. package/dist/cdn/translations/gift-card-code-log-card/en.json +13 -0
  199. package/dist/cdn/translations/gift-card-form/en.json +58 -1
  200. package/dist/cdn/translations/i18n-editor/en.json +10 -0
  201. package/dist/cdn/translations/integration-card/en.json +10 -0
  202. package/dist/cdn/translations/integration-form/en.json +39 -0
  203. package/dist/cdn/translations/item-category-card/en.json +7 -0
  204. package/dist/cdn/translations/item-category-form/en.json +196 -0
  205. package/dist/cdn/translations/item-form/en.json +1 -1
  206. package/dist/cdn/translations/payments-api-fraud-protection-card/en.json +8 -0
  207. package/dist/cdn/translations/payments-api-fraud-protection-form/en.json +34 -0
  208. package/dist/cdn/translations/payments-api-payment-method-card/en.json +8 -0
  209. package/dist/cdn/translations/payments-api-payment-method-form/en.json +61 -0
  210. package/dist/cdn/translations/payments-api-payment-preset-card/en.json +9 -0
  211. package/dist/cdn/translations/payments-api-payment-preset-form/en.json +84 -0
  212. package/dist/cdn/translations/shipment-card/en.json +1 -1
  213. package/dist/cdn/translations/shipping-method-card/en.json +9 -0
  214. package/dist/cdn/translations/store-form/en.json +316 -0
  215. package/dist/cdn/translations/store-shipping-method-form/en.json +90 -0
  216. package/dist/cdn/translations/subscription-form/en.json +116 -21
  217. package/dist/cdn/translations/subscription-settings-form/en.json +92 -0
  218. package/dist/cdn/translations/template-set-card/en.json +7 -0
  219. package/dist/cdn/translations/template-set-form/en.json +60 -0
  220. package/dist/cdn/translations/transaction/en.json +3 -3
  221. package/dist/cdn/translations/transaction-card/en.json +1 -1
  222. package/dist/cdn/translations/transactions-table/en.json +1 -1
  223. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts +6 -0
  224. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +40 -13
  225. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
  226. package/dist/elements/internal/InternalAsyncDetailsControl/InternalAsyncDetailsControl.js +3 -1
  227. package/dist/elements/internal/InternalAsyncDetailsControl/InternalAsyncDetailsControl.js.map +1 -1
  228. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +33 -0
  229. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +209 -0
  230. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -0
  231. package/dist/elements/internal/InternalAsyncListControl/index.d.ts +12 -0
  232. package/dist/elements/internal/InternalAsyncListControl/index.js +14 -0
  233. package/dist/elements/internal/InternalAsyncListControl/index.js.map +1 -0
  234. package/dist/elements/internal/InternalCard/InternalCard.d.ts +1 -0
  235. package/dist/elements/internal/InternalCard/InternalCard.js +12 -4
  236. package/dist/elements/internal/InternalCard/InternalCard.js.map +1 -1
  237. package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.d.ts +17 -0
  238. package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js +57 -0
  239. package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js.map +1 -0
  240. package/dist/elements/internal/InternalCheckboxGroupControl/index.d.ts +6 -0
  241. package/dist/elements/internal/InternalCheckboxGroupControl/index.js +8 -0
  242. package/dist/elements/internal/InternalCheckboxGroupControl/index.js.map +1 -0
  243. package/dist/elements/internal/InternalCheckboxGroupControl/types.d.ts +6 -0
  244. package/dist/elements/internal/InternalCheckboxGroupControl/types.js +2 -0
  245. package/dist/elements/internal/InternalCheckboxGroupControl/types.js.map +1 -0
  246. package/dist/elements/internal/InternalControl/InternalControl.js +2 -1
  247. package/dist/elements/internal/InternalControl/InternalControl.js.map +1 -1
  248. package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js +1 -1
  249. package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js.map +1 -1
  250. package/dist/elements/internal/InternalDetails/InternalDetails.js +3 -3
  251. package/dist/elements/internal/InternalDetails/InternalDetails.js.map +1 -1
  252. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.d.ts +3 -0
  253. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +24 -4
  254. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -1
  255. package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.d.ts +12 -0
  256. package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js +152 -0
  257. package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js.map +1 -0
  258. package/dist/elements/internal/InternalEditableListControl/index.d.ts +3 -0
  259. package/dist/elements/internal/InternalEditableListControl/index.js +5 -0
  260. package/dist/elements/internal/InternalEditableListControl/index.js.map +1 -0
  261. package/dist/elements/internal/InternalEditableListControl/types.d.ts +9 -0
  262. package/dist/elements/internal/InternalEditableListControl/types.js +2 -0
  263. package/dist/elements/internal/InternalEditableListControl/types.js.map +1 -0
  264. package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.d.ts +6 -1
  265. package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +27 -13
  266. package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -1
  267. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.d.ts +6 -1
  268. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +22 -1
  269. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
  270. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.d.ts +6 -1
  271. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +22 -1
  272. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
  273. package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.d.ts +13 -0
  274. package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js +40 -0
  275. package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js.map +1 -0
  276. package/dist/elements/internal/InternalPasswordControl/index.d.ts +4 -0
  277. package/dist/elements/internal/InternalPasswordControl/index.js +6 -0
  278. package/dist/elements/internal/InternalPasswordControl/index.js.map +1 -0
  279. package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js +32 -4
  280. package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js.map +1 -1
  281. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +18 -0
  282. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +61 -0
  283. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -0
  284. package/dist/elements/internal/InternalSelectControl/index.d.ts +5 -0
  285. package/dist/elements/internal/InternalSelectControl/index.js +7 -0
  286. package/dist/elements/internal/InternalSelectControl/index.js.map +1 -0
  287. package/dist/elements/internal/InternalSelectControl/types.d.ts +6 -0
  288. package/dist/elements/internal/InternalSelectControl/types.js +2 -0
  289. package/dist/elements/internal/InternalSelectControl/types.js.map +1 -0
  290. package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.d.ts +13 -0
  291. package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.js +40 -0
  292. package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.js.map +1 -0
  293. package/dist/elements/internal/InternalTextAreaControl/index.d.ts +4 -0
  294. package/dist/elements/internal/InternalTextAreaControl/index.js +6 -0
  295. package/dist/elements/internal/InternalTextAreaControl/index.js.map +1 -0
  296. package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +4 -1
  297. package/dist/elements/internal/InternalTextControl/InternalTextControl.js +15 -0
  298. package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
  299. package/dist/elements/private/Dialog/Dialog.d.ts +2 -0
  300. package/dist/elements/private/Dialog/Dialog.js +7 -1
  301. package/dist/elements/private/Dialog/Dialog.js.map +1 -1
  302. package/dist/elements/private/Group/Group.js +1 -1
  303. package/dist/elements/private/Group/Group.js.map +1 -1
  304. package/dist/elements/private/I18N/I18N.js +3 -0
  305. package/dist/elements/private/I18N/I18N.js.map +1 -1
  306. package/dist/elements/private/Switch/Switch.js +1 -1
  307. package/dist/elements/private/Switch/Switch.js.map +1 -1
  308. package/dist/elements/private/Warning/Warning.js +1 -3
  309. package/dist/elements/private/Warning/Warning.js.map +1 -1
  310. package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js +5 -5
  311. package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js.map +1 -1
  312. package/dist/elements/public/AddressForm/AddressForm.js +1 -1
  313. package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
  314. package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.d.ts +52 -0
  315. package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.js +316 -0
  316. package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.js.map +1 -0
  317. package/dist/elements/public/AdminSubscriptionCard/index.d.ts +5 -0
  318. package/dist/elements/public/AdminSubscriptionCard/index.js +7 -0
  319. package/dist/elements/public/AdminSubscriptionCard/index.js.map +1 -0
  320. package/dist/elements/public/AdminSubscriptionCard/types.d.ts +9 -0
  321. package/dist/elements/public/AdminSubscriptionCard/types.js +2 -0
  322. package/dist/elements/public/AdminSubscriptionCard/types.js.map +1 -0
  323. package/dist/elements/public/ApiBrowser/ApiBrowser.d.ts +2 -1
  324. package/dist/elements/public/ApiBrowser/ApiBrowser.js +38 -15
  325. package/dist/elements/public/ApiBrowser/ApiBrowser.js.map +1 -1
  326. package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.d.ts +20 -0
  327. package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.js +47 -0
  328. package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.js.map +1 -0
  329. package/dist/elements/public/AppliedCouponCodeCard/index.d.ts +4 -0
  330. package/dist/elements/public/AppliedCouponCodeCard/index.js +6 -0
  331. package/dist/elements/public/AppliedCouponCodeCard/index.js.map +1 -0
  332. package/dist/elements/public/AppliedCouponCodeCard/types.d.ts +3 -0
  333. package/dist/elements/public/AppliedCouponCodeCard/types.js +2 -0
  334. package/dist/elements/public/AppliedCouponCodeCard/types.js.map +1 -0
  335. package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.d.ts +37 -0
  336. package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.js +73 -0
  337. package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.js.map +1 -0
  338. package/dist/elements/public/AppliedCouponCodeForm/index.d.ts +5 -0
  339. package/dist/elements/public/AppliedCouponCodeForm/index.js +7 -0
  340. package/dist/elements/public/AppliedCouponCodeForm/index.js.map +1 -0
  341. package/dist/elements/public/AppliedCouponCodeForm/types.d.ts +17 -0
  342. package/dist/elements/public/AppliedCouponCodeForm/types.js +2 -0
  343. package/dist/elements/public/AppliedCouponCodeForm/types.js.map +1 -0
  344. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.d.ts +1 -1
  345. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.js +2 -2
  346. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.js.map +1 -1
  347. package/dist/elements/public/AttributeCard/AttributeCard.js +30 -15
  348. package/dist/elements/public/AttributeCard/AttributeCard.js.map +1 -1
  349. package/dist/elements/public/AttributeForm/AttributeForm.js +1 -1
  350. package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
  351. package/dist/elements/public/CartCard/CartCard.d.ts +47 -0
  352. package/dist/elements/public/CartCard/CartCard.js +271 -0
  353. package/dist/elements/public/CartCard/CartCard.js.map +1 -0
  354. package/dist/elements/public/CartCard/index.d.ts +5 -0
  355. package/dist/elements/public/CartCard/index.js +7 -0
  356. package/dist/elements/public/CartCard/index.js.map +1 -0
  357. package/dist/elements/public/CartCard/types.d.ts +5 -0
  358. package/dist/elements/public/CartCard/types.js +2 -0
  359. package/dist/elements/public/CartCard/types.js.map +1 -0
  360. package/dist/elements/public/CartForm/CartForm.d.ts +164 -0
  361. package/dist/elements/public/CartForm/CartForm.js +733 -0
  362. package/dist/elements/public/CartForm/CartForm.js.map +1 -0
  363. package/dist/elements/public/CartForm/index.d.ts +21 -0
  364. package/dist/elements/public/CartForm/index.js +23 -0
  365. package/dist/elements/public/CartForm/index.js.map +1 -0
  366. package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/InternalCartFormViewAsCustomerControl.d.ts +10 -0
  367. package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/InternalCartFormViewAsCustomerControl.js +83 -0
  368. package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/InternalCartFormViewAsCustomerControl.js.map +1 -0
  369. package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/index.d.ts +4 -0
  370. package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/index.js +6 -0
  371. package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/index.js.map +1 -0
  372. package/dist/elements/public/CartForm/types.d.ts +67 -0
  373. package/dist/elements/public/CartForm/types.js +2 -0
  374. package/dist/elements/public/CartForm/types.js.map +1 -0
  375. package/dist/elements/public/CollectionPage/CollectionPage.js +11 -8
  376. package/dist/elements/public/CollectionPage/CollectionPage.js.map +1 -1
  377. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +1 -1
  378. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
  379. package/dist/elements/public/CouponDetailCard/CouponDetailCard.d.ts +1 -1
  380. package/dist/elements/public/CouponDetailCard/CouponDetailCard.js +2 -2
  381. package/dist/elements/public/CouponDetailCard/CouponDetailCard.js.map +1 -1
  382. package/dist/elements/public/CouponForm/CouponForm.js +14 -10
  383. package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
  384. package/dist/elements/public/CustomFieldCard/CustomFieldCard.d.ts +1 -1
  385. package/dist/elements/public/CustomFieldCard/CustomFieldCard.js +2 -2
  386. package/dist/elements/public/CustomFieldCard/CustomFieldCard.js.map +1 -1
  387. package/dist/elements/public/CustomFieldCard/TwoLineCard.d.ts +6 -12
  388. package/dist/elements/public/CustomFieldCard/TwoLineCard.js +7 -36
  389. package/dist/elements/public/CustomFieldCard/TwoLineCard.js.map +1 -1
  390. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +1 -1
  391. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
  392. package/dist/elements/public/CustomerApi/CustomerApi.d.ts +2 -0
  393. package/dist/elements/public/CustomerApi/CustomerApi.js +14 -0
  394. package/dist/elements/public/CustomerApi/CustomerApi.js.map +1 -1
  395. package/dist/elements/public/CustomerCard/CustomerCard.js +1 -1
  396. package/dist/elements/public/CustomerCard/CustomerCard.js.map +1 -1
  397. package/dist/elements/public/CustomerForm/CustomerForm.js +1 -1
  398. package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
  399. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +10 -23
  400. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
  401. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +3 -1
  402. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
  403. package/dist/elements/public/DiscountBuilder/DiscountBuilder.js +4 -4
  404. package/dist/elements/public/DiscountBuilder/DiscountBuilder.js.map +1 -1
  405. package/dist/elements/public/DiscountCard/DiscountCard.d.ts +1 -1
  406. package/dist/elements/public/DiscountCard/DiscountCard.js +4 -3
  407. package/dist/elements/public/DiscountCard/DiscountCard.js.map +1 -1
  408. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.d.ts +1 -1
  409. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js +2 -2
  410. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js.map +1 -1
  411. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.d.ts +23 -0
  412. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js +41 -0
  413. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js.map +1 -0
  414. package/dist/elements/public/EmailTemplateCard/index.d.ts +5 -0
  415. package/dist/elements/public/EmailTemplateCard/index.js +7 -0
  416. package/dist/elements/public/EmailTemplateCard/index.js.map +1 -0
  417. package/dist/elements/public/EmailTemplateCard/types.d.ts +3 -0
  418. package/dist/elements/public/EmailTemplateCard/types.js +2 -0
  419. package/dist/elements/public/EmailTemplateCard/types.js.map +1 -0
  420. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +4 -0
  421. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +40 -5
  422. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
  423. package/dist/elements/public/EmailTemplateForm/index.d.ts +2 -0
  424. package/dist/elements/public/EmailTemplateForm/index.js +2 -0
  425. package/dist/elements/public/EmailTemplateForm/index.js.map +1 -1
  426. package/dist/elements/public/FormDialog/FormDialog.js +1 -1
  427. package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
  428. package/dist/elements/public/GiftCardCard/GiftCardCard.js +2 -2
  429. package/dist/elements/public/GiftCardCard/GiftCardCard.js.map +1 -1
  430. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +4 -0
  431. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +33 -1
  432. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
  433. package/dist/elements/public/GiftCardCodeForm/index.d.ts +7 -4
  434. package/dist/elements/public/GiftCardCodeForm/index.js +7 -4
  435. package/dist/elements/public/GiftCardCodeForm/index.js.map +1 -1
  436. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.d.ts +5 -0
  437. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js +23 -0
  438. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js.map +1 -0
  439. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.d.ts +6 -0
  440. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js +8 -0
  441. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js.map +1 -0
  442. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.d.ts +23 -0
  443. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js +98 -0
  444. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js.map +1 -0
  445. package/dist/elements/public/GiftCardCodeLogCard/index.d.ts +5 -0
  446. package/dist/elements/public/GiftCardCodeLogCard/index.js +7 -0
  447. package/dist/elements/public/GiftCardCodeLogCard/index.js.map +1 -0
  448. package/dist/elements/public/GiftCardCodeLogCard/types.d.ts +3 -0
  449. package/dist/elements/public/GiftCardCodeLogCard/types.js +2 -0
  450. package/dist/elements/public/GiftCardCodeLogCard/types.js.map +1 -0
  451. package/dist/elements/public/GiftCardForm/GiftCardForm.js +29 -4
  452. package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
  453. package/dist/elements/public/GiftCardForm/index.d.ts +1 -2
  454. package/dist/elements/public/GiftCardForm/index.js +1 -2
  455. package/dist/elements/public/GiftCardForm/index.js.map +1 -1
  456. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.d.ts +14 -0
  457. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js +94 -0
  458. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js.map +1 -0
  459. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.d.ts +6 -0
  460. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js +8 -0
  461. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js.map +1 -0
  462. package/dist/elements/public/I18n/format/date.js +5 -4
  463. package/dist/elements/public/I18n/format/date.js.map +1 -1
  464. package/dist/elements/public/I18n/format/price.js +1 -0
  465. package/dist/elements/public/I18n/format/price.js.map +1 -1
  466. package/dist/elements/public/I18nEditor/I18nEditor.d.ts +27 -0
  467. package/dist/elements/public/I18nEditor/I18nEditor.js +182 -0
  468. package/dist/elements/public/I18nEditor/I18nEditor.js.map +1 -0
  469. package/dist/elements/public/I18nEditor/index.d.ts +7 -0
  470. package/dist/elements/public/I18nEditor/index.js +9 -0
  471. package/dist/elements/public/I18nEditor/index.js.map +1 -0
  472. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.d.ts +17 -0
  473. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js +169 -0
  474. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js.map +1 -0
  475. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.d.ts +6 -0
  476. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.js +8 -0
  477. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.js.map +1 -0
  478. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.d.ts +3 -0
  479. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.js +2 -0
  480. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.js.map +1 -0
  481. package/dist/elements/public/I18nEditor/types.d.ts +4 -0
  482. package/dist/elements/public/I18nEditor/types.js +2 -0
  483. package/dist/elements/public/I18nEditor/types.js.map +1 -0
  484. package/dist/elements/public/IntegrationCard/IntegrationCard.d.ts +16 -0
  485. package/dist/elements/public/IntegrationCard/IntegrationCard.js +59 -0
  486. package/dist/elements/public/IntegrationCard/IntegrationCard.js.map +1 -0
  487. package/dist/elements/public/IntegrationCard/index.d.ts +4 -0
  488. package/dist/elements/public/IntegrationCard/index.js +6 -0
  489. package/dist/elements/public/IntegrationCard/index.js.map +1 -0
  490. package/dist/elements/public/IntegrationCard/types.d.ts +3 -0
  491. package/dist/elements/public/IntegrationCard/types.js +2 -0
  492. package/dist/elements/public/IntegrationCard/types.js.map +1 -0
  493. package/dist/elements/public/IntegrationForm/IntegrationForm.d.ts +53 -0
  494. package/dist/elements/public/IntegrationForm/IntegrationForm.js +212 -0
  495. package/dist/elements/public/IntegrationForm/IntegrationForm.js.map +1 -0
  496. package/dist/elements/public/IntegrationForm/index.d.ts +11 -0
  497. package/dist/elements/public/IntegrationForm/index.js +13 -0
  498. package/dist/elements/public/IntegrationForm/index.js.map +1 -0
  499. package/dist/elements/public/IntegrationForm/types.d.ts +21 -0
  500. package/dist/elements/public/IntegrationForm/types.js +2 -0
  501. package/dist/elements/public/IntegrationForm/types.js.map +1 -0
  502. package/dist/elements/public/ItemCard/ItemCard.d.ts +26 -4
  503. package/dist/elements/public/ItemCard/ItemCard.js +235 -45
  504. package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
  505. package/dist/elements/public/ItemCard/index.d.ts +1 -0
  506. package/dist/elements/public/ItemCard/index.js +1 -0
  507. package/dist/elements/public/ItemCard/index.js.map +1 -1
  508. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.d.ts +22 -0
  509. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js +26 -0
  510. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js.map +1 -0
  511. package/dist/elements/public/ItemCategoryCard/index.d.ts +4 -0
  512. package/dist/elements/public/ItemCategoryCard/index.js +6 -0
  513. package/dist/elements/public/ItemCategoryCard/index.js.map +1 -0
  514. package/dist/elements/public/ItemCategoryCard/types.d.ts +3 -0
  515. package/dist/elements/public/ItemCategoryCard/types.js +2 -0
  516. package/dist/elements/public/ItemCategoryCard/types.js.map +1 -0
  517. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +114 -0
  518. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +382 -0
  519. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -0
  520. package/dist/elements/public/ItemCategoryForm/index.d.ts +10 -0
  521. package/dist/elements/public/ItemCategoryForm/index.js +12 -0
  522. package/dist/elements/public/ItemCategoryForm/index.js.map +1 -0
  523. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.d.ts +8 -0
  524. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js +52 -0
  525. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js.map +1 -0
  526. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.d.ts +6 -0
  527. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js +8 -0
  528. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js.map +1 -0
  529. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.d.ts +11 -0
  530. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js +83 -0
  531. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js.map +1 -0
  532. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.d.ts +5 -0
  533. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js +7 -0
  534. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js.map +1 -0
  535. package/dist/elements/public/ItemCategoryForm/types.d.ts +55 -0
  536. package/dist/elements/public/ItemCategoryForm/types.js +2 -0
  537. package/dist/elements/public/ItemCategoryForm/types.js.map +1 -0
  538. package/dist/elements/public/ItemForm/ItemForm.d.ts +3 -0
  539. package/dist/elements/public/ItemForm/ItemForm.js +58 -8
  540. package/dist/elements/public/ItemForm/ItemForm.js.map +1 -1
  541. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.d.ts +2 -2
  542. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js +2 -2
  543. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js.map +1 -1
  544. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.d.ts +1 -1
  545. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js +1 -1
  546. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js.map +1 -1
  547. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.d.ts +2 -2
  548. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js +2 -2
  549. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js.map +1 -1
  550. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.d.ts +1 -1
  551. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js +1 -1
  552. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js.map +1 -1
  553. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.d.ts +2 -2
  554. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js +2 -2
  555. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js.map +1 -1
  556. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.d.ts +2 -2
  557. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js +2 -2
  558. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js.map +1 -1
  559. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.d.ts +2 -2
  560. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js +2 -2
  561. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js.map +1 -1
  562. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.d.ts +1 -1
  563. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js +1 -1
  564. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js.map +1 -1
  565. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.d.ts +2 -2
  566. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js +2 -2
  567. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js.map +1 -1
  568. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.d.ts +1 -1
  569. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js +1 -1
  570. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js.map +1 -1
  571. package/dist/elements/public/ItemOptionCard/ItemOptionCard.d.ts +26 -6
  572. package/dist/elements/public/ItemOptionCard/ItemOptionCard.js +201 -18
  573. package/dist/elements/public/ItemOptionCard/ItemOptionCard.js.map +1 -1
  574. package/dist/elements/public/ItemOptionCard/index.d.ts +1 -0
  575. package/dist/elements/public/ItemOptionCard/index.js +1 -0
  576. package/dist/elements/public/ItemOptionCard/index.js.map +1 -1
  577. package/dist/elements/public/NucleonElement/API.js +1 -1
  578. package/dist/elements/public/NucleonElement/API.js.map +1 -1
  579. package/dist/elements/public/NucleonElement/NucleonElement.d.ts +8 -4
  580. package/dist/elements/public/NucleonElement/NucleonElement.js +123 -44
  581. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  582. package/dist/elements/public/NucleonElement/UpdateEvent.d.ts +10 -2
  583. package/dist/elements/public/NucleonElement/UpdateEvent.js +8 -2
  584. package/dist/elements/public/NucleonElement/UpdateEvent.js.map +1 -1
  585. package/dist/elements/public/Pagination/Pagination.js +2 -2
  586. package/dist/elements/public/Pagination/Pagination.js.map +1 -1
  587. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.d.ts +1 -1
  588. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js +2 -2
  589. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js.map +1 -1
  590. package/dist/elements/public/PaymentsApi/PaymentsApi.d.ts +37 -0
  591. package/dist/elements/public/PaymentsApi/PaymentsApi.js +111 -0
  592. package/dist/elements/public/PaymentsApi/PaymentsApi.js.map +1 -0
  593. package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.d.ts +6 -0
  594. package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.js +95 -0
  595. package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.js.map +1 -0
  596. package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.d.ts +11 -0
  597. package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.js +15 -0
  598. package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.js.map +1 -0
  599. package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.d.ts +10 -0
  600. package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.js +20 -0
  601. package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.js.map +1 -0
  602. package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.d.ts +10 -0
  603. package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.js +39 -0
  604. package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.js.map +1 -0
  605. package/dist/elements/public/PaymentsApi/api/composers/payment_method.d.ts +18 -0
  606. package/dist/elements/public/PaymentsApi/api/composers/payment_method.js +25 -0
  607. package/dist/elements/public/PaymentsApi/api/composers/payment_method.js.map +1 -0
  608. package/dist/elements/public/PaymentsApi/api/composers/payment_methods.d.ts +14 -0
  609. package/dist/elements/public/PaymentsApi/api/composers/payment_methods.js +59 -0
  610. package/dist/elements/public/PaymentsApi/api/composers/payment_methods.js.map +1 -0
  611. package/dist/elements/public/PaymentsApi/api/composers/payment_preset.d.ts +8 -0
  612. package/dist/elements/public/PaymentsApi/api/composers/payment_preset.js +22 -0
  613. package/dist/elements/public/PaymentsApi/api/composers/payment_preset.js.map +1 -0
  614. package/dist/elements/public/PaymentsApi/api/composers/payment_presets.d.ts +8 -0
  615. package/dist/elements/public/PaymentsApi/api/composers/payment_presets.js +36 -0
  616. package/dist/elements/public/PaymentsApi/api/composers/payment_presets.js.map +1 -0
  617. package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.d.ts +12 -0
  618. package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js +34 -0
  619. package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js.map +1 -0
  620. package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.d.ts +16 -0
  621. package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js +44 -0
  622. package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js.map +1 -0
  623. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.d.ts +17 -0
  624. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js +68 -0
  625. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js.map +1 -0
  626. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.d.ts +17 -0
  627. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js +77 -0
  628. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js.map +1 -0
  629. package/dist/elements/public/PaymentsApi/api/handlers/payment_method.d.ts +22 -0
  630. package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js +97 -0
  631. package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js.map +1 -0
  632. package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.d.ts +21 -0
  633. package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js +113 -0
  634. package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js.map +1 -0
  635. package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.d.ts +14 -0
  636. package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js +42 -0
  637. package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js.map +1 -0
  638. package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.d.ts +14 -0
  639. package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js +47 -0
  640. package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js.map +1 -0
  641. package/dist/elements/public/PaymentsApi/api/index.d.ts +11 -0
  642. package/dist/elements/public/PaymentsApi/api/index.js +35 -0
  643. package/dist/elements/public/PaymentsApi/api/index.js.map +1 -0
  644. package/dist/elements/public/PaymentsApi/api/types.d.ts +154 -0
  645. package/dist/elements/public/PaymentsApi/api/types.js +2 -0
  646. package/dist/elements/public/PaymentsApi/api/types.js.map +1 -0
  647. package/dist/elements/public/PaymentsApi/api/utils.d.ts +1 -0
  648. package/dist/elements/public/PaymentsApi/api/utils.js +7 -0
  649. package/dist/elements/public/PaymentsApi/api/utils.js.map +1 -0
  650. package/dist/elements/public/PaymentsApi/index.d.ts +2 -0
  651. package/dist/elements/public/PaymentsApi/index.js +4 -0
  652. package/dist/elements/public/PaymentsApi/index.js.map +1 -0
  653. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.d.ts +35 -0
  654. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js +68 -0
  655. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js.map +1 -0
  656. package/dist/elements/public/PaymentsApiFraudProtectionCard/index.d.ts +5 -0
  657. package/dist/elements/public/PaymentsApiFraudProtectionCard/index.js +7 -0
  658. package/dist/elements/public/PaymentsApiFraudProtectionCard/index.js.map +1 -0
  659. package/dist/elements/public/PaymentsApiFraudProtectionCard/types.d.ts +1 -0
  660. package/dist/elements/public/PaymentsApiFraudProtectionCard/types.js +2 -0
  661. package/dist/elements/public/PaymentsApiFraudProtectionCard/types.js.map +1 -0
  662. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.d.ts +55 -0
  663. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js +275 -0
  664. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js.map +1 -0
  665. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.d.ts +10 -0
  666. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.js +12 -0
  667. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.js.map +1 -0
  668. package/dist/elements/public/PaymentsApiFraudProtectionForm/types.d.ts +18 -0
  669. package/dist/elements/public/PaymentsApiFraudProtectionForm/types.js +2 -0
  670. package/dist/elements/public/PaymentsApiFraudProtectionForm/types.js.map +1 -0
  671. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.d.ts +35 -0
  672. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js +68 -0
  673. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js.map +1 -0
  674. package/dist/elements/public/PaymentsApiPaymentMethodCard/index.d.ts +5 -0
  675. package/dist/elements/public/PaymentsApiPaymentMethodCard/index.js +7 -0
  676. package/dist/elements/public/PaymentsApiPaymentMethodCard/index.js.map +1 -0
  677. package/dist/elements/public/PaymentsApiPaymentMethodCard/types.d.ts +1 -0
  678. package/dist/elements/public/PaymentsApiPaymentMethodCard/types.js +2 -0
  679. package/dist/elements/public/PaymentsApiPaymentMethodCard/types.js.map +1 -0
  680. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.d.ts +87 -0
  681. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +479 -0
  682. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -0
  683. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.d.ts +12 -0
  684. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js +14 -0
  685. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js.map +1 -0
  686. package/dist/elements/public/PaymentsApiPaymentMethodForm/types.d.ts +32 -0
  687. package/dist/elements/public/PaymentsApiPaymentMethodForm/types.js +2 -0
  688. package/dist/elements/public/PaymentsApiPaymentMethodForm/types.js.map +1 -0
  689. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.d.ts +27 -0
  690. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js +39 -0
  691. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js.map +1 -0
  692. package/dist/elements/public/PaymentsApiPaymentPresetCard/index.d.ts +5 -0
  693. package/dist/elements/public/PaymentsApiPaymentPresetCard/index.js +7 -0
  694. package/dist/elements/public/PaymentsApiPaymentPresetCard/index.js.map +1 -0
  695. package/dist/elements/public/PaymentsApiPaymentPresetCard/types.d.ts +1 -0
  696. package/dist/elements/public/PaymentsApiPaymentPresetCard/types.js +2 -0
  697. package/dist/elements/public/PaymentsApiPaymentPresetCard/types.js.map +1 -0
  698. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.d.ts +61 -0
  699. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js +164 -0
  700. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js.map +1 -0
  701. package/dist/elements/public/PaymentsApiPaymentPresetForm/index.d.ts +10 -0
  702. package/dist/elements/public/PaymentsApiPaymentPresetForm/index.js +12 -0
  703. package/dist/elements/public/PaymentsApiPaymentPresetForm/index.js.map +1 -0
  704. package/dist/elements/public/PaymentsApiPaymentPresetForm/types.d.ts +15 -0
  705. package/dist/elements/public/PaymentsApiPaymentPresetForm/types.js +2 -0
  706. package/dist/elements/public/PaymentsApiPaymentPresetForm/types.js.map +1 -0
  707. package/dist/elements/public/QueryBuilder/components/Input.js +10 -8
  708. package/dist/elements/public/QueryBuilder/components/Input.js.map +1 -1
  709. package/dist/elements/public/QueryBuilder/components/RangeValue.js +7 -5
  710. package/dist/elements/public/QueryBuilder/components/RangeValue.js.map +1 -1
  711. package/dist/elements/public/QueryBuilder/components/Select.js +3 -1
  712. package/dist/elements/public/QueryBuilder/components/Select.js.map +1 -1
  713. package/dist/elements/public/ReportForm/ReportForm.js +5 -2
  714. package/dist/elements/public/ReportForm/ReportForm.js.map +1 -1
  715. package/dist/elements/public/ReportForm/utils.js +3 -2
  716. package/dist/elements/public/ReportForm/utils.js.map +1 -1
  717. package/dist/elements/public/ShipmentCard/ShipmentCard.js +1 -1
  718. package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
  719. package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.d.ts +34 -0
  720. package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.js +96 -0
  721. package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.js.map +1 -0
  722. package/dist/elements/public/ShippingMethodCard/index.d.ts +5 -0
  723. package/dist/elements/public/ShippingMethodCard/index.js +7 -0
  724. package/dist/elements/public/ShippingMethodCard/index.js.map +1 -0
  725. package/dist/elements/public/ShippingMethodCard/types.d.ts +10 -0
  726. package/dist/elements/public/ShippingMethodCard/types.js +2 -0
  727. package/dist/elements/public/ShippingMethodCard/types.js.map +1 -0
  728. package/dist/elements/public/StoreForm/StoreForm.d.ts +207 -0
  729. package/dist/elements/public/StoreForm/StoreForm.js +1186 -0
  730. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -0
  731. package/dist/elements/public/StoreForm/index.d.ts +16 -0
  732. package/dist/elements/public/StoreForm/index.js +18 -0
  733. package/dist/elements/public/StoreForm/index.js.map +1 -0
  734. package/dist/elements/public/StoreForm/types.d.ts +97 -0
  735. package/dist/elements/public/StoreForm/types.js +2 -0
  736. package/dist/elements/public/StoreForm/types.js.map +1 -0
  737. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +70 -0
  738. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +277 -0
  739. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -0
  740. package/dist/elements/public/StoreShippingMethodForm/index.d.ts +10 -0
  741. package/dist/elements/public/StoreShippingMethodForm/index.js +12 -0
  742. package/dist/elements/public/StoreShippingMethodForm/index.js.map +1 -0
  743. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.d.ts +5 -0
  744. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js +33 -0
  745. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js.map +1 -0
  746. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.d.ts +6 -0
  747. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.js +8 -0
  748. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.js.map +1 -0
  749. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.d.ts +19 -0
  750. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js +96 -0
  751. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js.map +1 -0
  752. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.d.ts +5 -0
  753. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.js +7 -0
  754. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.js.map +1 -0
  755. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.d.ts +17 -0
  756. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js +45 -0
  757. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js.map +1 -0
  758. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.d.ts +3 -0
  759. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.js +5 -0
  760. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.js.map +1 -0
  761. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.d.ts +16 -0
  762. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js +49 -0
  763. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js.map +1 -0
  764. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.d.ts +3 -0
  765. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.js +5 -0
  766. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.js.map +1 -0
  767. package/dist/elements/public/StoreShippingMethodForm/types.d.ts +37 -0
  768. package/dist/elements/public/StoreShippingMethodForm/types.js +2 -0
  769. package/dist/elements/public/StoreShippingMethodForm/types.js.map +1 -0
  770. package/dist/elements/public/SubscriptionCard/SubscriptionCard.js +1 -0
  771. package/dist/elements/public/SubscriptionCard/SubscriptionCard.js.map +1 -1
  772. package/dist/elements/public/SubscriptionForm/SubscriptionForm.d.ts +46 -14
  773. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +300 -157
  774. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
  775. package/dist/elements/public/SubscriptionForm/index.d.ts +9 -4
  776. package/dist/elements/public/SubscriptionForm/index.js +9 -4
  777. package/dist/elements/public/SubscriptionForm/index.js.map +1 -1
  778. package/dist/elements/public/SubscriptionForm/types.d.ts +2 -5
  779. package/dist/elements/public/SubscriptionForm/types.js.map +1 -1
  780. package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.d.ts +82 -0
  781. package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js +257 -0
  782. package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js.map +1 -0
  783. package/dist/elements/public/SubscriptionSettingsForm/index.d.ts +9 -0
  784. package/dist/elements/public/SubscriptionSettingsForm/index.js +11 -0
  785. package/dist/elements/public/SubscriptionSettingsForm/index.js.map +1 -0
  786. package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.d.ts +12 -0
  787. package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.js +128 -0
  788. package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.js.map +1 -0
  789. package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.d.ts +2 -0
  790. package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.js +26 -0
  791. package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.js.map +1 -0
  792. package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.d.ts +7 -0
  793. package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.js +13 -0
  794. package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.js.map +1 -0
  795. package/dist/elements/public/SubscriptionSettingsForm/types.d.ts +35 -0
  796. package/dist/elements/public/SubscriptionSettingsForm/types.js +2 -0
  797. package/dist/elements/public/SubscriptionSettingsForm/types.js.map +1 -0
  798. package/dist/elements/public/SubscriptionsTable/SubscriptionsTable.js +1 -0
  799. package/dist/elements/public/SubscriptionsTable/SubscriptionsTable.js.map +1 -1
  800. package/dist/elements/public/TaxCard/TaxCard.d.ts +4 -4
  801. package/dist/elements/public/TaxCard/TaxCard.js +12 -8
  802. package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
  803. package/dist/elements/public/TaxCard/index.d.ts +1 -3
  804. package/dist/elements/public/TaxCard/index.js +1 -3
  805. package/dist/elements/public/TaxCard/index.js.map +1 -1
  806. package/dist/elements/public/TaxForm/TaxForm.js +1 -1
  807. package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
  808. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +6 -3
  809. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -1
  810. package/dist/elements/public/TemplateForm/TemplateForm.js +11 -3
  811. package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
  812. package/dist/elements/public/TemplateSetCard/TemplateSetCard.d.ts +22 -0
  813. package/dist/elements/public/TemplateSetCard/TemplateSetCard.js +26 -0
  814. package/dist/elements/public/TemplateSetCard/TemplateSetCard.js.map +1 -0
  815. package/dist/elements/public/TemplateSetCard/index.d.ts +4 -0
  816. package/dist/elements/public/TemplateSetCard/index.js +6 -0
  817. package/dist/elements/public/TemplateSetCard/index.js.map +1 -0
  818. package/dist/elements/public/TemplateSetCard/types.d.ts +3 -0
  819. package/dist/elements/public/TemplateSetCard/types.js +2 -0
  820. package/dist/elements/public/TemplateSetCard/types.js.map +1 -0
  821. package/dist/elements/public/TemplateSetForm/TemplateSetForm.d.ts +67 -0
  822. package/dist/elements/public/TemplateSetForm/TemplateSetForm.js +192 -0
  823. package/dist/elements/public/TemplateSetForm/TemplateSetForm.js.map +1 -0
  824. package/dist/elements/public/TemplateSetForm/index.d.ts +9 -0
  825. package/dist/elements/public/TemplateSetForm/index.js +11 -0
  826. package/dist/elements/public/TemplateSetForm/index.js.map +1 -0
  827. package/dist/elements/public/TemplateSetForm/types.d.ts +25 -0
  828. package/dist/elements/public/TemplateSetForm/types.js +2 -0
  829. package/dist/elements/public/TemplateSetForm/types.js.map +1 -0
  830. package/dist/elements/public/TransactionCard/TransactionCard.js +2 -1
  831. package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
  832. package/dist/elements/public/TransactionsTable/TransactionsTable.js +1 -0
  833. package/dist/elements/public/TransactionsTable/TransactionsTable.js.map +1 -1
  834. package/dist/elements/public/UserForm/UserForm.js +1 -1
  835. package/dist/elements/public/UserForm/UserForm.js.map +1 -1
  836. package/dist/elements/public/index.d.ts +25 -0
  837. package/dist/elements/public/index.defined.d.ts +25 -0
  838. package/dist/elements/public/index.defined.js +25 -0
  839. package/dist/elements/public/index.defined.js.map +1 -1
  840. package/dist/elements/public/index.js +25 -0
  841. package/dist/elements/public/index.js.map +1 -1
  842. package/dist/mixins/configurable.js +25 -8
  843. package/dist/mixins/configurable.js.map +1 -1
  844. package/dist/mixins/inferrable.js +25 -23
  845. package/dist/mixins/inferrable.js.map +1 -1
  846. package/dist/mixins/responsive.js +8 -6
  847. package/dist/mixins/responsive.js.map +1 -1
  848. package/dist/mixins/themeable.js +202 -6717
  849. package/dist/mixins/themeable.js.map +1 -1
  850. package/dist/utils/serialize-date.d.ts +1 -0
  851. package/dist/utils/serialize-date.js +7 -0
  852. package/dist/utils/serialize-date.js.map +1 -1
  853. package/package.json +5 -3
  854. package/dist/cdn/shared-1992ba56.js +0 -1
  855. package/dist/cdn/shared-2061be9a.js +0 -1
  856. package/dist/cdn/shared-47e4ea34.js +0 -1
  857. package/dist/cdn/shared-62169210.js +0 -29
  858. package/dist/cdn/shared-631dd765.js +0 -1
  859. package/dist/cdn/shared-68454b95.js +0 -1
  860. package/dist/cdn/shared-68871f75.js +0 -1
  861. package/dist/cdn/shared-6d104622.js +0 -1
  862. package/dist/cdn/shared-7684cb05.js +0 -1
  863. package/dist/cdn/shared-89d9d88a.js +0 -1
  864. package/dist/cdn/shared-8a980fae.js +0 -1
  865. package/dist/cdn/shared-92a6c959.js +0 -1
  866. package/dist/cdn/shared-a5e52b8f.js +0 -64
  867. package/dist/cdn/shared-a65bca62.js +0 -1
  868. package/dist/cdn/shared-ab008382.js +0 -1
  869. package/dist/cdn/shared-ba59c811.js +0 -1
  870. package/dist/cdn/shared-c89ba319.js +0 -1
  871. package/dist/cdn/shared-dd29b736.js +0 -1
  872. package/dist/cdn/shared-e575ce6f.js +0 -60
  873. package/dist/cdn/shared-e8564a0b.js +0 -1
  874. package/dist/cdn/shared-ed9d70f7.js +0 -302
  875. package/dist/cdn/shared-f7231d6a.js +0 -1
  876. package/dist/cdn/shared-fadcb2e1.js +0 -1
  877. package/dist/cdn/shared-ff649616.js +0 -1
@@ -1,4 +1,4 @@
1
- import{T as e,D as t,E as i,C as s}from"./shared-195fd5af.js";import{h as o,P as n,D as r,t as a,a as l,p as h,i as d,e as c,y as u,z as _}from"./shared-ae415a98.js";import"./shared-d28ac9dc.js";import{t as m,m as p,F as v,P as f,f as g,d as y,O as b,D as I,a as x}from"./shared-2188d5f7.js";import{u as w}from"./shared-62169210.js";
1
+ import{T as e,D as t,E as i,C as s}from"./shared-be66c2e7.js";import{h as o,P as n,D as r,t as a,a as l,p as h,i as d,e as c,y as u,z as _}from"./shared-0ce006b9.js";import"./shared-5ea18e60.js";import{a as m,I as p,b as v}from"./shared-08e27fe9.js";import"./shared-08156595.js";import{t as f,m as g,F as y,P as b,f as I,d as x,O as w,D as S,a as C}from"./shared-62c088b7.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -7,28 +7,19 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
7
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
8
  Code distributed by Google as part of the polymer project is also
9
9
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10
- */let S=!1,C=[],P=[];function E(){S=!0,requestAnimationFrame((function(){S=!1,function(e){for(;e.length;)T(e.shift())}(C),setTimeout((function(){!function(e){for(let t=0,i=e.length;t<i;t++)T(e.shift())}(P)}))}))}function T(e){const t=e[0],i=e[1],s=e[2];try{i.apply(t,s)}catch(e){setTimeout((()=>{throw e}))}}function V(e,t,i){S||E(),P.push([e,t,i])}
11
- /**
12
- @license
13
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
14
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
15
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
16
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
17
- Code distributed by Google as part of the polymer project is also
18
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
19
- */const R={templatize(e,t){this._templatizerTemplate=e,this.ctor=m(e,this,{mutableData:Boolean(t),parentModel:this._parentModel,instanceProps:this._instanceProps,forwardHostProp:this._forwardHostPropV2,notifyInstanceProp:this._notifyInstancePropV2})},stamp(e){return new this.ctor(e)},modelForElement(e){return p(this._templatizerTemplate,e)}},k=document.createElement("template");k.innerHTML='<dom-module id="lumo-overlay">\n <template>\n <style>\n :host {\n top: var(--lumo-space-m);\n right: var(--lumo-space-m);\n bottom: var(--lumo-space-m);\n left: var(--lumo-space-m);\n /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */\n /* stylelint-disable-next-line */\n outline: 0px solid transparent;\n }\n\n [part="overlay"] {\n background-color: var(--lumo-base-color);\n background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));\n border-radius: var(--lumo-border-radius-m);\n box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);\n color: var(--lumo-body-text-color);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-m);\n font-weight: 400;\n line-height: var(--lumo-line-height-m);\n letter-spacing: 0;\n text-transform: none;\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n [part="content"] {\n padding: var(--lumo-space-xs);\n }\n\n [part="backdrop"] {\n background-color: var(--lumo-shade-20pct);\n animation: 0.2s lumo-overlay-backdrop-enter both;\n will-change: opacity;\n }\n\n @keyframes lumo-overlay-backdrop-enter {\n 0% {\n opacity: 0;\n }\n }\n\n :host([closing]) [part="backdrop"] {\n animation: 0.2s lumo-overlay-backdrop-exit both;\n }\n\n @keyframes lumo-overlay-backdrop-exit {\n 100% {\n opacity: 0;\n }\n }\n\n @keyframes lumo-overlay-dummy-animation {\n 0% { opacity: 1; }\n 100% { opacity: 1; }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(k.content);const O=o`<dom-module id="lumo-vaadin-overlay" theme-for="vaadin-overlay">
10
+ */const P={templatize(e,t){this._templatizerTemplate=e,this.ctor=f(e,this,{mutableData:Boolean(t),parentModel:this._parentModel,instanceProps:this._instanceProps,forwardHostProp:this._forwardHostPropV2,notifyInstanceProp:this._notifyInstancePropV2})},stamp(e){return new this.ctor(e)},modelForElement(e){return g(this._templatizerTemplate,e)}},E=document.createElement("template");E.innerHTML='<dom-module id="lumo-overlay">\n <template>\n <style>\n :host {\n top: var(--lumo-space-m);\n right: var(--lumo-space-m);\n bottom: var(--lumo-space-m);\n left: var(--lumo-space-m);\n /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */\n /* stylelint-disable-next-line */\n outline: 0px solid transparent;\n }\n\n [part="overlay"] {\n background-color: var(--lumo-base-color);\n background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));\n border-radius: var(--lumo-border-radius-m);\n box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);\n color: var(--lumo-body-text-color);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-m);\n font-weight: 400;\n line-height: var(--lumo-line-height-m);\n letter-spacing: 0;\n text-transform: none;\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n [part="content"] {\n padding: var(--lumo-space-xs);\n }\n\n [part="backdrop"] {\n background-color: var(--lumo-shade-20pct);\n animation: 0.2s lumo-overlay-backdrop-enter both;\n will-change: opacity;\n }\n\n @keyframes lumo-overlay-backdrop-enter {\n 0% {\n opacity: 0;\n }\n }\n\n :host([closing]) [part="backdrop"] {\n animation: 0.2s lumo-overlay-backdrop-exit both;\n }\n\n @keyframes lumo-overlay-backdrop-exit {\n 100% {\n opacity: 0;\n }\n }\n\n @keyframes lumo-overlay-dummy-animation {\n 0% { opacity: 1; }\n 100% { opacity: 1; }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(E.content);const T=o`<dom-module id="lumo-vaadin-overlay" theme-for="vaadin-overlay">
20
11
  <template>
21
12
  <style include="lumo-overlay">
22
13
  /* stylelint-disable no-empty-source */
23
14
  </style>
24
15
  </template>
25
- </dom-module>`;document.head.appendChild(O.content);const z=Element.prototype,A=z.matches||z.matchesSelector||z.mozMatchesSelector||z.msMatchesSelector||z.oMatchesSelector||z.webkitMatchesSelector;
16
+ </dom-module>`;document.head.appendChild(T.content);const V=Element.prototype,k=V.matches||V.matchesSelector||V.mozMatchesSelector||V.msMatchesSelector||V.oMatchesSelector||V.webkitMatchesSelector;
26
17
  /**
27
18
  @license
28
19
  Copyright (c) 2017 Vaadin Ltd.
29
20
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
30
21
  */
31
- let L=0;const B={},F=e=>{L++;const t=`vaadin-overlay-content-${L}`,i=document.createElement("template"),s=document.createElement("style");s.textContent=":host { display: block; }"+e,i.content.appendChild(s),window.ShadyCSS&&window.ShadyCSS.prepareTemplate(i,t);const o=class extends HTMLElement{static get is(){return t}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(i.content,!0)))}connectedCallback(){window.ShadyCSS&&window.ShadyCSS.styleElement(this)}};return customElements.define(o.is,o),B[e]=t,t};class $ extends(e(t(n))){static get template(){return o`
22
+ let O=0;const L={},A=e=>{O++;const t=`vaadin-overlay-content-${O}`,i=document.createElement("template"),s=document.createElement("style");s.textContent=":host { display: block; }"+e,i.content.appendChild(s),window.ShadyCSS&&window.ShadyCSS.prepareTemplate(i,t);const o=class extends HTMLElement{static get is(){return t}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(i.content,!0)))}connectedCallback(){window.ShadyCSS&&window.ShadyCSS.styleElement(this)}};return customElements.define(o.is,o),L[e]=t,t};class R extends(e(t(n))){static get template(){return o`
32
23
  <style>
33
24
  :host {
34
25
  z-index: 200;
@@ -104,7 +95,7 @@ let L=0;const B={},F=e=>{L++;const t=`vaadin-overlay-content-${L}`,i=document.cr
104
95
  <slot></slot>
105
96
  </div>
106
97
  </div>
107
- `}static get is(){return"vaadin-overlay"}static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,template:{type:Object,notify:!0},instanceProps:{type:Object},content:{type:Object,notify:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldInstanceProps:Object,_oldRenderer:Object,_oldOpened:Boolean}}static get observers(){return["_templateOrRendererChanged(template, renderer, owner, model, instanceProps, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),this._observer=new v(this,(e=>{this._setTemplateFromNodes(e.addedNodes)})),this._boundIronOverlayCanceledListener=this._ironOverlayCanceled.bind(this),/iPad|iPhone|iPod/.test(navigator.userAgent)&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this._observer.flush(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{}))}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,t=window.innerWidth>e,i=document.documentElement.clientHeight;t&&i>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",i-e+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}_setTemplateFromNodes(e){this.template=e.filter((e=>e.localName&&"template"===e.localName))[0]||this.template}close(e){var t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}_ironOverlayCanceled(e){e.preventDefault()}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_outsideClickListener(e){if(-1!==e.composedPath().indexOf(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._last)return;const t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last)if("Tab"===e.key&&this.focusTrap&&!e.defaultPrevented)this._cycleTab(e.shiftKey?-1:1),e.preventDefault();else if("Escape"===e.key||"Esc"===e.key){const t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}_ensureTemplatized(){this._setTemplateFromNodes(Array.from(this.children))}_openedChanged(e,t){this._instance||this._ensureTemplatized(),e?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),V(this,(()=>{this.focusTrap&&!this.contains(document._activeElement||document.activeElement)&&this._cycleTab(0,0);const e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(e)})),this.modeless||this._addGlobalListeners()):t&&(this._animatedClosing(),this.modeless||this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const e=getComputedStyle(this).getPropertyValue("animation-name");return!("none"===getComputedStyle(this).getPropertyValue("display"))&&e&&"none"!=e}_enqueueAnimation(e,t){const i=`__${e}Handler`,s=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(e){const t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening","");const e=()=>{document.addEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this.removeAttribute("opening")};this._shouldAnimate()?this._enqueueAnimation("opening",e):e()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_animatedClosing(){if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){if(this._exitModalState(),this.restoreFocusOnClose&&this.__restoreFocusNode){const e=this._getActiveElement();(e===document.body||this._deepContains(e))&&this.__restoreFocusNode.focus(),this.__restoreFocusNode=null}this.setAttribute("closing","");const e=()=>{document.removeEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this._detachOverlay(),this.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),this.removeAttribute("closing")};this._shouldAnimate()?this._enqueueAnimation("closing",e):e()}}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}static get __attachedInstances(){return Array.from(document.body.children).filter((e=>e instanceof $&&!e.hasAttribute("closing"))).sort(((e,t)=>e.__zIndex-t.__zIndex||0))}get _last(){return this===$.__attachedInstances.pop()}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0),document.addEventListener("keydown",this._boundKeydownListener)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),$.__attachedInstances.forEach((e=>{e!==this&&(e.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0),document.removeEventListener("keydown",this._boundKeydownListener)}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=$.__attachedInstances;let t;for(;(t=e.pop())&&(t===this||(t.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),t.modeless)););}_removeOldContent(){this.content&&this._contentNodes&&(this._observer.disconnect(),this._contentNodes.forEach((e=>{e.parentNode===this.content&&this.content.removeChild(e)})),this._originalContentPart&&(this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content),this.$.content=this._originalContentPart,this._originalContentPart=void 0),this._observer.connect(),this._contentNodes=void 0,this.content=void 0)}_stampOverlayTemplate(e,t){this._removeOldContent(),e._Templatizer||(e._Templatizer=m(e,this,{instanceProps:t,forwardHostProp:function(e,t){this._instance&&this._instance.forwardHostProp(e,t)}})),this._instance=new e._Templatizer({}),this._contentNodes=Array.from(this._instance.root.childNodes);const i=e._templateRoot||(e._templateRoot=e.getRootNode());if(i!==document){const e=window.ShadyCSS&&!window.ShadyCSS.nativeShadow;this.$.content.shadowRoot||this.$.content.attachShadow({mode:"open"});let t=Array.from(i.querySelectorAll("style")).reduce(((e,t)=>e+t.textContent),"");if(e){const e=window.ShadyCSS.ScopingShim._styleInfoForNode(i.host);e&&(t+=e._getStyleRules().parsedCssText,t+="}")}if(t=t.replace(/:host/g,":host-nomatch"),t)if(e){const e=(e=>{const t=B[e]||F(e);return document.createElement(t)})(t);e.id="content",e.setAttribute("part","content"),this.$.content.parentNode.replaceChild(e,this.$.content),e.className=this.$.content.className,this._originalContentPart=this.$.content,this.$.content=e}else{const e=document.createElement("style");e.textContent=t,this.$.content.shadowRoot.appendChild(e),this._contentNodes.unshift(e)}this.$.content.shadowRoot.appendChild(this._instance.root),this.content=this.$.content.shadowRoot}else this.appendChild(this._instance.root),this.content=this}_removeNewRendererOrTemplate(e,t,i,s){e!==t?this.template=void 0:i!==s&&(this.renderer=void 0)}render(){this.renderer&&this.renderer.call(this.owner,this.content,this.owner,this.model)}_templateOrRendererChanged(e,t,i,s,o,n){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for overlay content");const r=this._oldOwner!==i||this._oldModel!==s;this._oldModel=s,this._oldOwner=i;const a=this._oldInstanceProps!==o||this._oldTemplate!==e;this._oldInstanceProps=o,this._oldTemplate=e;const l=this._oldRenderer!==t;this._oldRenderer=t;const h=this._oldOpened!==n;if(this._oldOpened=n,e&&a)this._stampOverlayTemplate(e,o);else if(t&&(l||h||r)){if(this.content=this,l)for(;this.content.firstChild;)this.content.removeChild(this.content.firstChild);n&&this.render()}}_isFocused(e){return e&&e.getRootNode().activeElement===e}_focusedIndex(e){return(e=e||this._getFocusableElements()).indexOf(e.filter(this._isFocused).pop())}_cycleTab(e,t){const i=this._getFocusableElements();void 0===t&&(t=this._focusedIndex(i)),(t+=e)>=i.length?t=0:t<0&&(t=i.length-1),i[t].focus()}_getFocusableElements(){return class{static getTabbableNodes(e){const t=[];return this._collectTabbableNodes(e,t)?this._sortByTabIndex(t):t}static isFocusable(e){return A.call(e,"input, select, textarea, button, object")?A.call(e,":not([disabled])"):A.call(e,"a[href], area[href], iframe, [tabindex], [contentEditable]")}static isTabbable(e){return this.isFocusable(e)&&A.call(e,':not([tabindex="-1"])')&&this._isVisible(e)}static _normalizedTabIndex(e){if(this.isFocusable(e)){const t=e.getAttribute("tabindex")||0;return Number(t)}return-1}static _collectTabbableNodes(e,t){if(e.nodeType!==Node.ELEMENT_NODE||!this._isVisible(e))return!1;const i=e,s=this._normalizedTabIndex(i);let o,n=s>0;if(s>=0&&t.push(i),o="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,o)for(let e=0;e<o.length;e++)n=this._collectTabbableNodes(o[e],t)||n;return n}static _isVisible(e){let t=e.style;return"hidden"!==t.visibility&&"none"!==t.display&&(t=window.getComputedStyle(e),"hidden"!==t.visibility&&"none"!==t.display)}static _sortByTabIndex(e){const t=e.length;if(t<2)return e;const i=Math.ceil(t/2),s=this._sortByTabIndex(e.slice(0,i)),o=this._sortByTabIndex(e.slice(i));return this._mergeSortByTabIndex(s,o)}static _mergeSortByTabIndex(e,t){const i=[];for(;e.length>0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?i.push(t.shift()):i.push(e.shift());return i.concat(e,t)}static _hasLowerTabOrder(e,t){const i=Math.max(e.tabIndex,0),s=Math.max(t.tabIndex,0);return 0===i||0===s?s>i:i>s}}.getTabbableNodes(this.$.overlay)}_getActiveElement(){let e=document._activeElement||document.activeElement;for(e&&e!==document.documentElement&&e instanceof Element!=!1||(e=document.body);e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}_deepContains(e){if(this.contains(e))return!0;let t=e;const i=e.ownerDocument;for(;t&&t!==i&&t!==this;)t=t.parentNode||t.host;return t===this}bringToFront(){let e="";const t=$.__attachedInstances.filter((e=>e!==this)).pop();if(t){e=t.__zIndex+1}this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex)}}customElements.define($.is,$);const N=document.createElement("template");N.innerHTML='<dom-module id="lumo-menu-overlay-core">\n <template>\n <style>\n :host([opening]),\n :host([closing]) {\n animation: 0.14s lumo-overlay-dummy-animation;\n }\n\n [part="overlay"] {\n will-change: opacity, transform;\n }\n\n :host([opening]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-enter ease-out both;\n }\n\n @keyframes lumo-menu-overlay-enter {\n 0% {\n opacity: 0;\n transform: translateY(-4px);\n }\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-exit both;\n }\n\n @keyframes lumo-menu-overlay-exit {\n 100% {\n opacity: 0;\n }\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-menu-overlay">\n <template>\n <style include="lumo-overlay lumo-menu-overlay-core">\n /* Small viewport (bottom sheet) styles */\n /* Use direct media queries instead of the state attributes (`[phone]` and `[fullscreen]`) provided by the elements */\n @media (max-width: 420px), (max-height: 420px) {\n :host {\n top: 0 !important;\n right: 0 !important;\n bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;\n left: 0 !important;\n align-items: stretch !important;\n justify-content: flex-end !important;\n }\n\n [part="overlay"] {\n max-height: 50vh;\n width: 100vw;\n border-radius: 0;\n box-shadow: var(--lumo-box-shadow-xl);\n }\n\n /* The content part scrolls instead of the overlay part, because of the gradient fade-out */\n [part="content"] {\n padding: 30px var(--lumo-space-m);\n max-height: inherit;\n box-sizing: border-box;\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n }\n\n [part="backdrop"] {\n display: block;\n }\n\n /* Animations */\n\n :host([opening]) [part="overlay"] {\n animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(.215, .61, .355, 1) both;\n }\n\n :host([closing]),\n :host([closing]) [part="backdrop"] {\n animation-delay: 0.14s;\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(.55, .055, .675, .19) both;\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-enter {\n 0% {\n transform: translateY(150%);\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-exit {\n 100% {\n transform: translateY(150%);\n }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(N.content);const H=o`<dom-module id="lumo-combo-box-overlay" theme-for="vaadin-combo-box-overlay">
98
+ `}static get is(){return"vaadin-overlay"}static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,template:{type:Object,notify:!0},instanceProps:{type:Object},content:{type:Object,notify:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldInstanceProps:Object,_oldRenderer:Object,_oldOpened:Boolean}}static get observers(){return["_templateOrRendererChanged(template, renderer, owner, model, instanceProps, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),this._observer=new y(this,(e=>{this._setTemplateFromNodes(e.addedNodes)})),this._boundIronOverlayCanceledListener=this._ironOverlayCanceled.bind(this),/iPad|iPhone|iPod/.test(navigator.userAgent)&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this._observer.flush(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{}))}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,t=window.innerWidth>e,i=document.documentElement.clientHeight;t&&i>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",i-e+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}_setTemplateFromNodes(e){this.template=e.filter((e=>e.localName&&"template"===e.localName))[0]||this.template}close(e){var t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}_ironOverlayCanceled(e){e.preventDefault()}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_outsideClickListener(e){if(-1!==e.composedPath().indexOf(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._last)return;const t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last)if("Tab"===e.key&&this.focusTrap&&!e.defaultPrevented)this._cycleTab(e.shiftKey?-1:1),e.preventDefault();else if("Escape"===e.key||"Esc"===e.key){const t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}_ensureTemplatized(){this._setTemplateFromNodes(Array.from(this.children))}_openedChanged(e,t){this._instance||this._ensureTemplatized(),e?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),m(this,(()=>{this.focusTrap&&!this.contains(document._activeElement||document.activeElement)&&this._cycleTab(0,0);const e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(e)})),this.modeless||this._addGlobalListeners()):t&&(this._animatedClosing(),this.modeless||this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const e=getComputedStyle(this).getPropertyValue("animation-name");return!("none"===getComputedStyle(this).getPropertyValue("display"))&&e&&"none"!=e}_enqueueAnimation(e,t){const i=`__${e}Handler`,s=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(e){const t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening","");const e=()=>{document.addEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this.removeAttribute("opening")};this._shouldAnimate()?this._enqueueAnimation("opening",e):e()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_animatedClosing(){if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){if(this._exitModalState(),this.restoreFocusOnClose&&this.__restoreFocusNode){const e=this._getActiveElement();(e===document.body||this._deepContains(e))&&this.__restoreFocusNode.focus(),this.__restoreFocusNode=null}this.setAttribute("closing","");const e=()=>{document.removeEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this._detachOverlay(),this.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),this.removeAttribute("closing")};this._shouldAnimate()?this._enqueueAnimation("closing",e):e()}}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}static get __attachedInstances(){return Array.from(document.body.children).filter((e=>e instanceof R&&!e.hasAttribute("closing"))).sort(((e,t)=>e.__zIndex-t.__zIndex||0))}get _last(){return this===R.__attachedInstances.pop()}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0),document.addEventListener("keydown",this._boundKeydownListener)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),R.__attachedInstances.forEach((e=>{e!==this&&(e.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0),document.removeEventListener("keydown",this._boundKeydownListener)}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=R.__attachedInstances;let t;for(;(t=e.pop())&&(t===this||(t.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),t.modeless)););}_removeOldContent(){this.content&&this._contentNodes&&(this._observer.disconnect(),this._contentNodes.forEach((e=>{e.parentNode===this.content&&this.content.removeChild(e)})),this._originalContentPart&&(this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content),this.$.content=this._originalContentPart,this._originalContentPart=void 0),this._observer.connect(),this._contentNodes=void 0,this.content=void 0)}_stampOverlayTemplate(e,t){this._removeOldContent(),e._Templatizer||(e._Templatizer=f(e,this,{instanceProps:t,forwardHostProp:function(e,t){this._instance&&this._instance.forwardHostProp(e,t)}})),this._instance=new e._Templatizer({}),this._contentNodes=Array.from(this._instance.root.childNodes);const i=e._templateRoot||(e._templateRoot=e.getRootNode());if(i!==document){const e=window.ShadyCSS&&!window.ShadyCSS.nativeShadow;this.$.content.shadowRoot||this.$.content.attachShadow({mode:"open"});let t=Array.from(i.querySelectorAll("style")).reduce(((e,t)=>e+t.textContent),"");if(e){const e=window.ShadyCSS.ScopingShim._styleInfoForNode(i.host);e&&(t+=e._getStyleRules().parsedCssText,t+="}")}if(t=t.replace(/:host/g,":host-nomatch"),t)if(e){const e=(e=>{const t=L[e]||A(e);return document.createElement(t)})(t);e.id="content",e.setAttribute("part","content"),this.$.content.parentNode.replaceChild(e,this.$.content),e.className=this.$.content.className,this._originalContentPart=this.$.content,this.$.content=e}else{const e=document.createElement("style");e.textContent=t,this.$.content.shadowRoot.appendChild(e),this._contentNodes.unshift(e)}this.$.content.shadowRoot.appendChild(this._instance.root),this.content=this.$.content.shadowRoot}else this.appendChild(this._instance.root),this.content=this}_removeNewRendererOrTemplate(e,t,i,s){e!==t?this.template=void 0:i!==s&&(this.renderer=void 0)}render(){this.renderer&&this.renderer.call(this.owner,this.content,this.owner,this.model)}_templateOrRendererChanged(e,t,i,s,o,n){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for overlay content");const r=this._oldOwner!==i||this._oldModel!==s;this._oldModel=s,this._oldOwner=i;const a=this._oldInstanceProps!==o||this._oldTemplate!==e;this._oldInstanceProps=o,this._oldTemplate=e;const l=this._oldRenderer!==t;this._oldRenderer=t;const h=this._oldOpened!==n;if(this._oldOpened=n,e&&a)this._stampOverlayTemplate(e,o);else if(t&&(l||h||r)){if(this.content=this,l)for(;this.content.firstChild;)this.content.removeChild(this.content.firstChild);n&&this.render()}}_isFocused(e){return e&&e.getRootNode().activeElement===e}_focusedIndex(e){return(e=e||this._getFocusableElements()).indexOf(e.filter(this._isFocused).pop())}_cycleTab(e,t){const i=this._getFocusableElements();void 0===t&&(t=this._focusedIndex(i)),(t+=e)>=i.length?t=0:t<0&&(t=i.length-1),i[t].focus()}_getFocusableElements(){return class{static getTabbableNodes(e){const t=[];return this._collectTabbableNodes(e,t)?this._sortByTabIndex(t):t}static isFocusable(e){return k.call(e,"input, select, textarea, button, object")?k.call(e,":not([disabled])"):k.call(e,"a[href], area[href], iframe, [tabindex], [contentEditable]")}static isTabbable(e){return this.isFocusable(e)&&k.call(e,':not([tabindex="-1"])')&&this._isVisible(e)}static _normalizedTabIndex(e){if(this.isFocusable(e)){const t=e.getAttribute("tabindex")||0;return Number(t)}return-1}static _collectTabbableNodes(e,t){if(e.nodeType!==Node.ELEMENT_NODE||!this._isVisible(e))return!1;const i=e,s=this._normalizedTabIndex(i);let o,n=s>0;if(s>=0&&t.push(i),o="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,o)for(let e=0;e<o.length;e++)n=this._collectTabbableNodes(o[e],t)||n;return n}static _isVisible(e){let t=e.style;return"hidden"!==t.visibility&&"none"!==t.display&&(t=window.getComputedStyle(e),"hidden"!==t.visibility&&"none"!==t.display)}static _sortByTabIndex(e){const t=e.length;if(t<2)return e;const i=Math.ceil(t/2),s=this._sortByTabIndex(e.slice(0,i)),o=this._sortByTabIndex(e.slice(i));return this._mergeSortByTabIndex(s,o)}static _mergeSortByTabIndex(e,t){const i=[];for(;e.length>0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?i.push(t.shift()):i.push(e.shift());return i.concat(e,t)}static _hasLowerTabOrder(e,t){const i=Math.max(e.tabIndex,0),s=Math.max(t.tabIndex,0);return 0===i||0===s?s>i:i>s}}.getTabbableNodes(this.$.overlay)}_getActiveElement(){let e=document._activeElement||document.activeElement;for(e&&e!==document.documentElement&&e instanceof Element!=!1||(e=document.body);e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}_deepContains(e){if(this.contains(e))return!0;let t=e;const i=e.ownerDocument;for(;t&&t!==i&&t!==this;)t=t.parentNode||t.host;return t===this}bringToFront(){let e="";const t=R.__attachedInstances.filter((e=>e!==this)).pop();if(t){e=t.__zIndex+1}this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex)}}customElements.define(R.is,R);const B=document.createElement("template");B.innerHTML='<dom-module id="lumo-menu-overlay-core">\n <template>\n <style>\n :host([opening]),\n :host([closing]) {\n animation: 0.14s lumo-overlay-dummy-animation;\n }\n\n [part="overlay"] {\n will-change: opacity, transform;\n }\n\n :host([opening]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-enter ease-out both;\n }\n\n @keyframes lumo-menu-overlay-enter {\n 0% {\n opacity: 0;\n transform: translateY(-4px);\n }\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-exit both;\n }\n\n @keyframes lumo-menu-overlay-exit {\n 100% {\n opacity: 0;\n }\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-menu-overlay">\n <template>\n <style include="lumo-overlay lumo-menu-overlay-core">\n /* Small viewport (bottom sheet) styles */\n /* Use direct media queries instead of the state attributes (`[phone]` and `[fullscreen]`) provided by the elements */\n @media (max-width: 420px), (max-height: 420px) {\n :host {\n top: 0 !important;\n right: 0 !important;\n bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;\n left: 0 !important;\n align-items: stretch !important;\n justify-content: flex-end !important;\n }\n\n [part="overlay"] {\n max-height: 50vh;\n width: 100vw;\n border-radius: 0;\n box-shadow: var(--lumo-box-shadow-xl);\n }\n\n /* The content part scrolls instead of the overlay part, because of the gradient fade-out */\n [part="content"] {\n padding: 30px var(--lumo-space-m);\n max-height: inherit;\n box-sizing: border-box;\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n }\n\n [part="backdrop"] {\n display: block;\n }\n\n /* Animations */\n\n :host([opening]) [part="overlay"] {\n animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(.215, .61, .355, 1) both;\n }\n\n :host([closing]),\n :host([closing]) [part="backdrop"] {\n animation-delay: 0.14s;\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(.55, .055, .675, .19) both;\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-enter {\n 0% {\n transform: translateY(150%);\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-exit {\n 100% {\n transform: translateY(150%);\n }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(B.content);const F=o`<dom-module id="lumo-combo-box-overlay" theme-for="vaadin-combo-box-overlay">
108
99
  <template>
109
100
  <style include="lumo-overlay lumo-menu-overlay-core">
110
101
  [part="content"] {
@@ -195,7 +186,7 @@ let L=0;const B={},F=e=>{L++;const t=`vaadin-overlay-content-${L}`,i=document.cr
195
186
  }
196
187
  </style>
197
188
  </template>
198
- </dom-module>`;document.head.appendChild(H.content);const D=o`<dom-module id="lumo-item" theme-for="vaadin-item">
189
+ </dom-module>`;document.head.appendChild(F.content);const z=o`<dom-module id="lumo-item" theme-for="vaadin-item">
199
190
  <template>
200
191
  <style>
201
192
  :host {
@@ -259,18 +250,13 @@ let L=0;const B={},F=e=>{L++;const t=`vaadin-overlay-content-${L}`,i=document.cr
259
250
  }
260
251
  </style>
261
252
  </template>
262
- </dom-module>`;document.head.appendChild(D.content);
253
+ </dom-module>`;document.head.appendChild(z.content);
263
254
  /**
264
255
  @license
265
256
  Copyright (c) 2017 Vaadin Ltd.
266
257
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
267
258
  */
268
- const M=e=>class extends e{static get properties(){return{_hasVaadinItemMixin:{value:!0},disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get value(){return void 0!==this._value?this._value:this.textContent.trim()}set value(e){this._value=e}ready(){super.ready();const e=this.getAttribute("value");null!==e&&(this.value=e),this.addEventListener("focus",(e=>this._setFocused(!0)),!0),this.addEventListener("blur",(e=>this._setFocused(!1)),!0),this.addEventListener("mousedown",(e=>{this._setActive(this._mousedown=!0);const t=()=>{this._setActive(this._mousedown=!1),document.removeEventListener("mouseup",t)};document.addEventListener("mouseup",t)})),this.addEventListener("keydown",(e=>this._onKeydown(e))),this.addEventListener("keyup",(e=>this._onKeyup(e)))}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("active")&&this._setFocused(!1)}_selectedChanged(e){this.setAttribute("aria-selected",e)}_disabledChanged(e){e?(this.selected=!1,this.setAttribute("aria-disabled","true"),this.blur()):this.removeAttribute("aria-disabled")}_setFocused(e){e?(this.setAttribute("focused",""),this._mousedown||this.setAttribute("focus-ring","")):(this.removeAttribute("focused"),this.removeAttribute("focus-ring"),this._setActive(!1))}_setActive(e){e?this.setAttribute("active",""):this.removeAttribute("active")}_onKeydown(e){/^( |SpaceBar|Enter)$/.test(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this._setActive(!0))}_onKeyup(e){this.hasAttribute("active")&&(this._setActive(!1),this.click())}}
269
- /**
270
- @license
271
- Copyright (c) 2017 Vaadin Ltd.
272
- This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
273
- */;class K extends(M(e(t(n)))){static get template(){return o`
259
+ class $ extends(p(e(t(n)))){static get template(){return o`
274
260
  <style>
275
261
  :host {
276
262
  display: inline-block;
@@ -283,7 +269,7 @@ This program is available under Apache License Version 2.0, available at https:/
283
269
  <div part="content">
284
270
  <slot></slot>
285
271
  </div>
286
- `}static get is(){return"vaadin-item"}static get version(){return"2.3.0"}constructor(){super(),this.value}}customElements.define(K.is,K);const q=o`<dom-module id="lumo-combo-box-item" theme-for="vaadin-combo-box-item">
272
+ `}static get is(){return"vaadin-item"}static get version(){return"2.3.0"}constructor(){super(),this.value}}customElements.define($.is,$);const H=o`<dom-module id="lumo-combo-box-item" theme-for="vaadin-combo-box-item">
287
273
  <template>
288
274
  <style include="lumo-item">
289
275
  /* TODO partly duplicated from vaadin-list-box styles. Should find a way to make it DRY */
@@ -329,7 +315,7 @@ This program is available under Apache License Version 2.0, available at https:/
329
315
  }
330
316
  </style>
331
317
  </template>
332
- </dom-module>`;document.head.appendChild(q.content);const j=o`<dom-module id="lumo-combo-box" theme-for="vaadin-combo-box">
318
+ </dom-module>`;document.head.appendChild(H.content);const N=o`<dom-module id="lumo-combo-box" theme-for="vaadin-combo-box">
333
319
  <template>
334
320
  <style include="lumo-field-button">
335
321
  :host {
@@ -341,7 +327,7 @@ This program is available under Apache License Version 2.0, available at https:/
341
327
  }
342
328
  </style>
343
329
  </template>
344
- </dom-module>`;document.head.appendChild(j.content);
330
+ </dom-module>`;document.head.appendChild(N.content);
345
331
  /**
346
332
  @license
347
333
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -352,7 +338,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
352
338
  part of the polymer project is also subject to an additional IP rights grant
353
339
  found at http://polymer.github.io/PATENTS.txt
354
340
  */
355
- const W=f({_template:o`
341
+ const M=b({_template:o`
356
342
  <style>
357
343
  :host {
358
344
  display: inline-block;
@@ -361,7 +347,7 @@ const W=f({_template:o`
361
347
  }
362
348
  </style>
363
349
  <div aria-live$="[[mode]]">[[_text]]</div>
364
- `,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){W.instance||(W.instance=this),document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async((function(){this._text=e}),this.timeout)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});W.instance=null,W.requestAvailability=function(){W.instance||(W.instance=document.createElement("iron-a11y-announcer")),document.body?document.body.appendChild(W.instance):document.addEventListener("load",(function(){document.body.appendChild(W.instance)}))};
350
+ `,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){M.instance||(M.instance=this),document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async((function(){this._text=e}),this.timeout)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});M.instance=null,M.requestAvailability=function(){M.instance||(M.instance=document.createElement("iron-a11y-announcer")),document.body?document.body.appendChild(M.instance):document.addEventListener("load",(function(){document.body.appendChild(M.instance)}))};
365
351
  /**
366
352
  @license
367
353
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -372,31 +358,21 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
372
358
  part of the polymer project is also subject to an additional IP rights grant
373
359
  found at http://polymer.github.io/PATENTS.txt
374
360
  */
375
- var U={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},Y={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},G={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},X=/[a-z0-9*]/,J=/U\+/,Q=/^arrow/,Z=/^space(bar)?/,ee=/^escape$/;function te(e,t){var i="";if(e){var s=e.toLowerCase();" "===s||Z.test(s)?i="space":ee.test(s)?i="esc":1==s.length?t&&!X.test(s)||(i=s):i=Q.test(s)?s.replace("arrow",""):"multiply"==s?"*":s}return i}function ie(e,t){return e.key?te(e.key,t):e.detail&&e.detail.key?te(e.detail.key,t):(i=e.keyIdentifier,s="",i&&(i in U?s=U[i]:J.test(i)?(i=parseInt(i.replace("U+","0x"),16),s=String.fromCharCode(i).toLowerCase()):s=i.toLowerCase()),s||function(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):Y[e]),t}(e.keyCode)||"");var i,s}function se(e,t){return ie(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function oe(e){return e.trim().split(" ").map((function(e){return function(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce((function(e,t){var i=t.split(":"),s=i[0],o=i[1];return s in G?(e[G[s]]=!0,e.hasModifiers=!0):(e.key=s,e.event=o||"keydown"),e}),{combo:e.split(":").shift()})}(e)}))}const ne={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var i=oe(t),s=0;s<i.length;++s)if(se(i[s],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map((function(e){return e.keyBindings}));return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){for(var e in this._keyBindings={},this._collectKeyBindings().forEach((function(e){for(var t in e)this._addKeyBinding(t,e[t])}),this),this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort((function(e,t){var i=e[0].hasModifiers;return i===t[0].hasModifiers?0:i?-1:1}))},_addKeyBinding:function(e,t){oe(e).forEach((function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])}),this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach((function(e){var t=this._keyBindings[e],i=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,i]),this.keyEventTarget.addEventListener(e,i)}),this)},_unlistenKeyEventListeners:function(){for(var e,t,i,s;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],i=e[1],s=e[2],t.removeEventListener(i,s)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var i=0;i<e.length;i++){var s=e[i][0],o=e[i][1];if(se(s,t)&&(this._triggerKeyHandler(s,o,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,i){var s=Object.create(e);s.keyboardEvent=i;var o=new CustomEvent(e.event,{detail:s,cancelable:!0});this[t].call(this,o),o.defaultPrevented&&i.preventDefault()}},re=class{toString(){return""}},ae=e=>class extends e{static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,observer:"_openedChanged"},autoOpenDisabled:Boolean,disabled:{type:Boolean,value:!1,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:Function,items:{type:Array,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array},value:{type:String,observer:"_valueChanged",notify:!0,value:""},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0},_focusedIndex:{type:Number,value:-1},filter:{type:String,value:"",notify:!0},selectedItem:{type:Object,notify:!0},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged"},itemValuePath:{type:String,value:"value"},itemIdPath:String,name:{type:String},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},_toggleElement:Object,_clearElement:Object,_inputElementValue:String,_closeOnBlurIsPrevented:Boolean,_previousDocumentPointerEvents:String,_itemTemplate:Object}}static get observers(){return["_filterChanged(filter, itemValuePath, itemLabelPath)","_itemsOrPathsChanged(items.*, itemValuePath, itemLabelPath)","_filteredItemsChanged(filteredItems.*, itemValuePath, itemLabelPath)","_templateOrRendererChanged(_itemTemplate, renderer)","_loadingChanged(loading)","_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_toggleElementChanged(_toggleElement)"]}constructor(){super(),this._boundOnFocusout=this._onFocusout.bind(this),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundClose=this.close.bind(this),this._boundOnOpened=this._onOpened.bind(this),this._boundOnKeyDown=this._onKeyDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}ready(){super.ready(),this.addEventListener("focusout",this._boundOnFocusout),this._lastCommittedValue=this.value,W.requestAvailability(),this.$.overlay.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this.addEventListener("vaadin-combo-box-dropdown-closed",this._boundClose),this.addEventListener("vaadin-combo-box-dropdown-opened",this._boundOnOpened),this.addEventListener("keydown",this._boundOnKeyDown),this.addEventListener("click",this._boundOnClick),this.$.overlay.addEventListener("vaadin-overlay-touch-action",this._boundOnOverlayTouchAction),this.addEventListener("touchend",this._boundOnTouchend),this._observer=new v(this,(e=>{this._setTemplateFromNodes(e.addedNodes)}));const e=e=>{const t=this.$.overlay,i=t&&t.$.dropdown;i&&i.$&&this.$.overlay.$.dropdown.$.overlay.bringToFront&&requestAnimationFrame((()=>{i.$.overlay.bringToFront()}))};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e)}render(){this.$.overlay._selector&&this.$.overlay._selector.querySelectorAll("vaadin-combo-box-item").forEach((e=>e._render()))}_setTemplateFromNodes(e){this._itemTemplate=e.filter((e=>e.localName&&"template"===e.localName))[0]||this._itemTemplate}_removeNewRendererOrTemplate(e,t,i,s){e!==t?this._itemTemplate=void 0:i!==s&&(this.renderer=void 0)}_templateOrRendererChanged(e,t){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for combo box items");this._oldTemplate=e,this._oldRenderer=t}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.opened=!1}_openedChanged(e,t){void 0!==t&&(this.opened?(this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement&&this.focusElement.hasAttribute("focus-ring"),this.hasAttribute("focused")||this.$.overlay.touchDevice||this.focus()):(this._onClosed(),this._openedWithFocusRing&&this.hasAttribute("focused")&&this.focusElement.setAttribute("focus-ring","")))}_onOverlayTouchAction(e){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_onClick(e){this._closeOnBlurIsPrevented=!0;const t=e.composedPath();-1!==t.indexOf(this._clearElement)||"clear-button"===t[0].getAttribute("part")?(this._clear(),this.focus()):-1!==t.indexOf(this.inputElement)&&(t.indexOf(this._toggleElement)>-1&&this.opened?this.close():(t.indexOf(this._toggleElement)>-1||!this.autoOpenDisabled)&&this.open()),this._closeOnBlurIsPrevented=!1}_onKeyDown(e){this._isEventKey(e,"down")?(this._closeOnBlurIsPrevented=!0,this._onArrowDown(),this._closeOnBlurIsPrevented=!1,e.preventDefault()):this._isEventKey(e,"up")?(this._closeOnBlurIsPrevented=!0,this._onArrowUp(),this._closeOnBlurIsPrevented=!1,e.preventDefault()):this._isEventKey(e,"enter")?this._onEnter(e):this._isEventKey(e,"esc")&&this._onEscape(e)}_isEventKey(e,t){return ne.keyboardEventMatchesKeys(e,t)}_getItemLabel(e){return this.$.overlay.getItemLabel(e)}_getItemValue(e){let t=e&&this.itemValuePath?this.get(this.itemValuePath,e):void 0;return void 0===t&&(t=e?e.toString():""),t}_onArrowDown(){this.opened?this.$.overlay._items&&(this._focusedIndex=Math.min(this.$.overlay._items.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel()):this.open()}_onArrowUp(){this.opened?(this._focusedIndex>-1?this._focusedIndex=Math.max(0,this._focusedIndex-1):this.$.overlay._items&&(this._focusedIndex=this.$.overlay._items.length-1),this._prefillFocusedItemLabel()):this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue="",setTimeout((()=>{this._inputElementValue=this._getItemLabel(this.$.overlay._focusedItem),this._markAllSelectionRange()}),1))}_setSelectionRange(e,t){const i=this._nativeInput||this.inputElement;if(this.hasAttribute("focused")&&i&&i.setSelectionRange)try{i.setSelectionRange(e,t)}catch(e){}}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(e){(this.opened||this.autoOpenDisabled)&&(this.allowCustomValue||""===this._inputElementValue||this._focusedIndex>-1)&&(this._closeOrCommit(),e.preventDefault(),e.stopPropagation())}_onEscape(e){this.autoOpenDisabled?this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0?(this._stopPropagation(e),this._focusedIndex=-1,this.cancel()):this.clearButtonVisible&&!this.opened&&this.value&&(this._stopPropagation(e),this._clear()):this.opened?(this._stopPropagation(e),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&(this._stopPropagation(e),this._clear())}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",(e=>e.preventDefault())),e.addEventListener("click",(e=>{this.$.overlay.touchDevice&&!this.hasAttribute("focused")&&document.activeElement.blur()})))}_clear(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){g(),this.$.overlay.ensureItemsRendered(),this.$.overlay._selector.toggleScrollListener(!0),this.$.overlay.updateViewportBoundaries(),this.$.overlay._selector._increasePoolIfNeeded(),setTimeout((()=>this._resizeDropdown()),1),window.requestAnimationFrame((()=>this.$.overlay.adjustScrollPosition())),this._lastCommittedValue=this.value}_onClosed(){this.opened&&this.close(),this.loading&&!this.allowCustomValue||this._commitValue()}_commitValue(){if(this.$.overlay._items&&this._focusedIndex>-1){const e=this.$.overlay._items[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem)}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const e=e=>e&&e.toLowerCase&&e.toLowerCase(),t=[...this.filteredItems||[],this.selectedItem].filter((t=>e(this._getItemLabel(t))===e(this._inputElementValue)))[0];if(this.allowCustomValue&&!t){const e=new CustomEvent("custom-value-set",{detail:this._inputElementValue,composed:!0,cancelable:!0,bubbles:!0});if(this.dispatchEvent(e),!e.defaultPrevented){const e=this._inputElementValue;this._selectItemForValue(e),this.value=e}}else this.allowCustomValue||this.opened||!t?this._inputElementValue=this.selectedItem?this._getItemLabel(this.selectedItem):this.value||"":this.value=this._getItemValue(t)}this._detectAndDispatchChange(),this._clearSelectionRange(),this.dataProvider||(this.filter="")}get _propertyForValue(){return"value"}_inputValueChanged(e){-1!==e.composedPath().indexOf(this.inputElement)&&(this._inputElementValue=this.inputElement[this._propertyForValue],this._filterFromInput(e))}_filterFromInput(e){this.opened||e.__fromClearButton||this.autoOpenDisabled||this.open(),this.filter===this._inputElementValue?this._filterChanged(this.filter,this.itemValuePath,this.itemLabelPath):this.filter=this._inputElementValue}_itemLabelPathChanged(e,t){"string"!=typeof e&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(e,t,i){void 0!==e&&(this.$.overlay.filterChanged=!0,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged({path:"filteredItems",value:this.filteredItems},t,i))}_loadingChanged(e){e&&(this._focusedIndex=-1)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem)}_resizeDropdown(){this.$.overlay.$.dropdown.notifyResize()}_updateHasValue(e){e?this.setAttribute("has-value",""):this.removeAttribute("has-value")}_selectedItemChanged(e,t){if(null==e)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._updateHasValue(""!==this.value),this._inputElementValue=this.value);else{const t=this._getItemValue(e);if(this.value!==t&&(this.value=t,this.value!==t))return;this._updateHasValue(!0),this._inputElementValue=this._getItemLabel(e),this.inputElement&&(this.inputElement[this._propertyForValue]=this._inputElementValue)}this.$.overlay._selectedItem=e,this.filteredItems&&this.$.overlay._items&&(this._focusedIndex=this.filteredItems.indexOf(e))}_valueChanged(e,t){if(""!==e||void 0!==t){if(this._isValidValue(e)){let t;this._getItemValue(this.selectedItem)!==e?this._selectItemForValue(e):t=this.selectedItem,!t&&this.allowCustomValue&&(this._inputElementValue=e),this._updateHasValue(""!==this.value)}else this.selectedItem=null;this._lastCommittedValue=void 0}}_detectAndDispatchChange(){this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(e,t){this._ensureItemsOrDataProvider((()=>{this.items=t}))}_itemsOrPathsChanged(e,t,i){if("items"===e.path||"items.splices"===e.path){this.items?this.filteredItems=this.items.slice(0):this.__previousItems&&(this.filteredItems=null);const e=this._indexOfValue(this.value,this.items);this._focusedIndex=e;const t=e>-1&&this.items[e];t&&(this.selectedItem=t)}this.__previousItems=e.value}_filteredItemsChanged(e,t,i){"filteredItems"!==e.path&&"filteredItems.splices"!==e.path||(this._setOverlayItems(this.filteredItems),this._focusedIndex=this.opened||this.autoOpenDisabled?this.$.overlay.indexOfLabel(this.filter):this._indexOfValue(this.value,this.filteredItems),this.opened&&this._repositionOverlay())}_filterItems(e,t){if(!e)return e;return e.filter((e=>(t=t?t.toString().toLowerCase():"",this._getItemLabel(e).toString().toLowerCase().indexOf(t)>-1)))}_selectItemForValue(e){const t=this._indexOfValue(e,this.filteredItems),i=this.selectedItem;this.selectedItem=t>=0?this.filteredItems[t]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setOverlayItems(e){this.$.overlay.set("_items",e)}_repositionOverlay(){this.__repositionOverlayDebouncer=r.debounce(this.__repositionOverlayDebouncer,a.after(500),(()=>{const e=this.$.overlay._selector;e._isClientFull()||e._resetScrollPosition(e._physicalTop),this._resizeDropdown(),this.$.overlay.updateViewportBoundaries(),this.$.overlay.ensureItemsRendered(),e.notifyResize(),g()}))}_indexOfValue(e,t){if(t&&this._isValidValue(e))for(let i=0;i<t.length;i++)if(this._getItemValue(t[i])===e)return i;return-1}_isValidValue(e){return null!=e}_overlaySelectedItemChanged(e){e.stopPropagation(),e.detail.item instanceof re||(this.opened?(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close()):this.selectedItem!==e.detail.item&&(this.selectedItem=e.detail.item,this._detectAndDispatchChange()))}_onFocusout(e){const t=this.$.overlay.$.dropdown;t&&t.$&&e.relatedTarget===t.$.overlay?e.composedPath()[0].focus():this.readonly||this._closeOnBlurIsPrevented||this._closeOrCommit()}_onTouchend(e){this._clearElement&&e.composedPath()[0]===this._clearElement&&(e.preventDefault(),this._clear())}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){if(this.inputElement.validate)return this.inputElement.validate()}get _instanceProps(){return{item:!0,index:!0,selected:!0,focused:!0}}_ensureTemplatized(){if(!this._TemplateClass){const e=this._itemTemplate||this._getRootTemplate();e&&(this._TemplateClass=m(e,this,{instanceProps:this._instanceProps,forwardHostProp:function(e,t){const i=this.$.overlay._selector.querySelectorAll("vaadin-combo-box-item");Array.prototype.forEach.call(i,(i=>{i._itemTemplateInstance&&(i._itemTemplateInstance.set(e,t),i._itemTemplateInstance.notifyPath(e,t,!0))}))}}))}}_getRootTemplate(){return Array.prototype.filter.call(this.children,(e=>"TEMPLATE"===e.tagName))[0]}_preventInputBlur(){this._toggleElement&&this._toggleElement.addEventListener("click",this._preventDefault),this._clearElement&&this._clearElement.addEventListener("click",this._preventDefault)}_restoreInputBlur(){this._toggleElement&&this._toggleElement.removeEventListener("click",this._preventDefault),this._clearElement&&this._clearElement.removeEventListener("click",this._preventDefault)}_preventDefault(e){e.preventDefault()}_stopPropagation(e){e.stopPropagation()}}
361
+ var D={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},K={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},j={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},q=/[a-z0-9*]/,W=/U\+/,U=/^arrow/,Y=/^space(bar)?/,G=/^escape$/;function X(e,t){var i="";if(e){var s=e.toLowerCase();" "===s||Y.test(s)?i="space":G.test(s)?i="esc":1==s.length?t&&!q.test(s)||(i=s):i=U.test(s)?s.replace("arrow",""):"multiply"==s?"*":s}return i}function J(e,t){return e.key?X(e.key,t):e.detail&&e.detail.key?X(e.detail.key,t):(i=e.keyIdentifier,s="",i&&(i in D?s=D[i]:W.test(i)?(i=parseInt(i.replace("U+","0x"),16),s=String.fromCharCode(i).toLowerCase()):s=i.toLowerCase()),s||function(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):K[e]),t}(e.keyCode)||"");var i,s}function Q(e,t){return J(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function Z(e){return e.trim().split(" ").map((function(e){return function(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce((function(e,t){var i=t.split(":"),s=i[0],o=i[1];return s in j?(e[j[s]]=!0,e.hasModifiers=!0):(e.key=s,e.event=o||"keydown"),e}),{combo:e.split(":").shift()})}(e)}))}const ee={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var i=Z(t),s=0;s<i.length;++s)if(Q(i[s],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map((function(e){return e.keyBindings}));return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){for(var e in this._keyBindings={},this._collectKeyBindings().forEach((function(e){for(var t in e)this._addKeyBinding(t,e[t])}),this),this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort((function(e,t){var i=e[0].hasModifiers;return i===t[0].hasModifiers?0:i?-1:1}))},_addKeyBinding:function(e,t){Z(e).forEach((function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])}),this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach((function(e){var t=this._keyBindings[e],i=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,i]),this.keyEventTarget.addEventListener(e,i)}),this)},_unlistenKeyEventListeners:function(){for(var e,t,i,s;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],i=e[1],s=e[2],t.removeEventListener(i,s)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var i=0;i<e.length;i++){var s=e[i][0],o=e[i][1];if(Q(s,t)&&(this._triggerKeyHandler(s,o,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,i){var s=Object.create(e);s.keyboardEvent=i;var o=new CustomEvent(e.event,{detail:s,cancelable:!0});this[t].call(this,o),o.defaultPrevented&&i.preventDefault()}},te=class{toString(){return""}},ie=e=>class extends e{static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,observer:"_openedChanged"},autoOpenDisabled:Boolean,disabled:{type:Boolean,value:!1,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:Function,items:{type:Array,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array},value:{type:String,observer:"_valueChanged",notify:!0,value:""},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0},_focusedIndex:{type:Number,value:-1},filter:{type:String,value:"",notify:!0},selectedItem:{type:Object,notify:!0},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged"},itemValuePath:{type:String,value:"value"},itemIdPath:String,name:{type:String},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},_toggleElement:Object,_clearElement:Object,_inputElementValue:String,_closeOnBlurIsPrevented:Boolean,_previousDocumentPointerEvents:String,_itemTemplate:Object}}static get observers(){return["_filterChanged(filter, itemValuePath, itemLabelPath)","_itemsOrPathsChanged(items.*, itemValuePath, itemLabelPath)","_filteredItemsChanged(filteredItems.*, itemValuePath, itemLabelPath)","_templateOrRendererChanged(_itemTemplate, renderer)","_loadingChanged(loading)","_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_toggleElementChanged(_toggleElement)"]}constructor(){super(),this._boundOnFocusout=this._onFocusout.bind(this),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundClose=this.close.bind(this),this._boundOnOpened=this._onOpened.bind(this),this._boundOnKeyDown=this._onKeyDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}ready(){super.ready(),this.addEventListener("focusout",this._boundOnFocusout),this._lastCommittedValue=this.value,M.requestAvailability(),this.$.overlay.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this.addEventListener("vaadin-combo-box-dropdown-closed",this._boundClose),this.addEventListener("vaadin-combo-box-dropdown-opened",this._boundOnOpened),this.addEventListener("keydown",this._boundOnKeyDown),this.addEventListener("click",this._boundOnClick),this.$.overlay.addEventListener("vaadin-overlay-touch-action",this._boundOnOverlayTouchAction),this.addEventListener("touchend",this._boundOnTouchend),this._observer=new y(this,(e=>{this._setTemplateFromNodes(e.addedNodes)}));const e=e=>{const t=this.$.overlay,i=t&&t.$.dropdown;i&&i.$&&this.$.overlay.$.dropdown.$.overlay.bringToFront&&requestAnimationFrame((()=>{i.$.overlay.bringToFront()}))};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e)}render(){this.$.overlay._selector&&this.$.overlay._selector.querySelectorAll("vaadin-combo-box-item").forEach((e=>e._render()))}_setTemplateFromNodes(e){this._itemTemplate=e.filter((e=>e.localName&&"template"===e.localName))[0]||this._itemTemplate}_removeNewRendererOrTemplate(e,t,i,s){e!==t?this._itemTemplate=void 0:i!==s&&(this.renderer=void 0)}_templateOrRendererChanged(e,t){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for combo box items");this._oldTemplate=e,this._oldRenderer=t}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.opened=!1}_openedChanged(e,t){void 0!==t&&(this.opened?(this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement&&this.focusElement.hasAttribute("focus-ring"),this.hasAttribute("focused")||this.$.overlay.touchDevice||this.focus()):(this._onClosed(),this._openedWithFocusRing&&this.hasAttribute("focused")&&this.focusElement.setAttribute("focus-ring","")))}_onOverlayTouchAction(e){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_onClick(e){this._closeOnBlurIsPrevented=!0;const t=e.composedPath();-1!==t.indexOf(this._clearElement)||"clear-button"===t[0].getAttribute("part")?(this._clear(),this.focus()):-1!==t.indexOf(this.inputElement)&&(t.indexOf(this._toggleElement)>-1&&this.opened?this.close():(t.indexOf(this._toggleElement)>-1||!this.autoOpenDisabled)&&this.open()),this._closeOnBlurIsPrevented=!1}_onKeyDown(e){this._isEventKey(e,"down")?(this._closeOnBlurIsPrevented=!0,this._onArrowDown(),this._closeOnBlurIsPrevented=!1,e.preventDefault()):this._isEventKey(e,"up")?(this._closeOnBlurIsPrevented=!0,this._onArrowUp(),this._closeOnBlurIsPrevented=!1,e.preventDefault()):this._isEventKey(e,"enter")?this._onEnter(e):this._isEventKey(e,"esc")&&this._onEscape(e)}_isEventKey(e,t){return ee.keyboardEventMatchesKeys(e,t)}_getItemLabel(e){return this.$.overlay.getItemLabel(e)}_getItemValue(e){let t=e&&this.itemValuePath?this.get(this.itemValuePath,e):void 0;return void 0===t&&(t=e?e.toString():""),t}_onArrowDown(){this.opened?this.$.overlay._items&&(this._focusedIndex=Math.min(this.$.overlay._items.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel()):this.open()}_onArrowUp(){this.opened?(this._focusedIndex>-1?this._focusedIndex=Math.max(0,this._focusedIndex-1):this.$.overlay._items&&(this._focusedIndex=this.$.overlay._items.length-1),this._prefillFocusedItemLabel()):this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue="",setTimeout((()=>{this._inputElementValue=this._getItemLabel(this.$.overlay._focusedItem),this._markAllSelectionRange()}),1))}_setSelectionRange(e,t){const i=this._nativeInput||this.inputElement;if(this.hasAttribute("focused")&&i&&i.setSelectionRange)try{i.setSelectionRange(e,t)}catch(e){}}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(e){(this.opened||this.autoOpenDisabled)&&(this.allowCustomValue||""===this._inputElementValue||this._focusedIndex>-1)&&(this._closeOrCommit(),e.preventDefault(),e.stopPropagation())}_onEscape(e){this.autoOpenDisabled?this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0?(this._stopPropagation(e),this._focusedIndex=-1,this.cancel()):this.clearButtonVisible&&!this.opened&&this.value&&(this._stopPropagation(e),this._clear()):this.opened?(this._stopPropagation(e),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&(this._stopPropagation(e),this._clear())}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",(e=>e.preventDefault())),e.addEventListener("click",(e=>{this.$.overlay.touchDevice&&!this.hasAttribute("focused")&&document.activeElement.blur()})))}_clear(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){I(),this.$.overlay.ensureItemsRendered(),this.$.overlay._selector.toggleScrollListener(!0),this.$.overlay.updateViewportBoundaries(),this.$.overlay._selector._increasePoolIfNeeded(),setTimeout((()=>this._resizeDropdown()),1),window.requestAnimationFrame((()=>this.$.overlay.adjustScrollPosition())),this._lastCommittedValue=this.value}_onClosed(){this.opened&&this.close(),this.loading&&!this.allowCustomValue||this._commitValue()}_commitValue(){if(this.$.overlay._items&&this._focusedIndex>-1){const e=this.$.overlay._items[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem)}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const e=e=>e&&e.toLowerCase&&e.toLowerCase(),t=[...this.filteredItems||[],this.selectedItem].filter((t=>e(this._getItemLabel(t))===e(this._inputElementValue)))[0];if(this.allowCustomValue&&!t){const e=new CustomEvent("custom-value-set",{detail:this._inputElementValue,composed:!0,cancelable:!0,bubbles:!0});if(this.dispatchEvent(e),!e.defaultPrevented){const e=this._inputElementValue;this._selectItemForValue(e),this.value=e}}else this.allowCustomValue||this.opened||!t?this._inputElementValue=this.selectedItem?this._getItemLabel(this.selectedItem):this.value||"":this.value=this._getItemValue(t)}this._detectAndDispatchChange(),this._clearSelectionRange(),this.dataProvider||(this.filter="")}get _propertyForValue(){return"value"}_inputValueChanged(e){-1!==e.composedPath().indexOf(this.inputElement)&&(this._inputElementValue=this.inputElement[this._propertyForValue],this._filterFromInput(e))}_filterFromInput(e){this.opened||e.__fromClearButton||this.autoOpenDisabled||this.open(),this.filter===this._inputElementValue?this._filterChanged(this.filter,this.itemValuePath,this.itemLabelPath):this.filter=this._inputElementValue}_itemLabelPathChanged(e,t){"string"!=typeof e&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(e,t,i){void 0!==e&&(this.$.overlay.filterChanged=!0,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged({path:"filteredItems",value:this.filteredItems},t,i))}_loadingChanged(e){e&&(this._focusedIndex=-1)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem)}_resizeDropdown(){this.$.overlay.$.dropdown.notifyResize()}_updateHasValue(e){e?this.setAttribute("has-value",""):this.removeAttribute("has-value")}_selectedItemChanged(e,t){if(null==e)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._updateHasValue(""!==this.value),this._inputElementValue=this.value);else{const t=this._getItemValue(e);if(this.value!==t&&(this.value=t,this.value!==t))return;this._updateHasValue(!0),this._inputElementValue=this._getItemLabel(e),this.inputElement&&(this.inputElement[this._propertyForValue]=this._inputElementValue)}this.$.overlay._selectedItem=e,this.filteredItems&&this.$.overlay._items&&(this._focusedIndex=this.filteredItems.indexOf(e))}_valueChanged(e,t){if(""!==e||void 0!==t){if(this._isValidValue(e)){let t;this._getItemValue(this.selectedItem)!==e?this._selectItemForValue(e):t=this.selectedItem,!t&&this.allowCustomValue&&(this._inputElementValue=e),this._updateHasValue(""!==this.value)}else this.selectedItem=null;this._lastCommittedValue=void 0}}_detectAndDispatchChange(){this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(e,t){this._ensureItemsOrDataProvider((()=>{this.items=t}))}_itemsOrPathsChanged(e,t,i){if("items"===e.path||"items.splices"===e.path){this.items?this.filteredItems=this.items.slice(0):this.__previousItems&&(this.filteredItems=null);const e=this._indexOfValue(this.value,this.items);this._focusedIndex=e;const t=e>-1&&this.items[e];t&&(this.selectedItem=t)}this.__previousItems=e.value}_filteredItemsChanged(e,t,i){"filteredItems"!==e.path&&"filteredItems.splices"!==e.path||(this._setOverlayItems(this.filteredItems),this._focusedIndex=this.opened||this.autoOpenDisabled?this.$.overlay.indexOfLabel(this.filter):this._indexOfValue(this.value,this.filteredItems),this.opened&&this._repositionOverlay())}_filterItems(e,t){if(!e)return e;return e.filter((e=>(t=t?t.toString().toLowerCase():"",this._getItemLabel(e).toString().toLowerCase().indexOf(t)>-1)))}_selectItemForValue(e){const t=this._indexOfValue(e,this.filteredItems),i=this.selectedItem;this.selectedItem=t>=0?this.filteredItems[t]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setOverlayItems(e){this.$.overlay.set("_items",e)}_repositionOverlay(){this.__repositionOverlayDebouncer=r.debounce(this.__repositionOverlayDebouncer,a.after(500),(()=>{const e=this.$.overlay._selector;e._isClientFull()||e._resetScrollPosition(e._physicalTop),this._resizeDropdown(),this.$.overlay.updateViewportBoundaries(),this.$.overlay.ensureItemsRendered(),e.notifyResize(),I()}))}_indexOfValue(e,t){if(t&&this._isValidValue(e))for(let i=0;i<t.length;i++)if(this._getItemValue(t[i])===e)return i;return-1}_isValidValue(e){return null!=e}_overlaySelectedItemChanged(e){e.stopPropagation(),e.detail.item instanceof te||(this.opened?(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close()):this.selectedItem!==e.detail.item&&(this.selectedItem=e.detail.item,this._detectAndDispatchChange()))}_onFocusout(e){const t=this.$.overlay.$.dropdown;t&&t.$&&e.relatedTarget===t.$.overlay?e.composedPath()[0].focus():this.readonly||this._closeOnBlurIsPrevented||this._closeOrCommit()}_onTouchend(e){this._clearElement&&e.composedPath()[0]===this._clearElement&&(e.preventDefault(),this._clear())}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){if(this.inputElement.validate)return this.inputElement.validate()}get _instanceProps(){return{item:!0,index:!0,selected:!0,focused:!0}}_ensureTemplatized(){if(!this._TemplateClass){const e=this._itemTemplate||this._getRootTemplate();e&&(this._TemplateClass=f(e,this,{instanceProps:this._instanceProps,forwardHostProp:function(e,t){const i=this.$.overlay._selector.querySelectorAll("vaadin-combo-box-item");Array.prototype.forEach.call(i,(i=>{i._itemTemplateInstance&&(i._itemTemplateInstance.set(e,t),i._itemTemplateInstance.notifyPath(e,t,!0))}))}}))}}_getRootTemplate(){return Array.prototype.filter.call(this.children,(e=>"TEMPLATE"===e.tagName))[0]}_preventInputBlur(){this._toggleElement&&this._toggleElement.addEventListener("click",this._preventDefault),this._clearElement&&this._clearElement.addEventListener("click",this._preventDefault)}_restoreInputBlur(){this._toggleElement&&this._toggleElement.removeEventListener("click",this._preventDefault),this._clearElement&&this._clearElement.removeEventListener("click",this._preventDefault)}_preventDefault(e){e.preventDefault()}_stopPropagation(e){e.stopPropagation()}}
376
362
  /**
377
363
  @license
378
- Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
364
+ Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
379
365
  This code may only be used under the BSD style license found at
380
366
  http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
381
367
  http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
382
368
  found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
383
369
  part of the polymer project is also subject to an additional IP rights grant
384
370
  found at http://polymer.github.io/PATENTS.txt
385
- */;
371
+ */,se={properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(e,t){if(this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),t)if("document"===e)this.scrollTarget=this._doc;else if("string"==typeof e){var i=this.domHost;this.scrollTarget=i&&i.$?i.$[e]:x(this.ownerDocument).querySelector("#"+e)}else this._isValidScrollTarget()&&(this._oldScrollTarget=e,this._toggleScrollListener(this._shouldHaveListener,e))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(e){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=e)},set _scrollLeft(e){this.scrollTarget===this._doc?window.scrollTo(e,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=e)},scroll:function(e,t){var i;"object"==typeof e?(i=e.left,t=e.top):i=e,i=i||0,t=t||0,this.scrollTarget===this._doc?window.scrollTo(i,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=i,this.scrollTarget.scrollTop=t)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(e,t){var i=t===this._doc?window:t;e?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),i.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(i.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(e){this._shouldHaveListener=e,this._toggleScrollListener(e,this.scrollTarget)}};
386
372
  /**
387
373
  @license
388
374
  Copyright (c) 2018 Vaadin Ltd.
389
375
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
390
- */var le=new Set;const he={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(le.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach((function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)}),this),this._fireResize())},assignParentResizable:function(e){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=e,e&&-1===e._interestedResizables.indexOf(this)&&(e._interestedResizables.push(this),e._subscribeIronResize(this))},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this._unsubscribeIronResize(e))},_subscribeIronResize:function(e){e.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(e){e.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){this._notifyingDescendant?e.stopPropagation():w||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var t=y(e).rootTarget;t!==this&&(t.assignParentResizable(this),this._notifyDescendant(t),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",(function t(){document.removeEventListener("readystatechange",t),e()}))}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach((function(e){e!==this&&e._findParent()}),this):(le.forEach((function(e){e!==this&&e._findParent()}),this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?le.delete(this):le.add(this)}},de={properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(e,t){if(this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),t)if("document"===e)this.scrollTarget=this._doc;else if("string"==typeof e){var i=this.domHost;this.scrollTarget=i&&i.$?i.$[e]:y(this.ownerDocument).querySelector("#"+e)}else this._isValidScrollTarget()&&(this._oldScrollTarget=e,this._toggleScrollListener(this._shouldHaveListener,e))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(e){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=e)},set _scrollLeft(e){this.scrollTarget===this._doc?window.scrollTo(e,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=e)},scroll:function(e,t){var i;"object"==typeof e?(i=e.left,t=e.top):i=e,i=i||0,t=t||0,this.scrollTarget===this._doc?window.scrollTo(i,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=i,this.scrollTarget.scrollTop=t)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(e,t){var i=t===this._doc?window:t;e?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),i.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(i.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(e){this._shouldHaveListener=e,this._toggleScrollListener(e,this.scrollTarget)}};
391
- /**
392
- @license
393
- Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
394
- This code may only be used under the BSD style license found at
395
- http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
396
- http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
397
- found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
398
- part of the polymer project is also subject to an additional IP rights grant
399
- found at http://polymer.github.io/PATENTS.txt
400
376
  */
401
377
  /**
402
378
  @license
@@ -408,7 +384,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
408
384
  part of the polymer project is also subject to an additional IP rights grant
409
385
  found at http://polymer.github.io/PATENTS.txt
410
386
  */
411
- var ce=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),ue=ce&&ce[1]>=8;f({_template:o`
387
+ var oe=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),ne=oe&&oe[1]>=8;b({_template:o`
412
388
  <style>
413
389
  :host {
414
390
  display: block;
@@ -443,13 +419,13 @@ var ce=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),ue=ce&&c
443
419
  <div id="items">
444
420
  <slot></slot>
445
421
  </div>
446
- `,is:"iron-list",properties:{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},selectedAs:{type:String,value:"selected"},grid:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_gridChanged"},selectionEnabled:{type:Boolean,value:!1},selectedItem:{type:Object,notify:!0},selectedItems:{type:Object,notify:!0},multiSelection:{type:Boolean,value:!1},scrollOffset:{type:Number,value:0}},observers:["_itemsChanged(items.*)","_selectionEnabledChanged(selectionEnabled)","_multiSelectionChanged(multiSelection)","_setOverflow(scrollTarget, scrollOffset)"],behaviors:[R,he,de,b],_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_focusedItem:null,_focusedVirtualIndex:-1,_focusedPhysicalIndex:-1,_offscreenFocusedItem:null,_focusBackfillItem:null,_itemsPerRow:1,_itemWidth:0,_rowHeight:0,_templateCost:0,_parentModel:!0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return(this.grid?this._physicalRows*this._rowHeight:this._physicalSize)-this._viewportHeight},get _itemsParent(){return y(y(this._userTemplate).parentNode)},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){var e=this._convertIndexToCompleteRow(this._virtualCount);return Math.max(0,e-this._physicalCount)},set _virtualStart(e){e=this._clamp(e,0,this._maxVirtualStart),this.grid&&(e-=e%this._itemsPerRow),this._virtualStartVal=e},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(e){(e%=this._physicalCount)<0&&(e=this._physicalCount+e),this.grid&&(e-=e%this._itemsPerRow),this._physicalStartVal=e},get _physicalStart(){return this._physicalStartVal||0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(e){this._physicalCountVal=e},get _physicalCount(){return this._physicalCountVal||0},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){var e=this._firstVisibleIndexVal;if(null==e){var t=this._physicalTop+this._scrollOffset;e=this._iterateItems((function(e,i){return(t+=this._getPhysicalSizeIncrement(e))>this._scrollPosition?this.grid?i-i%this._itemsPerRow:i:this.grid&&this._virtualCount-1===i?i-i%this._itemsPerRow:void 0}))||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){var e=this._lastVisibleIndexVal;if(null==e){if(this.grid)e=Math.min(this._virtualCount,this.firstVisibleIndex+this._estRowsInView*this._itemsPerRow-1);else{var t=this._physicalTop+this._scrollOffset;this._iterateItems((function(i,s){t<this._scrollBottom&&(e=s),t+=this._getPhysicalSizeIncrement(i)}))}this._lastVisibleIndexVal=e}return e},get _defaultScrollTarget(){return this},get _virtualRowCount(){return Math.ceil(this._virtualCount/this._itemsPerRow)},get _estRowsInView(){return Math.ceil(this._viewportHeight/this._rowHeight)},get _physicalRows(){return Math.ceil(this._physicalCount/this._itemsPerRow)},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},ready:function(){this.addEventListener("focus",this._didFocus.bind(this),!0)},attached:function(){this._debounce("_render",this._render,l),this.listen(this,"iron-resize","_resizeHandler"),this.listen(this,"keydown","_keydownHandler")},detached:function(){this.unlisten(this,"iron-resize","_resizeHandler"),this.unlisten(this,"keydown","_keydownHandler")},_setOverflow:function(e){this.style.webkitOverflowScrolling=e===this?"touch":"",this.style.overflowY=e===this?"auto":"",this._lastVisibleIndexVal=null,this._firstVisibleIndexVal=null,this._debounce("_render",this._render,l)},updateViewportBoundaries:function(){var e=window.getComputedStyle(this);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=Boolean("rtl"===e.direction),this._viewportWidth=this.$.items.offsetWidth,this._viewportHeight=this._scrollTargetHeight,this.grid&&this._updateGridMetrics()},_scrollHandler:function(){var e=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),t=e-this._scrollPosition,i=t>=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;var s=Math.round(t/this._physicalAverage)*this._itemsPerRow;this._virtualStart=this._virtualStart+s,this._physicalStart=this._physicalStart+s,this._physicalTop=Math.min(Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){var o=this._getReusables(i);i?(this._physicalTop=o.physicalTop,this._virtualStart=this._virtualStart+o.indexes.length,this._physicalStart=this._physicalStart+o.indexes.length):(this._virtualStart=this._virtualStart-o.indexes.length,this._physicalStart=this._physicalStart-o.indexes.length),this._update(o.indexes,i?null:o.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),h)}},_getReusables:function(e){var t,i,s,o=[],n=this._hiddenContentSize*this._ratio,r=this._virtualStart,a=this._virtualEnd,l=this._physicalCount,h=this._physicalTop+this._scrollOffset,d=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(e?(t=this._physicalStart,this._physicalEnd,i=c-h):(t=this._physicalEnd,this._physicalStart,i=d-u);i-=s=this._getPhysicalSizeIncrement(t),!(o.length>=l||i<=n);)if(e){if(a+o.length+1>=this._virtualCount)break;if(h+s>=c-this._scrollOffset)break;o.push(t),h+=s,t=(t+1)%l}else{if(r-o.length<=0)break;if(h+this._physicalSize-s<=u)break;o.push(t),h-=s,t=0===t?l-1:t-1}return{indexes:o,physicalTop:h-this._scrollOffset}},_update:function(e,t){if(!(e&&0===e.length||0===this._physicalCount)){if(this._manageFocus(),this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){var i=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(i)}this._positionItems(),this._updateScrollerSize()}},_createPool:function(e){var t,i;this._ensureTemplatized();var s=new Array(e);for(t=0;t<e;t++)i=this.stamp(null),s[t]=i.root.querySelector("*"),this._itemsParent.appendChild(i.root);return s},_isClientFull:function(){return 0!=this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded:function(e){var t=this._clamp(this._physicalCount+e,3,this._virtualCount-this._virtualStart);if(t=this._convertIndexToCompleteRow(t),this.grid){var i=t%this._itemsPerRow;i&&t-i<=this._physicalCount&&(t+=this._itemsPerRow),t-=i}var s=t-this._physicalCount,o=Math.round(.5*this._physicalCount);if(!(s<0)){if(s>0){var n=window.performance.now();[].push.apply(this._physicalItems,this._createPool(s));for(var r=0;r<s;r++)this._physicalSizes.push(0);this._physicalCount=this._physicalCount+s,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart=this._physicalStart+s),this._update(),this._templateCost=(window.performance.now()-n)/s,o=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===o||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,o)),d):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,o),h))}},_render:function(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){var e=this._getReusables(!0);this._physicalTop=e.physicalTop,this._virtualStart=this._virtualStart+e.indexes.length,this._physicalStart=this._physicalStart+e.indexes.length,this._update(e.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_ensureTemplatized:function(){if(!this.ctor){this._userTemplate=this.queryEffectiveChildren("template"),this._userTemplate||console.warn("iron-list requires a template to be provided in light-dom");var e={__key__:!0};e[this.as]=!0,e[this.indexAs]=!0,e[this.selectedAs]=!0,e.tabIndex=!0,this._instanceProps=e,this.templatize(this._userTemplate,this.mutableData)}},_gridChanged:function(e,t){void 0!==t&&(this.notifyResize(),g(),e&&this._updateGridMetrics())},_itemsChanged:function(e){if("items"===e.path)this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._removeFocusedItem(),this._debounce("_render",this._render,l);else if("items.splices"===e.path){if(this._adjustVirtualIndex(e.value.indexSplices),this._virtualCount=this.items?this.items.length:0,e.value.indexSplices.some((function(e){return e.addedCount>0||e.removed.length>0}))){var t=this._getActiveElement();this.contains(t)&&t.blur()}var i=e.value.indexSplices.some((function(e){return e.index+e.addedCount>=this._virtualStart&&e.index<=this._virtualEnd}),this);this._isClientFull()&&!i||this._debounce("_render",this._render,l)}else"items.length"!==e.path&&this._forwardItemPath(e.path,e.value)},_forwardItemPath:function(e,t){var i,s,o,n=(e=e.slice(6)).indexOf(".");-1===n&&(n=e.length);var r=this.modelForElement(this._offscreenFocusedItem),a=parseInt(e.substring(0,n),10);(i=this._isIndexRendered(a))?(s=this._getPhysicalIndex(a),o=this.modelForElement(this._physicalItems[s])):r&&(o=r),o&&o[this.indexAs]===a&&(e=e.substring(n+1),e=this.as+(e?"."+e:""),o._setPendingPropertyOrPath(e,t,!1,!0),o._flushProperties&&o._flushProperties(),i&&(this._updateMetrics([s]),this._positionItems(),this._updateScrollerSize()))},_adjustVirtualIndex:function(e){e.forEach((function(e){if(e.removed.forEach(this._removeItem,this),e.index<this._virtualStart){var t=Math.max(e.addedCount-e.removed.length,e.index-this._virtualStart);this._virtualStart=this._virtualStart+t,this._focusedVirtualIndex>=0&&(this._focusedVirtualIndex=this._focusedVirtualIndex+t)}}),this)},_removeItem:function(e){this.$.selector.deselect(e),this._focusedItem&&this.modelForElement(this._focusedItem)[this.as]===e&&this._removeFocusedItem()},_iterateItems:function(e,t){var i,s,o,n;if(2===arguments.length&&t){for(n=0;n<t.length;n++)if(i=t[n],s=this._computeVidx(i),null!=(o=e.call(this,i,s)))return o}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(o=e.call(this,i,s)))return o;for(i=0;i<this._physicalStart;i++,s++)if(null!=(o=e.call(this,i,s)))return o}},_computeVidx:function(e){return e>=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_assignModels:function(e){this._iterateItems((function(e,t){var i=this._physicalItems[e],s=this.items&&this.items[t];if(null!=s){var o=this.modelForElement(i);o.__key__=null,this._forwardProperty(o,this.as,s),this._forwardProperty(o,this.selectedAs,this.$.selector.isSelected(s)),this._forwardProperty(o,this.indexAs,t),this._forwardProperty(o,"tabIndex",this._focusedVirtualIndex===t?0:-1),this._physicalIndexForKey[o.__key__]=e,o._flushProperties&&o._flushProperties(!0),i.removeAttribute("hidden")}else i.setAttribute("hidden","")}),e)},_updateMetrics:function(e){g();var t=0,i=0,s=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((function(e,s){i+=this._physicalSizes[e],this._physicalSizes[e]=this._physicalItems[e].offsetHeight,t+=this._physicalSizes[e],this._physicalAverageCount+=this._physicalSizes[e]?1:0}),e),this.grid?(this._updateGridMetrics(),this._physicalSize=Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight):(i=1===this._itemsPerRow?i:Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight,this._physicalSize=this._physicalSize+t-i,this._itemsPerRow=1),this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((o*s+t)/this._physicalAverageCount))},_updateGridMetrics:function(){this._itemWidth=this._physicalCount>0?this._physicalItems[0].getBoundingClientRect().width:200,this._rowHeight=this._physicalCount>0?this._physicalItems[0].offsetHeight:200,this._itemsPerRow=this._itemWidth?Math.floor(this._viewportWidth/this._itemWidth):this._itemsPerRow},_positionItems:function(){this._adjustScrollPosition();var e=this._physicalTop;if(this.grid){var t=this._itemsPerRow*this._itemWidth,i=(this._viewportWidth-t)/2;this._iterateItems((function(t,s){var o=s%this._itemsPerRow,n=Math.floor(o*this._itemWidth+i);this._isRTL&&(n*=-1),this.translate3d(n+"px",e+"px",0,this._physicalItems[t]),this._shouldRenderNextRow(s)&&(e+=this._rowHeight)}))}else{const t=[];this._iterateItems((function(i,s){const o=this._physicalItems[i];this.translate3d(0,e+"px",0,o),e+=this._physicalSizes[i];const n=o.id;n&&t.push(n)})),t.length&&this.setAttribute("aria-owns",t.join(" "))}},_getPhysicalSizeIncrement:function(e){return this.grid?this._computeVidx(e)%this._itemsPerRow!=this._itemsPerRow-1?0:this._rowHeight:this._physicalSizes[e]},_shouldRenderNextRow:function(e){return e%this._itemsPerRow==this._itemsPerRow-1},_adjustScrollPosition:function(){var e=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==e){this._physicalTop=this._physicalTop-e;var t=this._scrollPosition;!ue&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition:function(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(e){this.grid?this._estScrollHeight=this._virtualRowCount*this._rowHeight:this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,((e=(e=(e=e||0===this._scrollHeight)||this._scrollPosition>=this._estScrollHeight-this._physicalSize)||this.grid&&this.$.items.style.height<this._estScrollHeight)||Math.abs(this._estScrollHeight-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=this._estScrollHeight+"px",this._scrollHeight=this._estScrollHeight)},scrollToItem:function(e){return this.scrollToIndex(this.items.indexOf(e))},scrollToIndex:function(e){if(!("number"!=typeof e||e<0||e>this.items.length-1)&&(g(),0!==this._physicalCount)){e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=this.grid?e-2*this._itemsPerRow:e-1),this._manageFocus(),this._assignModels(),this._updateMetrics(),this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage;for(var t=this._physicalStart,i=this._virtualStart,s=0,o=this._hiddenContentSize;i<e&&s<=o;)s+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,i++;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null}},_resetAverage:function(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler:function(){this._debounce("_render",(function(){this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),l)},selectItem:function(e){return this.selectIndex(this.items.indexOf(e))},selectIndex:function(e){if(!(e<0||e>=this._virtualCount)){if(!this.multiSelection&&this.selectedItem&&this.clearSelection(),this._isIndexRendered(e)){var t=this.modelForElement(this._physicalItems[this._getPhysicalIndex(e)]);t&&(t[this.selectedAs]=!0),this.updateSizeForIndex(e)}this.$.selector.selectIndex(e)}},deselectItem:function(e){return this.deselectIndex(this.items.indexOf(e))},deselectIndex:function(e){if(!(e<0||e>=this._virtualCount)){if(this._isIndexRendered(e))this.modelForElement(this._physicalItems[this._getPhysicalIndex(e)])[this.selectedAs]=!1,this.updateSizeForIndex(e);this.$.selector.deselectIndex(e)}},toggleSelectionForItem:function(e){return this.toggleSelectionForIndex(this.items.indexOf(e))},toggleSelectionForIndex:function(e){(this.$.selector.isIndexSelected?this.$.selector.isIndexSelected(e):this.$.selector.isSelected(this.items[e]))?this.deselectIndex(e):this.selectIndex(e)},clearSelection:function(){this._iterateItems((function(e,t){this.modelForElement(this._physicalItems[e])[this.selectedAs]=!1})),this.$.selector.clearSelection()},_selectionEnabledChanged:function(e){(e?this.listen:this.unlisten).call(this,this,"tap","_selectionHandler")},_selectionHandler:function(e){var t=this.modelForElement(e.target);if(t){var i,s,o=y(e).path[0],n=this._getActiveElement(),r=this._physicalItems[this._getPhysicalIndex(t[this.indexAs])];"input"!==o.localName&&"button"!==o.localName&&"select"!==o.localName&&(i=t.tabIndex,t.tabIndex=-100,s=n?n.tabIndex:-1,t.tabIndex=i,n&&r!==n&&r.contains(n)&&-100!==s||this.toggleSelectionForItem(t[this.as]))}},_multiSelectionChanged:function(e){this.clearSelection(),this.$.selector.multi=e},updateSizeForItem:function(e){return this.updateSizeForIndex(this.items.indexOf(e))},updateSizeForIndex:function(e){return this._isIndexRendered(e)?(this._updateMetrics([this._getPhysicalIndex(e)]),this._positionItems(),null):null},_manageFocus:function(){var e=this._focusedVirtualIndex;e>=0&&e<this._virtualCount?this._isIndexRendered(e)?this._restoreFocusedItem():this._createFocusBackfillItem():this._virtualCount>0&&this._physicalCount>0&&(this._focusedPhysicalIndex=this._physicalStart,this._focusedVirtualIndex=this._virtualStart,this._focusedItem=this._physicalItems[this._physicalStart])},_convertIndexToCompleteRow:function(e){return this._itemsPerRow=this._itemsPerRow||1,this.grid?Math.ceil(e/this._itemsPerRow)*this._itemsPerRow:e},_isIndexRendered:function(e){return e>=this._virtualStart&&e<=this._virtualEnd},_isIndexVisible:function(e){return e>=this.firstVisibleIndex&&e<=this.lastVisibleIndex},_getPhysicalIndex:function(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},focusItem:function(e){this._focusPhysicalItem(e)},_focusPhysicalItem:function(e){if(!(e<0||e>=this._virtualCount)){this._restoreFocusedItem(),this._isIndexRendered(e)||this.scrollToIndex(e);var t,i=this._physicalItems[this._getPhysicalIndex(e)],s=this.modelForElement(i);s.tabIndex=-100,-100===i.tabIndex&&(t=i),t||(t=y(i).querySelector('[tabindex="-100"]')),s.tabIndex=0,this._focusedVirtualIndex=e,t&&t.focus()}},_removeFocusedItem:function(){this._offscreenFocusedItem&&this._itemsParent.removeChild(this._offscreenFocusedItem),this._offscreenFocusedItem=null,this._focusBackfillItem=null,this._focusedItem=null,this._focusedVirtualIndex=-1,this._focusedPhysicalIndex=-1},_createFocusBackfillItem:function(){var e=this._focusedPhysicalIndex;if(!(this._offscreenFocusedItem||this._focusedVirtualIndex<0)){if(!this._focusBackfillItem){var t=this.stamp(null);this._focusBackfillItem=t.root.querySelector("*"),this._itemsParent.appendChild(t.root)}this._offscreenFocusedItem=this._physicalItems[e],this.modelForElement(this._offscreenFocusedItem).tabIndex=0,this._physicalItems[e]=this._focusBackfillItem,this._focusedPhysicalIndex=e,this.translate3d(0,"-10000px",0,this._offscreenFocusedItem)}},_restoreFocusedItem:function(){if(this._offscreenFocusedItem&&!(this._focusedVirtualIndex<0)){this._assignModels();var e=this._focusedPhysicalIndex=this._getPhysicalIndex(this._focusedVirtualIndex),t=this._physicalItems[e];if(t){var i=this.modelForElement(t),s=this.modelForElement(this._offscreenFocusedItem);i[this.as]===s[this.as]?(this._focusBackfillItem=t,i.tabIndex=-1,this._physicalItems[e]=this._offscreenFocusedItem,this.translate3d(0,"-10000px",0,this._focusBackfillItem)):(this._removeFocusedItem(),this._focusBackfillItem=null),this._offscreenFocusedItem=null}}},_didFocus:function(e){var t=this.modelForElement(e.target),i=this.modelForElement(this._focusedItem),s=null!==this._offscreenFocusedItem,o=this._focusedVirtualIndex;t&&(i===t?this._isIndexVisible(o)||this.scrollToIndex(o):(this._restoreFocusedItem(),i&&(i.tabIndex=-1),t.tabIndex=0,o=t[this.indexAs],this._focusedVirtualIndex=o,this._focusedPhysicalIndex=this._getPhysicalIndex(o),this._focusedItem=this._physicalItems[this._focusedPhysicalIndex],s&&!this._offscreenFocusedItem&&this._update()))},_keydownHandler:function(e){switch(e.keyCode){case 40:this._focusedVirtualIndex<this._virtualCount-1&&e.preventDefault(),this._focusPhysicalItem(this._focusedVirtualIndex+(this.grid?this._itemsPerRow:1));break;case 39:this.grid&&this._focusPhysicalItem(this._focusedVirtualIndex+(this._isRTL?-1:1));break;case 38:this._focusedVirtualIndex>0&&e.preventDefault(),this._focusPhysicalItem(this._focusedVirtualIndex-(this.grid?this._itemsPerRow:1));break;case 37:this.grid&&this._focusPhysicalItem(this._focusedVirtualIndex+(this._isRTL?1:-1));break;case 13:this._focusPhysicalItem(this._focusedVirtualIndex),this.selectionEnabled&&this._selectionHandler(e)}},_clamp:function(e,t,i){return Math.min(i,Math.max(t,e))},_debounce:function(e,t,i){this._debouncers=this._debouncers||{},this._debouncers[e]=r.debounce(this._debouncers[e],i,t.bind(this)),c(this._debouncers[e])},_forwardProperty:function(e,t,i){e._setPendingProperty(t,i)},_forwardHostPropV2:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach((function(i){i&&this.modelForElement(i).forwardHostProp(e,t)}),this)},_notifyInstancePropV2:function(e,t,i){if(u(this.as,t)){var s=e[this.indexAs];t==this.as&&(this.items[s]=i),this.notifyPath(_(this.as,"items."+s,t),i)}},_getStampedChildren:function(){return this._physicalItems},_forwardInstancePath:function(e,t,i){0===t.indexOf(this.as+".")&&this.notifyPath("items."+e.__key__+"."+t.slice(this.as.length+1),i)},_forwardParentPath:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach((function(i){i&&this.modelForElement(i).notifyPath(e,t)}),this)},_forwardParentProp:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach((function(i){i&&(this.modelForElement(i)[e]=t)}),this)},_getActiveElement:function(){var e=this._itemsParent.node.domHost;return y(e?e.root:document).activeElement}});
422
+ `,is:"iron-list",properties:{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},selectedAs:{type:String,value:"selected"},grid:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_gridChanged"},selectionEnabled:{type:Boolean,value:!1},selectedItem:{type:Object,notify:!0},selectedItems:{type:Object,notify:!0},multiSelection:{type:Boolean,value:!1},scrollOffset:{type:Number,value:0}},observers:["_itemsChanged(items.*)","_selectionEnabledChanged(selectionEnabled)","_multiSelectionChanged(multiSelection)","_setOverflow(scrollTarget, scrollOffset)"],behaviors:[P,v,se,w],_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_focusedItem:null,_focusedVirtualIndex:-1,_focusedPhysicalIndex:-1,_offscreenFocusedItem:null,_focusBackfillItem:null,_itemsPerRow:1,_itemWidth:0,_rowHeight:0,_templateCost:0,_parentModel:!0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return(this.grid?this._physicalRows*this._rowHeight:this._physicalSize)-this._viewportHeight},get _itemsParent(){return x(x(this._userTemplate).parentNode)},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){var e=this._convertIndexToCompleteRow(this._virtualCount);return Math.max(0,e-this._physicalCount)},set _virtualStart(e){e=this._clamp(e,0,this._maxVirtualStart),this.grid&&(e-=e%this._itemsPerRow),this._virtualStartVal=e},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(e){(e%=this._physicalCount)<0&&(e=this._physicalCount+e),this.grid&&(e-=e%this._itemsPerRow),this._physicalStartVal=e},get _physicalStart(){return this._physicalStartVal||0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(e){this._physicalCountVal=e},get _physicalCount(){return this._physicalCountVal||0},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){var e=this._firstVisibleIndexVal;if(null==e){var t=this._physicalTop+this._scrollOffset;e=this._iterateItems((function(e,i){return(t+=this._getPhysicalSizeIncrement(e))>this._scrollPosition?this.grid?i-i%this._itemsPerRow:i:this.grid&&this._virtualCount-1===i?i-i%this._itemsPerRow:void 0}))||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){var e=this._lastVisibleIndexVal;if(null==e){if(this.grid)e=Math.min(this._virtualCount,this.firstVisibleIndex+this._estRowsInView*this._itemsPerRow-1);else{var t=this._physicalTop+this._scrollOffset;this._iterateItems((function(i,s){t<this._scrollBottom&&(e=s),t+=this._getPhysicalSizeIncrement(i)}))}this._lastVisibleIndexVal=e}return e},get _defaultScrollTarget(){return this},get _virtualRowCount(){return Math.ceil(this._virtualCount/this._itemsPerRow)},get _estRowsInView(){return Math.ceil(this._viewportHeight/this._rowHeight)},get _physicalRows(){return Math.ceil(this._physicalCount/this._itemsPerRow)},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},ready:function(){this.addEventListener("focus",this._didFocus.bind(this),!0)},attached:function(){this._debounce("_render",this._render,l),this.listen(this,"iron-resize","_resizeHandler"),this.listen(this,"keydown","_keydownHandler")},detached:function(){this.unlisten(this,"iron-resize","_resizeHandler"),this.unlisten(this,"keydown","_keydownHandler")},_setOverflow:function(e){this.style.webkitOverflowScrolling=e===this?"touch":"",this.style.overflowY=e===this?"auto":"",this._lastVisibleIndexVal=null,this._firstVisibleIndexVal=null,this._debounce("_render",this._render,l)},updateViewportBoundaries:function(){var e=window.getComputedStyle(this);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=Boolean("rtl"===e.direction),this._viewportWidth=this.$.items.offsetWidth,this._viewportHeight=this._scrollTargetHeight,this.grid&&this._updateGridMetrics()},_scrollHandler:function(){var e=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),t=e-this._scrollPosition,i=t>=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;var s=Math.round(t/this._physicalAverage)*this._itemsPerRow;this._virtualStart=this._virtualStart+s,this._physicalStart=this._physicalStart+s,this._physicalTop=Math.min(Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){var o=this._getReusables(i);i?(this._physicalTop=o.physicalTop,this._virtualStart=this._virtualStart+o.indexes.length,this._physicalStart=this._physicalStart+o.indexes.length):(this._virtualStart=this._virtualStart-o.indexes.length,this._physicalStart=this._physicalStart-o.indexes.length),this._update(o.indexes,i?null:o.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),h)}},_getReusables:function(e){var t,i,s,o=[],n=this._hiddenContentSize*this._ratio,r=this._virtualStart,a=this._virtualEnd,l=this._physicalCount,h=this._physicalTop+this._scrollOffset,d=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(e?(t=this._physicalStart,this._physicalEnd,i=c-h):(t=this._physicalEnd,this._physicalStart,i=d-u);i-=s=this._getPhysicalSizeIncrement(t),!(o.length>=l||i<=n);)if(e){if(a+o.length+1>=this._virtualCount)break;if(h+s>=c-this._scrollOffset)break;o.push(t),h+=s,t=(t+1)%l}else{if(r-o.length<=0)break;if(h+this._physicalSize-s<=u)break;o.push(t),h-=s,t=0===t?l-1:t-1}return{indexes:o,physicalTop:h-this._scrollOffset}},_update:function(e,t){if(!(e&&0===e.length||0===this._physicalCount)){if(this._manageFocus(),this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){var i=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(i)}this._positionItems(),this._updateScrollerSize()}},_createPool:function(e){var t,i;this._ensureTemplatized();var s=new Array(e);for(t=0;t<e;t++)i=this.stamp(null),s[t]=i.root.querySelector("*"),this._itemsParent.appendChild(i.root);return s},_isClientFull:function(){return 0!=this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded:function(e){var t=this._clamp(this._physicalCount+e,3,this._virtualCount-this._virtualStart);if(t=this._convertIndexToCompleteRow(t),this.grid){var i=t%this._itemsPerRow;i&&t-i<=this._physicalCount&&(t+=this._itemsPerRow),t-=i}var s=t-this._physicalCount,o=Math.round(.5*this._physicalCount);if(!(s<0)){if(s>0){var n=window.performance.now();[].push.apply(this._physicalItems,this._createPool(s));for(var r=0;r<s;r++)this._physicalSizes.push(0);this._physicalCount=this._physicalCount+s,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart=this._physicalStart+s),this._update(),this._templateCost=(window.performance.now()-n)/s,o=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===o||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,o)),d):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,o),h))}},_render:function(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){var e=this._getReusables(!0);this._physicalTop=e.physicalTop,this._virtualStart=this._virtualStart+e.indexes.length,this._physicalStart=this._physicalStart+e.indexes.length,this._update(e.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_ensureTemplatized:function(){if(!this.ctor){this._userTemplate=this.queryEffectiveChildren("template"),this._userTemplate||console.warn("iron-list requires a template to be provided in light-dom");var e={__key__:!0};e[this.as]=!0,e[this.indexAs]=!0,e[this.selectedAs]=!0,e.tabIndex=!0,this._instanceProps=e,this.templatize(this._userTemplate,this.mutableData)}},_gridChanged:function(e,t){void 0!==t&&(this.notifyResize(),I(),e&&this._updateGridMetrics())},_itemsChanged:function(e){if("items"===e.path)this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._removeFocusedItem(),this._debounce("_render",this._render,l);else if("items.splices"===e.path){if(this._adjustVirtualIndex(e.value.indexSplices),this._virtualCount=this.items?this.items.length:0,e.value.indexSplices.some((function(e){return e.addedCount>0||e.removed.length>0}))){var t=this._getActiveElement();this.contains(t)&&t.blur()}var i=e.value.indexSplices.some((function(e){return e.index+e.addedCount>=this._virtualStart&&e.index<=this._virtualEnd}),this);this._isClientFull()&&!i||this._debounce("_render",this._render,l)}else"items.length"!==e.path&&this._forwardItemPath(e.path,e.value)},_forwardItemPath:function(e,t){var i,s,o,n=(e=e.slice(6)).indexOf(".");-1===n&&(n=e.length);var r=this.modelForElement(this._offscreenFocusedItem),a=parseInt(e.substring(0,n),10);(i=this._isIndexRendered(a))?(s=this._getPhysicalIndex(a),o=this.modelForElement(this._physicalItems[s])):r&&(o=r),o&&o[this.indexAs]===a&&(e=e.substring(n+1),e=this.as+(e?"."+e:""),o._setPendingPropertyOrPath(e,t,!1,!0),o._flushProperties&&o._flushProperties(),i&&(this._updateMetrics([s]),this._positionItems(),this._updateScrollerSize()))},_adjustVirtualIndex:function(e){e.forEach((function(e){if(e.removed.forEach(this._removeItem,this),e.index<this._virtualStart){var t=Math.max(e.addedCount-e.removed.length,e.index-this._virtualStart);this._virtualStart=this._virtualStart+t,this._focusedVirtualIndex>=0&&(this._focusedVirtualIndex=this._focusedVirtualIndex+t)}}),this)},_removeItem:function(e){this.$.selector.deselect(e),this._focusedItem&&this.modelForElement(this._focusedItem)[this.as]===e&&this._removeFocusedItem()},_iterateItems:function(e,t){var i,s,o,n;if(2===arguments.length&&t){for(n=0;n<t.length;n++)if(i=t[n],s=this._computeVidx(i),null!=(o=e.call(this,i,s)))return o}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(o=e.call(this,i,s)))return o;for(i=0;i<this._physicalStart;i++,s++)if(null!=(o=e.call(this,i,s)))return o}},_computeVidx:function(e){return e>=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_assignModels:function(e){this._iterateItems((function(e,t){var i=this._physicalItems[e],s=this.items&&this.items[t];if(null!=s){var o=this.modelForElement(i);o.__key__=null,this._forwardProperty(o,this.as,s),this._forwardProperty(o,this.selectedAs,this.$.selector.isSelected(s)),this._forwardProperty(o,this.indexAs,t),this._forwardProperty(o,"tabIndex",this._focusedVirtualIndex===t?0:-1),this._physicalIndexForKey[o.__key__]=e,o._flushProperties&&o._flushProperties(!0),i.removeAttribute("hidden")}else i.setAttribute("hidden","")}),e)},_updateMetrics:function(e){I();var t=0,i=0,s=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((function(e,s){i+=this._physicalSizes[e],this._physicalSizes[e]=this._physicalItems[e].offsetHeight,t+=this._physicalSizes[e],this._physicalAverageCount+=this._physicalSizes[e]?1:0}),e),this.grid?(this._updateGridMetrics(),this._physicalSize=Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight):(i=1===this._itemsPerRow?i:Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight,this._physicalSize=this._physicalSize+t-i,this._itemsPerRow=1),this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((o*s+t)/this._physicalAverageCount))},_updateGridMetrics:function(){this._itemWidth=this._physicalCount>0?this._physicalItems[0].getBoundingClientRect().width:200,this._rowHeight=this._physicalCount>0?this._physicalItems[0].offsetHeight:200,this._itemsPerRow=this._itemWidth?Math.floor(this._viewportWidth/this._itemWidth):this._itemsPerRow},_positionItems:function(){this._adjustScrollPosition();var e=this._physicalTop;if(this.grid){var t=this._itemsPerRow*this._itemWidth,i=(this._viewportWidth-t)/2;this._iterateItems((function(t,s){var o=s%this._itemsPerRow,n=Math.floor(o*this._itemWidth+i);this._isRTL&&(n*=-1),this.translate3d(n+"px",e+"px",0,this._physicalItems[t]),this._shouldRenderNextRow(s)&&(e+=this._rowHeight)}))}else{const t=[];this._iterateItems((function(i,s){const o=this._physicalItems[i];this.translate3d(0,e+"px",0,o),e+=this._physicalSizes[i];const n=o.id;n&&t.push(n)})),t.length&&this.setAttribute("aria-owns",t.join(" "))}},_getPhysicalSizeIncrement:function(e){return this.grid?this._computeVidx(e)%this._itemsPerRow!=this._itemsPerRow-1?0:this._rowHeight:this._physicalSizes[e]},_shouldRenderNextRow:function(e){return e%this._itemsPerRow==this._itemsPerRow-1},_adjustScrollPosition:function(){var e=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==e){this._physicalTop=this._physicalTop-e;var t=this._scrollPosition;!ne&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition:function(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(e){this.grid?this._estScrollHeight=this._virtualRowCount*this._rowHeight:this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,((e=(e=(e=e||0===this._scrollHeight)||this._scrollPosition>=this._estScrollHeight-this._physicalSize)||this.grid&&this.$.items.style.height<this._estScrollHeight)||Math.abs(this._estScrollHeight-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=this._estScrollHeight+"px",this._scrollHeight=this._estScrollHeight)},scrollToItem:function(e){return this.scrollToIndex(this.items.indexOf(e))},scrollToIndex:function(e){if(!("number"!=typeof e||e<0||e>this.items.length-1)&&(I(),0!==this._physicalCount)){e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=this.grid?e-2*this._itemsPerRow:e-1),this._manageFocus(),this._assignModels(),this._updateMetrics(),this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage;for(var t=this._physicalStart,i=this._virtualStart,s=0,o=this._hiddenContentSize;i<e&&s<=o;)s+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,i++;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null}},_resetAverage:function(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler:function(){this._debounce("_render",(function(){this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),l)},selectItem:function(e){return this.selectIndex(this.items.indexOf(e))},selectIndex:function(e){if(!(e<0||e>=this._virtualCount)){if(!this.multiSelection&&this.selectedItem&&this.clearSelection(),this._isIndexRendered(e)){var t=this.modelForElement(this._physicalItems[this._getPhysicalIndex(e)]);t&&(t[this.selectedAs]=!0),this.updateSizeForIndex(e)}this.$.selector.selectIndex(e)}},deselectItem:function(e){return this.deselectIndex(this.items.indexOf(e))},deselectIndex:function(e){if(!(e<0||e>=this._virtualCount)){if(this._isIndexRendered(e))this.modelForElement(this._physicalItems[this._getPhysicalIndex(e)])[this.selectedAs]=!1,this.updateSizeForIndex(e);this.$.selector.deselectIndex(e)}},toggleSelectionForItem:function(e){return this.toggleSelectionForIndex(this.items.indexOf(e))},toggleSelectionForIndex:function(e){(this.$.selector.isIndexSelected?this.$.selector.isIndexSelected(e):this.$.selector.isSelected(this.items[e]))?this.deselectIndex(e):this.selectIndex(e)},clearSelection:function(){this._iterateItems((function(e,t){this.modelForElement(this._physicalItems[e])[this.selectedAs]=!1})),this.$.selector.clearSelection()},_selectionEnabledChanged:function(e){(e?this.listen:this.unlisten).call(this,this,"tap","_selectionHandler")},_selectionHandler:function(e){var t=this.modelForElement(e.target);if(t){var i,s,o=x(e).path[0],n=this._getActiveElement(),r=this._physicalItems[this._getPhysicalIndex(t[this.indexAs])];"input"!==o.localName&&"button"!==o.localName&&"select"!==o.localName&&(i=t.tabIndex,t.tabIndex=-100,s=n?n.tabIndex:-1,t.tabIndex=i,n&&r!==n&&r.contains(n)&&-100!==s||this.toggleSelectionForItem(t[this.as]))}},_multiSelectionChanged:function(e){this.clearSelection(),this.$.selector.multi=e},updateSizeForItem:function(e){return this.updateSizeForIndex(this.items.indexOf(e))},updateSizeForIndex:function(e){return this._isIndexRendered(e)?(this._updateMetrics([this._getPhysicalIndex(e)]),this._positionItems(),null):null},_manageFocus:function(){var e=this._focusedVirtualIndex;e>=0&&e<this._virtualCount?this._isIndexRendered(e)?this._restoreFocusedItem():this._createFocusBackfillItem():this._virtualCount>0&&this._physicalCount>0&&(this._focusedPhysicalIndex=this._physicalStart,this._focusedVirtualIndex=this._virtualStart,this._focusedItem=this._physicalItems[this._physicalStart])},_convertIndexToCompleteRow:function(e){return this._itemsPerRow=this._itemsPerRow||1,this.grid?Math.ceil(e/this._itemsPerRow)*this._itemsPerRow:e},_isIndexRendered:function(e){return e>=this._virtualStart&&e<=this._virtualEnd},_isIndexVisible:function(e){return e>=this.firstVisibleIndex&&e<=this.lastVisibleIndex},_getPhysicalIndex:function(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},focusItem:function(e){this._focusPhysicalItem(e)},_focusPhysicalItem:function(e){if(!(e<0||e>=this._virtualCount)){this._restoreFocusedItem(),this._isIndexRendered(e)||this.scrollToIndex(e);var t,i=this._physicalItems[this._getPhysicalIndex(e)],s=this.modelForElement(i);s.tabIndex=-100,-100===i.tabIndex&&(t=i),t||(t=x(i).querySelector('[tabindex="-100"]')),s.tabIndex=0,this._focusedVirtualIndex=e,t&&t.focus()}},_removeFocusedItem:function(){this._offscreenFocusedItem&&this._itemsParent.removeChild(this._offscreenFocusedItem),this._offscreenFocusedItem=null,this._focusBackfillItem=null,this._focusedItem=null,this._focusedVirtualIndex=-1,this._focusedPhysicalIndex=-1},_createFocusBackfillItem:function(){var e=this._focusedPhysicalIndex;if(!(this._offscreenFocusedItem||this._focusedVirtualIndex<0)){if(!this._focusBackfillItem){var t=this.stamp(null);this._focusBackfillItem=t.root.querySelector("*"),this._itemsParent.appendChild(t.root)}this._offscreenFocusedItem=this._physicalItems[e],this.modelForElement(this._offscreenFocusedItem).tabIndex=0,this._physicalItems[e]=this._focusBackfillItem,this._focusedPhysicalIndex=e,this.translate3d(0,"-10000px",0,this._offscreenFocusedItem)}},_restoreFocusedItem:function(){if(this._offscreenFocusedItem&&!(this._focusedVirtualIndex<0)){this._assignModels();var e=this._focusedPhysicalIndex=this._getPhysicalIndex(this._focusedVirtualIndex),t=this._physicalItems[e];if(t){var i=this.modelForElement(t),s=this.modelForElement(this._offscreenFocusedItem);i[this.as]===s[this.as]?(this._focusBackfillItem=t,i.tabIndex=-1,this._physicalItems[e]=this._offscreenFocusedItem,this.translate3d(0,"-10000px",0,this._focusBackfillItem)):(this._removeFocusedItem(),this._focusBackfillItem=null),this._offscreenFocusedItem=null}}},_didFocus:function(e){var t=this.modelForElement(e.target),i=this.modelForElement(this._focusedItem),s=null!==this._offscreenFocusedItem,o=this._focusedVirtualIndex;t&&(i===t?this._isIndexVisible(o)||this.scrollToIndex(o):(this._restoreFocusedItem(),i&&(i.tabIndex=-1),t.tabIndex=0,o=t[this.indexAs],this._focusedVirtualIndex=o,this._focusedPhysicalIndex=this._getPhysicalIndex(o),this._focusedItem=this._physicalItems[this._focusedPhysicalIndex],s&&!this._offscreenFocusedItem&&this._update()))},_keydownHandler:function(e){switch(e.keyCode){case 40:this._focusedVirtualIndex<this._virtualCount-1&&e.preventDefault(),this._focusPhysicalItem(this._focusedVirtualIndex+(this.grid?this._itemsPerRow:1));break;case 39:this.grid&&this._focusPhysicalItem(this._focusedVirtualIndex+(this._isRTL?-1:1));break;case 38:this._focusedVirtualIndex>0&&e.preventDefault(),this._focusPhysicalItem(this._focusedVirtualIndex-(this.grid?this._itemsPerRow:1));break;case 37:this.grid&&this._focusPhysicalItem(this._focusedVirtualIndex+(this._isRTL?1:-1));break;case 13:this._focusPhysicalItem(this._focusedVirtualIndex),this.selectionEnabled&&this._selectionHandler(e)}},_clamp:function(e,t,i){return Math.min(i,Math.max(t,e))},_debounce:function(e,t,i){this._debouncers=this._debouncers||{},this._debouncers[e]=r.debounce(this._debouncers[e],i,t.bind(this)),c(this._debouncers[e])},_forwardProperty:function(e,t,i){e._setPendingProperty(t,i)},_forwardHostPropV2:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach((function(i){i&&this.modelForElement(i).forwardHostProp(e,t)}),this)},_notifyInstancePropV2:function(e,t,i){if(u(this.as,t)){var s=e[this.indexAs];t==this.as&&(this.items[s]=i),this.notifyPath(_(this.as,"items."+s,t),i)}},_getStampedChildren:function(){return this._physicalItems},_forwardInstancePath:function(e,t,i){0===t.indexOf(this.as+".")&&this.notifyPath("items."+e.__key__+"."+t.slice(this.as.length+1),i)},_forwardParentPath:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach((function(i){i&&this.modelForElement(i).notifyPath(e,t)}),this)},_forwardParentProp:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach((function(i){i&&(this.modelForElement(i)[e]=t)}),this)},_getActiveElement:function(){var e=this._itemsParent.node.domHost;return x(e?e.root:document).activeElement}});
447
423
  /**
448
424
  @license
449
425
  Copyright (c) 2017 Vaadin Ltd.
450
426
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
451
427
  */
452
- class _e extends(e(t(n))){static get template(){return o`
428
+ class re extends(e(t(n))){static get template(){return o`
453
429
  <style>
454
430
  :host {
455
431
  display: block;
@@ -460,13 +436,13 @@ class _e extends(e(t(n))){static get template(){return o`
460
436
  }
461
437
  </style>
462
438
  <div part="content" id="content"></div>
463
- `}static get is(){return"vaadin-combo-box-item"}static get properties(){return{index:Number,item:Object,label:String,selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},_itemTemplateInstance:Object,renderer:Function,_oldRenderer:Function}}static get observers(){return["_rendererOrItemChanged(renderer, index, item.*)","_updateLabel(label, _itemTemplateInstance)",'_updateTemplateInstanceVariable("index", index, _itemTemplateInstance)','_updateTemplateInstanceVariable("item", item, _itemTemplateInstance)','_updateTemplateInstanceVariable("selected", selected, _itemTemplateInstance)','_updateTemplateInstanceVariable("focused", focused, _itemTemplateInstance)']}connectedCallback(){if(super.connectedCallback(),!this._itemTemplateInstance){const e=this.getRootNode().host.getRootNode().host.__dataHost.getRootNode().host;this._comboBox=e.getRootNode().host,this._comboBox._ensureTemplatized(),this._comboBox._TemplateClass&&(this._itemTemplateInstance=new this._comboBox._TemplateClass({}),this.$.content.textContent="",this.$.content.appendChild(this._itemTemplateInstance.root))}const e=this._comboBox.getAttribute("dir");e&&this.setAttribute("dir",e)}_render(){if(!this.renderer)return;const e={index:this.index,item:this.item};this.renderer(this.$.content,this._comboBox,e)}_rendererOrItemChanged(e,t,i){void 0!==i&&void 0!==t&&(this._oldRenderer!==e&&(this.$.content.innerHTML=""),e&&(this._oldRenderer=e,this._render()))}_updateLabel(e,t){void 0===t&&this.$.content&&!this.renderer&&(this.$.content.textContent=e)}_updateTemplateInstanceVariable(e,t,i){void 0!==e&&void 0!==t&&void 0!==i&&(i[e]=t)}}customElements.define(_e.is,_e);
439
+ `}static get is(){return"vaadin-combo-box-item"}static get properties(){return{index:Number,item:Object,label:String,selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},_itemTemplateInstance:Object,renderer:Function,_oldRenderer:Function}}static get observers(){return["_rendererOrItemChanged(renderer, index, item.*)","_updateLabel(label, _itemTemplateInstance)",'_updateTemplateInstanceVariable("index", index, _itemTemplateInstance)','_updateTemplateInstanceVariable("item", item, _itemTemplateInstance)','_updateTemplateInstanceVariable("selected", selected, _itemTemplateInstance)','_updateTemplateInstanceVariable("focused", focused, _itemTemplateInstance)']}connectedCallback(){if(super.connectedCallback(),!this._itemTemplateInstance){const e=this.getRootNode().host.getRootNode().host.__dataHost.getRootNode().host;this._comboBox=e.getRootNode().host,this._comboBox._ensureTemplatized(),this._comboBox._TemplateClass&&(this._itemTemplateInstance=new this._comboBox._TemplateClass({}),this.$.content.textContent="",this.$.content.appendChild(this._itemTemplateInstance.root))}const e=this._comboBox.getAttribute("dir");e&&this.setAttribute("dir",e)}_render(){if(!this.renderer)return;const e={index:this.index,item:this.item};this.renderer(this.$.content,this._comboBox,e)}_rendererOrItemChanged(e,t,i){void 0!==i&&void 0!==t&&(this._oldRenderer!==e&&(this.$.content.innerHTML=""),e&&(this._oldRenderer=e,this._render()))}_updateLabel(e,t){void 0===t&&this.$.content&&!this.renderer&&(this.$.content.textContent=e)}_updateTemplateInstanceVariable(e,t,i){void 0!==e&&void 0!==t&&void 0!==i&&(i[e]=t)}}customElements.define(re.is,re);
464
440
  /**
465
441
  @license
466
442
  Copyright (c) 2017 Vaadin Ltd.
467
443
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
468
444
  */
469
- const me=document.createElement("template");let pe;me.innerHTML='<dom-module id="vaadin-combo-box-overlay-styles" theme-for="vaadin-combo-box-overlay">\n <template>\n <style>\n :host {\n width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(me.content);class ve extends ${static get is(){return"vaadin-combo-box-overlay"}static get properties(){return{positionTarget:{type:Object}}}static get template(){return pe||(pe=super.template.cloneNode(!0),pe.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")),pe}connectedCallback(){super.connectedCallback();const e=this.__dataHost.getRootNode().host,t=e&&e.getRootNode().host,i=t&&t.getAttribute("dir");i&&this.setAttribute("dir",i)}ready(){super.ready();const e=document.createElement("div");e.setAttribute("part","loader");const t=this.shadowRoot.querySelector('[part~="content"]');t.parentNode.insertBefore(e,t)}_outsideClickListener(e){const t=e.composedPath();t.indexOf(this.positionTarget)<0&&t.indexOf(this)<0&&this.close()}}customElements.define(ve.is,ve);class fe extends(I(x(he,n))){static get template(){return o`
445
+ const ae=document.createElement("template");let le;ae.innerHTML='<dom-module id="vaadin-combo-box-overlay-styles" theme-for="vaadin-combo-box-overlay">\n <template>\n <style>\n :host {\n width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(ae.content);class he extends R{static get is(){return"vaadin-combo-box-overlay"}static get properties(){return{positionTarget:{type:Object}}}static get template(){return le||(le=super.template.cloneNode(!0),le.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")),le}connectedCallback(){super.connectedCallback();const e=this.__dataHost.getRootNode().host,t=e&&e.getRootNode().host,i=t&&t.getAttribute("dir");i&&this.setAttribute("dir",i)}ready(){super.ready();const e=document.createElement("div");e.setAttribute("part","loader");const t=this.shadowRoot.querySelector('[part~="content"]');t.parentNode.insertBefore(e,t)}_outsideClickListener(e){const t=e.composedPath();t.indexOf(this.positionTarget)<0&&t.indexOf(this)<0&&this.close()}}customElements.define(he.is,he);class de extends(S(C(v,n))){static get template(){return o`
470
446
  <style>
471
447
  :host {
472
448
  display: block;
@@ -479,13 +455,13 @@ const me=document.createElement("template");let pe;me.innerHTML='<dom-module id=
479
455
  <vaadin-combo-box-overlay id="overlay" hidden\$="[[hidden]]" position-target="[[positionTarget]]" opened="{{opened}}" template="{{template}}" style="align-items: stretch; margin: 0;" theme\$="[[theme]]">
480
456
  <slot></slot>
481
457
  </vaadin-combo-box-overlay>
482
- `}static get is(){return"vaadin-combo-box-dropdown"}static get properties(){return{opened:{type:Boolean,observer:"_openedChanged"},template:{type:Object,notify:!0},positionTarget:{type:Object},alignedAbove:{type:Boolean,value:!1},theme:String}}constructor(){super(),this._boundSetPosition=this._setPosition.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this._boundSetPosition)}ready(){super.ready(),this.$.overlay.addEventListener("vaadin-overlay-outside-click",(e=>{e.preventDefault()}))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("iron-resize",this._boundSetPosition),this.opened=!1}notifyResize(){super.notifyResize(),this.positionTarget&&this.opened&&(this._setPosition(),requestAnimationFrame(this._setPosition.bind(this)))}_openedChanged(e,t){!!e!=!!t&&(e?(this.$.overlay.style.position=this._isPositionFixed(this.positionTarget)?"fixed":"absolute",this._setPosition(),window.addEventListener("scroll",this._boundSetPosition,!0),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0}))):this.__emptyItems||(window.removeEventListener("scroll",this._boundSetPosition,!0),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0}))))}_isPositionFixed(e){const t=this._getOffsetParent(e);return"fixed"===window.getComputedStyle(e).position||t&&this._isPositionFixed(t)}_getOffsetParent(e){if(e.assignedSlot)return e.assignedSlot.parentElement;if(e.parentElement)return e.offsetParent;const t=e.parentNode;return t&&11===t.nodeType&&t.host?t.host:void 0}_verticalOffset(e,t){return this.alignedAbove?-e.height:t.height}_shouldAlignAbove(e){return(window.innerHeight-e.bottom-Math.min(document.body.scrollTop,0))/window.innerHeight<.3}_getCustomWidth(){return window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,"--vaadin-combo-box-overlay-width"):getComputedStyle(this).getPropertyValue("--vaadin-combo-box-overlay-width")}_setOverlayWidth(){const e=this.positionTarget.clientWidth+"px",t=this._getCustomWidth();window.ShadyCSS&&!window.ShadyCSS.nativeCss?window.ShadyCSS.styleSubtree(this.$.overlay,{"--vaadin-combo-box-overlay-width":t,"--_vaadin-combo-box-overlay-default-width":e}):(this.$.overlay.style.setProperty("--_vaadin-combo-box-overlay-default-width",e),""===t?this.$.overlay.style.removeProperty("--vaadin-combo-box-overlay-width"):this.$.overlay.style.setProperty("--vaadin-combo-box-overlay-width",t))}_setPosition(e){if(this.hidden)return;if(e&&e.target){const t=e.target===document?document.body:e.target,i=this.$.overlay.parentElement;if(!t.contains(this.$.overlay)&&!t.contains(this.positionTarget)||i!==document.body)return}const t=this.positionTarget.getBoundingClientRect();this.alignedAbove=this._shouldAlignAbove(t);const i=this.$.overlay.getBoundingClientRect();this._translateX=t.left-i.left+(this._translateX||0),this._translateY=t.top-i.top+(this._translateY||0)+this._verticalOffset(i,t);const s=window.devicePixelRatio||1;this._translateX=Math.round(this._translateX*s)/s,this._translateY=Math.round(this._translateY*s)/s,this.$.overlay.style.transform=`translate3d(${this._translateX}px, ${this._translateY}px, 0)`,this.$.overlay.style.justifyContent=this.alignedAbove?"flex-end":"flex-start",this._setOverlayWidth(),this.dispatchEvent(new CustomEvent("position-changed"))}}customElements.define(fe.is,fe);
458
+ `}static get is(){return"vaadin-combo-box-dropdown"}static get properties(){return{opened:{type:Boolean,observer:"_openedChanged"},template:{type:Object,notify:!0},positionTarget:{type:Object},alignedAbove:{type:Boolean,value:!1},theme:String}}constructor(){super(),this._boundSetPosition=this._setPosition.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this._boundSetPosition)}ready(){super.ready(),this.$.overlay.addEventListener("vaadin-overlay-outside-click",(e=>{e.preventDefault()}))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("iron-resize",this._boundSetPosition),this.opened=!1}notifyResize(){super.notifyResize(),this.positionTarget&&this.opened&&(this._setPosition(),requestAnimationFrame(this._setPosition.bind(this)))}_openedChanged(e,t){!!e!=!!t&&(e?(this.$.overlay.style.position=this._isPositionFixed(this.positionTarget)?"fixed":"absolute",this._setPosition(),window.addEventListener("scroll",this._boundSetPosition,!0),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0}))):this.__emptyItems||(window.removeEventListener("scroll",this._boundSetPosition,!0),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0}))))}_isPositionFixed(e){const t=this._getOffsetParent(e);return"fixed"===window.getComputedStyle(e).position||t&&this._isPositionFixed(t)}_getOffsetParent(e){if(e.assignedSlot)return e.assignedSlot.parentElement;if(e.parentElement)return e.offsetParent;const t=e.parentNode;return t&&11===t.nodeType&&t.host?t.host:void 0}_verticalOffset(e,t){return this.alignedAbove?-e.height:t.height}_shouldAlignAbove(e){return(window.innerHeight-e.bottom-Math.min(document.body.scrollTop,0))/window.innerHeight<.3}_getCustomWidth(){return window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,"--vaadin-combo-box-overlay-width"):getComputedStyle(this).getPropertyValue("--vaadin-combo-box-overlay-width")}_setOverlayWidth(){const e=this.positionTarget.clientWidth+"px",t=this._getCustomWidth();window.ShadyCSS&&!window.ShadyCSS.nativeCss?window.ShadyCSS.styleSubtree(this.$.overlay,{"--vaadin-combo-box-overlay-width":t,"--_vaadin-combo-box-overlay-default-width":e}):(this.$.overlay.style.setProperty("--_vaadin-combo-box-overlay-default-width",e),""===t?this.$.overlay.style.removeProperty("--vaadin-combo-box-overlay-width"):this.$.overlay.style.setProperty("--vaadin-combo-box-overlay-width",t))}_setPosition(e){if(this.hidden)return;if(e&&e.target){const t=e.target===document?document.body:e.target,i=this.$.overlay.parentElement;if(!t.contains(this.$.overlay)&&!t.contains(this.positionTarget)||i!==document.body)return}const t=this.positionTarget.getBoundingClientRect();this.alignedAbove=this._shouldAlignAbove(t);const i=this.$.overlay.getBoundingClientRect();this._translateX=t.left-i.left+(this._translateX||0),this._translateY=t.top-i.top+(this._translateY||0)+this._verticalOffset(i,t);const s=window.devicePixelRatio||1;this._translateX=Math.round(this._translateX*s)/s,this._translateY=Math.round(this._translateY*s)/s,this.$.overlay.style.transform=`translate3d(${this._translateX}px, ${this._translateY}px, 0)`,this.$.overlay.style.justifyContent=this.alignedAbove?"flex-end":"flex-start",this._setOverlayWidth(),this.dispatchEvent(new CustomEvent("position-changed"))}}customElements.define(de.is,de);
483
459
  /**
484
460
  @license
485
461
  Copyright (c) 2017 Vaadin Ltd.
486
462
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
487
463
  */
488
- const ge=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})();class ye extends class extends n{}{static get template(){return o`
464
+ const ce=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})();class ue extends class extends n{}{static get template(){return o`
489
465
  <vaadin-combo-box-dropdown id="dropdown" hidden="[[_hidden(_items.*, loading)]]" position-target="[[positionTarget]]" on-template-changed="_templateChanged" on-position-changed="_setOverlayHeight" disable-upgrade="" theme="[[theme]]">
490
466
  <template>
491
467
  <style>
@@ -512,18 +488,18 @@ const ge=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!
512
488
  </div>
513
489
  </template>
514
490
  </vaadin-combo-box-dropdown>
515
- `}static get is(){return"vaadin-combo-box-dropdown-wrapper"}static get properties(){return{touchDevice:{type:Boolean,value:ge},opened:Boolean,positionTarget:{type:Object},renderer:Function,loading:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_setOverlayHeight"},theme:String,filterChanged:{type:Boolean,value:!1},_resetScrolling:{type:Boolean,value:!1},_selectedItem:{type:Object},_items:{type:Object},_focusedIndex:{type:Number,value:-1,observer:"_focusedIndexChanged"},_focusedItem:{type:String,computed:"_getFocusedItem(_focusedIndex)"},_itemLabelPath:{type:String,value:"label"},_itemValuePath:{type:String,value:"value"},_selector:Object,_itemIdPath:String,_oldScrollerPosition:{type:Number,value:0}}}static get observers(){return["_selectorChanged(_selector)","_loadingChanged(loading)","_openedChanged(opened, _items, loading)","_restoreScrollerPosition(_items)"]}_fireTouchAction(e){this.dispatchEvent(new CustomEvent("vaadin-overlay-touch-action",{detail:{sourceEvent:e}}))}_getItems(e,t){if(e){if(this._isNotEmpty(t)&&this._selector&&!this.filterChanged){const e=this._selector.firstVisibleIndex;0!==e&&(this._oldScrollerPosition=e,this._resetScrolling=!0)}return this.filterChanged=!1,t}return[]}_restoreScrollerPosition(e){this._isNotEmpty(e)&&this._selector&&0!==this._oldScrollerPosition&&(this._scrollIntoView(Math.min(e.length-1,this._oldScrollerPosition)),this._resetScrolling=!1,this._oldScrollerPosition=0)}_isNotEmpty(e){return!this._isEmpty(e)}_isEmpty(e){return!e||!e.length}_openedChanged(e,t,i){if(this.$.dropdown.hasAttribute("disable-upgrade")){if(!e)return;this._initDropdown()}this._isEmpty(t)&&(this.$.dropdown.__emptyItems=!0),this.$.dropdown.opened=!(!e||!i&&!this._isNotEmpty(t)),this.$.dropdown.__emptyItems=!1}_initDropdown(){this.$.dropdown.removeAttribute("disable-upgrade"),this._templateChanged(),this._loadingChanged(this.loading),this.$.dropdown.$.overlay.addEventListener("touchend",(e=>this._fireTouchAction(e))),this.$.dropdown.$.overlay.addEventListener("touchmove",(e=>this._fireTouchAction(e))),this.$.dropdown.$.overlay.addEventListener("mousedown",(e=>e.preventDefault())),/Trident/.test(navigator.userAgent)&&this._scroller.setAttribute("unselectable","on")}_templateChanged(e){this.$.dropdown.hasAttribute("disable-upgrade")||(this._selector=this.$.dropdown.$.overlay.content.querySelector("#selector"),this._scroller=this.$.dropdown.$.overlay.content.querySelector("#scroller"))}_loadingChanged(e){this.$.dropdown.hasAttribute("disable-upgrade")||(e?this.$.dropdown.$.overlay.setAttribute("loading",""):this.$.dropdown.$.overlay.removeAttribute("loading"))}_selectorChanged(e){this._patchWheelOverScrolling()}_setOverlayHeight(){if(!this.opened||!this.positionTarget||!this._selector)return;const e=this.positionTarget.getBoundingClientRect();this._scroller.style.maxHeight=(window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,"--vaadin-combo-box-overlay-max-height"):getComputedStyle(this).getPropertyValue("--vaadin-combo-box-overlay-max-height"))||"65vh";const t=this._maxOverlayHeight(e);this.$.dropdown.$.overlay.style.maxHeight=t,this._selector.style.maxHeight=t,this.updateViewportBoundaries()}_maxOverlayHeight(e){return this.$.dropdown.alignedAbove?Math.max(e.top-8+Math.min(document.body.scrollTop,0),116)+"px":Math.max(document.documentElement.clientHeight-e.bottom-8,116)+"px"}_getFocusedItem(e){if(e>=0)return this._items[e]}_isItemSelected(e,t,i){return!(e instanceof re)&&(i&&void 0!==e&&void 0!==t?this.get(i,e)===this.get(i,t):e===t)}_onItemClick(e){e.detail&&e.detail.sourceEvent&&e.detail.sourceEvent.stopPropagation&&this._stopPropagation(e.detail.sourceEvent),this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.model.item}}))}indexOfLabel(e){if(this._items&&e)for(let t=0;t<this._items.length;t++)if(this.getItemLabel(this._items[t]).toString().toLowerCase()===e.toString().toLowerCase())return t;return-1}__requestItemByIndex(e,t,i){return e instanceof re&&void 0!==t&&!i&&this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t,currentScrollerPos:this._oldScrollerPosition}})),t}getItemLabel(e,t){t=t||this._itemLabelPath;let i=e&&t?this.get(t,e):void 0;return null==i&&(i=e?e.toString():""),i}_isItemFocused(e,t){return e==t}_getAriaSelected(e,t){return this._isItemFocused(e,t).toString()}_getAriaRole(e){return void 0!==e&&"option"}_focusedIndexChanged(e){e>=0&&this._scrollIntoView(e)}_scrollIntoView(e){if(!(this.opened&&e>=0))return;const t=this._visibleItemsCount();if(void 0===t)return;let i=e;e>this._selector.lastVisibleIndex-1?(this._selector.scrollToIndex(e),i=e-t+1):e>this._selector.firstVisibleIndex&&(i=this._selector.firstVisibleIndex),this._selector.scrollToIndex(Math.max(0,i));const s=this._selector._getPhysicalIndex(e),o=this._selector._physicalItems[s];if(!o)return;const n=o.getBoundingClientRect(),r=this._scroller.getBoundingClientRect(),a=n.bottom-r.bottom+this._viewportTotalPaddingBottom;a>0&&(this._scroller.scrollTop+=a)}ensureItemsRendered(){this._selector._render()}adjustScrollPosition(){this.opened&&this._items&&this._scrollIntoView(this._focusedIndex)}_patchWheelOverScrolling(){const e=this._selector;e.addEventListener("wheel",(t=>{const i=e._scroller||e.scrollTarget,s=0===i.scrollTop,o=i.scrollHeight-i.scrollTop-i.clientHeight<=1;(s&&t.deltaY<0||o&&t.deltaY>0)&&t.preventDefault()}))}updateViewportBoundaries(){this._cachedViewportTotalPaddingBottom=void 0,this._selector.updateViewportBoundaries()}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const e=window.getComputedStyle(this._selector.$.items);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map((e=>parseInt(e,10))).reduce(((e,t)=>e+t))}return this._cachedViewportTotalPaddingBottom}_visibleItemsCount(){if(this._selector)return this._selector.flushDebouncer("_debounceTemplate"),this._selector.scrollToIndex(this._selector.firstVisibleIndex),this.updateViewportBoundaries(),this._selector.lastVisibleIndex-this._selector.firstVisibleIndex+1}_selectItem(e){e="number"==typeof e?this._items[e]:e,this._selector.selectedItem!==e&&this._selector.selectItem(e)}_preventDefault(e){e.cancelable&&e.preventDefault()}_stopPropagation(e){e.stopPropagation()}_hidden(e){return!this.loading&&this._isEmpty(this._items)}}customElements.define(ye.is,ye);
491
+ `}static get is(){return"vaadin-combo-box-dropdown-wrapper"}static get properties(){return{touchDevice:{type:Boolean,value:ce},opened:Boolean,positionTarget:{type:Object},renderer:Function,loading:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_setOverlayHeight"},theme:String,filterChanged:{type:Boolean,value:!1},_resetScrolling:{type:Boolean,value:!1},_selectedItem:{type:Object},_items:{type:Object},_focusedIndex:{type:Number,value:-1,observer:"_focusedIndexChanged"},_focusedItem:{type:String,computed:"_getFocusedItem(_focusedIndex)"},_itemLabelPath:{type:String,value:"label"},_itemValuePath:{type:String,value:"value"},_selector:Object,_itemIdPath:String,_oldScrollerPosition:{type:Number,value:0}}}static get observers(){return["_selectorChanged(_selector)","_loadingChanged(loading)","_openedChanged(opened, _items, loading)","_restoreScrollerPosition(_items)"]}_fireTouchAction(e){this.dispatchEvent(new CustomEvent("vaadin-overlay-touch-action",{detail:{sourceEvent:e}}))}_getItems(e,t){if(e){if(this._isNotEmpty(t)&&this._selector&&!this.filterChanged){const e=this._selector.firstVisibleIndex;0!==e&&(this._oldScrollerPosition=e,this._resetScrolling=!0)}return this.filterChanged=!1,t}return[]}_restoreScrollerPosition(e){this._isNotEmpty(e)&&this._selector&&0!==this._oldScrollerPosition&&(this._scrollIntoView(Math.min(e.length-1,this._oldScrollerPosition)),this._resetScrolling=!1,this._oldScrollerPosition=0)}_isNotEmpty(e){return!this._isEmpty(e)}_isEmpty(e){return!e||!e.length}_openedChanged(e,t,i){if(this.$.dropdown.hasAttribute("disable-upgrade")){if(!e)return;this._initDropdown()}this._isEmpty(t)&&(this.$.dropdown.__emptyItems=!0),this.$.dropdown.opened=!(!e||!i&&!this._isNotEmpty(t)),this.$.dropdown.__emptyItems=!1}_initDropdown(){this.$.dropdown.removeAttribute("disable-upgrade"),this._templateChanged(),this._loadingChanged(this.loading),this.$.dropdown.$.overlay.addEventListener("touchend",(e=>this._fireTouchAction(e))),this.$.dropdown.$.overlay.addEventListener("touchmove",(e=>this._fireTouchAction(e))),this.$.dropdown.$.overlay.addEventListener("mousedown",(e=>e.preventDefault())),/Trident/.test(navigator.userAgent)&&this._scroller.setAttribute("unselectable","on")}_templateChanged(e){this.$.dropdown.hasAttribute("disable-upgrade")||(this._selector=this.$.dropdown.$.overlay.content.querySelector("#selector"),this._scroller=this.$.dropdown.$.overlay.content.querySelector("#scroller"))}_loadingChanged(e){this.$.dropdown.hasAttribute("disable-upgrade")||(e?this.$.dropdown.$.overlay.setAttribute("loading",""):this.$.dropdown.$.overlay.removeAttribute("loading"))}_selectorChanged(e){this._patchWheelOverScrolling()}_setOverlayHeight(){if(!this.opened||!this.positionTarget||!this._selector)return;const e=this.positionTarget.getBoundingClientRect();this._scroller.style.maxHeight=(window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,"--vaadin-combo-box-overlay-max-height"):getComputedStyle(this).getPropertyValue("--vaadin-combo-box-overlay-max-height"))||"65vh";const t=this._maxOverlayHeight(e);this.$.dropdown.$.overlay.style.maxHeight=t,this._selector.style.maxHeight=t,this.updateViewportBoundaries()}_maxOverlayHeight(e){return this.$.dropdown.alignedAbove?Math.max(e.top-8+Math.min(document.body.scrollTop,0),116)+"px":Math.max(document.documentElement.clientHeight-e.bottom-8,116)+"px"}_getFocusedItem(e){if(e>=0)return this._items[e]}_isItemSelected(e,t,i){return!(e instanceof te)&&(i&&void 0!==e&&void 0!==t?this.get(i,e)===this.get(i,t):e===t)}_onItemClick(e){e.detail&&e.detail.sourceEvent&&e.detail.sourceEvent.stopPropagation&&this._stopPropagation(e.detail.sourceEvent),this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.model.item}}))}indexOfLabel(e){if(this._items&&e)for(let t=0;t<this._items.length;t++)if(this.getItemLabel(this._items[t]).toString().toLowerCase()===e.toString().toLowerCase())return t;return-1}__requestItemByIndex(e,t,i){return e instanceof te&&void 0!==t&&!i&&this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t,currentScrollerPos:this._oldScrollerPosition}})),t}getItemLabel(e,t){t=t||this._itemLabelPath;let i=e&&t?this.get(t,e):void 0;return null==i&&(i=e?e.toString():""),i}_isItemFocused(e,t){return e==t}_getAriaSelected(e,t){return this._isItemFocused(e,t).toString()}_getAriaRole(e){return void 0!==e&&"option"}_focusedIndexChanged(e){e>=0&&this._scrollIntoView(e)}_scrollIntoView(e){if(!(this.opened&&e>=0))return;const t=this._visibleItemsCount();if(void 0===t)return;let i=e;e>this._selector.lastVisibleIndex-1?(this._selector.scrollToIndex(e),i=e-t+1):e>this._selector.firstVisibleIndex&&(i=this._selector.firstVisibleIndex),this._selector.scrollToIndex(Math.max(0,i));const s=this._selector._getPhysicalIndex(e),o=this._selector._physicalItems[s];if(!o)return;const n=o.getBoundingClientRect(),r=this._scroller.getBoundingClientRect(),a=n.bottom-r.bottom+this._viewportTotalPaddingBottom;a>0&&(this._scroller.scrollTop+=a)}ensureItemsRendered(){this._selector._render()}adjustScrollPosition(){this.opened&&this._items&&this._scrollIntoView(this._focusedIndex)}_patchWheelOverScrolling(){const e=this._selector;e.addEventListener("wheel",(t=>{const i=e._scroller||e.scrollTarget,s=0===i.scrollTop,o=i.scrollHeight-i.scrollTop-i.clientHeight<=1;(s&&t.deltaY<0||o&&t.deltaY>0)&&t.preventDefault()}))}updateViewportBoundaries(){this._cachedViewportTotalPaddingBottom=void 0,this._selector.updateViewportBoundaries()}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const e=window.getComputedStyle(this._selector.$.items);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map((e=>parseInt(e,10))).reduce(((e,t)=>e+t))}return this._cachedViewportTotalPaddingBottom}_visibleItemsCount(){if(this._selector)return this._selector.flushDebouncer("_debounceTemplate"),this._selector.scrollToIndex(this._selector.firstVisibleIndex),this.updateViewportBoundaries(),this._selector.lastVisibleIndex-this._selector.firstVisibleIndex+1}_selectItem(e){e="number"==typeof e?this._items[e]:e,this._selector.selectedItem!==e&&this._selector.selectItem(e)}_preventDefault(e){e.cancelable&&e.preventDefault()}_stopPropagation(e){e.stopPropagation()}_hidden(e){return!this.loading&&this._isEmpty(this._items)}}customElements.define(ue.is,ue);
516
492
  /**
517
493
  @license
518
494
  Copyright (c) 2018 Vaadin Ltd.
519
495
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
520
496
  */
521
- const be=e=>class extends e{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},size:{type:Number,observer:"_sizeChanged"},dataProvider:{type:Object,observer:"_dataProviderChanged"},_pendingRequests:{value:()=>({})},__placeHolder:{value:new re}}}static get observers(){return["_dataProviderFilterChanged(filter, dataProvider)","_dataProviderClearFilter(dataProvider, opened, value)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}_dataProviderClearFilter(e,t,i){e&&!this.loading&&this.filter&&(this.size=void 0,this._pendingRequests={},this.filter="",this.clearCache())}ready(){super.ready(),this.clearCache(),this.$.overlay.addEventListener("index-requested",(e=>{const t=e.detail.index,i=e.detail.currentScrollerPos,s=Math.floor(1.5*this.pageSize);if(!this._shouldSkipIndex(t,s,i)&&void 0!==t){const e=this._getPageForIndex(t);this._shouldLoadPage(e)&&this._loadPage(e)}}))}_dataProviderFilterChanged(){this._shouldFetchData()&&(this.size=void 0,this._pendingRequests={},this.clearCache())}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(e){e&&this._shouldLoadPage(0)&&this._loadPage(0)}_shouldSkipIndex(e,t,i){return 0!==i&&e>=i-t&&e<=i+t}_shouldLoadPage(e){if(!this.filteredItems||this._forceNextRequest)return this._forceNextRequest=!1,!0;const t=this.filteredItems[e*this.pageSize];return void 0!==t?t instanceof re:void 0===this.size}_loadPage(e){if(!this._pendingRequests[e]&&this.dataProvider){this.loading=!0;const t={page:e,pageSize:this.pageSize,filter:this.filter},i=(s,o)=>{if(this._pendingRequests[e]===i){if(this.filteredItems)this.splice("filteredItems",t.page*t.pageSize,s.length,...s);else{const e=[];e.splice(t.page*t.pageSize,s.length,...s),this.filteredItems=e}this._isValidValue(this.value)&&this._getItemValue(this.selectedItem)!==this.value&&this._selectItemForValue(this.value),this.opened||this.hasAttribute("focused")||this._commitValue(),this.size=o,delete this._pendingRequests[e],0===Object.keys(this._pendingRequests).length&&(this.loading=!1),0===e&&this.__repositionOverlayDebouncer&&s.length>(this.__maxRenderedItems||0)&&(setTimeout((()=>this.__repositionOverlayDebouncer.flush())),this.__maxRenderedItems=s.length)}};this._pendingRequests[e]||(this._pendingRequests[e]=i,this.dataProvider(t,i))}}_getPageForIndex(e){return Math.floor(e/this.pageSize)}clearCache(){if(!this.dataProvider)return;this._pendingRequests={};const e=[];for(let t=0;t<(this.size||0);t++)e.push(this.__placeHolder);this.filteredItems=e,this._shouldFetchData()?this._loadPage(0):this._forceNextRequest=!0}_sizeChanged(e=0){const t=(this.filteredItems||[]).slice(0,e);for(let i=0;i<e;i++)t[i]=void 0!==t[i]?t[i]:this.__placeHolder;this.filteredItems=t,this._flushPendingRequests(e)}_pageSizeChanged(e,t){if(Math.floor(e)!==e||e<1)throw this.pageSize=t,new Error("`pageSize` value must be an integer > 0");this.clearCache()}_dataProviderChanged(e,t){this._ensureItemsOrDataProvider((()=>{this.dataProvider=t}))}_ensureItemsOrDataProvider(e){if(void 0!==this.items&&void 0!==this.dataProvider)throw e(),new Error("Using `items` and `dataProvider` together is not supported");this.dataProvider&&!this.filteredItems&&(this.filteredItems=[])}_warnDataProviderValue(e,t){if(e&&""!==t&&(void 0===this.selectedItem||null===this.selectedItem)){const e=this._indexOfValue(t,this.filteredItems);(e<0||!this._getItemLabel(this.filteredItems[e]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}_flushPendingRequests(e){if(this._pendingRequests){const t=Math.ceil(e/this.pageSize),i=Object.keys(this._pendingRequests);for(let s=0;s<i.length;s++){const o=parseInt(i[s]);o>=t&&this._pendingRequests[o]([],e)}}}}
497
+ const _e=e=>class extends e{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},size:{type:Number,observer:"_sizeChanged"},dataProvider:{type:Object,observer:"_dataProviderChanged"},_pendingRequests:{value:()=>({})},__placeHolder:{value:new te}}}static get observers(){return["_dataProviderFilterChanged(filter, dataProvider)","_dataProviderClearFilter(dataProvider, opened, value)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}_dataProviderClearFilter(e,t,i){e&&!this.loading&&this.filter&&(this.size=void 0,this._pendingRequests={},this.filter="",this.clearCache())}ready(){super.ready(),this.clearCache(),this.$.overlay.addEventListener("index-requested",(e=>{const t=e.detail.index,i=e.detail.currentScrollerPos,s=Math.floor(1.5*this.pageSize);if(!this._shouldSkipIndex(t,s,i)&&void 0!==t){const e=this._getPageForIndex(t);this._shouldLoadPage(e)&&this._loadPage(e)}}))}_dataProviderFilterChanged(){this._shouldFetchData()&&(this.size=void 0,this._pendingRequests={},this.clearCache())}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(e){e&&this._shouldLoadPage(0)&&this._loadPage(0)}_shouldSkipIndex(e,t,i){return 0!==i&&e>=i-t&&e<=i+t}_shouldLoadPage(e){if(!this.filteredItems||this._forceNextRequest)return this._forceNextRequest=!1,!0;const t=this.filteredItems[e*this.pageSize];return void 0!==t?t instanceof te:void 0===this.size}_loadPage(e){if(!this._pendingRequests[e]&&this.dataProvider){this.loading=!0;const t={page:e,pageSize:this.pageSize,filter:this.filter},i=(s,o)=>{if(this._pendingRequests[e]===i){if(this.filteredItems)this.splice("filteredItems",t.page*t.pageSize,s.length,...s);else{const e=[];e.splice(t.page*t.pageSize,s.length,...s),this.filteredItems=e}this._isValidValue(this.value)&&this._getItemValue(this.selectedItem)!==this.value&&this._selectItemForValue(this.value),this.opened||this.hasAttribute("focused")||this._commitValue(),this.size=o,delete this._pendingRequests[e],0===Object.keys(this._pendingRequests).length&&(this.loading=!1),0===e&&this.__repositionOverlayDebouncer&&s.length>(this.__maxRenderedItems||0)&&(setTimeout((()=>this.__repositionOverlayDebouncer.flush())),this.__maxRenderedItems=s.length)}};this._pendingRequests[e]||(this._pendingRequests[e]=i,this.dataProvider(t,i))}}_getPageForIndex(e){return Math.floor(e/this.pageSize)}clearCache(){if(!this.dataProvider)return;this._pendingRequests={};const e=[];for(let t=0;t<(this.size||0);t++)e.push(this.__placeHolder);this.filteredItems=e,this._shouldFetchData()?this._loadPage(0):this._forceNextRequest=!0}_sizeChanged(e=0){const t=(this.filteredItems||[]).slice(0,e);for(let i=0;i<e;i++)t[i]=void 0!==t[i]?t[i]:this.__placeHolder;this.filteredItems=t,this._flushPendingRequests(e)}_pageSizeChanged(e,t){if(Math.floor(e)!==e||e<1)throw this.pageSize=t,new Error("`pageSize` value must be an integer > 0");this.clearCache()}_dataProviderChanged(e,t){this._ensureItemsOrDataProvider((()=>{this.dataProvider=t}))}_ensureItemsOrDataProvider(e){if(void 0!==this.items&&void 0!==this.dataProvider)throw e(),new Error("Using `items` and `dataProvider` together is not supported");this.dataProvider&&!this.filteredItems&&(this.filteredItems=[])}_warnDataProviderValue(e,t){if(e&&""!==t&&(void 0===this.selectedItem||null===this.selectedItem)){const e=this._indexOfValue(t,this.filteredItems);(e<0||!this._getItemLabel(this.filteredItems[e]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}_flushPendingRequests(e){if(this._pendingRequests){const t=Math.ceil(e/this.pageSize),i=Object.keys(this._pendingRequests);for(let s=0;s<i.length;s++){const o=parseInt(i[s]);o>=t&&this._pendingRequests[o]([],e)}}}}
522
498
  /**
523
499
  @license
524
500
  Copyright (c) 2017 Vaadin Ltd.
525
501
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
526
- */;class Ie extends(i(s(e(be(ae(n)))))){static get template(){return o`
502
+ */;class me extends(i(s(e(_e(ie(n)))))){static get template(){return o`
527
503
  <style>
528
504
  :host {
529
505
  display: inline-block;
@@ -553,4 +529,4 @@ This program is available under Apache License Version 2.0, available at https:/
553
529
 
554
530
  <vaadin-combo-box-dropdown-wrapper id="overlay" opened="[[opened]]" renderer="[[renderer]]" position-target="[[_getPositionTarget()]]" _focused-index="[[_focusedIndex]]" _item-id-path="[[itemIdPath]]" _item-label-path="[[itemLabelPath]]" loading="[[loading]]" theme="[[theme]]">
555
531
  </vaadin-combo-box-dropdown-wrapper>
556
- `}constructor(){super(),this.theme}static get is(){return"vaadin-combo-box"}static get version(){return"5.4.12"}static get properties(){return{label:{type:String,reflectToAttribute:!0},required:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},preventInvalidInput:{type:Boolean},pattern:{type:String},errorMessage:{type:String},autofocus:{type:Boolean},placeholder:{type:String,value:""},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1},clearButtonVisible:{type:Boolean,value:!1}}}static get observers(){return["_updateAriaExpanded(opened)"]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i);/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&this.root&&Array.prototype.forEach.call(this.root.querySelectorAll("*"),(e=>{e.style["-webkit-backface-visibility"]="visible",e.style["-webkit-backface-visibility"]=""}))}ready(){super.ready(),this._nativeInput=this.inputElement.focusElement,this._toggleElement=this.$.toggleButton,this._clearElement=this.inputElement.shadowRoot.querySelector('[part="clear-button"]'),this.addEventListener("keydown",(e=>{this._isEventKey(e,"esc")&&this._onEscape(e)}),!0),this._nativeInput.setAttribute("role","combobox"),this._nativeInput.setAttribute("aria-autocomplete","list"),this._updateAriaExpanded()}connectedCallback(){super.connectedCallback(),this._preventInputBlur()}disconnectedCallback(){super.disconnectedCallback(),this._restoreInputBlur()}_getPositionTarget(){return this.$.input}_updateAriaExpanded(){this._nativeInput&&(this._nativeInput.setAttribute("aria-expanded",this.opened),this._toggleElement.setAttribute("aria-expanded",this.opened))}get inputElement(){return this.$.input}get focusElement(){return this.inputElement||this}}customElements.define(Ie.is,Ie);export{be as C,he as I,$ as O,V as a,W as b,ne as c,ae as d};
532
+ `}constructor(){super(),this.theme}static get is(){return"vaadin-combo-box"}static get version(){return"5.4.12"}static get properties(){return{label:{type:String,reflectToAttribute:!0},required:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},preventInvalidInput:{type:Boolean},pattern:{type:String},errorMessage:{type:String},autofocus:{type:Boolean},placeholder:{type:String,value:""},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1},clearButtonVisible:{type:Boolean,value:!1}}}static get observers(){return["_updateAriaExpanded(opened)"]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i);/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&this.root&&Array.prototype.forEach.call(this.root.querySelectorAll("*"),(e=>{e.style["-webkit-backface-visibility"]="visible",e.style["-webkit-backface-visibility"]=""}))}ready(){super.ready(),this._nativeInput=this.inputElement.focusElement,this._toggleElement=this.$.toggleButton,this._clearElement=this.inputElement.shadowRoot.querySelector('[part="clear-button"]'),this.addEventListener("keydown",(e=>{this._isEventKey(e,"esc")&&this._onEscape(e)}),!0),this._nativeInput.setAttribute("role","combobox"),this._nativeInput.setAttribute("aria-autocomplete","list"),this._updateAriaExpanded()}connectedCallback(){super.connectedCallback(),this._preventInputBlur()}disconnectedCallback(){super.disconnectedCallback(),this._restoreInputBlur()}_getPositionTarget(){return this.$.input}_updateAriaExpanded(){this._nativeInput&&(this._nativeInput.setAttribute("aria-expanded",this.opened),this._toggleElement.setAttribute("aria-expanded",this.opened))}get inputElement(){return this.$.input}get focusElement(){return this.inputElement||this}}customElements.define(me.is,me);export{_e as C,M as I,R as O,ee as a,ie as b};