@tylertech/forge 3.0.0-next.7 → 3.0.0-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/custom-elements.json +7530 -4847
  2. package/dist/button/forge-button.css +1 -1
  3. package/dist/esm/accordion/index.js +1 -1
  4. package/dist/esm/app-bar/help-button/index.js +1 -1
  5. package/dist/esm/app-bar/index.js +1 -1
  6. package/dist/esm/app-bar/menu-button/index.js +1 -1
  7. package/dist/esm/app-bar/notification-button/index.js +1 -1
  8. package/dist/esm/app-bar/profile-button/index.js +1 -1
  9. package/dist/esm/app-bar/search/index.js +1 -1
  10. package/dist/esm/autocomplete/index.js +1 -1
  11. package/dist/esm/banner/index.js +1 -1
  12. package/dist/esm/bottom-sheet/index.js +1 -1
  13. package/dist/esm/busy-indicator/index.js +1 -1
  14. package/dist/esm/button/index.js +1 -1
  15. package/dist/esm/button-toggle/button-toggle/index.js +1 -1
  16. package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
  17. package/dist/esm/button-toggle/index.js +1 -1
  18. package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
  19. package/dist/esm/calendar/calendar-menu/index.js +1 -1
  20. package/dist/esm/calendar/index.js +1 -1
  21. package/dist/esm/card/index.js +1 -1
  22. package/dist/esm/checkbox/index.js +1 -1
  23. package/dist/esm/chip-field/index.js +1 -1
  24. package/dist/esm/chips/chip/index.js +1 -1
  25. package/dist/esm/chips/chip-set/index.js +1 -1
  26. package/dist/esm/chips/index.js +1 -1
  27. package/dist/esm/chunks/{chunk.PPPTT3SM.js → chunk.2VP57RZO.js} +2 -2
  28. package/dist/esm/chunks/{chunk.PPPTT3SM.js.map → chunk.2VP57RZO.js.map} +2 -2
  29. package/dist/esm/chunks/{chunk.TXFYS6EU.js → chunk.33EJTOVA.js} +2 -2
  30. package/dist/esm/chunks/{chunk.OTVT3XM2.js → chunk.3JDFBEF7.js} +2 -2
  31. package/dist/esm/chunks/chunk.3ME47JIX.js +7 -0
  32. package/dist/esm/chunks/chunk.3ME47JIX.js.map +7 -0
  33. package/dist/esm/chunks/{chunk.V6JVHYVW.js → chunk.44UCSD46.js} +2 -2
  34. package/dist/esm/chunks/{chunk.EUE3OVC7.js → chunk.4WVHON6T.js} +2 -2
  35. package/dist/esm/chunks/chunk.4WVHON6T.js.map +7 -0
  36. package/dist/esm/chunks/{chunk.6SBTLXLH.js → chunk.5IQGVS6U.js} +2 -2
  37. package/dist/esm/chunks/{chunk.6SBTLXLH.js.map → chunk.5IQGVS6U.js.map} +1 -1
  38. package/dist/esm/chunks/{chunk.7JQHQKXN.js → chunk.6MPXRRMB.js} +2 -2
  39. package/dist/esm/chunks/{chunk.MXNLCQRB.js → chunk.6VDF54LZ.js} +2 -2
  40. package/dist/esm/chunks/{chunk.GF2GUVYS.js → chunk.7TGGJGTG.js} +2 -2
  41. package/dist/esm/chunks/{chunk.GF2GUVYS.js.map → chunk.7TGGJGTG.js.map} +1 -1
  42. package/dist/esm/chunks/{chunk.4EB5NVCK.js → chunk.AHHNJSZK.js} +2 -2
  43. package/dist/esm/chunks/chunk.BBKRPL6R.js +7 -0
  44. package/dist/esm/chunks/chunk.BBKRPL6R.js.map +7 -0
  45. package/dist/esm/chunks/{chunk.BSTIDYQJ.js → chunk.BBWMSCVG.js} +2 -2
  46. package/dist/esm/chunks/{chunk.BKCEVPKW.js → chunk.BDCJIRNK.js} +2 -2
  47. package/dist/esm/chunks/chunk.BSVFCJCQ.js +7 -0
  48. package/dist/esm/chunks/chunk.BSVFCJCQ.js.map +7 -0
  49. package/dist/esm/chunks/chunk.CAUWWFF4.js +7 -0
  50. package/dist/esm/chunks/chunk.CAUWWFF4.js.map +7 -0
  51. package/dist/esm/chunks/{chunk.SYZB7B4F.js → chunk.CL65KLH7.js} +2 -2
  52. package/dist/esm/chunks/{chunk.4LVS2EYJ.js → chunk.DFGBVJBE.js} +2 -2
  53. package/dist/esm/chunks/chunk.DXZ5LVFJ.js +7 -0
  54. package/dist/esm/chunks/chunk.DXZ5LVFJ.js.map +7 -0
  55. package/dist/esm/chunks/{chunk.YUAU5IWT.js → chunk.F776DWXU.js} +2 -2
  56. package/dist/esm/chunks/{chunk.HKJEGD6C.js → chunk.FIBGOPNP.js} +2 -2
  57. package/dist/esm/chunks/{chunk.HKJEGD6C.js.map → chunk.FIBGOPNP.js.map} +1 -1
  58. package/dist/esm/chunks/{chunk.OHNPVHPF.js → chunk.GEGK55XX.js} +2 -2
  59. package/dist/esm/chunks/{chunk.OHNPVHPF.js.map → chunk.GEGK55XX.js.map} +2 -2
  60. package/dist/esm/chunks/{chunk.2QFIMTVP.js → chunk.GT3XBPZY.js} +2 -2
  61. package/dist/esm/chunks/{chunk.OT6H5NHX.js → chunk.HUGRRRQA.js} +2 -2
  62. package/dist/esm/chunks/{chunk.GJW4WS4I.js → chunk.HXJCTE47.js} +2 -2
  63. package/dist/esm/chunks/{chunk.RHYRMQS7.js → chunk.IPGZ24EH.js} +2 -2
  64. package/dist/esm/chunks/{chunk.RHYRMQS7.js.map → chunk.IPGZ24EH.js.map} +1 -1
  65. package/dist/esm/chunks/chunk.ISC7SZSP.js +7 -0
  66. package/dist/esm/chunks/chunk.ISC7SZSP.js.map +7 -0
  67. package/dist/esm/chunks/{chunk.RUSHOL23.js → chunk.JAAJDT5E.js} +2 -2
  68. package/dist/esm/chunks/{chunk.SIJGKRYS.js → chunk.JCRC2VEI.js} +2 -2
  69. package/dist/esm/chunks/{chunk.SIJGKRYS.js.map → chunk.JCRC2VEI.js.map} +1 -1
  70. package/dist/esm/chunks/{chunk.STGRPD2L.js → chunk.JFKSREWG.js} +2 -2
  71. package/dist/esm/chunks/{chunk.STGRPD2L.js.map → chunk.JFKSREWG.js.map} +1 -1
  72. package/dist/esm/chunks/{chunk.FAANPQES.js → chunk.JL4XB4RI.js} +2 -2
  73. package/dist/esm/chunks/{chunk.24L5GDD2.js → chunk.JTIPXKV6.js} +2 -2
  74. package/dist/esm/chunks/{chunk.24L5GDD2.js.map → chunk.JTIPXKV6.js.map} +2 -2
  75. package/dist/esm/chunks/chunk.KO45GDOA.js +7 -0
  76. package/dist/esm/chunks/{chunk.2CTK5R37.js.map → chunk.KO45GDOA.js.map} +2 -2
  77. package/dist/esm/chunks/chunk.KSCUIS5C.js +7 -0
  78. package/dist/esm/chunks/chunk.KSCUIS5C.js.map +7 -0
  79. package/dist/esm/chunks/{chunk.2LRDPTHK.js → chunk.M2M47T4L.js} +2 -2
  80. package/dist/esm/chunks/{chunk.JVW6JGV3.js → chunk.MGWY7YIL.js} +2 -2
  81. package/dist/esm/chunks/{chunk.JVW6JGV3.js.map → chunk.MGWY7YIL.js.map} +2 -2
  82. package/dist/esm/chunks/{chunk.3CBVRCKM.js → chunk.MJSLXZBM.js} +2 -2
  83. package/dist/esm/chunks/{chunk.3CBVRCKM.js.map → chunk.MJSLXZBM.js.map} +1 -1
  84. package/dist/esm/chunks/{chunk.2YAU7AXH.js → chunk.N7PQ2MUQ.js} +2 -2
  85. package/dist/esm/chunks/{chunk.2YAU7AXH.js.map → chunk.N7PQ2MUQ.js.map} +1 -1
  86. package/dist/esm/chunks/{chunk.XMFQFFKR.js → chunk.NE4NCRRZ.js} +2 -2
  87. package/dist/esm/chunks/chunk.NF4J3Q5X.js +7 -0
  88. package/dist/esm/chunks/chunk.NF4J3Q5X.js.map +7 -0
  89. package/dist/esm/chunks/chunk.OEYALYRM.js +7 -0
  90. package/dist/esm/chunks/chunk.OEYALYRM.js.map +7 -0
  91. package/dist/esm/chunks/{chunk.GHSAKRYH.js → chunk.OKKH7F7M.js} +2 -2
  92. package/dist/esm/chunks/{chunk.AGMPIMJV.js → chunk.QL45FKVJ.js} +2 -2
  93. package/dist/esm/chunks/{chunk.AGMPIMJV.js.map → chunk.QL45FKVJ.js.map} +2 -2
  94. package/dist/esm/chunks/chunk.QU76MOCS.js +12 -0
  95. package/dist/esm/chunks/chunk.QU76MOCS.js.map +7 -0
  96. package/dist/esm/chunks/{chunk.5PHLKON3.js → chunk.R5HZFOUK.js} +2 -2
  97. package/dist/esm/chunks/{chunk.5PHLKON3.js.map → chunk.R5HZFOUK.js.map} +2 -2
  98. package/dist/esm/chunks/chunk.SAXRW6GB.js +7 -0
  99. package/dist/esm/chunks/chunk.SAXRW6GB.js.map +7 -0
  100. package/dist/esm/chunks/{chunk.2IQGDFQS.js → chunk.SEP3L4QL.js} +2 -2
  101. package/dist/esm/chunks/{chunk.2IQGDFQS.js.map → chunk.SEP3L4QL.js.map} +1 -1
  102. package/dist/esm/chunks/{chunk.Z5TWWM7I.js → chunk.SN5LPTHH.js} +2 -2
  103. package/dist/esm/chunks/{chunk.Z5TWWM7I.js.map → chunk.SN5LPTHH.js.map} +1 -1
  104. package/dist/esm/chunks/{chunk.CNQESSA3.js → chunk.UKFJHDO7.js} +2 -2
  105. package/dist/esm/chunks/{chunk.IGK3VYZG.js → chunk.VI2GRQO3.js} +2 -2
  106. package/dist/esm/chunks/{chunk.A5MBSCSQ.js → chunk.VNOJO2PF.js} +2 -2
  107. package/dist/esm/chunks/chunk.W7PZTNZ4.js +7 -0
  108. package/dist/esm/chunks/chunk.W7PZTNZ4.js.map +7 -0
  109. package/dist/esm/chunks/chunk.WH6C36MO.js +7 -0
  110. package/dist/esm/chunks/chunk.WH6C36MO.js.map +7 -0
  111. package/dist/esm/chunks/{chunk.2YX7ASSX.js → chunk.WXN4S7CN.js} +2 -2
  112. package/dist/esm/chunks/{chunk.ER52NFXX.js → chunk.X5BG35YX.js} +2 -2
  113. package/dist/esm/chunks/{chunk.THPU5KBV.js → chunk.XRESQBNE.js} +2 -2
  114. package/dist/esm/chunks/{chunk.632OMHHN.js → chunk.YDY2IGBF.js} +2 -2
  115. package/dist/esm/chunks/{chunk.632OMHHN.js.map → chunk.YDY2IGBF.js.map} +1 -1
  116. package/dist/esm/chunks/{chunk.QYKO543K.js → chunk.YWCLKUK7.js} +2 -2
  117. package/dist/esm/chunks/{chunk.QA3NU7EN.js → chunk.Z4J4D5FD.js} +2 -2
  118. package/dist/esm/chunks/{chunk.QA3NU7EN.js.map → chunk.Z4J4D5FD.js.map} +1 -1
  119. package/dist/esm/chunks/{chunk.V4RBOYNH.js → chunk.ZTGPXIC2.js} +2 -2
  120. package/dist/esm/chunks/{chunk.V4RBOYNH.js.map → chunk.ZTGPXIC2.js.map} +1 -1
  121. package/dist/esm/circular-progress/index.js +1 -1
  122. package/dist/esm/color-picker/index.js +1 -1
  123. package/dist/esm/core/index.js +1 -1
  124. package/dist/esm/core/utils/index.js +1 -1
  125. package/dist/esm/date-picker/index.js +1 -1
  126. package/dist/esm/date-range-picker/index.js +1 -1
  127. package/dist/esm/expansion-panel/index.js +1 -1
  128. package/dist/esm/file-picker/index.js +1 -1
  129. package/dist/esm/focus-indicator/index.js +7 -0
  130. package/dist/esm/focus-indicator/index.js.map +7 -0
  131. package/dist/esm/icon/index.js +1 -1
  132. package/dist/esm/icon-button/index.js +1 -1
  133. package/dist/esm/index.js +1 -1
  134. package/dist/esm/list/index.js +1 -1
  135. package/dist/esm/list/list/index.js +1 -1
  136. package/dist/esm/list/list-item/index.js +1 -1
  137. package/dist/esm/list-dropdown/index.js +1 -1
  138. package/dist/esm/menu/index.js +1 -1
  139. package/dist/esm/open-icon/index.js +1 -1
  140. package/dist/esm/paginator/index.js +1 -1
  141. package/dist/esm/profile-card/index.js +1 -1
  142. package/dist/esm/quantity-field/index.js +1 -1
  143. package/dist/esm/radio/index.js +1 -1
  144. package/dist/esm/select/core/index.js +1 -1
  145. package/dist/esm/select/index.js +1 -1
  146. package/dist/esm/select/select/index.js +1 -1
  147. package/dist/esm/select/select-dropdown/index.js +1 -1
  148. package/dist/esm/slider/index.js +1 -1
  149. package/dist/esm/split-view/index.js +1 -1
  150. package/dist/esm/split-view/split-view/index.js +1 -1
  151. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  152. package/dist/esm/state-layer/index.js +7 -0
  153. package/dist/esm/state-layer/index.js.map +7 -0
  154. package/dist/esm/stepper/index.js +1 -1
  155. package/dist/esm/stepper/step/index.js +1 -1
  156. package/dist/esm/stepper/stepper/index.js +1 -1
  157. package/dist/esm/switch/index.js +1 -1
  158. package/dist/esm/table/index.js +1 -1
  159. package/dist/esm/tabs/index.js +1 -1
  160. package/dist/esm/tabs/tab/index.js +1 -1
  161. package/dist/esm/tabs/tab-bar/index.js +1 -1
  162. package/dist/esm/text-field/index.js +1 -1
  163. package/dist/esm/time-picker/index.js +1 -1
  164. package/dist/esm/toast/index.js +1 -1
  165. package/dist/forge-dark.css +1 -1
  166. package/dist/forge.css +1 -1
  167. package/dist/icon-button/forge-icon-button.css +1 -1
  168. package/dist/table/forge-table.css +1 -1
  169. package/dist/theme/forge-theme.css +1 -1
  170. package/esm/app-bar/app-bar.js +1 -1
  171. package/esm/banner/banner.js +1 -1
  172. package/esm/bottom-sheet/bottom-sheet.js +1 -1
  173. package/esm/busy-indicator/busy-indicator.js +1 -1
  174. package/esm/button/button.d.ts +1 -0
  175. package/esm/button/button.js +8 -2
  176. package/esm/button-toggle/button-toggle/button-toggle.js +1 -1
  177. package/esm/calendar/calendar-menu/calendar-menu.js +1 -1
  178. package/esm/calendar/calendar.js +1 -1
  179. package/esm/card/card-constants.d.ts +2 -2
  180. package/esm/card/card-constants.js +2 -2
  181. package/esm/card/card.d.ts +19 -8
  182. package/esm/card/card.js +30 -21
  183. package/esm/checkbox/checkbox-adapter.d.ts +1 -0
  184. package/esm/checkbox/checkbox-adapter.js +9 -2
  185. package/esm/checkbox/checkbox.js +1 -1
  186. package/esm/chip-field/chip-field.js +1 -1
  187. package/esm/chips/chip/chip.js +1 -1
  188. package/esm/circular-progress/circular-progress.d.ts +3 -3
  189. package/esm/circular-progress/circular-progress.js +4 -4
  190. package/esm/color-picker/color-picker.js +1 -1
  191. package/esm/core/testing/pointer.d.ts +13 -0
  192. package/esm/core/testing/pointer.js +42 -0
  193. package/esm/core/utils/utils.d.ts +16 -2
  194. package/esm/core/utils/utils.js +47 -6
  195. package/esm/file-picker/file-picker.js +1 -1
  196. package/esm/focus-indicator/focus-indicator-adapter.d.ts +29 -0
  197. package/esm/focus-indicator/focus-indicator-adapter.js +39 -0
  198. package/esm/focus-indicator/focus-indicator-constants.d.ts +15 -0
  199. package/esm/focus-indicator/focus-indicator-constants.js +19 -0
  200. package/esm/focus-indicator/focus-indicator-foundation.d.ts +43 -0
  201. package/esm/focus-indicator/focus-indicator-foundation.js +110 -0
  202. package/esm/focus-indicator/focus-indicator.d.ts +67 -0
  203. package/esm/focus-indicator/focus-indicator.js +112 -0
  204. package/esm/focus-indicator/index.d.ts +10 -0
  205. package/esm/focus-indicator/index.js +14 -0
  206. package/esm/icon-button/icon-button.d.ts +1 -0
  207. package/esm/icon-button/icon-button.js +9 -2
  208. package/esm/index.d.ts +2 -0
  209. package/esm/index.js +6 -0
  210. package/esm/list/list-item/list-item-adapter.d.ts +3 -3
  211. package/esm/list/list-item/list-item-adapter.js +2 -2
  212. package/esm/list/list-item/list-item-foundation.d.ts +1 -0
  213. package/esm/list/list-item/list-item-foundation.js +8 -1
  214. package/esm/list/list-item/list-item.js +1 -1
  215. package/esm/paginator/paginator.js +1 -1
  216. package/esm/profile-card/profile-card.js +1 -1
  217. package/esm/radio/radio-adapter.d.ts +1 -0
  218. package/esm/radio/radio-adapter.js +9 -2
  219. package/esm/select/select/select.js +1 -1
  220. package/esm/slider/slider-adapter.d.ts +0 -16
  221. package/esm/slider/slider-adapter.js +11 -71
  222. package/esm/slider/slider-constants.d.ts +0 -3
  223. package/esm/slider/slider-constants.js +0 -3
  224. package/esm/slider/slider-foundation.d.ts +0 -1
  225. package/esm/slider/slider-foundation.js +0 -6
  226. package/esm/slider/slider-utils.js +6 -3
  227. package/esm/slider/slider.d.ts +0 -2
  228. package/esm/slider/slider.js +9 -7
  229. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  230. package/esm/state-layer/index.d.ts +10 -0
  231. package/esm/state-layer/index.js +14 -0
  232. package/esm/state-layer/state-layer-adapter.d.ts +41 -0
  233. package/esm/state-layer/state-layer-adapter.js +101 -0
  234. package/esm/state-layer/state-layer-constants.d.ts +79 -0
  235. package/esm/state-layer/state-layer-constants.js +89 -0
  236. package/esm/state-layer/state-layer-foundation.d.ts +57 -0
  237. package/esm/state-layer/state-layer-foundation.js +237 -0
  238. package/esm/state-layer/state-layer-utils.d.ts +26 -0
  239. package/esm/state-layer/state-layer-utils.js +54 -0
  240. package/esm/state-layer/state-layer.d.ts +66 -0
  241. package/esm/state-layer/state-layer.js +96 -0
  242. package/esm/stepper/step/step.js +1 -1
  243. package/esm/switch/switch.js +10 -3
  244. package/esm/tabs/tab/tab-adapter.d.ts +4 -6
  245. package/esm/tabs/tab/tab-adapter.js +9 -18
  246. package/esm/tabs/tab/tab-constants.d.ts +0 -1
  247. package/esm/tabs/tab/tab-constants.js +0 -1
  248. package/esm/tabs/tab/tab-foundation.d.ts +0 -1
  249. package/esm/tabs/tab/tab-foundation.js +1 -3
  250. package/esm/tabs/tab/tab.d.ts +0 -1
  251. package/esm/tabs/tab/tab.js +9 -6
  252. package/esm/tabs/tab-bar/tab-bar.d.ts +2 -2
  253. package/esm/tabs/tab-bar/tab-bar.js +3 -3
  254. package/esm/text-field/text-field.js +1 -1
  255. package/esm/toast/toast.js +1 -1
  256. package/package.json +1 -1
  257. package/styles/app-bar/_mixins.scss +9 -1
  258. package/styles/card/_mixins.scss +8 -7
  259. package/styles/circular-progress/_mixins.scss +3 -10
  260. package/styles/core/{style-layer → styles}/circular-progress/_core.scss +5 -8
  261. package/styles/core/styles/focus-indicator/_core.scss +5 -0
  262. package/styles/core/styles/focus-indicator/_variables.scss +8 -0
  263. package/styles/core/styles/focus-indicator/index.scss +7 -0
  264. package/styles/core/{style-layer → styles}/slider/_core.scss +13 -31
  265. package/styles/core/styles/state-layer/_core.scss +144 -0
  266. package/styles/core/styles/state-layer/_variables.scss +8 -0
  267. package/styles/core/{style-layer/tabs/tab → styles/state-layer}/index.scss +0 -4
  268. package/styles/core/{style-layer → styles}/tabs/tab/_core.scss +36 -40
  269. package/styles/core/{style-layer → styles}/tabs/tab-bar/_core.scss +2 -2
  270. package/styles/core/{style-layer → styles}/tabs/tab-bar/_variables.scss +1 -1
  271. package/styles/core/styles/tabs/tab-bar/index.scss +7 -0
  272. package/styles/core/styles/tokens/_color-palette.scss +299 -0
  273. package/styles/core/styles/tokens/circular-progress/_tokens.scss +14 -0
  274. package/styles/core/styles/tokens/focus-indicator/_tokens.scss +24 -0
  275. package/styles/core/styles/tokens/index.scss +58 -0
  276. package/styles/core/styles/tokens/state-layer/_tokens.scss +17 -0
  277. package/styles/core/styles/tokens/theme/_tokens.scss +185 -0
  278. package/styles/core/styles/tokens/typography/_tokens.scss +47 -0
  279. package/styles/core/styles/utils/_elevation.scss +5 -0
  280. package/styles/focus-indicator/_mixins.scss +138 -0
  281. package/styles/focus-indicator/_variables.scss +5 -0
  282. package/styles/focus-indicator/focus-indicator.scss +32 -0
  283. package/styles/linear-progress/_mixins.scss +1 -1
  284. package/styles/linear-progress/_variables.scss +1 -1
  285. package/styles/slider/_mixins.scss +17 -1
  286. package/styles/state-layer/_mixins.scss +23 -0
  287. package/styles/state-layer/state-layer.scss +20 -0
  288. package/styles/tabs/tab/_mixins.scss +20 -1
  289. package/styles/tabs/tab/_variables.scss +2 -0
  290. package/styles/tabs/tab-bar/_mixins.scss +2 -1
  291. package/styles/tabs/tab-bar/_variables.scss +2 -2
  292. package/styles/theme/_theme-dark.scss +5 -3
  293. package/styles/theme/_theme.scss +3 -36
  294. package/dist/esm/chunks/chunk.246JM2YT.js +0 -7
  295. package/dist/esm/chunks/chunk.246JM2YT.js.map +0 -7
  296. package/dist/esm/chunks/chunk.2CTK5R37.js +0 -7
  297. package/dist/esm/chunks/chunk.2XFVFZ3P.js +0 -7
  298. package/dist/esm/chunks/chunk.2XFVFZ3P.js.map +0 -7
  299. package/dist/esm/chunks/chunk.5IVB5L5Z.js +0 -7
  300. package/dist/esm/chunks/chunk.5IVB5L5Z.js.map +0 -7
  301. package/dist/esm/chunks/chunk.A5R7KUIP.js +0 -7
  302. package/dist/esm/chunks/chunk.A5R7KUIP.js.map +0 -7
  303. package/dist/esm/chunks/chunk.BWZKQ6WX.js +0 -7
  304. package/dist/esm/chunks/chunk.BWZKQ6WX.js.map +0 -7
  305. package/dist/esm/chunks/chunk.EUE3OVC7.js.map +0 -7
  306. package/dist/esm/chunks/chunk.GUYPITGA.js +0 -7
  307. package/dist/esm/chunks/chunk.GUYPITGA.js.map +0 -7
  308. package/dist/esm/chunks/chunk.GWIVOPRO.js +0 -7
  309. package/dist/esm/chunks/chunk.GWIVOPRO.js.map +0 -7
  310. package/dist/esm/chunks/chunk.JHXNEHWR.js +0 -12
  311. package/dist/esm/chunks/chunk.JHXNEHWR.js.map +0 -7
  312. package/dist/esm/chunks/chunk.NVMILGC2.js +0 -7
  313. package/dist/esm/chunks/chunk.NVMILGC2.js.map +0 -7
  314. package/dist/esm/chunks/chunk.WFDIA7R6.js +0 -7
  315. package/dist/esm/chunks/chunk.WFDIA7R6.js.map +0 -7
  316. package/esm/slider/slider-handle-ripple.d.ts +0 -18
  317. package/esm/slider/slider-handle-ripple.js +0 -37
  318. package/esm/tabs/tab/tab-ripple.d.ts +0 -17
  319. package/esm/tabs/tab/tab-ripple.js +0 -33
  320. package/styles/circular-progress/_variables.scss +0 -12
  321. /package/dist/esm/chunks/{chunk.TXFYS6EU.js.map → chunk.33EJTOVA.js.map} +0 -0
  322. /package/dist/esm/chunks/{chunk.OTVT3XM2.js.map → chunk.3JDFBEF7.js.map} +0 -0
  323. /package/dist/esm/chunks/{chunk.V6JVHYVW.js.map → chunk.44UCSD46.js.map} +0 -0
  324. /package/dist/esm/chunks/{chunk.7JQHQKXN.js.map → chunk.6MPXRRMB.js.map} +0 -0
  325. /package/dist/esm/chunks/{chunk.MXNLCQRB.js.map → chunk.6VDF54LZ.js.map} +0 -0
  326. /package/dist/esm/chunks/{chunk.4EB5NVCK.js.map → chunk.AHHNJSZK.js.map} +0 -0
  327. /package/dist/esm/chunks/{chunk.BSTIDYQJ.js.map → chunk.BBWMSCVG.js.map} +0 -0
  328. /package/dist/esm/chunks/{chunk.BKCEVPKW.js.map → chunk.BDCJIRNK.js.map} +0 -0
  329. /package/dist/esm/chunks/{chunk.SYZB7B4F.js.map → chunk.CL65KLH7.js.map} +0 -0
  330. /package/dist/esm/chunks/{chunk.4LVS2EYJ.js.map → chunk.DFGBVJBE.js.map} +0 -0
  331. /package/dist/esm/chunks/{chunk.YUAU5IWT.js.map → chunk.F776DWXU.js.map} +0 -0
  332. /package/dist/esm/chunks/{chunk.2QFIMTVP.js.map → chunk.GT3XBPZY.js.map} +0 -0
  333. /package/dist/esm/chunks/{chunk.OT6H5NHX.js.map → chunk.HUGRRRQA.js.map} +0 -0
  334. /package/dist/esm/chunks/{chunk.GJW4WS4I.js.map → chunk.HXJCTE47.js.map} +0 -0
  335. /package/dist/esm/chunks/{chunk.RUSHOL23.js.map → chunk.JAAJDT5E.js.map} +0 -0
  336. /package/dist/esm/chunks/{chunk.FAANPQES.js.map → chunk.JL4XB4RI.js.map} +0 -0
  337. /package/dist/esm/chunks/{chunk.2LRDPTHK.js.map → chunk.M2M47T4L.js.map} +0 -0
  338. /package/dist/esm/chunks/{chunk.XMFQFFKR.js.map → chunk.NE4NCRRZ.js.map} +0 -0
  339. /package/dist/esm/chunks/{chunk.GHSAKRYH.js.map → chunk.OKKH7F7M.js.map} +0 -0
  340. /package/dist/esm/chunks/{chunk.CNQESSA3.js.map → chunk.UKFJHDO7.js.map} +0 -0
  341. /package/dist/esm/chunks/{chunk.IGK3VYZG.js.map → chunk.VI2GRQO3.js.map} +0 -0
  342. /package/dist/esm/chunks/{chunk.A5MBSCSQ.js.map → chunk.VNOJO2PF.js.map} +0 -0
  343. /package/dist/esm/chunks/{chunk.2YX7ASSX.js.map → chunk.WXN4S7CN.js.map} +0 -0
  344. /package/dist/esm/chunks/{chunk.ER52NFXX.js.map → chunk.X5BG35YX.js.map} +0 -0
  345. /package/dist/esm/chunks/{chunk.THPU5KBV.js.map → chunk.XRESQBNE.js.map} +0 -0
  346. /package/dist/esm/chunks/{chunk.QYKO543K.js.map → chunk.YWCLKUK7.js.map} +0 -0
  347. /package/styles/core/{style-layer → styles}/circular-progress/_animations.scss +0 -0
  348. /package/styles/core/{style-layer → styles}/circular-progress/_variables.scss +0 -0
  349. /package/styles/core/{style-layer → styles}/circular-progress/index.scss +0 -0
  350. /package/styles/core/{style-layer → styles}/core/_config.scss +0 -0
  351. /package/styles/core/{style-layer → styles}/linear-progress/_animations.scss +0 -0
  352. /package/styles/core/{style-layer → styles}/linear-progress/_core.scss +0 -0
  353. /package/styles/core/{style-layer → styles}/linear-progress/_variables.scss +0 -0
  354. /package/styles/core/{style-layer → styles}/linear-progress/index.scss +0 -0
  355. /package/styles/core/{style-layer → styles}/slider/_functions.scss +0 -0
  356. /package/styles/core/{style-layer → styles}/slider/_variables.scss +0 -0
  357. /package/styles/core/{style-layer → styles}/slider/index.scss +0 -0
  358. /package/styles/core/{style-layer → styles}/tabs/tab/_variables.scss +0 -0
  359. /package/styles/core/{style-layer/tabs/tab-bar → styles/tabs/tab}/index.scss +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/calendar/calendar-utils.ts", "../../src/calendar/calendar-adapter.ts", "../../src/calendar/calendar-foundation.ts", "../../src/calendar/calendar.ts", "../../src/calendar/calendar-component-delegate.ts", "../../src/calendar/index.ts"],
4
- "sourcesContent": ["import { getEventPath, isArray, isValidDate } from '@tylertech/forge-core';\n\nimport { isSameDate } from '../core/utils/date-utils';\nimport { ICalendarMenuOption } from './calendar-menu/calendar-menu-constants';\nimport { CALENDAR_CONSTANTS, CalendarEventBuilder, DayOfWeek, ICalendarEvent, ICalendarNumberRange, ICalendarMenuMonthConfig, ICalendarMenuYearConfig, ICalendarDisabledDateParams, CalendarView } from './calendar-constants';\nimport { getLocalizedMonth, getLocalizedYear } from './calendar-locale-utils';\nimport { DateRange } from './core/date-range';\nimport { eventIncludesDate, eventIncludesElement } from './calendar-dom-utils';\n\n/** Returns an array of dates encompassing an entire month and the beginning and end of adjacent months to fill weeks. */\nexport function getMonthDates(month: number, year: number, firstDayOfWeek: DayOfWeek = DayOfWeek.Sunday): Date[] {\n const dates: Date[] = [];\n const startDate = getFirstDateOfWeek(new Date(year, month, 1), firstDayOfWeek);\n const endDate = new Date(startDate);\n endDate.setDate(startDate.getDate() + CALENDAR_CONSTANTS.numbers.MONTH_LENGTH);\n\n for (const d = startDate; d < endDate; d.setDate(d.getDate() + 1)) {\n dates.push(new Date(d));\n }\n return dates;\n}\n\n/** Returns an array of the dates in single week given a date from the week. */\nexport function getWeekDates(date: Date, firstDayOfWeek: DayOfWeek = DayOfWeek.Sunday): Date[] {\n const dates: Date[] = [];\n const startDate = getFirstDateOfWeek(date, firstDayOfWeek);\n const endDate = new Date(startDate);\n endDate.setDate(startDate.getDate() + 7);\n\n for (const d = startDate; d < endDate; d.setDate(d.getDate() + 1)) {\n dates.push(new Date(d));\n }\n return dates;\n}\n\n/** Returns the first date of the week containing the given date. */\nexport function getFirstDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek = DayOfWeek.Sunday): Date {\n const day = date.getDay();\n const firstDate = new Date(date);\n const diff = day >= firstDayOfWeek ? day - firstDayOfWeek : 7 + (day - firstDayOfWeek);\n firstDate.setDate(date.getDate() - diff);\n firstDate.setHours(0, 0, 0, 0);\n return firstDate;\n}\n\n/** Returns the last date of the week containing the given date. */\nexport function getLastDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek = DayOfWeek.Sunday): Date {\n const lastDate = getFirstDateOfWeek(date, firstDayOfWeek);\n lastDate.setDate(lastDate.getDate() + 6);\n return lastDate;\n}\n\n/** Returns the day of week of the first date of the given month. */\nexport function getFirstDayOfMonth(month: number, year: number): DayOfWeek {\n const date = new Date(year, month, 1);\n return date.getDay();\n}\n\n/** Returns an array of day strings for a week starting on the given first day of week. */\nexport function getSortedDaysOfWeek(firstDayOfWeek: DayOfWeek = DayOfWeek.Sunday): DayOfWeek[] {\n const days: DayOfWeek[] = [];\n let day = firstDayOfWeek;\n do {\n days.push(day);\n day += 1;\n day %= 7;\n } while (day !== firstDayOfWeek);\n return days;\n}\n\n/** Returns whether the given date object is today. */\nexport function isToday(date: Date): boolean {\n return isSameDate(new Date(), date);\n}\n\n/** Returns whether the given date is in a given month. */\nexport function isInMonth(date: Date, month: number, year: number): boolean {\n return date.getMonth() === month && date.getFullYear() === year;\n}\n\n/** Returns whether the given date falls between two other dates. */\nexport function isInRange(date: Date, start: Date, end: Date): boolean {\n return (date > start && date < end) || isSameDate(date, start) || isSameDate(date, end);\n}\n\n/** Sorts an array of dates from earliest to latest. */\nexport function sortDates(dates: Date[]): Date[] {\n return dates.sort((a, b) => a.getTime() - b.getTime());\n}\n\n/** Splits an array into groups of seven. */\nexport function splitIntoWeeks<T>(array: T[]): T[][] {\n const result: T[][] = [];\n for (let i = 0; i < array.length; i += 7) {\n const chunk = array.slice(i, i + 7);\n result.push(chunk);\n }\n return result;\n}\n\n/** Returns a date range from an array of dates. */\nexport function getDateRangeFromDates(dates: Date[]): DateRange {\n if (!dates.length) {\n return new DateRange();\n }\n if (dates.length === 1) {\n return new DateRange({from: new Date(dates[0])});\n }\n const minAndMax = getMinAndMaxDates(dates);\n return new DateRange({from: minAndMax[0], to: minAndMax[minAndMax.length - 1]});\n}\n\n/** Returns an array of dates from a date range. */\nexport function getDatesFromDateRange(range: DateRange): Date[] {\n const dates: Date[] = [];\n if (range.from) {\n dates.push(new Date(range.from));\n }\n if (range.to) {\n dates.push(new Date(range.to));\n }\n return dates;\n}\n\n/** Returns the earliest and latest dates in an array as an array. */\nexport function getMinAndMaxDates(dates: Date[]): Date[] {\n if (!dates.length) {\n return [];\n }\n if (dates.length === 1) {\n return [new Date(dates[0])];\n }\n const sortedDates = sortDates(dates.slice().map(d => new Date(d)));\n return [new Date(sortedDates[0]), new Date(sortedDates[sortedDates.length - 1])];\n}\n\n/** Returns an array of ICalendarDates that fall between two other dates. */\nexport function getDatesInRange(dates: Date[], start: Date, end: Date): Date[] {\n if (!start || !end) {\n return [];\n }\n return dates.filter(d => {\n return isInRange(d, start, end);\n });\n}\n\n/** Gets an accessible description of events. */\nexport function getEventDescriptions(events: ICalendarEvent[]): string {\n let description = `${events.length} event${events.length === 1 ? '' : 's'}`;\n const labels = events.map(e => e.label).join(', ');\n if (labels?.length) {\n description += `: ${labels}`;\n }\n return description;\n}\n\n/** Gets a date from a string of numbers postfixed by y, m, w, or d */\nexport function parseDateOffset(offset: string): Date {\n const date = new Date();\n const parts = offset.match(/-?[0-9]*[a-zA-Z]/g)?.map(p => p.trim()) ?? [];\n parts.forEach(p => {\n const postfix = p.slice(-1);\n const value = +p.slice(0, -1);\n switch (postfix) {\n case 'y':\n date.setFullYear(date.getFullYear() + value);\n break;\n case 'm':\n date.setMonth(date.getMonth() + value);\n break;\n case 'w':\n date.setDate(date.getDate() + value * 7);\n break;\n case 'd':\n date.setDate(date.getDate() + value);\n break;\n }\n });\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\n/** Gets a min and max year from a string of two numbers separated by : and optionally prefixed with + or - */\nexport function parseYearRange(range: string): ICalendarNumberRange {\n const parts = range.split(':');\n if (parts?.length < 2) {\n return {min: 1970, max: 1970};\n }\n const thisYear = new Date().getFullYear();\n const parsedParts = parts.slice(0, 2).map(p => {\n if (p.startsWith('-')) {\n return thisYear - +p.substring(1);\n } else if (p.startsWith('+')) {\n return thisYear + +p.substring(1);\n }\n return +p;\n });\n return {min: parsedParts[0], max: parsedParts[1]};\n}\n\n/** Gets an array of month ICalendarMenuOptions. */\nexport function getMonthOptions(config: ICalendarMenuMonthConfig): ICalendarMenuOption[] {\n const minYear = config.min?.getFullYear() ?? 0;\n const maxYear = config.max?.getFullYear() ?? 0;\n const minMonth = config.min?.getMonth() ?? -1;\n const maxMonth = config.max?.getMonth() ?? 12;\n return [...Array(12).keys()].map(k => {\n const lessThanMin = config.min ? config.selectedYear < minYear || config.selectedYear === minYear && k < minMonth : false;\n const greaterThanMax = config.max ? config.selectedYear > maxYear || config.selectedYear === maxYear && k > maxMonth : false;\n return {\n value: k,\n label: getLocalizedMonth(k, 'long', config.locale),\n selected: k === config.selectedMonth,\n disabled: lessThanMin || greaterThanMax\n };\n });\n}\n\n/** Gets an array of year ICalendarMenuOptions. */\nexport function getYearOptions(config: ICalendarMenuYearConfig): ICalendarMenuOption[] {\n const menuOptions: ICalendarMenuOption[] = [];\n const offset = config.yearInView % CALENDAR_CONSTANTS.numbers.YEARS_IN_VIEW;\n const start = config.yearInView - offset;\n for (let i = start; i < start + CALENDAR_CONSTANTS.numbers.YEARS_IN_VIEW; i++) {\n menuOptions.push({\n value: i,\n label: getLocalizedYear(i, 'numeric', config.locale),\n selected: i === config.selectedYear,\n disabled: i < config.min || i > config.max\n });\n }\n return menuOptions;\n}\n\n/** Gets an array of year ICalendarMenuOptions including every year in range. */\nexport function getAllYearOptions(config: ICalendarMenuYearConfig): ICalendarMenuOption[] {\n const menuOptions: ICalendarMenuOption[] = [];\n for (let i = config.min; i <= config.max; i++) {\n menuOptions.push({\n value: i,\n label: getLocalizedYear(i, 'numeric', config.locale),\n selected: i === config.selectedYear\n });\n }\n return menuOptions;\n}\n\n/** Checks whether a date is present in the given array. */\nexport function isSelected(date: Date, values: Date[]): boolean {\n return values.some(d => isSameDate(d, date));\n}\n\n/** Checks wheter a date is disabled. */\nexport function isDisabled(date: Date, params: ICalendarDisabledDateParams): boolean {\n if ((params.minDate && date < params.minDate) || (params.maxDate && date > params.maxDate)) {\n return true;\n }\n if (params.otherMonth) {\n return true;\n }\n if (params.disabledDates.some(d => isSameDate(d, date))) {\n return true;\n }\n if (params.disabledDaysOfWeek.includes(date.getDay())) {\n return true;\n }\n if (params.builder && params.builder(date)) {\n return true;\n }\n return false;\n}\n\n/** Returns the index of the given date in the dates array. */\nexport function getIndexOfDate(date: Date, dates: Date[]): number {\n return dates.findIndex(d => isSameDate(d, date));\n}\n\n/** Returns all the events on the given date. */\nexport function getEventsOnDate(date: Date, events: ICalendarEvent[], builder: CalendarEventBuilder | undefined): ICalendarEvent[] {\n const eventsOnDate = events.filter(e => isSameDate(e.date, date));\n if (builder) {\n const builtEvents = builder(date);\n if (builtEvents) {\n if (isArray(builtEvents)) {\n eventsOnDate.push(...builtEvents as ICalendarEvent[]);\n } else {\n eventsOnDate.push(builtEvents as ICalendarEvent);\n }\n }\n }\n return eventsOnDate;\n}\n\n/** Gets all enabled dates between the first and last items in an array of dates. */\nexport function getMultipleFromRange(dates: Date[], disabledParams?: ICalendarDisabledDateParams): Date[] {\n if (!dates.length) {\n return [];\n }\n const current = new Date(dates[0]);\n const last = dates[dates.length - 1];\n const array: Date[] = [];\n while (current <= last) {\n if (!disabledParams || !isDisabled(current, disabledParams)) {\n array.push(new Date(current));\n }\n current.setDate(current.getDate() + 1);\n }\n return array;\n}\n\n/** Gets a date or null from a date, string, or date offset. */\nexport function coerceDateFromValue(value?: Date | string | null): Date | null {\n let date: Date | null = null;\n\n if (typeof value === 'string' && !value.length) {\n value = null;\n }\n\n if (value != null) {\n if (isValidDate(new Date(value as string | Date))) {\n date = new Date(value as Date);\n } else if ((value as string).length) {\n date = parseDateOffset(value as string);\n }\n date?.setHours(0, 0, 0, 0);\n }\n\n return date;\n}\n\n/** Returns whether an event should be handled or ignored. */\nexport function shouldHandleEvent(evt: Event, view: CalendarView, preventFocus: boolean): boolean {\n return preventFocus || !getEventPath(evt).length || !!(view === 'date' && eventIncludesDate(evt)) || !!(view !== 'date' && eventIncludesElement(evt, CALENDAR_CONSTANTS.ids.MENU));\n}\n", "import { getShadowElement, removeAllChildren, appendToAttribute, toggleAttribute, toggleOnAttribute } from '@tylertech/forge-core';\n\nimport { BaseAdapter, IBaseAdapter } from '../core/base';\nimport { CALENDAR_CONSTANTS, DayOfWeek, ICalendarDateOptions, ICalendarDayOptions, ICalendarEvent, ICalendarDateConfig } from './calendar-constants';\nimport { ICalendarComponent } from './calendar';\nimport { splitIntoWeeks } from './calendar-utils';\nimport { getAccessibleHeader, getClearButton, getDateElement, getDateId, getDateRow, getDateSpacerElement, getDayElement, getEventElement, getEventWrapperElement, getEventWrapperId, getFooter, getHeader, getMonthButtonContent, getTodayButton, getTooltip, getYearButtonContent, setTabindexOnElement } from './calendar-dom-utils';\nimport { getLocalizedMonth, getLocalizedYear } from './calendar-locale-utils';\nimport { CalendarDirection, CALENDAR_MENU_CONSTANTS, ICalendarMenuOption, ICalendarMenuComponent, CalendarMenuAnimationType } from './calendar-menu';\n\nexport interface ICalendarAdapter extends IBaseAdapter {\n animateIntoSelectionMenu(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus: boolean): void;\n closeMenu(): void;\n moveMenuFocusDown(): void;\n moveMenuFocusBackward(): boolean;\n moveMenuFocusForward(): boolean;\n moveMenuFocusUp(): void;\n openMenuAsGrid(options: ICalendarMenuOption[], setFocus: boolean): void;\n openMenuAsList(options: ICalendarMenuOption[], setFocus: boolean): void;\n registerClearButtonListener(listener: (evt: Event) => void): void;\n registerDateClickListener(listener: (evt: Event) => void): void;\n registerHoverListener(listener: (evt: Event) => void): void;\n registerKeydownListener(listener: (evt: KeyboardEvent) => void): void;\n registerMenuFocusChangeEventListener(listener: (evt: CustomEvent<number>) => void): void;\n registerMenuListener(listener: (evt: CustomEvent<number>) => void): void;\n registerMonthButtonListener(listener: (evt: Event) => void): void;\n registerNextButtonListener(listener: (evt: Event) => void): void;\n registerPreventFocusListener(listener: (evt: Event) => void): void;\n registerPreviousButtonListener(listener: (evt: Event) => void): void;\n registerTodayButtonListener(listener: (evt: Event) => void): void;\n registerYearButtonListener(listener: (evt: Event) => void): void;\n removeClearButton(): void;\n removeFooter(): void;\n removeHeader(): void;\n removeTodayButton(): void;\n replaceDate(date: ICalendarDateConfig, options?: ICalendarDateOptions): void;\n replaceDateWithSpacer(date: Date): void;\n selectFocusedMenuItem(): void;\n setAllDatesUnfocusable(): void;\n setClearButton(): void;\n setContainerClass(name: string, value: boolean): void;\n setDateDisabled(date: Date, value: boolean): void;\n setDateDescription(date: Date, value?: string): void;\n setDates(dates: ICalendarDateConfig[], options?: ICalendarDateOptions): void;\n setDateSelected(date: Date, value: boolean): void;\n setDateTooltip(date: Date, value?: string): void;\n setDateViewHidden(value: boolean): void;\n setDays(days: DayOfWeek[], options?: ICalendarDayOptions): void;\n setEvent(event: ICalendarEvent, overflow?: boolean): void;\n setEventWrapperOnDate(date: Date, value: boolean): void;\n setFooter(): void;\n setHeader(): void;\n setMenuAnimation(value: CalendarMenuAnimationType): void;\n setMonth(month: number, locale?: string): void;\n setMonthButtonPressed(value: boolean): void;\n setMultiple(value: boolean): void;\n setNextButtonDisabled(value: boolean): void;\n setNextButtonLabel(label: string): void;\n setPreventFocusOnMenu(value: boolean): void;\n setPreviousButtonDisabled(value: boolean): void;\n setPreviousButtonLabel(label: string): void;\n setRange(dates: Date[] | null): void;\n setRangeEnd(date: Date | null): void;\n setRangeStart(date: Date | null): void;\n setActiveDate(date: Date, setFocus: boolean, preventFocus?: boolean): void;\n setTodayButton(): void;\n setWeekend(date: Date, value: boolean): void;\n setYear(year: number, locale?: string): void;\n setYearButtonPressed(value: boolean): void;\n toggleContainerAttribute(hasAttribute: boolean, name: string, value?: string): void;\n unregisterClearButtonListener(listener: (evt: Event) => void): void;\n unregisterDateClickListener(listener: (evt: Event) => void): void;\n unregisterHoverListener(listener: (evt: Event) => void): void;\n unregisterMenuFocusChangeEventListener(listener: (evt: CustomEvent<number>) => void): void;\n unregisterMenuListener(listener: (evt: CustomEvent) => void): void;\n unregisterMonthButtonListener(listener: (evt: Event) => void): void;\n unregisterNextButtonListener(listener: (evt: Event) => void): void;\n unregisterPreventFocusListener(listener: (evt: Event) => void): void;\n unregisterPreviousButtonListener(listener: (evt: Event) => void): void;\n unregisterTodayButtonListener(listener: (evt: Event) => void): void;\n unregisterYearButtonListener(listener: (evt: Event) => void): void;\n}\n\nexport class CalendarAdapter extends BaseAdapter<ICalendarComponent> implements ICalendarAdapter {\n private _container: HTMLElement;\n private _dateView: HTMLElement;\n private _dayRow: HTMLElement;\n private _dateGrid: HTMLElement;\n private _menu: ICalendarMenuComponent;\n\n constructor(component: ICalendarComponent) {\n super(component);\n this._container = getShadowElement(component, CALENDAR_CONSTANTS.selectors.CALENDAR);\n this._dateView = getShadowElement(component, CALENDAR_CONSTANTS.selectors.DATE_VIEW);\n this._dayRow = getShadowElement(component, CALENDAR_CONSTANTS.selectors.DAY_ROW);\n this._dateGrid = getShadowElement(component, CALENDAR_CONSTANTS.selectors.DATE_GRID);\n this._menu = getShadowElement(component, CALENDAR_CONSTANTS.selectors.MENU) as ICalendarMenuComponent;\n }\n\n public toggleContainerAttribute(hasAttribute: boolean, name: string, value?: string): void {\n toggleAttribute(this._container, hasAttribute, name, value);\n }\n\n public registerMonthButtonListener(listener: (evt: Event) => void): void {\n const monthButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.MONTH_BUTTON);\n monthButton?.addEventListener('click', listener);\n }\n\n public unregisterMonthButtonListener(listener: (evt: Event) => void): void {\n const monthButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.MONTH_BUTTON);\n monthButton?.removeEventListener('click', listener);\n }\n\n public registerYearButtonListener(listener: (evt: Event) => void): void {\n const yearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.YEAR_BUTTON);\n yearButton?.addEventListener('click', listener);\n }\n\n public unregisterYearButtonListener(listener: (evt: Event) => void): void {\n const yearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.YEAR_BUTTON);\n yearButton?.removeEventListener('click', listener);\n }\n\n public registerMenuListener(listener: (evt: CustomEvent<number>) => void): void {\n this._menu.addEventListener(CALENDAR_MENU_CONSTANTS.events.SELECT, listener);\n }\n\n public unregisterMenuListener(listener: (evt: CustomEvent<number>) => void): void {\n this._menu.removeEventListener(CALENDAR_MENU_CONSTANTS.events.SELECT, listener);\n }\n\n public registerMenuFocusChangeEventListener(listener: (evt: CustomEvent<number>) => void): void {\n this._menu.addEventListener(CALENDAR_MENU_CONSTANTS.events.FOCUS_CHANGE, listener);\n }\n\n public unregisterMenuFocusChangeEventListener(listener: (evt: CustomEvent<number>) => void): void {\n this._menu.addEventListener(CALENDAR_MENU_CONSTANTS.events.FOCUS_CHANGE, listener);\n }\n\n public registerNextButtonListener(listener: (evt: Event) => void): void {\n const nextButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.NEXT_BUTTON);\n nextButton?.addEventListener('click', listener);\n }\n\n public unregisterNextButtonListener(listener: (evt: Event) => void): void {\n const nextButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.NEXT_BUTTON);\n nextButton?.removeEventListener('click', listener);\n }\n\n public registerPreviousButtonListener(listener: (evt: Event) => void): void {\n const previousButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.PREVIOUS_BUTTON);\n previousButton?.addEventListener('click', listener);\n }\n\n public unregisterPreviousButtonListener(listener: (evt: Event) => void): void {\n const previousButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.PREVIOUS_BUTTON);\n previousButton?.removeEventListener('click', listener);\n }\n\n public registerClearButtonListener(listener: (evt: Event) => void): void {\n const clearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.CLEAR_BUTTON);\n clearButton?.addEventListener('click', listener);\n }\n\n public unregisterClearButtonListener(listener: (evt: Event) => void): void {\n const clearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.CLEAR_BUTTON);\n clearButton?.removeEventListener('click', listener);\n }\n\n public registerTodayButtonListener(listener: (evt: Event) => void): void {\n const todayButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.TODAY_BUTTON);\n todayButton?.addEventListener('click', listener);\n }\n\n public unregisterTodayButtonListener(listener: (evt: Event) => void): void {\n const todayButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.TODAY_BUTTON);\n todayButton?.removeEventListener('click', listener);\n }\n\n public registerDateClickListener(listener: (evt: Event) => void): void {\n this._dateGrid.addEventListener('click', listener);\n }\n\n public unregisterDateClickListener(listener: (evt: Event) => void): void {\n this._dateGrid.removeEventListener('click', listener);\n }\n\n public registerKeydownListener(listener: (evt: KeyboardEvent) => void): void {\n this._container.addEventListener('keydown', listener);\n }\n\n public registerHoverListener(listener: (evt: Event) => void): void {\n this._dateGrid.addEventListener('mouseover', listener);\n }\n\n public unregisterHoverListener(listener: (evt: Event) => void): void {\n this._dateGrid.removeEventListener('mouseover', listener);\n }\n\n public registerPreventFocusListener(listener: (evt: Event) => void): void {\n this._container.addEventListener('mousedown', listener);\n }\n\n public unregisterPreventFocusListener(listener: (evt: Event) => void): void {\n this._container.removeEventListener('mousedown', listener);\n }\n\n public setContainerClass(name: string, value: boolean): void {\n this._container.classList.toggle(name, value);\n }\n\n public setHeader(): void {\n const accessibleHeader = this._container.querySelector(CALENDAR_CONSTANTS.selectors.ACCESSIBLE_HEADER);\n accessibleHeader?.remove();\n\n const header = this._container.querySelector(CALENDAR_CONSTANTS.selectors.HEADER);\n if (header) {\n header.replaceWith(getHeader());\n } else {\n this._container.prepend(getHeader());\n }\n }\n\n public removeHeader(): void {\n const header = this._container.querySelector(CALENDAR_CONSTANTS.selectors.HEADER);\n header?.remove();\n\n const accessibleHeader = this._container.querySelector(CALENDAR_CONSTANTS.selectors.ACCESSIBLE_HEADER);\n if (accessibleHeader) {\n accessibleHeader.replaceWith(getAccessibleHeader());\n } else {\n this._container.prepend(getAccessibleHeader());\n }\n }\n\n public setNextButtonDisabled(value: boolean): void {\n const nextButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.NEXT_BUTTON);\n nextButton?.toggleAttribute('disabled', value);\n }\n\n public setPreviousButtonDisabled(value: boolean): void {\n const previousButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.PREVIOUS_BUTTON);\n previousButton?.toggleAttribute('disabled', value);\n }\n\n public setNextButtonLabel(label: string): void {\n const nextButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.NEXT_BUTTON);\n nextButton?.setAttribute('aria-label', label);\n\n const nextTooltip = this._container.querySelector(CALENDAR_CONSTANTS.selectors.NEXT_BUTTON_TOOLTIP);\n if (nextTooltip) {\n nextTooltip.innerHTML = label;\n }\n }\n\n public setPreviousButtonLabel(label: string): void {\n const previousButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.PREVIOUS_BUTTON);\n previousButton?.setAttribute('aria-label', label);\n\n const previousTooltip = this._container.querySelector(CALENDAR_CONSTANTS.selectors.PREVIOUS_BUTTON_TOOLTIP);\n if (previousTooltip) {\n previousTooltip.innerHTML = label;\n }\n }\n\n public setMonthButtonPressed(value: boolean): void {\n const monthButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.MONTH_BUTTON);\n if (monthButton) {\n monthButton.setAttribute('aria-pressed', value.toString());\n this._container.classList.toggle(CALENDAR_CONSTANTS.classes.MONTH_MENU_OPEN, value);\n }\n }\n\n public setYearButtonPressed(value: boolean): void {\n const yearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.YEAR_BUTTON);\n if (yearButton) {\n yearButton.setAttribute('aria-pressed', value.toString());\n this._container.classList.toggle(CALENDAR_CONSTANTS.classes.YEAR_MENU_OPEN, value);\n }\n }\n\n public setMonth(month: number, locale?: string): void {\n const monthButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.MONTH_BUTTON);\n if (monthButton) {\n const content = getMonthButtonContent(month, locale);\n monthButton.replaceChildren(content[0], content[1]);\n return;\n }\n\n const accessibleMonth = this._container.querySelector(CALENDAR_CONSTANTS.selectors.ACCESSIBLE_MONTH);\n if (accessibleMonth) {\n accessibleMonth.textContent = getLocalizedMonth(month, 'long', locale);\n }\n }\n\n public setYear(year: number, locale?: string): void {\n const yearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.YEAR_BUTTON);\n if (yearButton) {\n const content = getYearButtonContent(year, locale);\n yearButton.replaceChildren(content[0], content[1]);\n return;\n }\n\n const accessibleYear = this._container.querySelector(CALENDAR_CONSTANTS.selectors.ACCESSIBLE_YEAR);\n if (accessibleYear) {\n accessibleYear.textContent = getLocalizedYear(year, 'numeric', locale);\n }\n }\n\n public setFooter(): void {\n const footer = this._container.querySelector(CALENDAR_CONSTANTS.selectors.FOOTER);\n if (!footer) {\n this._container.appendChild(getFooter());\n }\n }\n\n public removeFooter(): void {\n const footer = this._container.querySelector(CALENDAR_CONSTANTS.selectors.FOOTER);\n footer?.parentNode?.removeChild(footer);\n }\n\n public setClearButton(): void {\n const footer = this._container.querySelector(CALENDAR_CONSTANTS.selectors.FOOTER);\n if (!footer) {\n return;\n }\n\n const clearButton = footer.querySelector(CALENDAR_CONSTANTS.selectors.CLEAR_BUTTON);\n if (!clearButton) {\n footer.prepend(getClearButton());\n }\n }\n\n public removeClearButton(): void {\n const clearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.CLEAR_BUTTON);\n clearButton?.parentNode?.removeChild(clearButton);\n }\n\n public setTodayButton(): void {\n const footer = this._container.querySelector(CALENDAR_CONSTANTS.selectors.FOOTER);\n if (!footer) {\n return;\n }\n\n const todayButton = footer.querySelector(CALENDAR_CONSTANTS.selectors.TODAY_BUTTON);\n if (!todayButton) {\n footer.appendChild(getTodayButton());\n }\n }\n\n public removeTodayButton(): void {\n const todayButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.TODAY_BUTTON);\n todayButton?.parentNode?.removeChild(todayButton);\n }\n\n public setDays(days: DayOfWeek[], options?: ICalendarDayOptions): void {\n removeAllChildren(this._dayRow);\n days.forEach(d => {\n let element = getDayElement(d, options?.locale);\n if (options?.builder) {\n element = options.builder(d, element);\n }\n this._dayRow.appendChild(element);\n });\n }\n\n public setDates(dates: ICalendarDateConfig[], options?: ICalendarDateOptions): void {\n removeAllChildren(this._dateGrid);\n splitIntoWeeks(dates).forEach((w, i) => {\n const dateRow = getDateRow(w, i, options);\n this._dateGrid.appendChild(dateRow);\n });\n }\n\n public replaceDate(date: ICalendarDateConfig, options?: ICalendarDateOptions): void {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(date.date)}`);\n if (dateElement) {\n const element = getDateElement(date, options?.locale);\n if (options?.builder) {\n dateElement.replaceWith(options.builder(date, element));\n } else {\n dateElement.replaceWith(element);\n }\n }\n }\n\n public replaceDateWithSpacer(date: Date): void {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n dateElement?.replaceWith(getDateSpacerElement(date));\n }\n\n public setDateDisabled(date: Date, value: boolean): void {\n const element = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (element) {\n element.toggleAttribute('disabled', value);\n element.setAttribute('aria-disabled', value.toString());\n }\n }\n\n public setDateSelected(date: Date, value: boolean): void {\n const element = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (element) {\n element.classList.toggle(CALENDAR_CONSTANTS.classes.DATE_SELECTED, value);\n element.setAttribute('aria-selected', value.toString());\n }\n }\n\n public setWeekend(date: Date, value: boolean): void {\n const element = this._dateGrid.querySelector(`#${getDateId(date)}`);\n const innerElement = element?.querySelector(CALENDAR_CONSTANTS.selectors.DATE_INNER);\n if (!innerElement) {\n return;\n }\n toggleOnAttribute(innerElement as HTMLElement, 'part', CALENDAR_CONSTANTS.parts.WEEKEND, value);\n }\n\n public appendDateAttribute(date: Date, name: string, value: string): void {\n const element = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (element) {\n appendToAttribute(element as HTMLElement, name, value);\n }\n }\n\n public setMultiple(value: boolean): void {\n this._dateView.setAttribute('aria-multiselectable', value.toString());\n }\n\n public setDateViewHidden(value: boolean): void {\n toggleAttribute(this._dateView, value, 'aria-hidden', value.toString());\n this.setAllDatesUnfocusable();\n }\n\n // #endregion\n\n // #region Range\n\n public setRange(dates: Date[] | null): void {\n const oldDateElements = this._dateGrid.querySelectorAll(CALENDAR_CONSTANTS.selectors.RANGE);\n oldDateElements.forEach(e => e.classList.remove(CALENDAR_CONSTANTS.classes.RANGE));\n\n if (!dates) {\n return;\n }\n\n dates.forEach(d => {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(d)}`);\n dateElement?.classList.add(CALENDAR_CONSTANTS.classes.RANGE);\n });\n }\n\n public setRangeStart(date: Date | null): void {\n const oldDateElement = this._dateGrid.querySelector(CALENDAR_CONSTANTS.selectors.RANGE_START);\n oldDateElement?.classList.remove(CALENDAR_CONSTANTS.classes.RANGE_START);\n\n if (!date) {\n return;\n }\n\n const newDateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n newDateElement?.classList.add(CALENDAR_CONSTANTS.classes.RANGE_START);\n }\n\n public setRangeEnd(date: Date | null): void {\n const oldDateElement = this._dateGrid.querySelector(CALENDAR_CONSTANTS.selectors.RANGE_END);\n oldDateElement?.classList.remove(CALENDAR_CONSTANTS.classes.RANGE_END);\n\n if (!date) {\n return;\n }\n\n const newDateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n newDateElement?.classList.add(CALENDAR_CONSTANTS.classes.RANGE_END);\n }\n\n public setActiveDate(date: Date, setFocus: boolean, preventFocus?: boolean): void {\n const dateString = date.toDateString();\n const elements = this._dateGrid.querySelectorAll(CALENDAR_CONSTANTS.selectors.DATE);\n elements.forEach(e => {\n const shouldFocus = e.getAttribute(CALENDAR_CONSTANTS.attributes.DATA_DATE) === dateString;\n setTabindexOnElement(e as HTMLElement, shouldFocus ? 0 : -1, setFocus, preventFocus);\n });\n }\n\n public setAllDatesUnfocusable(): void {\n const elements = this._dateGrid.querySelectorAll(CALENDAR_CONSTANTS.selectors.DATE);\n elements.forEach(e => setTabindexOnElement(e as HTMLElement, -1, false, true));\n }\n\n public setDateDescription(date: Date, value?: string): void {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (!dateElement) {\n return;\n }\n toggleAttribute(dateElement as HTMLElement, !!value, value as string);\n }\n\n public setDateTooltip(date: Date, value?: string): void {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (!dateElement) {\n return;\n }\n const tooltip = dateElement.querySelector(CALENDAR_CONSTANTS.selectors.TOOLTIP);\n if (tooltip) {\n if (value?.length) {\n tooltip.textContent = value;\n } else {\n tooltip.remove();\n }\n } else if (value?.length) {\n dateElement.prepend(getTooltip(value));\n }\n }\n\n public setEventWrapperOnDate(date: Date, value: boolean): void {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (!dateElement) {\n return;\n }\n const eventWrapper = dateElement.querySelector(CALENDAR_CONSTANTS.selectors.EVENT_WRAPPER);\n if (eventWrapper) {\n if (value) {\n removeAllChildren(eventWrapper);\n } else {\n eventWrapper.remove();\n }\n } else if (value) {\n dateElement.appendChild(getEventWrapperElement(date));\n }\n }\n\n public setEvent(event: ICalendarEvent, overflow?: boolean): void {\n const eventWrapper = this._dateGrid.querySelector(`#${getEventWrapperId(event.date)}`);\n eventWrapper?.appendChild(getEventElement(event, overflow));\n }\n\n public openMenuAsGrid(options: ICalendarMenuOption[], setFocus: boolean): void {\n this._menu.openAsGrid(options, setFocus);\n }\n\n public openMenuAsList(options: ICalendarMenuOption[], setFocus: boolean): void {\n this._menu.openAsList(options, setFocus);\n }\n\n public closeMenu(): void {\n this._menu.close();\n }\n\n public setMenuAnimation(value: CalendarMenuAnimationType): void {\n this._menu.animationType = value;\n }\n\n public animateIntoSelectionMenu(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus: boolean): void {\n this._menu.animateIn(options, direction, setFocus);\n }\n\n public moveMenuFocusDown(): void {\n this._menu.moveFocusDown();\n }\n\n public moveMenuFocusBackward(): boolean {\n return this._menu.moveFocusBackward();\n }\n\n public moveMenuFocusForward(): boolean {\n return this._menu.moveFocusForward();\n }\n\n public moveMenuFocusUp(): void {\n this._menu.moveFocusUp();\n }\n\n public selectFocusedMenuItem(): void {\n this._menu.selectFocusedItem();\n }\n\n public setPreventFocusOnMenu(value: boolean): void {\n this._menu.preventFocus = value;\n }\n}\n", "import { ICustomElementFoundation, isArray, isDefined, isValidDate } from '@tylertech/forge-core';\n\nimport { ICalendarDate, ICalendarDisabledDateParams, ICalendarFocusChangeEventData, ICalendarMenuMonthConfig, ICalendarMenuYearConfig, ICalendarNumberRange, CALENDAR_CONSTANTS, CalendarDisabledDateBuilder, CalendarEventBuilder, CalendarMode, CalendarMonthFocus, CalendarView, DayOfWeek, ICalendarDateSelectEventData, RangeSelectionState, CalendarDateBuilder, CalendarDayBuilder, CalendarDateSelectCallback, ICalendarEvent, CalendarTooltipBuilder, ICalendarDateConfig } from './calendar-constants';\nimport { isDisabled, isSelected, getAllYearOptions, getDateRangeFromDates, getDatesFromDateRange, getDatesInRange, getEventDescriptions, getEventsOnDate, getFirstDateOfWeek, getIndexOfDate, getLastDateOfWeek, getMinAndMaxDates, getMonthDates, getMonthOptions, getMultipleFromRange, getSortedDaysOfWeek, getYearOptions, isInMonth, isToday, parseYearRange, sortDates, coerceDateFromValue, shouldHandleEvent } from './calendar-utils';\nimport { getFirstDayOfWeekForLocale, getLocalizedMonth, getLocalizedYear, getWeekendDaysForLocale, isRtlLocale } from './calendar-locale-utils';\nimport { eventIncludesDate } from './calendar-dom-utils';\nimport { ICalendarAdapter } from './calendar-adapter';\nimport { DateRange } from './core/date-range';\nimport { ICalendarBase } from './core/calendar-base';\nimport { CalendarMenuAnimationType, ICalendarMenuOption } from './calendar-menu';\nimport { getLastDateOfMonth, getMonthLength, isSameDate } from '../core/utils/date-utils';\n\nexport interface ICalendarFoundation extends ICalendarBase, ICustomElementFoundation {\n mode: CalendarMode;\n view: CalendarView;\n preventFocus: boolean;\n selectionFollowsMonth: boolean;\n showHeader: boolean;\n menuAnimation: CalendarMenuAnimationType;\n clearButton: boolean;\n todayButton: boolean;\n clearCallback: (() => void) | undefined;\n todayCallback: (() => void) | undefined;\n tooltipBuilder: CalendarTooltipBuilder | undefined;\n clear(): void;\n today(): void;\n selectDate(date: Date, setFocus?: boolean): void;\n deselectDate(date: Date, setFocus?: boolean): void;\n toggleDate(date: Date, force?: boolean): void;\n goToDate(date: Date, setFocus?: boolean): void;\n setActiveDate(date: Date, setFocus?: boolean): boolean;\n handleExternalKeyEvent(evt: KeyboardEvent): void;\n layout(): void;\n}\n\nexport class CalendarFoundation implements ICalendarFoundation {\n // Dates\n private _dates: Date[] = [];\n private _month: number = new Date().getMonth();\n private _year: number = new Date().getFullYear();\n private _focusedDate: Date;\n private _showToday = true;\n private _showOtherMonths = false;\n private _fixedHeight = false;\n private _events: ICalendarEvent[] = [];\n private _dateBuilder: CalendarDateBuilder | undefined;\n private _dayBuilder: CalendarDayBuilder | undefined;\n private _tooltipBuilder: CalendarTooltipBuilder | undefined;\n private _eventBuilder: CalendarEventBuilder | undefined;\n \n // Selection\n private _value: Date[] = [];\n private _mode: CalendarMode = 'single';\n private _readonly = false;\n private _selectionFollowsMonth = false;\n private _dateSelectCallback: CalendarDateSelectCallback | undefined;\n\n // Range\n private _rangeSelectionStore: DateRange | undefined; // Temporarily set when a date range is set as the value, to maintain to and from\n private _rangeSelectionState: RangeSelectionState = 'none';\n private _allowSingleDateRange = true;\n\n // Disabled dates\n private _min: Date | null = null;\n private _max: Date | null = null;\n private _minAttribute: string | null = null;\n private _maxAttribute: string | null = null;\n private _disabledDates: Date[] = [];\n private _disabledDaysOfWeek: DayOfWeek[] = [];\n private _constrainToEnabled = true;\n private _disabledDateBuilder: CalendarDisabledDateBuilder | undefined;\n\n // Header and footer\n private _showHeader = true;\n private _clearButton = false;\n private _todayButton = false;\n private _clearCallback: (() => void) | undefined;\n private _todayCallback: (() => void) | undefined;\n \n // Menu\n private _view: CalendarView = 'date';\n private _menuAnimation: CalendarMenuAnimationType = 'scale';\n private _menuYear: number | null = null;\n private _listYears = true;\n private _menuIncludedYear: number = new Date().getFullYear();\n private _menuYearsInView: ICalendarNumberRange | null = null;\n private _yearRange = `-${CALENDAR_CONSTANTS.numbers.DEFAULT_MIN_YEAR_OFFSET}:+${CALENDAR_CONSTANTS.numbers.DEFAULT_MAX_YEAR_OFFSET}`;\n private _minYear: number; // This and _maxYear will be set in the initializer\n private _maxYear: number;\n\n // Localization\n private _locale: string | undefined;\n private _firstDayOfWeek: DayOfWeek | undefined;\n private _weekendDays: DayOfWeek[] | null = null;\n private _localeFirstDayOfWeek: DayOfWeek = DayOfWeek.Sunday;\n private _localeWeekendDays: DayOfWeek[] = [];\n private _rtl = false;\n\n // Core\n private _preventFocus = false;\n private _isInitialized = false;\n \n // Listeners\n private _clearButtonListener: (evt: Event) => void;\n private _dateClickListener: (evt: Event) => void;\n private _hoverListener: (evt: Event) => void;\n private _keydownListener: (evt: KeyboardEvent) => void;\n private _menuFocusChangeListener: (evt: CustomEvent<number>) => void;\n private _menuListener: (evt: CustomEvent<number>) => void;\n private _monthButtonListener: (evt: Event) => void;\n private _nextButtonListener: (evt: Event) => void;\n private _preventFocusListener: (evt: Event) => void;\n private _previousButtonListener: (evt: Event) => void;\n private _todayButtonListener: (evt: Event) => void;\n private _yearButtonListener: (evt: Event) => void;\n\n constructor(private _adapter: ICalendarAdapter) {\n this._clearButtonListener = () => this._onClearClicked();\n this._dateClickListener = evt => this._onDateClick(evt);\n this._keydownListener = evt => this._onKeydown(evt);\n this._hoverListener = evt => this._onHover(evt);\n this._menuFocusChangeListener = evt => this._onMenuFocusChange(evt);\n this._menuListener = evt => this._onMenuSelect(evt);\n this._monthButtonListener = () => this._onMonthButtonClicked();\n this._nextButtonListener = () => this._onNextButtonClicked();\n this._preventFocusListener = evt => evt.preventDefault();\n this._previousButtonListener = () => this._onPreviousButtonClicked();\n this._todayButtonListener = () => this._onTodayClicked();\n this._yearButtonListener = () => this._onYearButtonClicked();\n }\n\n public initialize(): void {\n this._adapter.registerMenuListener(this._menuListener);\n this._adapter.registerMenuFocusChangeEventListener(this._menuFocusChangeListener);\n this._adapter.registerKeydownListener(this._keydownListener);\n this._applyMin();\n this._applyMax();\n this._applyFixedHeight();\n this._applyReadOnly();\n this._applyShowToday();\n this._applyPreventFocus();\n this._applyShowHeader();\n this._applyMonth();\n this._applyYear();\n this._applyListYears();\n this._applyMenuAnimation();\n this._applyLocale();\n this._applyClearButton();\n this._applyTodayButton();\n this._applyFirstDayOfWeek();\n this._applyShowOtherMonths();\n this._createDateView();\n this._applyConstrainToEnabled();\n this._applyAllowSingleDateRange();\n this._applyMode();\n this._applyYearRange();\n this._applySelectionFollowsMonth();\n\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n this._isInitialized = false;\n }\n\n private _onMonthButtonClicked(): void {\n this._toggleMonthMenu();\n }\n\n private _toggleMonthMenu(setFocus = false): void {\n if (this._view !== 'month') {\n this._openMonthMenu(setFocus);\n } else {\n this._closeMenu(false, setFocus);\n }\n }\n\n private _onYearButtonClicked(): void {\n this._toggleYearMenu();\n }\n\n private _toggleYearMenu(setFocus = false): void {\n if (this._view !== 'year') {\n this._openYearMenu(setFocus);\n } else {\n this._closeMenu(false, setFocus);\n }\n }\n\n private _onMenuFocusChange(evt: CustomEvent<number>): void {\n this._emitFocusChangeEvent(evt.detail);\n }\n\n private _onMenuSelect(evt: CustomEvent<number>): void {\n switch (this._view) {\n case 'month':\n this._onMonthSelected(evt.detail);\n break;\n case 'year':\n this._onYearSelected(evt.detail);\n break;\n }\n }\n\n private _onNextButtonClicked(): void {\n if (this._view === 'date') {\n this._goToNextMonth();\n this._setFocusInMonth(CalendarMonthFocus.First, false);\n } else if (this._view === 'month') {\n this._goToNextYear();\n } else {\n this._goToNextSetOfYears();\n }\n }\n\n private _onPreviousButtonClicked(): void {\n if (this._view === 'date') {\n this._goToPreviousMonth();\n this._setFocusInMonth(CalendarMonthFocus.Last, false);\n } else if (this._view === 'month') {\n this._goToPreviousYear();\n } else {\n this._goToPreviousSetOfYears();\n }\n }\n\n private _onHover(evt: Event): void {\n if (this._mode === 'range') {\n const element = eventIncludesDate(evt, false);\n if (!element) {\n return;\n }\n const date = new Date(Date.parse(element.getAttribute(CALENDAR_CONSTANTS.attributes.DATA_DATE) as string));\n if (isInMonth(date, this._month, this._year)) {\n this._setRangePreview(date);\n }\n }\n }\n\n private _onDateClick(evt: Event): void {\n const element = eventIncludesDate(evt, false);\n if (!element) {\n return;\n }\n const dateString = element.getAttribute(CALENDAR_CONSTANTS.attributes.DATA_DATE);\n if (!dateString) {\n return;\n }\n const date = new Date(dateString);\n if (isInMonth(date, this._month, this._year)) {\n // Move the tab index to this date\n this._focusedDate = date;\n this._beforeDateSelected(date);\n }\n this._resumeTabindexOnDate(false);\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n switch(evt.key) {\n case 'ArrowLeft':\n case 'ArrowRight':\n case 'ArrowUp':\n case 'ArrowDown':\n this._handleArrowKey(evt);\n break;\n case 'Home':\n case 'End':\n case 'PageUp':\n case 'PageDown':\n this._handleNavigationKey(evt);\n break;\n case ' ':\n case 'Enter':\n this._handleEnterOrSpaceKey(evt);\n break;\n case 'm':\n case 'M':\n evt.preventDefault();\n this._toggleMonthMenu(true);\n break;\n case 'y':\n case 'Y':\n evt.preventDefault();\n this._toggleYearMenu(true);\n break;\n case 't':\n case 'T':\n case 'n':\n case 'N':\n evt.preventDefault();\n this.today();\n break;\n case 'Delete':\n case 'Backspace':\n evt.preventDefault();\n this._deselectAllDates();\n break;\n case 'Escape':\n if (this._view !== 'date') {\n evt.preventDefault();\n evt.stopPropagation();\n this._closeMenu(false, true);\n }\n break;\n }\n }\n\n /**\n * Runs locale specific logic to handle focus on an arrow key event.\n * @param evt A keyboard event containing an arrow key\n */\n private _handleArrowKey(evt: KeyboardEvent): void {\n if (!shouldHandleEvent(evt, this._view, this._preventFocus)) {\n return;\n }\n\n evt.preventDefault();\n let direction: 'next' | 'previous' | 'up' | 'down' | undefined;\n switch(evt.key) {\n case 'ArrowLeft':\n direction = this._rtl ? 'next' : 'previous';\n break;\n case 'ArrowRight':\n direction = this._rtl ? 'previous' : 'next';\n break;\n case 'ArrowUp':\n direction = 'up';\n break;\n case 'ArrowDown':\n direction = 'down';\n break;\n }\n\n switch(direction) {\n case 'previous':\n if (this._view === 'date') {\n this._moveFocusToPreviousDate(true);\n } else if (!this._adapter.moveMenuFocusBackward() && this._canGoBackward()) {\n if (this._view === 'month') {\n this._goToPreviousYear(true);\n } else {\n this._goToPreviousSetOfYears(true);\n }\n }\n break;\n case 'next':\n if (this._view === 'date') {\n this._moveFocusToNextDate(true);\n } else if (!this._adapter.moveMenuFocusForward() && this._canGoForward()) {\n if (this._view === 'month') {\n this._goToNextYear(true);\n } else {\n this._goToNextSetOfYears(true);\n }\n }\n break;\n case 'up':\n if (this._view === 'date') {\n this._moveFocusToPreviousWeek(true);\n } else {\n this._adapter.moveMenuFocusUp();\n }\n break;\n case 'down':\n if (this._view === 'date') {\n this._moveFocusToNextWeek(true);\n } else {\n this._adapter.moveMenuFocusDown();\n }\n break;\n }\n\n if (this._mode === 'range') {\n this._setRangePreview(this._focusedDate);\n }\n }\n\n /** Moves between months and years if allowed.\n * @param evt A keyboard evt containing the page up, page down, home, or end key\n */\n private _handleNavigationKey(evt: KeyboardEvent): void {\n evt.preventDefault();\n switch(evt.key) {\n case 'Home':\n if (this._view !== 'date') {\n break;\n }\n if (evt.shiftKey) {\n this._moveFocusToFirstOfMonth(true);\n } else {\n this._moveFocusToFirstOfWeek(true);\n }\n break;\n case 'End':\n if (this._view !== 'date') {\n break;\n }\n if (evt.shiftKey) {\n this._moveFocusToLastOfMonth(true);\n } else {\n this._moveFocusToLastOfWeek(true);\n }\n break;\n case 'PageUp':\n if (this._view === 'date') {\n if (evt.shiftKey) {\n\n this._moveFocusToPreviousYear(true);\n } else {\n this._moveFocusToPreviousMonth(true);\n }\n } else if (this._view === 'month' && !evt.shiftKey && this._canGoBackward()) {\n this._goToPreviousYear(true);\n } else if (this._view === 'year' && !evt.shiftKey && this._canGoBackward()) {\n this._goToPreviousSetOfYears(true);\n }\n break;\n case 'PageDown':\n if (this._view === 'date') {\n if (evt.shiftKey) {\n this._moveFocusToNextYear(true);\n } else {\n this._moveFocusToNextMonth(true);\n }\n } else if (this._view === 'month' && !evt.shiftKey && this._canGoForward()) {\n this._goToNextYear(true);\n } else if (this._view === 'year' && !evt.shiftKey && this._canGoForward()) {\n this._goToNextSetOfYears(true);\n }\n break;\n }\n }\n\n /**\n * Selects or deselects the focused date or menu option if allowed.\n * @param evt A keyboard event containing the enter or space key\n */\n private _handleEnterOrSpaceKey(evt: KeyboardEvent): void {\n if (!shouldHandleEvent(evt, this._view, this._preventFocus)) {\n return;\n }\n\n evt.preventDefault();\n switch(this._view) {\n case 'date':\n if (this._readonly) {\n break;\n }\n this._setSelectOnFocusedDate();\n break;\n case 'month':\n case 'year':\n this._adapter.selectFocusedMenuItem();\n break;\n }\n }\n\n private _onMonthSelected(month: number): void {\n const yearChanged = this._year !== this._menuYear;\n if (yearChanged && this._menuYear != null) {\n this._year = this._menuYear;\n this._setYear();\n }\n this._month = month;\n this._setMonth(true);\n this._trySetValueMonthAndYear(this._month, this._year, 'month');\n this._closeMenu(true);\n }\n\n private _onYearSelected(year: number): void {\n this._year = year;\n this._setYear(true);\n this._trySetValueMonthAndYear(this._month, this._year, 'year');\n this._closeMenu(true);\n }\n\n private _onClearClicked(): void {\n this.clear();\n }\n\n private _onTodayClicked(): void {\n this.today();\n }\n\n /** Attempts to the month and year of the value in single mode, then emits a selection event */\n private _trySetValueMonthAndYear(month: number, year: number, type: CalendarView = 'date'): void {\n if (!this.selectionFollowsMonth || this._mode !== 'single' || !this._value?.length) {\n return;\n }\n\n const newDate = new Date(this._value[0]);\n const lastDay = getMonthLength(month, year);\n newDate.setDate(Math.min(newDate.getDate(), lastDay));\n newDate.setFullYear(year);\n newDate.setMonth(month);\n\n if (isDisabled(newDate, this._getDisabledDateParams())) {\n return;\n }\n\n this._beforeDateSelected(newDate, type);\n }\n\n /** Sets initial date tabindex and focus to today or the first enabled date in view */\n private _setInitialDateFocus(setFocus = false): void {\n const today = new Date();\n if (isInMonth(today, this._month, this._year) && !isDisabled(today, this._getDisabledDateParams(false))) {\n this._setFocusedDate(today, setFocus);\n return;\n }\n const firstDay = new Date(this._year, this._month, 1);\n this._setFocusedDate(this._getNextEnabledDate(firstDay, 1, false, true, true), setFocus);\n }\n\n /** Attempts to move the tabindex to the most recently focused date, returning whether the date was found in view */\n private _resumeTabindexOnDate(setFocus: boolean): boolean {\n if (isInMonth(this._focusedDate, this._month, this._year)) {\n this._adapter.setActiveDate(this._focusedDate, setFocus, this._preventFocus);\n this._emitFocusChangeEvent(this._focusedDate);\n return true;\n }\n return false;\n }\n\n /** Moves the tabindex to the next date */\n private _moveFocusToNextDate(setFocus: boolean): void {\n this._setFocusedDate(this._getNextEnabledDate(this._focusedDate), setFocus);\n }\n\n /** Moves the tabindex to the previous date */\n private _moveFocusToPreviousDate(setFocus: boolean): void {\n this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate), setFocus);\n }\n\n /** Moves the tabindex to the next week */\n private _moveFocusToNextWeek(setFocus: boolean): void {\n this._setFocusedDate(this._getNextEnabledDate(this._focusedDate, 7, true), setFocus);\n }\n\n /** Moves the tabindex to the previous week */\n private _moveFocusToPreviousWeek(setFocus: boolean): void {\n this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate, 7, true), setFocus);\n }\n\n /** Moves the tabindex to the first selectable date of the week containing the current tabindex */\n private _moveFocusToFirstOfWeek(setFocus: boolean): void {\n this._setFocusedDate(this._getFirstEnabledDayOfWeek(this._focusedDate, true), setFocus);\n }\n\n /** Moves the tabindex to the last selectable date of the week containing the current tabindex */\n private _moveFocusToLastOfWeek(setFocus: boolean): void {\n this._setFocusedDate(this._getLastEnabledDayOfWeek(this._focusedDate, true), setFocus);\n }\n\n /** Moves the tabindex to the first date of the month */\n private _moveFocusToFirstOfMonth(setFocus: boolean): void {\n const firstOfMonth = new Date(this._year, this._month, 1);\n this._setFocusedDate(this._getNextEnabledDate(firstOfMonth, 1, false, true), setFocus);\n }\n\n /** Moves the tabindex to the last date of the month */\n private _moveFocusToLastOfMonth(setFocus: boolean): void {\n const lastOfMonth = new Date(this._year, this._month + 1, 0);\n this._setFocusedDate(this._getPreviousEnabledDate(lastOfMonth, 1, false, true), setFocus);\n }\n\n /** Moves the tabindex to the same day and week of the next month */\n private _moveFocusToNextMonth(setFocus: boolean): void {\n const index = getIndexOfDate(this._focusedDate, this._dates);\n const destinationMonth = (this._month + 1) % 12;\n const destinationYear = destinationMonth === 0 ? this._year + 1 : this._year;\n this._setFocusedDate(this._getDateAtIndexInMonth(index, destinationMonth, destinationYear), setFocus);\n }\n\n /** Moves the tabindex to the same day and week of the previous month */\n private _moveFocusToPreviousMonth(setFocus: boolean): void {\n const index = getIndexOfDate(this._focusedDate, this._dates);\n const destinationMonth = this._month === 0 ? 11 : this._month - 1;\n const destinationYear = destinationMonth === 11 ? this._year - 1 : this._year;\n this._setFocusedDate(this._getDateAtIndexInMonth(index, destinationMonth, destinationYear), setFocus);\n }\n\n /** Moves the tabindex to the same day, week, and month of the next year */\n private _moveFocusToNextYear(setFocus: boolean): void {\n const index = getIndexOfDate(this._focusedDate, this._dates);\n this._setFocusedDate(this._getDateAtIndexInMonth(index, this._month, this._year + 1), setFocus);\n }\n\n /** Moves the tabindex to the same day, week, and month of the previous year */\n private _moveFocusToPreviousYear(setFocus: boolean): void {\n const index = getIndexOfDate(this._focusedDate, this._dates);\n this._setFocusedDate(this._getDateAtIndexInMonth(index, this._month, this._year - 1), setFocus);\n }\n\n /** Sets the focusable date when a new month comes into view */\n private _setFocusInMonth(focus: CalendarMonthFocus, setFocus: boolean): void {\n switch (focus) {\n case CalendarMonthFocus.First:\n this._moveFocusToFirstOfMonth(setFocus);\n break;\n case CalendarMonthFocus.Last:\n this._moveFocusToLastOfMonth(setFocus);\n break;\n default:\n this._resumeTabindexOnDate(setFocus);\n break;\n }\n }\n\n /** Selects or deselects the focused date */\n private _setSelectOnFocusedDate(): void {\n if (isInMonth(this._focusedDate, this._month, this._year) && !isDisabled(this._focusedDate, this._getDisabledDateParams(false))) {\n this._beforeDateSelected(this._focusedDate);\n }\n }\n\n /** Emits a focus change event */\n private _emitFocusChangeEvent(value: Date | number): void {\n const eventData: Partial<ICalendarFocusChangeEventData> = {\n type: this._view,\n value\n };\n switch (this._view) {\n case 'date':\n eventData.selected = isSelected(value as Date, this._value);\n eventData.text = (value as Date).toLocaleDateString(this.locale, {month: 'long', day: '2-digit', year: 'numeric'});\n break;\n case 'month':\n eventData.selected = this._month === value;\n eventData.text = getLocalizedMonth(value as number, 'long');\n break;\n case 'year':\n eventData.selected = this._year === value;\n eventData.text = getLocalizedYear(value as number, 'numeric');\n break;\n }\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.FOCUS_CHANGE, eventData);\n }\n\n /**\n * Finds the previous enabled date.\n * @param start The date to search backward from\n * @param step A number of dates to skip at each step, defaults to 1\n * @param stepOnce Whether to use the step amount once and then continue sequentially, defaults to false\n * @param includeStart Whether to first check and potentially return the start date, defaults to false\n * @returns The previous enabled date or null if none found\n */\n private _getPreviousEnabledDate(start: Date, step = 1, stepOnce = false, includeStart = false, inMonth = false): Date | null {\n const disabledParams = this._getDisabledDateParams();\n const current = new Date(start);\n if (includeStart && !isDisabled(current, disabledParams)) {\n return current;\n }\n\n const month = start.getMonth();\n let outsideBounds = false;\n do {\n current.setDate(current.getDate() - step);\n if (stepOnce) {\n step = 1;\n }\n if ((inMonth && current.getMonth() !== month) || (this._min && current < this._min)) {\n outsideBounds = true;\n }\n } while (!outsideBounds && isDisabled(current, disabledParams));\n return outsideBounds ? null : current;\n }\n\n /**\n * Finds the previous enabled date.\n * @param start The date to search forward from\n * @param step A number of dates to skip at each step, defaults to 1\n * @param stepOnce Whether to use the step amount once and then continue sequentially, defaults to false\n * @param includeStart Whether to first check and potentially return the start date, defaults to false\n * @returns The next enabled date or null if none found\n */\n private _getNextEnabledDate(start: Date, step = 1, stepOnce = false, includeStart = false, inMonth = false): Date | null {\n const disabledParams = this._getDisabledDateParams();\n const current = new Date(start);\n if (includeStart && !isDisabled(current, disabledParams)) {\n return current;\n }\n\n const month = start.getMonth();\n let outsideBounds = false;\n do {\n current.setDate(current.getDate() + step);\n if (stepOnce) {\n step = 1;\n }\n if ((inMonth && current.getMonth() !== month) || (this._max && current > this._max)) {\n outsideBounds = true;\n }\n } while (!outsideBounds && isDisabled(current, disabledParams));\n return outsideBounds ? null : current;\n }\n\n /**\n * Finds the closest enabled date.\n * @param start The date to begin searching from\n * @param includeStart Whether to first check and potentially return the start date, defaults to false\n * @returns The closest enabled date or null if none found\n */\n private _getClosestEnabledDate(start: Date, inMonth = false, includeStart = false): Date | null {\n if (this._min && start < this._min) {\n return this._getFirstEnabledDate();\n } else if (this._max && start > this._max) {\n return this._getLastEnabledDate();\n }\n\n const disabledParams = this._getDisabledDateParams();\n if (includeStart && !isDisabled(start, disabledParams)) {\n return new Date(start);\n }\n const startDate = start.getDate();\n let current: Date;\n let overMax = false;\n let underMin = false;\n let index = 1;\n while (!overMax || !underMin) {\n if (!overMax) {\n current = new Date(start);\n current.setDate(startDate + index);\n overMax = !isInMonth(current, start.getMonth(), start.getFullYear());\n if (!overMax && !isDisabled(current, disabledParams)) {\n return current;\n } else if (this._max && current > this._max) {\n overMax = true;\n }\n }\n if (!underMin) {\n current = new Date(start);\n current.setDate(startDate - index);\n underMin = !isInMonth(current, start.getMonth(), start.getFullYear());\n if (!underMin && !isDisabled(current, disabledParams)) {\n return current;\n } else if (this._min && current < this._min) {\n underMin = true;\n }\n }\n index += 1;\n }\n return null;\n }\n\n /**\n * Finds the first enabled date of a week.\n * @param date A date that falls in the requested week\n * @returns The first enabled date of the week or null if none found\n */\n private _getFirstEnabledDayOfWeek(date: Date, inMonth = true): Date | null {\n const current = getFirstDateOfWeek(date);\n const disabledParams = this._getDisabledDateParams(inMonth ? current.getMonth() !== date.getMonth() || current.getFullYear() !== date.getFullYear() : undefined);\n let index = 0;\n while (index < 7 && isDisabled(current, disabledParams)) {\n current.setDate(current.getDate() + 1);\n disabledParams.otherMonth = inMonth ? current.getMonth() !== date.getMonth() || current.getFullYear() !== date.getFullYear() : undefined;\n index += 1;\n }\n return index < 7 ? current : null;\n }\n\n /**\n * Finds the last enabled date of a week.\n * @param date A date that falls in the requested week\n * @returns The last enabled date of the week or null if none found\n */\n private _getLastEnabledDayOfWeek(date: Date, inMonth = true): Date | null {\n const current = getLastDateOfWeek(date);\n const disabledParams = this._getDisabledDateParams(inMonth ? current.getMonth() !== date.getMonth() || current.getFullYear() !== date.getFullYear() : undefined);\n let index = 0;\n while (index < 7 && isDisabled(current, disabledParams)) {\n current.setDate(current.getDate() - 1);\n disabledParams.otherMonth = inMonth ? current.getMonth() !== date.getMonth() || current.getFullYear() !== date.getFullYear() : undefined;\n index += 1;\n }\n return index < 7 ? current : null;\n }\n\n /**\n * Finds an enabled date with the same index in another month, skipping forward or back one week if that date falls in an adjacent month.\n * @param index The index to look up\n * @param month The month to look up\n * @param year The year of the month\n * @returns An enabled date with the same index plus or minus a week, the nearest enabled date, or null if no enabled date was found\n */\n private _getDateAtIndexInMonth(index: number, month: number, year: number): Date | null {\n const monthDates = getMonthDates(month, year, this._firstDayOfWeek ?? this._localeFirstDayOfWeek);\n // If outside the min or max date pick the first or last enabled date\n if (this._min && monthDates[index] < this._min) {\n return this._getFirstEnabledDate();\n } else if (this._max && monthDates[index] > this._max) {\n return this._getLastEnabledDate();\n }\n\n // If the index is in another month go forward or back a week based on which half of the month the index is nearest\n if (isInMonth(monthDates[index], month, year)) {\n return this._getClosestEnabledDate(monthDates[index], true);\n }\n return index < 20 ? this._getNextEnabledDate(monthDates[index], 7, true) : this._getPreviousEnabledDate(monthDates[index], 7, true);\n }\n\n /**\n * Finds the first enabled date.\n * @returns This first enabled date or null if a min date isn't set\n */\n private _getFirstEnabledDate(): Date | null {\n if (!this._min) {\n return null;\n }\n return this._getNextEnabledDate(this._min, 1, false, true);\n }\n\n /**\n * Finds the last enabled date.\n * @returns This last enabled date or null if a max date isn't set\n */\n private _getLastEnabledDate(): Date | null {\n if (!this._max) {\n return null;\n }\n return this._getPreviousEnabledDate(this._max, 1, false, true);\n }\n\n /**\n * Moves the month in view to a date, sets focus on the date, and emits a focus change event.\n * @param date The date to focus or null if focus should not move\n * @param setFocus Whether to truly focus the date element versus just setting its tabindex\n * @returns Void\n */\n private _setFocusedDate(date: Date | null, setFocus: boolean): void {\n if (!date) {\n return;\n }\n const monthChanged = this._month !== date.getMonth();\n const yearChanged = this._year !== date.getFullYear();\n if (monthChanged || yearChanged) {\n if (monthChanged) {\n this._month = date.getMonth();\n this._setMonth();\n }\n if (yearChanged) {\n this._year = date.getFullYear();\n this._setYear();\n }\n this._resetDateGrid();\n }\n this._focusedDate = date;\n this._adapter.setActiveDate(this._focusedDate, setFocus, this._preventFocus);\n this._emitFocusChangeEvent(this._focusedDate);\n }\n\n /**\n * Gets disabled date params.\n * @param otherMonth Whether the date is outside the month in view - only set if needed\n * @returns An ICalendarDisabledDateParams object\n */\n private _getDisabledDateParams(otherMonth?: boolean): ICalendarDisabledDateParams {\n return {\n builder: this._disabledDateBuilder,\n disabledDates: this._disabledDates,\n disabledDaysOfWeek: this._disabledDaysOfWeek,\n maxDate: this._max,\n minDate: this._min,\n otherMonth\n };\n }\n\n /**\n * Builds dates for the period in view, sets them to the DOM, and enables focus on one of them.\n */\n private _createDateView(): void {\n this._resetDateGrid();\n if (!this._focusedDate || !this._resumeTabindexOnDate(false)) {\n this._setInitialDateFocus();\n }\n }\n\n /**\n * Initiates month navigation and opens the month menu on the year in view.\n */\n private _openMonthMenu(setFocus = false): void {\n this._view = 'month';\n if (this._menuYear == null) {\n this._menuYear = this._year;\n }\n if (this._showHeader) {\n this._setNavButtonLabels();\n this._adapter.setMonthButtonPressed(true);\n this._adapter.setYearButtonPressed(false);\n }\n this._adapter.openMenuAsGrid(this._getMonthsForMenu(), setFocus);\n this._adapter.setDateViewHidden(true);\n this._setNavigationButtonStates();\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.VIEW_CHANGE, this._view);\n }\n\n /**\n * Initiates year navigation and opens the year menu.\n */\n private _openYearMenu(setFocus = false): void {\n this._view = 'year';\n this._menuIncludedYear = this._menuYear ?? this._year;\n if (this._showHeader) {\n this._setNavButtonLabels();\n this._adapter.setMonthButtonPressed(false);\n this._adapter.setYearButtonPressed(true);\n }\n if (this._listYears) {\n this._adapter.openMenuAsList(this._getYearsForMenu(), setFocus);\n } else {\n this._adapter.openMenuAsGrid(this._getYearsForMenu(), setFocus);\n }\n this._adapter.setDateViewHidden(true);\n this._setNavigationButtonStates();\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.VIEW_CHANGE, this._view);\n }\n\n /**\n * Gets the months to display in the menu.\n * @returns An array of ICalendarMenuOptions containing months\n */\n private _getMonthsForMenu(): ICalendarMenuOption[] {\n const config: ICalendarMenuMonthConfig = {\n locale: this._locale,\n max: this._max,\n min: this._min,\n selectedMonth: this._year === this._menuYear ? this._month : -1,\n selectedYear: this._menuYear ?? this._year\n };\n return getMonthOptions(config);\n }\n\n /**\n * Gets the years to display in the menu, either a slice of visible years or all possible years.\n * @returns An array of ICalendarMenuOptions containing years\n */\n private _getYearsForMenu(): ICalendarMenuOption[] {\n const min = this._min ? this._min.getFullYear() : this._minYear;\n const max = this._max ? this._max.getFullYear() : this._maxYear;\n\n const config: ICalendarMenuYearConfig = {\n locale: this._locale,\n max,\n min,\n selectedYear: this._year,\n yearInView: this._menuIncludedYear\n };\n const options = this._listYears ? getAllYearOptions(config) : getYearOptions(config);\n this._menuYearsInView = { min: options[0].value, max: options[options.length - 1].value };\n return options;\n }\n\n /**\n * Closes the menu and reapplies labels and focus for the date view.\n * @param valueSelected Whether the user made a selection that requires the date view to be rebuilt\n */\n private _closeMenu(valueSelected?: boolean, setFocus = false): void {\n this._view = 'date';\n this._menuYear = null;\n this._adapter.closeMenu();\n this._adapter.setDateViewHidden(false);\n this._adapter.setYear(this._year, this._locale);\n if (valueSelected) {\n this._resetDateGrid();\n }\n if (this._showHeader) {\n this._setNavButtonLabels();\n this._setNavigationButtonStates();\n this._adapter.setMonthButtonPressed(false);\n this._adapter.setYearButtonPressed(false);\n }\n if (!this._resumeTabindexOnDate(setFocus)) {\n this._setInitialDateFocus(setFocus);\n }\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.VIEW_CHANGE, this._view);\n }\n\n /**\n * Sets the labels on the previous and next buttons appropriate for the view.\n */\n private _setNavButtonLabels(): void {\n switch(this._view) {\n case 'date':\n this._adapter.setPreviousButtonLabel('Previous month');\n this._adapter.setNextButtonLabel('Next month');\n break;\n case 'month':\n this._adapter.setPreviousButtonLabel('Previous year');\n this._adapter.setNextButtonLabel('Next year');\n break;\n case 'year':\n this._adapter.setPreviousButtonLabel('Previous years');\n this._adapter.setNextButtonLabel('Next years');\n break;\n }\n }\n\n /**\n * Rebuilds all dates and resets the date grid.\n * */\n private _resetDateGrid(): void {\n this._dates = getMonthDates(this._month, this._year, this._firstDayOfWeek ?? this._localeFirstDayOfWeek);\n\n const dateConfigs: ICalendarDateConfig[] = this._dates.map(d => this._getDateConfig(d));\n this._adapter.setDates(dateConfigs, { builder: this._dateBuilder, locale: this._locale, showOtherMonths: this._showOtherMonths});\n\n this._setNavigationButtonStates();\n this._applyWeekendDays();\n this._applyEvents();\n\n if (this._mode === 'range') {\n this._adapter.setRangeStart(this._value[0]);\n this._setRangePreview();\n }\n }\n\n /**\n * Creates a date config object from the given date.\n * @param date The date\n * @returns A date config\n */\n private _getDateConfig(date: Date): ICalendarDateConfig {\n const thisMonth = isInMonth(date, this._month, this._year);\n const config: ICalendarDateConfig = {\n date: new Date(date),\n selected: isSelected(date, this._value),\n today: isToday(date),\n thisMonth,\n disabled: isDisabled(date, this._getDisabledDateParams(!thisMonth))\n };\n return config;\n }\n\n /**\n * Creates a calendar date object from the given date.\n * @param date The date\n * @returns A calendar date object\n */\n private _getCalendarDate(date: Date): ICalendarDate {\n return {\n date: new Date(date),\n selected: isSelected(date, this._value),\n events: getEventsOnDate(date, this._events, this._eventBuilder)\n };\n }\n\n /**\n * Sets events to display on a date in the DOM, including overflow and tooltips.\n * @param date The date to set events on\n */\n private _setEventsOnDate(date: Date): void {\n if (!this._showOtherMonths && !isInMonth(date, this._month, this._year)) {\n this._adapter.setEventWrapperOnDate(date, false);\n return;\n }\n\n const events: ICalendarEvent[] = getEventsOnDate(date, this._events, this._eventBuilder);\n this._adapter.setEventWrapperOnDate(date, !!events.length);\n events.forEach((e, i) => {\n if (i > 2) {\n return;\n }\n this._adapter.setEvent(e, i === 2 && events.length > 3);\n });\n let description = events.length ? getEventDescriptions(events) : '';\n if (this._tooltipBuilder) {\n description = this._tooltipBuilder(this._getCalendarDate(date), description) ?? '';\n }\n this._adapter.setDateTooltip(date, description);\n }\n\n /**\n * Provides a hook to intercept date selection events.\n * @param date The date that was selected\n * */\n private _beforeDateSelected(date: Date, type: CalendarView = 'date'): void {\n if (this._dateSelectCallback) {\n Promise.resolve(this._dateSelectCallback(this._getCalendarDate(date))).then(res => {\n if (res) {\n this._onDateSelected(date, undefined, type);\n }\n });\n } else {\n this._onDateSelected(date, undefined, type);\n }\n }\n\n /**\n * Runs mode dependent logic to manage selected dates and emit selection events.\n * @param date The date that was selected\n * @param force Whether the date should be selected or deselected, regardless of its prior state (optional)\n * */\n private _onDateSelected(date: Date, force?: boolean, type: CalendarView = 'date'): void {\n if (this._mode === 'range' && this._emitRangeSelectionEvent(date)) {\n this._applyRangeSelection(date);\n this._rangeSelectionStore = undefined;\n return;\n }\n\n const selected = isSelected(date, this._value);\n const event: ICalendarDateSelectEventData = {\n date: new Date(date),\n selected,\n type\n };\n const isAllowed = this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.DATE_SELECT, event, true, true);\n\n if (!isAllowed) {\n return;\n }\n this._rangeSelectionStore = undefined;\n\n if (this._mode === 'single') {\n if ((selected && !force) || force === false) {\n this._deselectDate(date);\n } else if (force === undefined || force === true) {\n if (this._value.length) {\n this._deselectDate(this._value[0]);\n }\n this._selectDate(date);\n }\n } else {\n if ((selected && !force) || force === false) {\n this._deselectDate(date);\n } else if (force === undefined || force === true) {\n this._selectDate(date);\n }\n }\n\n sortDates(this._value);\n }\n\n /**\n * Emits a date select event with range data.\n * @param date The selected date.\n * @returns True if the event was not cancelled.\n */\n private _emitRangeSelectionEvent(date: Date): boolean {\n const event: ICalendarDateSelectEventData = {\n date: new Date(date),\n selected: isSelected(date, this._value),\n type: 'date'\n };\n\n // Build the event without affecting the calendar's state\n switch (this._rangeSelectionState) {\n case 'none':\n case 'to':\n event.range = getDateRangeFromDates([date]);\n event.rangeSelectionState = 'from';\n break;\n case 'from':\n if (isSameDate(date, this._value[0])) {\n if (this._allowSingleDateRange) {\n event.range = getDateRangeFromDates([this._value[0], date]);\n event.rangeSelectionState = 'to';\n } else {\n event.range = getDateRangeFromDates([]);\n event.rangeSelectionState = 'none';\n }\n } else if (date < this._value[0]) {\n event.range = getDateRangeFromDates([date]);\n event.rangeSelectionState = 'from';\n } else {\n event.range = getDateRangeFromDates([this._value[0], date]);\n event.rangeSelectionState = 'to';\n }\n break;\n }\n\n return this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.DATE_SELECT, event, true, true);\n }\n\n /**\n * Manages the current selection state and value from a selection when in range mode.\n * @param date The selected date\n * */\n private _applyRangeSelection(date: Date): void {\n switch (this._rangeSelectionState) {\n case 'none':\n case 'to':\n this._deselectAllDates();\n this._selectDate(date);\n this._adapter.setRange(null);\n this._adapter.setRangeStart(date);\n this._rangeSelectionState = 'from';\n break;\n case 'from':\n if (isSameDate(date, this._value[0])) {\n if (this._allowSingleDateRange) {\n this._value.push(date);\n this._rangeSelectionState = 'to';\n } else {\n this._deselectDate(date);\n this._rangeSelectionState = 'none';\n }\n } else if (date < this._value[0]) {\n this._deselectDate(this._value[0]);\n this._selectDate(date);\n this._adapter.setRangeStart(date);\n } else {\n this._selectDate(date);\n this._setRangePreview(date);\n this._rangeSelectionState = 'to';\n }\n break;\n }\n }\n\n /**\n * Sets the properties to display range selections.\n * @param toDate The date that the range preview should end on if an end date isn't already selected (optional)\n * */\n private _setRangePreview(toDate?: Date): void {\n switch (this._rangeSelectionState) {\n case 'from':\n if (!toDate) {\n return;\n }\n if (toDate < this._value[0]) {\n this._adapter.setRange(null);\n } else {\n this._adapter.setRange(getDatesInRange(this._dates, this._value[0], toDate));\n this._adapter.setRangeEnd(toDate);\n }\n break;\n case 'to':\n this._adapter.setRange(getDatesInRange(this._dates, this._value[0], this._value[1]));\n this._adapter.setRangeEnd(this._value[1]);\n break;\n }\n }\n\n /**\n * Removes the range preview.\n */\n private _clearRangePreview(): void {\n this._adapter.setRange(null);\n this._adapter.setRangeStart(null);\n this._adapter.setRangeEnd(null);\n }\n\n /**\n * Adds a date to the value array and sets it selected in the adapter.\n * @param date The date to select\n * */\n private _selectDate(date: Date): void {\n this._value.push(date);\n this._focusedDate = date;\n this._adapter.setDateSelected(date, true);\n }\n\n /**\n * Removes a date from the value array and sets it deselected in the adapter.\n * @param date The date to deselect\n * */\n private _deselectDate(date: Date): void {\n const index = this._value.findIndex(d => isSameDate(d, date));\n if (index > -1) {\n this._value.splice(index, 1);\n }\n this._adapter.setDateSelected(date, false);\n }\n\n /**\n * Clears the value array and sets all dates deselected in the adapter.\n * */\n private _deselectAllDates(): void {\n this._value.forEach(d => this._adapter.setDateSelected(d, false));\n this._clearRangePreview();\n this._value = [];\n }\n\n /**\n * Moves to and sets tabindex on the given date.\n * @param date The destination date\n * @param setFocus Whether focus should be set on the date\n * */\n private _goToDate(date: Date, setFocus: boolean): void {\n const year = date.getFullYear();\n const month = date.getMonth();\n this._focusedDate = date;\n if (this._year !== year || this._month !== month) {\n this._month = month;\n this._setMonth();\n this._year = year;\n this._setYear();\n if (this._view !== 'date') {\n this._closeMenu(false, setFocus);\n } else {\n this._resetDateGrid();\n }\n } else if (this._view !== 'date') {\n this._closeMenu(false, setFocus);\n }\n this._adapter.setActiveDate(date, setFocus, this._preventFocus);\n this._emitFocusChangeEvent(this._focusedDate);\n }\n\n /**\n * Moves forward one month and rebuilds the calendar dates to match.\n * */\n private _goToNextMonth(): void {\n if (this._month < 11) {\n this._month += 1;\n } else {\n this._month = 0;\n this._year += 1;\n this._setYear();\n }\n this._setMonth();\n this._resetDateGrid();\n }\n\n /**\n * Moves backward one month and rebuilds the calendar dates to match.\n * */\n private _goToPreviousMonth(): void {\n if (this._month > 0) {\n this._month -= 1;\n } else {\n this._month = 11;\n this._year -= 1;\n this._setYear();\n }\n this._setMonth();\n this._resetDateGrid();\n }\n\n /**\n * Moves forward one year.\n * */\n private _goToNextYear(setFocus = false): void {\n if (this._view === 'month') {\n if (this._menuYear) {\n this._menuYear += 1;\n this._setMenuYear();\n }\n this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(), this._rtl ? 'left' : 'right', setFocus);\n } else {\n this._year += 1;\n this._setYear();\n this._resetDateGrid();\n }\n }\n\n /**\n * Moves backward one year.\n * */\n private _goToPreviousYear(setFocus = false): void {\n if (this._view === 'month') {\n if (this._menuYear) {\n this._menuYear -= 1;\n this._setMenuYear();\n }\n this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(), this._rtl ? 'right' : 'left', setFocus);\n } else {\n this._year -= 1;\n this._setYear();\n this._resetDateGrid();\n }\n }\n \n /**\n * Moves to the next set of selectable years in grid view.\n * */\n private _goToNextSetOfYears(setFocus = false): void {\n this._menuIncludedYear += CALENDAR_CONSTANTS.numbers.YEARS_IN_VIEW;\n this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(), this._rtl ? 'left' : 'right', setFocus);\n this._setNavigationButtonStates();\n }\n\n /**\n * Move to the previous set of selectable years in grid view.\n * */\n private _goToPreviousSetOfYears(setFocus = false): void {\n this._menuIncludedYear -= CALENDAR_CONSTANTS.numbers.YEARS_IN_VIEW;\n this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(), this._rtl ? 'right' : 'left', setFocus);\n this._setNavigationButtonStates();\n }\n\n /**\n * Checks whether the minimum navigable date occurs before the current period.\n * @param forceConstrain Whether to ignore the ability to view dates before the min\n * @returns Whether periods before the one in view are navigable\n */\n private _canGoBackward(forceConstrain?: false): boolean {\n if (!forceConstrain && !this._constrainToEnabled) {\n return true;\n }\n switch (this._view) {\n case 'date':\n return !this._min || this._min < new Date(this._year, this._month, 1);\n case 'month':\n const minDateYear = this._min?.getFullYear();\n return this._menuYear != null && (minDateYear == null || minDateYear < this._menuYear);\n case 'year':\n return !!this._menuYearsInView && this._minYear < this._menuYearsInView.min;\n default:\n return false;\n }\n }\n\n /**\n * Checks whether the maximum navigable date occurs after the current period.\n * @param forceConstrain Whether to ignore the ability to view dates after the max\n * @returns Whether periods after the one in view are navigable\n */\n private _canGoForward(forceConstrain?: false): boolean {\n if (!forceConstrain && !this._constrainToEnabled) {\n return true;\n }\n switch (this._view) {\n case 'date':\n return !this._max || this._max > getLastDateOfMonth(this._month, this._year);\n case 'month':\n const maxDateYear = this._max?.getFullYear();\n return this._menuYear != null && (maxDateYear == null || maxDateYear > this._menuYear);\n case 'year':\n return !!this._menuYearsInView && this._maxYear > this._menuYearsInView.max;\n default:\n return false;\n }\n }\n\n /**\n * Enables or disabled navigation buttons based on whether they would lead outside the range of enabled dates.\n */\n private _setNavigationButtonStates(): void {\n if (!this._showHeader) {\n return;\n }\n\n if (!this._constrainToEnabled) {\n this._adapter.setPreviousButtonDisabled(false);\n this._adapter.setNextButtonDisabled(false);\n return;\n }\n\n this._adapter.setPreviousButtonDisabled(!this._canGoBackward());\n this._adapter.setNextButtonDisabled(!this._canGoForward());\n }\n\n /**\n * Sets the month text and attribute in the adapter.\n * @param userSelected Whether the month was explicitly selected by the user (optional)\n * */\n private _setMonth(userSelected?: boolean): void {\n this._adapter.setMonth(this._month, this._locale);\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.MONTH, this._month.toString());\n if (this._isInitialized) {\n this._setNavigationButtonStates();\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.MONTH_CHANGE, {month: this._month, userSelected: userSelected ?? false, year: this._year});\n }\n }\n\n /**\n * Sets the year text and attribute in the adapter.\n * @param userSelected Whether the year was explicilty selected by the user (optional)\n * */\n private _setYear(userSelected?: boolean): void {\n this._adapter.setYear(this._year, this._locale);\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.YEAR, this._year.toString());\n if (this._isInitialized) {\n this._setNavigationButtonStates();\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.MONTH_CHANGE, {month: this._month, userSelected: userSelected ?? false, year: this._year});\n }\n }\n\n /**\n * Sets the year currently visible in the menu.\n * */\n private _setMenuYear(): void {\n if (this._menuYear != null) {\n this._setNavigationButtonStates();\n this._adapter.setYear(this._menuYear, this._locale);\n }\n }\n\n private _applyAllowSingleDateRange(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.ALLOW_SINGLE_DATE_RANGE, this._allowSingleDateRange);\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.ALLOW_SINGLE_DATE_RANGE, this._allowSingleDateRange);\n }\n\n private _applyClearButton(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.CLEAR_BUTTON, true, this._clearButton.toString());\n\n if (!this._clearButton) {\n this._adapter.unregisterClearButtonListener(this._clearButtonListener);\n this._adapter.removeClearButton();\n\n if (!this._todayButton) {\n this._adapter.removeFooter();\n }\n } else {\n this._adapter.setFooter();\n this._adapter.setClearButton();\n this._adapter.registerClearButtonListener(this._clearButtonListener);\n }\n }\n\n private _applyConstrainToEnabled(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.CONSTRAIN_TO_ENABLED, true, this._constrainToEnabled.toString());\n\n if (this._isInitialized) {\n this._setNavigationButtonStates();\n }\n }\n\n private _applyDateBuilder(): void {\n if (this._view === 'date') {\n this._resetDateGrid();\n this._resumeTabindexOnDate(false);\n }\n }\n\n private _applyDayBuilder(): void {\n this._adapter.setDays(getSortedDaysOfWeek(this._firstDayOfWeek ?? this._localeFirstDayOfWeek), { builder: this._dayBuilder, locale: this._locale });\n }\n\n private _applyDisabledDates(): void {\n switch (this._view) {\n case 'date':\n this._dates.forEach(d => {\n const inMonth = isInMonth(d, this._month, this._year);\n const disabledParams = this._getDisabledDateParams(!inMonth);\n this._adapter.setDateDisabled(d, isDisabled(d, disabledParams));\n });\n break;\n case 'month':\n this._openMonthMenu();\n break;\n case 'year':\n this._openYearMenu();\n break;\n }\n this._setNavigationButtonStates();\n }\n\n private _applyEvents(): void {\n if (this._view !== 'date') {\n return;\n }\n this._dates.forEach(d => {\n this._setEventsOnDate(d);\n });\n }\n\n private _applyFirstDayOfWeek(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.FIRST_DAY_OF_WEEK, isDefined(this._firstDayOfWeek), (this._firstDayOfWeek ?? 0).toString());\n this._adapter.setDays(getSortedDaysOfWeek(this._firstDayOfWeek ?? this._localeFirstDayOfWeek), { builder: this._dayBuilder, locale: this._locale });\n\n if (this._isInitialized && this._view === 'date') {\n this._resetDateGrid();\n this._resumeTabindexOnDate(false);\n }\n }\n\n private _applyFixedHeight(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.FIXED_HEIGHT, this._fixedHeight);\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.FIXED_HEIGHT, this._fixedHeight);\n }\n\n private _applyListYears(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.LIST_YEARS, this._listYears);\n\n if (this._isInitialized && this._view === 'year') {\n this._openYearMenu();\n }\n }\n\n private _applyLocale(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.LOCALE, !!this._locale, this._locale);\n this._adapter.toggleContainerAttribute(!!this._locale, 'lang', this._locale);\n this._localeFirstDayOfWeek = getFirstDayOfWeekForLocale(this._locale);\n this._localeWeekendDays = getWeekendDaysForLocale(this._locale);\n this._applyRtl();\n\n if (this._isInitialized) {\n this._adapter.setMonth(this._month, this._locale);\n this._adapter.setYear(this._year, this._locale);\n\n switch (this._view) {\n case 'date':\n this._adapter.setDays(getSortedDaysOfWeek(this._firstDayOfWeek ?? this._localeFirstDayOfWeek), { builder: this._dayBuilder, locale: this._locale });\n this._resetDateGrid();\n this._resumeTabindexOnDate(false);\n break;\n case 'month':\n this._openMonthMenu();\n break;\n case 'year':\n this._openYearMenu();\n break;\n }\n }\n }\n\n private _applyMenuAnimation(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.MENU_ANIMATION, this._menuAnimation);\n this._adapter.setMenuAnimation(this._menuAnimation);\n }\n\n private _applyMin(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.MIN, !!this._minAttribute, this._minAttribute as string);\n\n if (this._isInitialized) {\n this._applyDisabledDates();\n\n if (this._min && this._min > this._focusedDate) {\n const firstEnabledDate = this._getFirstEnabledDate();\n if (firstEnabledDate) {\n this._goToDate(firstEnabledDate, false);\n }\n }\n }\n }\n\n private _applyMax(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.MAX, !!this._maxAttribute, this._maxAttribute as string);\n\n if (this._isInitialized) {\n this._applyDisabledDates();\n\n if (this._max && this._max < this._focusedDate) {\n const lastEnabledDate = this._getLastEnabledDate();\n if (lastEnabledDate) {\n this._goToDate(lastEnabledDate, false);\n }\n }\n }\n }\n\n private _applyMode(oldMode?: CalendarMode): void {\n switch (this._mode) {\n case 'single':\n this._applySingleMode();\n break;\n case 'multiple':\n this._applyMultipleMode(oldMode === 'range');\n break;\n case 'range':\n this._applyRangeMode();\n break;\n }\n\n if (this._mode !== 'range') {\n this._rangeSelectionState = 'none';\n this._adapter.unregisterHoverListener(this._hoverListener);\n this._clearRangePreview();\n }\n }\n\n private _applySingleMode(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.MODE, 'single');\n this._adapter.setMultiple(false);\n\n if (this._value.length > 1) {\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = this._value.length - 2; i >= 0; i -= 1) {\n this._deselectDate(this._value[i]);\n }\n }\n }\n\n private _applyMultipleMode(fromRange = false): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.MODE, 'multiple');\n this._adapter.setMultiple(true);\n\n if (fromRange) {\n const newDates = getMultipleFromRange(this._value, this._getDisabledDateParams());\n this._deselectAllDates();\n newDates.forEach(d => {\n this._selectDate(d);\n });\n }\n }\n\n private _applyRangeMode(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.MODE, 'range');\n this._adapter.setMultiple(false);\n\n const newValue = getMinAndMaxDates(this._value);\n this._deselectAllDates();\n newValue.forEach(d => {\n this._selectDate(d);\n });\n\n this._rangeSelectionState = this._value[0] ? this._value[1] ? 'to' : 'from' : 'none';\n this._adapter.registerHoverListener(this._hoverListener);\n this._adapter.setRange(getDatesInRange(this._dates, this._value[0], this._value[1]));\n this._adapter.setRangeStart(this._value[0] ?? null);\n this._adapter.setRangeEnd(this._value[1] ?? null);\n }\n\n private _applyMonth(): void {\n this._setMonth();\n if (this._isInitialized && this._view === 'date') {\n this._resetDateGrid();\n this._moveFocusToFirstOfMonth(false);\n }\n }\n\n private _applyPreventFocus(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.PREVENT_FOCUS, this._preventFocus);\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.PREVENT_FOCUS, this._preventFocus);\n this._adapter.setPreventFocusOnMenu(this._preventFocus);\n if (this._preventFocus) {\n this._adapter.registerPreventFocusListener(this._preventFocusListener);\n } else {\n this._adapter.unregisterPreventFocusListener(this._preventFocusListener);\n }\n if (this._isInitialized && this._view === 'date') {\n this._resumeTabindexOnDate(false);\n }\n }\n\n private _applyReadOnly(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.READONLY, this._readonly);\n this._adapter.toggleHostAttribute('aria-readonly', this._readonly, 'true');\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.READONLY, this._readonly);\n\n if (this._readonly) {\n this._adapter.unregisterDateClickListener(this._dateClickListener);\n this._adapter.unregisterHoverListener(this._hoverListener);\n } else {\n this._adapter.registerDateClickListener(this._dateClickListener);\n if (this._mode === 'range') {\n this._adapter.registerHoverListener(this._hoverListener);\n }\n }\n }\n\n private _applyRtl(): void {\n this._rtl = isRtlLocale(this._locale);\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.RTL, this._rtl);\n this._adapter.toggleContainerAttribute(this._rtl, 'dir', 'rtl');\n }\n\n private _applySelectionFollowsMonth(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.SELECTION_FOLLOWS_MONTH, this._selectionFollowsMonth.toString());\n }\n\n private _applyShowHeader(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.SHOW_HEADER, this._showHeader, this._showHeader.toString());\n\n if (this._showHeader) {\n this._adapter.setHeader();\n this._adapter.registerMonthButtonListener(this._monthButtonListener);\n this._adapter.registerNextButtonListener(this._nextButtonListener);\n this._adapter.registerPreviousButtonListener(this._previousButtonListener);\n this._adapter.registerYearButtonListener(this._yearButtonListener);\n this._setNavButtonLabels();\n } else {\n this._adapter.unregisterMonthButtonListener(this._monthButtonListener);\n this._adapter.unregisterNextButtonListener(this._nextButtonListener);\n this._adapter.unregisterPreviousButtonListener(this._previousButtonListener);\n this._adapter.unregisterYearButtonListener(this._yearButtonListener);\n this._adapter.removeHeader();\n }\n\n if (this._isInitialized) {\n this._adapter.setMonth(this._month, this._locale);\n this._adapter.setYear(this._year, this._locale);\n this._setNavigationButtonStates();\n }\n }\n\n private _applyShowOtherMonths(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.SHOW_OTHER_MONTHS, this._showOtherMonths);\n\n if (this._isInitialized && this._view === 'date') {\n let skipFinalWeek = false;\n this._dates.forEach((d, i) => {\n if (isInMonth(d, this._month, this._year)) {\n return;\n }\n if (i === CALENDAR_CONSTANTS.numbers.PENULTIMATE_WEEK_BEGIN_INDEX || i === CALENDAR_CONSTANTS.numbers.FINAL_WEEK_BEGIN_INDEX) {\n skipFinalWeek = true;\n }\n if (this._showOtherMonths && !skipFinalWeek) {\n this._adapter.replaceDate(this._getDateConfig(d), { builder: this._dateBuilder, locale: this._locale });\n } else {\n this._adapter.replaceDateWithSpacer(d);\n }\n this._setEventsOnDate(d);\n this._applyWeekendDays();\n });\n }\n }\n\n private _applyShowToday(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.SHOW_TODAY, this._showToday);\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.SHOW_TODAY, this._showToday);\n }\n\n private _applyTodayButton(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.TODAY_BUTTON, true, this._todayButton.toString());\n\n if (!this._todayButton) {\n this._adapter.unregisterTodayButtonListener(this._todayButtonListener);\n this._adapter.removeTodayButton();\n\n if (!this._clearButton) {\n this._adapter.removeFooter();\n }\n } else {\n this._adapter.setFooter();\n this._adapter.setTodayButton();\n this._adapter.registerTodayButtonListener(this._todayButtonListener);\n }\n }\n\n private _applyTooltipBuilder(): void {\n if (this._view === 'date') {\n this._dates.forEach(d => {\n if (!this._showOtherMonths && !isInMonth(d, this._month, this._year)) {\n return;\n }\n const events = getEventsOnDate(d, this._events, this._eventBuilder);\n let tooltipContent = getEventDescriptions(events);\n if (this._tooltipBuilder) {\n tooltipContent = this._tooltipBuilder(this._getCalendarDate(d), tooltipContent) ?? '';\n }\n this._adapter.setDateTooltip(d, tooltipContent);\n });\n }\n }\n\n private _applyWeekendDays(): void {\n const weekendDays = this._weekendDays ?? this._localeWeekendDays;\n if (this._view === 'date') {\n this._dates.forEach(d => {\n const day = d.getDay();\n this._adapter.setWeekend(d, (this._showOtherMonths || isInMonth(d, this._month, this._year)) && weekendDays.includes(day));\n });\n }\n }\n\n private _applyValue(newValue: Date[]): void {\n newValue = newValue.map(d => new Date(d));\n sortDates(newValue);\n this._deselectAllDates();\n newValue.forEach(d => this._selectDate(d));\n\n if (this._mode === 'range') {\n this._rangeSelectionState = this._value.length === 2 ? 'to' : this._value.length === 1 ? 'from' : 'none';\n this._clearRangePreview();\n this._adapter.setRangeStart(this._value[0]);\n this._setRangePreview();\n }\n }\n\n private _applyView(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.VIEW, this._view);\n\n switch (this._view) {\n case 'date':\n this._closeMenu();\n break;\n case 'month':\n this._openMonthMenu();\n break;\n case 'year':\n this._openYearMenu();\n break;\n }\n }\n\n private _applyYear(): void {\n this._setYear();\n if (this._isInitialized && this._view === 'date') {\n this._resetDateGrid();\n this._moveFocusToFirstOfMonth(false);\n }\n }\n\n private _applyYearRange(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.YEAR_RANGE, this._yearRange);\n const range = parseYearRange(this._yearRange);\n this._minYear = range.min;\n this._maxYear = range.max;\n if (this._view === 'year') {\n this._openYearMenu();\n this._setNavigationButtonStates();\n }\n }\n\n /** Get the currently focused date */\n public get activeDate(): Date {\n return new Date(this._focusedDate);\n }\n\n /** Get/set whether single date ranges are allowed */\n public get allowSingleDateRange(): boolean {\n return this._allowSingleDateRange;\n }\n public set allowSingleDateRange(value: boolean) {\n if (this._allowSingleDateRange !== value) {\n this._allowSingleDateRange = value;\n this._applyAllowSingleDateRange();\n }\n }\n\n /** Get/set whether to show the clear button */\n public get clearButton(): boolean {\n return this._clearButton;\n }\n public set clearButton(value: boolean) {\n if (this._clearButton !== value) {\n this._clearButton = value;\n\n if (this._isInitialized) {\n this._applyClearButton();\n }\n }\n }\n\n /* Get/set the clear button callback */\n public get clearCallback(): (() => void) | undefined {\n return this._clearCallback;\n }\n public set clearCallback(value: (() => void) | undefined) {\n this._clearCallback = value;\n }\n\n /** Get/set whether to constain navigation to enabled dates */\n public get constrainToEnabled(): boolean {\n return this._constrainToEnabled;\n }\n public set constrainToEnabled(value: boolean) {\n if (this._constrainToEnabled !== value) {\n this._constrainToEnabled = value;\n\n if (this._isInitialized) {\n this._applyConstrainToEnabled();\n }\n }\n }\n\n /** Get/set date builder */\n public get dateBuilder(): CalendarDateBuilder | undefined {\n return this._dateBuilder;\n }\n public set dateBuilder(value: CalendarDateBuilder | undefined) {\n this._dateBuilder = value;\n\n if (this._isInitialized) {\n this._applyDateBuilder();\n }\n }\n\n /** Get/set date select callback */\n public get dateSelectCallback(): CalendarDateSelectCallback | undefined {\n return this._dateSelectCallback;\n }\n public set dateSelectCallback(value: CalendarDateSelectCallback | undefined) {\n this._dateSelectCallback = value;\n }\n\n /** Get/set day builder */\n public get dayBuilder(): CalendarDayBuilder | undefined {\n return this.dayBuilder;\n }\n public set dayBuilder(value: CalendarDayBuilder | undefined) {\n this._dayBuilder = value;\n\n if (this._isInitialized) {\n this._applyDayBuilder();\n }\n }\n\n /** Get/set disabled date builder */\n public get disabledDateBuilder(): ((date: Date) => boolean) | undefined {\n return this._disabledDateBuilder;\n }\n public set disabledDateBuilder(value: ((date: Date) => boolean) | undefined) {\n this._disabledDateBuilder = value;\n\n if (this._isInitialized) {\n this._applyDisabledDates();\n }\n }\n\n /** Get/set disabled dates */\n public get disabledDates(): Date | Date[] | null | undefined {\n const dates = this._disabledDates.map(d => new Date(d));\n return dates.length ? dates : null;\n }\n public set disabledDates(value: Date | Date[] | null | undefined) {\n const dates = value ? isArray(value) ? value : [value] : [];\n this._disabledDates = (dates as Date[]).map(d => {\n const date = new Date(d);\n date.setHours(0, 0, 0, 0);\n return date;\n });\n\n if (this._isInitialized) {\n this._applyDisabledDates();\n }\n }\n\n /** Get/set disabled days of week */\n public get disabledDaysOfWeek(): DayOfWeek | DayOfWeek[] | null | undefined {\n return this._disabledDaysOfWeek.length ? [...this._disabledDaysOfWeek] : null ;\n }\n public set disabledDaysOfWeek(value: DayOfWeek | DayOfWeek[] | null | undefined) {\n this._disabledDaysOfWeek = (isDefined(value) ? isArray(value) ? value : [value] : []) as DayOfWeek[];\n\n if (this._isInitialized) {\n this._applyDisabledDates();\n }\n }\n\n /** Get/set the event builder */\n public get eventBuilder(): CalendarEventBuilder | undefined {\n return this._eventBuilder;\n }\n public set eventBuilder(value: CalendarEventBuilder | undefined) {\n this._eventBuilder = value;\n\n if (this._isInitialized) {\n this._applyEvents();\n }\n }\n\n /** Get/set events */\n public get events(): ICalendarEvent[] | null | undefined {\n return this._events ? [...this._events] : null;\n }\n public set events(value: ICalendarEvent[] | null | undefined) {\n this._events = value?.length ? [...value] : [];\n\n if (this._isInitialized) {\n this._applyEvents();\n }\n }\n\n /** Get/set first day of week */\n public get firstDayOfWeek(): DayOfWeek | undefined {\n return this._firstDayOfWeek;\n }\n public set firstDayOfWeek(value: DayOfWeek | undefined) {\n if (this._firstDayOfWeek !== value) {\n this._firstDayOfWeek = isDefined(value) ? +(value as DayOfWeek) : value;\n\n if (this._isInitialized) {\n this._applyFirstDayOfWeek();\n }\n }\n }\n\n /** Get/set fixed height */\n public get fixedHeight(): boolean {\n return this._fixedHeight;\n }\n public set fixedHeight(value: boolean) {\n if (this._fixedHeight !== value) {\n this._fixedHeight = value;\n\n if (this._isInitialized) {\n this._applyFixedHeight();\n }\n }\n }\n\n /** Get/set list years */\n public get listYears(): boolean {\n return this._listYears;\n }\n public set listYears(value: boolean) {\n if (this._listYears !== value) {\n this._listYears = value;\n this._applyListYears();\n }\n }\n\n /** Get/set locale */\n public get locale(): string | undefined {\n return this._locale;\n }\n public set locale(value: string | undefined) {\n if (typeof value ==='string' && !value.length) {\n value = undefined;\n }\n\n if (this._locale !== value) {\n this._locale = value;\n\n if (this._isInitialized) {\n this._applyLocale();\n }\n }\n }\n\n /** Get/set max date */\n public get max(): Date | string | null | undefined {\n return this._max;\n }\n public set max(value: Date | string | null | undefined) {\n if (this._maxAttribute !== value) {\n this._maxAttribute = value?.toString() ?? null;\n this._max = coerceDateFromValue(value);\n this._applyMax();\n }\n }\n\n /** Get/set menu animation type */\n public get menuAnimation(): CalendarMenuAnimationType {\n return this._menuAnimation;\n }\n public set menuAnimation(value: CalendarMenuAnimationType) {\n if (this._menuAnimation !== value) {\n this._menuAnimation = value;\n\n if (this._isInitialized) {\n this._applyMenuAnimation();\n }\n }\n }\n\n /** Get/set min date */\n public get min(): Date | string | null | undefined {\n return this._min;\n }\n public set min(value: Date | string | null | undefined) {\n if (this._minAttribute !== value) {\n this._minAttribute = value?.toString() ?? null;\n this._min = coerceDateFromValue(value);\n this._applyMin();\n }\n }\n\n /** Get/set mode */\n public get mode(): CalendarMode {\n return this._mode;\n }\n public set mode(value: CalendarMode) {\n if (this._mode !== value) {\n const oldMode = this._mode;\n this._mode = value;\n \n if (this._isInitialized) {\n this._applyMode(oldMode);\n }\n }\n }\n\n /** Get/set month */\n public get month(): number {\n return this._month;\n }\n public set month(value: number) {\n if (this._month !== value) {\n const newValue = isNaN(+value) ? this._month : +value;\n if (this._month === newValue) {\n return;\n }\n\n this._month = +value;\n\n if (this._isInitialized) {\n this._applyMonth();\n }\n }\n }\n\n /** Get/set prevent focus */\n public get preventFocus(): boolean {\n return this._preventFocus;\n }\n public set preventFocus(value: boolean) {\n if (this._preventFocus !== value) {\n this._preventFocus = value;\n\n if (this._isInitialized) {\n this._applyPreventFocus();\n }\n }\n }\n\n /** Get/set readonly */\n public get readonly(): boolean {\n return this._readonly;\n }\n public set readonly(value: boolean) {\n if (this._readonly !== value) {\n this._readonly = value;\n\n if (this._isInitialized) {\n this._applyReadOnly();\n }\n }\n }\n\n /** Get/set selection follows month */\n public get selectionFollowsMonth(): boolean {\n return this._selectionFollowsMonth;\n }\n public set selectionFollowsMonth(value: boolean) {\n if (this._selectionFollowsMonth !== value) {\n this._selectionFollowsMonth = value;\n\n if (this._isInitialized) {\n this._applySelectionFollowsMonth();\n }\n }\n }\n\n /** Get/set show nav */\n public get showHeader(): boolean {\n return this._showHeader;\n }\n public set showHeader(value: boolean) {\n if (this._showHeader !== value) {\n this._showHeader = value;\n\n if (this._isInitialized) {\n this._applyShowHeader();\n }\n }\n }\n\n /** Get/set show other months */\n public get showOtherMonths(): boolean {\n return this._showOtherMonths;\n }\n public set showOtherMonths(value: boolean) {\n if (this._showOtherMonths !== value) {\n this._showOtherMonths = value;\n\n if (this._isInitialized) {\n this._applyShowOtherMonths();\n }\n }\n }\n\n /** Get/set show today */\n public get showToday(): boolean {\n return this._showToday;\n }\n public set showToday(value: boolean) {\n if (this._showToday !== value) {\n this._showToday = value;\n\n if (this._isInitialized) {\n this._applyShowToday();\n }\n }\n }\n\n /** Get/set whether to show the today button */\n public get todayButton(): boolean {\n return this._todayButton;\n }\n public set todayButton(value: boolean) {\n if (this._todayButton !== value) {\n this._todayButton = value;\n\n if (this._isInitialized) {\n this._applyTodayButton();\n }\n }\n }\n\n /* Get/set the today button callback */\n public get todayCallback(): (() => void) | undefined {\n return this._todayCallback;\n }\n public set todayCallback(value: (() => void) | undefined) {\n this._todayCallback = value;\n }\n\n /** Get/set the tooltip builder */\n public get tooltipBuilder(): CalendarTooltipBuilder | undefined {\n return this._tooltipBuilder;\n }\n public set tooltipBuilder(value: CalendarTooltipBuilder | undefined) {\n this._tooltipBuilder = value;\n\n if (this._isInitialized) {\n this._applyTooltipBuilder();\n }\n }\n\n /** Get/set value */\n public get value(): Date | Date[] | DateRange | null | undefined {\n if (this._mode === 'range') {\n return this._rangeSelectionStore ?? getDateRangeFromDates(this._value);\n }\n\n const dates = this._value.map(d => new Date(d));\n return this._mode === 'multiple' ? dates : dates.length ? dates[0] : null;\n }\n public set value(value: Date | Date[] | DateRange | null | undefined) {\n let dates: Date[] = [];\n\n this._rangeSelectionStore = undefined;\n\n if (!value || (Array.isArray(value) && !value.length)) {\n this._value = [];\n } else if (Array.isArray(value)) {\n switch (this._mode) {\n case 'single':\n dates = [value[0]];\n break;\n case 'multiple':\n dates = value;\n break;\n case 'range':\n const minAndMax = getMinAndMaxDates(value);\n dates.push(minAndMax[0]);\n if (minAndMax.length > 1) {\n dates.push(minAndMax[1]);\n }\n break;\n }\n } else if (isValidDate(new Date(value as any))) {\n dates = [value as Date];\n } else {\n this._rangeSelectionStore = new DateRange(value as DateRange);\n dates = getDatesFromDateRange(value as DateRange);\n }\n\n this._applyValue(dates);\n }\n\n /** Get/set view */\n public get view(): CalendarView {\n return this._view;\n }\n public set view(value: CalendarView) {\n if (this._view !== value) {\n this._view = value;\n this._applyView();\n }\n }\n\n /** Get/set weekend days */\n public get weekendDays(): DayOfWeek[] | null | undefined {\n return this._weekendDays ? [...this._weekendDays] : null;\n }\n public set weekendDays(value: DayOfWeek[] | null | undefined) {\n this._weekendDays = value?.map(v => +v) ?? null;\n\n if (this._isInitialized) {\n this._applyWeekendDays();\n }\n }\n\n /** Get/set year */\n public get year(): number {\n return this._year;\n }\n public set year(value: number) {\n if (this._year !== value) {\n const newValue = isNaN(+value) ? this._year : +value;\n if (this._year === newValue) {\n return;\n }\n\n this._year = newValue;\n \n if (this._isInitialized) {\n this._applyYear();\n }\n }\n }\n\n /** Get/set year range */\n public get yearRange(): string {\n return this._yearRange;\n }\n public set yearRange(value: string) {\n if (this._yearRange !== value) {\n this._yearRange = value;\n\n if (this._isInitialized) {\n this._applyYearRange();\n }\n }\n }\n\n /** Deselect all dates */\n public clear(): void {\n this._deselectAllDates();\n if (this._clearCallback) {\n this._clearCallback();\n }\n }\n\n /** Deselect a date */\n public deselectDate(date: Date, setFocus?: boolean): void {\n this._onDateSelected(date, false);\n if (setFocus) {\n this._focusedDate = date;\n this._resumeTabindexOnDate(true);\n }\n }\n\n /** Go to a date and optionally set focus on it */\n public goToDate(date: Date, setFocus?: boolean): void {\n this._goToDate(date, setFocus ?? false);\n }\n\n /** Handle an external keyboard event */\n public handleExternalKeyEvent(evt: KeyboardEvent): void {\n this._onKeydown(evt);\n }\n\n /** Reinitialize the calendar */\n public layout(): void {\n this._applyFirstDayOfWeek();\n this._createDateView();\n this._applyShowHeader();\n this._applyConstrainToEnabled();\n }\n\n /** Select a date */\n public selectDate(date: Date, setFocus?: boolean): void {\n this._onDateSelected(date, true);\n if (setFocus) {\n this._focusedDate = date;\n this._resumeTabindexOnDate(true);\n }\n }\n\n /** Sets the active date if in view */\n public setActiveDate(date: Date, setFocus?: boolean): boolean {\n if (this._dates.some(d => isSameDate(d, date) && (this._showOtherMonths || isInMonth(d, this._month, this._year)))) {\n this._goToDate(date, setFocus ?? false);\n return true;\n }\n return false;\n }\n\n /** Go to today */\n public today(): void {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n this._goToDate(today, true);\n if (this._todayCallback) {\n this._todayCallback();\n }\n }\n\n /** Toggles a date selected or unselected */\n public toggleDate(date: Date, force?: boolean): void {\n this._onDateSelected(date);\n }\n}\n", "import { CustomElement, attachShadowTemplate, ICustomElement, FoundationProperty, coerceNumber, coerceBoolean, elementParents } from '@tylertech/forge-core';\nimport { tylIconAdd, tylIconArrowDropDown, tylIconKeyboardArrowLeft, tylIconKeyboardArrowRight, tylIconLens } from '@tylertech/tyler-icons/standard';\n\nimport { CalendarAdapter } from './calendar-adapter';\nimport { CalendarFoundation } from './calendar-foundation';\nimport { CALENDAR_CONSTANTS, CalendarMode, DayOfWeek, ICalendarDateSelectEventData, CalendarDateBuilder, CalendarDayBuilder, CalendarDateSelectCallback, CalendarEventBuilder, ICalendarEvent, ICalendarFocusChangeEventData, ICalendarMonthChangeEventData, CalendarTooltipBuilder, CalendarView } from './calendar-constants';\nimport { DateRange } from './core/date-range';\nimport { ButtonComponent } from '../button';\nimport { IconButtonComponent } from '../icon-button';\nimport { IconComponent, IconRegistry } from '../icon';\nimport { TooltipComponent } from '../tooltip';\nimport { ICalendarBase } from './core/calendar-base';\nimport { CalendarMenuAnimationType, CalendarMenuComponent } from './calendar-menu';\n\nconst template = '<template><div class=\\\"forge-calendar\\\" part=\\\"root\\\"><div id=\\\"view\\\" class=\\\"forge-calendar__view\\\" part=\\\"view\\\"><div id=\\\"date-view\\\" class=\\\"forge-calendar__date-view\\\" role=\\\"grid\\\" part=\\\"date-view\\\"><div role=\\\"rowgroup\\\" part=\\\"date-view-container\\\"><div id=\\\"day-row\\\" class=\\\"forge-calendar__date-view__row\\\" role=\\\"row\\\" part=\\\"date-view-row\\\"></div></div><div id=\\\"date-grid\\\" class=\\\"forge-calendar__date-grid\\\" role=\\\"rowgroup\\\" part=\\\"date-grid-container\\\"></div></div><forge-calendar-menu id=\\\"menu\\\" part=\\\"calendar-menu\\\"></forge-calendar-menu></div></div></template>';\nconst styles = '.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);-webkit-transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.forge-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-button-font-size, .875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight,500);letter-spacing:.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);text-decoration:none;-webkit-text-decoration:var(--mdc-typography-button-text-decoration,none);text-decoration:var(--mdc-typography-button-text-decoration,none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform,uppercase);position:relative;display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:64px;border:none;outline:0;line-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle}.forge-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.forge-button::-moz-focus-inner{padding:0;border:0}.forge-button:active{outline:0}.forge-button:hover{cursor:pointer}.forge-button:disabled{cursor:default;pointer-events:none}.forge-button .forge-button__icon{margin-left:0;margin-right:8px;display:inline-block;font-size:1.125rem;height:1.125rem;vertical-align:top;width:1.125rem}.forge-button .forge-button__icon[dir=rtl],[dir=rtl] .forge-button .forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button__label~.forge-button__icon{margin-left:0;margin-right:8px}svg.forge-button__icon{fill:currentColor}.forge-button--outlined .forge-button__icon,.forge-button--raised .forge-button__icon,.forge-button--unelevated .forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button--outlined .forge-button__icon[dir=rtl],.forge-button--raised .forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon,.forge-button--raised .forge-button__label~.forge-button__icon,.forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--raised .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:-4px;margin-right:8px}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.forge-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-button .forge-button__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-button .forge-button__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-button.mdc-ripple-upgraded .forge-button__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-button.mdc-ripple-upgraded--unbounded .forge-button__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-button.mdc-ripple-upgraded--foreground-activation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-button.mdc-ripple-upgraded--foreground-deactivation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-button .forge-button__ripple{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:100%;height:100%;overflow:hidden}.forge-button:not(.forge-button--outlined) .forge-button__ripple{top:0;left:0}.forge-button--raised{-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-webkit-transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1)}.forge-button--raised:focus,.forge-button--raised:hover{-webkit-box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.forge-button--raised:active{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.forge-button--raised:disabled{-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.forge-button--outlined{border-style:solid}.forge-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 8px 0 8px}.forge-button:not(:disabled){background-color:transparent}.forge-button:disabled{background-color:transparent}.forge-button:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--unelevated:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--unelevated:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--unelevated .forge-button__ripple::after,.forge-button--unelevated .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--unelevated.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--unelevated:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--unelevated.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--unelevated:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--unelevated:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--unelevated:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--unelevated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--unelevated .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--raised:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--raised:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--raised:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--raised .forge-button__ripple::after,.forge-button--raised .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--raised.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--raised:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--raised.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--raised:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--raised:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--raised:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--raised.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--raised .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 15px 0 15px;border-width:1px}.forge-button--outlined:not(:disabled){background-color:transparent}.forge-button--outlined:disabled{background-color:transparent}.forge-button--outlined:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--outlined .forge-button__ripple::after,.forge-button--outlined .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button--outlined.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--outlined:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button--outlined.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--outlined:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button--outlined:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--outlined:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button--outlined.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button--outlined .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined:not(:disabled){border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--outlined .forge-button__ripple{top:-1px;left:-1px;border:1px solid transparent}.forge-button--dense{height:24px;margin-top:0;margin-bottom:0;height:1.5rem}forge-button{display:inline-block}forge-button[hidden]{display:none}forge-button[disabled]{cursor:not-allowed}a.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);text-decoration:none}a.forge-hyperlink:visited{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}a.forge-hyperlink[disabled]{pointer-events:none;cursor:default}a.forge-hyperlink:focus,a.forge-hyperlink:hover:not([disabled]){text-decoration:underline}button.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);cursor:pointer;border:none;background-color:transparent;font-size:inherit;padding:0;outline:0;text-align:left}button.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink:hover:not([disabled]){text-decoration:underline}.forge-icon-button{display:-webkit-inline-box;display:inline-flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;outline:0;background-color:transparent;fill:currentColor;color:inherit;font-size:24px;text-decoration:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:48px;height:48px;padding:12px}.forge-icon-button forge-icon,.forge-icon-button img,.forge-icon-button svg{width:24px;height:24px}.forge-icon-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-icon-button:disabled{cursor:default;pointer-events:none}.forge-icon-button__icon{display:inline-block}.forge-icon-button__icon.forge-icon-button__icon--on{display:none}.forge-icon-button--on .forge-icon-button__icon{display:none}.forge-icon-button--on .forge-icon-button__icon.forge-icon-button__icon--on{display:inline-block}.forge-icon-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-icon-button::after,.forge-icon-button::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-icon-button::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-icon-button::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-icon-button.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-icon-button.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-icon-button.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-icon-button.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button::after,.forge-icon-button::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.forge-icon-button.mdc-ripple-upgraded::after,.forge-icon-button.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button::after,.forge-icon-button::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-icon-button.mdc-ripple-surface--hover::before,.forge-icon-button:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button.mdc-ripple-upgraded--background-focused::before,.forge-icon-button:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}forge-icon-button{position:relative;display:inline-block;overflow:visible}.forge-icon-button--on{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-icon-button--on::after,.forge-icon-button--on::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-icon-button--on.mdc-ripple-surface--hover::before,.forge-icon-button--on:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button--on.mdc-ripple-upgraded--background-focused::before,.forge-icon-button--on:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button--on:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button--on:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button--on.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-icon-button--on::before{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);opacity:.08}.forge-icon-button--dense{width:28px;height:28px;padding:2px;padding:0}.forge-icon-button--dense-1{width:44px;height:44px;padding:10px}.forge-icon-button--dense-2{width:40px;height:40px;padding:8px}.forge-icon-button--dense-3{width:36px;height:36px;padding:6px}.forge-icon-button--dense-4{width:32px;height:32px;padding:4px}.forge-icon-button--dense-5{width:28px;height:28px;padding:2px}.forge-icon-button--dense-6{width:24px;height:24px;padding:0}.forge-icon-button--with-badge forge-badge{z-index:1;z-index:var(--forge-z-index-surface,1);pointer-events:none;--forge-badge-max-width:32px;--forge-badge-border:1px solid transparent}.forge-icon-button--with-badge forge-badge[app-bar-context]{--forge-badge-border:2px solid var(--forge-app-bar-theme-background)}.forge-calendar{width:100%;width:var(--forge-calendar-width,100%);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;position:relative}.forge-calendar__header{padding:0;padding:var(--forge-calendar-controls-padding,0);display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}.forge-calendar__footer{padding:0;padding:var(--forge-calendar-controls-padding,0);display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}.forge-calendar__view{position:relative}.forge-calendar__date-view{display:block}.forge-calendar__date-view__row{display:grid;grid-template-columns:repeat(7,1fr)}.forge-calendar__date-grid{display:grid}.forge-calendar__day{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;min-width:0;padding:0;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar__day::after{float:left;padding-top:100%;content:\\\"\\\"}.forge-calendar__date{margin-top:2px;margin-top:var(--forge-calendar-row-gap,2px);min-width:0;padding:0;border-radius:50%;position:relative;outline:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar__date::after{float:left;padding-top:100%;content:\\\"\\\"}.forge-calendar__date .mdc-ripple-surface{border-radius:inherit}.forge-calendar__date .mdc-ripple-surface::after,.forge-calendar__date .mdc-ripple-surface::before{position:absolute;width:calc(100% - 2px)!important;height:calc(100% - 2px)!important;top:calc(2px / 2)!important;left:calc(2px / 2)!important;border-radius:inherit!important}.forge-calendar__date__inner{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);position:absolute;width:calc(100% - 2px);height:calc(100% - 2px);top:calc(2px / 2);left:calc(2px / 2);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-calendar--show-today .forge-calendar__date--today:not([disabled]){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-calendar--show-today .forge-calendar__date--today .forge-calendar__date__inner{border-color:inherit;border-width:1px;border-style:solid;font-weight:700}.forge-calendar--show-today .forge-calendar__date--today.forge-calendar__date--selected{color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]){--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;cursor:pointer}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--unbounded .mdc-ripple-surface::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--foreground-activation .mdc-ripple-surface::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--foreground-deactivation .mdc-ripple-surface::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-surface--hover .mdc-ripple-surface::before,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):hover .mdc-ripple-surface::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--background-focused .mdc-ripple-surface::before,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded):focus .mdc-ripple-surface::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded) .mdc-ripple-surface::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded):active .mdc-ripple-surface::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar__date--selected:not([disabled]) .forge-calendar__date__inner{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar__date--selected[disabled] .forge-calendar__date__inner{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);color:rgba(0,0,0,.12);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date--selected:hover .forge-calendar__date__inner{opacity:.87}.forge-calendar__date--selected.mdc-ripple-upgraded--background-focused .forge-calendar__date__inner,.forge-calendar__date--selected:focus .forge-calendar__date__inner{opacity:.54}.forge-calendar__date[disabled]{color:rgba(0,0,0,.12);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-calendar__date-spacer{pointer-events:none}.forge-calendar--fixed-height .forge-calendar__date-spacer{margin-top:2px;margin-top:var(--forge-calendar-row-gap,2px)}.forge-calendar--fixed-height .forge-calendar__date-spacer::after{float:left;padding-top:100%;content:\\\"\\\"}.forge-calendar__range:not(.forge-calendar__date-spacer) .forge-calendar__range__target{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);position:absolute;width:100%;height:100%;opacity:.14;border-radius:0}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--start .forge-calendar__range__target{border-top-left-radius:50%;border-bottom-left-radius:50%}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--end .forge-calendar__range__target{border-top-right-radius:50%;border-bottom-right-radius:50%}.forge-calendar__range:not(.forge-calendar__range--start):first-of-type .forge-calendar__range__target{border-top-left-radius:4px;border-bottom-left-radius:4px}.forge-calendar__range:not(.forge-calendar__range--end):last-of-type .forge-calendar__range__target{border-top-right-radius:4px;border-bottom-right-radius:4px}.forge-calendar--allow-single-date-range .forge-calendar__range--start.forge-calendar__range--end .forge-calendar__range__target{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s;-webkit-transform:scale(1.15);transform:scale(1.15);-webkit-transform-origin:center;transform-origin:center}.forge-calendar__event{font-size:12px;font-size:var(--forge-calendar-event-dot-size, 12px)}.forge-calendar__event[data-event-theme=primary]{color:#3f51b5;color:var(--forge-calendar-theme-event-primary-accent,#3f51b5)}.forge-calendar__event[data-event-theme=secondary]{color:#ffc107;color:var(--forge-calendar-theme-event-secondary-accent,#ffc107)}.forge-calendar__event[data-event-theme=blue]{color:#2196f3;color:var(--forge-calendar-theme-event-blue-accent,#2196f3)}.forge-calendar__event[data-event-theme=light-green]{color:#8bc34a;color:var(--forge-calendar-theme-event-light-green-accent,#8bc34a)}.forge-calendar__event[data-event-theme=cyan]{color:#00bcd4;color:var(--forge-calendar-theme-event-cyan-accent,#00bcd4)}.forge-calendar__event[data-event-theme=teal]{color:#009688;color:var(--forge-calendar-theme-event-teal-accent,#009688)}.forge-calendar__event[data-event-theme=orange]{color:#ff9800;color:var(--forge-calendar-theme-event-orange-accent,#ff9800)}.forge-calendar__event[data-event-theme=blue-grey]{color:#607d8b;color:var(--forge-calendar-theme-event-blue-grey-accent,#607d8b)}.forge-calendar__event[data-event-theme=grey]{color:#9e9e9e;color:var(--forge-calendar-theme-event-grey-accent,#9e9e9e)}.forge-calendar__event[data-event-theme=red]{color:#f44336;color:var(--forge-calendar-theme-event-red-accent,#f44336)}.forge-calendar__event[data-event-theme=pink]{color:#e91e63;color:var(--forge-calendar-theme-event-pink-accent,#e91e63)}.forge-calendar__event[data-event-theme=purple]{color:#9c27b0;color:var(--forge-calendar-theme-event-purple-accent,#9c27b0)}.forge-calendar__event[data-event-theme=light-blue]{color:#03a9f4;color:var(--forge-calendar-theme-event-light-blue-accent,#03a9f4)}.forge-calendar__event[data-event-theme=deep-purple]{color:#673ab7;color:var(--forge-calendar-theme-event-deep-purple-accent,#673ab7)}.forge-calendar__event[data-event-theme=green]{color:#4caf50;color:var(--forge-calendar-theme-event-green-accent,#4caf50)}.forge-calendar__event[data-event-theme=lime]{color:#cddc39;color:var(--forge-calendar-theme-event-lime-accent,#cddc39)}.forge-calendar__event[data-event-theme=yellow]{color:#ffeb3b;color:var(--forge-calendar-theme-event-yellow-accent,#ffeb3b)}.forge-calendar__event[data-event-theme=brown]{color:#795548;color:var(--forge-calendar-theme-event-brown-accent,#795548)}.forge-calendar__event[data-event-theme=deep-orange]{color:#ff5722;color:var(--forge-calendar-theme-event-deep-orange-accent,#ff5722)}.forge-calendar__date[disabled] .forge-calendar__event{opacity:.14}.forge-calendar__event--overflow{color:#000;color:var(--mdc-theme-on-surface,#000);background-color:var(--mdc-theme-surface);border-radius:50%}.forge-calendar__event__wrapper{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;gap:2px;position:absolute;bottom:0;left:0;width:100%;padding-bottom:2px;pointer-events:none}.forge-calendar__date-spacer .forge-calendar__event__wrapper{display:none}.forge-calendar--rtl .forge-calendar__header forge-icon-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}#accessible-header{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}#month-button forge-icon{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.forge-calendar--month-menu-open #month-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}#year-button forge-icon{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.forge-calendar--year-menu-open #year-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host{--forge-calendar-event-stroke-color:#ffffff;--forge-calendar-event-stroke-color:var(--mdc-theme-surface, #ffffff);display:inline-block}:host([hidden]){display:none}:host([forge-popup-context=true]){--forge-calendar-event-stroke-color:#ffffff;--forge-calendar-event-stroke-color:var(--forge-theme-elevated-surface, #ffffff)}';\n\nexport interface ICalendarComponent extends ICalendarBase, ICustomElement {\n mode: CalendarMode;\n view: CalendarView;\n preventFocus: boolean;\n selectionFollowsMonth: boolean;\n showHeader: boolean;\n menuAnimation: CalendarMenuAnimationType;\n clearButton: boolean;\n todayButton: boolean;\n clearCallback: (() => void) | undefined;\n todayCallback: (() => void) | undefined;\n tooltipBuilder: CalendarTooltipBuilder | undefined;\n clear(): void;\n today(): void;\n selectDate(date: Date, setFocus?: boolean): void;\n deselectDate(date: Date): void;\n toggleDate(date: Date, force?: boolean): void;\n goToDate(date: Date, setFocus?: boolean): void;\n setActiveDate(date: Date, setFocus?: boolean): boolean;\n handleKey(evt: KeyboardEvent): void;\n layout(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-calendar': ICalendarComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-calendar-date-select': CustomEvent<ICalendarDateSelectEventData>;\n 'forge-calendar-focus-change': CustomEvent<ICalendarFocusChangeEventData>;\n 'forge-calendar-month-change': CustomEvent<ICalendarMonthChangeEventData>;\n 'forge-calendar-view-change': CustomEvent<CalendarView>;\n }\n}\n\n/**\n * The web component class behind the `<forge-calendar>` custom element.\n * \n * @tag forge-calendar\n */\n@CustomElement({\n name: CALENDAR_CONSTANTS.elementName,\n dependencies: [\n ButtonComponent,\n CalendarMenuComponent,\n IconButtonComponent,\n IconComponent,\n TooltipComponent\n ]\n})\nexport class CalendarComponent extends HTMLElement implements ICalendarComponent {\n public static get observedAttributes(): string[] {\n return [\n CALENDAR_CONSTANTS.attributes.ALLOW_SINGLE_DATE_RANGE,\n CALENDAR_CONSTANTS.attributes.CLEAR_BUTTON,\n CALENDAR_CONSTANTS.attributes.CONSTRAIN_TO_ENABLED,\n CALENDAR_CONSTANTS.attributes.FIRST_DAY_OF_WEEK,\n CALENDAR_CONSTANTS.attributes.FIXED_HEIGHT,\n CALENDAR_CONSTANTS.attributes.LIST_YEARS,\n CALENDAR_CONSTANTS.attributes.LOCALE,\n CALENDAR_CONSTANTS.attributes.MAX,\n CALENDAR_CONSTANTS.attributes.MENU_ANIMATION,\n CALENDAR_CONSTANTS.attributes.MIN,\n CALENDAR_CONSTANTS.attributes.MODE,\n CALENDAR_CONSTANTS.attributes.MONTH,\n CALENDAR_CONSTANTS.attributes.PREVENT_FOCUS,\n CALENDAR_CONSTANTS.attributes.READONLY,\n CALENDAR_CONSTANTS.attributes.SELECTION_FOLLOWS_MONTH,\n CALENDAR_CONSTANTS.attributes.SHOW_HEADER,\n CALENDAR_CONSTANTS.attributes.SHOW_OTHER_MONTHS,\n CALENDAR_CONSTANTS.attributes.SHOW_TODAY,\n CALENDAR_CONSTANTS.attributes.TODAY_BUTTON,\n CALENDAR_CONSTANTS.attributes.VIEW,\n CALENDAR_CONSTANTS.attributes.YEAR,\n CALENDAR_CONSTANTS.attributes.YEAR_RANGE\n ];\n }\n\n private _foundation: CalendarFoundation;\n\n constructor() {\n super();\n IconRegistry.define([tylIconKeyboardArrowLeft, tylIconKeyboardArrowRight, tylIconArrowDropDown, tylIconLens, tylIconAdd]);\n attachShadowTemplate(this, template, styles);\n this._foundation = new CalendarFoundation(new CalendarAdapter(this));\n }\n\n public connectedCallback(): void {\n // To simulate the :host-context() selector for Firefox until they implement it, we need to determine if the\n // calendar is within a popup for auto-styling the calendar when included within a popup. Check to see if\n // any of the parents of this element are a popup.\n if (!this.hasAttribute(CALENDAR_CONSTANTS.attributes.POPUP_CONTEXT) && elementParents(this).some(el => el.tagName.toLowerCase() === 'forge-popup')) {\n this.setAttribute(CALENDAR_CONSTANTS.attributes.POPUP_CONTEXT, 'true');\n }\n\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case CALENDAR_CONSTANTS.attributes.ALLOW_SINGLE_DATE_RANGE:\n this.allowSingleDateRange = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.CLEAR_BUTTON:\n this.clearButton = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.CONSTRAIN_TO_ENABLED:\n this.constrainToEnabled = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.FIRST_DAY_OF_WEEK:\n this.firstDayOfWeek = coerceNumber(newValue) as DayOfWeek;\n break;\n case CALENDAR_CONSTANTS.attributes.FIXED_HEIGHT:\n this.fixedHeight = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.LIST_YEARS:\n this.listYears = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.LOCALE:\n this.locale = newValue;\n break;\n case CALENDAR_CONSTANTS.attributes.MAX:\n this.max = newValue;\n break;\n case CALENDAR_CONSTANTS.attributes.MENU_ANIMATION:\n this.menuAnimation = newValue as CalendarMenuAnimationType;\n break;\n case CALENDAR_CONSTANTS.attributes.MIN:\n this.min = newValue;\n break;\n case CALENDAR_CONSTANTS.attributes.MODE:\n this.mode = newValue as CalendarMode;\n break;\n case CALENDAR_CONSTANTS.attributes.MONTH:\n this.month = coerceNumber(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.PREVENT_FOCUS:\n this.preventFocus = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.READONLY:\n this.readonly = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.SELECTION_FOLLOWS_MONTH:\n this.selectionFollowsMonth = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.SHOW_HEADER:\n this.showHeader = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.SHOW_OTHER_MONTHS:\n this.showOtherMonths = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.SHOW_TODAY:\n this.showToday = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.TODAY_BUTTON:\n this.todayButton = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.VIEW:\n this.view = newValue as CalendarView;\n break;\n case CALENDAR_CONSTANTS.attributes.YEAR:\n this.year = coerceNumber(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.YEAR_RANGE:\n this.yearRange = newValue;\n break;\n }\n }\n\n @FoundationProperty({set: false})\n public declare activeDate: Date;\n\n @FoundationProperty()\n public declare allowSingleDateRange: boolean;\n\n @FoundationProperty()\n public declare clearButton: boolean;\n\n @FoundationProperty()\n public declare clearCallback: (() => void) | undefined;\n\n @FoundationProperty()\n public declare constrainToEnabled: boolean;\n\n @FoundationProperty()\n public declare dateBuilder: CalendarDateBuilder | undefined;\n\n @FoundationProperty()\n public declare dateSelectCallback: CalendarDateSelectCallback | undefined;\n\n @FoundationProperty()\n public declare dayBuilder: CalendarDayBuilder | undefined;\n\n @FoundationProperty()\n public declare disabledDateBuilder: ((date: Date) => boolean) | undefined;\n\n @FoundationProperty()\n public declare disabledDates: Date | Date[] | null | undefined;\n\n @FoundationProperty()\n public declare disabledDaysOfWeek: DayOfWeek | DayOfWeek[] | null | undefined;\n\n @FoundationProperty()\n public declare eventBuilder: CalendarEventBuilder | undefined;\n\n @FoundationProperty()\n public declare events: ICalendarEvent[] | null | undefined;\n\n @FoundationProperty()\n public declare firstDayOfWeek: DayOfWeek | undefined;\n\n @FoundationProperty()\n public declare fixedHeight: boolean;\n\n @FoundationProperty()\n public declare listYears: boolean;\n\n @FoundationProperty()\n public declare locale: string | undefined;\n\n @FoundationProperty()\n public declare max: Date | string | null | undefined;\n\n @FoundationProperty()\n public declare menuAnimation: CalendarMenuAnimationType;\n\n @FoundationProperty()\n public declare min: Date | string | null | undefined;\n\n @FoundationProperty()\n public declare mode: CalendarMode;\n\n @FoundationProperty()\n public declare month: number;\n\n @FoundationProperty()\n public declare preventFocus: boolean;\n\n @FoundationProperty()\n public declare readonly: boolean;\n\n @FoundationProperty()\n public declare selectionFollowsMonth: boolean;\n\n @FoundationProperty()\n public declare showHeader: boolean;\n\n @FoundationProperty()\n public declare showOtherMonths: boolean;\n\n @FoundationProperty()\n public declare showToday: boolean;\n\n @FoundationProperty()\n public declare todayButton: boolean;\n\n @FoundationProperty()\n public declare todayCallback: (() => void) | undefined;\n\n @FoundationProperty()\n public declare tooltipBuilder: CalendarTooltipBuilder | undefined;\n\n @FoundationProperty()\n public declare value: Date | Date[] | DateRange | null | undefined;\n\n @FoundationProperty()\n public declare view: CalendarView;\n\n @FoundationProperty()\n public declare weekendDays: DayOfWeek[] | null | undefined;\n\n @FoundationProperty()\n public declare year: number;\n\n @FoundationProperty()\n public declare yearRange: string;\n\n public clear(): void {\n this._foundation.clear();\n }\n\n public deselectDate(date: Date): void {\n this._foundation.deselectDate(new Date(date));\n }\n\n public goToDate(date: Date, setFocus?: boolean): void {\n this._foundation.goToDate(new Date(date), setFocus);\n }\n\n public handleKey(evt: KeyboardEvent): void {\n this._foundation.handleExternalKeyEvent(evt);\n }\n\n public layout(): void {\n this._foundation.layout();\n }\n\n public selectDate(date: Date): void {\n this._foundation.selectDate(new Date(date));\n }\n\n public setActiveDate(date: Date, setFocus?: boolean): boolean {\n return this._foundation.setActiveDate(new Date(date), setFocus);\n }\n\n public today(): void {\n this._foundation.today();\n }\n\n public toggleDate(date: Date, force?: boolean): void {\n this._foundation.toggleDate(new Date(date), force);\n }\n}\n", "import { BaseComponentDelegate, IBaseComponentDelegateConfig, IBaseComponentDelegateOptions } from '../core/delegates/base-component-delegate';\nimport { ICalendarComponent } from './calendar';\nimport { CalendarView, CALENDAR_CONSTANTS, ICalendarDateSelectEventData, ICalendarFocusChangeEventData, ICalendarMonthChangeEventData } from './calendar-constants';\n\nexport type CalendarComponentDelegateProps = Partial<ICalendarComponent>;\nexport interface ICalendarComponentDelegateOptions extends IBaseComponentDelegateOptions {}\nexport interface ICalendarComponentDelegateConfig extends IBaseComponentDelegateConfig<ICalendarComponent, ICalendarComponentDelegateOptions> {}\n\nexport class CalendarComponentDelegate extends BaseComponentDelegate<ICalendarComponent, ICalendarComponentDelegateOptions> {\n constructor(config?: ICalendarComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): ICalendarComponent {\n return document.createElement(CALENDAR_CONSTANTS.elementName);\n }\n\n public onDateSelect(listener: (evt: CustomEvent<ICalendarDateSelectEventData>) => void): void {\n this._element.addEventListener(CALENDAR_CONSTANTS.events.DATE_SELECT, listener);\n }\n\n public onFocusChange(listener: (evt: CustomEvent<ICalendarFocusChangeEventData>) => void): void {\n this._element.addEventListener(CALENDAR_CONSTANTS.events.FOCUS_CHANGE, listener);\n }\n\n public onMonthChange(listener: (evt: CustomEvent<ICalendarMonthChangeEventData>) => void): void {\n this._element.addEventListener(CALENDAR_CONSTANTS.events.MONTH_CHANGE, listener);\n }\n\n public onViewChange(listener: (evt: CustomEvent<CalendarView>) => void): void {\n this._element.addEventListener(CALENDAR_CONSTANTS.events.VIEW_CHANGE, listener);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { CalendarComponent } from './calendar';\n\nexport * from './calendar-adapter';\nexport * from './calendar-component-delegate';\nexport * from './calendar-constants';\nexport * from './calendar-dom-utils';\nexport * from './calendar-dropdown';\nexport * from './calendar-foundation';\nexport * from './calendar-locale-utils';\nexport * from './calendar-menu';\nexport * from './calendar-utils';\nexport * from './calendar';\nexport * from './core';\n\nexport function defineCalendarComponent(): void {\n defineCustomElement(CalendarComponent);\n}\n"],
5
- "mappings": "uhCAUO,SAASA,EAAcC,EAAeC,EAAcC,IAAsD,CAC/G,IAAMC,EAAgB,CAAC,EACjBC,EAAYC,EAAmB,IAAI,KAAKJ,EAAMD,EAAO,CAAC,EAAGE,CAAc,EACvEI,EAAU,IAAI,KAAKF,CAAS,EAClCE,EAAQ,QAAQF,EAAU,QAAQ,EAAIG,EAAmB,QAAQ,YAAY,EAE7E,QAAWC,EAAIJ,EAAWI,EAAIF,EAASE,EAAE,QAAQA,EAAE,QAAQ,EAAI,CAAC,EAC9DL,EAAM,KAAK,IAAI,KAAKK,CAAC,CAAC,EAExB,OAAOL,CACT,CAGO,SAASM,GAAaC,EAAYR,IAAsD,CAC7F,IAAMC,EAAgB,CAAC,EACjBC,EAAYC,EAAmBK,EAAMR,CAAc,EACnDI,EAAU,IAAI,KAAKF,CAAS,EAClCE,EAAQ,QAAQF,EAAU,QAAQ,EAAI,CAAC,EAEvC,QAAWI,EAAIJ,EAAWI,EAAIF,EAASE,EAAE,QAAQA,EAAE,QAAQ,EAAI,CAAC,EAC9DL,EAAM,KAAK,IAAI,KAAKK,CAAC,CAAC,EAExB,OAAOL,CACT,CAGO,SAASE,EAAmBK,EAAYR,IAAoD,CACjG,IAAMS,EAAMD,EAAK,OAAO,EAClBE,EAAY,IAAI,KAAKF,CAAI,EACzBG,EAAOF,GAAOT,EAAiBS,EAAMT,EAAiB,GAAKS,EAAMT,GACvE,OAAAU,EAAU,QAAQF,EAAK,QAAQ,EAAIG,CAAI,EACvCD,EAAU,SAAS,EAAG,EAAG,EAAG,CAAC,EACtBA,CACT,CAGO,SAASE,GAAkBJ,EAAYR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D,CAC5E,KAAK,SAAS,iBAAiBD,EAAmB,OAAO,YAAaC,CAAQ,CAChF,CACF,EChBO,SAASC,IAAgC,CAC9CC,GAAoBC,CAAiB,CACvC",
4
+ "sourcesContent": ["import { getEventPath, isArray, isValidDate } from '@tylertech/forge-core';\n\nimport { isSameDate } from '../core/utils/date-utils';\nimport { ICalendarMenuOption } from './calendar-menu/calendar-menu-constants';\nimport { CALENDAR_CONSTANTS, CalendarEventBuilder, DayOfWeek, ICalendarEvent, ICalendarNumberRange, ICalendarMenuMonthConfig, ICalendarMenuYearConfig, ICalendarDisabledDateParams, CalendarView } from './calendar-constants';\nimport { getLocalizedMonth, getLocalizedYear } from './calendar-locale-utils';\nimport { DateRange } from './core/date-range';\nimport { eventIncludesDate, eventIncludesElement } from './calendar-dom-utils';\n\n/** Returns an array of dates encompassing an entire month and the beginning and end of adjacent months to fill weeks. */\nexport function getMonthDates(month: number, year: number, firstDayOfWeek: DayOfWeek = DayOfWeek.Sunday): Date[] {\n const dates: Date[] = [];\n const startDate = getFirstDateOfWeek(new Date(year, month, 1), firstDayOfWeek);\n const endDate = new Date(startDate);\n endDate.setDate(startDate.getDate() + CALENDAR_CONSTANTS.numbers.MONTH_LENGTH);\n\n for (const d = startDate; d < endDate; d.setDate(d.getDate() + 1)) {\n dates.push(new Date(d));\n }\n return dates;\n}\n\n/** Returns an array of the dates in single week given a date from the week. */\nexport function getWeekDates(date: Date, firstDayOfWeek: DayOfWeek = DayOfWeek.Sunday): Date[] {\n const dates: Date[] = [];\n const startDate = getFirstDateOfWeek(date, firstDayOfWeek);\n const endDate = new Date(startDate);\n endDate.setDate(startDate.getDate() + 7);\n\n for (const d = startDate; d < endDate; d.setDate(d.getDate() + 1)) {\n dates.push(new Date(d));\n }\n return dates;\n}\n\n/** Returns the first date of the week containing the given date. */\nexport function getFirstDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek = DayOfWeek.Sunday): Date {\n const day = date.getDay();\n const firstDate = new Date(date);\n const diff = day >= firstDayOfWeek ? day - firstDayOfWeek : 7 + (day - firstDayOfWeek);\n firstDate.setDate(date.getDate() - diff);\n firstDate.setHours(0, 0, 0, 0);\n return firstDate;\n}\n\n/** Returns the last date of the week containing the given date. */\nexport function getLastDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek = DayOfWeek.Sunday): Date {\n const lastDate = getFirstDateOfWeek(date, firstDayOfWeek);\n lastDate.setDate(lastDate.getDate() + 6);\n return lastDate;\n}\n\n/** Returns the day of week of the first date of the given month. */\nexport function getFirstDayOfMonth(month: number, year: number): DayOfWeek {\n const date = new Date(year, month, 1);\n return date.getDay();\n}\n\n/** Returns an array of day strings for a week starting on the given first day of week. */\nexport function getSortedDaysOfWeek(firstDayOfWeek: DayOfWeek = DayOfWeek.Sunday): DayOfWeek[] {\n const days: DayOfWeek[] = [];\n let day = firstDayOfWeek;\n do {\n days.push(day);\n day += 1;\n day %= 7;\n } while (day !== firstDayOfWeek);\n return days;\n}\n\n/** Returns whether the given date object is today. */\nexport function isToday(date: Date): boolean {\n return isSameDate(new Date(), date);\n}\n\n/** Returns whether the given date is in a given month. */\nexport function isInMonth(date: Date, month: number, year: number): boolean {\n return date.getMonth() === month && date.getFullYear() === year;\n}\n\n/** Returns whether the given date falls between two other dates. */\nexport function isInRange(date: Date, start: Date, end: Date): boolean {\n return (date > start && date < end) || isSameDate(date, start) || isSameDate(date, end);\n}\n\n/** Sorts an array of dates from earliest to latest. */\nexport function sortDates(dates: Date[]): Date[] {\n return dates.sort((a, b) => a.getTime() - b.getTime());\n}\n\n/** Splits an array into groups of seven. */\nexport function splitIntoWeeks<T>(array: T[]): T[][] {\n const result: T[][] = [];\n for (let i = 0; i < array.length; i += 7) {\n const chunk = array.slice(i, i + 7);\n result.push(chunk);\n }\n return result;\n}\n\n/** Returns a date range from an array of dates. */\nexport function getDateRangeFromDates(dates: Date[]): DateRange {\n if (!dates.length) {\n return new DateRange();\n }\n if (dates.length === 1) {\n return new DateRange({from: new Date(dates[0])});\n }\n const minAndMax = getMinAndMaxDates(dates);\n return new DateRange({from: minAndMax[0], to: minAndMax[minAndMax.length - 1]});\n}\n\n/** Returns an array of dates from a date range. */\nexport function getDatesFromDateRange(range: DateRange): Date[] {\n const dates: Date[] = [];\n if (range.from) {\n dates.push(new Date(range.from));\n }\n if (range.to) {\n dates.push(new Date(range.to));\n }\n return dates;\n}\n\n/** Returns the earliest and latest dates in an array as an array. */\nexport function getMinAndMaxDates(dates: Date[]): Date[] {\n if (!dates.length) {\n return [];\n }\n if (dates.length === 1) {\n return [new Date(dates[0])];\n }\n const sortedDates = sortDates(dates.slice().map(d => new Date(d)));\n return [new Date(sortedDates[0]), new Date(sortedDates[sortedDates.length - 1])];\n}\n\n/** Returns an array of ICalendarDates that fall between two other dates. */\nexport function getDatesInRange(dates: Date[], start: Date, end: Date): Date[] {\n if (!start || !end) {\n return [];\n }\n return dates.filter(d => {\n return isInRange(d, start, end);\n });\n}\n\n/** Gets an accessible description of events. */\nexport function getEventDescriptions(events: ICalendarEvent[]): string {\n let description = `${events.length} event${events.length === 1 ? '' : 's'}`;\n const labels = events.map(e => e.label).join(', ');\n if (labels?.length) {\n description += `: ${labels}`;\n }\n return description;\n}\n\n/** Gets a date from a string of numbers postfixed by y, m, w, or d */\nexport function parseDateOffset(offset: string): Date {\n const date = new Date();\n const parts = offset.match(/-?[0-9]*[a-zA-Z]/g)?.map(p => p.trim()) ?? [];\n parts.forEach(p => {\n const postfix = p.slice(-1);\n const value = +p.slice(0, -1);\n switch (postfix) {\n case 'y':\n date.setFullYear(date.getFullYear() + value);\n break;\n case 'm':\n date.setMonth(date.getMonth() + value);\n break;\n case 'w':\n date.setDate(date.getDate() + value * 7);\n break;\n case 'd':\n date.setDate(date.getDate() + value);\n break;\n }\n });\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\n/** Gets a min and max year from a string of two numbers separated by : and optionally prefixed with + or - */\nexport function parseYearRange(range: string): ICalendarNumberRange {\n const parts = range.split(':');\n if (parts?.length < 2) {\n return {min: 1970, max: 1970};\n }\n const thisYear = new Date().getFullYear();\n const parsedParts = parts.slice(0, 2).map(p => {\n if (p.startsWith('-')) {\n return thisYear - +p.substring(1);\n } else if (p.startsWith('+')) {\n return thisYear + +p.substring(1);\n }\n return +p;\n });\n return {min: parsedParts[0], max: parsedParts[1]};\n}\n\n/** Gets an array of month ICalendarMenuOptions. */\nexport function getMonthOptions(config: ICalendarMenuMonthConfig): ICalendarMenuOption[] {\n const minYear = config.min?.getFullYear() ?? 0;\n const maxYear = config.max?.getFullYear() ?? 0;\n const minMonth = config.min?.getMonth() ?? -1;\n const maxMonth = config.max?.getMonth() ?? 12;\n return [...Array(12).keys()].map(k => {\n const lessThanMin = config.min ? config.selectedYear < minYear || config.selectedYear === minYear && k < minMonth : false;\n const greaterThanMax = config.max ? config.selectedYear > maxYear || config.selectedYear === maxYear && k > maxMonth : false;\n return {\n value: k,\n label: getLocalizedMonth(k, 'long', config.locale),\n selected: k === config.selectedMonth,\n disabled: lessThanMin || greaterThanMax\n };\n });\n}\n\n/** Gets an array of year ICalendarMenuOptions. */\nexport function getYearOptions(config: ICalendarMenuYearConfig): ICalendarMenuOption[] {\n const menuOptions: ICalendarMenuOption[] = [];\n const offset = config.yearInView % CALENDAR_CONSTANTS.numbers.YEARS_IN_VIEW;\n const start = config.yearInView - offset;\n for (let i = start; i < start + CALENDAR_CONSTANTS.numbers.YEARS_IN_VIEW; i++) {\n menuOptions.push({\n value: i,\n label: getLocalizedYear(i, 'numeric', config.locale),\n selected: i === config.selectedYear,\n disabled: i < config.min || i > config.max\n });\n }\n return menuOptions;\n}\n\n/** Gets an array of year ICalendarMenuOptions including every year in range. */\nexport function getAllYearOptions(config: ICalendarMenuYearConfig): ICalendarMenuOption[] {\n const menuOptions: ICalendarMenuOption[] = [];\n for (let i = config.min; i <= config.max; i++) {\n menuOptions.push({\n value: i,\n label: getLocalizedYear(i, 'numeric', config.locale),\n selected: i === config.selectedYear\n });\n }\n return menuOptions;\n}\n\n/** Checks whether a date is present in the given array. */\nexport function isSelected(date: Date, values: Date[]): boolean {\n return values.some(d => isSameDate(d, date));\n}\n\n/** Checks wheter a date is disabled. */\nexport function isDisabled(date: Date, params: ICalendarDisabledDateParams): boolean {\n if ((params.minDate && date < params.minDate) || (params.maxDate && date > params.maxDate)) {\n return true;\n }\n if (params.otherMonth) {\n return true;\n }\n if (params.disabledDates.some(d => isSameDate(d, date))) {\n return true;\n }\n if (params.disabledDaysOfWeek.includes(date.getDay())) {\n return true;\n }\n if (params.builder && params.builder(date)) {\n return true;\n }\n return false;\n}\n\n/** Returns the index of the given date in the dates array. */\nexport function getIndexOfDate(date: Date, dates: Date[]): number {\n return dates.findIndex(d => isSameDate(d, date));\n}\n\n/** Returns all the events on the given date. */\nexport function getEventsOnDate(date: Date, events: ICalendarEvent[], builder: CalendarEventBuilder | undefined): ICalendarEvent[] {\n const eventsOnDate = events.filter(e => isSameDate(e.date, date));\n if (builder) {\n const builtEvents = builder(date);\n if (builtEvents) {\n if (isArray(builtEvents)) {\n eventsOnDate.push(...builtEvents as ICalendarEvent[]);\n } else {\n eventsOnDate.push(builtEvents as ICalendarEvent);\n }\n }\n }\n return eventsOnDate;\n}\n\n/** Gets all enabled dates between the first and last items in an array of dates. */\nexport function getMultipleFromRange(dates: Date[], disabledParams?: ICalendarDisabledDateParams): Date[] {\n if (!dates.length) {\n return [];\n }\n const current = new Date(dates[0]);\n const last = dates[dates.length - 1];\n const array: Date[] = [];\n while (current <= last) {\n if (!disabledParams || !isDisabled(current, disabledParams)) {\n array.push(new Date(current));\n }\n current.setDate(current.getDate() + 1);\n }\n return array;\n}\n\n/** Gets a date or null from a date, string, or date offset. */\nexport function coerceDateFromValue(value?: Date | string | null): Date | null {\n let date: Date | null = null;\n\n if (typeof value === 'string' && !value.length) {\n value = null;\n }\n\n if (value != null) {\n if (isValidDate(new Date(value as string | Date))) {\n date = new Date(value as Date);\n } else if ((value as string).length) {\n date = parseDateOffset(value as string);\n }\n date?.setHours(0, 0, 0, 0);\n }\n\n return date;\n}\n\n/** Returns whether an event should be handled or ignored. */\nexport function shouldHandleEvent(evt: Event, view: CalendarView, preventFocus: boolean): boolean {\n return preventFocus || !getEventPath(evt).length || !!(view === 'date' && eventIncludesDate(evt)) || !!(view !== 'date' && eventIncludesElement(evt, CALENDAR_CONSTANTS.ids.MENU));\n}\n", "import { getShadowElement, removeAllChildren, appendToAttribute, toggleAttribute, toggleOnAttribute } from '@tylertech/forge-core';\n\nimport { BaseAdapter, IBaseAdapter } from '../core/base';\nimport { CALENDAR_CONSTANTS, DayOfWeek, ICalendarDateOptions, ICalendarDayOptions, ICalendarEvent, ICalendarDateConfig } from './calendar-constants';\nimport { ICalendarComponent } from './calendar';\nimport { splitIntoWeeks } from './calendar-utils';\nimport { getAccessibleHeader, getClearButton, getDateElement, getDateId, getDateRow, getDateSpacerElement, getDayElement, getEventElement, getEventWrapperElement, getEventWrapperId, getFooter, getHeader, getMonthButtonContent, getTodayButton, getTooltip, getYearButtonContent, setTabindexOnElement } from './calendar-dom-utils';\nimport { getLocalizedMonth, getLocalizedYear } from './calendar-locale-utils';\nimport { CalendarDirection, CALENDAR_MENU_CONSTANTS, ICalendarMenuOption, ICalendarMenuComponent, CalendarMenuAnimationType } from './calendar-menu';\n\nexport interface ICalendarAdapter extends IBaseAdapter {\n animateIntoSelectionMenu(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus: boolean): void;\n closeMenu(): void;\n moveMenuFocusDown(): void;\n moveMenuFocusBackward(): boolean;\n moveMenuFocusForward(): boolean;\n moveMenuFocusUp(): void;\n openMenuAsGrid(options: ICalendarMenuOption[], setFocus: boolean): void;\n openMenuAsList(options: ICalendarMenuOption[], setFocus: boolean): void;\n registerClearButtonListener(listener: (evt: Event) => void): void;\n registerDateClickListener(listener: (evt: Event) => void): void;\n registerHoverListener(listener: (evt: Event) => void): void;\n registerKeydownListener(listener: (evt: KeyboardEvent) => void): void;\n registerMenuFocusChangeEventListener(listener: (evt: CustomEvent<number>) => void): void;\n registerMenuListener(listener: (evt: CustomEvent<number>) => void): void;\n registerMonthButtonListener(listener: (evt: Event) => void): void;\n registerNextButtonListener(listener: (evt: Event) => void): void;\n registerPreventFocusListener(listener: (evt: Event) => void): void;\n registerPreviousButtonListener(listener: (evt: Event) => void): void;\n registerTodayButtonListener(listener: (evt: Event) => void): void;\n registerYearButtonListener(listener: (evt: Event) => void): void;\n removeClearButton(): void;\n removeFooter(): void;\n removeHeader(): void;\n removeTodayButton(): void;\n replaceDate(date: ICalendarDateConfig, options?: ICalendarDateOptions): void;\n replaceDateWithSpacer(date: Date): void;\n selectFocusedMenuItem(): void;\n setAllDatesUnfocusable(): void;\n setClearButton(): void;\n setContainerClass(name: string, value: boolean): void;\n setDateDisabled(date: Date, value: boolean): void;\n setDateDescription(date: Date, value?: string): void;\n setDates(dates: ICalendarDateConfig[], options?: ICalendarDateOptions): void;\n setDateSelected(date: Date, value: boolean): void;\n setDateTooltip(date: Date, value?: string): void;\n setDateViewHidden(value: boolean): void;\n setDays(days: DayOfWeek[], options?: ICalendarDayOptions): void;\n setEvent(event: ICalendarEvent, overflow?: boolean): void;\n setEventWrapperOnDate(date: Date, value: boolean): void;\n setFooter(): void;\n setHeader(): void;\n setMenuAnimation(value: CalendarMenuAnimationType): void;\n setMonth(month: number, locale?: string): void;\n setMonthButtonPressed(value: boolean): void;\n setMultiple(value: boolean): void;\n setNextButtonDisabled(value: boolean): void;\n setNextButtonLabel(label: string): void;\n setPreventFocusOnMenu(value: boolean): void;\n setPreviousButtonDisabled(value: boolean): void;\n setPreviousButtonLabel(label: string): void;\n setRange(dates: Date[] | null): void;\n setRangeEnd(date: Date | null): void;\n setRangeStart(date: Date | null): void;\n setActiveDate(date: Date, setFocus: boolean, preventFocus?: boolean): void;\n setTodayButton(): void;\n setWeekend(date: Date, value: boolean): void;\n setYear(year: number, locale?: string): void;\n setYearButtonPressed(value: boolean): void;\n toggleContainerAttribute(hasAttribute: boolean, name: string, value?: string): void;\n unregisterClearButtonListener(listener: (evt: Event) => void): void;\n unregisterDateClickListener(listener: (evt: Event) => void): void;\n unregisterHoverListener(listener: (evt: Event) => void): void;\n unregisterMenuFocusChangeEventListener(listener: (evt: CustomEvent<number>) => void): void;\n unregisterMenuListener(listener: (evt: CustomEvent) => void): void;\n unregisterMonthButtonListener(listener: (evt: Event) => void): void;\n unregisterNextButtonListener(listener: (evt: Event) => void): void;\n unregisterPreventFocusListener(listener: (evt: Event) => void): void;\n unregisterPreviousButtonListener(listener: (evt: Event) => void): void;\n unregisterTodayButtonListener(listener: (evt: Event) => void): void;\n unregisterYearButtonListener(listener: (evt: Event) => void): void;\n}\n\nexport class CalendarAdapter extends BaseAdapter<ICalendarComponent> implements ICalendarAdapter {\n private _container: HTMLElement;\n private _dateView: HTMLElement;\n private _dayRow: HTMLElement;\n private _dateGrid: HTMLElement;\n private _menu: ICalendarMenuComponent;\n\n constructor(component: ICalendarComponent) {\n super(component);\n this._container = getShadowElement(component, CALENDAR_CONSTANTS.selectors.CALENDAR);\n this._dateView = getShadowElement(component, CALENDAR_CONSTANTS.selectors.DATE_VIEW);\n this._dayRow = getShadowElement(component, CALENDAR_CONSTANTS.selectors.DAY_ROW);\n this._dateGrid = getShadowElement(component, CALENDAR_CONSTANTS.selectors.DATE_GRID);\n this._menu = getShadowElement(component, CALENDAR_CONSTANTS.selectors.MENU) as ICalendarMenuComponent;\n }\n\n public toggleContainerAttribute(hasAttribute: boolean, name: string, value?: string): void {\n toggleAttribute(this._container, hasAttribute, name, value);\n }\n\n public registerMonthButtonListener(listener: (evt: Event) => void): void {\n const monthButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.MONTH_BUTTON);\n monthButton?.addEventListener('click', listener);\n }\n\n public unregisterMonthButtonListener(listener: (evt: Event) => void): void {\n const monthButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.MONTH_BUTTON);\n monthButton?.removeEventListener('click', listener);\n }\n\n public registerYearButtonListener(listener: (evt: Event) => void): void {\n const yearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.YEAR_BUTTON);\n yearButton?.addEventListener('click', listener);\n }\n\n public unregisterYearButtonListener(listener: (evt: Event) => void): void {\n const yearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.YEAR_BUTTON);\n yearButton?.removeEventListener('click', listener);\n }\n\n public registerMenuListener(listener: (evt: CustomEvent<number>) => void): void {\n this._menu.addEventListener(CALENDAR_MENU_CONSTANTS.events.SELECT, listener);\n }\n\n public unregisterMenuListener(listener: (evt: CustomEvent<number>) => void): void {\n this._menu.removeEventListener(CALENDAR_MENU_CONSTANTS.events.SELECT, listener);\n }\n\n public registerMenuFocusChangeEventListener(listener: (evt: CustomEvent<number>) => void): void {\n this._menu.addEventListener(CALENDAR_MENU_CONSTANTS.events.FOCUS_CHANGE, listener);\n }\n\n public unregisterMenuFocusChangeEventListener(listener: (evt: CustomEvent<number>) => void): void {\n this._menu.addEventListener(CALENDAR_MENU_CONSTANTS.events.FOCUS_CHANGE, listener);\n }\n\n public registerNextButtonListener(listener: (evt: Event) => void): void {\n const nextButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.NEXT_BUTTON);\n nextButton?.addEventListener('click', listener);\n }\n\n public unregisterNextButtonListener(listener: (evt: Event) => void): void {\n const nextButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.NEXT_BUTTON);\n nextButton?.removeEventListener('click', listener);\n }\n\n public registerPreviousButtonListener(listener: (evt: Event) => void): void {\n const previousButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.PREVIOUS_BUTTON);\n previousButton?.addEventListener('click', listener);\n }\n\n public unregisterPreviousButtonListener(listener: (evt: Event) => void): void {\n const previousButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.PREVIOUS_BUTTON);\n previousButton?.removeEventListener('click', listener);\n }\n\n public registerClearButtonListener(listener: (evt: Event) => void): void {\n const clearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.CLEAR_BUTTON);\n clearButton?.addEventListener('click', listener);\n }\n\n public unregisterClearButtonListener(listener: (evt: Event) => void): void {\n const clearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.CLEAR_BUTTON);\n clearButton?.removeEventListener('click', listener);\n }\n\n public registerTodayButtonListener(listener: (evt: Event) => void): void {\n const todayButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.TODAY_BUTTON);\n todayButton?.addEventListener('click', listener);\n }\n\n public unregisterTodayButtonListener(listener: (evt: Event) => void): void {\n const todayButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.TODAY_BUTTON);\n todayButton?.removeEventListener('click', listener);\n }\n\n public registerDateClickListener(listener: (evt: Event) => void): void {\n this._dateGrid.addEventListener('click', listener);\n }\n\n public unregisterDateClickListener(listener: (evt: Event) => void): void {\n this._dateGrid.removeEventListener('click', listener);\n }\n\n public registerKeydownListener(listener: (evt: KeyboardEvent) => void): void {\n this._container.addEventListener('keydown', listener);\n }\n\n public registerHoverListener(listener: (evt: Event) => void): void {\n this._dateGrid.addEventListener('mouseover', listener);\n }\n\n public unregisterHoverListener(listener: (evt: Event) => void): void {\n this._dateGrid.removeEventListener('mouseover', listener);\n }\n\n public registerPreventFocusListener(listener: (evt: Event) => void): void {\n this._container.addEventListener('mousedown', listener);\n }\n\n public unregisterPreventFocusListener(listener: (evt: Event) => void): void {\n this._container.removeEventListener('mousedown', listener);\n }\n\n public setContainerClass(name: string, value: boolean): void {\n this._container.classList.toggle(name, value);\n }\n\n public setHeader(): void {\n const accessibleHeader = this._container.querySelector(CALENDAR_CONSTANTS.selectors.ACCESSIBLE_HEADER);\n accessibleHeader?.remove();\n\n const header = this._container.querySelector(CALENDAR_CONSTANTS.selectors.HEADER);\n if (header) {\n header.replaceWith(getHeader());\n } else {\n this._container.prepend(getHeader());\n }\n }\n\n public removeHeader(): void {\n const header = this._container.querySelector(CALENDAR_CONSTANTS.selectors.HEADER);\n header?.remove();\n\n const accessibleHeader = this._container.querySelector(CALENDAR_CONSTANTS.selectors.ACCESSIBLE_HEADER);\n if (accessibleHeader) {\n accessibleHeader.replaceWith(getAccessibleHeader());\n } else {\n this._container.prepend(getAccessibleHeader());\n }\n }\n\n public setNextButtonDisabled(value: boolean): void {\n const nextButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.NEXT_BUTTON);\n nextButton?.toggleAttribute('disabled', value);\n }\n\n public setPreviousButtonDisabled(value: boolean): void {\n const previousButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.PREVIOUS_BUTTON);\n previousButton?.toggleAttribute('disabled', value);\n }\n\n public setNextButtonLabel(label: string): void {\n const nextButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.NEXT_BUTTON);\n nextButton?.setAttribute('aria-label', label);\n\n const nextTooltip = this._container.querySelector(CALENDAR_CONSTANTS.selectors.NEXT_BUTTON_TOOLTIP);\n if (nextTooltip) {\n nextTooltip.innerHTML = label;\n }\n }\n\n public setPreviousButtonLabel(label: string): void {\n const previousButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.PREVIOUS_BUTTON);\n previousButton?.setAttribute('aria-label', label);\n\n const previousTooltip = this._container.querySelector(CALENDAR_CONSTANTS.selectors.PREVIOUS_BUTTON_TOOLTIP);\n if (previousTooltip) {\n previousTooltip.innerHTML = label;\n }\n }\n\n public setMonthButtonPressed(value: boolean): void {\n const monthButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.MONTH_BUTTON);\n if (monthButton) {\n monthButton.setAttribute('aria-pressed', value.toString());\n this._container.classList.toggle(CALENDAR_CONSTANTS.classes.MONTH_MENU_OPEN, value);\n }\n }\n\n public setYearButtonPressed(value: boolean): void {\n const yearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.YEAR_BUTTON);\n if (yearButton) {\n yearButton.setAttribute('aria-pressed', value.toString());\n this._container.classList.toggle(CALENDAR_CONSTANTS.classes.YEAR_MENU_OPEN, value);\n }\n }\n\n public setMonth(month: number, locale?: string): void {\n const monthButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.MONTH_BUTTON);\n if (monthButton) {\n const content = getMonthButtonContent(month, locale);\n monthButton.replaceChildren(content[0], content[1]);\n return;\n }\n\n const accessibleMonth = this._container.querySelector(CALENDAR_CONSTANTS.selectors.ACCESSIBLE_MONTH);\n if (accessibleMonth) {\n accessibleMonth.textContent = getLocalizedMonth(month, 'long', locale);\n }\n }\n\n public setYear(year: number, locale?: string): void {\n const yearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.YEAR_BUTTON);\n if (yearButton) {\n const content = getYearButtonContent(year, locale);\n yearButton.replaceChildren(content[0], content[1]);\n return;\n }\n\n const accessibleYear = this._container.querySelector(CALENDAR_CONSTANTS.selectors.ACCESSIBLE_YEAR);\n if (accessibleYear) {\n accessibleYear.textContent = getLocalizedYear(year, 'numeric', locale);\n }\n }\n\n public setFooter(): void {\n const footer = this._container.querySelector(CALENDAR_CONSTANTS.selectors.FOOTER);\n if (!footer) {\n this._container.appendChild(getFooter());\n }\n }\n\n public removeFooter(): void {\n const footer = this._container.querySelector(CALENDAR_CONSTANTS.selectors.FOOTER);\n footer?.parentNode?.removeChild(footer);\n }\n\n public setClearButton(): void {\n const footer = this._container.querySelector(CALENDAR_CONSTANTS.selectors.FOOTER);\n if (!footer) {\n return;\n }\n\n const clearButton = footer.querySelector(CALENDAR_CONSTANTS.selectors.CLEAR_BUTTON);\n if (!clearButton) {\n footer.prepend(getClearButton());\n }\n }\n\n public removeClearButton(): void {\n const clearButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.CLEAR_BUTTON);\n clearButton?.parentNode?.removeChild(clearButton);\n }\n\n public setTodayButton(): void {\n const footer = this._container.querySelector(CALENDAR_CONSTANTS.selectors.FOOTER);\n if (!footer) {\n return;\n }\n\n const todayButton = footer.querySelector(CALENDAR_CONSTANTS.selectors.TODAY_BUTTON);\n if (!todayButton) {\n footer.appendChild(getTodayButton());\n }\n }\n\n public removeTodayButton(): void {\n const todayButton = this._container.querySelector(CALENDAR_CONSTANTS.selectors.TODAY_BUTTON);\n todayButton?.parentNode?.removeChild(todayButton);\n }\n\n public setDays(days: DayOfWeek[], options?: ICalendarDayOptions): void {\n removeAllChildren(this._dayRow);\n days.forEach(d => {\n let element = getDayElement(d, options?.locale);\n if (options?.builder) {\n element = options.builder(d, element);\n }\n this._dayRow.appendChild(element);\n });\n }\n\n public setDates(dates: ICalendarDateConfig[], options?: ICalendarDateOptions): void {\n removeAllChildren(this._dateGrid);\n splitIntoWeeks(dates).forEach((w, i) => {\n const dateRow = getDateRow(w, i, options);\n this._dateGrid.appendChild(dateRow);\n });\n }\n\n public replaceDate(date: ICalendarDateConfig, options?: ICalendarDateOptions): void {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(date.date)}`);\n if (dateElement) {\n const element = getDateElement(date, options?.locale);\n if (options?.builder) {\n dateElement.replaceWith(options.builder(date, element));\n } else {\n dateElement.replaceWith(element);\n }\n }\n }\n\n public replaceDateWithSpacer(date: Date): void {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n dateElement?.replaceWith(getDateSpacerElement(date));\n }\n\n public setDateDisabled(date: Date, value: boolean): void {\n const element = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (element) {\n element.toggleAttribute('disabled', value);\n element.setAttribute('aria-disabled', value.toString());\n }\n }\n\n public setDateSelected(date: Date, value: boolean): void {\n const element = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (element) {\n element.classList.toggle(CALENDAR_CONSTANTS.classes.DATE_SELECTED, value);\n element.setAttribute('aria-selected', value.toString());\n }\n }\n\n public setWeekend(date: Date, value: boolean): void {\n const element = this._dateGrid.querySelector(`#${getDateId(date)}`);\n const innerElement = element?.querySelector(CALENDAR_CONSTANTS.selectors.DATE_INNER);\n if (!innerElement) {\n return;\n }\n toggleOnAttribute(innerElement as HTMLElement, 'part', CALENDAR_CONSTANTS.parts.WEEKEND, value);\n }\n\n public appendDateAttribute(date: Date, name: string, value: string): void {\n const element = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (element) {\n appendToAttribute(element as HTMLElement, name, value);\n }\n }\n\n public setMultiple(value: boolean): void {\n this._dateView.setAttribute('aria-multiselectable', value.toString());\n }\n\n public setDateViewHidden(value: boolean): void {\n toggleAttribute(this._dateView, value, 'aria-hidden', value.toString());\n this.setAllDatesUnfocusable();\n }\n\n // #endregion\n\n // #region Range\n\n public setRange(dates: Date[] | null): void {\n const oldDateElements = this._dateGrid.querySelectorAll(CALENDAR_CONSTANTS.selectors.RANGE);\n oldDateElements.forEach(e => e.classList.remove(CALENDAR_CONSTANTS.classes.RANGE));\n\n if (!dates) {\n return;\n }\n\n dates.forEach(d => {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(d)}`);\n dateElement?.classList.add(CALENDAR_CONSTANTS.classes.RANGE);\n });\n }\n\n public setRangeStart(date: Date | null): void {\n const oldDateElement = this._dateGrid.querySelector(CALENDAR_CONSTANTS.selectors.RANGE_START);\n oldDateElement?.classList.remove(CALENDAR_CONSTANTS.classes.RANGE_START);\n\n if (!date) {\n return;\n }\n\n const newDateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n newDateElement?.classList.add(CALENDAR_CONSTANTS.classes.RANGE_START);\n }\n\n public setRangeEnd(date: Date | null): void {\n const oldDateElement = this._dateGrid.querySelector(CALENDAR_CONSTANTS.selectors.RANGE_END);\n oldDateElement?.classList.remove(CALENDAR_CONSTANTS.classes.RANGE_END);\n\n if (!date) {\n return;\n }\n\n const newDateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n newDateElement?.classList.add(CALENDAR_CONSTANTS.classes.RANGE_END);\n }\n\n public setActiveDate(date: Date, setFocus: boolean, preventFocus?: boolean): void {\n const dateString = date.toDateString();\n const elements = this._dateGrid.querySelectorAll(CALENDAR_CONSTANTS.selectors.DATE);\n elements.forEach(e => {\n const shouldFocus = e.getAttribute(CALENDAR_CONSTANTS.attributes.DATA_DATE) === dateString;\n setTabindexOnElement(e as HTMLElement, shouldFocus ? 0 : -1, setFocus, preventFocus);\n });\n }\n\n public setAllDatesUnfocusable(): void {\n const elements = this._dateGrid.querySelectorAll(CALENDAR_CONSTANTS.selectors.DATE);\n elements.forEach(e => setTabindexOnElement(e as HTMLElement, -1, false, true));\n }\n\n public setDateDescription(date: Date, value?: string): void {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (!dateElement) {\n return;\n }\n toggleAttribute(dateElement as HTMLElement, !!value, value as string);\n }\n\n public setDateTooltip(date: Date, value?: string): void {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (!dateElement) {\n return;\n }\n const tooltip = dateElement.querySelector(CALENDAR_CONSTANTS.selectors.TOOLTIP);\n if (tooltip) {\n if (value?.length) {\n tooltip.textContent = value;\n } else {\n tooltip.remove();\n }\n } else if (value?.length) {\n dateElement.prepend(getTooltip(value));\n }\n }\n\n public setEventWrapperOnDate(date: Date, value: boolean): void {\n const dateElement = this._dateGrid.querySelector(`#${getDateId(date)}`);\n if (!dateElement) {\n return;\n }\n const eventWrapper = dateElement.querySelector(CALENDAR_CONSTANTS.selectors.EVENT_WRAPPER);\n if (eventWrapper) {\n if (value) {\n removeAllChildren(eventWrapper);\n } else {\n eventWrapper.remove();\n }\n } else if (value) {\n dateElement.appendChild(getEventWrapperElement(date));\n }\n }\n\n public setEvent(event: ICalendarEvent, overflow?: boolean): void {\n const eventWrapper = this._dateGrid.querySelector(`#${getEventWrapperId(event.date)}`);\n eventWrapper?.appendChild(getEventElement(event, overflow));\n }\n\n public openMenuAsGrid(options: ICalendarMenuOption[], setFocus: boolean): void {\n this._menu.openAsGrid(options, setFocus);\n }\n\n public openMenuAsList(options: ICalendarMenuOption[], setFocus: boolean): void {\n this._menu.openAsList(options, setFocus);\n }\n\n public closeMenu(): void {\n this._menu.close();\n }\n\n public setMenuAnimation(value: CalendarMenuAnimationType): void {\n this._menu.animationType = value;\n }\n\n public animateIntoSelectionMenu(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus: boolean): void {\n this._menu.animateIn(options, direction, setFocus);\n }\n\n public moveMenuFocusDown(): void {\n this._menu.moveFocusDown();\n }\n\n public moveMenuFocusBackward(): boolean {\n return this._menu.moveFocusBackward();\n }\n\n public moveMenuFocusForward(): boolean {\n return this._menu.moveFocusForward();\n }\n\n public moveMenuFocusUp(): void {\n this._menu.moveFocusUp();\n }\n\n public selectFocusedMenuItem(): void {\n this._menu.selectFocusedItem();\n }\n\n public setPreventFocusOnMenu(value: boolean): void {\n this._menu.preventFocus = value;\n }\n}\n", "import { ICustomElementFoundation, isArray, isDefined, isValidDate } from '@tylertech/forge-core';\n\nimport { ICalendarDate, ICalendarDisabledDateParams, ICalendarFocusChangeEventData, ICalendarMenuMonthConfig, ICalendarMenuYearConfig, ICalendarNumberRange, CALENDAR_CONSTANTS, CalendarDisabledDateBuilder, CalendarEventBuilder, CalendarMode, CalendarMonthFocus, CalendarView, DayOfWeek, ICalendarDateSelectEventData, RangeSelectionState, CalendarDateBuilder, CalendarDayBuilder, CalendarDateSelectCallback, ICalendarEvent, CalendarTooltipBuilder, ICalendarDateConfig } from './calendar-constants';\nimport { isDisabled, isSelected, getAllYearOptions, getDateRangeFromDates, getDatesFromDateRange, getDatesInRange, getEventDescriptions, getEventsOnDate, getFirstDateOfWeek, getIndexOfDate, getLastDateOfWeek, getMinAndMaxDates, getMonthDates, getMonthOptions, getMultipleFromRange, getSortedDaysOfWeek, getYearOptions, isInMonth, isToday, parseYearRange, sortDates, coerceDateFromValue, shouldHandleEvent } from './calendar-utils';\nimport { getFirstDayOfWeekForLocale, getLocalizedMonth, getLocalizedYear, getWeekendDaysForLocale, isRtlLocale } from './calendar-locale-utils';\nimport { eventIncludesDate } from './calendar-dom-utils';\nimport { ICalendarAdapter } from './calendar-adapter';\nimport { DateRange } from './core/date-range';\nimport { ICalendarBase } from './core/calendar-base';\nimport { CalendarMenuAnimationType, ICalendarMenuOption } from './calendar-menu';\nimport { getLastDateOfMonth, getMonthLength, isSameDate } from '../core/utils/date-utils';\n\nexport interface ICalendarFoundation extends ICalendarBase, ICustomElementFoundation {\n mode: CalendarMode;\n view: CalendarView;\n preventFocus: boolean;\n selectionFollowsMonth: boolean;\n showHeader: boolean;\n menuAnimation: CalendarMenuAnimationType;\n clearButton: boolean;\n todayButton: boolean;\n clearCallback: (() => void) | undefined;\n todayCallback: (() => void) | undefined;\n tooltipBuilder: CalendarTooltipBuilder | undefined;\n clear(): void;\n today(): void;\n selectDate(date: Date, setFocus?: boolean): void;\n deselectDate(date: Date, setFocus?: boolean): void;\n toggleDate(date: Date, force?: boolean): void;\n goToDate(date: Date, setFocus?: boolean): void;\n setActiveDate(date: Date, setFocus?: boolean): boolean;\n handleExternalKeyEvent(evt: KeyboardEvent): void;\n layout(): void;\n}\n\nexport class CalendarFoundation implements ICalendarFoundation {\n // Dates\n private _dates: Date[] = [];\n private _month: number = new Date().getMonth();\n private _year: number = new Date().getFullYear();\n private _focusedDate: Date;\n private _showToday = true;\n private _showOtherMonths = false;\n private _fixedHeight = false;\n private _events: ICalendarEvent[] = [];\n private _dateBuilder: CalendarDateBuilder | undefined;\n private _dayBuilder: CalendarDayBuilder | undefined;\n private _tooltipBuilder: CalendarTooltipBuilder | undefined;\n private _eventBuilder: CalendarEventBuilder | undefined;\n \n // Selection\n private _value: Date[] = [];\n private _mode: CalendarMode = 'single';\n private _readonly = false;\n private _selectionFollowsMonth = false;\n private _dateSelectCallback: CalendarDateSelectCallback | undefined;\n\n // Range\n private _rangeSelectionStore: DateRange | undefined; // Temporarily set when a date range is set as the value, to maintain to and from\n private _rangeSelectionState: RangeSelectionState = 'none';\n private _allowSingleDateRange = true;\n\n // Disabled dates\n private _min: Date | null = null;\n private _max: Date | null = null;\n private _minAttribute: string | null = null;\n private _maxAttribute: string | null = null;\n private _disabledDates: Date[] = [];\n private _disabledDaysOfWeek: DayOfWeek[] = [];\n private _constrainToEnabled = true;\n private _disabledDateBuilder: CalendarDisabledDateBuilder | undefined;\n\n // Header and footer\n private _showHeader = true;\n private _clearButton = false;\n private _todayButton = false;\n private _clearCallback: (() => void) | undefined;\n private _todayCallback: (() => void) | undefined;\n \n // Menu\n private _view: CalendarView = 'date';\n private _menuAnimation: CalendarMenuAnimationType = 'scale';\n private _menuYear: number | null = null;\n private _listYears = true;\n private _menuIncludedYear: number = new Date().getFullYear();\n private _menuYearsInView: ICalendarNumberRange | null = null;\n private _yearRange = `-${CALENDAR_CONSTANTS.numbers.DEFAULT_MIN_YEAR_OFFSET}:+${CALENDAR_CONSTANTS.numbers.DEFAULT_MAX_YEAR_OFFSET}`;\n private _minYear: number; // This and _maxYear will be set in the initializer\n private _maxYear: number;\n\n // Localization\n private _locale: string | undefined;\n private _firstDayOfWeek: DayOfWeek | undefined;\n private _weekendDays: DayOfWeek[] | null = null;\n private _localeFirstDayOfWeek: DayOfWeek = DayOfWeek.Sunday;\n private _localeWeekendDays: DayOfWeek[] = [];\n private _rtl = false;\n\n // Core\n private _preventFocus = false;\n private _isInitialized = false;\n \n // Listeners\n private _clearButtonListener: (evt: Event) => void;\n private _dateClickListener: (evt: Event) => void;\n private _hoverListener: (evt: Event) => void;\n private _keydownListener: (evt: KeyboardEvent) => void;\n private _menuFocusChangeListener: (evt: CustomEvent<number>) => void;\n private _menuListener: (evt: CustomEvent<number>) => void;\n private _monthButtonListener: (evt: Event) => void;\n private _nextButtonListener: (evt: Event) => void;\n private _preventFocusListener: (evt: Event) => void;\n private _previousButtonListener: (evt: Event) => void;\n private _todayButtonListener: (evt: Event) => void;\n private _yearButtonListener: (evt: Event) => void;\n\n constructor(private _adapter: ICalendarAdapter) {\n this._clearButtonListener = () => this._onClearClicked();\n this._dateClickListener = evt => this._onDateClick(evt);\n this._keydownListener = evt => this._onKeydown(evt);\n this._hoverListener = evt => this._onHover(evt);\n this._menuFocusChangeListener = evt => this._onMenuFocusChange(evt);\n this._menuListener = evt => this._onMenuSelect(evt);\n this._monthButtonListener = () => this._onMonthButtonClicked();\n this._nextButtonListener = () => this._onNextButtonClicked();\n this._preventFocusListener = evt => evt.preventDefault();\n this._previousButtonListener = () => this._onPreviousButtonClicked();\n this._todayButtonListener = () => this._onTodayClicked();\n this._yearButtonListener = () => this._onYearButtonClicked();\n }\n\n public initialize(): void {\n this._adapter.registerMenuListener(this._menuListener);\n this._adapter.registerMenuFocusChangeEventListener(this._menuFocusChangeListener);\n this._adapter.registerKeydownListener(this._keydownListener);\n this._applyMin();\n this._applyMax();\n this._applyFixedHeight();\n this._applyReadOnly();\n this._applyShowToday();\n this._applyPreventFocus();\n this._applyShowHeader();\n this._applyMonth();\n this._applyYear();\n this._applyListYears();\n this._applyMenuAnimation();\n this._applyLocale();\n this._applyClearButton();\n this._applyTodayButton();\n this._applyFirstDayOfWeek();\n this._applyShowOtherMonths();\n this._createDateView();\n this._applyConstrainToEnabled();\n this._applyAllowSingleDateRange();\n this._applyMode();\n this._applyYearRange();\n this._applySelectionFollowsMonth();\n\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n this._isInitialized = false;\n }\n\n private _onMonthButtonClicked(): void {\n this._toggleMonthMenu();\n }\n\n private _toggleMonthMenu(setFocus = false): void {\n if (this._view !== 'month') {\n this._openMonthMenu(setFocus);\n } else {\n this._closeMenu(false, setFocus);\n }\n }\n\n private _onYearButtonClicked(): void {\n this._toggleYearMenu();\n }\n\n private _toggleYearMenu(setFocus = false): void {\n if (this._view !== 'year') {\n this._openYearMenu(setFocus);\n } else {\n this._closeMenu(false, setFocus);\n }\n }\n\n private _onMenuFocusChange(evt: CustomEvent<number>): void {\n this._emitFocusChangeEvent(evt.detail);\n }\n\n private _onMenuSelect(evt: CustomEvent<number>): void {\n switch (this._view) {\n case 'month':\n this._onMonthSelected(evt.detail);\n break;\n case 'year':\n this._onYearSelected(evt.detail);\n break;\n }\n }\n\n private _onNextButtonClicked(): void {\n if (this._view === 'date') {\n this._goToNextMonth();\n this._setFocusInMonth(CalendarMonthFocus.First, false);\n } else if (this._view === 'month') {\n this._goToNextYear();\n } else {\n this._goToNextSetOfYears();\n }\n }\n\n private _onPreviousButtonClicked(): void {\n if (this._view === 'date') {\n this._goToPreviousMonth();\n this._setFocusInMonth(CalendarMonthFocus.Last, false);\n } else if (this._view === 'month') {\n this._goToPreviousYear();\n } else {\n this._goToPreviousSetOfYears();\n }\n }\n\n private _onHover(evt: Event): void {\n if (this._mode === 'range') {\n const element = eventIncludesDate(evt, false);\n if (!element) {\n return;\n }\n const date = new Date(Date.parse(element.getAttribute(CALENDAR_CONSTANTS.attributes.DATA_DATE) as string));\n if (isInMonth(date, this._month, this._year)) {\n this._setRangePreview(date);\n }\n }\n }\n\n private _onDateClick(evt: Event): void {\n const element = eventIncludesDate(evt, false);\n if (!element) {\n return;\n }\n const dateString = element.getAttribute(CALENDAR_CONSTANTS.attributes.DATA_DATE);\n if (!dateString) {\n return;\n }\n const date = new Date(dateString);\n if (isInMonth(date, this._month, this._year)) {\n // Move the tab index to this date\n this._focusedDate = date;\n this._beforeDateSelected(date);\n }\n this._resumeTabindexOnDate(false);\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n switch(evt.key) {\n case 'ArrowLeft':\n case 'ArrowRight':\n case 'ArrowUp':\n case 'ArrowDown':\n this._handleArrowKey(evt);\n break;\n case 'Home':\n case 'End':\n case 'PageUp':\n case 'PageDown':\n this._handleNavigationKey(evt);\n break;\n case ' ':\n case 'Enter':\n this._handleEnterOrSpaceKey(evt);\n break;\n case 'm':\n case 'M':\n evt.preventDefault();\n this._toggleMonthMenu(true);\n break;\n case 'y':\n case 'Y':\n evt.preventDefault();\n this._toggleYearMenu(true);\n break;\n case 't':\n case 'T':\n case 'n':\n case 'N':\n evt.preventDefault();\n this.today();\n break;\n case 'Delete':\n case 'Backspace':\n evt.preventDefault();\n this._deselectAllDates();\n break;\n case 'Escape':\n if (this._view !== 'date') {\n evt.preventDefault();\n evt.stopPropagation();\n this._closeMenu(false, true);\n }\n break;\n }\n }\n\n /**\n * Runs locale specific logic to handle focus on an arrow key event.\n * @param evt A keyboard event containing an arrow key\n */\n private _handleArrowKey(evt: KeyboardEvent): void {\n if (!shouldHandleEvent(evt, this._view, this._preventFocus)) {\n return;\n }\n\n evt.preventDefault();\n let direction: 'next' | 'previous' | 'up' | 'down' | undefined;\n switch(evt.key) {\n case 'ArrowLeft':\n direction = this._rtl ? 'next' : 'previous';\n break;\n case 'ArrowRight':\n direction = this._rtl ? 'previous' : 'next';\n break;\n case 'ArrowUp':\n direction = 'up';\n break;\n case 'ArrowDown':\n direction = 'down';\n break;\n }\n\n switch(direction) {\n case 'previous':\n if (this._view === 'date') {\n this._moveFocusToPreviousDate(true);\n } else if (!this._adapter.moveMenuFocusBackward() && this._canGoBackward()) {\n if (this._view === 'month') {\n this._goToPreviousYear(true);\n } else {\n this._goToPreviousSetOfYears(true);\n }\n }\n break;\n case 'next':\n if (this._view === 'date') {\n this._moveFocusToNextDate(true);\n } else if (!this._adapter.moveMenuFocusForward() && this._canGoForward()) {\n if (this._view === 'month') {\n this._goToNextYear(true);\n } else {\n this._goToNextSetOfYears(true);\n }\n }\n break;\n case 'up':\n if (this._view === 'date') {\n this._moveFocusToPreviousWeek(true);\n } else {\n this._adapter.moveMenuFocusUp();\n }\n break;\n case 'down':\n if (this._view === 'date') {\n this._moveFocusToNextWeek(true);\n } else {\n this._adapter.moveMenuFocusDown();\n }\n break;\n }\n\n if (this._mode === 'range') {\n this._setRangePreview(this._focusedDate);\n }\n }\n\n /** Moves between months and years if allowed.\n * @param evt A keyboard evt containing the page up, page down, home, or end key\n */\n private _handleNavigationKey(evt: KeyboardEvent): void {\n evt.preventDefault();\n switch(evt.key) {\n case 'Home':\n if (this._view !== 'date') {\n break;\n }\n if (evt.shiftKey) {\n this._moveFocusToFirstOfMonth(true);\n } else {\n this._moveFocusToFirstOfWeek(true);\n }\n break;\n case 'End':\n if (this._view !== 'date') {\n break;\n }\n if (evt.shiftKey) {\n this._moveFocusToLastOfMonth(true);\n } else {\n this._moveFocusToLastOfWeek(true);\n }\n break;\n case 'PageUp':\n if (this._view === 'date') {\n if (evt.shiftKey) {\n\n this._moveFocusToPreviousYear(true);\n } else {\n this._moveFocusToPreviousMonth(true);\n }\n } else if (this._view === 'month' && !evt.shiftKey && this._canGoBackward()) {\n this._goToPreviousYear(true);\n } else if (this._view === 'year' && !evt.shiftKey && this._canGoBackward()) {\n this._goToPreviousSetOfYears(true);\n }\n break;\n case 'PageDown':\n if (this._view === 'date') {\n if (evt.shiftKey) {\n this._moveFocusToNextYear(true);\n } else {\n this._moveFocusToNextMonth(true);\n }\n } else if (this._view === 'month' && !evt.shiftKey && this._canGoForward()) {\n this._goToNextYear(true);\n } else if (this._view === 'year' && !evt.shiftKey && this._canGoForward()) {\n this._goToNextSetOfYears(true);\n }\n break;\n }\n }\n\n /**\n * Selects or deselects the focused date or menu option if allowed.\n * @param evt A keyboard event containing the enter or space key\n */\n private _handleEnterOrSpaceKey(evt: KeyboardEvent): void {\n if (!shouldHandleEvent(evt, this._view, this._preventFocus)) {\n return;\n }\n\n evt.preventDefault();\n switch(this._view) {\n case 'date':\n if (this._readonly) {\n break;\n }\n this._setSelectOnFocusedDate();\n break;\n case 'month':\n case 'year':\n this._adapter.selectFocusedMenuItem();\n break;\n }\n }\n\n private _onMonthSelected(month: number): void {\n const yearChanged = this._year !== this._menuYear;\n if (yearChanged && this._menuYear != null) {\n this._year = this._menuYear;\n this._setYear();\n }\n this._month = month;\n this._setMonth(true);\n this._trySetValueMonthAndYear(this._month, this._year, 'month');\n this._closeMenu(true);\n }\n\n private _onYearSelected(year: number): void {\n this._year = year;\n this._setYear(true);\n this._trySetValueMonthAndYear(this._month, this._year, 'year');\n this._closeMenu(true);\n }\n\n private _onClearClicked(): void {\n this.clear();\n }\n\n private _onTodayClicked(): void {\n this.today();\n }\n\n /** Attempts to the month and year of the value in single mode, then emits a selection event */\n private _trySetValueMonthAndYear(month: number, year: number, type: CalendarView = 'date'): void {\n if (!this.selectionFollowsMonth || this._mode !== 'single' || !this._value?.length) {\n return;\n }\n\n const newDate = new Date(this._value[0]);\n const lastDay = getMonthLength(month, year);\n newDate.setDate(Math.min(newDate.getDate(), lastDay));\n newDate.setFullYear(year);\n newDate.setMonth(month);\n\n if (isDisabled(newDate, this._getDisabledDateParams())) {\n return;\n }\n\n this._beforeDateSelected(newDate, type);\n }\n\n /** Sets initial date tabindex and focus to today or the first enabled date in view */\n private _setInitialDateFocus(setFocus = false): void {\n const today = new Date();\n if (isInMonth(today, this._month, this._year) && !isDisabled(today, this._getDisabledDateParams(false))) {\n this._setFocusedDate(today, setFocus);\n return;\n }\n const firstDay = new Date(this._year, this._month, 1);\n this._setFocusedDate(this._getNextEnabledDate(firstDay, 1, false, true, true), setFocus);\n }\n\n /** Attempts to move the tabindex to the most recently focused date, returning whether the date was found in view */\n private _resumeTabindexOnDate(setFocus: boolean): boolean {\n if (isInMonth(this._focusedDate, this._month, this._year)) {\n this._adapter.setActiveDate(this._focusedDate, setFocus, this._preventFocus);\n this._emitFocusChangeEvent(this._focusedDate);\n return true;\n }\n return false;\n }\n\n /** Moves the tabindex to the next date */\n private _moveFocusToNextDate(setFocus: boolean): void {\n this._setFocusedDate(this._getNextEnabledDate(this._focusedDate), setFocus);\n }\n\n /** Moves the tabindex to the previous date */\n private _moveFocusToPreviousDate(setFocus: boolean): void {\n this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate), setFocus);\n }\n\n /** Moves the tabindex to the next week */\n private _moveFocusToNextWeek(setFocus: boolean): void {\n this._setFocusedDate(this._getNextEnabledDate(this._focusedDate, 7, true), setFocus);\n }\n\n /** Moves the tabindex to the previous week */\n private _moveFocusToPreviousWeek(setFocus: boolean): void {\n this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate, 7, true), setFocus);\n }\n\n /** Moves the tabindex to the first selectable date of the week containing the current tabindex */\n private _moveFocusToFirstOfWeek(setFocus: boolean): void {\n this._setFocusedDate(this._getFirstEnabledDayOfWeek(this._focusedDate, true), setFocus);\n }\n\n /** Moves the tabindex to the last selectable date of the week containing the current tabindex */\n private _moveFocusToLastOfWeek(setFocus: boolean): void {\n this._setFocusedDate(this._getLastEnabledDayOfWeek(this._focusedDate, true), setFocus);\n }\n\n /** Moves the tabindex to the first date of the month */\n private _moveFocusToFirstOfMonth(setFocus: boolean): void {\n const firstOfMonth = new Date(this._year, this._month, 1);\n this._setFocusedDate(this._getNextEnabledDate(firstOfMonth, 1, false, true), setFocus);\n }\n\n /** Moves the tabindex to the last date of the month */\n private _moveFocusToLastOfMonth(setFocus: boolean): void {\n const lastOfMonth = new Date(this._year, this._month + 1, 0);\n this._setFocusedDate(this._getPreviousEnabledDate(lastOfMonth, 1, false, true), setFocus);\n }\n\n /** Moves the tabindex to the same day and week of the next month */\n private _moveFocusToNextMonth(setFocus: boolean): void {\n const index = getIndexOfDate(this._focusedDate, this._dates);\n const destinationMonth = (this._month + 1) % 12;\n const destinationYear = destinationMonth === 0 ? this._year + 1 : this._year;\n this._setFocusedDate(this._getDateAtIndexInMonth(index, destinationMonth, destinationYear), setFocus);\n }\n\n /** Moves the tabindex to the same day and week of the previous month */\n private _moveFocusToPreviousMonth(setFocus: boolean): void {\n const index = getIndexOfDate(this._focusedDate, this._dates);\n const destinationMonth = this._month === 0 ? 11 : this._month - 1;\n const destinationYear = destinationMonth === 11 ? this._year - 1 : this._year;\n this._setFocusedDate(this._getDateAtIndexInMonth(index, destinationMonth, destinationYear), setFocus);\n }\n\n /** Moves the tabindex to the same day, week, and month of the next year */\n private _moveFocusToNextYear(setFocus: boolean): void {\n const index = getIndexOfDate(this._focusedDate, this._dates);\n this._setFocusedDate(this._getDateAtIndexInMonth(index, this._month, this._year + 1), setFocus);\n }\n\n /** Moves the tabindex to the same day, week, and month of the previous year */\n private _moveFocusToPreviousYear(setFocus: boolean): void {\n const index = getIndexOfDate(this._focusedDate, this._dates);\n this._setFocusedDate(this._getDateAtIndexInMonth(index, this._month, this._year - 1), setFocus);\n }\n\n /** Sets the focusable date when a new month comes into view */\n private _setFocusInMonth(focus: CalendarMonthFocus, setFocus: boolean): void {\n switch (focus) {\n case CalendarMonthFocus.First:\n this._moveFocusToFirstOfMonth(setFocus);\n break;\n case CalendarMonthFocus.Last:\n this._moveFocusToLastOfMonth(setFocus);\n break;\n default:\n this._resumeTabindexOnDate(setFocus);\n break;\n }\n }\n\n /** Selects or deselects the focused date */\n private _setSelectOnFocusedDate(): void {\n if (isInMonth(this._focusedDate, this._month, this._year) && !isDisabled(this._focusedDate, this._getDisabledDateParams(false))) {\n this._beforeDateSelected(this._focusedDate);\n }\n }\n\n /** Emits a focus change event */\n private _emitFocusChangeEvent(value: Date | number): void {\n const eventData: Partial<ICalendarFocusChangeEventData> = {\n type: this._view,\n value\n };\n switch (this._view) {\n case 'date':\n eventData.selected = isSelected(value as Date, this._value);\n eventData.text = (value as Date).toLocaleDateString(this.locale, {month: 'long', day: '2-digit', year: 'numeric'});\n break;\n case 'month':\n eventData.selected = this._month === value;\n eventData.text = getLocalizedMonth(value as number, 'long');\n break;\n case 'year':\n eventData.selected = this._year === value;\n eventData.text = getLocalizedYear(value as number, 'numeric');\n break;\n }\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.FOCUS_CHANGE, eventData);\n }\n\n /**\n * Finds the previous enabled date.\n * @param start The date to search backward from\n * @param step A number of dates to skip at each step, defaults to 1\n * @param stepOnce Whether to use the step amount once and then continue sequentially, defaults to false\n * @param includeStart Whether to first check and potentially return the start date, defaults to false\n * @returns The previous enabled date or null if none found\n */\n private _getPreviousEnabledDate(start: Date, step = 1, stepOnce = false, includeStart = false, inMonth = false): Date | null {\n const disabledParams = this._getDisabledDateParams();\n const current = new Date(start);\n if (includeStart && !isDisabled(current, disabledParams)) {\n return current;\n }\n\n const month = start.getMonth();\n let outsideBounds = false;\n do {\n current.setDate(current.getDate() - step);\n if (stepOnce) {\n step = 1;\n }\n if ((inMonth && current.getMonth() !== month) || (this._min && current < this._min)) {\n outsideBounds = true;\n }\n } while (!outsideBounds && isDisabled(current, disabledParams));\n return outsideBounds ? null : current;\n }\n\n /**\n * Finds the previous enabled date.\n * @param start The date to search forward from\n * @param step A number of dates to skip at each step, defaults to 1\n * @param stepOnce Whether to use the step amount once and then continue sequentially, defaults to false\n * @param includeStart Whether to first check and potentially return the start date, defaults to false\n * @returns The next enabled date or null if none found\n */\n private _getNextEnabledDate(start: Date, step = 1, stepOnce = false, includeStart = false, inMonth = false): Date | null {\n const disabledParams = this._getDisabledDateParams();\n const current = new Date(start);\n if (includeStart && !isDisabled(current, disabledParams)) {\n return current;\n }\n\n const month = start.getMonth();\n let outsideBounds = false;\n do {\n current.setDate(current.getDate() + step);\n if (stepOnce) {\n step = 1;\n }\n if ((inMonth && current.getMonth() !== month) || (this._max && current > this._max)) {\n outsideBounds = true;\n }\n } while (!outsideBounds && isDisabled(current, disabledParams));\n return outsideBounds ? null : current;\n }\n\n /**\n * Finds the closest enabled date.\n * @param start The date to begin searching from\n * @param includeStart Whether to first check and potentially return the start date, defaults to false\n * @returns The closest enabled date or null if none found\n */\n private _getClosestEnabledDate(start: Date, inMonth = false, includeStart = false): Date | null {\n if (this._min && start < this._min) {\n return this._getFirstEnabledDate();\n } else if (this._max && start > this._max) {\n return this._getLastEnabledDate();\n }\n\n const disabledParams = this._getDisabledDateParams();\n if (includeStart && !isDisabled(start, disabledParams)) {\n return new Date(start);\n }\n const startDate = start.getDate();\n let current: Date;\n let overMax = false;\n let underMin = false;\n let index = 1;\n while (!overMax || !underMin) {\n if (!overMax) {\n current = new Date(start);\n current.setDate(startDate + index);\n overMax = !isInMonth(current, start.getMonth(), start.getFullYear());\n if (!overMax && !isDisabled(current, disabledParams)) {\n return current;\n } else if (this._max && current > this._max) {\n overMax = true;\n }\n }\n if (!underMin) {\n current = new Date(start);\n current.setDate(startDate - index);\n underMin = !isInMonth(current, start.getMonth(), start.getFullYear());\n if (!underMin && !isDisabled(current, disabledParams)) {\n return current;\n } else if (this._min && current < this._min) {\n underMin = true;\n }\n }\n index += 1;\n }\n return null;\n }\n\n /**\n * Finds the first enabled date of a week.\n * @param date A date that falls in the requested week\n * @returns The first enabled date of the week or null if none found\n */\n private _getFirstEnabledDayOfWeek(date: Date, inMonth = true): Date | null {\n const current = getFirstDateOfWeek(date);\n const disabledParams = this._getDisabledDateParams(inMonth ? current.getMonth() !== date.getMonth() || current.getFullYear() !== date.getFullYear() : undefined);\n let index = 0;\n while (index < 7 && isDisabled(current, disabledParams)) {\n current.setDate(current.getDate() + 1);\n disabledParams.otherMonth = inMonth ? current.getMonth() !== date.getMonth() || current.getFullYear() !== date.getFullYear() : undefined;\n index += 1;\n }\n return index < 7 ? current : null;\n }\n\n /**\n * Finds the last enabled date of a week.\n * @param date A date that falls in the requested week\n * @returns The last enabled date of the week or null if none found\n */\n private _getLastEnabledDayOfWeek(date: Date, inMonth = true): Date | null {\n const current = getLastDateOfWeek(date);\n const disabledParams = this._getDisabledDateParams(inMonth ? current.getMonth() !== date.getMonth() || current.getFullYear() !== date.getFullYear() : undefined);\n let index = 0;\n while (index < 7 && isDisabled(current, disabledParams)) {\n current.setDate(current.getDate() - 1);\n disabledParams.otherMonth = inMonth ? current.getMonth() !== date.getMonth() || current.getFullYear() !== date.getFullYear() : undefined;\n index += 1;\n }\n return index < 7 ? current : null;\n }\n\n /**\n * Finds an enabled date with the same index in another month, skipping forward or back one week if that date falls in an adjacent month.\n * @param index The index to look up\n * @param month The month to look up\n * @param year The year of the month\n * @returns An enabled date with the same index plus or minus a week, the nearest enabled date, or null if no enabled date was found\n */\n private _getDateAtIndexInMonth(index: number, month: number, year: number): Date | null {\n const monthDates = getMonthDates(month, year, this._firstDayOfWeek ?? this._localeFirstDayOfWeek);\n // If outside the min or max date pick the first or last enabled date\n if (this._min && monthDates[index] < this._min) {\n return this._getFirstEnabledDate();\n } else if (this._max && monthDates[index] > this._max) {\n return this._getLastEnabledDate();\n }\n\n // If the index is in another month go forward or back a week based on which half of the month the index is nearest\n if (isInMonth(monthDates[index], month, year)) {\n return this._getClosestEnabledDate(monthDates[index], true);\n }\n return index < 20 ? this._getNextEnabledDate(monthDates[index], 7, true) : this._getPreviousEnabledDate(monthDates[index], 7, true);\n }\n\n /**\n * Finds the first enabled date.\n * @returns This first enabled date or null if a min date isn't set\n */\n private _getFirstEnabledDate(): Date | null {\n if (!this._min) {\n return null;\n }\n return this._getNextEnabledDate(this._min, 1, false, true);\n }\n\n /**\n * Finds the last enabled date.\n * @returns This last enabled date or null if a max date isn't set\n */\n private _getLastEnabledDate(): Date | null {\n if (!this._max) {\n return null;\n }\n return this._getPreviousEnabledDate(this._max, 1, false, true);\n }\n\n /**\n * Moves the month in view to a date, sets focus on the date, and emits a focus change event.\n * @param date The date to focus or null if focus should not move\n * @param setFocus Whether to truly focus the date element versus just setting its tabindex\n * @returns Void\n */\n private _setFocusedDate(date: Date | null, setFocus: boolean): void {\n if (!date) {\n return;\n }\n const monthChanged = this._month !== date.getMonth();\n const yearChanged = this._year !== date.getFullYear();\n if (monthChanged || yearChanged) {\n if (monthChanged) {\n this._month = date.getMonth();\n this._setMonth();\n }\n if (yearChanged) {\n this._year = date.getFullYear();\n this._setYear();\n }\n this._resetDateGrid();\n }\n this._focusedDate = date;\n this._adapter.setActiveDate(this._focusedDate, setFocus, this._preventFocus);\n this._emitFocusChangeEvent(this._focusedDate);\n }\n\n /**\n * Gets disabled date params.\n * @param otherMonth Whether the date is outside the month in view - only set if needed\n * @returns An ICalendarDisabledDateParams object\n */\n private _getDisabledDateParams(otherMonth?: boolean): ICalendarDisabledDateParams {\n return {\n builder: this._disabledDateBuilder,\n disabledDates: this._disabledDates,\n disabledDaysOfWeek: this._disabledDaysOfWeek,\n maxDate: this._max,\n minDate: this._min,\n otherMonth\n };\n }\n\n /**\n * Builds dates for the period in view, sets them to the DOM, and enables focus on one of them.\n */\n private _createDateView(): void {\n this._resetDateGrid();\n if (!this._focusedDate || !this._resumeTabindexOnDate(false)) {\n this._setInitialDateFocus();\n }\n }\n\n /**\n * Initiates month navigation and opens the month menu on the year in view.\n */\n private _openMonthMenu(setFocus = false): void {\n this._view = 'month';\n if (this._menuYear == null) {\n this._menuYear = this._year;\n }\n if (this._showHeader) {\n this._setNavButtonLabels();\n this._adapter.setMonthButtonPressed(true);\n this._adapter.setYearButtonPressed(false);\n }\n this._adapter.openMenuAsGrid(this._getMonthsForMenu(), setFocus);\n this._adapter.setDateViewHidden(true);\n this._setNavigationButtonStates();\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.VIEW_CHANGE, this._view);\n }\n\n /**\n * Initiates year navigation and opens the year menu.\n */\n private _openYearMenu(setFocus = false): void {\n this._view = 'year';\n this._menuIncludedYear = this._menuYear ?? this._year;\n if (this._showHeader) {\n this._setNavButtonLabels();\n this._adapter.setMonthButtonPressed(false);\n this._adapter.setYearButtonPressed(true);\n }\n if (this._listYears) {\n this._adapter.openMenuAsList(this._getYearsForMenu(), setFocus);\n } else {\n this._adapter.openMenuAsGrid(this._getYearsForMenu(), setFocus);\n }\n this._adapter.setDateViewHidden(true);\n this._setNavigationButtonStates();\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.VIEW_CHANGE, this._view);\n }\n\n /**\n * Gets the months to display in the menu.\n * @returns An array of ICalendarMenuOptions containing months\n */\n private _getMonthsForMenu(): ICalendarMenuOption[] {\n const config: ICalendarMenuMonthConfig = {\n locale: this._locale,\n max: this._max,\n min: this._min,\n selectedMonth: this._year === this._menuYear ? this._month : -1,\n selectedYear: this._menuYear ?? this._year\n };\n return getMonthOptions(config);\n }\n\n /**\n * Gets the years to display in the menu, either a slice of visible years or all possible years.\n * @returns An array of ICalendarMenuOptions containing years\n */\n private _getYearsForMenu(): ICalendarMenuOption[] {\n const min = this._min ? this._min.getFullYear() : this._minYear;\n const max = this._max ? this._max.getFullYear() : this._maxYear;\n\n const config: ICalendarMenuYearConfig = {\n locale: this._locale,\n max,\n min,\n selectedYear: this._year,\n yearInView: this._menuIncludedYear\n };\n const options = this._listYears ? getAllYearOptions(config) : getYearOptions(config);\n this._menuYearsInView = { min: options[0].value, max: options[options.length - 1].value };\n return options;\n }\n\n /**\n * Closes the menu and reapplies labels and focus for the date view.\n * @param valueSelected Whether the user made a selection that requires the date view to be rebuilt\n */\n private _closeMenu(valueSelected?: boolean, setFocus = false): void {\n this._view = 'date';\n this._menuYear = null;\n this._adapter.closeMenu();\n this._adapter.setDateViewHidden(false);\n this._adapter.setYear(this._year, this._locale);\n if (valueSelected) {\n this._resetDateGrid();\n }\n if (this._showHeader) {\n this._setNavButtonLabels();\n this._setNavigationButtonStates();\n this._adapter.setMonthButtonPressed(false);\n this._adapter.setYearButtonPressed(false);\n }\n if (!this._resumeTabindexOnDate(setFocus)) {\n this._setInitialDateFocus(setFocus);\n }\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.VIEW_CHANGE, this._view);\n }\n\n /**\n * Sets the labels on the previous and next buttons appropriate for the view.\n */\n private _setNavButtonLabels(): void {\n switch(this._view) {\n case 'date':\n this._adapter.setPreviousButtonLabel('Previous month');\n this._adapter.setNextButtonLabel('Next month');\n break;\n case 'month':\n this._adapter.setPreviousButtonLabel('Previous year');\n this._adapter.setNextButtonLabel('Next year');\n break;\n case 'year':\n this._adapter.setPreviousButtonLabel('Previous years');\n this._adapter.setNextButtonLabel('Next years');\n break;\n }\n }\n\n /**\n * Rebuilds all dates and resets the date grid.\n * */\n private _resetDateGrid(): void {\n this._dates = getMonthDates(this._month, this._year, this._firstDayOfWeek ?? this._localeFirstDayOfWeek);\n\n const dateConfigs: ICalendarDateConfig[] = this._dates.map(d => this._getDateConfig(d));\n this._adapter.setDates(dateConfigs, { builder: this._dateBuilder, locale: this._locale, showOtherMonths: this._showOtherMonths});\n\n this._setNavigationButtonStates();\n this._applyWeekendDays();\n this._applyEvents();\n\n if (this._mode === 'range') {\n this._adapter.setRangeStart(this._value[0]);\n this._setRangePreview();\n }\n }\n\n /**\n * Creates a date config object from the given date.\n * @param date The date\n * @returns A date config\n */\n private _getDateConfig(date: Date): ICalendarDateConfig {\n const thisMonth = isInMonth(date, this._month, this._year);\n const config: ICalendarDateConfig = {\n date: new Date(date),\n selected: isSelected(date, this._value),\n today: isToday(date),\n thisMonth,\n disabled: isDisabled(date, this._getDisabledDateParams(!thisMonth))\n };\n return config;\n }\n\n /**\n * Creates a calendar date object from the given date.\n * @param date The date\n * @returns A calendar date object\n */\n private _getCalendarDate(date: Date): ICalendarDate {\n return {\n date: new Date(date),\n selected: isSelected(date, this._value),\n events: getEventsOnDate(date, this._events, this._eventBuilder)\n };\n }\n\n /**\n * Sets events to display on a date in the DOM, including overflow and tooltips.\n * @param date The date to set events on\n */\n private _setEventsOnDate(date: Date): void {\n if (!this._showOtherMonths && !isInMonth(date, this._month, this._year)) {\n this._adapter.setEventWrapperOnDate(date, false);\n return;\n }\n\n const events: ICalendarEvent[] = getEventsOnDate(date, this._events, this._eventBuilder);\n this._adapter.setEventWrapperOnDate(date, !!events.length);\n events.forEach((e, i) => {\n if (i > 2) {\n return;\n }\n this._adapter.setEvent(e, i === 2 && events.length > 3);\n });\n let description = events.length ? getEventDescriptions(events) : '';\n if (this._tooltipBuilder) {\n description = this._tooltipBuilder(this._getCalendarDate(date), description) ?? '';\n }\n this._adapter.setDateTooltip(date, description);\n }\n\n /**\n * Provides a hook to intercept date selection events.\n * @param date The date that was selected\n * */\n private _beforeDateSelected(date: Date, type: CalendarView = 'date'): void {\n if (this._dateSelectCallback) {\n Promise.resolve(this._dateSelectCallback(this._getCalendarDate(date))).then(res => {\n if (res) {\n this._onDateSelected(date, undefined, type);\n }\n });\n } else {\n this._onDateSelected(date, undefined, type);\n }\n }\n\n /**\n * Runs mode dependent logic to manage selected dates and emit selection events.\n * @param date The date that was selected\n * @param force Whether the date should be selected or deselected, regardless of its prior state (optional)\n * */\n private _onDateSelected(date: Date, force?: boolean, type: CalendarView = 'date'): void {\n if (this._mode === 'range' && this._emitRangeSelectionEvent(date)) {\n this._applyRangeSelection(date);\n this._rangeSelectionStore = undefined;\n return;\n }\n\n const selected = isSelected(date, this._value);\n const event: ICalendarDateSelectEventData = {\n date: new Date(date),\n selected,\n type\n };\n const isAllowed = this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.DATE_SELECT, event, true, true);\n\n if (!isAllowed) {\n return;\n }\n this._rangeSelectionStore = undefined;\n\n if (this._mode === 'single') {\n if ((selected && !force) || force === false) {\n this._deselectDate(date);\n } else if (force === undefined || force === true) {\n if (this._value.length) {\n this._deselectDate(this._value[0]);\n }\n this._selectDate(date);\n }\n } else {\n if ((selected && !force) || force === false) {\n this._deselectDate(date);\n } else if (force === undefined || force === true) {\n this._selectDate(date);\n }\n }\n\n sortDates(this._value);\n }\n\n /**\n * Emits a date select event with range data.\n * @param date The selected date.\n * @returns True if the event was not cancelled.\n */\n private _emitRangeSelectionEvent(date: Date): boolean {\n const event: ICalendarDateSelectEventData = {\n date: new Date(date),\n selected: isSelected(date, this._value),\n type: 'date'\n };\n\n // Build the event without affecting the calendar's state\n switch (this._rangeSelectionState) {\n case 'none':\n case 'to':\n event.range = getDateRangeFromDates([date]);\n event.rangeSelectionState = 'from';\n break;\n case 'from':\n if (isSameDate(date, this._value[0])) {\n if (this._allowSingleDateRange) {\n event.range = getDateRangeFromDates([this._value[0], date]);\n event.rangeSelectionState = 'to';\n } else {\n event.range = getDateRangeFromDates([]);\n event.rangeSelectionState = 'none';\n }\n } else if (date < this._value[0]) {\n event.range = getDateRangeFromDates([date]);\n event.rangeSelectionState = 'from';\n } else {\n event.range = getDateRangeFromDates([this._value[0], date]);\n event.rangeSelectionState = 'to';\n }\n break;\n }\n\n return this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.DATE_SELECT, event, true, true);\n }\n\n /**\n * Manages the current selection state and value from a selection when in range mode.\n * @param date The selected date\n * */\n private _applyRangeSelection(date: Date): void {\n switch (this._rangeSelectionState) {\n case 'none':\n case 'to':\n this._deselectAllDates();\n this._selectDate(date);\n this._adapter.setRange(null);\n this._adapter.setRangeStart(date);\n this._rangeSelectionState = 'from';\n break;\n case 'from':\n if (isSameDate(date, this._value[0])) {\n if (this._allowSingleDateRange) {\n this._value.push(date);\n this._rangeSelectionState = 'to';\n } else {\n this._deselectDate(date);\n this._rangeSelectionState = 'none';\n }\n } else if (date < this._value[0]) {\n this._deselectDate(this._value[0]);\n this._selectDate(date);\n this._adapter.setRangeStart(date);\n } else {\n this._selectDate(date);\n this._setRangePreview(date);\n this._rangeSelectionState = 'to';\n }\n break;\n }\n }\n\n /**\n * Sets the properties to display range selections.\n * @param toDate The date that the range preview should end on if an end date isn't already selected (optional)\n * */\n private _setRangePreview(toDate?: Date): void {\n switch (this._rangeSelectionState) {\n case 'from':\n if (!toDate) {\n return;\n }\n if (toDate < this._value[0]) {\n this._adapter.setRange(null);\n } else {\n this._adapter.setRange(getDatesInRange(this._dates, this._value[0], toDate));\n this._adapter.setRangeEnd(toDate);\n }\n break;\n case 'to':\n this._adapter.setRange(getDatesInRange(this._dates, this._value[0], this._value[1]));\n this._adapter.setRangeEnd(this._value[1]);\n break;\n }\n }\n\n /**\n * Removes the range preview.\n */\n private _clearRangePreview(): void {\n this._adapter.setRange(null);\n this._adapter.setRangeStart(null);\n this._adapter.setRangeEnd(null);\n }\n\n /**\n * Adds a date to the value array and sets it selected in the adapter.\n * @param date The date to select\n * */\n private _selectDate(date: Date): void {\n this._value.push(date);\n this._focusedDate = date;\n this._adapter.setDateSelected(date, true);\n }\n\n /**\n * Removes a date from the value array and sets it deselected in the adapter.\n * @param date The date to deselect\n * */\n private _deselectDate(date: Date): void {\n const index = this._value.findIndex(d => isSameDate(d, date));\n if (index > -1) {\n this._value.splice(index, 1);\n }\n this._adapter.setDateSelected(date, false);\n }\n\n /**\n * Clears the value array and sets all dates deselected in the adapter.\n * */\n private _deselectAllDates(): void {\n this._value.forEach(d => this._adapter.setDateSelected(d, false));\n this._clearRangePreview();\n this._value = [];\n }\n\n /**\n * Moves to and sets tabindex on the given date.\n * @param date The destination date\n * @param setFocus Whether focus should be set on the date\n * */\n private _goToDate(date: Date, setFocus: boolean): void {\n const year = date.getFullYear();\n const month = date.getMonth();\n this._focusedDate = date;\n if (this._year !== year || this._month !== month) {\n this._month = month;\n this._setMonth();\n this._year = year;\n this._setYear();\n if (this._view !== 'date') {\n this._closeMenu(false, setFocus);\n } else {\n this._resetDateGrid();\n }\n } else if (this._view !== 'date') {\n this._closeMenu(false, setFocus);\n }\n this._adapter.setActiveDate(date, setFocus, this._preventFocus);\n this._emitFocusChangeEvent(this._focusedDate);\n }\n\n /**\n * Moves forward one month and rebuilds the calendar dates to match.\n * */\n private _goToNextMonth(): void {\n if (this._month < 11) {\n this._month += 1;\n } else {\n this._month = 0;\n this._year += 1;\n this._setYear();\n }\n this._setMonth();\n this._resetDateGrid();\n }\n\n /**\n * Moves backward one month and rebuilds the calendar dates to match.\n * */\n private _goToPreviousMonth(): void {\n if (this._month > 0) {\n this._month -= 1;\n } else {\n this._month = 11;\n this._year -= 1;\n this._setYear();\n }\n this._setMonth();\n this._resetDateGrid();\n }\n\n /**\n * Moves forward one year.\n * */\n private _goToNextYear(setFocus = false): void {\n if (this._view === 'month') {\n if (this._menuYear) {\n this._menuYear += 1;\n this._setMenuYear();\n }\n this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(), this._rtl ? 'left' : 'right', setFocus);\n } else {\n this._year += 1;\n this._setYear();\n this._resetDateGrid();\n }\n }\n\n /**\n * Moves backward one year.\n * */\n private _goToPreviousYear(setFocus = false): void {\n if (this._view === 'month') {\n if (this._menuYear) {\n this._menuYear -= 1;\n this._setMenuYear();\n }\n this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(), this._rtl ? 'right' : 'left', setFocus);\n } else {\n this._year -= 1;\n this._setYear();\n this._resetDateGrid();\n }\n }\n \n /**\n * Moves to the next set of selectable years in grid view.\n * */\n private _goToNextSetOfYears(setFocus = false): void {\n this._menuIncludedYear += CALENDAR_CONSTANTS.numbers.YEARS_IN_VIEW;\n this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(), this._rtl ? 'left' : 'right', setFocus);\n this._setNavigationButtonStates();\n }\n\n /**\n * Move to the previous set of selectable years in grid view.\n * */\n private _goToPreviousSetOfYears(setFocus = false): void {\n this._menuIncludedYear -= CALENDAR_CONSTANTS.numbers.YEARS_IN_VIEW;\n this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(), this._rtl ? 'right' : 'left', setFocus);\n this._setNavigationButtonStates();\n }\n\n /**\n * Checks whether the minimum navigable date occurs before the current period.\n * @param forceConstrain Whether to ignore the ability to view dates before the min\n * @returns Whether periods before the one in view are navigable\n */\n private _canGoBackward(forceConstrain?: false): boolean {\n if (!forceConstrain && !this._constrainToEnabled) {\n return true;\n }\n switch (this._view) {\n case 'date':\n return !this._min || this._min < new Date(this._year, this._month, 1);\n case 'month':\n const minDateYear = this._min?.getFullYear();\n return this._menuYear != null && (minDateYear == null || minDateYear < this._menuYear);\n case 'year':\n return !!this._menuYearsInView && this._minYear < this._menuYearsInView.min;\n default:\n return false;\n }\n }\n\n /**\n * Checks whether the maximum navigable date occurs after the current period.\n * @param forceConstrain Whether to ignore the ability to view dates after the max\n * @returns Whether periods after the one in view are navigable\n */\n private _canGoForward(forceConstrain?: false): boolean {\n if (!forceConstrain && !this._constrainToEnabled) {\n return true;\n }\n switch (this._view) {\n case 'date':\n return !this._max || this._max > getLastDateOfMonth(this._month, this._year);\n case 'month':\n const maxDateYear = this._max?.getFullYear();\n return this._menuYear != null && (maxDateYear == null || maxDateYear > this._menuYear);\n case 'year':\n return !!this._menuYearsInView && this._maxYear > this._menuYearsInView.max;\n default:\n return false;\n }\n }\n\n /**\n * Enables or disabled navigation buttons based on whether they would lead outside the range of enabled dates.\n */\n private _setNavigationButtonStates(): void {\n if (!this._showHeader) {\n return;\n }\n\n if (!this._constrainToEnabled) {\n this._adapter.setPreviousButtonDisabled(false);\n this._adapter.setNextButtonDisabled(false);\n return;\n }\n\n this._adapter.setPreviousButtonDisabled(!this._canGoBackward());\n this._adapter.setNextButtonDisabled(!this._canGoForward());\n }\n\n /**\n * Sets the month text and attribute in the adapter.\n * @param userSelected Whether the month was explicitly selected by the user (optional)\n * */\n private _setMonth(userSelected?: boolean): void {\n this._adapter.setMonth(this._month, this._locale);\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.MONTH, this._month.toString());\n if (this._isInitialized) {\n this._setNavigationButtonStates();\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.MONTH_CHANGE, {month: this._month, userSelected: userSelected ?? false, year: this._year});\n }\n }\n\n /**\n * Sets the year text and attribute in the adapter.\n * @param userSelected Whether the year was explicilty selected by the user (optional)\n * */\n private _setYear(userSelected?: boolean): void {\n this._adapter.setYear(this._year, this._locale);\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.YEAR, this._year.toString());\n if (this._isInitialized) {\n this._setNavigationButtonStates();\n this._adapter.emitHostEvent(CALENDAR_CONSTANTS.events.MONTH_CHANGE, {month: this._month, userSelected: userSelected ?? false, year: this._year});\n }\n }\n\n /**\n * Sets the year currently visible in the menu.\n * */\n private _setMenuYear(): void {\n if (this._menuYear != null) {\n this._setNavigationButtonStates();\n this._adapter.setYear(this._menuYear, this._locale);\n }\n }\n\n private _applyAllowSingleDateRange(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.ALLOW_SINGLE_DATE_RANGE, this._allowSingleDateRange);\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.ALLOW_SINGLE_DATE_RANGE, this._allowSingleDateRange);\n }\n\n private _applyClearButton(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.CLEAR_BUTTON, true, this._clearButton.toString());\n\n if (!this._clearButton) {\n this._adapter.unregisterClearButtonListener(this._clearButtonListener);\n this._adapter.removeClearButton();\n\n if (!this._todayButton) {\n this._adapter.removeFooter();\n }\n } else {\n this._adapter.setFooter();\n this._adapter.setClearButton();\n this._adapter.registerClearButtonListener(this._clearButtonListener);\n }\n }\n\n private _applyConstrainToEnabled(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.CONSTRAIN_TO_ENABLED, true, this._constrainToEnabled.toString());\n\n if (this._isInitialized) {\n this._setNavigationButtonStates();\n }\n }\n\n private _applyDateBuilder(): void {\n if (this._view === 'date') {\n this._resetDateGrid();\n this._resumeTabindexOnDate(false);\n }\n }\n\n private _applyDayBuilder(): void {\n this._adapter.setDays(getSortedDaysOfWeek(this._firstDayOfWeek ?? this._localeFirstDayOfWeek), { builder: this._dayBuilder, locale: this._locale });\n }\n\n private _applyDisabledDates(): void {\n switch (this._view) {\n case 'date':\n this._dates.forEach(d => {\n const inMonth = isInMonth(d, this._month, this._year);\n const disabledParams = this._getDisabledDateParams(!inMonth);\n this._adapter.setDateDisabled(d, isDisabled(d, disabledParams));\n });\n break;\n case 'month':\n this._openMonthMenu();\n break;\n case 'year':\n this._openYearMenu();\n break;\n }\n this._setNavigationButtonStates();\n }\n\n private _applyEvents(): void {\n if (this._view !== 'date') {\n return;\n }\n this._dates.forEach(d => {\n this._setEventsOnDate(d);\n });\n }\n\n private _applyFirstDayOfWeek(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.FIRST_DAY_OF_WEEK, isDefined(this._firstDayOfWeek), (this._firstDayOfWeek ?? 0).toString());\n this._adapter.setDays(getSortedDaysOfWeek(this._firstDayOfWeek ?? this._localeFirstDayOfWeek), { builder: this._dayBuilder, locale: this._locale });\n\n if (this._isInitialized && this._view === 'date') {\n this._resetDateGrid();\n this._resumeTabindexOnDate(false);\n }\n }\n\n private _applyFixedHeight(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.FIXED_HEIGHT, this._fixedHeight);\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.FIXED_HEIGHT, this._fixedHeight);\n }\n\n private _applyListYears(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.LIST_YEARS, this._listYears);\n\n if (this._isInitialized && this._view === 'year') {\n this._openYearMenu();\n }\n }\n\n private _applyLocale(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.LOCALE, !!this._locale, this._locale);\n this._adapter.toggleContainerAttribute(!!this._locale, 'lang', this._locale);\n this._localeFirstDayOfWeek = getFirstDayOfWeekForLocale(this._locale);\n this._localeWeekendDays = getWeekendDaysForLocale(this._locale);\n this._applyRtl();\n\n if (this._isInitialized) {\n this._adapter.setMonth(this._month, this._locale);\n this._adapter.setYear(this._year, this._locale);\n\n switch (this._view) {\n case 'date':\n this._adapter.setDays(getSortedDaysOfWeek(this._firstDayOfWeek ?? this._localeFirstDayOfWeek), { builder: this._dayBuilder, locale: this._locale });\n this._resetDateGrid();\n this._resumeTabindexOnDate(false);\n break;\n case 'month':\n this._openMonthMenu();\n break;\n case 'year':\n this._openYearMenu();\n break;\n }\n }\n }\n\n private _applyMenuAnimation(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.MENU_ANIMATION, this._menuAnimation);\n this._adapter.setMenuAnimation(this._menuAnimation);\n }\n\n private _applyMin(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.MIN, !!this._minAttribute, this._minAttribute as string);\n\n if (this._isInitialized) {\n this._applyDisabledDates();\n\n if (this._min && this._min > this._focusedDate) {\n const firstEnabledDate = this._getFirstEnabledDate();\n if (firstEnabledDate) {\n this._goToDate(firstEnabledDate, false);\n }\n }\n }\n }\n\n private _applyMax(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.MAX, !!this._maxAttribute, this._maxAttribute as string);\n\n if (this._isInitialized) {\n this._applyDisabledDates();\n\n if (this._max && this._max < this._focusedDate) {\n const lastEnabledDate = this._getLastEnabledDate();\n if (lastEnabledDate) {\n this._goToDate(lastEnabledDate, false);\n }\n }\n }\n }\n\n private _applyMode(oldMode?: CalendarMode): void {\n switch (this._mode) {\n case 'single':\n this._applySingleMode();\n break;\n case 'multiple':\n this._applyMultipleMode(oldMode === 'range');\n break;\n case 'range':\n this._applyRangeMode();\n break;\n }\n\n if (this._mode !== 'range') {\n this._rangeSelectionState = 'none';\n this._adapter.unregisterHoverListener(this._hoverListener);\n this._clearRangePreview();\n }\n }\n\n private _applySingleMode(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.MODE, 'single');\n this._adapter.setMultiple(false);\n\n if (this._value.length > 1) {\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = this._value.length - 2; i >= 0; i -= 1) {\n this._deselectDate(this._value[i]);\n }\n }\n }\n\n private _applyMultipleMode(fromRange = false): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.MODE, 'multiple');\n this._adapter.setMultiple(true);\n\n if (fromRange) {\n const newDates = getMultipleFromRange(this._value, this._getDisabledDateParams());\n this._deselectAllDates();\n newDates.forEach(d => {\n this._selectDate(d);\n });\n }\n }\n\n private _applyRangeMode(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.MODE, 'range');\n this._adapter.setMultiple(false);\n\n const newValue = getMinAndMaxDates(this._value);\n this._deselectAllDates();\n newValue.forEach(d => {\n this._selectDate(d);\n });\n\n this._rangeSelectionState = this._value[0] ? this._value[1] ? 'to' : 'from' : 'none';\n this._adapter.registerHoverListener(this._hoverListener);\n this._adapter.setRange(getDatesInRange(this._dates, this._value[0], this._value[1]));\n this._adapter.setRangeStart(this._value[0] ?? null);\n this._adapter.setRangeEnd(this._value[1] ?? null);\n }\n\n private _applyMonth(): void {\n this._setMonth();\n if (this._isInitialized && this._view === 'date') {\n this._resetDateGrid();\n this._moveFocusToFirstOfMonth(false);\n }\n }\n\n private _applyPreventFocus(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.PREVENT_FOCUS, this._preventFocus);\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.PREVENT_FOCUS, this._preventFocus);\n this._adapter.setPreventFocusOnMenu(this._preventFocus);\n if (this._preventFocus) {\n this._adapter.registerPreventFocusListener(this._preventFocusListener);\n } else {\n this._adapter.unregisterPreventFocusListener(this._preventFocusListener);\n }\n if (this._isInitialized && this._view === 'date') {\n this._resumeTabindexOnDate(false);\n }\n }\n\n private _applyReadOnly(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.READONLY, this._readonly);\n this._adapter.toggleHostAttribute('aria-readonly', this._readonly, 'true');\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.READONLY, this._readonly);\n\n if (this._readonly) {\n this._adapter.unregisterDateClickListener(this._dateClickListener);\n this._adapter.unregisterHoverListener(this._hoverListener);\n } else {\n this._adapter.registerDateClickListener(this._dateClickListener);\n if (this._mode === 'range') {\n this._adapter.registerHoverListener(this._hoverListener);\n }\n }\n }\n\n private _applyRtl(): void {\n this._rtl = isRtlLocale(this._locale);\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.RTL, this._rtl);\n this._adapter.toggleContainerAttribute(this._rtl, 'dir', 'rtl');\n }\n\n private _applySelectionFollowsMonth(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.SELECTION_FOLLOWS_MONTH, this._selectionFollowsMonth.toString());\n }\n\n private _applyShowHeader(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.SHOW_HEADER, this._showHeader, this._showHeader.toString());\n\n if (this._showHeader) {\n this._adapter.setHeader();\n this._adapter.registerMonthButtonListener(this._monthButtonListener);\n this._adapter.registerNextButtonListener(this._nextButtonListener);\n this._adapter.registerPreviousButtonListener(this._previousButtonListener);\n this._adapter.registerYearButtonListener(this._yearButtonListener);\n this._setNavButtonLabels();\n } else {\n this._adapter.unregisterMonthButtonListener(this._monthButtonListener);\n this._adapter.unregisterNextButtonListener(this._nextButtonListener);\n this._adapter.unregisterPreviousButtonListener(this._previousButtonListener);\n this._adapter.unregisterYearButtonListener(this._yearButtonListener);\n this._adapter.removeHeader();\n }\n\n if (this._isInitialized) {\n this._adapter.setMonth(this._month, this._locale);\n this._adapter.setYear(this._year, this._locale);\n this._setNavigationButtonStates();\n }\n }\n\n private _applyShowOtherMonths(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.SHOW_OTHER_MONTHS, this._showOtherMonths);\n\n if (this._isInitialized && this._view === 'date') {\n let skipFinalWeek = false;\n this._dates.forEach((d, i) => {\n if (isInMonth(d, this._month, this._year)) {\n return;\n }\n if (i === CALENDAR_CONSTANTS.numbers.PENULTIMATE_WEEK_BEGIN_INDEX || i === CALENDAR_CONSTANTS.numbers.FINAL_WEEK_BEGIN_INDEX) {\n skipFinalWeek = true;\n }\n if (this._showOtherMonths && !skipFinalWeek) {\n this._adapter.replaceDate(this._getDateConfig(d), { builder: this._dateBuilder, locale: this._locale });\n } else {\n this._adapter.replaceDateWithSpacer(d);\n }\n this._setEventsOnDate(d);\n this._applyWeekendDays();\n });\n }\n }\n\n private _applyShowToday(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.SHOW_TODAY, this._showToday);\n this._adapter.setContainerClass(CALENDAR_CONSTANTS.classes.SHOW_TODAY, this._showToday);\n }\n\n private _applyTodayButton(): void {\n this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.TODAY_BUTTON, true, this._todayButton.toString());\n\n if (!this._todayButton) {\n this._adapter.unregisterTodayButtonListener(this._todayButtonListener);\n this._adapter.removeTodayButton();\n\n if (!this._clearButton) {\n this._adapter.removeFooter();\n }\n } else {\n this._adapter.setFooter();\n this._adapter.setTodayButton();\n this._adapter.registerTodayButtonListener(this._todayButtonListener);\n }\n }\n\n private _applyTooltipBuilder(): void {\n if (this._view === 'date') {\n this._dates.forEach(d => {\n if (!this._showOtherMonths && !isInMonth(d, this._month, this._year)) {\n return;\n }\n const events = getEventsOnDate(d, this._events, this._eventBuilder);\n let tooltipContent = getEventDescriptions(events);\n if (this._tooltipBuilder) {\n tooltipContent = this._tooltipBuilder(this._getCalendarDate(d), tooltipContent) ?? '';\n }\n this._adapter.setDateTooltip(d, tooltipContent);\n });\n }\n }\n\n private _applyWeekendDays(): void {\n const weekendDays = this._weekendDays ?? this._localeWeekendDays;\n if (this._view === 'date') {\n this._dates.forEach(d => {\n const day = d.getDay();\n this._adapter.setWeekend(d, (this._showOtherMonths || isInMonth(d, this._month, this._year)) && weekendDays.includes(day));\n });\n }\n }\n\n private _applyValue(newValue: Date[]): void {\n newValue = newValue.map(d => new Date(d));\n sortDates(newValue);\n this._deselectAllDates();\n newValue.forEach(d => this._selectDate(d));\n\n if (this._mode === 'range') {\n this._rangeSelectionState = this._value.length === 2 ? 'to' : this._value.length === 1 ? 'from' : 'none';\n this._clearRangePreview();\n this._adapter.setRangeStart(this._value[0]);\n this._setRangePreview();\n }\n }\n\n private _applyView(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.VIEW, this._view);\n\n switch (this._view) {\n case 'date':\n this._closeMenu();\n break;\n case 'month':\n this._openMonthMenu();\n break;\n case 'year':\n this._openYearMenu();\n break;\n }\n }\n\n private _applyYear(): void {\n this._setYear();\n if (this._isInitialized && this._view === 'date') {\n this._resetDateGrid();\n this._moveFocusToFirstOfMonth(false);\n }\n }\n\n private _applyYearRange(): void {\n this._adapter.setHostAttribute(CALENDAR_CONSTANTS.attributes.YEAR_RANGE, this._yearRange);\n const range = parseYearRange(this._yearRange);\n this._minYear = range.min;\n this._maxYear = range.max;\n if (this._view === 'year') {\n this._openYearMenu();\n this._setNavigationButtonStates();\n }\n }\n\n /** Get the currently focused date */\n public get activeDate(): Date {\n return new Date(this._focusedDate);\n }\n\n /** Get/set whether single date ranges are allowed */\n public get allowSingleDateRange(): boolean {\n return this._allowSingleDateRange;\n }\n public set allowSingleDateRange(value: boolean) {\n if (this._allowSingleDateRange !== value) {\n this._allowSingleDateRange = value;\n this._applyAllowSingleDateRange();\n }\n }\n\n /** Get/set whether to show the clear button */\n public get clearButton(): boolean {\n return this._clearButton;\n }\n public set clearButton(value: boolean) {\n if (this._clearButton !== value) {\n this._clearButton = value;\n\n if (this._isInitialized) {\n this._applyClearButton();\n }\n }\n }\n\n /* Get/set the clear button callback */\n public get clearCallback(): (() => void) | undefined {\n return this._clearCallback;\n }\n public set clearCallback(value: (() => void) | undefined) {\n this._clearCallback = value;\n }\n\n /** Get/set whether to constain navigation to enabled dates */\n public get constrainToEnabled(): boolean {\n return this._constrainToEnabled;\n }\n public set constrainToEnabled(value: boolean) {\n if (this._constrainToEnabled !== value) {\n this._constrainToEnabled = value;\n\n if (this._isInitialized) {\n this._applyConstrainToEnabled();\n }\n }\n }\n\n /** Get/set date builder */\n public get dateBuilder(): CalendarDateBuilder | undefined {\n return this._dateBuilder;\n }\n public set dateBuilder(value: CalendarDateBuilder | undefined) {\n this._dateBuilder = value;\n\n if (this._isInitialized) {\n this._applyDateBuilder();\n }\n }\n\n /** Get/set date select callback */\n public get dateSelectCallback(): CalendarDateSelectCallback | undefined {\n return this._dateSelectCallback;\n }\n public set dateSelectCallback(value: CalendarDateSelectCallback | undefined) {\n this._dateSelectCallback = value;\n }\n\n /** Get/set day builder */\n public get dayBuilder(): CalendarDayBuilder | undefined {\n return this.dayBuilder;\n }\n public set dayBuilder(value: CalendarDayBuilder | undefined) {\n this._dayBuilder = value;\n\n if (this._isInitialized) {\n this._applyDayBuilder();\n }\n }\n\n /** Get/set disabled date builder */\n public get disabledDateBuilder(): ((date: Date) => boolean) | undefined {\n return this._disabledDateBuilder;\n }\n public set disabledDateBuilder(value: ((date: Date) => boolean) | undefined) {\n this._disabledDateBuilder = value;\n\n if (this._isInitialized) {\n this._applyDisabledDates();\n }\n }\n\n /** Get/set disabled dates */\n public get disabledDates(): Date | Date[] | null | undefined {\n const dates = this._disabledDates.map(d => new Date(d));\n return dates.length ? dates : null;\n }\n public set disabledDates(value: Date | Date[] | null | undefined) {\n const dates = value ? isArray(value) ? value : [value] : [];\n this._disabledDates = (dates as Date[]).map(d => {\n const date = new Date(d);\n date.setHours(0, 0, 0, 0);\n return date;\n });\n\n if (this._isInitialized) {\n this._applyDisabledDates();\n }\n }\n\n /** Get/set disabled days of week */\n public get disabledDaysOfWeek(): DayOfWeek | DayOfWeek[] | null | undefined {\n return this._disabledDaysOfWeek.length ? [...this._disabledDaysOfWeek] : null ;\n }\n public set disabledDaysOfWeek(value: DayOfWeek | DayOfWeek[] | null | undefined) {\n this._disabledDaysOfWeek = (isDefined(value) ? isArray(value) ? value : [value] : []) as DayOfWeek[];\n\n if (this._isInitialized) {\n this._applyDisabledDates();\n }\n }\n\n /** Get/set the event builder */\n public get eventBuilder(): CalendarEventBuilder | undefined {\n return this._eventBuilder;\n }\n public set eventBuilder(value: CalendarEventBuilder | undefined) {\n this._eventBuilder = value;\n\n if (this._isInitialized) {\n this._applyEvents();\n }\n }\n\n /** Get/set events */\n public get events(): ICalendarEvent[] | null | undefined {\n return this._events ? [...this._events] : null;\n }\n public set events(value: ICalendarEvent[] | null | undefined) {\n this._events = value?.length ? [...value] : [];\n\n if (this._isInitialized) {\n this._applyEvents();\n }\n }\n\n /** Get/set first day of week */\n public get firstDayOfWeek(): DayOfWeek | undefined {\n return this._firstDayOfWeek;\n }\n public set firstDayOfWeek(value: DayOfWeek | undefined) {\n if (this._firstDayOfWeek !== value) {\n this._firstDayOfWeek = isDefined(value) ? +(value as DayOfWeek) : value;\n\n if (this._isInitialized) {\n this._applyFirstDayOfWeek();\n }\n }\n }\n\n /** Get/set fixed height */\n public get fixedHeight(): boolean {\n return this._fixedHeight;\n }\n public set fixedHeight(value: boolean) {\n if (this._fixedHeight !== value) {\n this._fixedHeight = value;\n\n if (this._isInitialized) {\n this._applyFixedHeight();\n }\n }\n }\n\n /** Get/set list years */\n public get listYears(): boolean {\n return this._listYears;\n }\n public set listYears(value: boolean) {\n if (this._listYears !== value) {\n this._listYears = value;\n this._applyListYears();\n }\n }\n\n /** Get/set locale */\n public get locale(): string | undefined {\n return this._locale;\n }\n public set locale(value: string | undefined) {\n if (typeof value ==='string' && !value.length) {\n value = undefined;\n }\n\n if (this._locale !== value) {\n this._locale = value;\n\n if (this._isInitialized) {\n this._applyLocale();\n }\n }\n }\n\n /** Get/set max date */\n public get max(): Date | string | null | undefined {\n return this._max;\n }\n public set max(value: Date | string | null | undefined) {\n if (this._maxAttribute !== value) {\n this._maxAttribute = value?.toString() ?? null;\n this._max = coerceDateFromValue(value);\n this._applyMax();\n }\n }\n\n /** Get/set menu animation type */\n public get menuAnimation(): CalendarMenuAnimationType {\n return this._menuAnimation;\n }\n public set menuAnimation(value: CalendarMenuAnimationType) {\n if (this._menuAnimation !== value) {\n this._menuAnimation = value;\n\n if (this._isInitialized) {\n this._applyMenuAnimation();\n }\n }\n }\n\n /** Get/set min date */\n public get min(): Date | string | null | undefined {\n return this._min;\n }\n public set min(value: Date | string | null | undefined) {\n if (this._minAttribute !== value) {\n this._minAttribute = value?.toString() ?? null;\n this._min = coerceDateFromValue(value);\n this._applyMin();\n }\n }\n\n /** Get/set mode */\n public get mode(): CalendarMode {\n return this._mode;\n }\n public set mode(value: CalendarMode) {\n if (this._mode !== value) {\n const oldMode = this._mode;\n this._mode = value;\n \n if (this._isInitialized) {\n this._applyMode(oldMode);\n }\n }\n }\n\n /** Get/set month */\n public get month(): number {\n return this._month;\n }\n public set month(value: number) {\n if (this._month !== value) {\n const newValue = isNaN(+value) ? this._month : +value;\n if (this._month === newValue) {\n return;\n }\n\n this._month = +value;\n\n if (this._isInitialized) {\n this._applyMonth();\n }\n }\n }\n\n /** Get/set prevent focus */\n public get preventFocus(): boolean {\n return this._preventFocus;\n }\n public set preventFocus(value: boolean) {\n if (this._preventFocus !== value) {\n this._preventFocus = value;\n\n if (this._isInitialized) {\n this._applyPreventFocus();\n }\n }\n }\n\n /** Get/set readonly */\n public get readonly(): boolean {\n return this._readonly;\n }\n public set readonly(value: boolean) {\n if (this._readonly !== value) {\n this._readonly = value;\n\n if (this._isInitialized) {\n this._applyReadOnly();\n }\n }\n }\n\n /** Get/set selection follows month */\n public get selectionFollowsMonth(): boolean {\n return this._selectionFollowsMonth;\n }\n public set selectionFollowsMonth(value: boolean) {\n if (this._selectionFollowsMonth !== value) {\n this._selectionFollowsMonth = value;\n\n if (this._isInitialized) {\n this._applySelectionFollowsMonth();\n }\n }\n }\n\n /** Get/set show nav */\n public get showHeader(): boolean {\n return this._showHeader;\n }\n public set showHeader(value: boolean) {\n if (this._showHeader !== value) {\n this._showHeader = value;\n\n if (this._isInitialized) {\n this._applyShowHeader();\n }\n }\n }\n\n /** Get/set show other months */\n public get showOtherMonths(): boolean {\n return this._showOtherMonths;\n }\n public set showOtherMonths(value: boolean) {\n if (this._showOtherMonths !== value) {\n this._showOtherMonths = value;\n\n if (this._isInitialized) {\n this._applyShowOtherMonths();\n }\n }\n }\n\n /** Get/set show today */\n public get showToday(): boolean {\n return this._showToday;\n }\n public set showToday(value: boolean) {\n if (this._showToday !== value) {\n this._showToday = value;\n\n if (this._isInitialized) {\n this._applyShowToday();\n }\n }\n }\n\n /** Get/set whether to show the today button */\n public get todayButton(): boolean {\n return this._todayButton;\n }\n public set todayButton(value: boolean) {\n if (this._todayButton !== value) {\n this._todayButton = value;\n\n if (this._isInitialized) {\n this._applyTodayButton();\n }\n }\n }\n\n /* Get/set the today button callback */\n public get todayCallback(): (() => void) | undefined {\n return this._todayCallback;\n }\n public set todayCallback(value: (() => void) | undefined) {\n this._todayCallback = value;\n }\n\n /** Get/set the tooltip builder */\n public get tooltipBuilder(): CalendarTooltipBuilder | undefined {\n return this._tooltipBuilder;\n }\n public set tooltipBuilder(value: CalendarTooltipBuilder | undefined) {\n this._tooltipBuilder = value;\n\n if (this._isInitialized) {\n this._applyTooltipBuilder();\n }\n }\n\n /** Get/set value */\n public get value(): Date | Date[] | DateRange | null | undefined {\n if (this._mode === 'range') {\n return this._rangeSelectionStore ?? getDateRangeFromDates(this._value);\n }\n\n const dates = this._value.map(d => new Date(d));\n return this._mode === 'multiple' ? dates : dates.length ? dates[0] : null;\n }\n public set value(value: Date | Date[] | DateRange | null | undefined) {\n let dates: Date[] = [];\n\n this._rangeSelectionStore = undefined;\n\n if (!value || (Array.isArray(value) && !value.length)) {\n this._value = [];\n } else if (Array.isArray(value)) {\n switch (this._mode) {\n case 'single':\n dates = [value[0]];\n break;\n case 'multiple':\n dates = value;\n break;\n case 'range':\n const minAndMax = getMinAndMaxDates(value);\n dates.push(minAndMax[0]);\n if (minAndMax.length > 1) {\n dates.push(minAndMax[1]);\n }\n break;\n }\n } else if (isValidDate(new Date(value as any))) {\n dates = [value as Date];\n } else {\n this._rangeSelectionStore = new DateRange(value as DateRange);\n dates = getDatesFromDateRange(value as DateRange);\n }\n\n this._applyValue(dates);\n }\n\n /** Get/set view */\n public get view(): CalendarView {\n return this._view;\n }\n public set view(value: CalendarView) {\n if (this._view !== value) {\n this._view = value;\n this._applyView();\n }\n }\n\n /** Get/set weekend days */\n public get weekendDays(): DayOfWeek[] | null | undefined {\n return this._weekendDays ? [...this._weekendDays] : null;\n }\n public set weekendDays(value: DayOfWeek[] | null | undefined) {\n this._weekendDays = value?.map(v => +v) ?? null;\n\n if (this._isInitialized) {\n this._applyWeekendDays();\n }\n }\n\n /** Get/set year */\n public get year(): number {\n return this._year;\n }\n public set year(value: number) {\n if (this._year !== value) {\n const newValue = isNaN(+value) ? this._year : +value;\n if (this._year === newValue) {\n return;\n }\n\n this._year = newValue;\n \n if (this._isInitialized) {\n this._applyYear();\n }\n }\n }\n\n /** Get/set year range */\n public get yearRange(): string {\n return this._yearRange;\n }\n public set yearRange(value: string) {\n if (this._yearRange !== value) {\n this._yearRange = value;\n\n if (this._isInitialized) {\n this._applyYearRange();\n }\n }\n }\n\n /** Deselect all dates */\n public clear(): void {\n this._deselectAllDates();\n if (this._clearCallback) {\n this._clearCallback();\n }\n }\n\n /** Deselect a date */\n public deselectDate(date: Date, setFocus?: boolean): void {\n this._onDateSelected(date, false);\n if (setFocus) {\n this._focusedDate = date;\n this._resumeTabindexOnDate(true);\n }\n }\n\n /** Go to a date and optionally set focus on it */\n public goToDate(date: Date, setFocus?: boolean): void {\n this._goToDate(date, setFocus ?? false);\n }\n\n /** Handle an external keyboard event */\n public handleExternalKeyEvent(evt: KeyboardEvent): void {\n this._onKeydown(evt);\n }\n\n /** Reinitialize the calendar */\n public layout(): void {\n this._applyFirstDayOfWeek();\n this._createDateView();\n this._applyShowHeader();\n this._applyConstrainToEnabled();\n }\n\n /** Select a date */\n public selectDate(date: Date, setFocus?: boolean): void {\n this._onDateSelected(date, true);\n if (setFocus) {\n this._focusedDate = date;\n this._resumeTabindexOnDate(true);\n }\n }\n\n /** Sets the active date if in view */\n public setActiveDate(date: Date, setFocus?: boolean): boolean {\n if (this._dates.some(d => isSameDate(d, date) && (this._showOtherMonths || isInMonth(d, this._month, this._year)))) {\n this._goToDate(date, setFocus ?? false);\n return true;\n }\n return false;\n }\n\n /** Go to today */\n public today(): void {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n this._goToDate(today, true);\n if (this._todayCallback) {\n this._todayCallback();\n }\n }\n\n /** Toggles a date selected or unselected */\n public toggleDate(date: Date, force?: boolean): void {\n this._onDateSelected(date);\n }\n}\n", "import { CustomElement, attachShadowTemplate, ICustomElement, FoundationProperty, coerceNumber, coerceBoolean, elementParents } from '@tylertech/forge-core';\nimport { tylIconAdd, tylIconArrowDropDown, tylIconKeyboardArrowLeft, tylIconKeyboardArrowRight, tylIconLens } from '@tylertech/tyler-icons/standard';\n\nimport { CalendarAdapter } from './calendar-adapter';\nimport { CalendarFoundation } from './calendar-foundation';\nimport { CALENDAR_CONSTANTS, CalendarMode, DayOfWeek, ICalendarDateSelectEventData, CalendarDateBuilder, CalendarDayBuilder, CalendarDateSelectCallback, CalendarEventBuilder, ICalendarEvent, ICalendarFocusChangeEventData, ICalendarMonthChangeEventData, CalendarTooltipBuilder, CalendarView } from './calendar-constants';\nimport { DateRange } from './core/date-range';\nimport { ButtonComponent } from '../button';\nimport { IconButtonComponent } from '../icon-button';\nimport { IconComponent, IconRegistry } from '../icon';\nimport { TooltipComponent } from '../tooltip';\nimport { ICalendarBase } from './core/calendar-base';\nimport { CalendarMenuAnimationType, CalendarMenuComponent } from './calendar-menu';\n\nconst template = '<template><div class=\\\"forge-calendar\\\" part=\\\"root\\\"><div id=\\\"view\\\" class=\\\"forge-calendar__view\\\" part=\\\"view\\\"><div id=\\\"date-view\\\" class=\\\"forge-calendar__date-view\\\" role=\\\"grid\\\" part=\\\"date-view\\\"><div role=\\\"rowgroup\\\" part=\\\"date-view-container\\\"><div id=\\\"day-row\\\" class=\\\"forge-calendar__date-view__row\\\" role=\\\"row\\\" part=\\\"date-view-row\\\"></div></div><div id=\\\"date-grid\\\" class=\\\"forge-calendar__date-grid\\\" role=\\\"rowgroup\\\" part=\\\"date-grid-container\\\"></div></div><forge-calendar-menu id=\\\"menu\\\" part=\\\"calendar-menu\\\"></forge-calendar-menu></div></div></template>';\nconst styles = '.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);-webkit-transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.forge-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-button-font-size, .875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight,500);letter-spacing:.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);text-decoration:none;-webkit-text-decoration:var(--mdc-typography-button-text-decoration,none);text-decoration:var(--mdc-typography-button-text-decoration,none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform,uppercase);position:relative;display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:64px;border:none;outline:0;line-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle}.forge-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.forge-button::-moz-focus-inner{padding:0;border:0}.forge-button:active{outline:0}.forge-button:hover{cursor:pointer}.forge-button:disabled{cursor:default;pointer-events:none}.forge-button .forge-button__icon{margin-left:0;margin-right:8px;display:inline-block;font-size:1.125rem;height:1.125rem;vertical-align:top;width:1.125rem}.forge-button .forge-button__icon[dir=rtl],[dir=rtl] .forge-button .forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button__label~.forge-button__icon{margin-left:0;margin-right:8px}svg.forge-button__icon{fill:currentColor}.forge-button--outlined .forge-button__icon,.forge-button--raised .forge-button__icon,.forge-button--unelevated .forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button--outlined .forge-button__icon[dir=rtl],.forge-button--raised .forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon,.forge-button--raised .forge-button__label~.forge-button__icon,.forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--raised .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:-4px;margin-right:8px}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.forge-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-button .forge-button__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-button .forge-button__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-button.mdc-ripple-upgraded .forge-button__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-button.mdc-ripple-upgraded--unbounded .forge-button__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-button.mdc-ripple-upgraded--foreground-activation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-button.mdc-ripple-upgraded--foreground-deactivation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-button .forge-button__ripple{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:100%;height:100%;overflow:hidden}.forge-button:not(.forge-button--outlined) .forge-button__ripple{top:0;left:0}.forge-button--raised{-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-webkit-transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1)}.forge-button--raised:focus,.forge-button--raised:hover{-webkit-box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.forge-button--raised:active{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.forge-button--raised:disabled{-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.forge-button--outlined{border-style:solid}.forge-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 8px 0 8px}.forge-button:not(:disabled){background-color:transparent}.forge-button:disabled{background-color:transparent}.forge-button:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.forge-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated:not(:disabled){background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee)}.forge-button--unelevated:disabled{background-color:rgba(0,0,0,.38);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--unelevated:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--unelevated .forge-button__ripple::after,.forge-button--unelevated .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--unelevated.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--unelevated:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--unelevated.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--unelevated:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--unelevated:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--unelevated:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--unelevated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--unelevated .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised:not(:disabled){background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee)}.forge-button--raised:disabled{background-color:rgba(0,0,0,.38);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-button--raised:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--raised:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--raised .forge-button__ripple::after,.forge-button--raised .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--raised.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--raised:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--raised.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--raised:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--raised:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--raised:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--raised.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--raised .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 15px 0 15px;border-width:1px}.forge-button--outlined:not(:disabled){background-color:transparent}.forge-button--outlined:disabled{background-color:transparent}.forge-button--outlined:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.forge-button--outlined:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--outlined .forge-button__ripple::after,.forge-button--outlined .forge-button__ripple::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button--outlined.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--outlined:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button--outlined.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--outlined:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button--outlined:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--outlined:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button--outlined.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button--outlined .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined:not(:disabled){border-color:#6200ee;border-color:var(--mdc-theme-primary,#6200ee)}.forge-button--outlined:disabled{border-color:rgba(0,0,0,.38);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-button--outlined .forge-button__ripple{top:-1px;left:-1px;border:1px solid transparent}.forge-button--dense{height:24px;margin-top:0;margin-bottom:0;height:1.5rem}forge-button{display:inline-block}forge-button[hidden]{display:none}forge-button[disabled]{cursor:not-allowed}a.forge-hyperlink{color:#6200ee;color:var(--mdc-theme-primary,#6200ee);text-decoration:none}a.forge-hyperlink:visited{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}a.forge-hyperlink[disabled]{pointer-events:none;cursor:default}a.forge-hyperlink:focus,a.forge-hyperlink:hover:not([disabled]){text-decoration:underline}button.forge-hyperlink{color:#6200ee;color:var(--mdc-theme-primary,#6200ee);cursor:pointer;border:none;background-color:transparent;font-size:inherit;padding:0;outline:0;text-align:left}button.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink:hover:not([disabled]){text-decoration:underline}.forge-icon-button{display:-webkit-inline-box;display:inline-flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;outline:0;background-color:transparent;fill:currentColor;color:inherit;font-size:24px;text-decoration:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:48px;height:48px;padding:12px}.forge-icon-button forge-icon,.forge-icon-button img,.forge-icon-button svg{width:24px;height:24px}.forge-icon-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-icon-button:disabled{cursor:default;pointer-events:none}.forge-icon-button__icon{display:inline-block}.forge-icon-button__icon.forge-icon-button__icon--on{display:none}.forge-icon-button--on .forge-icon-button__icon{display:none}.forge-icon-button--on .forge-icon-button__icon.forge-icon-button__icon--on{display:inline-block}.forge-icon-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-icon-button::after,.forge-icon-button::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-icon-button::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-icon-button::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-icon-button.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-icon-button.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-icon-button.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-icon-button.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button::after,.forge-icon-button::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.forge-icon-button.mdc-ripple-upgraded::after,.forge-icon-button.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button::after,.forge-icon-button::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-icon-button.mdc-ripple-surface--hover::before,.forge-icon-button:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button.mdc-ripple-upgraded--background-focused::before,.forge-icon-button:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}forge-icon-button{position:relative;display:inline-block;overflow:visible}.forge-icon-button--on{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.forge-icon-button--on::after,.forge-icon-button--on::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-icon-button--on.mdc-ripple-surface--hover::before,.forge-icon-button--on:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button--on.mdc-ripple-upgraded--background-focused::before,.forge-icon-button--on:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button--on:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button--on:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button--on.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-icon-button--on::before{background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee);opacity:.08}.forge-icon-button--dense{width:28px;height:28px;padding:2px;padding:0}.forge-icon-button--dense-1{width:44px;height:44px;padding:10px}.forge-icon-button--dense-2{width:40px;height:40px;padding:8px}.forge-icon-button--dense-3{width:36px;height:36px;padding:6px}.forge-icon-button--dense-4{width:32px;height:32px;padding:4px}.forge-icon-button--dense-5{width:28px;height:28px;padding:2px}.forge-icon-button--dense-6{width:24px;height:24px;padding:0}.forge-icon-button--with-badge forge-badge{z-index:1;z-index:var(--forge-z-index-surface,1);pointer-events:none;--forge-badge-max-width:32px;--forge-badge-border:1px solid transparent}.forge-icon-button--with-badge forge-badge[app-bar-context]{--forge-badge-border:2px solid var(--forge-app-bar-theme-background)}.forge-calendar{width:100%;width:var(--forge-calendar-width,100%);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;position:relative}.forge-calendar__header{padding:0;padding:var(--forge-calendar-controls-padding,0);display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}.forge-calendar__footer{padding:0;padding:var(--forge-calendar-controls-padding,0);display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}.forge-calendar__view{position:relative}.forge-calendar__date-view{display:block}.forge-calendar__date-view__row{display:grid;grid-template-columns:repeat(7,1fr)}.forge-calendar__date-grid{display:grid}.forge-calendar__day{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;min-width:0;padding:0;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar__day::after{float:left;padding-top:100%;content:\\\"\\\"}.forge-calendar__date{margin-top:2px;margin-top:var(--forge-calendar-row-gap,2px);min-width:0;padding:0;border-radius:50%;position:relative;outline:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar__date::after{float:left;padding-top:100%;content:\\\"\\\"}.forge-calendar__date .mdc-ripple-surface{border-radius:inherit}.forge-calendar__date .mdc-ripple-surface::after,.forge-calendar__date .mdc-ripple-surface::before{position:absolute;width:calc(100% - 2px)!important;height:calc(100% - 2px)!important;top:calc(2px / 2)!important;left:calc(2px / 2)!important;border-radius:inherit!important}.forge-calendar__date__inner{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);position:absolute;width:calc(100% - 2px);height:calc(100% - 2px);top:calc(2px / 2);left:calc(2px / 2);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-calendar--show-today .forge-calendar__date--today:not([disabled]){color:#6200ee;color:var(--mdc-theme-primary,#6200ee);border-color:#6200ee;border-color:var(--mdc-theme-primary,#6200ee)}.forge-calendar--show-today .forge-calendar__date--today .forge-calendar__date__inner{border-color:inherit;border-width:1px;border-style:solid;font-weight:700}.forge-calendar--show-today .forge-calendar__date--today.forge-calendar__date--selected{color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]){--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;cursor:pointer}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--unbounded .mdc-ripple-surface::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--foreground-activation .mdc-ripple-surface::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--foreground-deactivation .mdc-ripple-surface::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-surface--hover .mdc-ripple-surface::before,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):hover .mdc-ripple-surface::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--background-focused .mdc-ripple-surface::before,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded):focus .mdc-ripple-surface::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded) .mdc-ripple-surface::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded):active .mdc-ripple-surface::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar__date--selected:not([disabled]) .forge-calendar__date__inner{background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar__date--selected[disabled] .forge-calendar__date__inner{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date--selected:hover .forge-calendar__date__inner{opacity:.87}.forge-calendar__date--selected.mdc-ripple-upgraded--background-focused .forge-calendar__date__inner,.forge-calendar__date--selected:focus .forge-calendar__date__inner{opacity:.54}.forge-calendar__date[disabled]{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-calendar__date-spacer{pointer-events:none}.forge-calendar--fixed-height .forge-calendar__date-spacer{margin-top:2px;margin-top:var(--forge-calendar-row-gap,2px)}.forge-calendar--fixed-height .forge-calendar__date-spacer::after{float:left;padding-top:100%;content:\\\"\\\"}.forge-calendar__range:not(.forge-calendar__date-spacer) .forge-calendar__range__target{background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee);position:absolute;width:100%;height:100%;opacity:.14;border-radius:0}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--start .forge-calendar__range__target{border-top-left-radius:50%;border-bottom-left-radius:50%}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--end .forge-calendar__range__target{border-top-right-radius:50%;border-bottom-right-radius:50%}.forge-calendar__range:not(.forge-calendar__range--start):first-of-type .forge-calendar__range__target{border-top-left-radius:4px;border-bottom-left-radius:4px}.forge-calendar__range:not(.forge-calendar__range--end):last-of-type .forge-calendar__range__target{border-top-right-radius:4px;border-bottom-right-radius:4px}.forge-calendar--allow-single-date-range .forge-calendar__range--start.forge-calendar__range--end .forge-calendar__range__target{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s;-webkit-transform:scale(1.15);transform:scale(1.15);-webkit-transform-origin:center;transform-origin:center}.forge-calendar__event{font-size:12px;font-size:var(--forge-calendar-event-dot-size, 12px)}.forge-calendar__event[data-event-theme=primary]{color:#3f51b5;color:var(--forge-calendar-theme-event-primary-accent,#3f51b5)}.forge-calendar__event[data-event-theme=secondary]{color:#ffc107;color:var(--forge-calendar-theme-event-secondary-accent,#ffc107)}.forge-calendar__event[data-event-theme=blue]{color:#2196f3;color:var(--forge-calendar-theme-event-blue-accent,#2196f3)}.forge-calendar__event[data-event-theme=light-green]{color:#8bc34a;color:var(--forge-calendar-theme-event-light-green-accent,#8bc34a)}.forge-calendar__event[data-event-theme=cyan]{color:#00bcd4;color:var(--forge-calendar-theme-event-cyan-accent,#00bcd4)}.forge-calendar__event[data-event-theme=teal]{color:#009688;color:var(--forge-calendar-theme-event-teal-accent,#009688)}.forge-calendar__event[data-event-theme=orange]{color:#ff9800;color:var(--forge-calendar-theme-event-orange-accent,#ff9800)}.forge-calendar__event[data-event-theme=blue-grey]{color:#607d8b;color:var(--forge-calendar-theme-event-blue-grey-accent,#607d8b)}.forge-calendar__event[data-event-theme=grey]{color:#9e9e9e;color:var(--forge-calendar-theme-event-grey-accent,#9e9e9e)}.forge-calendar__event[data-event-theme=red]{color:#f44336;color:var(--forge-calendar-theme-event-red-accent,#f44336)}.forge-calendar__event[data-event-theme=pink]{color:#e91e63;color:var(--forge-calendar-theme-event-pink-accent,#e91e63)}.forge-calendar__event[data-event-theme=purple]{color:#9c27b0;color:var(--forge-calendar-theme-event-purple-accent,#9c27b0)}.forge-calendar__event[data-event-theme=light-blue]{color:#03a9f4;color:var(--forge-calendar-theme-event-light-blue-accent,#03a9f4)}.forge-calendar__event[data-event-theme=deep-purple]{color:#673ab7;color:var(--forge-calendar-theme-event-deep-purple-accent,#673ab7)}.forge-calendar__event[data-event-theme=green]{color:#4caf50;color:var(--forge-calendar-theme-event-green-accent,#4caf50)}.forge-calendar__event[data-event-theme=lime]{color:#cddc39;color:var(--forge-calendar-theme-event-lime-accent,#cddc39)}.forge-calendar__event[data-event-theme=yellow]{color:#ffeb3b;color:var(--forge-calendar-theme-event-yellow-accent,#ffeb3b)}.forge-calendar__event[data-event-theme=brown]{color:#795548;color:var(--forge-calendar-theme-event-brown-accent,#795548)}.forge-calendar__event[data-event-theme=deep-orange]{color:#ff5722;color:var(--forge-calendar-theme-event-deep-orange-accent,#ff5722)}.forge-calendar__date[disabled] .forge-calendar__event{opacity:.14}.forge-calendar__event--overflow{color:#000;color:var(--mdc-theme-on-surface,#000);background-color:var(--mdc-theme-surface);border-radius:50%}.forge-calendar__event__wrapper{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;gap:2px;position:absolute;bottom:0;left:0;width:100%;padding-bottom:2px;pointer-events:none}.forge-calendar__date-spacer .forge-calendar__event__wrapper{display:none}.forge-calendar--rtl .forge-calendar__header forge-icon-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}#accessible-header{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}#month-button forge-icon{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.forge-calendar--month-menu-open #month-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}#year-button forge-icon{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.forge-calendar--year-menu-open #year-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host{--forge-calendar-event-stroke-color:#fff;--forge-calendar-event-stroke-color:var(--mdc-theme-surface, #fff);display:inline-block}:host([hidden]){display:none}:host([forge-popup-context=true]){--forge-calendar-event-stroke-color:#ffffff;--forge-calendar-event-stroke-color:var(--forge-theme-elevated-surface, #ffffff)}';\n\nexport interface ICalendarComponent extends ICalendarBase, ICustomElement {\n mode: CalendarMode;\n view: CalendarView;\n preventFocus: boolean;\n selectionFollowsMonth: boolean;\n showHeader: boolean;\n menuAnimation: CalendarMenuAnimationType;\n clearButton: boolean;\n todayButton: boolean;\n clearCallback: (() => void) | undefined;\n todayCallback: (() => void) | undefined;\n tooltipBuilder: CalendarTooltipBuilder | undefined;\n clear(): void;\n today(): void;\n selectDate(date: Date, setFocus?: boolean): void;\n deselectDate(date: Date): void;\n toggleDate(date: Date, force?: boolean): void;\n goToDate(date: Date, setFocus?: boolean): void;\n setActiveDate(date: Date, setFocus?: boolean): boolean;\n handleKey(evt: KeyboardEvent): void;\n layout(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-calendar': ICalendarComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-calendar-date-select': CustomEvent<ICalendarDateSelectEventData>;\n 'forge-calendar-focus-change': CustomEvent<ICalendarFocusChangeEventData>;\n 'forge-calendar-month-change': CustomEvent<ICalendarMonthChangeEventData>;\n 'forge-calendar-view-change': CustomEvent<CalendarView>;\n }\n}\n\n/**\n * The web component class behind the `<forge-calendar>` custom element.\n * \n * @tag forge-calendar\n */\n@CustomElement({\n name: CALENDAR_CONSTANTS.elementName,\n dependencies: [\n ButtonComponent,\n CalendarMenuComponent,\n IconButtonComponent,\n IconComponent,\n TooltipComponent\n ]\n})\nexport class CalendarComponent extends HTMLElement implements ICalendarComponent {\n public static get observedAttributes(): string[] {\n return [\n CALENDAR_CONSTANTS.attributes.ALLOW_SINGLE_DATE_RANGE,\n CALENDAR_CONSTANTS.attributes.CLEAR_BUTTON,\n CALENDAR_CONSTANTS.attributes.CONSTRAIN_TO_ENABLED,\n CALENDAR_CONSTANTS.attributes.FIRST_DAY_OF_WEEK,\n CALENDAR_CONSTANTS.attributes.FIXED_HEIGHT,\n CALENDAR_CONSTANTS.attributes.LIST_YEARS,\n CALENDAR_CONSTANTS.attributes.LOCALE,\n CALENDAR_CONSTANTS.attributes.MAX,\n CALENDAR_CONSTANTS.attributes.MENU_ANIMATION,\n CALENDAR_CONSTANTS.attributes.MIN,\n CALENDAR_CONSTANTS.attributes.MODE,\n CALENDAR_CONSTANTS.attributes.MONTH,\n CALENDAR_CONSTANTS.attributes.PREVENT_FOCUS,\n CALENDAR_CONSTANTS.attributes.READONLY,\n CALENDAR_CONSTANTS.attributes.SELECTION_FOLLOWS_MONTH,\n CALENDAR_CONSTANTS.attributes.SHOW_HEADER,\n CALENDAR_CONSTANTS.attributes.SHOW_OTHER_MONTHS,\n CALENDAR_CONSTANTS.attributes.SHOW_TODAY,\n CALENDAR_CONSTANTS.attributes.TODAY_BUTTON,\n CALENDAR_CONSTANTS.attributes.VIEW,\n CALENDAR_CONSTANTS.attributes.YEAR,\n CALENDAR_CONSTANTS.attributes.YEAR_RANGE\n ];\n }\n\n private _foundation: CalendarFoundation;\n\n constructor() {\n super();\n IconRegistry.define([tylIconKeyboardArrowLeft, tylIconKeyboardArrowRight, tylIconArrowDropDown, tylIconLens, tylIconAdd]);\n attachShadowTemplate(this, template, styles);\n this._foundation = new CalendarFoundation(new CalendarAdapter(this));\n }\n\n public connectedCallback(): void {\n // To simulate the :host-context() selector for Firefox until they implement it, we need to determine if the\n // calendar is within a popup for auto-styling the calendar when included within a popup. Check to see if\n // any of the parents of this element are a popup.\n if (!this.hasAttribute(CALENDAR_CONSTANTS.attributes.POPUP_CONTEXT) && elementParents(this).some(el => el.tagName.toLowerCase() === 'forge-popup')) {\n this.setAttribute(CALENDAR_CONSTANTS.attributes.POPUP_CONTEXT, 'true');\n }\n\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case CALENDAR_CONSTANTS.attributes.ALLOW_SINGLE_DATE_RANGE:\n this.allowSingleDateRange = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.CLEAR_BUTTON:\n this.clearButton = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.CONSTRAIN_TO_ENABLED:\n this.constrainToEnabled = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.FIRST_DAY_OF_WEEK:\n this.firstDayOfWeek = coerceNumber(newValue) as DayOfWeek;\n break;\n case CALENDAR_CONSTANTS.attributes.FIXED_HEIGHT:\n this.fixedHeight = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.LIST_YEARS:\n this.listYears = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.LOCALE:\n this.locale = newValue;\n break;\n case CALENDAR_CONSTANTS.attributes.MAX:\n this.max = newValue;\n break;\n case CALENDAR_CONSTANTS.attributes.MENU_ANIMATION:\n this.menuAnimation = newValue as CalendarMenuAnimationType;\n break;\n case CALENDAR_CONSTANTS.attributes.MIN:\n this.min = newValue;\n break;\n case CALENDAR_CONSTANTS.attributes.MODE:\n this.mode = newValue as CalendarMode;\n break;\n case CALENDAR_CONSTANTS.attributes.MONTH:\n this.month = coerceNumber(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.PREVENT_FOCUS:\n this.preventFocus = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.READONLY:\n this.readonly = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.SELECTION_FOLLOWS_MONTH:\n this.selectionFollowsMonth = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.SHOW_HEADER:\n this.showHeader = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.SHOW_OTHER_MONTHS:\n this.showOtherMonths = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.SHOW_TODAY:\n this.showToday = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.TODAY_BUTTON:\n this.todayButton = coerceBoolean(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.VIEW:\n this.view = newValue as CalendarView;\n break;\n case CALENDAR_CONSTANTS.attributes.YEAR:\n this.year = coerceNumber(newValue);\n break;\n case CALENDAR_CONSTANTS.attributes.YEAR_RANGE:\n this.yearRange = newValue;\n break;\n }\n }\n\n @FoundationProperty({set: false})\n public declare activeDate: Date;\n\n @FoundationProperty()\n public declare allowSingleDateRange: boolean;\n\n @FoundationProperty()\n public declare clearButton: boolean;\n\n @FoundationProperty()\n public declare clearCallback: (() => void) | undefined;\n\n @FoundationProperty()\n public declare constrainToEnabled: boolean;\n\n @FoundationProperty()\n public declare dateBuilder: CalendarDateBuilder | undefined;\n\n @FoundationProperty()\n public declare dateSelectCallback: CalendarDateSelectCallback | undefined;\n\n @FoundationProperty()\n public declare dayBuilder: CalendarDayBuilder | undefined;\n\n @FoundationProperty()\n public declare disabledDateBuilder: ((date: Date) => boolean) | undefined;\n\n @FoundationProperty()\n public declare disabledDates: Date | Date[] | null | undefined;\n\n @FoundationProperty()\n public declare disabledDaysOfWeek: DayOfWeek | DayOfWeek[] | null | undefined;\n\n @FoundationProperty()\n public declare eventBuilder: CalendarEventBuilder | undefined;\n\n @FoundationProperty()\n public declare events: ICalendarEvent[] | null | undefined;\n\n @FoundationProperty()\n public declare firstDayOfWeek: DayOfWeek | undefined;\n\n @FoundationProperty()\n public declare fixedHeight: boolean;\n\n @FoundationProperty()\n public declare listYears: boolean;\n\n @FoundationProperty()\n public declare locale: string | undefined;\n\n @FoundationProperty()\n public declare max: Date | string | null | undefined;\n\n @FoundationProperty()\n public declare menuAnimation: CalendarMenuAnimationType;\n\n @FoundationProperty()\n public declare min: Date | string | null | undefined;\n\n @FoundationProperty()\n public declare mode: CalendarMode;\n\n @FoundationProperty()\n public declare month: number;\n\n @FoundationProperty()\n public declare preventFocus: boolean;\n\n @FoundationProperty()\n public declare readonly: boolean;\n\n @FoundationProperty()\n public declare selectionFollowsMonth: boolean;\n\n @FoundationProperty()\n public declare showHeader: boolean;\n\n @FoundationProperty()\n public declare showOtherMonths: boolean;\n\n @FoundationProperty()\n public declare showToday: boolean;\n\n @FoundationProperty()\n public declare todayButton: boolean;\n\n @FoundationProperty()\n public declare todayCallback: (() => void) | undefined;\n\n @FoundationProperty()\n public declare tooltipBuilder: CalendarTooltipBuilder | undefined;\n\n @FoundationProperty()\n public declare value: Date | Date[] | DateRange | null | undefined;\n\n @FoundationProperty()\n public declare view: CalendarView;\n\n @FoundationProperty()\n public declare weekendDays: DayOfWeek[] | null | undefined;\n\n @FoundationProperty()\n public declare year: number;\n\n @FoundationProperty()\n public declare yearRange: string;\n\n public clear(): void {\n this._foundation.clear();\n }\n\n public deselectDate(date: Date): void {\n this._foundation.deselectDate(new Date(date));\n }\n\n public goToDate(date: Date, setFocus?: boolean): void {\n this._foundation.goToDate(new Date(date), setFocus);\n }\n\n public handleKey(evt: KeyboardEvent): void {\n this._foundation.handleExternalKeyEvent(evt);\n }\n\n public layout(): void {\n this._foundation.layout();\n }\n\n public selectDate(date: Date): void {\n this._foundation.selectDate(new Date(date));\n }\n\n public setActiveDate(date: Date, setFocus?: boolean): boolean {\n return this._foundation.setActiveDate(new Date(date), setFocus);\n }\n\n public today(): void {\n this._foundation.today();\n }\n\n public toggleDate(date: Date, force?: boolean): void {\n this._foundation.toggleDate(new Date(date), force);\n }\n}\n", "import { BaseComponentDelegate, IBaseComponentDelegateConfig, IBaseComponentDelegateOptions } from '../core/delegates/base-component-delegate';\nimport { ICalendarComponent } from './calendar';\nimport { CalendarView, CALENDAR_CONSTANTS, ICalendarDateSelectEventData, ICalendarFocusChangeEventData, ICalendarMonthChangeEventData } from './calendar-constants';\n\nexport type CalendarComponentDelegateProps = Partial<ICalendarComponent>;\nexport interface ICalendarComponentDelegateOptions extends IBaseComponentDelegateOptions {}\nexport interface ICalendarComponentDelegateConfig extends IBaseComponentDelegateConfig<ICalendarComponent, ICalendarComponentDelegateOptions> {}\n\nexport class CalendarComponentDelegate extends BaseComponentDelegate<ICalendarComponent, ICalendarComponentDelegateOptions> {\n constructor(config?: ICalendarComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): ICalendarComponent {\n return document.createElement(CALENDAR_CONSTANTS.elementName);\n }\n\n public onDateSelect(listener: (evt: CustomEvent<ICalendarDateSelectEventData>) => void): void {\n this._element.addEventListener(CALENDAR_CONSTANTS.events.DATE_SELECT, listener);\n }\n\n public onFocusChange(listener: (evt: CustomEvent<ICalendarFocusChangeEventData>) => void): void {\n this._element.addEventListener(CALENDAR_CONSTANTS.events.FOCUS_CHANGE, listener);\n }\n\n public onMonthChange(listener: (evt: CustomEvent<ICalendarMonthChangeEventData>) => void): void {\n this._element.addEventListener(CALENDAR_CONSTANTS.events.MONTH_CHANGE, listener);\n }\n\n public onViewChange(listener: (evt: CustomEvent<CalendarView>) => void): void {\n this._element.addEventListener(CALENDAR_CONSTANTS.events.VIEW_CHANGE, listener);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { CalendarComponent } from './calendar';\n\nexport * from './calendar-adapter';\nexport * from './calendar-component-delegate';\nexport * from './calendar-constants';\nexport * from './calendar-dom-utils';\nexport * from './calendar-dropdown';\nexport * from './calendar-foundation';\nexport * from './calendar-locale-utils';\nexport * from './calendar-menu';\nexport * from './calendar-utils';\nexport * from './calendar';\nexport * from './core';\n\nexport function defineCalendarComponent(): void {\n defineCustomElement(CalendarComponent);\n}\n"],
5
+ "mappings": "uhCAUO,SAASA,EAAcC,EAAeC,EAAcC,IAAsD,CAC/G,IAAMC,EAAgB,CAAC,EACjBC,EAAYC,EAAmB,IAAI,KAAKJ,EAAMD,EAAO,CAAC,EAAGE,CAAc,EACvEI,EAAU,IAAI,KAAKF,CAAS,EAClCE,EAAQ,QAAQF,EAAU,QAAQ,EAAIG,EAAmB,QAAQ,YAAY,EAE7E,QAAWC,EAAIJ,EAAWI,EAAIF,EAASE,EAAE,QAAQA,EAAE,QAAQ,EAAI,CAAC,EAC9DL,EAAM,KAAK,IAAI,KAAKK,CAAC,CAAC,EAExB,OAAOL,CACT,CAGO,SAASM,GAAaC,EAAYR,IAAsD,CAC7F,IAAMC,EAAgB,CAAC,EACjBC,EAAYC,EAAmBK,EAAMR,CAAc,EACnDI,EAAU,IAAI,KAAKF,CAAS,EAClCE,EAAQ,QAAQF,EAAU,QAAQ,EAAI,CAAC,EAEvC,QAAWI,EAAIJ,EAAWI,EAAIF,EAASE,EAAE,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AN,cAAwCC,EAA6E,CAC1H,YAAYC,EAA2C,CACrD,MAAMA,CAAM,CACd,CAEU,QAA6B,CACrC,OAAO,SAAS,cAAcC,EAAmB,WAAW,CAC9D,CAEO,aAAaC,EAA0E,CAC5F,KAAK,SAAS,iBAAiBD,EAAmB,OAAO,YAAaC,CAAQ,CAChF,CAEO,cAAcA,EAA2E,CAC9F,KAAK,SAAS,iBAAiBD,EAAmB,OAAO,aAAcC,CAAQ,CACjF,CAEO,cAAcA,EAA2E,CAC9F,KAAK,SAAS,iBAAiBD,EAAmB,OAAO,aAAcC,CAAQ,CACjF,CAEO,aAAaA,EAA0D,CAC5E,KAAK,SAAS,iBAAiBD,EAAmB,OAAO,YAAaC,CAAQ,CAChF,CACF,EChBO,SAASC,IAAgC,CAC9CC,GAAoBC,CAAiB,CACvC",
6
6
  "names": ["getMonthDates", "month", "year", "firstDayOfWeek", "dates", "startDate", "getFirstDateOfWeek", "endDate", "CALENDAR_CONSTANTS", "d", "getWeekDates", "date", "day", "firstDate", "diff", "getLastDateOfWeek", "lastDate", "getFirstDayOfMonth", "getSortedDaysOfWeek", "days", "isToday", "isSameDate", "isInMonth", "isInRange", "start", "end", "sortDates", "a", "b", "splitIntoWeeks", "array", "result", "i", "chunk", "getDateRangeFromDates", "DateRange", "minAndMax", "getMinAndMaxDates", "getDatesFromDateRange", "range", "sortedDates", "getDatesInRange", "getEventDescriptions", "events", "description", "labels", "e", "parseDateOffset", "offset", "_a", "_b", "p", "postfix", "value", "parseYearRange", "parts", "thisYear", "parsedParts", "getMonthOptions", "config", "_c", "_d", "_e", "_f", "_g", "_h", "minYear", "maxYear", "minMonth", "maxMonth", "k", "lessThanMin", "greaterThanMax", "getLocalizedMonth", "getYearOptions", "menuOptions", "getLocalizedYear", "getAllYearOptions", "isSelected", "values", "isDisabled", "params", "getIndexOfDate", "getEventsOnDate", "builder", "eventsOnDate", "builtEvents", "isArray", "getMultipleFromRange", "disabledParams", "current", "last", "coerceDateFromValue", "isValidDate", "shouldHandleEvent", "evt", "view", "preventFocus", "getEventPath", "eventIncludesDate", "eventIncludesElement", "CalendarAdapter", "BaseAdapter", "component", "getShadowElement", "CALENDAR_CONSTANTS", "hasAttribute", "name", "value", "toggleAttribute", "listener", "monthButton", "yearButton", "CALENDAR_MENU_CONSTANTS", "nextButton", "previousButton", "clearButton", "todayButton", "accessibleHeader", "header", "getHeader", "getAccessibleHeader", "label", "nextTooltip", "previousTooltip", "month", "locale", "content", "getMonthButtonContent", "accessibleMonth", "getLocalizedMonth", "year", "getYearButtonContent", "accessibleYear", "getLocalizedYear", "getFooter", "_a", "footer", "getClearButton", "getTodayButton", "days", "options", "removeAllChildren", "d", "element", "getDayElement", "dates", "splitIntoWeeks", "w", "i", "dateRow", "getDateRow", "date", "dateElement", "getDateId", "getDateElement", "getDateSpacerElement", "innerElement", "toggleOnAttribute", "appendToAttribute", "e", "oldDateElement", "newDateElement", "setFocus", "preventFocus", "dateString", "shouldFocus", "setTabindexOnElement", "tooltip", "getTooltip", "eventWrapper", "getEventWrapperElement", "event", "overflow", "getEventWrapperId", "getEventElement", "direction", "CalendarFoundation", "_adapter", "CALENDAR_CONSTANTS", "evt", "setFocus", "element", "eventIncludesDate", "date", "isInMonth", "dateString", "shouldHandleEvent", "direction", "month", "year", "type", "_a", "newDate", "lastDay", "getMonthLength", "isDisabled", "today", "firstDay", "firstOfMonth", "lastOfMonth", "index", "getIndexOfDate", "destinationMonth", "destinationYear", "focus", "value", "eventData", "isSelected", "getLocalizedMonth", "getLocalizedYear", "start", "step", "stepOnce", "includeStart", "inMonth", "disabledParams", "current", "outsideBounds", "startDate", "overMax", "underMin", "getFirstDateOfWeek", "getLastDateOfWeek", "monthDates", "getMonthDates", "monthChanged", "yearChanged", "otherMonth", "config", "getMonthOptions", "min", "max", "options", "getAllYearOptions", "getYearOptions", "valueSelected", "dateConfigs", "d", "thisMonth", "isToday", "getEventsOnDate", "events", "e", "i", "description", "getEventDescriptions", "res", "force", "selected", "event", "sortDates", "getDateRangeFromDates", "isSameDate", "toDate", "getDatesInRange", "forceConstrain", "minDateYear", "getLastDateOfMonth", "maxDateYear", "userSelected", "getSortedDaysOfWeek", "_b", "isDefined", "getFirstDayOfWeekForLocale", "getWeekendDaysForLocale", "firstEnabledDate", "lastEnabledDate", "oldMode", "fromRange", "newDates", "getMultipleFromRange", "newValue", "getMinAndMaxDates", "isRtlLocale", "skipFinalWeek", "tooltipContent", "weekendDays", "day", "range", "parseYearRange", "dates", "isArray", "coerceDateFromValue", "minAndMax", "isValidDate", "DateRange", "getDatesFromDateRange", "v", "template", "styles", "CalendarComponent", "IconRegistry", "tylIconKeyboardArrowLeft", "tylIconKeyboardArrowRight", "tylIconArrowDropDown", "tylIconLens", "tylIconAdd", "attachShadowTemplate", "CalendarFoundation", "CalendarAdapter", "CALENDAR_CONSTANTS", "elementParents", "el", "name", "oldValue", "newValue", "coerceBoolean", "coerceNumber", "date", "setFocus", "evt", "force", "__decorateClass", "FoundationProperty", "CustomElement", "ButtonComponent", "CalendarMenuComponent", "IconButtonComponent", "IconComponent", "TooltipComponent", "CalendarComponentDelegate", "BaseComponentDelegate", "config", "CALENDAR_CONSTANTS", "listener", "defineCalendarComponent", "defineCustomElement", "CalendarComponent"]
7
7
  }