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