@watermarkinsights/ripple 3.14.1 → 3.15.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-0ea0888f.js → chartFunctions-34fdd3ce.js} +420 -420
  3. package/dist/cjs/{functions-8d3ceccd.js → functions-120449cf.js} +450 -1894
  4. package/dist/cjs/{global-12a09ffa.js → global-8298f15f.js} +62 -62
  5. package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
  6. package/dist/cjs/{index-df6a3611.js → index-acad7ab3.js} +1 -4
  7. package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
  8. package/dist/cjs/loader.cjs.js +4 -4
  9. package/dist/cjs/priv-chart-popover.cjs.entry.js +87 -87
  10. package/dist/cjs/priv-datepicker.cjs.entry.js +658 -658
  11. package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
  12. package/dist/cjs/priv-navigator-item.cjs.entry.js +24 -24
  13. package/dist/cjs/ripple.cjs.js +4 -4
  14. package/dist/cjs/wm-action-menu_2.cjs.entry.js +330 -336
  15. package/dist/cjs/wm-button.cjs.entry.js +249 -242
  16. package/dist/cjs/wm-chart-slice.cjs.entry.js +14 -14
  17. package/dist/cjs/wm-chart.cjs.entry.js +111 -111
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +266 -266
  19. package/dist/cjs/wm-input.cjs.entry.js +135 -135
  20. package/dist/cjs/wm-modal-footer.cjs.entry.js +34 -34
  21. package/dist/cjs/wm-modal-header.cjs.entry.js +37 -37
  22. package/dist/cjs/wm-modal.cjs.entry.js +164 -164
  23. package/dist/cjs/wm-navigation_3.cjs.entry.js +228 -228
  24. package/dist/cjs/wm-navigator.cjs.entry.js +269 -269
  25. package/dist/cjs/wm-network-uploader.cjs.entry.js +455 -455
  26. package/dist/cjs/wm-option_2.cjs.entry.js +721 -721
  27. package/dist/cjs/wm-pagination.cjs.entry.js +168 -168
  28. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +130 -130
  29. package/dist/cjs/wm-search.cjs.entry.js +233 -233
  30. package/dist/cjs/wm-snackbar.cjs.entry.js +171 -171
  31. package/dist/cjs/wm-tab-item_3.cjs.entry.js +297 -297
  32. package/dist/cjs/wm-tag-input.cjs.entry.js +580 -580
  33. package/dist/cjs/wm-timepicker.cjs.entry.js +384 -384
  34. package/dist/cjs/wm-toggletip.cjs.entry.js +125 -125
  35. package/dist/cjs/wm-uploader.cjs.entry.js +607 -630
  36. package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
  37. package/dist/collection/collection-manifest.json +1 -1
  38. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +258 -258
  39. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +115 -115
  40. package/dist/collection/components/charts/wm-chart/wm-chart.js +328 -328
  41. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +195 -195
  42. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +88 -88
  43. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +111 -111
  44. package/dist/collection/components/wm-action-menu/wm-action-menu.js +442 -448
  45. package/dist/collection/components/wm-button/wm-button.js +545 -504
  46. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1024 -1024
  47. package/dist/collection/components/wm-datepicker/wm-datepicker.js +471 -471
  48. package/dist/collection/components/wm-input/wm-input.js +423 -423
  49. package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
  50. package/dist/collection/components/wm-modal/wm-modal-footer.js +136 -136
  51. package/dist/collection/components/wm-modal/wm-modal-header.js +87 -87
  52. package/dist/collection/components/wm-modal/wm-modal.js +461 -461
  53. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +162 -162
  54. package/dist/collection/components/wm-navigation/wm-navigation-item.js +121 -121
  55. package/dist/collection/components/wm-navigation/wm-navigation.js +218 -218
  56. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
  57. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
  58. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  59. package/dist/collection/components/wm-option/wm-option.js +428 -428
  60. package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
  61. package/dist/collection/components/wm-search/wm-search.js +480 -480
  62. package/dist/collection/components/wm-select/wm-select.js +1001 -1001
  63. package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
  64. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
  65. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
  66. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  67. package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
  68. package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
  69. package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
  70. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +787 -787
  71. package/dist/collection/components/wm-uploader/wm-uploader.js +1050 -1072
  72. package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
  73. package/dist/collection/dev/scripts.js +20 -20
  74. package/dist/collection/global/__mocks__/functions.js +6 -6
  75. package/dist/collection/global/chartFunctions.js +421 -421
  76. package/dist/collection/global/functions.js +441 -441
  77. package/dist/collection/global/global.js +69 -69
  78. package/dist/collection/global/interfaces.js +49 -49
  79. package/dist/collection/global/services/__mocks__/http-service.js +130 -130
  80. package/dist/collection/global/services/http-service.js +50 -50
  81. package/dist/collection/lang/lang.js +5 -5
  82. package/dist/collection/lang/missing.js +43 -43
  83. package/dist/collection/lang/piglatin.js +93 -93
  84. package/dist/esm/{chartFunctions-6f90586d.js → chartFunctions-20f05eb5.js} +420 -420
  85. package/dist/esm/{functions-11c0c4e2.js → functions-036af8dc.js} +450 -1894
  86. package/dist/esm/{global-5abca73e.js → global-bde81db9.js} +62 -62
  87. package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
  88. package/dist/esm/{index-17c79cc6.js → index-7603f98e.js} +1 -4
  89. package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
  90. package/dist/esm/loader.js +4 -4
  91. package/dist/esm/polyfills/core-js.js +0 -0
  92. package/dist/esm/polyfills/css-shim.js +1 -1
  93. package/dist/esm/polyfills/dom.js +0 -0
  94. package/dist/esm/polyfills/es5-html-element.js +0 -0
  95. package/dist/esm/polyfills/index.js +0 -0
  96. package/dist/esm/polyfills/system.js +0 -0
  97. package/dist/esm/priv-chart-popover.entry.js +87 -87
  98. package/dist/esm/priv-datepicker.entry.js +658 -658
  99. package/dist/esm/priv-navigator-button.entry.js +19 -19
  100. package/dist/esm/priv-navigator-item.entry.js +24 -24
  101. package/dist/esm/ripple.js +4 -4
  102. package/dist/esm/wm-action-menu_2.entry.js +330 -336
  103. package/dist/esm/wm-button.entry.js +249 -242
  104. package/dist/esm/wm-chart-slice.entry.js +14 -14
  105. package/dist/esm/wm-chart.entry.js +111 -111
  106. package/dist/esm/wm-datepicker.entry.js +266 -266
  107. package/dist/esm/wm-input.entry.js +135 -135
  108. package/dist/esm/wm-modal-footer.entry.js +34 -34
  109. package/dist/esm/wm-modal-header.entry.js +37 -37
  110. package/dist/esm/wm-modal.entry.js +164 -164
  111. package/dist/esm/wm-navigation_3.entry.js +228 -228
  112. package/dist/esm/wm-navigator.entry.js +269 -269
  113. package/dist/esm/wm-network-uploader.entry.js +455 -455
  114. package/dist/esm/wm-option_2.entry.js +721 -721
  115. package/dist/esm/wm-pagination.entry.js +168 -168
  116. package/dist/esm/wm-progress-indicator_3.entry.js +130 -130
  117. package/dist/esm/wm-search.entry.js +233 -233
  118. package/dist/esm/wm-snackbar.entry.js +171 -171
  119. package/dist/esm/wm-tab-item_3.entry.js +297 -297
  120. package/dist/esm/wm-tag-input.entry.js +580 -580
  121. package/dist/esm/wm-timepicker.entry.js +384 -384
  122. package/dist/esm/wm-toggletip.entry.js +125 -125
  123. package/dist/esm/wm-uploader.entry.js +607 -630
  124. package/dist/esm/wm-wrapper.entry.js +13 -13
  125. package/dist/esm-es5/{chartFunctions-6f90586d.js → chartFunctions-20f05eb5.js} +1 -1
  126. package/dist/esm-es5/functions-036af8dc.js +15 -0
  127. package/dist/esm-es5/global-bde81db9.js +1 -0
  128. package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +0 -0
  129. package/dist/esm-es5/{index-17c79cc6.js → index-7603f98e.js} +1 -1
  130. package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +0 -0
  131. package/dist/esm-es5/loader.js +1 -1
  132. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  133. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  134. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  135. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  136. package/dist/esm-es5/ripple.js +1 -1
  137. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  138. package/dist/esm-es5/wm-button.entry.js +1 -1
  139. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  140. package/dist/esm-es5/wm-chart.entry.js +1 -1
  141. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  142. package/dist/esm-es5/wm-input.entry.js +1 -1
  143. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  144. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  145. package/dist/esm-es5/wm-modal.entry.js +1 -1
  146. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  147. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  148. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  149. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  150. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  151. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  152. package/dist/esm-es5/wm-search.entry.js +1 -1
  153. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  154. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  155. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  156. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  157. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  158. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  159. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  160. package/dist/ripple/{p-b5b7c71f.system.js → p-04d8b674.system.js} +1 -1
  161. package/dist/ripple/{p-c49ef079.system.entry.js → p-04e44b30.system.entry.js} +1 -1
  162. package/dist/ripple/{p-2af0b657.system.entry.js → p-0556279c.system.entry.js} +1 -1
  163. package/dist/ripple/{p-07ebdcd4.system.entry.js → p-06adbeb9.system.entry.js} +1 -1
  164. package/dist/ripple/{p-fe4c1194.system.entry.js → p-0e9ccc6f.system.entry.js} +1 -1
  165. package/dist/ripple/p-17ceb8c1.entry.js +1 -0
  166. package/dist/ripple/p-1887286e.entry.js +1 -0
  167. package/dist/ripple/p-1a53c470.entry.js +1 -0
  168. package/dist/ripple/{p-06012eb7.system.entry.js → p-1ccd994d.system.entry.js} +1 -1
  169. package/dist/ripple/p-1d795f42.entry.js +1 -0
  170. package/dist/ripple/{p-59678b70.system.entry.js → p-1df2adee.system.entry.js} +1 -1
  171. package/dist/ripple/p-2f860b24.entry.js +1 -0
  172. package/dist/ripple/p-358bde27.entry.js +1 -0
  173. package/dist/ripple/p-3680b55d.entry.js +1 -0
  174. package/dist/ripple/p-3a1d6fc4.entry.js +1 -0
  175. package/dist/ripple/{p-f17076c4.system.entry.js → p-3b3e847c.system.entry.js} +1 -1
  176. package/dist/ripple/{p-b2a9b5d6.system.entry.js → p-416899da.system.entry.js} +1 -1
  177. package/dist/ripple/p-4284c8a4.entry.js +1 -0
  178. package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
  179. package/dist/ripple/{p-d927de70.system.entry.js → p-49fd7ede.system.entry.js} +1 -1
  180. package/dist/ripple/p-4d59fe86.entry.js +1 -0
  181. package/dist/ripple/{p-490dafa4.js → p-4ecd3430.js} +1 -1
  182. package/dist/ripple/{p-8b54c589.system.entry.js → p-62eac2d6.system.entry.js} +1 -1
  183. package/dist/ripple/p-6aa6a818.entry.js +1 -0
  184. package/dist/ripple/{p-08fc668c.system.entry.js → p-7173b0a7.system.entry.js} +1 -1
  185. package/dist/ripple/p-726c979a.system.js +15 -0
  186. package/dist/ripple/{p-4439bdd1.system.entry.js → p-752da0fb.system.entry.js} +1 -1
  187. package/dist/ripple/p-7ae1a630.entry.js +1 -0
  188. package/dist/ripple/p-7ecbf258.entry.js +1 -0
  189. package/dist/ripple/{p-910b6dd5.system.entry.js → p-7ef6a7cf.system.entry.js} +1 -1
  190. package/dist/ripple/p-7fae0cc2.entry.js +1 -0
  191. package/dist/ripple/{p-c4c21c82.system.entry.js → p-895f5ec5.system.entry.js} +1 -1
  192. package/dist/ripple/p-8de546e8.entry.js +1 -0
  193. package/dist/ripple/{p-27253ed2.system.entry.js → p-90ed3268.system.entry.js} +1 -1
  194. package/dist/ripple/p-93d9dbcb.system.js +1 -0
  195. package/dist/ripple/p-93dee724.entry.js +1 -0
  196. package/dist/ripple/p-97c2b06f.entry.js +1 -0
  197. package/dist/ripple/{p-84d0d2ff.system.entry.js → p-995ba16f.system.entry.js} +1 -1
  198. package/dist/ripple/{p-4650a83c.system.entry.js → p-9bad110c.system.entry.js} +1 -1
  199. package/dist/ripple/{p-313b6073.system.js → p-9d02957d.system.js} +0 -0
  200. package/dist/ripple/p-9e09d7a1.entry.js +1 -0
  201. package/dist/ripple/p-a04ba6c8.entry.js +1 -0
  202. package/dist/ripple/{p-726b9452.system.js → p-a0c3ef16.system.js} +1 -1
  203. package/dist/ripple/p-a53e06b0.js +1 -0
  204. package/dist/ripple/p-a9e0ce88.entry.js +1 -0
  205. package/dist/ripple/p-aa6b3c86.system.js +1 -0
  206. package/dist/ripple/{p-db44eb6f.system.entry.js → p-ae6cfbca.system.entry.js} +1 -1
  207. package/dist/ripple/{p-7cb0035a.system.entry.js → p-af3ce4fc.system.entry.js} +1 -1
  208. package/dist/ripple/p-b3c71506.js +1 -0
  209. package/dist/ripple/{p-6ffdab0d.system.entry.js → p-c1443a0e.system.entry.js} +1 -1
  210. package/dist/ripple/p-c26d0a1d.entry.js +1 -0
  211. package/dist/ripple/{p-ffc34819.system.entry.js → p-ca383a43.system.entry.js} +1 -1
  212. package/dist/ripple/{p-57a718f0.system.entry.js → p-cd3d74d1.system.entry.js} +1 -1
  213. package/dist/ripple/{p-b4837126.system.entry.js → p-d48c56c7.system.entry.js} +1 -1
  214. package/dist/ripple/p-de3367ee.js +16 -0
  215. package/dist/ripple/p-e083fca6.entry.js +1 -0
  216. package/dist/ripple/{p-f0d3ceb1.system.entry.js → p-e4439bc3.system.entry.js} +1 -1
  217. package/dist/ripple/p-e524d462.entry.js +1 -0
  218. package/dist/ripple/p-e8d39f68.entry.js +1 -0
  219. package/dist/ripple/{p-dc7e5609.system.entry.js → p-f23b3986.system.entry.js} +1 -1
  220. package/dist/ripple/{p-b793bc6f.system.entry.js → p-f3fc43ee.system.entry.js} +1 -1
  221. package/dist/ripple/p-f53ea7f2.entry.js +1 -0
  222. package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
  223. package/dist/ripple/p-fd5497f9.system.entry.js +1 -0
  224. package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
  225. package/dist/ripple/p-fda61e7e.entry.js +1 -0
  226. package/dist/ripple/p-fe952112.entry.js +1 -0
  227. package/dist/ripple/ripple.esm.js +1 -1
  228. package/dist/ripple/ripple.js +1 -1
  229. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +27 -27
  230. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  231. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +36 -36
  232. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +27 -27
  233. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +17 -17
  234. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  235. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +47 -47
  236. package/dist/types/components/wm-button/wm-button.d.ts +49 -43
  237. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
  238. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
  239. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  240. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
  241. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +14 -14
  242. package/dist/types/components/wm-modal/wm-modal-header.d.ts +11 -11
  243. package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
  244. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -21
  245. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
  246. package/dist/types/components/wm-navigation/wm-navigation.d.ts +28 -28
  247. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  248. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
  249. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
  250. package/dist/types/components/wm-option/wm-option.d.ts +35 -35
  251. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  252. package/dist/types/components/wm-search/wm-search.d.ts +86 -86
  253. package/dist/types/components/wm-select/wm-select.d.ts +94 -94
  254. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
  255. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
  256. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
  257. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
  258. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
  259. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
  260. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
  261. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
  262. package/dist/types/components/wm-uploader/wm-uploader.d.ts +122 -118
  263. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  264. package/dist/types/components.d.ts +28 -24
  265. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  266. package/dist/types/global/chartFunctions.d.ts +29 -29
  267. package/dist/types/global/functions.d.ts +42 -42
  268. package/dist/types/global/global.d.ts +1 -1
  269. package/dist/types/global/interfaces.d.ts +44 -44
  270. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  271. package/dist/types/global/services/http-service.d.ts +4 -4
  272. package/dist/types/lang/lang.d.ts +5 -5
  273. package/package.json +47 -47
  274. package/dist/esm-es5/functions-11c0c4e2.js +0 -1
  275. package/dist/esm-es5/global-5abca73e.js +0 -1
  276. package/dist/ripple/p-0e22a3a4.entry.js +0 -1
  277. package/dist/ripple/p-17438cd5.entry.js +0 -1
  278. package/dist/ripple/p-262c75ff.entry.js +0 -1
  279. package/dist/ripple/p-2e5cb321.entry.js +0 -1
  280. package/dist/ripple/p-37b0a23c.system.js +0 -1
  281. package/dist/ripple/p-3e875e87.system.entry.js +0 -1
  282. package/dist/ripple/p-4073ac6a.entry.js +0 -1
  283. package/dist/ripple/p-410687ea.entry.js +0 -1
  284. package/dist/ripple/p-42bf2cd4.system.js +0 -1
  285. package/dist/ripple/p-42dbd978.entry.js +0 -1
  286. package/dist/ripple/p-4afa52d4.entry.js +0 -1
  287. package/dist/ripple/p-4f3f7b2b.entry.js +0 -1
  288. package/dist/ripple/p-5018f8ae.entry.js +0 -1
  289. package/dist/ripple/p-57c94258.entry.js +0 -1
  290. package/dist/ripple/p-626d5017.entry.js +0 -1
  291. package/dist/ripple/p-70d0e993.js +0 -1
  292. package/dist/ripple/p-80a00759.entry.js +0 -1
  293. package/dist/ripple/p-80b62707.entry.js +0 -1
  294. package/dist/ripple/p-8a2cabf2.entry.js +0 -1
  295. package/dist/ripple/p-962f51ff.entry.js +0 -1
  296. package/dist/ripple/p-97683ddc.entry.js +0 -1
  297. package/dist/ripple/p-9c60325b.entry.js +0 -1
  298. package/dist/ripple/p-b0536ddb.entry.js +0 -1
  299. package/dist/ripple/p-c2abdcba.js +0 -1
  300. package/dist/ripple/p-c656fcf1.entry.js +0 -1
  301. package/dist/ripple/p-caef11cc.entry.js +0 -1
  302. package/dist/ripple/p-cb357a84.entry.js +0 -1
  303. package/dist/ripple/p-d2a11410.entry.js +0 -1
  304. package/dist/ripple/p-db899686.system.js +0 -1
  305. package/dist/ripple/p-dfa80ed1.entry.js +0 -1
  306. package/dist/ripple/p-e012273a.entry.js +0 -1
  307. package/dist/ripple/p-e2d5f8bd.js +0 -1
  308. package/dist/ripple/p-e4cb8aad.entry.js +0 -1
  309. package/dist/ripple/p-fa632547.entry.js +0 -1
@@ -3834,7 +3834,7 @@ const lang = /*#__PURE__*/Object.freeze({
3834
3834
  pig: pig
3835
3835
  });
3836
3836
 
3837
- /******************************************************************************
3837
+ /*! *****************************************************************************
3838
3838
  Copyright (c) Microsoft Corporation.
3839
3839
 
3840
3840
  Permission to use, copy, modify, and/or distribute this software for any
@@ -4454,1429 +4454,6 @@ function parseNumberSkeleton(tokens) {
4454
4454
  return result;
4455
4455
  }
4456
4456
 
4457
- // @generated from time-data-gen.ts
4458
- // prettier-ignore
4459
- var timeData = {
4460
- "AX": [
4461
- "H"
4462
- ],
4463
- "BQ": [
4464
- "H"
4465
- ],
4466
- "CP": [
4467
- "H"
4468
- ],
4469
- "CZ": [
4470
- "H"
4471
- ],
4472
- "DK": [
4473
- "H"
4474
- ],
4475
- "FI": [
4476
- "H"
4477
- ],
4478
- "ID": [
4479
- "H"
4480
- ],
4481
- "IS": [
4482
- "H"
4483
- ],
4484
- "ML": [
4485
- "H"
4486
- ],
4487
- "NE": [
4488
- "H"
4489
- ],
4490
- "RU": [
4491
- "H"
4492
- ],
4493
- "SE": [
4494
- "H"
4495
- ],
4496
- "SJ": [
4497
- "H"
4498
- ],
4499
- "SK": [
4500
- "H"
4501
- ],
4502
- "AS": [
4503
- "h",
4504
- "H"
4505
- ],
4506
- "BT": [
4507
- "h",
4508
- "H"
4509
- ],
4510
- "DJ": [
4511
- "h",
4512
- "H"
4513
- ],
4514
- "ER": [
4515
- "h",
4516
- "H"
4517
- ],
4518
- "GH": [
4519
- "h",
4520
- "H"
4521
- ],
4522
- "IN": [
4523
- "h",
4524
- "H"
4525
- ],
4526
- "LS": [
4527
- "h",
4528
- "H"
4529
- ],
4530
- "PG": [
4531
- "h",
4532
- "H"
4533
- ],
4534
- "PW": [
4535
- "h",
4536
- "H"
4537
- ],
4538
- "SO": [
4539
- "h",
4540
- "H"
4541
- ],
4542
- "TO": [
4543
- "h",
4544
- "H"
4545
- ],
4546
- "VU": [
4547
- "h",
4548
- "H"
4549
- ],
4550
- "WS": [
4551
- "h",
4552
- "H"
4553
- ],
4554
- "001": [
4555
- "H",
4556
- "h"
4557
- ],
4558
- "AL": [
4559
- "h",
4560
- "H",
4561
- "hB"
4562
- ],
4563
- "TD": [
4564
- "h",
4565
- "H",
4566
- "hB"
4567
- ],
4568
- "ca-ES": [
4569
- "H",
4570
- "h",
4571
- "hB"
4572
- ],
4573
- "CF": [
4574
- "H",
4575
- "h",
4576
- "hB"
4577
- ],
4578
- "CM": [
4579
- "H",
4580
- "h",
4581
- "hB"
4582
- ],
4583
- "fr-CA": [
4584
- "H",
4585
- "h",
4586
- "hB"
4587
- ],
4588
- "gl-ES": [
4589
- "H",
4590
- "h",
4591
- "hB"
4592
- ],
4593
- "it-CH": [
4594
- "H",
4595
- "h",
4596
- "hB"
4597
- ],
4598
- "it-IT": [
4599
- "H",
4600
- "h",
4601
- "hB"
4602
- ],
4603
- "LU": [
4604
- "H",
4605
- "h",
4606
- "hB"
4607
- ],
4608
- "NP": [
4609
- "H",
4610
- "h",
4611
- "hB"
4612
- ],
4613
- "PF": [
4614
- "H",
4615
- "h",
4616
- "hB"
4617
- ],
4618
- "SC": [
4619
- "H",
4620
- "h",
4621
- "hB"
4622
- ],
4623
- "SM": [
4624
- "H",
4625
- "h",
4626
- "hB"
4627
- ],
4628
- "SN": [
4629
- "H",
4630
- "h",
4631
- "hB"
4632
- ],
4633
- "TF": [
4634
- "H",
4635
- "h",
4636
- "hB"
4637
- ],
4638
- "VA": [
4639
- "H",
4640
- "h",
4641
- "hB"
4642
- ],
4643
- "CY": [
4644
- "h",
4645
- "H",
4646
- "hb",
4647
- "hB"
4648
- ],
4649
- "GR": [
4650
- "h",
4651
- "H",
4652
- "hb",
4653
- "hB"
4654
- ],
4655
- "CO": [
4656
- "h",
4657
- "H",
4658
- "hB",
4659
- "hb"
4660
- ],
4661
- "DO": [
4662
- "h",
4663
- "H",
4664
- "hB",
4665
- "hb"
4666
- ],
4667
- "KP": [
4668
- "h",
4669
- "H",
4670
- "hB",
4671
- "hb"
4672
- ],
4673
- "KR": [
4674
- "h",
4675
- "H",
4676
- "hB",
4677
- "hb"
4678
- ],
4679
- "NA": [
4680
- "h",
4681
- "H",
4682
- "hB",
4683
- "hb"
4684
- ],
4685
- "PA": [
4686
- "h",
4687
- "H",
4688
- "hB",
4689
- "hb"
4690
- ],
4691
- "PR": [
4692
- "h",
4693
- "H",
4694
- "hB",
4695
- "hb"
4696
- ],
4697
- "VE": [
4698
- "h",
4699
- "H",
4700
- "hB",
4701
- "hb"
4702
- ],
4703
- "AC": [
4704
- "H",
4705
- "h",
4706
- "hb",
4707
- "hB"
4708
- ],
4709
- "AI": [
4710
- "H",
4711
- "h",
4712
- "hb",
4713
- "hB"
4714
- ],
4715
- "BW": [
4716
- "H",
4717
- "h",
4718
- "hb",
4719
- "hB"
4720
- ],
4721
- "BZ": [
4722
- "H",
4723
- "h",
4724
- "hb",
4725
- "hB"
4726
- ],
4727
- "CC": [
4728
- "H",
4729
- "h",
4730
- "hb",
4731
- "hB"
4732
- ],
4733
- "CK": [
4734
- "H",
4735
- "h",
4736
- "hb",
4737
- "hB"
4738
- ],
4739
- "CX": [
4740
- "H",
4741
- "h",
4742
- "hb",
4743
- "hB"
4744
- ],
4745
- "DG": [
4746
- "H",
4747
- "h",
4748
- "hb",
4749
- "hB"
4750
- ],
4751
- "FK": [
4752
- "H",
4753
- "h",
4754
- "hb",
4755
- "hB"
4756
- ],
4757
- "GB": [
4758
- "H",
4759
- "h",
4760
- "hb",
4761
- "hB"
4762
- ],
4763
- "GG": [
4764
- "H",
4765
- "h",
4766
- "hb",
4767
- "hB"
4768
- ],
4769
- "GI": [
4770
- "H",
4771
- "h",
4772
- "hb",
4773
- "hB"
4774
- ],
4775
- "IE": [
4776
- "H",
4777
- "h",
4778
- "hb",
4779
- "hB"
4780
- ],
4781
- "IM": [
4782
- "H",
4783
- "h",
4784
- "hb",
4785
- "hB"
4786
- ],
4787
- "IO": [
4788
- "H",
4789
- "h",
4790
- "hb",
4791
- "hB"
4792
- ],
4793
- "JE": [
4794
- "H",
4795
- "h",
4796
- "hb",
4797
- "hB"
4798
- ],
4799
- "LT": [
4800
- "H",
4801
- "h",
4802
- "hb",
4803
- "hB"
4804
- ],
4805
- "MK": [
4806
- "H",
4807
- "h",
4808
- "hb",
4809
- "hB"
4810
- ],
4811
- "MN": [
4812
- "H",
4813
- "h",
4814
- "hb",
4815
- "hB"
4816
- ],
4817
- "MS": [
4818
- "H",
4819
- "h",
4820
- "hb",
4821
- "hB"
4822
- ],
4823
- "NF": [
4824
- "H",
4825
- "h",
4826
- "hb",
4827
- "hB"
4828
- ],
4829
- "NG": [
4830
- "H",
4831
- "h",
4832
- "hb",
4833
- "hB"
4834
- ],
4835
- "NR": [
4836
- "H",
4837
- "h",
4838
- "hb",
4839
- "hB"
4840
- ],
4841
- "NU": [
4842
- "H",
4843
- "h",
4844
- "hb",
4845
- "hB"
4846
- ],
4847
- "PN": [
4848
- "H",
4849
- "h",
4850
- "hb",
4851
- "hB"
4852
- ],
4853
- "SH": [
4854
- "H",
4855
- "h",
4856
- "hb",
4857
- "hB"
4858
- ],
4859
- "SX": [
4860
- "H",
4861
- "h",
4862
- "hb",
4863
- "hB"
4864
- ],
4865
- "TA": [
4866
- "H",
4867
- "h",
4868
- "hb",
4869
- "hB"
4870
- ],
4871
- "ZA": [
4872
- "H",
4873
- "h",
4874
- "hb",
4875
- "hB"
4876
- ],
4877
- "af-ZA": [
4878
- "H",
4879
- "h",
4880
- "hB",
4881
- "hb"
4882
- ],
4883
- "AR": [
4884
- "H",
4885
- "h",
4886
- "hB",
4887
- "hb"
4888
- ],
4889
- "CL": [
4890
- "H",
4891
- "h",
4892
- "hB",
4893
- "hb"
4894
- ],
4895
- "CR": [
4896
- "H",
4897
- "h",
4898
- "hB",
4899
- "hb"
4900
- ],
4901
- "CU": [
4902
- "H",
4903
- "h",
4904
- "hB",
4905
- "hb"
4906
- ],
4907
- "EA": [
4908
- "H",
4909
- "h",
4910
- "hB",
4911
- "hb"
4912
- ],
4913
- "es-BO": [
4914
- "H",
4915
- "h",
4916
- "hB",
4917
- "hb"
4918
- ],
4919
- "es-BR": [
4920
- "H",
4921
- "h",
4922
- "hB",
4923
- "hb"
4924
- ],
4925
- "es-EC": [
4926
- "H",
4927
- "h",
4928
- "hB",
4929
- "hb"
4930
- ],
4931
- "es-ES": [
4932
- "H",
4933
- "h",
4934
- "hB",
4935
- "hb"
4936
- ],
4937
- "es-GQ": [
4938
- "H",
4939
- "h",
4940
- "hB",
4941
- "hb"
4942
- ],
4943
- "es-PE": [
4944
- "H",
4945
- "h",
4946
- "hB",
4947
- "hb"
4948
- ],
4949
- "GT": [
4950
- "H",
4951
- "h",
4952
- "hB",
4953
- "hb"
4954
- ],
4955
- "HN": [
4956
- "H",
4957
- "h",
4958
- "hB",
4959
- "hb"
4960
- ],
4961
- "IC": [
4962
- "H",
4963
- "h",
4964
- "hB",
4965
- "hb"
4966
- ],
4967
- "KG": [
4968
- "H",
4969
- "h",
4970
- "hB",
4971
- "hb"
4972
- ],
4973
- "KM": [
4974
- "H",
4975
- "h",
4976
- "hB",
4977
- "hb"
4978
- ],
4979
- "LK": [
4980
- "H",
4981
- "h",
4982
- "hB",
4983
- "hb"
4984
- ],
4985
- "MA": [
4986
- "H",
4987
- "h",
4988
- "hB",
4989
- "hb"
4990
- ],
4991
- "MX": [
4992
- "H",
4993
- "h",
4994
- "hB",
4995
- "hb"
4996
- ],
4997
- "NI": [
4998
- "H",
4999
- "h",
5000
- "hB",
5001
- "hb"
5002
- ],
5003
- "PY": [
5004
- "H",
5005
- "h",
5006
- "hB",
5007
- "hb"
5008
- ],
5009
- "SV": [
5010
- "H",
5011
- "h",
5012
- "hB",
5013
- "hb"
5014
- ],
5015
- "UY": [
5016
- "H",
5017
- "h",
5018
- "hB",
5019
- "hb"
5020
- ],
5021
- "JP": [
5022
- "H",
5023
- "h",
5024
- "K"
5025
- ],
5026
- "AD": [
5027
- "H",
5028
- "hB"
5029
- ],
5030
- "AM": [
5031
- "H",
5032
- "hB"
5033
- ],
5034
- "AO": [
5035
- "H",
5036
- "hB"
5037
- ],
5038
- "AT": [
5039
- "H",
5040
- "hB"
5041
- ],
5042
- "AW": [
5043
- "H",
5044
- "hB"
5045
- ],
5046
- "BE": [
5047
- "H",
5048
- "hB"
5049
- ],
5050
- "BF": [
5051
- "H",
5052
- "hB"
5053
- ],
5054
- "BJ": [
5055
- "H",
5056
- "hB"
5057
- ],
5058
- "BL": [
5059
- "H",
5060
- "hB"
5061
- ],
5062
- "BR": [
5063
- "H",
5064
- "hB"
5065
- ],
5066
- "CG": [
5067
- "H",
5068
- "hB"
5069
- ],
5070
- "CI": [
5071
- "H",
5072
- "hB"
5073
- ],
5074
- "CV": [
5075
- "H",
5076
- "hB"
5077
- ],
5078
- "DE": [
5079
- "H",
5080
- "hB"
5081
- ],
5082
- "EE": [
5083
- "H",
5084
- "hB"
5085
- ],
5086
- "FR": [
5087
- "H",
5088
- "hB"
5089
- ],
5090
- "GA": [
5091
- "H",
5092
- "hB"
5093
- ],
5094
- "GF": [
5095
- "H",
5096
- "hB"
5097
- ],
5098
- "GN": [
5099
- "H",
5100
- "hB"
5101
- ],
5102
- "GP": [
5103
- "H",
5104
- "hB"
5105
- ],
5106
- "GW": [
5107
- "H",
5108
- "hB"
5109
- ],
5110
- "HR": [
5111
- "H",
5112
- "hB"
5113
- ],
5114
- "IL": [
5115
- "H",
5116
- "hB"
5117
- ],
5118
- "IT": [
5119
- "H",
5120
- "hB"
5121
- ],
5122
- "KZ": [
5123
- "H",
5124
- "hB"
5125
- ],
5126
- "MC": [
5127
- "H",
5128
- "hB"
5129
- ],
5130
- "MD": [
5131
- "H",
5132
- "hB"
5133
- ],
5134
- "MF": [
5135
- "H",
5136
- "hB"
5137
- ],
5138
- "MQ": [
5139
- "H",
5140
- "hB"
5141
- ],
5142
- "MZ": [
5143
- "H",
5144
- "hB"
5145
- ],
5146
- "NC": [
5147
- "H",
5148
- "hB"
5149
- ],
5150
- "NL": [
5151
- "H",
5152
- "hB"
5153
- ],
5154
- "PM": [
5155
- "H",
5156
- "hB"
5157
- ],
5158
- "PT": [
5159
- "H",
5160
- "hB"
5161
- ],
5162
- "RE": [
5163
- "H",
5164
- "hB"
5165
- ],
5166
- "RO": [
5167
- "H",
5168
- "hB"
5169
- ],
5170
- "SI": [
5171
- "H",
5172
- "hB"
5173
- ],
5174
- "SR": [
5175
- "H",
5176
- "hB"
5177
- ],
5178
- "ST": [
5179
- "H",
5180
- "hB"
5181
- ],
5182
- "TG": [
5183
- "H",
5184
- "hB"
5185
- ],
5186
- "TR": [
5187
- "H",
5188
- "hB"
5189
- ],
5190
- "WF": [
5191
- "H",
5192
- "hB"
5193
- ],
5194
- "YT": [
5195
- "H",
5196
- "hB"
5197
- ],
5198
- "BD": [
5199
- "h",
5200
- "hB",
5201
- "H"
5202
- ],
5203
- "PK": [
5204
- "h",
5205
- "hB",
5206
- "H"
5207
- ],
5208
- "AZ": [
5209
- "H",
5210
- "hB",
5211
- "h"
5212
- ],
5213
- "BA": [
5214
- "H",
5215
- "hB",
5216
- "h"
5217
- ],
5218
- "BG": [
5219
- "H",
5220
- "hB",
5221
- "h"
5222
- ],
5223
- "CH": [
5224
- "H",
5225
- "hB",
5226
- "h"
5227
- ],
5228
- "GE": [
5229
- "H",
5230
- "hB",
5231
- "h"
5232
- ],
5233
- "LI": [
5234
- "H",
5235
- "hB",
5236
- "h"
5237
- ],
5238
- "ME": [
5239
- "H",
5240
- "hB",
5241
- "h"
5242
- ],
5243
- "RS": [
5244
- "H",
5245
- "hB",
5246
- "h"
5247
- ],
5248
- "UA": [
5249
- "H",
5250
- "hB",
5251
- "h"
5252
- ],
5253
- "UZ": [
5254
- "H",
5255
- "hB",
5256
- "h"
5257
- ],
5258
- "XK": [
5259
- "H",
5260
- "hB",
5261
- "h"
5262
- ],
5263
- "AG": [
5264
- "h",
5265
- "hb",
5266
- "H",
5267
- "hB"
5268
- ],
5269
- "AU": [
5270
- "h",
5271
- "hb",
5272
- "H",
5273
- "hB"
5274
- ],
5275
- "BB": [
5276
- "h",
5277
- "hb",
5278
- "H",
5279
- "hB"
5280
- ],
5281
- "BM": [
5282
- "h",
5283
- "hb",
5284
- "H",
5285
- "hB"
5286
- ],
5287
- "BS": [
5288
- "h",
5289
- "hb",
5290
- "H",
5291
- "hB"
5292
- ],
5293
- "CA": [
5294
- "h",
5295
- "hb",
5296
- "H",
5297
- "hB"
5298
- ],
5299
- "DM": [
5300
- "h",
5301
- "hb",
5302
- "H",
5303
- "hB"
5304
- ],
5305
- "en-001": [
5306
- "h",
5307
- "hb",
5308
- "H",
5309
- "hB"
5310
- ],
5311
- "FJ": [
5312
- "h",
5313
- "hb",
5314
- "H",
5315
- "hB"
5316
- ],
5317
- "FM": [
5318
- "h",
5319
- "hb",
5320
- "H",
5321
- "hB"
5322
- ],
5323
- "GD": [
5324
- "h",
5325
- "hb",
5326
- "H",
5327
- "hB"
5328
- ],
5329
- "GM": [
5330
- "h",
5331
- "hb",
5332
- "H",
5333
- "hB"
5334
- ],
5335
- "GU": [
5336
- "h",
5337
- "hb",
5338
- "H",
5339
- "hB"
5340
- ],
5341
- "GY": [
5342
- "h",
5343
- "hb",
5344
- "H",
5345
- "hB"
5346
- ],
5347
- "JM": [
5348
- "h",
5349
- "hb",
5350
- "H",
5351
- "hB"
5352
- ],
5353
- "KI": [
5354
- "h",
5355
- "hb",
5356
- "H",
5357
- "hB"
5358
- ],
5359
- "KN": [
5360
- "h",
5361
- "hb",
5362
- "H",
5363
- "hB"
5364
- ],
5365
- "KY": [
5366
- "h",
5367
- "hb",
5368
- "H",
5369
- "hB"
5370
- ],
5371
- "LC": [
5372
- "h",
5373
- "hb",
5374
- "H",
5375
- "hB"
5376
- ],
5377
- "LR": [
5378
- "h",
5379
- "hb",
5380
- "H",
5381
- "hB"
5382
- ],
5383
- "MH": [
5384
- "h",
5385
- "hb",
5386
- "H",
5387
- "hB"
5388
- ],
5389
- "MP": [
5390
- "h",
5391
- "hb",
5392
- "H",
5393
- "hB"
5394
- ],
5395
- "MW": [
5396
- "h",
5397
- "hb",
5398
- "H",
5399
- "hB"
5400
- ],
5401
- "NZ": [
5402
- "h",
5403
- "hb",
5404
- "H",
5405
- "hB"
5406
- ],
5407
- "SB": [
5408
- "h",
5409
- "hb",
5410
- "H",
5411
- "hB"
5412
- ],
5413
- "SG": [
5414
- "h",
5415
- "hb",
5416
- "H",
5417
- "hB"
5418
- ],
5419
- "SL": [
5420
- "h",
5421
- "hb",
5422
- "H",
5423
- "hB"
5424
- ],
5425
- "SS": [
5426
- "h",
5427
- "hb",
5428
- "H",
5429
- "hB"
5430
- ],
5431
- "SZ": [
5432
- "h",
5433
- "hb",
5434
- "H",
5435
- "hB"
5436
- ],
5437
- "TC": [
5438
- "h",
5439
- "hb",
5440
- "H",
5441
- "hB"
5442
- ],
5443
- "TT": [
5444
- "h",
5445
- "hb",
5446
- "H",
5447
- "hB"
5448
- ],
5449
- "UM": [
5450
- "h",
5451
- "hb",
5452
- "H",
5453
- "hB"
5454
- ],
5455
- "US": [
5456
- "h",
5457
- "hb",
5458
- "H",
5459
- "hB"
5460
- ],
5461
- "VC": [
5462
- "h",
5463
- "hb",
5464
- "H",
5465
- "hB"
5466
- ],
5467
- "VG": [
5468
- "h",
5469
- "hb",
5470
- "H",
5471
- "hB"
5472
- ],
5473
- "VI": [
5474
- "h",
5475
- "hb",
5476
- "H",
5477
- "hB"
5478
- ],
5479
- "ZM": [
5480
- "h",
5481
- "hb",
5482
- "H",
5483
- "hB"
5484
- ],
5485
- "BO": [
5486
- "H",
5487
- "hB",
5488
- "h",
5489
- "hb"
5490
- ],
5491
- "EC": [
5492
- "H",
5493
- "hB",
5494
- "h",
5495
- "hb"
5496
- ],
5497
- "ES": [
5498
- "H",
5499
- "hB",
5500
- "h",
5501
- "hb"
5502
- ],
5503
- "GQ": [
5504
- "H",
5505
- "hB",
5506
- "h",
5507
- "hb"
5508
- ],
5509
- "PE": [
5510
- "H",
5511
- "hB",
5512
- "h",
5513
- "hb"
5514
- ],
5515
- "AE": [
5516
- "h",
5517
- "hB",
5518
- "hb",
5519
- "H"
5520
- ],
5521
- "ar-001": [
5522
- "h",
5523
- "hB",
5524
- "hb",
5525
- "H"
5526
- ],
5527
- "BH": [
5528
- "h",
5529
- "hB",
5530
- "hb",
5531
- "H"
5532
- ],
5533
- "DZ": [
5534
- "h",
5535
- "hB",
5536
- "hb",
5537
- "H"
5538
- ],
5539
- "EG": [
5540
- "h",
5541
- "hB",
5542
- "hb",
5543
- "H"
5544
- ],
5545
- "EH": [
5546
- "h",
5547
- "hB",
5548
- "hb",
5549
- "H"
5550
- ],
5551
- "HK": [
5552
- "h",
5553
- "hB",
5554
- "hb",
5555
- "H"
5556
- ],
5557
- "IQ": [
5558
- "h",
5559
- "hB",
5560
- "hb",
5561
- "H"
5562
- ],
5563
- "JO": [
5564
- "h",
5565
- "hB",
5566
- "hb",
5567
- "H"
5568
- ],
5569
- "KW": [
5570
- "h",
5571
- "hB",
5572
- "hb",
5573
- "H"
5574
- ],
5575
- "LB": [
5576
- "h",
5577
- "hB",
5578
- "hb",
5579
- "H"
5580
- ],
5581
- "LY": [
5582
- "h",
5583
- "hB",
5584
- "hb",
5585
- "H"
5586
- ],
5587
- "MO": [
5588
- "h",
5589
- "hB",
5590
- "hb",
5591
- "H"
5592
- ],
5593
- "MR": [
5594
- "h",
5595
- "hB",
5596
- "hb",
5597
- "H"
5598
- ],
5599
- "OM": [
5600
- "h",
5601
- "hB",
5602
- "hb",
5603
- "H"
5604
- ],
5605
- "PH": [
5606
- "h",
5607
- "hB",
5608
- "hb",
5609
- "H"
5610
- ],
5611
- "PS": [
5612
- "h",
5613
- "hB",
5614
- "hb",
5615
- "H"
5616
- ],
5617
- "QA": [
5618
- "h",
5619
- "hB",
5620
- "hb",
5621
- "H"
5622
- ],
5623
- "SA": [
5624
- "h",
5625
- "hB",
5626
- "hb",
5627
- "H"
5628
- ],
5629
- "SD": [
5630
- "h",
5631
- "hB",
5632
- "hb",
5633
- "H"
5634
- ],
5635
- "SY": [
5636
- "h",
5637
- "hB",
5638
- "hb",
5639
- "H"
5640
- ],
5641
- "TN": [
5642
- "h",
5643
- "hB",
5644
- "hb",
5645
- "H"
5646
- ],
5647
- "YE": [
5648
- "h",
5649
- "hB",
5650
- "hb",
5651
- "H"
5652
- ],
5653
- "AF": [
5654
- "H",
5655
- "hb",
5656
- "hB",
5657
- "h"
5658
- ],
5659
- "LA": [
5660
- "H",
5661
- "hb",
5662
- "hB",
5663
- "h"
5664
- ],
5665
- "CN": [
5666
- "H",
5667
- "hB",
5668
- "hb",
5669
- "h"
5670
- ],
5671
- "LV": [
5672
- "H",
5673
- "hB",
5674
- "hb",
5675
- "h"
5676
- ],
5677
- "TL": [
5678
- "H",
5679
- "hB",
5680
- "hb",
5681
- "h"
5682
- ],
5683
- "zu-ZA": [
5684
- "H",
5685
- "hB",
5686
- "hb",
5687
- "h"
5688
- ],
5689
- "CD": [
5690
- "hB",
5691
- "H"
5692
- ],
5693
- "IR": [
5694
- "hB",
5695
- "H"
5696
- ],
5697
- "hi-IN": [
5698
- "hB",
5699
- "h",
5700
- "H"
5701
- ],
5702
- "kn-IN": [
5703
- "hB",
5704
- "h",
5705
- "H"
5706
- ],
5707
- "ml-IN": [
5708
- "hB",
5709
- "h",
5710
- "H"
5711
- ],
5712
- "te-IN": [
5713
- "hB",
5714
- "h",
5715
- "H"
5716
- ],
5717
- "KH": [
5718
- "hB",
5719
- "h",
5720
- "H",
5721
- "hb"
5722
- ],
5723
- "ta-IN": [
5724
- "hB",
5725
- "h",
5726
- "hb",
5727
- "H"
5728
- ],
5729
- "BN": [
5730
- "hb",
5731
- "hB",
5732
- "h",
5733
- "H"
5734
- ],
5735
- "MY": [
5736
- "hb",
5737
- "hB",
5738
- "h",
5739
- "H"
5740
- ],
5741
- "ET": [
5742
- "hB",
5743
- "hb",
5744
- "h",
5745
- "H"
5746
- ],
5747
- "gu-IN": [
5748
- "hB",
5749
- "hb",
5750
- "h",
5751
- "H"
5752
- ],
5753
- "mr-IN": [
5754
- "hB",
5755
- "hb",
5756
- "h",
5757
- "H"
5758
- ],
5759
- "pa-IN": [
5760
- "hB",
5761
- "hb",
5762
- "h",
5763
- "H"
5764
- ],
5765
- "TW": [
5766
- "hB",
5767
- "hb",
5768
- "h",
5769
- "H"
5770
- ],
5771
- "KE": [
5772
- "hB",
5773
- "hb",
5774
- "H",
5775
- "h"
5776
- ],
5777
- "MM": [
5778
- "hB",
5779
- "hb",
5780
- "H",
5781
- "h"
5782
- ],
5783
- "TZ": [
5784
- "hB",
5785
- "hb",
5786
- "H",
5787
- "h"
5788
- ],
5789
- "UG": [
5790
- "hB",
5791
- "hb",
5792
- "H",
5793
- "h"
5794
- ]
5795
- };
5796
-
5797
- /**
5798
- * Returns the best matching date time pattern if a date time skeleton
5799
- * pattern is provided with a locale. Follows the Unicode specification:
5800
- * https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
5801
- * @param skeleton date time skeleton pattern that possibly includes j, J or C
5802
- * @param locale
5803
- */
5804
- function getBestPattern(skeleton, locale) {
5805
- var skeletonCopy = '';
5806
- for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
5807
- var patternChar = skeleton.charAt(patternPos);
5808
- if (patternChar === 'j') {
5809
- var extraLength = 0;
5810
- while (patternPos + 1 < skeleton.length &&
5811
- skeleton.charAt(patternPos + 1) === patternChar) {
5812
- extraLength++;
5813
- patternPos++;
5814
- }
5815
- var hourLen = 1 + (extraLength & 1);
5816
- var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
5817
- var dayPeriodChar = 'a';
5818
- var hourChar = getDefaultHourSymbolFromLocale(locale);
5819
- if (hourChar == 'H' || hourChar == 'k') {
5820
- dayPeriodLen = 0;
5821
- }
5822
- while (dayPeriodLen-- > 0) {
5823
- skeletonCopy += dayPeriodChar;
5824
- }
5825
- while (hourLen-- > 0) {
5826
- skeletonCopy = hourChar + skeletonCopy;
5827
- }
5828
- }
5829
- else if (patternChar === 'J') {
5830
- skeletonCopy += 'H';
5831
- }
5832
- else {
5833
- skeletonCopy += patternChar;
5834
- }
5835
- }
5836
- return skeletonCopy;
5837
- }
5838
- /**
5839
- * Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
5840
- * of the given `locale` to the corresponding time pattern.
5841
- * @param locale
5842
- */
5843
- function getDefaultHourSymbolFromLocale(locale) {
5844
- var hourCycle = locale.hourCycle;
5845
- if (hourCycle === undefined &&
5846
- // @ts-ignore hourCycle(s) is not identified yet
5847
- locale.hourCycles &&
5848
- // @ts-ignore
5849
- locale.hourCycles.length) {
5850
- // @ts-ignore
5851
- hourCycle = locale.hourCycles[0];
5852
- }
5853
- if (hourCycle) {
5854
- switch (hourCycle) {
5855
- case 'h24':
5856
- return 'k';
5857
- case 'h23':
5858
- return 'H';
5859
- case 'h12':
5860
- return 'h';
5861
- case 'h11':
5862
- return 'K';
5863
- default:
5864
- throw new Error('Invalid hourCycle');
5865
- }
5866
- }
5867
- // TODO: Once hourCycle is fully supported remove the following with data generation
5868
- var languageTag = locale.language;
5869
- var regionTag;
5870
- if (languageTag !== 'root') {
5871
- regionTag = locale.maximize().region;
5872
- }
5873
- var hourCycles = timeData[regionTag || ''] ||
5874
- timeData[languageTag || ''] ||
5875
- timeData["".concat(languageTag, "-001")] ||
5876
- timeData['001'];
5877
- return hourCycles[0];
5878
- }
5879
-
5880
4457
  var _a;
5881
4458
  var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
5882
4459
  var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
@@ -6036,7 +4613,6 @@ var Parser = /** @class */ (function () {
6036
4613
  this.message = message;
6037
4614
  this.position = { offset: 0, line: 1, column: 1 };
6038
4615
  this.ignoreTag = !!options.ignoreTag;
6039
- this.locale = options.locale;
6040
4616
  this.requiresOtherClause = !!options.requiresOtherClause;
6041
4617
  this.shouldParseSkeletons = !!options.shouldParseSkeletons;
6042
4618
  }
@@ -6412,19 +4988,12 @@ var Parser = /** @class */ (function () {
6412
4988
  if (skeleton.length === 0) {
6413
4989
  return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
6414
4990
  }
6415
- var dateTimePattern = skeleton;
6416
- // Get "best match" pattern only if locale is passed, if not, let it
6417
- // pass as-is where `parseDateTimeSkeleton()` will throw an error
6418
- // for unsupported patterns.
6419
- if (this.locale) {
6420
- dateTimePattern = getBestPattern(skeleton, this.locale);
6421
- }
6422
4991
  var style = {
6423
4992
  type: SKELETON_TYPE.dateTime,
6424
- pattern: dateTimePattern,
4993
+ pattern: skeleton,
6425
4994
  location: styleAndLocation.styleLocation,
6426
4995
  parsedOptions: this.shouldParseSkeletons
6427
- ? parseDateTimeSkeleton(dateTimePattern)
4996
+ ? parseDateTimeSkeleton(skeleton)
6428
4997
  : {},
6429
4998
  };
6430
4999
  var type = argType === 'date' ? TYPE.date : TYPE.time;
@@ -7409,7 +5978,7 @@ originalMessage) {
7409
5978
  ? formats.time[el.style]
7410
5979
  : isDateTimeSkeleton(el.style)
7411
5980
  ? el.style.parsedOptions
7412
- : formats.time.medium;
5981
+ : undefined;
7413
5982
  result.push({
7414
5983
  type: PART_TYPE.literal,
7415
5984
  value: formatters
@@ -7599,12 +6168,9 @@ var IntlMessageFormat = /** @class */ (function () {
7599
6168
  return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);
7600
6169
  };
7601
6170
  this.resolvedOptions = function () { return ({
7602
- locale: _this.resolvedLocale.toString(),
6171
+ locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],
7603
6172
  }); };
7604
6173
  this.getAst = function () { return _this.ast; };
7605
- // Defined first because it's used to build the format pattern.
7606
- this.locales = locales;
7607
- this.resolvedLocale = IntlMessageFormat.resolveLocale(locales);
7608
6174
  if (typeof message === 'string') {
7609
6175
  this.message = message;
7610
6176
  if (!IntlMessageFormat.__parse) {
@@ -7613,7 +6179,6 @@ var IntlMessageFormat = /** @class */ (function () {
7613
6179
  // Parse string messages into an AST.
7614
6180
  this.ast = IntlMessageFormat.__parse(message, {
7615
6181
  ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,
7616
- locale: this.resolvedLocale,
7617
6182
  });
7618
6183
  }
7619
6184
  else {
@@ -7625,6 +6190,8 @@ var IntlMessageFormat = /** @class */ (function () {
7625
6190
  // Creates a new object with the specified `formats` merged with the default
7626
6191
  // formats.
7627
6192
  this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);
6193
+ // Defined first because it's used to build the format pattern.
6194
+ this.locales = locales;
7628
6195
  this.formatters =
7629
6196
  (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);
7630
6197
  }
@@ -7640,13 +6207,6 @@ var IntlMessageFormat = /** @class */ (function () {
7640
6207
  configurable: true
7641
6208
  });
7642
6209
  IntlMessageFormat.memoizedDefaultLocale = null;
7643
- IntlMessageFormat.resolveLocale = function (locales) {
7644
- var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);
7645
- if (supportedLocales.length > 0) {
7646
- return new Intl.Locale(supportedLocales[0]);
7647
- }
7648
- return new Intl.Locale(typeof locales === 'string' ? locales : locales[0]);
7649
- };
7650
6210
  IntlMessageFormat.__parse = parse;
7651
6211
  // Default format options used as the prototype of the `formats` provided to the
7652
6212
  // constructor. These are used when constructing the internal Intl.NumberFormat
@@ -7788,9 +6348,9 @@ var MissingTranslationError = /** @class */ (function (_super) {
7788
6348
  return MissingTranslationError;
7789
6349
  }(IntlError));
7790
6350
 
7791
- function filterProps(props, allowlist, defaults) {
6351
+ function filterProps(props, whitelist, defaults) {
7792
6352
  if (defaults === void 0) { defaults = {}; }
7793
- return allowlist.reduce(function (filtered, name) {
6353
+ return whitelist.reduce(function (filtered, name) {
7794
6354
  if (name in props) {
7795
6355
  filtered[name] = props[name];
7796
6356
  }
@@ -7802,8 +6362,6 @@ function filterProps(props, allowlist, defaults) {
7802
6362
  }
7803
6363
  var defaultErrorHandler = function (error) {
7804
6364
  };
7805
- var defaultWarnHandler = function (warning) {
7806
- };
7807
6365
  var DEFAULT_INTL_CONFIG = {
7808
6366
  formats: {},
7809
6367
  messages: {},
@@ -7812,7 +6370,6 @@ var DEFAULT_INTL_CONFIG = {
7812
6370
  defaultFormats: {},
7813
6371
  fallbackOnEmptyString: true,
7814
6372
  onError: defaultErrorHandler,
7815
- onWarn: defaultWarnHandler,
7816
6373
  };
7817
6374
  function createIntlCache() {
7818
6375
  return {
@@ -8350,10 +6907,9 @@ function messagesContainString(messages) {
8350
6907
  return typeof firstMessage === 'string';
8351
6908
  }
8352
6909
  function verifyConfigMessages(config) {
8353
- if (config.onWarn &&
8354
- config.defaultRichTextElements &&
6910
+ if (config.defaultRichTextElements &&
8355
6911
  messagesContainString(config.messages || {})) {
8356
- config.onWarn("[@formatjs/intl] \"defaultRichTextElements\" was specified but \"message\" was not pre-compiled. \nPlease consider using \"@formatjs/cli\" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution");
6912
+ console.warn("[@formatjs/intl] \"defaultRichTextElements\" was specified but \"message\" was not pre-compiled. \nPlease consider using \"@formatjs/cli\" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution");
8357
6913
  }
8358
6914
  }
8359
6915
  /**
@@ -8384,447 +6940,447 @@ function createIntl(config, cache) {
8384
6940
  onError(new MissingDataError("Missing locale data for locale: \"".concat(locale, "\" in Intl.DateTimeFormat. Using default locale: \"").concat(defaultLocale, "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details")));
8385
6941
  }
8386
6942
  verifyConfigMessages(resolvedConfig);
8387
- return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), $t: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });
6943
+ return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });
8388
6944
  }
8389
6945
 
8390
- const DEFAULT_LANGUAGE = "en";
8391
- function getBrowserLang() {
8392
- const langAttr = document.documentElement.getAttribute("lang");
8393
- if (!!langAttr) {
8394
- return langAttr;
8395
- }
8396
- else if (window.navigator && window.navigator.language) {
8397
- const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
8398
- return lang.slice(0, 2);
8399
- }
8400
- else {
8401
- return DEFAULT_LANGUAGE;
8402
- }
8403
- }
8404
- // prevents memory leak
8405
- const cache = createIntlCache();
8406
- const locale = getBrowserLang();
8407
- const intl = createIntl({
8408
- locale: locale,
8409
- defaultLocale: "en",
8410
- messages: lang[locale] || en,
8411
- }, cache);
8412
- function generateId() {
8413
- return "wmcl-" + Math.random().toString(36).substr(2, 10);
8414
- }
8415
- // limits how many times a function fires
8416
- // use when the function should run periodically, but not too often (e.g. window resize)
8417
- function throttle(fn, wait) {
8418
- let timeout;
8419
- let shouldWait = false;
8420
- return function () {
8421
- const context = this;
8422
- if (!shouldWait) {
8423
- fn.apply(context, arguments);
8424
- shouldWait = true;
8425
- clearTimeout(timeout);
8426
- timeout = setTimeout(function () {
8427
- shouldWait = false;
8428
- }, wait);
8429
- }
8430
- };
8431
- }
8432
- // waits until it hasn't been called for [timeout] ms.
8433
- // use when the function should run only after something (event) is done firing
8434
- function debounce(fn, wait) {
8435
- let timeout;
8436
- return function () {
8437
- const context = this;
8438
- const functionCall = () => fn.apply(context, arguments);
8439
- clearTimeout(timeout);
8440
- timeout = setTimeout(functionCall, wait);
8441
- };
8442
- }
8443
- function getTextDir() {
8444
- const dir = document.querySelector("html").getAttribute("dir");
8445
- return dir ? dir.toLowerCase() : "";
8446
- }
8447
- function getPosition(el) {
8448
- const coords = el.getBoundingClientRect();
8449
- let x = coords.x;
8450
- let y = coords.y;
8451
- // Edge doesn't have x and y
8452
- if (!x) {
8453
- if (getTextDir() === "rtl") {
8454
- x = coords.right;
8455
- }
8456
- else {
8457
- x = coords.left;
8458
- }
8459
- y = coords.top;
8460
- }
8461
- return { x, y };
8462
- }
8463
- function findParentWithScrollbar(el) {
8464
- while (!!el) {
8465
- if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
8466
- return el;
8467
- }
8468
- el = el.parentElement;
8469
- }
8470
- }
8471
- function findParentWithHiddenOverflow(el) {
8472
- while (!!el) {
8473
- if (window.getComputedStyle(el).overflowY !== "visible") {
8474
- return el;
8475
- }
8476
- el = el.parentElement;
8477
- }
8478
- }
8479
- function getClosableElementMeasurements(fixedEl, closableEl) {
8480
- const parent = findParentWithHiddenOverflow(fixedEl);
8481
- // if parent is not found, measurements are checked against the viewport
8482
- return {
8483
- closableElHeight: closableEl.clientHeight,
8484
- closableElWidth: closableEl.clientWidth,
8485
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8486
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
8487
- spaceAbove: parent
8488
- ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
8489
- : fixedEl.getBoundingClientRect().top,
8490
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8491
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
8492
- spaceBelow: parent
8493
- ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
8494
- : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
8495
- spaceLeft: parent
8496
- ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
8497
- : fixedEl.getBoundingClientRect().left,
8498
- spaceRight: parent
8499
- ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
8500
- : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
8501
- };
8502
- }
8503
- function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
8504
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8505
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8506
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8507
- ) {
8508
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8509
- //we want to open up only if there's not enough space below AND there is enough space above
8510
- const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
8511
- return openUp;
8512
- }
8513
- function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
8514
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8515
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8516
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8517
- ) {
8518
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8519
- //we want to open up only if there's not enough space below AND there is enough space above
8520
- const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
8521
- return openDown;
8522
- }
8523
- function shouldShiftRight(fixedEl, closableEl) {
8524
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8525
- const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
8526
- return needsSpaceLeft;
8527
- }
8528
- function shouldShiftLeft(fixedEl, closableEl) {
8529
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8530
- const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
8531
- return needsSpaceRight;
8532
- }
8533
- function adjustTooltipPlacement(tPos, el, tooltipEl) {
8534
- const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
8535
- const tooltipWidth = tooltipEl.getBoundingClientRect().width;
8536
- const tooltipHeight = tooltipEl.getBoundingClientRect().height;
8537
- const enoughSpaceAbove = spaceAbove > tooltipHeight;
8538
- const enoughSpaceBelow = spaceBelow > tooltipHeight;
8539
- // a tooltip should never be closer than 24px to the edge of a screen
8540
- const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
8541
- const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
8542
- const swapAbove = (position) => {
8543
- return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
8544
- };
8545
- const swapBelow = (position) => {
8546
- return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
8547
- };
8548
- const swapLeft = (position, centeredPosition) => {
8549
- if (!enoughSpaceLeft && enoughSpaceRight) {
8550
- position = position.replace("left", "right");
8551
- }
8552
- else if (!enoughSpaceLeft && !enoughSpaceRight) {
8553
- position = centeredPosition;
8554
- }
8555
- return position;
8556
- };
8557
- const swapRight = (position, centeredPosition) => {
8558
- if (!enoughSpaceRight && enoughSpaceLeft) {
8559
- position = position.replace("right", "left");
8560
- }
8561
- else if (!enoughSpaceRight && !enoughSpaceLeft) {
8562
- position = centeredPosition;
8563
- }
8564
- return position;
8565
- };
8566
- // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
8567
- switch (tPos) {
8568
- case "left":
8569
- tPos = swapLeft(tPos, "bottom");
8570
- case "right":
8571
- tPos = swapRight(tPos, "bottom");
8572
- case "top-left":
8573
- tPos = swapLeft(tPos, "top");
8574
- tPos = swapAbove(tPos);
8575
- case "top-right":
8576
- tPos = swapRight(tPos, "top");
8577
- tPos = swapAbove(tPos);
8578
- case "bottom-left":
8579
- tPos = swapLeft(tPos, "bottom");
8580
- tPos = swapBelow(tPos);
8581
- case "bottom-right":
8582
- tPos = swapRight(tPos, "bottom");
8583
- tPos = swapBelow(tPos);
8584
- case "top":
8585
- tPos = swapAbove(tPos);
8586
- case "bottom":
8587
- tPos = swapBelow(tPos);
8588
- }
8589
- return tPos;
8590
- }
8591
- function hasRoomRight(x, spaceNeeded) {
8592
- let horizOffset = 0;
8593
- // if (getTextDir() === "ltr") {
8594
- if (x.type === "click") {
8595
- // if it's a mouse event, deal with mouse coords
8596
- horizOffset = x.clientX;
8597
- // if it's a focus event, the offset is 0
8598
- }
8599
- else if (x.type === "focus") {
8600
- horizOffset = 0;
8601
- }
8602
- else {
8603
- // otherwise an element was passed, calculate how far it is from the edge of the window
8604
- let el = x; // re-assignment is for clarity
8605
- while (el) {
8606
- if (el.tagName == "BODY") {
8607
- // deal with browser quirks with body/window/document and page scroll
8608
- var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
8609
- horizOffset += el.offsetLeft - xScroll + el.clientLeft;
8610
- }
8611
- else {
8612
- // for all other non-BODY elements
8613
- horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
8614
- }
8615
- el = el.offsetParent;
8616
- }
8617
- // }
8618
- }
8619
- return window.innerWidth - horizOffset >= spaceNeeded;
8620
- }
8621
- function checkForActiveElInShadow(element) {
8622
- while (element && element.shadowRoot) {
8623
- element = element.shadowRoot.activeElement;
8624
- }
8625
- return element;
8626
- }
8627
- function checkForFocusableElInShadow(element) {
8628
- const selectors = [
8629
- "button",
8630
- "a",
8631
- "input",
8632
- "select",
8633
- "textarea",
8634
- "wm-button",
8635
- "wm-search",
8636
- "wm-select",
8637
- "wm-action-menu",
8638
- "wm-tab-item",
8639
- "wm-datepicker",
8640
- ];
8641
- let focusableEl = element;
8642
- selectors.forEach((selector) => {
8643
- if (focusableEl && focusableEl.shadowRoot) {
8644
- let elInShadow = focusableEl.shadowRoot.querySelector(selector);
8645
- if (elInShadow) {
8646
- if (selector.startsWith("wm-")) {
8647
- focusableEl = checkForFocusableElInShadow(elInShadow);
8648
- }
8649
- else {
8650
- focusableEl = elInShadow;
8651
- }
8652
- }
8653
- }
8654
- });
8655
- return focusableEl;
8656
- }
8657
- function isFocusable(element) {
8658
- if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
8659
- return true;
8660
- }
8661
- if (element.disabled) {
8662
- return false;
8663
- }
8664
- switch (element.nodeName) {
8665
- case "A":
8666
- return !!element.href && element.rel != "ignore";
8667
- case "INPUT":
8668
- return element.type != "hidden" && element.type != "file";
8669
- case "BUTTON":
8670
- case "SELECT":
8671
- case "TEXTAREA":
8672
- case "WM-BUTTON":
8673
- case "WM-SELECT":
8674
- case "WM-ACTION-MENU":
8675
- case "WM-DATEPICKER":
8676
- case "WM-TIMEPICKER":
8677
- case "WM-INPUT":
8678
- case "WM-TAG-INPUT":
8679
- case "WM-TAB-ITEM":
8680
- case "WM-SEARCH":
8681
- return true;
8682
- default:
8683
- return false;
8684
- }
8685
- }
8686
- function getFirstFocusableDescendant(element) {
8687
- if (isFocusable(element)) {
8688
- return checkForFocusableElInShadow(element);
8689
- }
8690
- else if (element.childNodes.length > 0) {
8691
- element.childNodes.forEach((i) => {
8692
- const childEl = getFirstFocusableDescendant(i);
8693
- return childEl && checkForFocusableElInShadow(childEl);
8694
- });
8695
- }
8696
- }
8697
- function hasValidType(file, types) {
8698
- const acceptedExtensions = types.split(" ");
8699
- const parts = file.name && file.name.split(".");
8700
- const ext = parts && parts.length > 1 && parts[parts.length - 1];
8701
- return ext
8702
- ? acceptedExtensions.includes(ext.toLowerCase())
8703
- : // fallback: if we couldn't obtain an extension,
8704
- // validate based on MIME type...
8705
- !!file.type
8706
- ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
8707
- : // ...and if that failed too, accept the file
8708
- // as it's preferable to accept an invalid file
8709
- // than refusing a valid one (back-end will take care of what slips through)
8710
- true;
8711
- }
8712
- // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
8713
- function getAcceptedMimeTypesList(acceptedExtensions) {
8714
- // this is just a list of common file types (regardless of whether they are/can be valid or not)
8715
- // front end checks are just a convenience to users, independent of security.
8716
- // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
8717
- const lookupTable = {
8718
- aac: ["audio/aac"],
8719
- abw: ["application/x-abiword"],
8720
- arc: ["application/x-freearc"],
8721
- avi: ["video/x-msvideo"],
8722
- azw: ["application/vnd.amazon.ebook"],
8723
- bin: ["application/octet-stream"],
8724
- bmp: ["image/bmp"],
8725
- bz: ["application/x-bzip"],
8726
- bz2: ["application/x-bzip2"],
8727
- csh: ["application/x-csh"],
8728
- css: ["text/css"],
8729
- csv: ["text/csv"],
8730
- doc: ["application/msword"],
8731
- docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
8732
- eot: ["application/vnd.ms-fontobject"],
8733
- epub: ["application/epub+zip"],
8734
- gz: ["application/gzip"],
8735
- gif: ["image/gif"],
8736
- htm: ["text/html"],
8737
- html: ["text/html"],
8738
- ico: ["image/vnd.microsoft.icon"],
8739
- ics: ["text/calendar"],
8740
- jar: ["application/java-archive"],
8741
- jpeg: ["image/jpeg"],
8742
- jpg: ["image/jpeg"],
8743
- js: ["text/javascript"],
8744
- json: ["application/json"],
8745
- jsonld: ["application/ld+json"],
8746
- log: ["text/plain"],
8747
- mid: ["audio/x-midi"],
8748
- midi: ["audio/x-midi"],
8749
- mjs: ["text/javascript"],
8750
- mp3: ["audio/mpeg"],
8751
- mpeg: ["video/mpeg"],
8752
- mpkg: ["application/vnd.apple.installer+xml"],
8753
- odp: ["application/vnd.oasis.opendocument.presentation"],
8754
- ods: ["application/vnd.oasis.opendocument.spreadsheet"],
8755
- odt: ["application/vnd.oasis.opendocument.text"],
8756
- oga: ["audio/ogg"],
8757
- ogv: ["video/ogg"],
8758
- ogx: ["application/ogg"],
8759
- opus: ["audio/opus"],
8760
- otf: ["font/otf"],
8761
- png: ["image/png"],
8762
- pdf: ["application/pdf"],
8763
- php: ["application/php"],
8764
- ppt: ["application/vnd.ms-powerpoint"],
8765
- pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
8766
- rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
8767
- rtf: ["application/rtf"],
8768
- sh: ["application/x-sh"],
8769
- svg: ["image/svg+xml"],
8770
- swf: ["application/x-shockwave-flash"],
8771
- tar: ["application/x-tar"],
8772
- tif: ["image/tiff"],
8773
- tiff: ["image/tiff"],
8774
- ts: ["video/mp2t"],
8775
- ttf: ["font/ttf"],
8776
- txt: ["text/plain"],
8777
- vsd: ["application/vnd.visio"],
8778
- wav: ["audio/wav"],
8779
- weba: ["audio/webm"],
8780
- webm: ["video/webm"],
8781
- webp: ["image/webp"],
8782
- woff: ["font/woff"],
8783
- woff2: ["font/woff2"],
8784
- xhtml: ["application/xhtml+xml"],
8785
- xls: ["application/vnd.ms-excel"],
8786
- xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
8787
- xml: ["application/xml", "text/xml"],
8788
- xul: ["application/vnd.mozilla.xul+xml"],
8789
- zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
8790
- "3gp": ["video/3gpp", "audio/3gpp"],
8791
- "3g2": ["video/3gpp2", "audio/3gpp2"],
8792
- "7z": ["application/x-7z-compressed"],
8793
- };
8794
- return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
8795
- }
8796
- function snakeCaseToCamelCase(str) {
8797
- const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
8798
- if (snakeCaseRegexp.test(str)) {
8799
- let camelCase = "";
8800
- let arr = str.split("_");
8801
- arr.forEach((word, idx) => {
8802
- camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
8803
- });
8804
- return camelCase;
8805
- }
8806
- else {
8807
- return str;
8808
- }
8809
- }
8810
- function getNewIndexToFocus(currentIndex, direction, listLength) {
8811
- let newIndex = currentIndex;
8812
- if (direction === "ArrowDown") {
8813
- newIndex = (currentIndex + 1) % listLength;
8814
- }
8815
- if (direction === "ArrowUp") {
8816
- newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
8817
- }
8818
- return newIndex;
8819
- }
8820
- function isRelatedTarget(ev, id) {
8821
- // used for onBlur events to check the element that has been clicked
8822
- const ids = id.split(" ");
8823
- return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
8824
- }
8825
- function toBool(val) {
8826
- // string "false" needs to be treated as bool False because react wrappers convert bool to string.
8827
- return val == "false" ? false : !!val;
6946
+ const DEFAULT_LANGUAGE = "en";
6947
+ function getBrowserLang() {
6948
+ const langAttr = document.documentElement.getAttribute("lang");
6949
+ if (!!langAttr) {
6950
+ return langAttr;
6951
+ }
6952
+ else if (window.navigator && window.navigator.language) {
6953
+ const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
6954
+ return lang.slice(0, 2);
6955
+ }
6956
+ else {
6957
+ return DEFAULT_LANGUAGE;
6958
+ }
6959
+ }
6960
+ // prevents memory leak
6961
+ const cache = createIntlCache();
6962
+ const locale = getBrowserLang();
6963
+ const intl = createIntl({
6964
+ locale: locale,
6965
+ defaultLocale: "en",
6966
+ messages: lang[locale] || en,
6967
+ }, cache);
6968
+ function generateId() {
6969
+ return "wmcl-" + Math.random().toString(36).substr(2, 10);
6970
+ }
6971
+ // limits how many times a function fires
6972
+ // use when the function should run periodically, but not too often (e.g. window resize)
6973
+ function throttle(fn, wait) {
6974
+ let timeout;
6975
+ let shouldWait = false;
6976
+ return function () {
6977
+ const context = this;
6978
+ if (!shouldWait) {
6979
+ fn.apply(context, arguments);
6980
+ shouldWait = true;
6981
+ clearTimeout(timeout);
6982
+ timeout = setTimeout(function () {
6983
+ shouldWait = false;
6984
+ }, wait);
6985
+ }
6986
+ };
6987
+ }
6988
+ // waits until it hasn't been called for [timeout] ms.
6989
+ // use when the function should run only after something (event) is done firing
6990
+ function debounce(fn, wait) {
6991
+ let timeout;
6992
+ return function () {
6993
+ const context = this;
6994
+ const functionCall = () => fn.apply(context, arguments);
6995
+ clearTimeout(timeout);
6996
+ timeout = setTimeout(functionCall, wait);
6997
+ };
6998
+ }
6999
+ function getTextDir() {
7000
+ const dir = document.querySelector("html").getAttribute("dir");
7001
+ return dir ? dir.toLowerCase() : "";
7002
+ }
7003
+ function getPosition(el) {
7004
+ const coords = el.getBoundingClientRect();
7005
+ let x = coords.x;
7006
+ let y = coords.y;
7007
+ // Edge doesn't have x and y
7008
+ if (!x) {
7009
+ if (getTextDir() === "rtl") {
7010
+ x = coords.right;
7011
+ }
7012
+ else {
7013
+ x = coords.left;
7014
+ }
7015
+ y = coords.top;
7016
+ }
7017
+ return { x, y };
7018
+ }
7019
+ function findParentWithScrollbar(el) {
7020
+ while (!!el) {
7021
+ if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
7022
+ return el;
7023
+ }
7024
+ el = el.parentElement;
7025
+ }
7026
+ }
7027
+ function findParentWithHiddenOverflow(el) {
7028
+ while (!!el) {
7029
+ if (window.getComputedStyle(el).overflowY !== "visible") {
7030
+ return el;
7031
+ }
7032
+ el = el.parentElement;
7033
+ }
7034
+ }
7035
+ function getClosableElementMeasurements(fixedEl, closableEl) {
7036
+ const parent = findParentWithHiddenOverflow(fixedEl);
7037
+ // if parent is not found, measurements are checked against the viewport
7038
+ return {
7039
+ closableElHeight: closableEl.clientHeight,
7040
+ closableElWidth: closableEl.clientWidth,
7041
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
7042
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
7043
+ spaceAbove: parent
7044
+ ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
7045
+ : fixedEl.getBoundingClientRect().top,
7046
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
7047
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
7048
+ spaceBelow: parent
7049
+ ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
7050
+ : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
7051
+ spaceLeft: parent
7052
+ ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
7053
+ : fixedEl.getBoundingClientRect().left,
7054
+ spaceRight: parent
7055
+ ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
7056
+ : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
7057
+ };
7058
+ }
7059
+ function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
7060
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
7061
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
7062
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
7063
+ ) {
7064
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
7065
+ //we want to open up only if there's not enough space below AND there is enough space above
7066
+ const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
7067
+ return openUp;
7068
+ }
7069
+ function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
7070
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
7071
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
7072
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
7073
+ ) {
7074
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
7075
+ //we want to open up only if there's not enough space below AND there is enough space above
7076
+ const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
7077
+ return openDown;
7078
+ }
7079
+ function shouldShiftRight(fixedEl, closableEl) {
7080
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
7081
+ const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
7082
+ return needsSpaceLeft;
7083
+ }
7084
+ function shouldShiftLeft(fixedEl, closableEl) {
7085
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
7086
+ const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
7087
+ return needsSpaceRight;
7088
+ }
7089
+ function adjustTooltipPlacement(tPos, el, tooltipEl) {
7090
+ const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
7091
+ const tooltipWidth = tooltipEl.getBoundingClientRect().width;
7092
+ const tooltipHeight = tooltipEl.getBoundingClientRect().height;
7093
+ const enoughSpaceAbove = spaceAbove > tooltipHeight;
7094
+ const enoughSpaceBelow = spaceBelow > tooltipHeight;
7095
+ // a tooltip should never be closer than 24px to the edge of a screen
7096
+ const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
7097
+ const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
7098
+ const swapAbove = (position) => {
7099
+ return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
7100
+ };
7101
+ const swapBelow = (position) => {
7102
+ return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
7103
+ };
7104
+ const swapLeft = (position, centeredPosition) => {
7105
+ if (!enoughSpaceLeft && enoughSpaceRight) {
7106
+ position = position.replace("left", "right");
7107
+ }
7108
+ else if (!enoughSpaceLeft && !enoughSpaceRight) {
7109
+ position = centeredPosition;
7110
+ }
7111
+ return position;
7112
+ };
7113
+ const swapRight = (position, centeredPosition) => {
7114
+ if (!enoughSpaceRight && enoughSpaceLeft) {
7115
+ position = position.replace("right", "left");
7116
+ }
7117
+ else if (!enoughSpaceRight && !enoughSpaceLeft) {
7118
+ position = centeredPosition;
7119
+ }
7120
+ return position;
7121
+ };
7122
+ // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
7123
+ switch (tPos) {
7124
+ case "left":
7125
+ tPos = swapLeft(tPos, "bottom");
7126
+ case "right":
7127
+ tPos = swapRight(tPos, "bottom");
7128
+ case "top-left":
7129
+ tPos = swapLeft(tPos, "top");
7130
+ tPos = swapAbove(tPos);
7131
+ case "top-right":
7132
+ tPos = swapRight(tPos, "top");
7133
+ tPos = swapAbove(tPos);
7134
+ case "bottom-left":
7135
+ tPos = swapLeft(tPos, "bottom");
7136
+ tPos = swapBelow(tPos);
7137
+ case "bottom-right":
7138
+ tPos = swapRight(tPos, "bottom");
7139
+ tPos = swapBelow(tPos);
7140
+ case "top":
7141
+ tPos = swapAbove(tPos);
7142
+ case "bottom":
7143
+ tPos = swapBelow(tPos);
7144
+ }
7145
+ return tPos;
7146
+ }
7147
+ function hasRoomRight(x, spaceNeeded) {
7148
+ let horizOffset = 0;
7149
+ // if (getTextDir() === "ltr") {
7150
+ if (x.type === "click") {
7151
+ // if it's a mouse event, deal with mouse coords
7152
+ horizOffset = x.clientX;
7153
+ // if it's a focus event, the offset is 0
7154
+ }
7155
+ else if (x.type === "focus") {
7156
+ horizOffset = 0;
7157
+ }
7158
+ else {
7159
+ // otherwise an element was passed, calculate how far it is from the edge of the window
7160
+ let el = x; // re-assignment is for clarity
7161
+ while (el) {
7162
+ if (el.tagName == "BODY") {
7163
+ // deal with browser quirks with body/window/document and page scroll
7164
+ var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
7165
+ horizOffset += el.offsetLeft - xScroll + el.clientLeft;
7166
+ }
7167
+ else {
7168
+ // for all other non-BODY elements
7169
+ horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
7170
+ }
7171
+ el = el.offsetParent;
7172
+ }
7173
+ // }
7174
+ }
7175
+ return window.innerWidth - horizOffset >= spaceNeeded;
7176
+ }
7177
+ function checkForActiveElInShadow(element) {
7178
+ while (element && element.shadowRoot) {
7179
+ element = element.shadowRoot.activeElement;
7180
+ }
7181
+ return element;
7182
+ }
7183
+ function checkForFocusableElInShadow(element) {
7184
+ const selectors = [
7185
+ "button",
7186
+ "a",
7187
+ "input",
7188
+ "select",
7189
+ "textarea",
7190
+ "wm-button",
7191
+ "wm-search",
7192
+ "wm-select",
7193
+ "wm-action-menu",
7194
+ "wm-tab-item",
7195
+ "wm-datepicker",
7196
+ ];
7197
+ let focusableEl = element;
7198
+ selectors.forEach((selector) => {
7199
+ if (focusableEl && focusableEl.shadowRoot) {
7200
+ let elInShadow = focusableEl.shadowRoot.querySelector(selector);
7201
+ if (elInShadow) {
7202
+ if (selector.startsWith("wm-")) {
7203
+ focusableEl = checkForFocusableElInShadow(elInShadow);
7204
+ }
7205
+ else {
7206
+ focusableEl = elInShadow;
7207
+ }
7208
+ }
7209
+ }
7210
+ });
7211
+ return focusableEl;
7212
+ }
7213
+ function isFocusable(element) {
7214
+ if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
7215
+ return true;
7216
+ }
7217
+ if (element.disabled) {
7218
+ return false;
7219
+ }
7220
+ switch (element.nodeName) {
7221
+ case "A":
7222
+ return !!element.href && element.rel != "ignore";
7223
+ case "INPUT":
7224
+ return element.type != "hidden" && element.type != "file";
7225
+ case "BUTTON":
7226
+ case "SELECT":
7227
+ case "TEXTAREA":
7228
+ case "WM-BUTTON":
7229
+ case "WM-SELECT":
7230
+ case "WM-ACTION-MENU":
7231
+ case "WM-DATEPICKER":
7232
+ case "WM-TIMEPICKER":
7233
+ case "WM-INPUT":
7234
+ case "WM-TAG-INPUT":
7235
+ case "WM-TAB-ITEM":
7236
+ case "WM-SEARCH":
7237
+ return true;
7238
+ default:
7239
+ return false;
7240
+ }
7241
+ }
7242
+ function getFirstFocusableDescendant(element) {
7243
+ if (isFocusable(element)) {
7244
+ return checkForFocusableElInShadow(element);
7245
+ }
7246
+ else if (element.childNodes.length > 0) {
7247
+ element.childNodes.forEach((i) => {
7248
+ const childEl = getFirstFocusableDescendant(i);
7249
+ return childEl && checkForFocusableElInShadow(childEl);
7250
+ });
7251
+ }
7252
+ }
7253
+ function hasValidType(file, types) {
7254
+ const acceptedExtensions = types.split(" ");
7255
+ const parts = file.name && file.name.split(".");
7256
+ const ext = parts && parts.length > 1 && parts[parts.length - 1];
7257
+ return ext
7258
+ ? acceptedExtensions.includes(ext.toLowerCase())
7259
+ : // fallback: if we couldn't obtain an extension,
7260
+ // validate based on MIME type...
7261
+ !!file.type
7262
+ ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
7263
+ : // ...and if that failed too, accept the file
7264
+ // as it's preferable to accept an invalid file
7265
+ // than refusing a valid one (back-end will take care of what slips through)
7266
+ true;
7267
+ }
7268
+ // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
7269
+ function getAcceptedMimeTypesList(acceptedExtensions) {
7270
+ // this is just a list of common file types (regardless of whether they are/can be valid or not)
7271
+ // front end checks are just a convenience to users, independent of security.
7272
+ // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
7273
+ const lookupTable = {
7274
+ aac: ["audio/aac"],
7275
+ abw: ["application/x-abiword"],
7276
+ arc: ["application/x-freearc"],
7277
+ avi: ["video/x-msvideo"],
7278
+ azw: ["application/vnd.amazon.ebook"],
7279
+ bin: ["application/octet-stream"],
7280
+ bmp: ["image/bmp"],
7281
+ bz: ["application/x-bzip"],
7282
+ bz2: ["application/x-bzip2"],
7283
+ csh: ["application/x-csh"],
7284
+ css: ["text/css"],
7285
+ csv: ["text/csv"],
7286
+ doc: ["application/msword"],
7287
+ docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
7288
+ eot: ["application/vnd.ms-fontobject"],
7289
+ epub: ["application/epub+zip"],
7290
+ gz: ["application/gzip"],
7291
+ gif: ["image/gif"],
7292
+ htm: ["text/html"],
7293
+ html: ["text/html"],
7294
+ ico: ["image/vnd.microsoft.icon"],
7295
+ ics: ["text/calendar"],
7296
+ jar: ["application/java-archive"],
7297
+ jpeg: ["image/jpeg"],
7298
+ jpg: ["image/jpeg"],
7299
+ js: ["text/javascript"],
7300
+ json: ["application/json"],
7301
+ jsonld: ["application/ld+json"],
7302
+ log: ["text/plain"],
7303
+ mid: ["audio/x-midi"],
7304
+ midi: ["audio/x-midi"],
7305
+ mjs: ["text/javascript"],
7306
+ mp3: ["audio/mpeg"],
7307
+ mpeg: ["video/mpeg"],
7308
+ mpkg: ["application/vnd.apple.installer+xml"],
7309
+ odp: ["application/vnd.oasis.opendocument.presentation"],
7310
+ ods: ["application/vnd.oasis.opendocument.spreadsheet"],
7311
+ odt: ["application/vnd.oasis.opendocument.text"],
7312
+ oga: ["audio/ogg"],
7313
+ ogv: ["video/ogg"],
7314
+ ogx: ["application/ogg"],
7315
+ opus: ["audio/opus"],
7316
+ otf: ["font/otf"],
7317
+ png: ["image/png"],
7318
+ pdf: ["application/pdf"],
7319
+ php: ["application/php"],
7320
+ ppt: ["application/vnd.ms-powerpoint"],
7321
+ pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
7322
+ rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
7323
+ rtf: ["application/rtf"],
7324
+ sh: ["application/x-sh"],
7325
+ svg: ["image/svg+xml"],
7326
+ swf: ["application/x-shockwave-flash"],
7327
+ tar: ["application/x-tar"],
7328
+ tif: ["image/tiff"],
7329
+ tiff: ["image/tiff"],
7330
+ ts: ["video/mp2t"],
7331
+ ttf: ["font/ttf"],
7332
+ txt: ["text/plain"],
7333
+ vsd: ["application/vnd.visio"],
7334
+ wav: ["audio/wav"],
7335
+ weba: ["audio/webm"],
7336
+ webm: ["video/webm"],
7337
+ webp: ["image/webp"],
7338
+ woff: ["font/woff"],
7339
+ woff2: ["font/woff2"],
7340
+ xhtml: ["application/xhtml+xml"],
7341
+ xls: ["application/vnd.ms-excel"],
7342
+ xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7343
+ xml: ["application/xml", "text/xml"],
7344
+ xul: ["application/vnd.mozilla.xul+xml"],
7345
+ zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
7346
+ "3gp": ["video/3gpp", "audio/3gpp"],
7347
+ "3g2": ["video/3gpp2", "audio/3gpp2"],
7348
+ "7z": ["application/x-7z-compressed"],
7349
+ };
7350
+ return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
7351
+ }
7352
+ function snakeCaseToCamelCase(str) {
7353
+ const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
7354
+ if (snakeCaseRegexp.test(str)) {
7355
+ let camelCase = "";
7356
+ let arr = str.split("_");
7357
+ arr.forEach((word, idx) => {
7358
+ camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
7359
+ });
7360
+ return camelCase;
7361
+ }
7362
+ else {
7363
+ return str;
7364
+ }
7365
+ }
7366
+ function getNewIndexToFocus(currentIndex, direction, listLength) {
7367
+ let newIndex = currentIndex;
7368
+ if (direction === "ArrowDown") {
7369
+ newIndex = (currentIndex + 1) % listLength;
7370
+ }
7371
+ if (direction === "ArrowUp") {
7372
+ newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
7373
+ }
7374
+ return newIndex;
7375
+ }
7376
+ function isRelatedTarget(ev, id) {
7377
+ // used for onBlur events to check the element that has been clicked
7378
+ const ids = id.split(" ");
7379
+ return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
7380
+ }
7381
+ function toBool(val) {
7382
+ // string "false" needs to be treated as bool False because react wrappers convert bool to string.
7383
+ return val == "false" ? false : !!val;
8828
7384
  }
8829
7385
 
8830
7386
  export { adjustTooltipPlacement as a, getPosition as b, checkForActiveElInShadow as c, debounce as d, isRelatedTarget as e, findParentWithScrollbar as f, generateId as g, checkForFocusableElInShadow as h, intl as i, getFirstFocusableDescendant as j, getNewIndexToFocus as k, shouldOpenUp as l, shouldOpenDown as m, shouldShiftRight as n, shouldShiftLeft as o, hasValidType as p, getTextDir as q, throttle as r, snakeCaseToCamelCase as s, toBool as t, hasRoomRight as u };