@globalpayments/vega 2.47.0 → 2.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (429) hide show
  1. package/dist/cjs/{app-globals-981f7aba.js → app-globals-22798708.js} +6 -6
  2. package/dist/cjs/brand-switch-state-controller-slimmer-5efa1b24.js +51 -0
  3. package/dist/cjs/{content-state-605de6a3.js → content-state-54d94562.js} +221 -5
  4. package/dist/cjs/{dark-mode-state-controller-slimmer-2af3e67c.js → dark-mode-state-controller-slimmer-add5d8a8.js} +1 -1
  5. package/dist/cjs/{dark-mode-style-controller-c93b94d2.js → dark-mode-style-controller-4adb7fb2.js} +20 -17
  6. package/dist/cjs/{design-token-117a19a8.js → design-token-1abb655a.js} +1 -1
  7. package/dist/cjs/{element-appender-slimmer-4bdbd76d.js → element-appender-slimmer-2d4c8c18.js} +4 -4
  8. package/dist/cjs/{form-field-controller-slimmer-6d69c74f.js → form-field-controller-slimmer-527c25a0.js} +4 -4
  9. package/dist/cjs/{image-annotation-action-5e3aa73c.js → image-annotation-action-b78404b8.js} +2 -2
  10. package/dist/cjs/{index-ec9a1f36.js → index-c4dec3aa.js} +1 -1
  11. package/dist/cjs/index.cjs.js +10 -10
  12. package/dist/cjs/{inject-keyboard-manager-d1eac696.js → inject-keyboard-manager-b301e887.js} +1 -1
  13. package/dist/cjs/{keyboard-manager-97d0ddfa.js → keyboard-manager-2ccf4b16.js} +25 -5
  14. package/dist/cjs/{keyboard-manager-slimmer-23ce5dcf.js → keyboard-manager-slimmer-900cf2f5.js} +1 -1
  15. package/dist/cjs/loader.cjs.js +9 -9
  16. package/dist/cjs/{min-number-rule-5bcccc8f.js → min-number-rule-965fc43d.js} +2 -2
  17. package/dist/cjs/{public-rules-66f53e7e.js → public-rules-c4d2df9d.js} +5 -5
  18. package/dist/cjs/{responsive-format-facade-3542fc47.js → responsive-format-facade-38f3763e.js} +3 -3
  19. package/dist/cjs/{rich-text-editor-required-rule-649ef4b4.js → rich-text-editor-required-rule-e73f2c4f.js} +1 -1
  20. package/dist/cjs/{static-subject-title-1d23c102.js → static-subject-title-7e7d791a.js} +2 -2
  21. package/dist/cjs/{string-input-formatter-slimmer-56a2401f.js → string-input-formatter-slimmer-50322824.js} +2 -2
  22. package/dist/cjs/{style-formatter-b735d506.js → style-formatter-ecb4d49c.js} +1 -1
  23. package/dist/cjs/{sub-state-notify-slimmer-b16c9094.js → sub-state-notify-slimmer-7f437b19.js} +1 -1
  24. package/dist/cjs/{sub-state-observer-slimmer-1b6de09f.js → sub-state-observer-slimmer-e90362cd.js} +1 -1
  25. package/dist/cjs/{translation-5173d223.js → translation-212b1875.js} +1 -1
  26. package/dist/cjs/{translation-slimmer-e900e8d4.js → translation-slimmer-d1512c6d.js} +1 -1
  27. package/dist/cjs/vega-accordion.cjs.entry.js +8 -8
  28. package/dist/cjs/vega-app-footer.cjs.entry.js +38 -28
  29. package/dist/cjs/vega-app-header-button.cjs.entry.js +8 -8
  30. package/dist/cjs/vega-box.cjs.entry.js +9 -9
  31. package/dist/cjs/vega-brand-logo.cjs.entry.js +3 -3
  32. package/dist/cjs/vega-button-circle.cjs.entry.js +8 -8
  33. package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
  34. package/dist/cjs/vega-button.cjs.entry.js +7 -7
  35. package/dist/cjs/vega-calendar_3.cjs.entry.js +6 -6
  36. package/dist/cjs/vega-card.cjs.entry.js +8 -8
  37. package/dist/cjs/vega-carousel.cjs.entry.js +7 -7
  38. package/dist/cjs/vega-checkbox_2.cjs.entry.js +5 -5
  39. package/dist/cjs/vega-chip.cjs.entry.js +8 -8
  40. package/dist/cjs/vega-color-picker.cjs.entry.js +5 -5
  41. package/dist/cjs/vega-combo-box.cjs.entry.js +7 -7
  42. package/dist/cjs/vega-date-picker_2.cjs.entry.js +15 -15
  43. package/dist/cjs/vega-dialog_2.cjs.entry.js +8 -8
  44. package/dist/cjs/vega-divider.cjs.entry.js +8 -8
  45. package/dist/cjs/vega-dropdown_5.cjs.entry.js +14 -14
  46. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  47. package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
  48. package/dist/cjs/vega-file-uploader.cjs.entry.js +6 -6
  49. package/dist/cjs/vega-flag-icon.cjs.entry.js +8 -8
  50. package/dist/cjs/vega-flex.cjs.entry.js +9 -9
  51. package/dist/cjs/vega-font.cjs.entry.js +8 -8
  52. package/dist/cjs/vega-form.cjs.entry.js +6 -6
  53. package/dist/cjs/vega-grid.cjs.entry.js +8 -8
  54. package/dist/cjs/vega-icon.cjs.entry.js +8 -8
  55. package/dist/cjs/vega-image-uploader.cjs.entry.js +20 -11
  56. package/dist/cjs/vega-input-credit-card.cjs.entry.js +5 -5
  57. package/dist/cjs/vega-input-numeric.cjs.entry.js +13 -10
  58. package/dist/cjs/vega-input-phone-number.cjs.entry.js +5 -5
  59. package/dist/cjs/vega-input-range.cjs.entry.js +6 -6
  60. package/dist/cjs/vega-input-select.cjs.entry.js +10 -10
  61. package/dist/cjs/vega-input.cjs.entry.js +10 -10
  62. package/dist/cjs/{vega-internal-event-id-dc866d43.js → vega-internal-event-id-bfea9b93.js} +4 -0
  63. package/dist/cjs/vega-left-nav_5.cjs.entry.js +459 -198
  64. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +7 -7
  65. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +1 -1
  66. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +4 -4
  67. package/dist/cjs/vega-pagination.cjs.entry.js +8 -8
  68. package/dist/cjs/vega-popover_2.cjs.entry.js +15 -15
  69. package/dist/cjs/vega-radio_2.cjs.entry.js +10 -7
  70. package/dist/cjs/vega-rich-text-content.cjs.entry.js +14 -14
  71. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +453 -197
  72. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +10 -10
  73. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +6 -6
  74. package/dist/cjs/vega-sidenav_3.cjs.entry.js +9 -9
  75. package/dist/cjs/vega-signature-capture.cjs.entry.js +11 -11
  76. package/dist/cjs/{vega-skeleton-loader-controller-8cbd7656.js → vega-skeleton-loader-controller-db868c98.js} +3 -3
  77. package/dist/cjs/vega-stepper.cjs.entry.js +8 -8
  78. package/dist/cjs/vega-tab-group_2.cjs.entry.js +1 -1
  79. package/dist/cjs/vega-table_8.cjs.entry.js +10 -10
  80. package/dist/cjs/vega-textarea.cjs.entry.js +5 -5
  81. package/dist/cjs/vega-time-picker_2.cjs.entry.js +13 -13
  82. package/dist/cjs/vega-toggle-switch.cjs.entry.js +5 -5
  83. package/dist/cjs/vega-tooltip_2.cjs.entry.js +15 -15
  84. package/dist/cjs/vega.cjs.js +9 -9
  85. package/dist/collection/collection-manifest.json +1 -1
  86. package/dist/collection/components/vega-app-footer/vega-app-footer.js +42 -31
  87. package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.css +4 -2
  88. package/dist/collection/components/vega-dropdown/vega-dropdown.js +3 -0
  89. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-actions-renderer.js +4 -1
  90. package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +11 -1
  91. package/dist/collection/components/vega-input/vega-input.js +4 -4
  92. package/dist/collection/components/vega-nav/slimmers/vega-left-nav-group-hierarchy-controller.js +31 -0
  93. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/renderers/vega-left-nav-header-renderer.js +5 -4
  94. package/dist/collection/components/vega-nav/vega-left-nav/test/vega-left-nav-mock-data.js +147 -0
  95. package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.js +50 -8
  96. package/dist/collection/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-initialize-selected-controller.js +56 -0
  97. package/dist/collection/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-link-click-controller.js +70 -0
  98. package/dist/collection/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-open-state-controller.js +47 -0
  99. package/dist/collection/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-other-groups-click-controller.js +60 -0
  100. package/dist/collection/components/vega-nav/vega-left-nav-group/slimmers/renderers/vega-left-nav-group-renderer.js +10 -9
  101. package/dist/collection/components/vega-nav/vega-left-nav-group/vega-left-nav-group.js +21 -6
  102. package/dist/collection/components/vega-nav/vega-left-nav-link/slimmers/controllers/vega-left-nav-link-controller.js +21 -0
  103. package/dist/collection/components/vega-nav/vega-left-nav-link/slimmers/renderers/vega-left-nav-link-renderer.js +13 -1
  104. package/dist/collection/components/vega-nav/vega-left-nav-link/vega-left-nav-link.js +5 -0
  105. package/dist/collection/components/vega-popover/vega-popover.js +3 -0
  106. package/dist/collection/components/vega-rich-text-editor/dto/annotations/bold-annotation.js +6 -0
  107. package/dist/collection/components/vega-rich-text-editor/dto/annotations/code-annotation.js +6 -0
  108. package/dist/collection/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.js +6 -0
  109. package/dist/collection/components/vega-rich-text-editor/dto/annotations/image-annotation.js +6 -0
  110. package/dist/collection/components/vega-rich-text-editor/dto/annotations/indent-annotation.js +6 -0
  111. package/dist/collection/components/vega-rich-text-editor/dto/annotations/italic-annotation.js +6 -0
  112. package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-annotation.js +6 -0
  113. package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js +7 -0
  114. package/dist/collection/components/vega-rich-text-editor/dto/annotations/selection-range-annotation.js +8 -0
  115. package/dist/collection/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.js +6 -0
  116. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-color-annotation.js +6 -0
  117. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-annotation.js +6 -0
  118. package/dist/collection/components/vega-rich-text-editor/dto/annotations/underline-annotation.js +6 -0
  119. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +8 -0
  120. package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +14 -0
  121. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +14 -0
  122. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +20 -0
  123. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +14 -0
  124. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +47 -2
  125. package/dist/collection/components/vega-rich-text-editor/dto/editor-state.js +36 -0
  126. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +6 -0
  127. package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +8 -0
  128. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +7 -1
  129. package/dist/collection/components/vega-rich-text-editor/dto/range.js +8 -0
  130. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/image-block-renderer.js +1 -1
  131. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.js +1 -1
  132. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.js +1 -1
  133. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.js +1 -1
  134. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/image-node-renderer.js +1 -1
  135. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +2 -2
  136. package/dist/collection/components/vega-rich-text-editor/dto/selection-state.js +17 -0
  137. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/block-to-rte-block-strategy.abstract.js +2 -2
  138. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy.abstract.js +3 -2
  139. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/vega-image-to-rte-image-block-strategy.js +18 -15
  140. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/history-controller.js +137 -0
  141. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +54 -15
  142. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +13 -1
  143. package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +116 -0
  144. package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/text-node.test.js +12 -0
  145. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +5 -0
  146. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-image-editor/slimmers/renderers/vega-rich-text-image-editor-renderer.js +4 -0
  147. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-image-editor/vega-rich-text-image-editor.js +2 -1
  148. package/dist/collection/components/vega-stepper/vega-stepper.js +2 -2
  149. package/dist/collection/components/vega-tab-group/vega-tab-group.js +3 -0
  150. package/dist/collection/components/vega-time-picker/vega-time-picker.js +3 -0
  151. package/dist/collection/components/vega-tooltip/vega-tooltip.js +3 -0
  152. package/dist/collection/constants/misc.js +2 -0
  153. package/dist/collection/helpers/change-manager/subject/static-subject/static-subject-title.js +1 -1
  154. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +2 -0
  155. package/dist/collection/helpers/keyboard/keyboard-manager.js +25 -5
  156. package/dist/collection/helpers/keyboard/test/keyboard-manager.test.js +204 -105
  157. package/dist/collection/helpers/slimmers/brand-switch-state-controller-slimmer.js +46 -0
  158. package/dist/collection/helpers/slimmers/test/brand-switch-state-controller-slimmer.test.js +75 -0
  159. package/dist/collection/helpers/theme/controllers/{new-brand-style-controller.js → brand-style-controller.js} +9 -9
  160. package/dist/collection/helpers/theme/controllers/dark-mode-style-controller.js +1 -1
  161. package/dist/collection/helpers/theme/internal-theme-manager.js +12 -9
  162. package/dist/collection/helpers/theme/tests/theme-manager-controller.test.js +4 -4
  163. package/dist/collection/helpers/theme/theme-manager.js +2 -2
  164. package/dist/collection/helpers/validator/rules/max-number-rule.js +1 -1
  165. package/dist/collection/helpers/validator/rules/min-number-rule.js +1 -1
  166. package/dist/collection/helpers/validator/test/rules/max-number-rule.test.js +2 -2
  167. package/dist/collection/helpers/validator/test/rules/min-number-rule.test.js +2 -2
  168. package/dist/esm/{app-globals-c055c18a.js → app-globals-1bb57f5e.js} +6 -6
  169. package/dist/esm/brand-switch-state-controller-slimmer-05c85e6d.js +49 -0
  170. package/dist/esm/{content-state-8d0d38d7.js → content-state-6dba6625.js} +221 -5
  171. package/dist/esm/{dark-mode-state-controller-slimmer-0678a94b.js → dark-mode-state-controller-slimmer-f1c2c299.js} +1 -1
  172. package/dist/esm/{dark-mode-style-controller-e5915f26.js → dark-mode-style-controller-2ada8e22.js} +20 -17
  173. package/dist/esm/{design-token-7406782c.js → design-token-070b7326.js} +1 -1
  174. package/dist/esm/{element-appender-slimmer-16eaeb31.js → element-appender-slimmer-d196dd21.js} +4 -4
  175. package/dist/esm/{form-field-controller-slimmer-a383d067.js → form-field-controller-slimmer-e7dc3db1.js} +4 -4
  176. package/dist/esm/{image-annotation-action-de567e61.js → image-annotation-action-0b661259.js} +2 -2
  177. package/dist/esm/{index-96374234.js → index-4aa167d6.js} +1 -1
  178. package/dist/esm/index.js +10 -10
  179. package/dist/esm/{inject-keyboard-manager-ab0bfb8b.js → inject-keyboard-manager-f513be4a.js} +1 -1
  180. package/dist/esm/{keyboard-manager-8c4ef91b.js → keyboard-manager-262be5ce.js} +25 -5
  181. package/dist/esm/{keyboard-manager-slimmer-6f5cb52a.js → keyboard-manager-slimmer-42bf9773.js} +1 -1
  182. package/dist/esm/loader.js +9 -9
  183. package/dist/esm/{min-number-rule-a6082418.js → min-number-rule-86421853.js} +2 -2
  184. package/dist/esm/{public-rules-f9fe1987.js → public-rules-f9aaa527.js} +5 -5
  185. package/dist/esm/{responsive-format-facade-299d8ee9.js → responsive-format-facade-dfed6d94.js} +3 -3
  186. package/dist/esm/{rich-text-editor-required-rule-7fd7dcb3.js → rich-text-editor-required-rule-42b796eb.js} +1 -1
  187. package/dist/esm/{static-subject-title-4a9deb68.js → static-subject-title-ca83d6b6.js} +2 -2
  188. package/dist/esm/{string-input-formatter-slimmer-8c7987ac.js → string-input-formatter-slimmer-c61f82d6.js} +2 -2
  189. package/dist/esm/{style-formatter-2ebb1fd2.js → style-formatter-788dbacf.js} +1 -1
  190. package/dist/esm/{sub-state-notify-slimmer-2216c7dc.js → sub-state-notify-slimmer-4e3cf09d.js} +1 -1
  191. package/dist/esm/{sub-state-observer-slimmer-da938c88.js → sub-state-observer-slimmer-be7a6ce3.js} +1 -1
  192. package/dist/esm/{translation-78207e81.js → translation-cf7f020a.js} +1 -1
  193. package/dist/esm/{translation-slimmer-d49fcdf4.js → translation-slimmer-88966d5c.js} +1 -1
  194. package/dist/esm/vega-accordion.entry.js +8 -8
  195. package/dist/esm/vega-app-footer.entry.js +38 -28
  196. package/dist/esm/vega-app-header-button.entry.js +8 -8
  197. package/dist/esm/vega-box.entry.js +9 -9
  198. package/dist/esm/vega-brand-logo.entry.js +3 -3
  199. package/dist/esm/vega-button-circle.entry.js +8 -8
  200. package/dist/esm/vega-button-group_2.entry.js +3 -3
  201. package/dist/esm/vega-button.entry.js +7 -7
  202. package/dist/esm/vega-calendar_3.entry.js +6 -6
  203. package/dist/esm/vega-card.entry.js +8 -8
  204. package/dist/esm/vega-carousel.entry.js +7 -7
  205. package/dist/esm/vega-checkbox_2.entry.js +5 -5
  206. package/dist/esm/vega-chip.entry.js +8 -8
  207. package/dist/esm/vega-color-picker.entry.js +5 -5
  208. package/dist/esm/vega-combo-box.entry.js +7 -7
  209. package/dist/esm/vega-date-picker_2.entry.js +15 -15
  210. package/dist/esm/vega-dialog_2.entry.js +8 -8
  211. package/dist/esm/vega-divider.entry.js +8 -8
  212. package/dist/esm/vega-dropdown_5.entry.js +14 -14
  213. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  214. package/dist/esm/vega-field-error.entry.js +1 -1
  215. package/dist/esm/vega-file-uploader.entry.js +6 -6
  216. package/dist/esm/vega-flag-icon.entry.js +8 -8
  217. package/dist/esm/vega-flex.entry.js +9 -9
  218. package/dist/esm/vega-font.entry.js +8 -8
  219. package/dist/esm/vega-form.entry.js +6 -6
  220. package/dist/esm/vega-grid.entry.js +8 -8
  221. package/dist/esm/vega-icon.entry.js +8 -8
  222. package/dist/esm/vega-image-uploader.entry.js +20 -11
  223. package/dist/esm/vega-input-credit-card.entry.js +5 -5
  224. package/dist/esm/vega-input-numeric.entry.js +13 -10
  225. package/dist/esm/vega-input-phone-number.entry.js +5 -5
  226. package/dist/esm/vega-input-range.entry.js +6 -6
  227. package/dist/esm/vega-input-select.entry.js +10 -10
  228. package/dist/esm/vega-input.entry.js +10 -10
  229. package/dist/esm/{vega-internal-event-id-7d1ff289.js → vega-internal-event-id-85ad403f.js} +3 -1
  230. package/dist/esm/vega-left-nav_5.entry.js +459 -198
  231. package/dist/esm/vega-loader-wrapper_2.entry.js +7 -7
  232. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +1 -1
  233. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +4 -4
  234. package/dist/esm/vega-pagination.entry.js +8 -8
  235. package/dist/esm/vega-popover_2.entry.js +15 -15
  236. package/dist/esm/vega-radio_2.entry.js +10 -7
  237. package/dist/esm/vega-rich-text-content.entry.js +14 -14
  238. package/dist/esm/vega-rich-text-editor_4.entry.js +453 -197
  239. package/dist/esm/vega-selection-chip_2.entry.js +10 -10
  240. package/dist/esm/vega-selection-tile_2.entry.js +6 -6
  241. package/dist/esm/vega-sidenav_3.entry.js +9 -9
  242. package/dist/esm/vega-signature-capture.entry.js +11 -11
  243. package/dist/esm/{vega-skeleton-loader-controller-90e8d34d.js → vega-skeleton-loader-controller-c2a8bd27.js} +3 -3
  244. package/dist/esm/vega-stepper.entry.js +8 -8
  245. package/dist/esm/vega-tab-group_2.entry.js +1 -1
  246. package/dist/esm/vega-table_8.entry.js +10 -10
  247. package/dist/esm/vega-textarea.entry.js +5 -5
  248. package/dist/esm/vega-time-picker_2.entry.js +13 -13
  249. package/dist/esm/vega-toggle-switch.entry.js +5 -5
  250. package/dist/esm/vega-tooltip_2.entry.js +15 -15
  251. package/dist/esm/vega.js +9 -9
  252. package/dist/types/components/vega-app-footer/vega-app-footer.d.ts +8 -3
  253. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +3 -0
  254. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-actions-renderer.d.ts +1 -0
  255. package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +3 -0
  256. package/dist/types/components/vega-input/vega-input.d.ts +2 -2
  257. package/dist/types/components/vega-nav/interface.d.ts +11 -0
  258. package/dist/types/components/vega-nav/slimmers/vega-left-nav-group-hierarchy-controller.d.ts +15 -0
  259. package/dist/types/components/vega-nav/vega-left-nav/slimmers/renderers/vega-left-nav-header-renderer.d.ts +1 -0
  260. package/dist/types/components/vega-nav/vega-left-nav/test/vega-left-nav-mock-data.d.ts +4 -0
  261. package/dist/types/components/vega-nav/vega-left-nav/vega-left-nav.d.ts +25 -4
  262. package/dist/types/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-initialize-selected-controller.d.ts +20 -0
  263. package/dist/types/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-link-click-controller.d.ts +25 -0
  264. package/dist/types/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-open-state-controller.d.ts +27 -0
  265. package/dist/types/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-other-groups-click-controller.d.ts +17 -0
  266. package/dist/types/components/vega-nav/vega-left-nav-group/slimmers/renderers/vega-left-nav-group-renderer.d.ts +2 -1
  267. package/dist/types/components/vega-nav/vega-left-nav-group/vega-left-nav-group.d.ts +12 -5
  268. package/dist/types/components/vega-nav/vega-left-nav-link/slimmers/controllers/vega-left-nav-link-controller.d.ts +5 -0
  269. package/dist/types/components/vega-nav/vega-left-nav-link/slimmers/renderers/vega-left-nav-link-renderer.d.ts +2 -0
  270. package/dist/types/components/vega-nav/vega-left-nav-link/vega-left-nav-link.d.ts +2 -0
  271. package/dist/types/components/vega-popover/vega-popover.d.ts +3 -0
  272. package/dist/types/components/vega-rich-text-editor/dto/annotations/block-annotation.abstract.d.ts +1 -0
  273. package/dist/types/components/vega-rich-text-editor/dto/annotations/bold-annotation.d.ts +4 -0
  274. package/dist/types/components/vega-rich-text-editor/dto/annotations/code-annotation.d.ts +4 -0
  275. package/dist/types/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.d.ts +4 -0
  276. package/dist/types/components/vega-rich-text-editor/dto/annotations/image-annotation.d.ts +4 -0
  277. package/dist/types/components/vega-rich-text-editor/dto/annotations/indent-annotation.d.ts +4 -0
  278. package/dist/types/components/vega-rich-text-editor/dto/annotations/italic-annotation.d.ts +4 -0
  279. package/dist/types/components/vega-rich-text-editor/dto/annotations/link-annotation.d.ts +4 -0
  280. package/dist/types/components/vega-rich-text-editor/dto/annotations/link-group-annotation.d.ts +1 -0
  281. package/dist/types/components/vega-rich-text-editor/dto/annotations/node-annotation.abstract.d.ts +1 -0
  282. package/dist/types/components/vega-rich-text-editor/dto/annotations/selection-range-annotation.d.ts +6 -0
  283. package/dist/types/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.d.ts +4 -0
  284. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-color-annotation.d.ts +4 -0
  285. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-annotation.d.ts +4 -0
  286. package/dist/types/components/vega-rich-text-editor/dto/annotations/underline-annotation.d.ts +4 -0
  287. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +9 -1
  288. package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +4 -0
  289. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +4 -0
  290. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +4 -0
  291. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +4 -0
  292. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +19 -1
  293. package/dist/types/components/vega-rich-text-editor/dto/editor-state.d.ts +20 -0
  294. package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +4 -0
  295. package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +9 -1
  296. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +4 -0
  297. package/dist/types/components/vega-rich-text-editor/dto/range.d.ts +6 -0
  298. package/dist/types/components/vega-rich-text-editor/dto/selection-state.d.ts +14 -0
  299. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy.abstract.d.ts +2 -2
  300. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/history-controller.d.ts +54 -0
  301. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +14 -1
  302. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/value-controller.d.ts +4 -1
  303. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +2 -0
  304. package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +3 -0
  305. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +3 -0
  306. package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +3 -0
  307. package/dist/types/components.d.ts +23 -11
  308. package/dist/types/constants/misc.d.ts +2 -0
  309. package/dist/types/helpers/change-manager/subject/static-subject/static-subject-title.d.ts +2 -2
  310. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +2 -0
  311. package/dist/types/helpers/keyboard/keyboard-manager.d.ts +11 -1
  312. package/dist/types/helpers/slimmers/brand-switch-state-controller-slimmer.d.ts +22 -0
  313. package/dist/types/helpers/slimmers/test/brand-switch-state-controller-slimmer.test.d.ts +1 -0
  314. package/dist/types/helpers/theme/controllers/{new-brand-style-controller.d.ts → brand-style-controller.d.ts} +3 -3
  315. package/dist/types/helpers/theme/internal-theme-manager.d.ts +8 -8
  316. package/dist/types/helpers/theme/theme-manager.d.ts +4 -4
  317. package/dist/types/helpers/theme/theme.d.ts +6 -1
  318. package/dist/types/types/components.type.d.ts +1 -0
  319. package/dist/types/types/public-api.d.ts +1 -1
  320. package/dist/types/types/ui.type.d.ts +1 -1
  321. package/dist/vega/index.esm.js +1 -1
  322. package/dist/vega/{p-f01300ea.entry.js → p-024cccab.entry.js} +1 -1
  323. package/dist/vega/{p-8f98e604.entry.js → p-07d1c3e1.entry.js} +1 -1
  324. package/dist/vega/{p-eaab3fea.entry.js → p-0969877b.entry.js} +1 -1
  325. package/dist/vega/{p-a9f2ad08.entry.js → p-09c13382.entry.js} +1 -1
  326. package/dist/vega/{p-b5f05d21.entry.js → p-09f7f841.entry.js} +1 -1
  327. package/dist/vega/{p-20af6415.entry.js → p-0a18f5f6.entry.js} +1 -1
  328. package/dist/vega/{p-d54c48b0.js → p-0d355793.js} +1 -1
  329. package/dist/vega/{p-f3f73fd3.entry.js → p-10f1429e.entry.js} +1 -1
  330. package/dist/vega/{p-0835a2fd.js → p-1503f791.js} +1 -1
  331. package/dist/vega/p-1b3f492f.entry.js +1 -0
  332. package/dist/vega/{p-d2947f32.entry.js → p-1d0cf3ae.entry.js} +1 -1
  333. package/dist/vega/{p-4b541ce8.entry.js → p-2198de3e.entry.js} +1 -1
  334. package/dist/vega/{p-e3b70eed.entry.js → p-2491d18f.entry.js} +1 -1
  335. package/dist/vega/{p-e309bfd1.entry.js → p-24e0cdcc.entry.js} +1 -1
  336. package/dist/vega/{p-aa29ccd4.entry.js → p-27e3825f.entry.js} +1 -1
  337. package/dist/vega/p-27e56c67.entry.js +1 -0
  338. package/dist/vega/{p-76a3a552.entry.js → p-292b421a.entry.js} +1 -1
  339. package/dist/vega/{p-d2a65457.entry.js → p-2ecae9fe.entry.js} +1 -1
  340. package/dist/vega/{p-562de411.entry.js → p-2fadef27.entry.js} +1 -1
  341. package/dist/vega/{p-b4108ddb.entry.js → p-31ec679b.entry.js} +1 -1
  342. package/dist/vega/{p-f5fdf1ae.entry.js → p-32c68611.entry.js} +1 -1
  343. package/dist/vega/{p-42b62b48.js → p-32ca74b1.js} +1 -1
  344. package/dist/vega/{p-4640d35d.entry.js → p-353d32c0.entry.js} +1 -1
  345. package/dist/vega/{p-63ea4f38.entry.js → p-371cc8e8.entry.js} +1 -1
  346. package/dist/vega/{p-84aa2ebc.entry.js → p-38fa38dc.entry.js} +1 -1
  347. package/dist/vega/{p-720d87f9.entry.js → p-472727a4.entry.js} +1 -1
  348. package/dist/vega/{p-12a8d705.js → p-48b7f20d.js} +1 -1
  349. package/dist/vega/p-4e68dfd9.js +1 -0
  350. package/dist/vega/{p-693934d5.entry.js → p-4fa94b35.entry.js} +1 -1
  351. package/dist/vega/{p-c17b7a1f.js → p-50677c8e.js} +1 -1
  352. package/dist/vega/{p-1486bc3f.js → p-50e80afa.js} +1 -1
  353. package/dist/vega/p-56a0b13d.js +1 -0
  354. package/dist/vega/p-575ca599.entry.js +1 -0
  355. package/dist/vega/{p-23a26150.js → p-5773a9a3.js} +1 -1
  356. package/dist/vega/{p-7a3826a0.entry.js → p-57e813f2.entry.js} +1 -1
  357. package/dist/vega/{p-90ebcda7.entry.js → p-5a8f129f.entry.js} +1 -1
  358. package/dist/vega/p-5c1eedc5.js +1 -0
  359. package/dist/vega/{p-0a3607f7.entry.js → p-5c3da7ed.entry.js} +1 -1
  360. package/dist/vega/{p-b2643e88.js → p-5e3a15a1.js} +1 -1
  361. package/dist/vega/p-5f377954.js +1 -1
  362. package/dist/vega/{p-23ff7605.entry.js → p-65a76f19.entry.js} +1 -1
  363. package/dist/vega/p-6be16084.js +1 -0
  364. package/dist/vega/{p-69cc3fa2.js → p-6cabdb36.js} +1 -1
  365. package/dist/vega/{p-d296cf86.entry.js → p-6cc32ffa.entry.js} +1 -1
  366. package/dist/vega/{p-d7642125.js → p-72ecfd40.js} +1 -1
  367. package/dist/vega/{p-be186a9f.entry.js → p-7581d242.entry.js} +1 -1
  368. package/dist/vega/{p-a0b6da44.js → p-75c68f51.js} +1 -1
  369. package/dist/vega/p-7db32dc0.entry.js +1 -0
  370. package/dist/vega/{p-f0c85061.js → p-7f6702f7.js} +1 -1
  371. package/dist/vega/{p-7f1a7346.entry.js → p-84298e28.entry.js} +1 -1
  372. package/dist/vega/{p-704d9730.js → p-8ade44bf.js} +1 -1
  373. package/dist/vega/p-8bc4c015.entry.js +1 -0
  374. package/dist/vega/{p-e66515c7.js → p-8d283666.js} +1 -1
  375. package/dist/vega/p-904d1b43.js +1 -0
  376. package/dist/vega/{p-c87b5c83.entry.js → p-971f7d3c.entry.js} +1 -1
  377. package/dist/vega/{p-1138fa63.entry.js → p-9dba10f7.entry.js} +1 -1
  378. package/dist/vega/p-aea89be5.entry.js +1 -0
  379. package/dist/vega/p-b1f9fca8.entry.js +1 -0
  380. package/dist/vega/{p-ff9e8753.entry.js → p-b3e1dc86.entry.js} +1 -1
  381. package/dist/vega/{p-327a017b.entry.js → p-baca6dfc.entry.js} +1 -1
  382. package/dist/vega/p-bf1894ec.js +1 -0
  383. package/dist/vega/p-c5f8b3a3.entry.js +1 -0
  384. package/dist/vega/p-c6a3fe8a.entry.js +1 -0
  385. package/dist/vega/p-c754b32c.js +1 -0
  386. package/dist/vega/p-cc43a4ca.js +1 -0
  387. package/dist/vega/{p-f3efc8f0.entry.js → p-ccdd49be.entry.js} +1 -1
  388. package/dist/vega/p-cd205d96.js +1 -0
  389. package/dist/vega/{p-414e7edc.entry.js → p-d033ed44.entry.js} +1 -1
  390. package/dist/vega/{p-7cc3feb4.entry.js → p-d6591d70.entry.js} +1 -1
  391. package/dist/vega/{p-80c86d79.js → p-d7937711.js} +1 -1
  392. package/dist/vega/{p-26005df1.js → p-db4112af.js} +1 -1
  393. package/dist/vega/{p-90e70662.entry.js → p-db7a6878.entry.js} +1 -1
  394. package/dist/vega/{p-0e7fc736.entry.js → p-dd33bc71.entry.js} +1 -1
  395. package/dist/vega/{p-fb6d87cd.entry.js → p-e8f16f1d.entry.js} +1 -1
  396. package/dist/vega/{p-ba0a76fe.entry.js → p-ed6cc75b.entry.js} +1 -1
  397. package/dist/vega/p-f4d3387c.entry.js +1 -0
  398. package/dist/vega/{p-27287998.entry.js → p-f5b19d4f.entry.js} +1 -1
  399. package/dist/vega/{p-1114896d.entry.js → p-f7423232.entry.js} +1 -1
  400. package/dist/vega/p-fba4bae5.js +1 -0
  401. package/dist/vega/p-fda0c179.entry.js +1 -0
  402. package/dist/vega/p-ff41dc6a.entry.js +1 -0
  403. package/dist/vega/vega.esm.js +1 -1
  404. package/package.json +1 -1
  405. package/dist/collection/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-controller.js +0 -30
  406. package/dist/collection/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-sibling-observer-controller.js +0 -48
  407. package/dist/types/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-controller.d.ts +0 -11
  408. package/dist/types/components/vega-nav/vega-left-nav-group/slimmers/controllers/vega-left-nav-group-sibling-observer-controller.d.ts +0 -18
  409. package/dist/vega/p-06d7990e.js +0 -1
  410. package/dist/vega/p-1154e439.entry.js +0 -1
  411. package/dist/vega/p-12d60f5f.js +0 -1
  412. package/dist/vega/p-214aa52e.js +0 -1
  413. package/dist/vega/p-2c0d1ec9.entry.js +0 -1
  414. package/dist/vega/p-2e65e175.js +0 -1
  415. package/dist/vega/p-3165ee95.entry.js +0 -1
  416. package/dist/vega/p-380ba357.entry.js +0 -1
  417. package/dist/vega/p-41c48bcc.entry.js +0 -1
  418. package/dist/vega/p-4c62c178.entry.js +0 -1
  419. package/dist/vega/p-626dd54f.entry.js +0 -1
  420. package/dist/vega/p-6f2faa34.js +0 -1
  421. package/dist/vega/p-6f9731a1.entry.js +0 -1
  422. package/dist/vega/p-7f9dd834.entry.js +0 -1
  423. package/dist/vega/p-865b45dc.entry.js +0 -1
  424. package/dist/vega/p-b07add9c.entry.js +0 -1
  425. package/dist/vega/p-b9051ad2.js +0 -1
  426. package/dist/vega/p-da40b4c3.js +0 -1
  427. package/dist/vega/p-f2373487.js +0 -1
  428. package/dist/vega/p-ff8ef8af.entry.js +0 -1
  429. package/dist/vega/p-ff9ccfa8.js +0 -1
@@ -1 +1 @@
1
- import{h as e,F as t,f as n,r as i,c as r,H as a,g as o}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as l,V as c,M as d,L as h,I as v}from"./p-6e1ab235.js";import{V as p,I as f}from"./p-4387d550.js";import{D as m}from"./p-6e898779.js";import{a as w,f as u,b as g,d as x,g as b,h as y,i as k}from"./p-6f81fe1e.js";import{V as C}from"./p-c9b9322b.js";import{p as R}from"./p-08835909.js";import{c as j}from"./p-a821bcf3.js";import{C as D}from"./p-431ab4dd.js";import{s as E}from"./p-12d60f5f.js";import{c as z}from"./p-86194314.js";import{f as I}from"./p-3647d61d.js";import{g as M}from"./p-37b05e0b.js";import{P as S}from"./p-c0291e2e.js";import{d as T}from"./p-1bc5b3bc.js";import{C as O}from"./p-2d0d575f.js";import{c as V}from"./p-69cc3fa2.js";import{T as $}from"./p-0835a2fd.js";import{s as P}from"./p-6bd5c49b.js";import{q as B}from"./p-b1f65b13.js";import{s as N}from"./p-2205ee4c.js";import{S as L}from"./p-d7642125.js";import{b as A}from"./p-0c667d6a.js";import"./p-331a62d5.js";import"./p-bf953152.js";import"./p-cc63e827.js";import"./p-6a334573.js";import"./p-804f71b3.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-e66515c7.js";import"./p-23a26150.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";var F=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class W extends c{render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render())}}F([l()],W.prototype,"switchPanelRenderer",void 0),F([l()],W.prototype,"viewRenderer",void 0);const H=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};class U{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=H()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),n=[];for(let i=0;i<e.count;i++)n.push(new Date(t)),t.setDate(t.getDate()+1);return n}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class Y{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class _ extends U{generate(e){return new Y([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class q{constructor(e,t,n){this._date=n,this._month=t,this._year=e}static from(e){return new q(e.getFullYear(),e.getMonth()+1,e.getDate())}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}isToday(){const e=new Date;return e.getFullYear()===this.year&&e.getMonth()+1===this.month&&e.getDate()===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:n}=e,i={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<n?i.isPreviousMonth=!0:this.month>n?i.isNextMonth=!0:i.inMonth=!0:this.year>t?i.isNextMonth=!0:i.isPreviousMonth=!0,i}equal(e){const{year:t,month:n,date:i}=e;return this._year===t&&this._month===n&&this._date===i}}class K extends U{generate(e){const t=this.generateDates(e),n=e.showWeekends;let i=this.generateWeekHead(),r=[t.map(q.from)];return!1===n&&(i=i.slice(1,6),r=r.map((e=>e.slice(1,6)))),new Y(i,r)}}class X extends U{generate(e){const t=e.showWeekends;let n=[],i=[];this.generateDates(e).forEach(((e,t)=>{t%7||(n[t/7]=i=[]);const r=q.from(e);i.push(r)}));let r=this.generateWeekHead();return!1===t&&(r=r.slice(1,6),n=n.map((e=>e.slice(1,6)))),new Y(r,n)}}class G{constructor(e,t){this._count=e,this._current=t||q.from(new Date),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}get type(){return this._type}get showWeekends(){return this._showWeekends}goTo(e){return this.createBy(e)}now(){return this.createBy(q.from(new Date))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-H().indexOf(t.getDay())),this._startDate=q.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=q.from(t)}}class J extends G{constructor(e,t){super(J.DISPLAY_DATE_COUNT,e),this._type="day",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();e.setDate(e.getDate()+1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t)),this.createBy(t)}previous(){const e=this.current.toDate();e.setDate(e.getDate()-1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t,ee.PREVIOUS)),this.createBy(t)}now(){let e=q.from(new Date);return!1===this._showWeekends&&(e=re(e)),this.createBy(e)}createBy(e){return new J(e,this._showWeekends)}}J.DISPLAY_DATE_COUNT=1;class Q extends G{constructor(e,t){super(Q.DISPLAY_DATE_COUNT,e),this._type="week",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())+7),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())-7),this.createBy(q.from(e))}createBy(e){return new Q(e,this._showWeekends)}}Q.DISPLAY_DATE_COUNT=7;class Z extends G{constructor(e,t){super(Z.DISPLAY_DATE_COUNT,Z.getMonthFirstDay(e)),this._type="month",this._showWeekends=!0,this._showWeekends=!1!==t}static getMonthFirstDay(e){const t=e||q.from(new Date);return new q(t.year,t.month,1)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(q.from(e))}createBy(e){return new Z(e,this._showWeekends)}}var ee;function te(e,t=!1){return e.toLocaleDateString("en-US",{month:t?"short":"long"})}function ne(e,t=15){const[n,i]=e.split(":");return Math.round((60*Number(n)+Number(i))/t)}function ie(e){return"vega-calendar-event-slot-"+e}function re(e,t=ee.NEXT){const n=e.toDate().getDay();if(0===n||6===n){let i=0===n?1:2;return t===ee.PREVIOUS&&(i=0===n?-2:-1),q.from(new Date(e.year,e.month-1,e.date+i))}return e}Z.DISPLAY_DATE_COUNT=42,function(e){e.PREVIOUS="-1",e.NEXT="1"}(ee||(ee={}));var ae=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class oe extends c{constructor(){super(...arguments),this.handleViewChange=e=>{this.currentPeriodController.updateCalendarPeriod(e.detail,this.currentPeriod.current)},this.todayButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.now())},this.nextButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.next())},this.prevButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.previous())},this.moreActionMenuClick=e=>{this.moreActionClickEmitter.emit(e.detail)}}getSwitchPanelRef(){return this.switchPanelRef}render(){return e("vega-flex",{direction:"row",gap:"size-16",justifyContent:"space-between",alignItems:"center",class:"calendar-switch-panel",ref:e=>this.switchPanelRef=e},this.renderDateSwitch(),e("div",{class:"calendar-view-switch-container"},this.renderViewSwitch(),this.renderMoreActionMenu()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{m.addUniqueObserverToNode(e,w,this.todayButtonClick)},label:this.translationSlimmer.t("Today")}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.nextButtonClick)}}),this.renderCurrentPeriod())}renderCurrentPeriod(){return e("vega-font",{class:"calendar-current-date",variant:"font-field-label",color:"text-primary"},this.getViewDateSummary())}renderViewSwitch(){return e("vega-segment-control",{segments:oe.views.map((e=>Object.assign(Object.assign({},e),{text:this.translationSlimmer.t(e.text)}))),size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{m.addUniqueObserverToNode(e,u,this.handleViewChange)}})}renderMoreActionMenu(){var t,n;if(null===(n=null===(t=this.moreActionDropdownProps)||void 0===t?void 0:t.source)||void 0===n?void 0:n.length)return e("vega-dropdown",Object.assign({alignment:"end",trigger:"click"},this.moreActionDropdownProps,{ref:e=>{m.addUniqueObserverToNode(e,g,this.moreActionMenuClick)}}),e("vega-button-circle",{size:"small",icon:C.getIconKey("ellipsis-vertical"),variant:"icon-only"}))}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":{const n=this.translationSlimmer.t(te(e.toDate()));t=`${e.date} ${n}, ${e.year}`;break}case"week":{const e=this.calendarView.dateItems[0],n=e[0],i=e[e.length-1],[r,a]=[n,i].map((e=>this.translationSlimmer.t(te(e.toDate()))));t=`${n.date} ${r}${n.year===i.year?"":", "+n.year} - ${i.date} ${a}, ${i.year}`;break}case"month":t=`${this.translationSlimmer.t(te(e.toDate()))}, ${e.year}`}return t}}C.register({"chevron-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>'},"chevron-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>'},"ellipsis-vertical":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 464a48 48 0 1 1 0-96 48 48 0 1 1 0 96zm0-160a48 48 0 1 1 0-96 48 48 0 1 1 0 96zM0 96a48 48 0 1 1 96 0A48 48 0 1 1 0 96z"/></svg>'}}),oe.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],ae([l()],oe.prototype,"viewMode",void 0),ae([l()],oe.prototype,"calendarView",void 0),ae([l()],oe.prototype,"currentPeriod",void 0),ae([l()],oe.prototype,"moreActionDropdownProps",void 0),ae([l()],oe.prototype,"moreActionClickEmitter",void 0),ae([l()],oe.prototype,"currentPeriodController",void 0),ae([l()],oe.prototype,"calendarViewController",void 0),ae([l()],oe.prototype,"translationSlimmer",void 0);var se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class le extends c{getCalendarViewElementRef(){return this.calendarViewElementRef}render(){return e("div",{class:`calendar-view calendar-view-${this.viewMode} ${!1===this.showWeekends?"calendar-hide-weekends":""}`,ref:e=>this.calendarViewElementRef=e},"month"===this.viewMode?this.monthViewRenderer.render():this.viewWithTimeRenderer.render())}}se([l()],le.prototype,"viewMode",void 0),se([l()],le.prototype,"showWeekends",void 0),se([l()],le.prototype,"monthViewRenderer",void 0),se([l()],le.prototype,"viewWithTimeRenderer",void 0);var ce=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class de extends c{render(){return e("div",{class:"calendar-view-month-container"},e("div",{class:"calendar-view-row calendar-view-title border-divider-bottom"},this.calendarView.weekdays.map((t=>e("div",{key:t},this.translationSlimmer.t(t))))),this.renderMonthViewContent())}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((n,i)=>{const r=this.monthEventRenderer.getCurrentRowEvents(n),a=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:i,class:"calendar-view-row border-divider-bottom"},n.map(((n,i)=>e("div",{class:{"row-cell border-divider-right":!0,"current-month-day":n.compare(t).inMonth,active:n.isToday(),disabled:!1},key:`${n.month}-${n.date}`,onDblClick:e=>this.handleDateBlockClick(e,n)},this.renderDateBlock(n),this.monthEventRenderer.render(n,r[i],a[i],i)))))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},te(t.toDate(),!0)),e("div",{role:"button",tabIndex:0,class:"grid-col",onDblClick:e=>this.goToCurrentDayView(e,t)},t.date))}goToCurrentDayView(e,t){e.stopPropagation(),this.currentPeriodController.updateCalendarPeriod("day",t)}handleDateBlockClick(e,t){const{target:n,clientX:i,clientY:r}=e;if(this.isMonthBlockBlankArea(n)){const{year:e,month:n,date:a}=t;this.dateDblClickEmitter.emit({year:e,month:n,date:a,hour:0,mouseEventInfo:{clientX:i,clientY:r}})}}isMonthBlockBlankArea(e){return!e.classList.contains("more-button")&&"VEGA-CALENDAR-EVENT"!==e.tagName}}ce([l()],de.prototype,"viewMode",void 0),ce([l()],de.prototype,"calendarView",void 0),ce([l()],de.prototype,"currentPeriod",void 0),ce([l()],de.prototype,"currentPeriodController",void 0),ce([l()],de.prototype,"monthEventRenderer",void 0),ce([l()],de.prototype,"dateDblClickEmitter",void 0),ce([l()],de.prototype,"translationSlimmer",void 0);var he=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ve extends c{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}renderViewTitle(){const t=this.calendarView.dateItems[0],n=this.calendarView.weekdays;return e("div",{class:"calendar-view-title-container"},e("div",{class:"calendar-view-row"},e("div",{class:"time-line-empty"}),e("div",{class:"calendar-view-title"},t.map(((t,i)=>e("div",{key:t.date,class:{active:t.isToday()}},e("div",null,this.translationSlimmer.t(n[i])),e("div",{class:"week-day"},t.date)))))),e("div",{class:"calendar-view-row calendar-view-event-all-container border-divider-bottom"},e("div",{class:"time-line-all"},this.translationSlimmer.t("All Day")),this.dayViewFullDayEventRenderer.render()))}renderViewContent(){const t=this.calendarView.dateItems[0];return e("div",{class:"calendar-view-row calendar-view-day-container"},this.timeLineRenderer.render(),e("div",{class:"calendar-view-content-container"},e("div",{class:"calendar-view-content"},t.map((t=>e("div",{class:"grid-col border-divider-left",key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock(t))))),this.dayViewTimedEventRenderer.render(),this.timeMarkerRenderer.render(t)))}renderHourBlock(t){return Array(24).fill("").map(((n,i)=>e("div",{class:"grid-cell border-divider-top",onDblClick:e=>{this.handleDateBlockClick(t,i,e)}})))}handleDateBlockClick(e,t,n){const{year:i,month:r,date:a}=e,{clientX:o,clientY:s}=n;this.dateDblClickEmitter.emit({year:i,month:r,date:a,hour:t,mouseEventInfo:{clientX:o,clientY:s}})}}he([l()],ve.prototype,"viewMode",void 0),he([l()],ve.prototype,"timeLineRenderer",void 0),he([l()],ve.prototype,"timeMarkerRenderer",void 0),he([l()],ve.prototype,"dayViewTimedEventRenderer",void 0),he([l()],ve.prototype,"dayViewFullDayEventRenderer",void 0),he([l()],ve.prototype,"calendarView",void 0),he([l()],ve.prototype,"dateDblClickEmitter",void 0),he([l()],ve.prototype,"translationSlimmer",void 0);class pe extends c{render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line"},e("div",{class:"hour-empty"}),t.map(((t,n)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===n?24:n},t)))))}getTimeLineTitles(){const e=[];if("12-hour"===this.timeFormat){e.push("12 AM");for(let t=1;t<12;t++)e.push(`${t} AM`);e.push("12 PM");for(let t=1;t<12;t++)e.push(`${t} PM`)}else for(let t=0;t<24;t++)e.push(`${R(t)}`);return e}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],pe.prototype,"timeFormat",void 0);var fe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class me extends c{constructor(){super(...arguments),this.monthViewGenerator=new X,this.weekViewGenerator=new K,this.dayViewGenerator=new _}initialCalendarView(){this.setCalendarView(this.getCalendarViewByPeriod(this.currentPeriod))}generateCalendarView(e){this.setCalendarView(this.getCalendarViewByPeriod(e))}getCalendarViewByPeriod(e){switch(e.type){case"week":return this.weekViewGenerator.generate(e);case"day":return this.dayViewGenerator.generate(e);default:return this.monthViewGenerator.generate(e)}}setCalendarView(e){this.calendarView=e}}fe([l({writable:!0})],me.prototype,"calendarView",void 0),fe([l()],me.prototype,"currentPeriod",void 0),fe([l()],me.prototype,"showWeekends",void 0),fe([l()],me.prototype,"currentPeriodController",void 0),fe([d("componentWillLoad")],me.prototype,"initialCalendarView",null),fe([d("watchCurrentPeriodChange")],me.prototype,"generateCalendarView",null);var we=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ue extends c{setCurrentPeriod(e){this.currentPeriod=e}updateCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new Z(t,this.showWeekends));break;case"week":this.setCurrentPeriod(new Q(t,this.showWeekends));break;case"day":t=!1===this.showWeekends?re(t):t,this.setCurrentPeriod(new J(t,this.showWeekends))}}initialCurrentPeriod(){this.updateCalendarPeriod(this.viewMode,q.from(new Date))}emitChangeEvent(e,t){e&&t&&e.startDate.equal(t.startDate)&&e.endDate.equal(t.endDate)||(e&&e.type!==this.viewMode&&(this.viewMode=e.type),this.changeEventEmitter.emit({viewMode:e.type,currentPeriod:this.getCurrentPeriodSummary()}))}updateCurrentPeriodByViewMode(e){this.currentPeriod&&e!==this.currentPeriod.type&&this.updateCalendarPeriod(e,this.currentPeriod.current)}updateCurrentPeriodAfterHideWeekEndsChange(){this.updateCalendarPeriod(this.viewMode,this.currentPeriod.current)}getCurrentPeriodSummary(){const{current:e,startDate:t,endDate:n}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:n.date,month:n.month,year:n.year}}}}we([l({writable:!0})],ue.prototype,"currentPeriod",void 0),we([l()],ue.prototype,"changeEventEmitter",void 0),we([l({writable:!0})],ue.prototype,"viewMode",void 0),we([l()],ue.prototype,"showWeekends",void 0),we([d("componentWillLoad")],ue.prototype,"initialCurrentPeriod",null),we([d("watchCurrentPeriodChange")],ue.prototype,"emitChangeEvent",null),we([d("watchViewModeChange")],ue.prototype,"updateCurrentPeriodByViewMode",null),we([d("watchShowWeekendsChange")],ue.prototype,"updateCurrentPeriodAfterHideWeekEndsChange",null);var ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class xe extends c{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const n=this.calendarEventController.getCurrentDateEvents(e);t.push(n)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const n=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(n)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,n,i,r){const a=n.slice(i.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(i,r)),this.renderMoreButton(n,a,`${t.date} ${te(t.toDate())} ${t.year}`))}addMaxDisplayCountChange(){m.addUniqueObserverToNode(this.host,E,(e=>{this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&n(this.host)}))}renderMoreButton(t,n,i){if(n){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),a=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right"},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:z()},`${n} More`),e("vega-flex",{slot:"popover",direction:"col",gap:"0"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},i),e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:a.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0})))),a.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0}))))))}}hideTheCutOffEvents(e,t){const n=[],i=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((n=>{e.filter((e=>e.includes(n))).length>t.filter((e=>e.includes(n))).length&&i.push(n)})),i.length?(t.forEach((e=>{e.length&&e[e.length-1]&&i.includes(e[e.length-1])?n.push(e.slice(0,e.length-1)):n.push(e)})),n):t}}ge([l()],xe.prototype,"viewMode",void 0),ge([l()],xe.prototype,"host",void 0),ge([l()],xe.prototype,"calendarEventController",void 0),ge([l()],xe.prototype,"eventItemRenderer",void 0),ge([l()],xe.prototype,"fullDayEventLayoutRenderer",void 0),ge([d("componentWillLoad")],xe.prototype,"addMaxDisplayCountChange",null);class be{constructor(e,t,n,i){this.repeatStartDate=e,this.interval=t,this.count=n,this.until=i}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.cache.filter((n=>this.isSeriesInPeriod(n,t,e)))}isSeriesInPeriod(e,t,n){const i=e.toDate(),r=new Date(e.year,e.month-1,e.date+t-1),{startDate:a,endDate:o}=n,s=a.toDate(),l=o.toDate();return i>=s&&i<=l||r>=s&&r<=l||i<=s&&r>=l}}be.daySeconds=864e5;class ye extends be{constructor(e,t,n,i){super(e,t,n,i),this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=new Date(e.year,e.month-1,e.date+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}}class ke extends be{constructor(e,t,n,i){super(e,t,n,i),this.byMonthDay=this.repeatStartDate.date,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year,e.month-1+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e,t){const n=new Date(e,t,this.byMonthDay);return n.getDate()===this.byMonthDay?n:this.getNextStartDate(e,t+1)}}class Ce extends be{constructor(e,t,n,i,r){super(e,t,n,i),this.byWeekDay=this.sortWeekDay(r),this.initCache()}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.getValidCache().filter((n=>this.isSeriesInPeriod(n,t,e)))}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t[0].toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n[0].toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e[0]&&e[0].toDate()<=n[0].toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.getValidCache().length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDates(e);if(0===t.length||"number"==typeof this.count&&this.getValidCache().length>=this.count)return null;{const e=t.map((e=>q.from(e)));return this.cache.push(e),e}}getNextStartDates(e){return e.map((e=>new Date(e.year,e.month-1,e.date+7*this.interval))).filter((e=>!this.until||e<=this.until.toDate()))}initCache(){const e=[],t=this.getCurrentDayIndex(this.repeatStartDate);this.byWeekDay.forEach((n=>{const i=Ce.weekDay.indexOf(n)-t,{year:r,month:a,date:o}=this.repeatStartDate,s=q.from(new Date(r,a-1,o+i));e.push(s)})),this.cache=[e]}sortWeekDay(e){return e&&e.length?e.map((e=>e.toLocaleLowerCase())).sort(((e,t)=>Ce.weekDay.indexOf(e)-Ce.weekDay.indexOf(t))):[Ce.weekDay[this.getCurrentDayIndex(this.repeatStartDate)]]}getCurrentDayIndex(e){return e.toDate().getDay()}getValidCache(){const e=I(this.cache.slice(1));return this.cache[0].filter((e=>e.toDate()>=this.repeatStartDate.toDate())).concat(e).slice(0,"number"==typeof this.count?this.count:void 0)}}Ce.weekDay=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>e.toLowerCase()));class Re extends be{constructor(e,t,n,i){super(e,t,n,i),this.matchDay=this.repeatStartDate.date,this.matchMonth=this.repeatStartDate.month,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e){const t=new Date(e,this.matchMonth-1,this.matchDay);return t.getDate()===this.matchDay&&t.getMonth()+1===this.matchMonth?t:this.getNextStartDate(e+1)}initCache(){this.cache=[this.repeatStartDate]}}const je=new class{getPattern(e,t){const n=q.from(e),{frequency:i,interval:r=1,byWeekDay:a,until:o,count:s}=t,l=this.initDate(o);return this.initRepeatPattern(i,n,r<1?1:r,s,l,a)}initDate(e){if(e&&"object"==typeof e)return q.from(e);if(e&&"string"==typeof e){const[t,n,i]=e.split("/");return new q(Number(i),Number(t),Number(n))}}initRepeatPattern(e,t,n,i,r,a){switch(e){case"daily":return new ye(t,n,i,r);case"weekly":return new Ce(t,n,i,r,a);case"monthly":return new ke(t,n,i,r);default:return new Re(t,n,i,r)}}},De=/^\d{1,2}\/\d{1,2}\/\d{4}/,Ee=/^\d{1,2}:\d{1,2}/;class ze{constructor(e,t){this._eventSpansDays=1,this.repeatPattern=null,this._event=e,this._eventKey=t||M(),this.checkEventRequireField(e),this.initDate(e),this.initEventSpansDays(),this.initRepeatPattern()}get event(){return this._event}get eventKey(){return this._eventKey}get title(){return this._event.title}get disabled(){return!!this._event.disabled}get variant(){return this._event.variant}get color(){return this._event.color}get isAllDayEvent(){return!!this._event.isAllDay}get isRepeatEvent(){return null!==this.repeatPattern}get startDate(){return this._startDate}get endDate(){return this._endDate}get startTime(){return this._startTime}get endTime(){return this._endTime}get eventSpansDays(){return this._eventSpansDays}copyTo(e,t){const n=this._eventSpansDays>1?new Date(t.year,t.month-1,t.date+(this._eventSpansDays-1)):t.toDate();return new ze(Object.assign(Object.assign({},this._event),{startDate:t.toDate(),endDate:n,startTime:this.startTime,endTime:this.endTime}),e)}isGroupEvent(){return this._eventSpansDays>1}isCurrentDayEvent(e){const{startDate:t,endDate:n}=this,i=q.from(t),r=q.from(new Date(n.getFullYear(),n.getMonth(),n.getDate()+1)),a=e.toDate();return i.toDate()<=a&&r.toDate()>a}getEventDuration(){const[e,t]=this.startTime.split(":"),[n,i]=this.endTime.split(":"),r=q.from(new Date),a=new Date(r.year,r.month,r.date,Number(e),Number(t));return(new Date(r.year,r.month,r.date,0===Number(n)&&0!==Number(e)?24:Number(n),Number(i)).valueOf()-a.valueOf())/6e4}getRepeatSeries(e){return this.repeatPattern?this.repeatPattern.getRepeatSeries(e,this._eventSpansDays):[]}convertTimeTo24Hour(e){if((e=e.toLocaleLowerCase()).indexOf("am")>0||e.indexOf("pm")>0){if(e.indexOf("am")>0){e=e.replace("am","").trim();const[t,n]=e.split(":");return`${"12"===t?"00":t}:${n}`}{e=e.replace("pm","").trim();const[t,n]=e.split(":");return`${"12"===t?"12":Number(t)+12}:${n}`}}return e}checkEventRequireField(e){const{title:t,startDate:n,endDate:i,startTime:r,endTime:a}=e;if(n&&"string"==typeof n&&!De.test(n)||i&&"string"==typeof i&&!De.test(i))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!Ee.test(r)||a&&"string"==typeof a&&!Ee.test(a))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!n||!i&&!a)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:n,endDate:i,endTime:r}=e;if(t&&"object"==typeof t)this._startDate=t;else if(t&&"string"==typeof t){const[e,n,i]=t.split("/");this._startDate=new Date(Number(i),Number(e)-1,Number(n))}if(this._startTime=n?this.convertTimeTo24Hour(n):`${this._startDate.getHours()}:${this._startDate.getMinutes()}`,i&&"object"==typeof i)this._endDate=i;else if(i&&"string"==typeof i){const[e,t,n]=i.split("/");this._endDate=new Date(Number(n),Number(e)-1,Number(t),23,59,59)}else this._endDate=new Date(this._startDate.getFullYear(),this._startDate.getMonth(),this._startDate.getDate(),23,59,59);this._endTime=r?this.convertTimeTo24Hour(r):`${this._endDate.getHours()}:${this._endDate.getMinutes()}`}initRepeatPattern(){this._event.repeatOptions&&this._event.repeatOptions.frequency&&(this.repeatPattern=je.getPattern(this._startDate,this._event.repeatOptions))}initEventSpansDays(){const e=q.from(this.startDate),t=q.from(this.endDate);this._eventSpansDays=(t.toDate().valueOf()-e.toDate().valueOf())/864e5+1}}var Ie=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Me extends c{constructor(){super(...arguments),this.repeatEventMap=new Map}getCurrentDateEvents(e){return this.createRepeatEvents().filter((t=>t.isCurrentDayEvent(e)))}updateAfterEventChange(e){this.initCalendarEvents(e),this.repeatEventMap.clear()}updateWhenComponentWillLoad(){this.initCalendarEvents(this.events)}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const n=new ze(e);t.push(n)}catch(t){h.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}createRepeatEvents(){const e=[],t=[];return this.calendarEvents.forEach((n=>{n.isRepeatEvent?n.getRepeatSeries(this.currentPeriod).forEach((e=>{t.push(this.generateCalendarEventByRepeatSeries(n,e))})):e.push(n)})),t.concat(e)}generateCalendarEventByRepeatSeries(e,t){const n=`${e.eventKey}-${t.year}${t.month}${t.date}`;if(this.repeatEventMap.has(n))return this.repeatEventMap.get(n);{const i=e.copyTo(n,t);return this.repeatEventMap.set(n,i),i}}}Ie([l({writable:!0})],Me.prototype,"calendarEvents",void 0),Ie([l()],Me.prototype,"currentPeriod",void 0),Ie([l()],Me.prototype,"events",void 0),Ie([d("watchEventsChange")],Me.prototype,"updateAfterEventChange",null),Ie([d("componentWillLoad")],Me.prototype,"updateWhenComponentWillLoad",null);var Se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Te extends c{render(t,n){return e("vega-calendar-event",{"data-calendar-ref":this.host,key:t.eventKey,calendarEvent:t,class:n,onKeyDown:z(),onClick:()=>this.handleEventClick(t)},!t.isRepeatEvent&&e("slot",{name:ie(t.event.key)}))}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}}Te.backgroundColorModeEventHeight=18,Se([l()],Te.prototype,"host",void 0),Se([l()],Te.prototype,"calendarView",void 0),Se([l()],Te.prototype,"eventClickEmitter",void 0);var Oe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ve extends S{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=T(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e&&e.parentElement){const t=e.parentElement.getBoundingClientRect().height,n=Math.floor((t-Ve.monthDateTitleHeight)/Te.backgroundColorModeEventHeight);O.notify(x.getSubject(this.host,E),{host:this.host,detail:n})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}Ve.monthDateTitleHeight=26,Oe([l()],Ve.prototype,"host",void 0),Oe([l()],Ve.prototype,"monthEventRenderer",void 0),Oe([l()],Ve.prototype,"viewMode",void 0),Oe([d("componentDidLoad")],Ve.prototype,"updateMaxDisplayCount",null),Oe([d("watchViewModeChange")],Ve.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var $e=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Pe extends c{render(){const t=this.calendarView.dateItems[0],n=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),i=this.fullDayEventLayoutRenderer.sortLongEvents(n),r=this.filterDisplayEvents(i);return e("div",{class:"calendar-view-event-all"},t.map(((t,n)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(r[n],n,i[n])))))}renderCurrentFullDayEvents(n,i,r){const a=n.length*Te.backgroundColorModeEventHeight-2,o=r.slice(n.length).filter(Boolean).length;return e(t,null,e("div",{class:"placeholder-block",style:{height:a+"px"}},e("span",null,n.length," events")),this.fullDayEventLayoutRenderer.render(n,i),o>0&&this.dayViewFullDayEventMoreButtonRenderer.render(o))}filterDisplayEvents(e){if(this.showAllEventsInDayOrWeekView)return e;{const t=[],n=Pe.maxDisplayEventLength;return e.forEach((e=>{const i=e.length>n?e.slice(0,n):e;t.push(i)})),t}}}Pe.maxDisplayEventLength=2,$e([l()],Pe.prototype,"calendarView",void 0),$e([l()],Pe.prototype,"calendarEventController",void 0),$e([l()],Pe.prototype,"eventItemRenderer",void 0),$e([l()],Pe.prototype,"fullDayEventLayoutRenderer",void 0),$e([l()],Pe.prototype,"showAllEventsInDayOrWeekView",void 0),$e([l()],Pe.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0);class Be extends c{render(t){const n=[];return t.eventLayoutCells.forEach(((i,r)=>{let a=i.getEventBySlotIndex(0),o=0;for(let s=0;s<Be.totalNumberOfCells;s++){const l=i.getEventBySlotIndex(s);l!==a&&(a&&n.push(e("div",{key:r,class:"time-event-block",style:this.getTimeEventStyle(o,s,r,t.getEventColumnsSpannedCount(a))},this.eventItemRenderer.render(a,{"day-event":!0,"bg-shadow":r>0}))),a=l,o=s)}})),n}getTimeEventStyle(e,t,n,i){const r=n*(1/i);return{position:"absolute",left:100*r+"%",top:100/Be.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/Be.totalNumberOfCells*(t-e)+"%",zIndex:n>0?`${n}`:void 0}}}Be.totalNumberOfCells=96,function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],Be.prototype,"eventItemRenderer",void 0);class Ne{addCurrentEventToLayout(e,t){let n=e.find((e=>!e.hasOverlapEvent(t)));n?n.updateSlots(t):(n=this.createNewLayoutCell(),n.updateSlots(t),e.push(n))}}class Le{get eventLayoutCells(){return this.cells}}class Ae extends Le{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let n=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&n++})),n}}class Fe{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let n=t;if(t>=0)for(let i=t+1;i<this.slots.length;i++){if(this.slots[i]!==e){n=i-1;break}i===this.slots.length-1&&(n=i)}return n}}class We extends Fe{constructor(){super(...arguments),this.slots=We.defaultSlots}hasOverlapEvent(e){const[t,n]=this.getIndexRangeFromEvent(e);let i=!1;for(let e=t;e<n;e++)if(this.slots[e]){i=!0;break}return i}updateSlots(e){const[t,n]=this.getIndexRangeFromEvent(e);n>t&&(this.slots=this.slots.slice(0,t).concat(Array(n-t).fill(e),this.slots.slice(n)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:n}=e;return[ne(t),ne(n)]}}We.defaultSlots=Array(96).fill(null);class He extends Ne{generate(e){const t=[new We];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new Ae(t)}createNewLayoutCell(){return new We}}class Ue{sort(e,t,n){const i=[],r=[],a=[];for(let t=0;t<e.length;t++){const n=e[t];n&&(n.isGroupEvent()?r.push(n):n.isAllDayEvent?i.push(n):a.push(n))}let o=i.concat(this.sortCalendarEventByTime(a)),s=n.getEventsByIndex(t);const l=s.filter((e=>e));if(o=r.filter((e=>l.findIndex((t=>t===e))<0)).concat(o),s.length>l.length){const e=o.slice(0,s.length-l.length);o=o.slice(s.length-l.length),s=this.insertEventsToEmptyPosition(s,e)}return o=s.concat(o),o}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const n=ne(e.startTime),i=ne(t.startTime);return n===i?ne(t.endTime)-ne(e.endTime):n-i}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var Ye=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class _e extends c{constructor(){super(...arguments),this.calendarEventSorter=new Ue,this.dayViewTimedEventLayoutGenerator=new He}render(){return e("div",{class:"day-event-container"},this.calendarView.dateItems[0].map((t=>e("div",{key:`${t.month}-${t.date}`,class:"day-event-col"},this.renderTimedEvents(t)))))}renderTimedEvents(e){const t=this.calendarEventController.getCurrentDateEvents(e).filter((e=>!e.isAllDayEvent&&!e.isGroupEvent())),n=this.calendarEventSorter.sortCalendarEventByTime(t),i=this.dayViewTimedEventLayoutGenerator.generate(n);return this.dayViewEventLayoutRenderer.render(i)}}Ye([l()],_e.prototype,"calendarView",void 0),Ye([l()],_e.prototype,"calendarEventController",void 0),Ye([l()],_e.prototype,"dayViewEventLayoutRenderer",void 0);class qe extends Le{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let n=0;return this.cells.forEach(((i,r)=>{const a=i.getEventBySlotIndex(e);t.push(a),a&&(n=r)})),t.slice(0,n+1)}}class Ke extends Fe{constructor(){super(...arguments),this.slots=Ke.defaultSlots}updateSlots(e){const{start:t,end:n}=e;this.slots=this.slots.slice(0,t).concat(Array(n-t+1).fill(e.event),this.slots.slice(n+1))}hasOverlapEvent(e){const{start:t,end:n}=e;let i=!1;for(let e=t;e<n+1;e++)if(this.slots[e]){i=!0;break}return i}}Ke.defaultSlots=Array(7).fill(null);class Xe extends Ne{generate(e){const t=this.collectAllShouldOrderLongEvents(e),n=[this.createNewLayoutCell()];return t.forEach((e=>{this.addCurrentEventToLayout(n,e)})),new qe(n)}createNewLayoutCell(){return new Ke}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,n)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:n,start:n-t[e.eventKey].end!=1?n:t[e.eventKey].start}):{start:n,end:n,event:e}}))}));const n=Object.values(t);return this.sortLongEventViews(n)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:n,endDate:i}=e.event,{startDate:r,endDate:a}=t.event;n.setHours(0,0,0),r.setHours(0,0,0),i.setHours(23,59,59),a.setHours(23,59,59);const o=a.valueOf()-r.valueOf()-(i.valueOf()-n.valueOf());return n.valueOf()!==r.valueOf()?n.valueOf()-r.valueOf():o}))}}var Ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Je extends c{constructor(){super(...arguments),this.longEventLayoutGenerator=new Xe,this.calendarEventSorter=new Ue}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,n){return t.map(((t,i)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,n,i,"month"===this.viewMode?Je.monthViewEventOffsetTop:0)},this.eventItemRenderer.render(t,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,n,i){const r=this.calendarView.weekdays.length,a=t;let o=t+1;const s=n;let l=!0;const c=this.fullDayEventLayout.getEventRowsIndex(e);if(c>=0){const n=this.fullDayEventLayout.eventLayoutCells[c].getEventStartIndex(e),i=this.fullDayEventLayout.eventLayoutCells[c].getEventEndIndex(e);n===t?o=i+1:l=!1}return{position:"absolute",left:100/r*a+"%",top:`${s*Te.backgroundColorModeEventHeight+i}px`,width:100/r*(o-a)+"%",opacity:l?"1":"0"}}}Je.monthViewEventOffsetTop=26,Ge([l()],Je.prototype,"eventItemRenderer",void 0),Ge([l()],Je.prototype,"viewMode",void 0),Ge([l()],Je.prototype,"calendarView",void 0);var Qe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ze extends c{constructor(){super(...arguments),this.updateShowAllFlag=e=>{e.stopPropagation(),this.showAllEventsInDayOrWeekView=!0}}render(t){if(!this.showAllEventsInDayOrWeekView)return e("div",{tabIndex:0,role:"button",class:"more-button",onKeyDown:z(),onClick:this.updateShowAllFlag},`${t} More`)}resetShowAllFlag(){this.showAllEventsInDayOrWeekView=!1}}Qe([l({writable:!0})],Ze.prototype,"showAllEventsInDayOrWeekView",void 0),Qe([d("watchViewModeChange")],Ze.prototype,"resetShowAllFlag",null);var et=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class tt extends c{render(t){const n=t.findIndex((e=>e.isToday()))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!n}},e("div",{class:"time-marker",style:{top:this.getTimeMarkerPosition()},ref:e=>this.timeMarkerRef=e},t.map((t=>e("div",{key:t.date,class:{active:t.isToday()}})))))}updateTimeLine(e){this.scrollToTargetTimeBlock(e),this.syncTimeMarkerPosition(e)}clearTimer(){clearInterval(this.timeMarkerPositionTimer)}updateTimeLineIfComponentAddBack(){this.syncTimeMarkerPosition(this.viewMode)}displayCurrentTimeBlockByDefault(){this.scrollToTargetTimeBlock(this.viewMode)}getTimeMarkerPosition(){const e=new Date;return(60*e.getHours()+e.getMinutes())/1440*100+"%"}syncTimeMarkerPosition(e){clearInterval(this.timeMarkerPositionTimer),"month"!==e&&(this.timeMarkerPositionTimer=setInterval((()=>{this.timeMarkerRef&&(this.timeMarkerRef.style.top=this.getTimeMarkerPosition())}),6e4))}scrollToTargetTimeBlock(e){"month"!==e&&setTimeout((()=>{const e=this.viewRenderer.getCalendarViewElementRef(),t=Math.max(0,this.getViewCenterPosition());e&&t&&e.scrollTo({top:t})}),16)}getViewCenterPosition(){const e=this.viewRenderer.getCalendarViewElementRef();if(e){const t=e.querySelector(".calendar-view-title-container").offsetHeight,n=Math.max(e.offsetHeight-t,0)/2,i=e.scrollHeight,r=16,a=Number(this.getTimeMarkerPosition().replace("%",""))/100*Math.max(i-r-t,0);if(!isNaN(n)&&a&&a>n)return a-n+r}return 0}}et([l()],tt.prototype,"viewMode",void 0),et([l()],tt.prototype,"viewRenderer",void 0),et([d("watchViewModeChange")],tt.prototype,"updateTimeLine",null),et([d("disconnectedCallback")],tt.prototype,"clearTimer",null),et([d("connectedCallback")],tt.prototype,"updateTimeLineIfComponentAddBack",null),et([d("componentDidLoad")],tt.prototype,"displayCurrentTimeBlockByDefault",null);var nt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const it=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaEventClick=r(this,"vegaEventClick",7),this.eventClick=r(this,"eventClick",7),this.vegaDateDblClick=r(this,"vegaDateDblClick",7),this.dateDblClick=r(this,"dateDblClick",7),this.vegaMoreActionClick=r(this,"vegaMoreActionClick",7),this.moreActionClick=r(this,"moreActionClick",7),this.globalSlimmer={},this.translationSlimmer=new $,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new W,this.switchPanelRenderer=new oe,this.viewRenderer=new le,this.monthViewRenderer=new de,this.viewWithTimeRenderer=new ve,this.timeLineRenderer=new pe,this.timeMarkerRenderer=new tt,this.monthEventRenderer=new xe,this.currentPeriodController=new ue,this.calendarViewController=new me,this.dayViewFullDayEventRenderer=new Pe,this.dayViewFullDayEventMoreButtonRenderer=new Ze,this.dayViewTimedEventRenderer=new _e,this.eventItemRenderer=new Te,this.dayViewEventLayoutRenderer=new Be,this.fullDayEventLayoutRenderer=new Je,this.calendarEventController=new Me,this.eventResponsiveController=new Ve,this.changeEventEmitter=j(it,u),this.eventClickEmitter=j(it,b),this.dateDblClickEmitter=j(it,y),this.moreActionClickEmitter=j(it,k),this.changeEventPrevent=new D([u],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=V(it,"timeFormat","watchTimeFormat"),this.showEventColorBarNotifySlimmer=V(it,"showEventColorBar","watchShowEventColorBar"),this.showAllEventsInDayOrWeekView=!1,this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour",this.showEventColorBar=!0,this.showWeekends=!0}watchCurrentPeriodChange(e,t){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}watchShowEventColorBar(e){}watchShowWeekendsChange(){}render(){return s(e(a,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"],showEventColorBar:["watchShowEventColorBar"],showWeekends:["watchShowWeekendsChange"]}}};nt([f()],it.prototype,"globalSlimmer",void 0),nt([v()],it.prototype,"translationSlimmer",void 0),nt([v()],it.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),nt([v()],it.prototype,"renderer",void 0),nt([v()],it.prototype,"switchPanelRenderer",void 0),nt([v()],it.prototype,"viewRenderer",void 0),nt([v()],it.prototype,"monthViewRenderer",void 0),nt([v()],it.prototype,"viewWithTimeRenderer",void 0),nt([v()],it.prototype,"timeLineRenderer",void 0),nt([v()],it.prototype,"timeMarkerRenderer",void 0),nt([v()],it.prototype,"monthEventRenderer",void 0),nt([v()],it.prototype,"currentPeriodController",void 0),nt([v()],it.prototype,"calendarViewController",void 0),nt([v()],it.prototype,"dayViewFullDayEventRenderer",void 0),nt([v()],it.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0),nt([v()],it.prototype,"dayViewTimedEventRenderer",void 0),nt([v()],it.prototype,"eventItemRenderer",void 0),nt([v()],it.prototype,"dayViewEventLayoutRenderer",void 0),nt([v()],it.prototype,"fullDayEventLayoutRenderer",void 0),nt([v()],it.prototype,"calendarEventController",void 0),nt([v()],it.prototype,"eventResponsiveController",void 0),nt([v()],it.prototype,"changeEventEmitter",void 0),nt([v()],it.prototype,"eventClickEmitter",void 0),nt([v()],it.prototype,"dateDblClickEmitter",void 0),nt([v()],it.prototype,"moreActionClickEmitter",void 0),nt([v()],it.prototype,"changeEventPrevent",void 0),nt([v()],it.prototype,"timeFormatNotifySlimmer",void 0),nt([v()],it.prototype,"showEventColorBarNotifySlimmer",void 0),it.style='.border-divider-top{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-left-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-left{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-right{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-bottom-width:0px}.border-divider-bottom{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px}:host{display:flex;flex-direction:column;border-radius:12px;border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));overflow:hidden;width:100%;height:100%;box-sizing:border-box;max-height:1966px}.calendar-switch-panel{padding:24px;border-bottom-width:1px;border-top-width:0px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));flex-shrink:0;width:100%;box-sizing:border-box}.calendar-switch-panel .calendar-date-switch-container{display:flex;gap:8px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-view-switch-container{display:flex;gap:16px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-current-date{padding-left:8px}.calendar-view{width:100%;position:relative;flex-grow:1;overflow-y:auto;overflow-x:hidden;--calendar-weekday-columns:7}.calendar-view.calendar-hide-weekends{--calendar-weekday-columns:5}.calendar-view-month .calendar-view-month-container{width:100%;display:grid;min-height:100%;grid-template-rows:43px repeat(6, minmax(64px, 1fr))}.calendar-view-month .calendar-view-title{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));top:0;left:0;z-index:62}.calendar-view-month .calendar-view-title div{padding-top:12px;padding-bottom:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-month .calendar-view-row{position:relative;display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-month .calendar-view-row.calendar-view-title{position:sticky}.calendar-view-month .calendar-view-row:last-child{border-bottom-width:0px}.calendar-view-month .calendar-view-row .row-cell{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.calendar-view-month .calendar-view-row .row-cell:last-child{border-right-width:0px}.calendar-view-month .calendar-view-row .row-cell .date{padding-top:4px;padding-bottom:4px;padding-right:12px;padding-left:8px}.calendar-view-month .calendar-view-row .row-cell .date>div{display:inline-block;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-month .calendar-view-row .row-cell .date .month-block{margin-right:2px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col{text-align:center;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;cursor:pointer;width:18px;height:18px;line-height:18px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-month .calendar-view-row .row-cell.current-month-day .date>div{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled .date>div{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-top-left-radius:9999px;border-bottom-left-radius:9999px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-container{width:100%}.calendar-view-container .calendar-view-title-container{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:sticky;top:0;left:0;z-index:62}.calendar-view-container .calendar-view-row{box-sizing:border-box;width:100%;display:flex;flex-direction:row}.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{width:72px;text-align:right;padding-right:8px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:0}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-container .calendar-view-title{width:100%}.calendar-view-container .calendar-view-title>div{padding:12px;padding-bottom:8px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center;display:flex;flex-direction:column;gap:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-container .calendar-view-title .week-day{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}.calendar-view-container .calendar-view-title .active div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.calendar-view-container .calendar-view-event-all-container{align-items:center}.calendar-view-container .calendar-view-event-all{display:grid;grid-template-rows:1fr;flex-grow:1;min-height:18px}.calendar-view-container .calendar-view-day-container .time-line{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr))}.calendar-view-container .calendar-view-day-container .time-line .time-text{margin-top:-9px}.calendar-view-container .calendar-view-day-container .calendar-view-content{width:100%}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr));grid-template-columns:minmax(64px, 1fr)}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col>.border-divider-top:first-child{border-top-width:0px}.calendar-view-container .calendar-view-content-container{width:100%;position:relative}.calendar-view-week .calendar-view-container{min-height:100%}.calendar-view-week .calendar-view-container .calendar-view-title{display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-event-all{grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-day-container .calendar-view-content{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .time-marker-container .time-marker{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .day-event-container{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-day .calendar-view-container{min-height:100%}.time-marker-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.time-marker-container.hidden{display:none}.time-marker-container .time-marker{position:absolute;height:2px;display:grid;min-width:100%;left:0;top:0;z-index:61}.time-marker-container .time-marker div{width:100%;height:2px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));opacity:0.3}.time-marker-container .time-marker div.active{opacity:1;position:relative}.time-marker-container .time-marker div.active::before{content:"";display:block;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;position:absolute;width:8px;height:8px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));top:-3px;left:-4px}.day-event-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.day-event-container .day-event-col{height:100%;overflow:hidden}.day-event-container vega-calendar-event{pointer-events:auto;height:100%}.calendar-view-month .month-event-row{position:absolute;width:100%;overflow:hidden;height:calc(100% - 26px);left:0;bottom:0}.calendar-view-month .events-container{width:100%;box-sizing:border-box;overflow:hidden;padding:2px;display:flex;flex-direction:column;gap:2px;justify-content:space-between;flex-grow:1}.calendar-view-month .events-container .event-list{display:flex;flex-direction:column;gap:2px;flex-grow:1}.calendar-view-month .events-container .event-list .month-event-block{box-sizing:border-box;padding-left:2px;padding-right:3px}.calendar-view-month .events-container .month-event-more .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-month .events-container .month-event-more .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all{position:relative}.calendar-view-container .calendar-view-event-all .placeholder-block{padding-top:2px;padding-bottom:2px;box-sizing:content-box}.calendar-view-container .calendar-view-event-all .placeholder-block span{display:none}.calendar-view-container .calendar-view-event-all .day-event-block{padding-top:2px;padding-right:2px;box-sizing:border-box;padding-left:3px}.calendar-view-container .calendar-view-event-all .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px;margin-left:2px;padding:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-container .calendar-view-event-all .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all .event-all-col{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.calendar-view-container .day-event-col{position:relative}.calendar-view-container .day-event-col .time-event-block{box-sizing:border-box;padding-right:8px;padding-bottom:2px;padding-top:3px}.calendar-view-container .day-event-col .time-event-block vega-calendar-event.bg-shadow::part(event-container):not(:focus){outline:2px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}.calendar-view-container .day-event-col .time-event-block:focus-within{z-index:60 !important}.calendar-event-slot-container{display:none}';var rt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class at extends c{getEventTitleContainerRef(){return this.eventTitleContainerRef}getSlotContainerRef(){return this.slotContainerRef}render(){return e(t,null,this.injectBackgroundColorStyle(),this.calendarEventRender())}calendarEventRender(){return this.calendarEvent.isAllDayEvent||this.calendarEvent.isGroupEvent()?this.renderBackgroundModeEvent():this.renderNormalEvent()}renderBackgroundModeEvent(){const t=this.calendarEvent.disabled;return e("div",{role:"button",tabIndex:0,class:{"slot-container":this.slotMode,"background-color-mode":!0,"event-bg-color":!t,"bg-disabled":t},ref:e=>this.slotContainerRef=e},this.slotMode?this.getSlotElement():this.calendarEvent.title)}renderNormalEvent(){const{variant:t,disabled:n}=this.calendarEvent,i=t||"primary",r=!this.host.classList.contains("day-event"),a={"slot-container":this.slotMode,"event-container":!0,disabled:n,[i]:!0};if(r)return e("div",{role:"button",tabIndex:0,class:a,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),this.slotMode?this.getSlotElement():this.defaultNormalMonthEventContentRender());{const t=this.calendarEvent.getEventDuration();return e("div",{part:"event-container",class:Object.assign(Object.assign({},a),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!n,"bg-disabled":n}),role:"button",tabIndex:0,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),e("div",{class:"cover-block"}),this.slotMode?this.getSlotElement():this.defaultNormalTimedEventContentRender(t))}}renderEventStatus(){if(this.showColorBar){const t=this.calendarEvent.disabled;return e("div",{class:{"event-status":!0,"event-bg-color":!t,"bg-disabled":t}},e("span",{class:{stripe:"secondary"===this.calendarEvent.variant}}))}}defaultNormalMonthEventContentRender(){const{startTime:t,title:n}=this.calendarEvent;return e("div",{class:"event-title"},`${this.formatDisplayTime(t)} ${n}`)}defaultNormalTimedEventContentRender(t){const{startTime:n,endTime:i,title:r}=this.calendarEvent;return e("div",{class:"event-content"},e("div",{class:{"event-title":!0,"title-word-wrap":t>30},ref:e=>this.eventTitleContainerRef=e},r),e("div",{class:"event-time"},e("vega-icon",{size:"size-12",icon:C.getIconKey("clock-three")}),e("span",null,`${this.formatDisplayTime(n)} - ${this.formatDisplayTime(i)}`)))}getSlotElement(){if(!this.calendarEvent.isRepeatEvent)return e("slot",null)}injectBackgroundColorStyle(){return e("style",null,this.colorController.getBackgroundColorStyle())}formatDisplayTime(e){const[t,n]=e.split(":");if("24-hour"===this.timeFormat)return`${t.padStart(2,"0")}:${n.padStart(2,"0")}`;{const e=Number(t),i=e>=12?"pm":"am",r=n.padStart(2,"0");return e>12?`${e-12}:${r} pm`:0===e?`12:${r} am`:`${e}:${r} ${i}`}}}C.register({"clock-three":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 13.3 10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>'}}),rt([l()],at.prototype,"host",void 0),rt([l()],at.prototype,"timeFormat",void 0),rt([l()],at.prototype,"calendarEvent",void 0),rt([l()],at.prototype,"slotMode",void 0),rt([l()],at.prototype,"showColorBar",void 0),rt([l()],at.prototype,"colorController",void 0);class ot extends c{getBackgroundColorStyle(){const e=this.calendarEvent.color||"bg-accent6-primary";return B(e)?`.event-bg-color{${N.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],ot.prototype,"calendarEvent",void 0);var st=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class lt extends L{constructor(){super({parent:()=>this.host["data-calendar-ref"],subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"},{subStateName:"showColorBar",parentStateName:"showEventColorBar"}]})}}st([l({writable:!0})],lt.prototype,"timeFormat",void 0),st([l({writable:!0})],lt.prototype,"showColorBar",void 0);class ct extends c{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),n=A(t.height),i=A(t.lineHeight),r=Math.max(Math.floor(n/i),1);e.style.maxHeight=r*i+"px"}}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],ct.prototype,"renderer",void 0);var dt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ht extends c{findTheCalendarEventSlot(){if(this.calendarEvent){const{event:e}=this.calendarEvent,t=this.getParentCalendarElement();if(t){const n=t.querySelector(`vega-calendar-event-slot[event-key='${e.key}']`);n&&(this.slotMode=!0,this.matchSlotElement=n)}}}appendTheRepeatEventSlotToContainer(){const e=this.renderer.getSlotContainerRef();if(this.slotMode&&e&&this.matchSlotElement&&(this.calendarEvent.isRepeatEvent||this.isPopoverContent())){const t=this.matchSlotElement.cloneNode(!0);t.removeAttribute("slot"),e.querySelector("vega-calendar-event-slot")||e.appendChild(t)}}getParentCalendarElement(){return this.host["data-calendar-ref"]}isPopoverContent(){return this.host.classList.contains("calendar-event-in-popover")}}dt([l()],ht.prototype,"host",void 0),dt([l()],ht.prototype,"calendarEvent",void 0),dt([l({writable:!0})],ht.prototype,"slotMode",void 0),dt([l()],ht.prototype,"renderer",void 0),dt([d("componentWillLoad")],ht.prototype,"findTheCalendarEventSlot",null),dt([d("componentDidLoad")],ht.prototype,"appendTheRepeatEventSlotToContainer",null);var vt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const pt=class{constructor(e){i(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new S({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new at,this.colorController=new ot,this.slotController=new ht,this.subStateController=new lt,this.titleMaxHeightController=new ct,this.timeFormat="24-hour",this.slotMode=!1,this.showColorBar=!0}render(){return P(e("slot",null)),s(e(a,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return o(this)}};vt([f()],pt.prototype,"globalSlimmer",void 0),vt([v()],pt.prototype,"pageResizeObserverSlimmer",void 0),vt([v()],pt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),vt([v()],pt.prototype,"renderer",void 0),vt([v()],pt.prototype,"colorController",void 0),vt([v()],pt.prototype,"slotController",void 0),vt([v()],pt.prototype,"subStateController",void 0),vt([v()],pt.prototype,"titleMaxHeightController",void 0),pt.style='.bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host{display:block;box-sizing:border-box;width:100%}:host .background-color-mode{border-radius:2px;color:rgba(var(--v-text-black, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;cursor:pointer;overflow:hidden;white-space:nowrap}@media screen and (min-width: 768px) and (max-width: 1023px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host .background-color-mode:not(.slot-container){padding-left:8px;padding-right:8px}:host .background-color-mode:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host .event-container{display:block;width:100%;border-radius:4px;cursor:pointer;box-sizing:border-box;overflow:hidden}:host .background-color-mode.slot-container{height:16px;line-height:16px}:host ::slotted(vega-calendar-event-slot){position:relative;pointer-events:none}:host(.month-event) .event-container{display:flex;flex-direction:row;gap:4px;align-items:center;min-height:16px}:host(.month-event) .event-container:not(.slot-container){padding-left:2px;padding-right:2px}:host(.month-event) .event-container .event-status{width:8px;height:8px;box-sizing:border-box;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;margin-left:2px;flex-shrink:0}:host(.month-event) .event-container .event-status span{display:none;width:100%;height:100%;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.month-event) .event-container.secondary .event-status span{display:block;background-size:4px 4px;opacity:0.8}:host(.month-event) .event-container.tertiary .event-status{padding:1px}:host(.month-event) .event-container.tertiary .event-status span{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host(.month-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.month-event) .event-container:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}:host(.month-event) .event-container:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host(.month-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .event-container{position:relative}:host(.day-event) .event-container:not(.slot-container){padding-left:8px;padding-right:8px}:host(.day-event) .event-container .event-status{position:absolute;width:4px;height:100%;left:0;top:0;z-index:1}:host(.day-event) .event-container .event-status span{display:none}:host(.day-event) .event-container .cover-block{position:absolute;height:100%;width:100%;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:4px;left:0;top:0;opacity:0.7}:host(.day-event) .event-container .event-content,:host(.day-event) .event-container .event-time{display:flex;flex-direction:row;align-items:center}:host(.day-event) .event-container .event-content{gap:8px;position:relative;height:100%;box-sizing:border-box}:host(.day-event) .event-container .event-time{gap:4px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.day-event) .event-container .event-time vega-icon{flex-shrink:0}:host(.day-event) .event-container .event-time span{white-space:nowrap}:host(.day-event) .event-container .event-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host(.day-event) .event-container .event-title.title-word-wrap{overflow:hidden}:host(.day-event) .event-container .event-title:not(.title-word-wrap){white-space:nowrap}:host(.day-event) .event-container.duration-half-an-hour{padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.vertical{height:100%}:host(.day-event) .event-container.vertical .event-content{flex-direction:column;align-items:flex-start;gap:4px;padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.secondary .event-status span,:host(.day-event) .event-container.tertiary .event-status span{display:block;position:absolute;border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.day-event) .event-container.secondary .cover-block,:host(.day-event) .event-container.tertiary .cover-block{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.secondary .event-status span{width:100%;height:100%;top:0px;left:0px;background-size:4px 4px;opacity:0.8}:host(.day-event) .event-container.secondary .cover-block{opacity:0.9}:host(.day-event) .event-container.tertiary .event-status span{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));width:2px;height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.tertiary .cover-block{opacity:1}:host(.day-event) .event-container.disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .slot-container{min-height:16px}:host(.month-event.calendar-event-large-size) .background-color-mode{border-radius:4px}:host(.month-event.calendar-event-large-size) .background-color-mode:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .event-container:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .slot-container{height:24px;display:flex;align-items:center;line-height:24px}.stripe{background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}';var ft=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const mt=class{constructor(e){i(this,e),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(a,{slot:ie(this.eventKey)},e("slot",null)),this.host)}get host(){return o(this)}};ft([f()],mt.prototype,"globalSlimmer",void 0),ft([v()],mt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),mt.style=":host{width:100%;height:100%;position:relative}";export{it as vega_calendar,pt as vega_calendar_event,mt as vega_calendar_event_slot}
1
+ import{h as e,F as t,f as n,r as i,c as r,H as a,g as o}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as l,V as c,M as d,L as h,I as v}from"./p-6e1ab235.js";import{V as p,I as f}from"./p-4387d550.js";import{D as m}from"./p-6e898779.js";import{a as w,f as u,b as g,d as x,g as b,h as y,i as k}from"./p-6f81fe1e.js";import{V as C}from"./p-c9b9322b.js";import{p as R}from"./p-08835909.js";import{c as j}from"./p-a821bcf3.js";import{C as D}from"./p-431ab4dd.js";import{s as E}from"./p-c754b32c.js";import{c as z}from"./p-86194314.js";import{f as I}from"./p-3647d61d.js";import{g as M}from"./p-37b05e0b.js";import{P as S}from"./p-c0291e2e.js";import{d as T}from"./p-1bc5b3bc.js";import{C as O}from"./p-2d0d575f.js";import{c as V}from"./p-6cabdb36.js";import{T as $}from"./p-1503f791.js";import{s as P}from"./p-6bd5c49b.js";import{q as B}from"./p-b1f65b13.js";import{s as N}from"./p-2205ee4c.js";import{S as L}from"./p-72ecfd40.js";import{b as A}from"./p-0c667d6a.js";import"./p-331a62d5.js";import"./p-bf953152.js";import"./p-cc63e827.js";import"./p-6a334573.js";import"./p-804f71b3.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-8d283666.js";import"./p-5773a9a3.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";var F=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class W extends c{render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render())}}F([l()],W.prototype,"switchPanelRenderer",void 0),F([l()],W.prototype,"viewRenderer",void 0);const H=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};class U{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=H()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),n=[];for(let i=0;i<e.count;i++)n.push(new Date(t)),t.setDate(t.getDate()+1);return n}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class Y{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class _ extends U{generate(e){return new Y([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class q{constructor(e,t,n){this._date=n,this._month=t,this._year=e}static from(e){return new q(e.getFullYear(),e.getMonth()+1,e.getDate())}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}isToday(){const e=new Date;return e.getFullYear()===this.year&&e.getMonth()+1===this.month&&e.getDate()===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:n}=e,i={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<n?i.isPreviousMonth=!0:this.month>n?i.isNextMonth=!0:i.inMonth=!0:this.year>t?i.isNextMonth=!0:i.isPreviousMonth=!0,i}equal(e){const{year:t,month:n,date:i}=e;return this._year===t&&this._month===n&&this._date===i}}class K extends U{generate(e){const t=this.generateDates(e),n=e.showWeekends;let i=this.generateWeekHead(),r=[t.map(q.from)];return!1===n&&(i=i.slice(1,6),r=r.map((e=>e.slice(1,6)))),new Y(i,r)}}class X extends U{generate(e){const t=e.showWeekends;let n=[],i=[];this.generateDates(e).forEach(((e,t)=>{t%7||(n[t/7]=i=[]);const r=q.from(e);i.push(r)}));let r=this.generateWeekHead();return!1===t&&(r=r.slice(1,6),n=n.map((e=>e.slice(1,6)))),new Y(r,n)}}class G{constructor(e,t){this._count=e,this._current=t||q.from(new Date),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}get type(){return this._type}get showWeekends(){return this._showWeekends}goTo(e){return this.createBy(e)}now(){return this.createBy(q.from(new Date))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-H().indexOf(t.getDay())),this._startDate=q.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=q.from(t)}}class J extends G{constructor(e,t){super(J.DISPLAY_DATE_COUNT,e),this._type="day",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();e.setDate(e.getDate()+1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t)),this.createBy(t)}previous(){const e=this.current.toDate();e.setDate(e.getDate()-1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t,ee.PREVIOUS)),this.createBy(t)}now(){let e=q.from(new Date);return!1===this._showWeekends&&(e=re(e)),this.createBy(e)}createBy(e){return new J(e,this._showWeekends)}}J.DISPLAY_DATE_COUNT=1;class Q extends G{constructor(e,t){super(Q.DISPLAY_DATE_COUNT,e),this._type="week",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())+7),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())-7),this.createBy(q.from(e))}createBy(e){return new Q(e,this._showWeekends)}}Q.DISPLAY_DATE_COUNT=7;class Z extends G{constructor(e,t){super(Z.DISPLAY_DATE_COUNT,Z.getMonthFirstDay(e)),this._type="month",this._showWeekends=!0,this._showWeekends=!1!==t}static getMonthFirstDay(e){const t=e||q.from(new Date);return new q(t.year,t.month,1)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(q.from(e))}createBy(e){return new Z(e,this._showWeekends)}}var ee;function te(e,t=!1){return e.toLocaleDateString("en-US",{month:t?"short":"long"})}function ne(e,t=15){const[n,i]=e.split(":");return Math.round((60*Number(n)+Number(i))/t)}function ie(e){return"vega-calendar-event-slot-"+e}function re(e,t=ee.NEXT){const n=e.toDate().getDay();if(0===n||6===n){let i=0===n?1:2;return t===ee.PREVIOUS&&(i=0===n?-2:-1),q.from(new Date(e.year,e.month-1,e.date+i))}return e}Z.DISPLAY_DATE_COUNT=42,function(e){e.PREVIOUS="-1",e.NEXT="1"}(ee||(ee={}));var ae=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class oe extends c{constructor(){super(...arguments),this.handleViewChange=e=>{this.currentPeriodController.updateCalendarPeriod(e.detail,this.currentPeriod.current)},this.todayButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.now())},this.nextButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.next())},this.prevButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.previous())},this.moreActionMenuClick=e=>{this.moreActionClickEmitter.emit(e.detail)}}getSwitchPanelRef(){return this.switchPanelRef}render(){return e("vega-flex",{direction:"row",gap:"size-16",justifyContent:"space-between",alignItems:"center",class:"calendar-switch-panel",ref:e=>this.switchPanelRef=e},this.renderDateSwitch(),e("div",{class:"calendar-view-switch-container"},this.renderViewSwitch(),this.renderMoreActionMenu()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{m.addUniqueObserverToNode(e,w,this.todayButtonClick)},label:this.translationSlimmer.t("Today")}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.nextButtonClick)}}),this.renderCurrentPeriod())}renderCurrentPeriod(){return e("vega-font",{class:"calendar-current-date",variant:"font-field-label",color:"text-primary"},this.getViewDateSummary())}renderViewSwitch(){return e("vega-segment-control",{segments:oe.views.map((e=>Object.assign(Object.assign({},e),{text:this.translationSlimmer.t(e.text)}))),size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{m.addUniqueObserverToNode(e,u,this.handleViewChange)}})}renderMoreActionMenu(){var t,n;if(null===(n=null===(t=this.moreActionDropdownProps)||void 0===t?void 0:t.source)||void 0===n?void 0:n.length)return e("vega-dropdown",Object.assign({alignment:"end",trigger:"click"},this.moreActionDropdownProps,{ref:e=>{m.addUniqueObserverToNode(e,g,this.moreActionMenuClick)}}),e("vega-button-circle",{size:"small",icon:C.getIconKey("ellipsis-vertical"),variant:"icon-only"}))}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":{const n=this.translationSlimmer.t(te(e.toDate()));t=`${e.date} ${n}, ${e.year}`;break}case"week":{const e=this.calendarView.dateItems[0],n=e[0],i=e[e.length-1],[r,a]=[n,i].map((e=>this.translationSlimmer.t(te(e.toDate()))));t=`${n.date} ${r}${n.year===i.year?"":", "+n.year} - ${i.date} ${a}, ${i.year}`;break}case"month":t=`${this.translationSlimmer.t(te(e.toDate()))}, ${e.year}`}return t}}C.register({"chevron-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>'},"chevron-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>'},"ellipsis-vertical":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 464a48 48 0 1 1 0-96 48 48 0 1 1 0 96zm0-160a48 48 0 1 1 0-96 48 48 0 1 1 0 96zM0 96a48 48 0 1 1 96 0A48 48 0 1 1 0 96z"/></svg>'}}),oe.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],ae([l()],oe.prototype,"viewMode",void 0),ae([l()],oe.prototype,"calendarView",void 0),ae([l()],oe.prototype,"currentPeriod",void 0),ae([l()],oe.prototype,"moreActionDropdownProps",void 0),ae([l()],oe.prototype,"moreActionClickEmitter",void 0),ae([l()],oe.prototype,"currentPeriodController",void 0),ae([l()],oe.prototype,"calendarViewController",void 0),ae([l()],oe.prototype,"translationSlimmer",void 0);var se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class le extends c{getCalendarViewElementRef(){return this.calendarViewElementRef}render(){return e("div",{class:`calendar-view calendar-view-${this.viewMode} ${!1===this.showWeekends?"calendar-hide-weekends":""}`,ref:e=>this.calendarViewElementRef=e},"month"===this.viewMode?this.monthViewRenderer.render():this.viewWithTimeRenderer.render())}}se([l()],le.prototype,"viewMode",void 0),se([l()],le.prototype,"showWeekends",void 0),se([l()],le.prototype,"monthViewRenderer",void 0),se([l()],le.prototype,"viewWithTimeRenderer",void 0);var ce=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class de extends c{render(){return e("div",{class:"calendar-view-month-container"},e("div",{class:"calendar-view-row calendar-view-title border-divider-bottom"},this.calendarView.weekdays.map((t=>e("div",{key:t},this.translationSlimmer.t(t))))),this.renderMonthViewContent())}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((n,i)=>{const r=this.monthEventRenderer.getCurrentRowEvents(n),a=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:i,class:"calendar-view-row border-divider-bottom"},n.map(((n,i)=>e("div",{class:{"row-cell border-divider-right":!0,"current-month-day":n.compare(t).inMonth,active:n.isToday(),disabled:!1},key:`${n.month}-${n.date}`,onDblClick:e=>this.handleDateBlockClick(e,n)},this.renderDateBlock(n),this.monthEventRenderer.render(n,r[i],a[i],i)))))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},te(t.toDate(),!0)),e("div",{role:"button",tabIndex:0,class:"grid-col",onDblClick:e=>this.goToCurrentDayView(e,t)},t.date))}goToCurrentDayView(e,t){e.stopPropagation(),this.currentPeriodController.updateCalendarPeriod("day",t)}handleDateBlockClick(e,t){const{target:n,clientX:i,clientY:r}=e;if(this.isMonthBlockBlankArea(n)){const{year:e,month:n,date:a}=t;this.dateDblClickEmitter.emit({year:e,month:n,date:a,hour:0,mouseEventInfo:{clientX:i,clientY:r}})}}isMonthBlockBlankArea(e){return!e.classList.contains("more-button")&&"VEGA-CALENDAR-EVENT"!==e.tagName}}ce([l()],de.prototype,"viewMode",void 0),ce([l()],de.prototype,"calendarView",void 0),ce([l()],de.prototype,"currentPeriod",void 0),ce([l()],de.prototype,"currentPeriodController",void 0),ce([l()],de.prototype,"monthEventRenderer",void 0),ce([l()],de.prototype,"dateDblClickEmitter",void 0),ce([l()],de.prototype,"translationSlimmer",void 0);var he=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ve extends c{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}renderViewTitle(){const t=this.calendarView.dateItems[0],n=this.calendarView.weekdays;return e("div",{class:"calendar-view-title-container"},e("div",{class:"calendar-view-row"},e("div",{class:"time-line-empty"}),e("div",{class:"calendar-view-title"},t.map(((t,i)=>e("div",{key:t.date,class:{active:t.isToday()}},e("div",null,this.translationSlimmer.t(n[i])),e("div",{class:"week-day"},t.date)))))),e("div",{class:"calendar-view-row calendar-view-event-all-container border-divider-bottom"},e("div",{class:"time-line-all"},this.translationSlimmer.t("All Day")),this.dayViewFullDayEventRenderer.render()))}renderViewContent(){const t=this.calendarView.dateItems[0];return e("div",{class:"calendar-view-row calendar-view-day-container"},this.timeLineRenderer.render(),e("div",{class:"calendar-view-content-container"},e("div",{class:"calendar-view-content"},t.map((t=>e("div",{class:"grid-col border-divider-left",key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock(t))))),this.dayViewTimedEventRenderer.render(),this.timeMarkerRenderer.render(t)))}renderHourBlock(t){return Array(24).fill("").map(((n,i)=>e("div",{class:"grid-cell border-divider-top",onDblClick:e=>{this.handleDateBlockClick(t,i,e)}})))}handleDateBlockClick(e,t,n){const{year:i,month:r,date:a}=e,{clientX:o,clientY:s}=n;this.dateDblClickEmitter.emit({year:i,month:r,date:a,hour:t,mouseEventInfo:{clientX:o,clientY:s}})}}he([l()],ve.prototype,"viewMode",void 0),he([l()],ve.prototype,"timeLineRenderer",void 0),he([l()],ve.prototype,"timeMarkerRenderer",void 0),he([l()],ve.prototype,"dayViewTimedEventRenderer",void 0),he([l()],ve.prototype,"dayViewFullDayEventRenderer",void 0),he([l()],ve.prototype,"calendarView",void 0),he([l()],ve.prototype,"dateDblClickEmitter",void 0),he([l()],ve.prototype,"translationSlimmer",void 0);class pe extends c{render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line"},e("div",{class:"hour-empty"}),t.map(((t,n)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===n?24:n},t)))))}getTimeLineTitles(){const e=[];if("12-hour"===this.timeFormat){e.push("12 AM");for(let t=1;t<12;t++)e.push(`${t} AM`);e.push("12 PM");for(let t=1;t<12;t++)e.push(`${t} PM`)}else for(let t=0;t<24;t++)e.push(`${R(t)}`);return e}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],pe.prototype,"timeFormat",void 0);var fe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class me extends c{constructor(){super(...arguments),this.monthViewGenerator=new X,this.weekViewGenerator=new K,this.dayViewGenerator=new _}initialCalendarView(){this.setCalendarView(this.getCalendarViewByPeriod(this.currentPeriod))}generateCalendarView(e){this.setCalendarView(this.getCalendarViewByPeriod(e))}getCalendarViewByPeriod(e){switch(e.type){case"week":return this.weekViewGenerator.generate(e);case"day":return this.dayViewGenerator.generate(e);default:return this.monthViewGenerator.generate(e)}}setCalendarView(e){this.calendarView=e}}fe([l({writable:!0})],me.prototype,"calendarView",void 0),fe([l()],me.prototype,"currentPeriod",void 0),fe([l()],me.prototype,"showWeekends",void 0),fe([l()],me.prototype,"currentPeriodController",void 0),fe([d("componentWillLoad")],me.prototype,"initialCalendarView",null),fe([d("watchCurrentPeriodChange")],me.prototype,"generateCalendarView",null);var we=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ue extends c{setCurrentPeriod(e){this.currentPeriod=e}updateCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new Z(t,this.showWeekends));break;case"week":this.setCurrentPeriod(new Q(t,this.showWeekends));break;case"day":t=!1===this.showWeekends?re(t):t,this.setCurrentPeriod(new J(t,this.showWeekends))}}initialCurrentPeriod(){this.updateCalendarPeriod(this.viewMode,q.from(new Date))}emitChangeEvent(e,t){e&&t&&e.startDate.equal(t.startDate)&&e.endDate.equal(t.endDate)||(e&&e.type!==this.viewMode&&(this.viewMode=e.type),this.changeEventEmitter.emit({viewMode:e.type,currentPeriod:this.getCurrentPeriodSummary()}))}updateCurrentPeriodByViewMode(e){this.currentPeriod&&e!==this.currentPeriod.type&&this.updateCalendarPeriod(e,this.currentPeriod.current)}updateCurrentPeriodAfterHideWeekEndsChange(){this.updateCalendarPeriod(this.viewMode,this.currentPeriod.current)}getCurrentPeriodSummary(){const{current:e,startDate:t,endDate:n}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:n.date,month:n.month,year:n.year}}}}we([l({writable:!0})],ue.prototype,"currentPeriod",void 0),we([l()],ue.prototype,"changeEventEmitter",void 0),we([l({writable:!0})],ue.prototype,"viewMode",void 0),we([l()],ue.prototype,"showWeekends",void 0),we([d("componentWillLoad")],ue.prototype,"initialCurrentPeriod",null),we([d("watchCurrentPeriodChange")],ue.prototype,"emitChangeEvent",null),we([d("watchViewModeChange")],ue.prototype,"updateCurrentPeriodByViewMode",null),we([d("watchShowWeekendsChange")],ue.prototype,"updateCurrentPeriodAfterHideWeekEndsChange",null);var ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class xe extends c{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const n=this.calendarEventController.getCurrentDateEvents(e);t.push(n)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const n=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(n)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,n,i,r){const a=n.slice(i.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(i,r)),this.renderMoreButton(n,a,`${t.date} ${te(t.toDate())} ${t.year}`))}addMaxDisplayCountChange(){m.addUniqueObserverToNode(this.host,E,(e=>{this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&n(this.host)}))}renderMoreButton(t,n,i){if(n){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),a=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right"},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:z()},`${n} More`),e("vega-flex",{slot:"popover",direction:"col",gap:"0"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},i),e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:a.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0})))),a.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0}))))))}}hideTheCutOffEvents(e,t){const n=[],i=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((n=>{e.filter((e=>e.includes(n))).length>t.filter((e=>e.includes(n))).length&&i.push(n)})),i.length?(t.forEach((e=>{e.length&&e[e.length-1]&&i.includes(e[e.length-1])?n.push(e.slice(0,e.length-1)):n.push(e)})),n):t}}ge([l()],xe.prototype,"viewMode",void 0),ge([l()],xe.prototype,"host",void 0),ge([l()],xe.prototype,"calendarEventController",void 0),ge([l()],xe.prototype,"eventItemRenderer",void 0),ge([l()],xe.prototype,"fullDayEventLayoutRenderer",void 0),ge([d("componentWillLoad")],xe.prototype,"addMaxDisplayCountChange",null);class be{constructor(e,t,n,i){this.repeatStartDate=e,this.interval=t,this.count=n,this.until=i}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.cache.filter((n=>this.isSeriesInPeriod(n,t,e)))}isSeriesInPeriod(e,t,n){const i=e.toDate(),r=new Date(e.year,e.month-1,e.date+t-1),{startDate:a,endDate:o}=n,s=a.toDate(),l=o.toDate();return i>=s&&i<=l||r>=s&&r<=l||i<=s&&r>=l}}be.daySeconds=864e5;class ye extends be{constructor(e,t,n,i){super(e,t,n,i),this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=new Date(e.year,e.month-1,e.date+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}}class ke extends be{constructor(e,t,n,i){super(e,t,n,i),this.byMonthDay=this.repeatStartDate.date,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year,e.month-1+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e,t){const n=new Date(e,t,this.byMonthDay);return n.getDate()===this.byMonthDay?n:this.getNextStartDate(e,t+1)}}class Ce extends be{constructor(e,t,n,i,r){super(e,t,n,i),this.byWeekDay=this.sortWeekDay(r),this.initCache()}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.getValidCache().filter((n=>this.isSeriesInPeriod(n,t,e)))}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t[0].toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n[0].toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e[0]&&e[0].toDate()<=n[0].toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.getValidCache().length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDates(e);if(0===t.length||"number"==typeof this.count&&this.getValidCache().length>=this.count)return null;{const e=t.map((e=>q.from(e)));return this.cache.push(e),e}}getNextStartDates(e){return e.map((e=>new Date(e.year,e.month-1,e.date+7*this.interval))).filter((e=>!this.until||e<=this.until.toDate()))}initCache(){const e=[],t=this.getCurrentDayIndex(this.repeatStartDate);this.byWeekDay.forEach((n=>{const i=Ce.weekDay.indexOf(n)-t,{year:r,month:a,date:o}=this.repeatStartDate,s=q.from(new Date(r,a-1,o+i));e.push(s)})),this.cache=[e]}sortWeekDay(e){return e&&e.length?e.map((e=>e.toLocaleLowerCase())).sort(((e,t)=>Ce.weekDay.indexOf(e)-Ce.weekDay.indexOf(t))):[Ce.weekDay[this.getCurrentDayIndex(this.repeatStartDate)]]}getCurrentDayIndex(e){return e.toDate().getDay()}getValidCache(){const e=I(this.cache.slice(1));return this.cache[0].filter((e=>e.toDate()>=this.repeatStartDate.toDate())).concat(e).slice(0,"number"==typeof this.count?this.count:void 0)}}Ce.weekDay=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>e.toLowerCase()));class Re extends be{constructor(e,t,n,i){super(e,t,n,i),this.matchDay=this.repeatStartDate.date,this.matchMonth=this.repeatStartDate.month,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e){const t=new Date(e,this.matchMonth-1,this.matchDay);return t.getDate()===this.matchDay&&t.getMonth()+1===this.matchMonth?t:this.getNextStartDate(e+1)}initCache(){this.cache=[this.repeatStartDate]}}const je=new class{getPattern(e,t){const n=q.from(e),{frequency:i,interval:r=1,byWeekDay:a,until:o,count:s}=t,l=this.initDate(o);return this.initRepeatPattern(i,n,r<1?1:r,s,l,a)}initDate(e){if(e&&"object"==typeof e)return q.from(e);if(e&&"string"==typeof e){const[t,n,i]=e.split("/");return new q(Number(i),Number(t),Number(n))}}initRepeatPattern(e,t,n,i,r,a){switch(e){case"daily":return new ye(t,n,i,r);case"weekly":return new Ce(t,n,i,r,a);case"monthly":return new ke(t,n,i,r);default:return new Re(t,n,i,r)}}},De=/^\d{1,2}\/\d{1,2}\/\d{4}/,Ee=/^\d{1,2}:\d{1,2}/;class ze{constructor(e,t){this._eventSpansDays=1,this.repeatPattern=null,this._event=e,this._eventKey=t||M(),this.checkEventRequireField(e),this.initDate(e),this.initEventSpansDays(),this.initRepeatPattern()}get event(){return this._event}get eventKey(){return this._eventKey}get title(){return this._event.title}get disabled(){return!!this._event.disabled}get variant(){return this._event.variant}get color(){return this._event.color}get isAllDayEvent(){return!!this._event.isAllDay}get isRepeatEvent(){return null!==this.repeatPattern}get startDate(){return this._startDate}get endDate(){return this._endDate}get startTime(){return this._startTime}get endTime(){return this._endTime}get eventSpansDays(){return this._eventSpansDays}copyTo(e,t){const n=this._eventSpansDays>1?new Date(t.year,t.month-1,t.date+(this._eventSpansDays-1)):t.toDate();return new ze(Object.assign(Object.assign({},this._event),{startDate:t.toDate(),endDate:n,startTime:this.startTime,endTime:this.endTime}),e)}isGroupEvent(){return this._eventSpansDays>1}isCurrentDayEvent(e){const{startDate:t,endDate:n}=this,i=q.from(t),r=q.from(new Date(n.getFullYear(),n.getMonth(),n.getDate()+1)),a=e.toDate();return i.toDate()<=a&&r.toDate()>a}getEventDuration(){const[e,t]=this.startTime.split(":"),[n,i]=this.endTime.split(":"),r=q.from(new Date),a=new Date(r.year,r.month,r.date,Number(e),Number(t));return(new Date(r.year,r.month,r.date,0===Number(n)&&0!==Number(e)?24:Number(n),Number(i)).valueOf()-a.valueOf())/6e4}getRepeatSeries(e){return this.repeatPattern?this.repeatPattern.getRepeatSeries(e,this._eventSpansDays):[]}convertTimeTo24Hour(e){if((e=e.toLocaleLowerCase()).indexOf("am")>0||e.indexOf("pm")>0){if(e.indexOf("am")>0){e=e.replace("am","").trim();const[t,n]=e.split(":");return`${"12"===t?"00":t}:${n}`}{e=e.replace("pm","").trim();const[t,n]=e.split(":");return`${"12"===t?"12":Number(t)+12}:${n}`}}return e}checkEventRequireField(e){const{title:t,startDate:n,endDate:i,startTime:r,endTime:a}=e;if(n&&"string"==typeof n&&!De.test(n)||i&&"string"==typeof i&&!De.test(i))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!Ee.test(r)||a&&"string"==typeof a&&!Ee.test(a))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!n||!i&&!a)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:n,endDate:i,endTime:r}=e;if(t&&"object"==typeof t)this._startDate=t;else if(t&&"string"==typeof t){const[e,n,i]=t.split("/");this._startDate=new Date(Number(i),Number(e)-1,Number(n))}if(this._startTime=n?this.convertTimeTo24Hour(n):`${this._startDate.getHours()}:${this._startDate.getMinutes()}`,i&&"object"==typeof i)this._endDate=i;else if(i&&"string"==typeof i){const[e,t,n]=i.split("/");this._endDate=new Date(Number(n),Number(e)-1,Number(t),23,59,59)}else this._endDate=new Date(this._startDate.getFullYear(),this._startDate.getMonth(),this._startDate.getDate(),23,59,59);this._endTime=r?this.convertTimeTo24Hour(r):`${this._endDate.getHours()}:${this._endDate.getMinutes()}`}initRepeatPattern(){this._event.repeatOptions&&this._event.repeatOptions.frequency&&(this.repeatPattern=je.getPattern(this._startDate,this._event.repeatOptions))}initEventSpansDays(){const e=q.from(this.startDate),t=q.from(this.endDate);this._eventSpansDays=(t.toDate().valueOf()-e.toDate().valueOf())/864e5+1}}var Ie=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Me extends c{constructor(){super(...arguments),this.repeatEventMap=new Map}getCurrentDateEvents(e){return this.createRepeatEvents().filter((t=>t.isCurrentDayEvent(e)))}updateAfterEventChange(e){this.initCalendarEvents(e),this.repeatEventMap.clear()}updateWhenComponentWillLoad(){this.initCalendarEvents(this.events)}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const n=new ze(e);t.push(n)}catch(t){h.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}createRepeatEvents(){const e=[],t=[];return this.calendarEvents.forEach((n=>{n.isRepeatEvent?n.getRepeatSeries(this.currentPeriod).forEach((e=>{t.push(this.generateCalendarEventByRepeatSeries(n,e))})):e.push(n)})),t.concat(e)}generateCalendarEventByRepeatSeries(e,t){const n=`${e.eventKey}-${t.year}${t.month}${t.date}`;if(this.repeatEventMap.has(n))return this.repeatEventMap.get(n);{const i=e.copyTo(n,t);return this.repeatEventMap.set(n,i),i}}}Ie([l({writable:!0})],Me.prototype,"calendarEvents",void 0),Ie([l()],Me.prototype,"currentPeriod",void 0),Ie([l()],Me.prototype,"events",void 0),Ie([d("watchEventsChange")],Me.prototype,"updateAfterEventChange",null),Ie([d("componentWillLoad")],Me.prototype,"updateWhenComponentWillLoad",null);var Se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Te extends c{render(t,n){return e("vega-calendar-event",{"data-calendar-ref":this.host,key:t.eventKey,calendarEvent:t,class:n,onKeyDown:z(),onClick:()=>this.handleEventClick(t)},!t.isRepeatEvent&&e("slot",{name:ie(t.event.key)}))}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}}Te.backgroundColorModeEventHeight=18,Se([l()],Te.prototype,"host",void 0),Se([l()],Te.prototype,"calendarView",void 0),Se([l()],Te.prototype,"eventClickEmitter",void 0);var Oe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ve extends S{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=T(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e&&e.parentElement){const t=e.parentElement.getBoundingClientRect().height,n=Math.floor((t-Ve.monthDateTitleHeight)/Te.backgroundColorModeEventHeight);O.notify(x.getSubject(this.host,E),{host:this.host,detail:n})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}Ve.monthDateTitleHeight=26,Oe([l()],Ve.prototype,"host",void 0),Oe([l()],Ve.prototype,"monthEventRenderer",void 0),Oe([l()],Ve.prototype,"viewMode",void 0),Oe([d("componentDidLoad")],Ve.prototype,"updateMaxDisplayCount",null),Oe([d("watchViewModeChange")],Ve.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var $e=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Pe extends c{render(){const t=this.calendarView.dateItems[0],n=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),i=this.fullDayEventLayoutRenderer.sortLongEvents(n),r=this.filterDisplayEvents(i);return e("div",{class:"calendar-view-event-all"},t.map(((t,n)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(r[n],n,i[n])))))}renderCurrentFullDayEvents(n,i,r){const a=n.length*Te.backgroundColorModeEventHeight-2,o=r.slice(n.length).filter(Boolean).length;return e(t,null,e("div",{class:"placeholder-block",style:{height:a+"px"}},e("span",null,n.length," events")),this.fullDayEventLayoutRenderer.render(n,i),o>0&&this.dayViewFullDayEventMoreButtonRenderer.render(o))}filterDisplayEvents(e){if(this.showAllEventsInDayOrWeekView)return e;{const t=[],n=Pe.maxDisplayEventLength;return e.forEach((e=>{const i=e.length>n?e.slice(0,n):e;t.push(i)})),t}}}Pe.maxDisplayEventLength=2,$e([l()],Pe.prototype,"calendarView",void 0),$e([l()],Pe.prototype,"calendarEventController",void 0),$e([l()],Pe.prototype,"eventItemRenderer",void 0),$e([l()],Pe.prototype,"fullDayEventLayoutRenderer",void 0),$e([l()],Pe.prototype,"showAllEventsInDayOrWeekView",void 0),$e([l()],Pe.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0);class Be extends c{render(t){const n=[];return t.eventLayoutCells.forEach(((i,r)=>{let a=i.getEventBySlotIndex(0),o=0;for(let s=0;s<Be.totalNumberOfCells;s++){const l=i.getEventBySlotIndex(s);l!==a&&(a&&n.push(e("div",{key:r,class:"time-event-block",style:this.getTimeEventStyle(o,s,r,t.getEventColumnsSpannedCount(a))},this.eventItemRenderer.render(a,{"day-event":!0,"bg-shadow":r>0}))),a=l,o=s)}})),n}getTimeEventStyle(e,t,n,i){const r=n*(1/i);return{position:"absolute",left:100*r+"%",top:100/Be.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/Be.totalNumberOfCells*(t-e)+"%",zIndex:n>0?`${n}`:void 0}}}Be.totalNumberOfCells=96,function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],Be.prototype,"eventItemRenderer",void 0);class Ne{addCurrentEventToLayout(e,t){let n=e.find((e=>!e.hasOverlapEvent(t)));n?n.updateSlots(t):(n=this.createNewLayoutCell(),n.updateSlots(t),e.push(n))}}class Le{get eventLayoutCells(){return this.cells}}class Ae extends Le{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let n=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&n++})),n}}class Fe{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let n=t;if(t>=0)for(let i=t+1;i<this.slots.length;i++){if(this.slots[i]!==e){n=i-1;break}i===this.slots.length-1&&(n=i)}return n}}class We extends Fe{constructor(){super(...arguments),this.slots=We.defaultSlots}hasOverlapEvent(e){const[t,n]=this.getIndexRangeFromEvent(e);let i=!1;for(let e=t;e<n;e++)if(this.slots[e]){i=!0;break}return i}updateSlots(e){const[t,n]=this.getIndexRangeFromEvent(e);n>t&&(this.slots=this.slots.slice(0,t).concat(Array(n-t).fill(e),this.slots.slice(n)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:n}=e;return[ne(t),ne(n)]}}We.defaultSlots=Array(96).fill(null);class He extends Ne{generate(e){const t=[new We];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new Ae(t)}createNewLayoutCell(){return new We}}class Ue{sort(e,t,n){const i=[],r=[],a=[];for(let t=0;t<e.length;t++){const n=e[t];n&&(n.isGroupEvent()?r.push(n):n.isAllDayEvent?i.push(n):a.push(n))}let o=i.concat(this.sortCalendarEventByTime(a)),s=n.getEventsByIndex(t);const l=s.filter((e=>e));if(o=r.filter((e=>l.findIndex((t=>t===e))<0)).concat(o),s.length>l.length){const e=o.slice(0,s.length-l.length);o=o.slice(s.length-l.length),s=this.insertEventsToEmptyPosition(s,e)}return o=s.concat(o),o}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const n=ne(e.startTime),i=ne(t.startTime);return n===i?ne(t.endTime)-ne(e.endTime):n-i}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var Ye=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class _e extends c{constructor(){super(...arguments),this.calendarEventSorter=new Ue,this.dayViewTimedEventLayoutGenerator=new He}render(){return e("div",{class:"day-event-container"},this.calendarView.dateItems[0].map((t=>e("div",{key:`${t.month}-${t.date}`,class:"day-event-col"},this.renderTimedEvents(t)))))}renderTimedEvents(e){const t=this.calendarEventController.getCurrentDateEvents(e).filter((e=>!e.isAllDayEvent&&!e.isGroupEvent())),n=this.calendarEventSorter.sortCalendarEventByTime(t),i=this.dayViewTimedEventLayoutGenerator.generate(n);return this.dayViewEventLayoutRenderer.render(i)}}Ye([l()],_e.prototype,"calendarView",void 0),Ye([l()],_e.prototype,"calendarEventController",void 0),Ye([l()],_e.prototype,"dayViewEventLayoutRenderer",void 0);class qe extends Le{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let n=0;return this.cells.forEach(((i,r)=>{const a=i.getEventBySlotIndex(e);t.push(a),a&&(n=r)})),t.slice(0,n+1)}}class Ke extends Fe{constructor(){super(...arguments),this.slots=Ke.defaultSlots}updateSlots(e){const{start:t,end:n}=e;this.slots=this.slots.slice(0,t).concat(Array(n-t+1).fill(e.event),this.slots.slice(n+1))}hasOverlapEvent(e){const{start:t,end:n}=e;let i=!1;for(let e=t;e<n+1;e++)if(this.slots[e]){i=!0;break}return i}}Ke.defaultSlots=Array(7).fill(null);class Xe extends Ne{generate(e){const t=this.collectAllShouldOrderLongEvents(e),n=[this.createNewLayoutCell()];return t.forEach((e=>{this.addCurrentEventToLayout(n,e)})),new qe(n)}createNewLayoutCell(){return new Ke}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,n)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:n,start:n-t[e.eventKey].end!=1?n:t[e.eventKey].start}):{start:n,end:n,event:e}}))}));const n=Object.values(t);return this.sortLongEventViews(n)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:n,endDate:i}=e.event,{startDate:r,endDate:a}=t.event;n.setHours(0,0,0),r.setHours(0,0,0),i.setHours(23,59,59),a.setHours(23,59,59);const o=a.valueOf()-r.valueOf()-(i.valueOf()-n.valueOf());return n.valueOf()!==r.valueOf()?n.valueOf()-r.valueOf():o}))}}var Ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Je extends c{constructor(){super(...arguments),this.longEventLayoutGenerator=new Xe,this.calendarEventSorter=new Ue}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,n){return t.map(((t,i)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,n,i,"month"===this.viewMode?Je.monthViewEventOffsetTop:0)},this.eventItemRenderer.render(t,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,n,i){const r=this.calendarView.weekdays.length,a=t;let o=t+1;const s=n;let l=!0;const c=this.fullDayEventLayout.getEventRowsIndex(e);if(c>=0){const n=this.fullDayEventLayout.eventLayoutCells[c].getEventStartIndex(e),i=this.fullDayEventLayout.eventLayoutCells[c].getEventEndIndex(e);n===t?o=i+1:l=!1}return{position:"absolute",left:100/r*a+"%",top:`${s*Te.backgroundColorModeEventHeight+i}px`,width:100/r*(o-a)+"%",opacity:l?"1":"0"}}}Je.monthViewEventOffsetTop=26,Ge([l()],Je.prototype,"eventItemRenderer",void 0),Ge([l()],Je.prototype,"viewMode",void 0),Ge([l()],Je.prototype,"calendarView",void 0);var Qe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ze extends c{constructor(){super(...arguments),this.updateShowAllFlag=e=>{e.stopPropagation(),this.showAllEventsInDayOrWeekView=!0}}render(t){if(!this.showAllEventsInDayOrWeekView)return e("div",{tabIndex:0,role:"button",class:"more-button",onKeyDown:z(),onClick:this.updateShowAllFlag},`${t} More`)}resetShowAllFlag(){this.showAllEventsInDayOrWeekView=!1}}Qe([l({writable:!0})],Ze.prototype,"showAllEventsInDayOrWeekView",void 0),Qe([d("watchViewModeChange")],Ze.prototype,"resetShowAllFlag",null);var et=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class tt extends c{render(t){const n=t.findIndex((e=>e.isToday()))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!n}},e("div",{class:"time-marker",style:{top:this.getTimeMarkerPosition()},ref:e=>this.timeMarkerRef=e},t.map((t=>e("div",{key:t.date,class:{active:t.isToday()}})))))}updateTimeLine(e){this.scrollToTargetTimeBlock(e),this.syncTimeMarkerPosition(e)}clearTimer(){clearInterval(this.timeMarkerPositionTimer)}updateTimeLineIfComponentAddBack(){this.syncTimeMarkerPosition(this.viewMode)}displayCurrentTimeBlockByDefault(){this.scrollToTargetTimeBlock(this.viewMode)}getTimeMarkerPosition(){const e=new Date;return(60*e.getHours()+e.getMinutes())/1440*100+"%"}syncTimeMarkerPosition(e){clearInterval(this.timeMarkerPositionTimer),"month"!==e&&(this.timeMarkerPositionTimer=setInterval((()=>{this.timeMarkerRef&&(this.timeMarkerRef.style.top=this.getTimeMarkerPosition())}),6e4))}scrollToTargetTimeBlock(e){"month"!==e&&setTimeout((()=>{const e=this.viewRenderer.getCalendarViewElementRef(),t=Math.max(0,this.getViewCenterPosition());e&&t&&e.scrollTo({top:t})}),16)}getViewCenterPosition(){const e=this.viewRenderer.getCalendarViewElementRef();if(e){const t=e.querySelector(".calendar-view-title-container").offsetHeight,n=Math.max(e.offsetHeight-t,0)/2,i=e.scrollHeight,r=16,a=Number(this.getTimeMarkerPosition().replace("%",""))/100*Math.max(i-r-t,0);if(!isNaN(n)&&a&&a>n)return a-n+r}return 0}}et([l()],tt.prototype,"viewMode",void 0),et([l()],tt.prototype,"viewRenderer",void 0),et([d("watchViewModeChange")],tt.prototype,"updateTimeLine",null),et([d("disconnectedCallback")],tt.prototype,"clearTimer",null),et([d("connectedCallback")],tt.prototype,"updateTimeLineIfComponentAddBack",null),et([d("componentDidLoad")],tt.prototype,"displayCurrentTimeBlockByDefault",null);var nt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const it=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaEventClick=r(this,"vegaEventClick",7),this.eventClick=r(this,"eventClick",7),this.vegaDateDblClick=r(this,"vegaDateDblClick",7),this.dateDblClick=r(this,"dateDblClick",7),this.vegaMoreActionClick=r(this,"vegaMoreActionClick",7),this.moreActionClick=r(this,"moreActionClick",7),this.globalSlimmer={},this.translationSlimmer=new $,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new W,this.switchPanelRenderer=new oe,this.viewRenderer=new le,this.monthViewRenderer=new de,this.viewWithTimeRenderer=new ve,this.timeLineRenderer=new pe,this.timeMarkerRenderer=new tt,this.monthEventRenderer=new xe,this.currentPeriodController=new ue,this.calendarViewController=new me,this.dayViewFullDayEventRenderer=new Pe,this.dayViewFullDayEventMoreButtonRenderer=new Ze,this.dayViewTimedEventRenderer=new _e,this.eventItemRenderer=new Te,this.dayViewEventLayoutRenderer=new Be,this.fullDayEventLayoutRenderer=new Je,this.calendarEventController=new Me,this.eventResponsiveController=new Ve,this.changeEventEmitter=j(it,u),this.eventClickEmitter=j(it,b),this.dateDblClickEmitter=j(it,y),this.moreActionClickEmitter=j(it,k),this.changeEventPrevent=new D([u],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=V(it,"timeFormat","watchTimeFormat"),this.showEventColorBarNotifySlimmer=V(it,"showEventColorBar","watchShowEventColorBar"),this.showAllEventsInDayOrWeekView=!1,this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour",this.showEventColorBar=!0,this.showWeekends=!0}watchCurrentPeriodChange(e,t){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}watchShowEventColorBar(e){}watchShowWeekendsChange(){}render(){return s(e(a,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"],showEventColorBar:["watchShowEventColorBar"],showWeekends:["watchShowWeekendsChange"]}}};nt([f()],it.prototype,"globalSlimmer",void 0),nt([v()],it.prototype,"translationSlimmer",void 0),nt([v()],it.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),nt([v()],it.prototype,"renderer",void 0),nt([v()],it.prototype,"switchPanelRenderer",void 0),nt([v()],it.prototype,"viewRenderer",void 0),nt([v()],it.prototype,"monthViewRenderer",void 0),nt([v()],it.prototype,"viewWithTimeRenderer",void 0),nt([v()],it.prototype,"timeLineRenderer",void 0),nt([v()],it.prototype,"timeMarkerRenderer",void 0),nt([v()],it.prototype,"monthEventRenderer",void 0),nt([v()],it.prototype,"currentPeriodController",void 0),nt([v()],it.prototype,"calendarViewController",void 0),nt([v()],it.prototype,"dayViewFullDayEventRenderer",void 0),nt([v()],it.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0),nt([v()],it.prototype,"dayViewTimedEventRenderer",void 0),nt([v()],it.prototype,"eventItemRenderer",void 0),nt([v()],it.prototype,"dayViewEventLayoutRenderer",void 0),nt([v()],it.prototype,"fullDayEventLayoutRenderer",void 0),nt([v()],it.prototype,"calendarEventController",void 0),nt([v()],it.prototype,"eventResponsiveController",void 0),nt([v()],it.prototype,"changeEventEmitter",void 0),nt([v()],it.prototype,"eventClickEmitter",void 0),nt([v()],it.prototype,"dateDblClickEmitter",void 0),nt([v()],it.prototype,"moreActionClickEmitter",void 0),nt([v()],it.prototype,"changeEventPrevent",void 0),nt([v()],it.prototype,"timeFormatNotifySlimmer",void 0),nt([v()],it.prototype,"showEventColorBarNotifySlimmer",void 0),it.style='.border-divider-top{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-left-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-left{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-right{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-bottom-width:0px}.border-divider-bottom{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px}:host{display:flex;flex-direction:column;border-radius:12px;border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));overflow:hidden;width:100%;height:100%;box-sizing:border-box;max-height:1966px}.calendar-switch-panel{padding:24px;border-bottom-width:1px;border-top-width:0px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));flex-shrink:0;width:100%;box-sizing:border-box}.calendar-switch-panel .calendar-date-switch-container{display:flex;gap:8px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-view-switch-container{display:flex;gap:16px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-current-date{padding-left:8px}.calendar-view{width:100%;position:relative;flex-grow:1;overflow-y:auto;overflow-x:hidden;--calendar-weekday-columns:7}.calendar-view.calendar-hide-weekends{--calendar-weekday-columns:5}.calendar-view-month .calendar-view-month-container{width:100%;display:grid;min-height:100%;grid-template-rows:43px repeat(6, minmax(64px, 1fr))}.calendar-view-month .calendar-view-title{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));top:0;left:0;z-index:62}.calendar-view-month .calendar-view-title div{padding-top:12px;padding-bottom:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-month .calendar-view-row{position:relative;display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-month .calendar-view-row.calendar-view-title{position:sticky}.calendar-view-month .calendar-view-row:last-child{border-bottom-width:0px}.calendar-view-month .calendar-view-row .row-cell{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.calendar-view-month .calendar-view-row .row-cell:last-child{border-right-width:0px}.calendar-view-month .calendar-view-row .row-cell .date{padding-top:4px;padding-bottom:4px;padding-right:12px;padding-left:8px}.calendar-view-month .calendar-view-row .row-cell .date>div{display:inline-block;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-month .calendar-view-row .row-cell .date .month-block{margin-right:2px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col{text-align:center;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;cursor:pointer;width:18px;height:18px;line-height:18px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-month .calendar-view-row .row-cell.current-month-day .date>div{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled .date>div{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-top-left-radius:9999px;border-bottom-left-radius:9999px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-container{width:100%}.calendar-view-container .calendar-view-title-container{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:sticky;top:0;left:0;z-index:62}.calendar-view-container .calendar-view-row{box-sizing:border-box;width:100%;display:flex;flex-direction:row}.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{width:72px;text-align:right;padding-right:8px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:0}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-container .calendar-view-title{width:100%}.calendar-view-container .calendar-view-title>div{padding:12px;padding-bottom:8px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center;display:flex;flex-direction:column;gap:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-container .calendar-view-title .week-day{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}.calendar-view-container .calendar-view-title .active div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.calendar-view-container .calendar-view-event-all-container{align-items:center}.calendar-view-container .calendar-view-event-all{display:grid;grid-template-rows:1fr;flex-grow:1;min-height:18px}.calendar-view-container .calendar-view-day-container .time-line{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr))}.calendar-view-container .calendar-view-day-container .time-line .time-text{margin-top:-9px}.calendar-view-container .calendar-view-day-container .calendar-view-content{width:100%}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr));grid-template-columns:minmax(64px, 1fr)}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col>.border-divider-top:first-child{border-top-width:0px}.calendar-view-container .calendar-view-content-container{width:100%;position:relative}.calendar-view-week .calendar-view-container{min-height:100%}.calendar-view-week .calendar-view-container .calendar-view-title{display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-event-all{grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-day-container .calendar-view-content{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .time-marker-container .time-marker{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .day-event-container{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-day .calendar-view-container{min-height:100%}.time-marker-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.time-marker-container.hidden{display:none}.time-marker-container .time-marker{position:absolute;height:2px;display:grid;min-width:100%;left:0;top:0;z-index:61}.time-marker-container .time-marker div{width:100%;height:2px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));opacity:0.3}.time-marker-container .time-marker div.active{opacity:1;position:relative}.time-marker-container .time-marker div.active::before{content:"";display:block;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;position:absolute;width:8px;height:8px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));top:-3px;left:-4px}.day-event-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.day-event-container .day-event-col{height:100%;overflow:hidden}.day-event-container vega-calendar-event{pointer-events:auto;height:100%}.calendar-view-month .month-event-row{position:absolute;width:100%;overflow:hidden;height:calc(100% - 26px);left:0;bottom:0}.calendar-view-month .events-container{width:100%;box-sizing:border-box;overflow:hidden;padding:2px;display:flex;flex-direction:column;gap:2px;justify-content:space-between;flex-grow:1}.calendar-view-month .events-container .event-list{display:flex;flex-direction:column;gap:2px;flex-grow:1}.calendar-view-month .events-container .event-list .month-event-block{box-sizing:border-box;padding-left:2px;padding-right:3px}.calendar-view-month .events-container .month-event-more .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-month .events-container .month-event-more .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all{position:relative}.calendar-view-container .calendar-view-event-all .placeholder-block{padding-top:2px;padding-bottom:2px;box-sizing:content-box}.calendar-view-container .calendar-view-event-all .placeholder-block span{display:none}.calendar-view-container .calendar-view-event-all .day-event-block{padding-top:2px;padding-right:2px;box-sizing:border-box;padding-left:3px}.calendar-view-container .calendar-view-event-all .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px;margin-left:2px;padding:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-container .calendar-view-event-all .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all .event-all-col{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.calendar-view-container .day-event-col{position:relative}.calendar-view-container .day-event-col .time-event-block{box-sizing:border-box;padding-right:8px;padding-bottom:2px;padding-top:3px}.calendar-view-container .day-event-col .time-event-block vega-calendar-event.bg-shadow::part(event-container):not(:focus){outline:2px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}.calendar-view-container .day-event-col .time-event-block:focus-within{z-index:60 !important}.calendar-event-slot-container{display:none}';var rt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class at extends c{getEventTitleContainerRef(){return this.eventTitleContainerRef}getSlotContainerRef(){return this.slotContainerRef}render(){return e(t,null,this.injectBackgroundColorStyle(),this.calendarEventRender())}calendarEventRender(){return this.calendarEvent.isAllDayEvent||this.calendarEvent.isGroupEvent()?this.renderBackgroundModeEvent():this.renderNormalEvent()}renderBackgroundModeEvent(){const t=this.calendarEvent.disabled;return e("div",{role:"button",tabIndex:0,class:{"slot-container":this.slotMode,"background-color-mode":!0,"event-bg-color":!t,"bg-disabled":t},ref:e=>this.slotContainerRef=e},this.slotMode?this.getSlotElement():this.calendarEvent.title)}renderNormalEvent(){const{variant:t,disabled:n}=this.calendarEvent,i=t||"primary",r=!this.host.classList.contains("day-event"),a={"slot-container":this.slotMode,"event-container":!0,disabled:n,[i]:!0};if(r)return e("div",{role:"button",tabIndex:0,class:a,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),this.slotMode?this.getSlotElement():this.defaultNormalMonthEventContentRender());{const t=this.calendarEvent.getEventDuration();return e("div",{part:"event-container",class:Object.assign(Object.assign({},a),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!n,"bg-disabled":n}),role:"button",tabIndex:0,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),e("div",{class:"cover-block"}),this.slotMode?this.getSlotElement():this.defaultNormalTimedEventContentRender(t))}}renderEventStatus(){if(this.showColorBar){const t=this.calendarEvent.disabled;return e("div",{class:{"event-status":!0,"event-bg-color":!t,"bg-disabled":t}},e("span",{class:{stripe:"secondary"===this.calendarEvent.variant}}))}}defaultNormalMonthEventContentRender(){const{startTime:t,title:n}=this.calendarEvent;return e("div",{class:"event-title"},`${this.formatDisplayTime(t)} ${n}`)}defaultNormalTimedEventContentRender(t){const{startTime:n,endTime:i,title:r}=this.calendarEvent;return e("div",{class:"event-content"},e("div",{class:{"event-title":!0,"title-word-wrap":t>30},ref:e=>this.eventTitleContainerRef=e},r),e("div",{class:"event-time"},e("vega-icon",{size:"size-12",icon:C.getIconKey("clock-three")}),e("span",null,`${this.formatDisplayTime(n)} - ${this.formatDisplayTime(i)}`)))}getSlotElement(){if(!this.calendarEvent.isRepeatEvent)return e("slot",null)}injectBackgroundColorStyle(){return e("style",null,this.colorController.getBackgroundColorStyle())}formatDisplayTime(e){const[t,n]=e.split(":");if("24-hour"===this.timeFormat)return`${t.padStart(2,"0")}:${n.padStart(2,"0")}`;{const e=Number(t),i=e>=12?"pm":"am",r=n.padStart(2,"0");return e>12?`${e-12}:${r} pm`:0===e?`12:${r} am`:`${e}:${r} ${i}`}}}C.register({"clock-three":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 13.3 10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>'}}),rt([l()],at.prototype,"host",void 0),rt([l()],at.prototype,"timeFormat",void 0),rt([l()],at.prototype,"calendarEvent",void 0),rt([l()],at.prototype,"slotMode",void 0),rt([l()],at.prototype,"showColorBar",void 0),rt([l()],at.prototype,"colorController",void 0);class ot extends c{getBackgroundColorStyle(){const e=this.calendarEvent.color||"bg-accent6-primary";return B(e)?`.event-bg-color{${N.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],ot.prototype,"calendarEvent",void 0);var st=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class lt extends L{constructor(){super({parent:()=>this.host["data-calendar-ref"],subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"},{subStateName:"showColorBar",parentStateName:"showEventColorBar"}]})}}st([l({writable:!0})],lt.prototype,"timeFormat",void 0),st([l({writable:!0})],lt.prototype,"showColorBar",void 0);class ct extends c{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),n=A(t.height),i=A(t.lineHeight),r=Math.max(Math.floor(n/i),1);e.style.maxHeight=r*i+"px"}}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],ct.prototype,"renderer",void 0);var dt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ht extends c{findTheCalendarEventSlot(){if(this.calendarEvent){const{event:e}=this.calendarEvent,t=this.getParentCalendarElement();if(t){const n=t.querySelector(`vega-calendar-event-slot[event-key='${e.key}']`);n&&(this.slotMode=!0,this.matchSlotElement=n)}}}appendTheRepeatEventSlotToContainer(){const e=this.renderer.getSlotContainerRef();if(this.slotMode&&e&&this.matchSlotElement&&(this.calendarEvent.isRepeatEvent||this.isPopoverContent())){const t=this.matchSlotElement.cloneNode(!0);t.removeAttribute("slot"),e.querySelector("vega-calendar-event-slot")||e.appendChild(t)}}getParentCalendarElement(){return this.host["data-calendar-ref"]}isPopoverContent(){return this.host.classList.contains("calendar-event-in-popover")}}dt([l()],ht.prototype,"host",void 0),dt([l()],ht.prototype,"calendarEvent",void 0),dt([l({writable:!0})],ht.prototype,"slotMode",void 0),dt([l()],ht.prototype,"renderer",void 0),dt([d("componentWillLoad")],ht.prototype,"findTheCalendarEventSlot",null),dt([d("componentDidLoad")],ht.prototype,"appendTheRepeatEventSlotToContainer",null);var vt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const pt=class{constructor(e){i(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new S({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new at,this.colorController=new ot,this.slotController=new ht,this.subStateController=new lt,this.titleMaxHeightController=new ct,this.timeFormat="24-hour",this.slotMode=!1,this.showColorBar=!0}render(){return P(e("slot",null)),s(e(a,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return o(this)}};vt([f()],pt.prototype,"globalSlimmer",void 0),vt([v()],pt.prototype,"pageResizeObserverSlimmer",void 0),vt([v()],pt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),vt([v()],pt.prototype,"renderer",void 0),vt([v()],pt.prototype,"colorController",void 0),vt([v()],pt.prototype,"slotController",void 0),vt([v()],pt.prototype,"subStateController",void 0),vt([v()],pt.prototype,"titleMaxHeightController",void 0),pt.style='.bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host{display:block;box-sizing:border-box;width:100%}:host .background-color-mode{border-radius:2px;color:rgba(var(--v-text-black, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;cursor:pointer;overflow:hidden;white-space:nowrap}@media screen and (min-width: 768px) and (max-width: 1023px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host .background-color-mode:not(.slot-container){padding-left:8px;padding-right:8px}:host .background-color-mode:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host .event-container{display:block;width:100%;border-radius:4px;cursor:pointer;box-sizing:border-box;overflow:hidden}:host .background-color-mode.slot-container{height:16px;line-height:16px}:host ::slotted(vega-calendar-event-slot){position:relative;pointer-events:none}:host(.month-event) .event-container{display:flex;flex-direction:row;gap:4px;align-items:center;min-height:16px}:host(.month-event) .event-container:not(.slot-container){padding-left:2px;padding-right:2px}:host(.month-event) .event-container .event-status{width:8px;height:8px;box-sizing:border-box;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;margin-left:2px;flex-shrink:0}:host(.month-event) .event-container .event-status span{display:none;width:100%;height:100%;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.month-event) .event-container.secondary .event-status span{display:block;background-size:4px 4px;opacity:0.8}:host(.month-event) .event-container.tertiary .event-status{padding:1px}:host(.month-event) .event-container.tertiary .event-status span{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host(.month-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.month-event) .event-container:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}:host(.month-event) .event-container:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host(.month-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .event-container{position:relative}:host(.day-event) .event-container:not(.slot-container){padding-left:8px;padding-right:8px}:host(.day-event) .event-container .event-status{position:absolute;width:4px;height:100%;left:0;top:0;z-index:1}:host(.day-event) .event-container .event-status span{display:none}:host(.day-event) .event-container .cover-block{position:absolute;height:100%;width:100%;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:4px;left:0;top:0;opacity:0.7}:host(.day-event) .event-container .event-content,:host(.day-event) .event-container .event-time{display:flex;flex-direction:row;align-items:center}:host(.day-event) .event-container .event-content{gap:8px;position:relative;height:100%;box-sizing:border-box}:host(.day-event) .event-container .event-time{gap:4px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.day-event) .event-container .event-time vega-icon{flex-shrink:0}:host(.day-event) .event-container .event-time span{white-space:nowrap}:host(.day-event) .event-container .event-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host(.day-event) .event-container .event-title.title-word-wrap{overflow:hidden}:host(.day-event) .event-container .event-title:not(.title-word-wrap){white-space:nowrap}:host(.day-event) .event-container.duration-half-an-hour{padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.vertical{height:100%}:host(.day-event) .event-container.vertical .event-content{flex-direction:column;align-items:flex-start;gap:4px;padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.secondary .event-status span,:host(.day-event) .event-container.tertiary .event-status span{display:block;position:absolute;border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.day-event) .event-container.secondary .cover-block,:host(.day-event) .event-container.tertiary .cover-block{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.secondary .event-status span{width:100%;height:100%;top:0px;left:0px;background-size:4px 4px;opacity:0.8}:host(.day-event) .event-container.secondary .cover-block{opacity:0.9}:host(.day-event) .event-container.tertiary .event-status span{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));width:2px;height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.tertiary .cover-block{opacity:1}:host(.day-event) .event-container.disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .slot-container{min-height:16px}:host(.month-event.calendar-event-large-size) .background-color-mode{border-radius:4px}:host(.month-event.calendar-event-large-size) .background-color-mode:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .event-container:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .slot-container{height:24px;display:flex;align-items:center;line-height:24px}.stripe{background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}';var ft=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const mt=class{constructor(e){i(this,e),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(a,{slot:ie(this.eventKey)},e("slot",null)),this.host)}get host(){return o(this)}};ft([f()],mt.prototype,"globalSlimmer",void 0),ft([v()],mt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),mt.style=":host{width:100%;height:100%;position:relative}";export{it as vega_calendar,pt as vega_calendar_event,mt as vega_calendar_event_slot}
@@ -1 +1 @@
1
- import{h as t}from"./p-1c298d5a.js";import{c as e,V as o}from"./p-6e1ab235.js";import{D as s}from"./p-6e898779.js";import{a as r,M as i,N as n,f as c}from"./p-6f81fe1e.js";import{V as l}from"./p-c9b9322b.js";import{T as h,j as a,k as u,f as p,h as d,A as f,i as v}from"./p-06d7990e.js";import{a as m}from"./p-c17b7a1f.js";var b=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class w extends o{constructor({icon:e,tooltip:o}){super(),this.renderBtn=({showArrowIcon:e,iconColor:o}={})=>{var i;return t("vega-tooltip",{text:this.translationSlimmer.t(this.tooltip.text),placement:["bottom","top"]},t("vega-rich-text-editor-toolbar-button",Object.assign({showArrowIcon:e,icon:this.icon,iconColor:o,ref:t=>{s.addUniqueObserverToNode(t,r,(()=>{this.handleClick()}))},selected:this.isSelected(),disabled:this.isDisabled()},this.preventLostFocus()),null===(i=this.renderSlotContent)||void 0===i?void 0:i.call(this)))},this.handleClick=()=>{"function"==typeof this.onClick&&(this.selectionController.getSelectedNodes().length?this.onClick():this.focusController.focusOnLastTextNode().then((()=>{this.onClick()})))},this.icon=e,this.tooltip=o}setIcon(t){this.icon=t}render(){return"function"==typeof this.renderBtnWrapper?this.renderBtnWrapper(this.renderBtn):this.renderBtn()}isDisabled(){return this.disabled}preventLostFocus(){return{onMouseDown:t=>t.preventDefault()}}}b([e()],w.prototype,"translationSlimmer",void 0),b([e()],w.prototype,"selectionController",void 0),b([e()],w.prototype,"focusController",void 0),b([e()],w.prototype,"disabled",void 0);class C extends h{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new a(this.textColor)}}var x=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class g extends w{constructor(){super({icon:"text",tooltip:{text:"Text Color"}}),this.popoverShow=!1,m.registerCustomDarkModeColor(g.formatDarkModeColor())}static formatDarkModeColor(){return u.reduce(((t,e)=>(e.dark&&(t[`rich-text-editor-${e.key}`]=e.dark),t)),{})}renderSlotContent(){return t("div",{class:{"toolbar-btn-color-preview-box":!0,disabled:this.isDisabled()},style:{backgroundColor:this.getCurrentColor()}})}handlePopoverShowChange(){this.popoverShow=!0}handlePopoverHideChange(){this.popoverShow=!1}renderBtnWrapper(e){return t("vega-popover",{placement:"bottom",alignment:"center",ref:t=>{this.popoverRef=t,s.addUniqueObserverToNode(t,i,this.handlePopoverShowChange.bind(this)),s.addUniqueObserverToNode(t,n,this.handlePopoverHideChange.bind(this))}},t("div",{slot:"popover-content"},e({showArrowIcon:!1})),t("div",Object.assign({slot:"popover",style:{userSelect:"none"}},super.preventLostFocus()),this.renderPopoverContent()))}renderPopoverContent(){return t("vega-color-picker",{isInline:!0,colors:u.map((t=>t[this.isInDarkMode?"dark":"light"])),ref:t=>{s.addUniqueObserverToNode(t,c,this.handleChange.bind(this))},value:this.getCurrentColor()})}async handleChange(t){this.popoverShow&&(this.selectionController.getSelectedNodes().length||await this.focusController.focusOnLastTextNode(),this.selectionController.getSelectedNodes().filter((t=>t instanceof p)).forEach((e=>e.apply(new C(this.matchColor(t.detail).key))))),this.popoverRef.hide()}matchColor(t){return u.find((e=>e[this.isInDarkMode?"dark":"light"]===t))}getCurrentColor(){let t=u[0];const e=this.selectionController.getSelectedNodes();return e.length>1&&(t=this.isSelectedSameColor(e)?this.getTextColor(e[0]):null),1===e.length&&(t=this.getTextColor(e[0])),t?t[this.isInDarkMode?"dark":"light"]:null}isSelected(){return!1}isSelectedSameColor(t){return t.every((e=>this.getTextColor(e).key===this.getTextColor(t[0]).key))}getTextColor(t){var e;return(null===(e=t.getAnnotationByType("TEXT_COLOR"))||void 0===e?void 0:e.textColor)||u[0]}isDisabled(){const t=this.selectionController.getSelectedNodes();return super.isDisabled()||t.some((t=>{var e;return(null===(e=t.getAnnotationByType(d.CODE))||void 0===e?void 0:e.code)||t.getAnnotationByType(d.LINK)||t.getAnnotationByType(d.IMAGE)}))}}l.register({text:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M64 96v32c0 17.7-14.3 32-32 32s-32-14.3-32-32V80C0 53.5 21.5 32 48 32H224 400c26.5 0 48 21.5 48 48v48c0 17.7-14.3 32-32 32s-32-14.3-32-32V96H256l0 320h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H144c-17.7 0-32-14.3-32-32s14.3-32 32-32h48l0-320H64z"/></svg>'}}),x([e()],g.prototype,"host",void 0),x([e()],g.prototype,"isInDarkMode",void 0),x([e()],g.prototype,"selectionController",void 0),x([e()],g.prototype,"focusController",void 0);const j=new class{constructor(){this.textNodeElements=new Map}register(t,e){this.textNodeElements.set(t,e)}getTextNodeElements(){return this.textNodeElements}};class y extends f{constructor(t,e){super(),this.isFlushable=!0,this.size=t,this.alt=e}toAnnotation(){return new v(this.size,this.alt)}}export{y as I,j as T,g as a,w as b}
1
+ import{h as t}from"./p-1c298d5a.js";import{c as e,V as o}from"./p-6e1ab235.js";import{D as s}from"./p-6e898779.js";import{a as r,M as i,N as n,f as c}from"./p-6f81fe1e.js";import{V as l}from"./p-c9b9322b.js";import{T as h,j as a,k as u,f as p,h as d,A as v,i as f}from"./p-5c1eedc5.js";import{a as m}from"./p-50677c8e.js";var b=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class w extends o{constructor({icon:e,tooltip:o}){super(),this.renderBtn=({showArrowIcon:e,iconColor:o}={})=>{var i;return t("vega-tooltip",{text:this.translationSlimmer.t(this.tooltip.text),placement:["bottom","top"]},t("vega-rich-text-editor-toolbar-button",Object.assign({showArrowIcon:e,icon:this.icon,iconColor:o,ref:t=>{s.addUniqueObserverToNode(t,r,(()=>{this.handleClick()}))},selected:this.isSelected(),disabled:this.isDisabled()},this.preventLostFocus()),null===(i=this.renderSlotContent)||void 0===i?void 0:i.call(this)))},this.handleClick=()=>{"function"==typeof this.onClick&&(this.selectionController.getSelectedNodes().length?this.onClick():this.focusController.focusOnLastTextNode().then((()=>{this.onClick()})))},this.icon=e,this.tooltip=o}setIcon(t){this.icon=t}render(){return"function"==typeof this.renderBtnWrapper?this.renderBtnWrapper(this.renderBtn):this.renderBtn()}isDisabled(){return this.disabled}preventLostFocus(){return{onMouseDown:t=>t.preventDefault()}}}b([e()],w.prototype,"translationSlimmer",void 0),b([e()],w.prototype,"selectionController",void 0),b([e()],w.prototype,"focusController",void 0),b([e()],w.prototype,"disabled",void 0);class C extends h{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new a(this.textColor)}}var x=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class g extends w{constructor(){super({icon:"text",tooltip:{text:"Text Color"}}),this.popoverShow=!1,m.registerCustomDarkModeColor(g.formatDarkModeColor())}static formatDarkModeColor(){return u.reduce(((t,e)=>(e.dark&&(t[`rich-text-editor-${e.key}`]=e.dark),t)),{})}renderSlotContent(){return t("div",{class:{"toolbar-btn-color-preview-box":!0,disabled:this.isDisabled()},style:{backgroundColor:this.getCurrentColor()}})}handlePopoverShowChange(){this.popoverShow=!0}handlePopoverHideChange(){this.popoverShow=!1}renderBtnWrapper(e){return t("vega-popover",{placement:"bottom",alignment:"center",ref:t=>{this.popoverRef=t,s.addUniqueObserverToNode(t,i,this.handlePopoverShowChange.bind(this)),s.addUniqueObserverToNode(t,n,this.handlePopoverHideChange.bind(this))}},t("div",{slot:"popover-content"},e({showArrowIcon:!1})),t("div",Object.assign({slot:"popover",style:{userSelect:"none"}},super.preventLostFocus()),this.renderPopoverContent()))}renderPopoverContent(){return t("vega-color-picker",{isInline:!0,colors:u.map((t=>t[this.isInDarkMode?"dark":"light"])),ref:t=>{s.addUniqueObserverToNode(t,c,this.handleChange.bind(this))},value:this.getCurrentColor()})}async handleChange(t){this.popoverShow&&(this.selectionController.getSelectedNodes().length||await this.focusController.focusOnLastTextNode(),this.selectionController.getSelectedNodes().filter((t=>t instanceof p)).forEach((e=>e.apply(new C(this.matchColor(t.detail).key))))),this.popoverRef.hide()}matchColor(t){return u.find((e=>e[this.isInDarkMode?"dark":"light"]===t))}getCurrentColor(){let t=u[0];const e=this.selectionController.getSelectedNodes();return e.length>1&&(t=this.isSelectedSameColor(e)?this.getTextColor(e[0]):null),1===e.length&&(t=this.getTextColor(e[0])),t?t[this.isInDarkMode?"dark":"light"]:null}isSelected(){return!1}isSelectedSameColor(t){return t.every((e=>this.getTextColor(e).key===this.getTextColor(t[0]).key))}getTextColor(t){var e;return(null===(e=t.getAnnotationByType("TEXT_COLOR"))||void 0===e?void 0:e.textColor)||u[0]}isDisabled(){const t=this.selectionController.getSelectedNodes();return super.isDisabled()||t.some((t=>{var e;return(null===(e=t.getAnnotationByType(d.CODE))||void 0===e?void 0:e.code)||t.getAnnotationByType(d.LINK)||t.getAnnotationByType(d.IMAGE)}))}}l.register({text:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M64 96v32c0 17.7-14.3 32-32 32s-32-14.3-32-32V80C0 53.5 21.5 32 48 32H224 400c26.5 0 48 21.5 48 48v48c0 17.7-14.3 32-32 32s-32-14.3-32-32V96H256l0 320h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H144c-17.7 0-32-14.3-32-32s14.3-32 32-32h48l0-320H64z"/></svg>'}}),x([e()],g.prototype,"host",void 0),x([e()],g.prototype,"isInDarkMode",void 0),x([e()],g.prototype,"selectionController",void 0),x([e()],g.prototype,"focusController",void 0);const j=new class{constructor(){this.textNodeElements=new Map}register(t,e){this.textNodeElements.set(t,e)}getTextNodeElements(){return this.textNodeElements}};class y extends v{constructor(t,e){super(),this.isFlushable=!0,this.size=t,this.alt=e}toAnnotation(){return new f(this.size,this.alt)}}export{y as I,j as T,g as a,w as b}
@@ -0,0 +1 @@
1
+ import{c as e}from"./p-262ec334.js";import{I as t}from"./p-abd7aeaa.js";class s extends t{constructor(e){super(),this.config=e}evaluate(t){var s;if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const r=isNaN(null===(s=this.config)||void 0===s?void 0:s.maxValue)?Number.MAX_VALUE:this.config.maxValue;return{isValid:e(t)<=r,message:e(t)<=r?"":{key:"The maximum input value is {0}",args:[r]}}}canEvaluate(e,t){return t?this.isAcceptedInputType(e)&&!t.disabled&&t.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(t){return!isNaN(e(t))}}class r extends t{constructor(e){super(),this.config=e}evaluate(t){var s;if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const r=isNaN(null===(s=this.config)||void 0===s?void 0:s.minValue)?0:this.config.minValue;return{isValid:e(t)>=r,message:e(t)>=r?"":{key:"The minimum input value is {0}",args:[r]}}}canEvaluate(e,t){return t?this.isAcceptedInputType(e)&&!t.disabled&&t.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(t){return!isNaN(e(t))}}export{r as M,s as a}
@@ -1 +1 @@
1
- import{r as e,c as i,h as t,H as a,g as r}from"./p-1c298d5a.js";import{c as n}from"./p-86194314.js";import{s as o}from"./p-9b797118.js";import{C as s}from"./p-590fd123.js";import{C as c}from"./p-2d0d575f.js";import{C as h,b as l,i as p}from"./p-23a26150.js";import{O as d}from"./p-331a62d5.js";import{f as g,a as x}from"./p-bf953152.js";import{c as b,M as v,V as f,I as m}from"./p-6e1ab235.js";import{V as u,I as k}from"./p-4387d550.js";import{F as w}from"./p-f0c85061.js";import{c as y}from"./p-a821bcf3.js";import{d as j,f as z}from"./p-6f81fe1e.js";import{c as C}from"./p-12d60f5f.js";import{C as I}from"./p-431ab4dd.js";import{R}from"./p-280cbcdb.js";import{C as D}from"./p-75b58efe.js";import{C as O}from"./p-5064a804.js";import"./p-abd7aeaa.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-e66515c7.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-6e898779.js";import"./p-987fbbd0.js";import"./p-b5f5a5e0.js";import"./p-3647d61d.js";import"./p-262ec334.js";import"./p-d7642125.js";import"./p-804f71b3.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";var V=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};class E extends f{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new d(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),c.register(j.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}disconnectedCallback(){c.unregister(j.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}V([b({writable:!0})],E.prototype,"showError",void 0),V([b()],E.prototype,"host",void 0),V([v("connectedCallback")],E.prototype,"connectedCallback",null),V([v("disconnectedCallback")],E.prototype,"disconnectedCallback",null);var G=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const F=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.vegaCheckboxShowErrorController=new E,this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new s:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=y(F,z),this.dropdownEventPrevent=new I([z],(()=>this.host),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.disabled=!1,this.size="default",this.required=!1,this.isValid=null,this.onCheckBoxChange=e=>{this.checked=e.currentTarget.checked},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchCheckedChange(){this.initValue(),this.changeEventEmitter.emit(this.value),c.notify(h,{host:this.host,detail:this.value}),c.notify(l,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden")}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){return o(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":"VEGA-CHECKBOX-GROUP"==this.host.parentElement.nodeName,checked:this.checked,disabled:this.isDisabled()}},t("label",{class:x(["vega-checkbox-container",this.showError&&"error",this.size&&`size-${this.size}`]),ref:e=>this.inputContainerRef=e},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined",disabled:this.isDisabled(),role:"button",tabIndex:0,onKeyDown:n()}),t("span",{class:"vega-checkbox-icon",onClick:this.onSelectedIconClick,tabIndex:-1},this.renderIconDom()),t("div",{class:"vega-checkbox-label-container",ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new d(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),c.register(p,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&c.unregister(p,this.groupDisabledObserver)}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};G([k()],F.prototype,"globalSlimmers",void 0),G([m()],F.prototype,"vegaCheckboxShowErrorController",void 0),G([m()],F.prototype,"formFieldController",void 0),G([m()],F.prototype,"changeEventEmitter",void 0),G([m()],F.prototype,"dropdownEventPrevent",void 0),G([m()],F.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),F.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{display:inline-flex;align-items:center;justify-content:center}:host(.disabled) .vega-checkbox-container{cursor:not-allowed}:host(:not(.disabled)) .vega-checkbox-container{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}.size-default input[type=checkbox]{width:24px;height:24px}.size-default .vega-checkbox-icon{width:24px;height:24px;min-width:24px;border-radius:4px}.size-default .vega-checkbox-label-container{margin-left:12px;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.size-small input[type=checkbox]{width:16px;height:16px}.size-small .vega-checkbox-icon{width:16px;height:16px;min-width:16px;border-radius:2px}.size-small .vega-checkbox-label-container{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}';var P=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const q=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new R:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new O(h,(e=>this.childCheckboxValueChange(e))),this.checkboxEventPrevent=new I([z],(()=>this.vegaFlexElement)),this.changeEventEmitter=y(q,z),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(){this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),c.notify(l,{host:this.host,detail:this.value})}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}render(){return o(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("div",{class:"vega-label"},t("label",{"aria-label":this.label},this.label,this.renderRequireDom()))}renderRequireDom(){return this.required?t("span",{class:"vega-require"},"*"):null}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){c.notify(p,{host:this.host})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};P([k()],q.prototype,"globalSlimmers",void 0),P([m()],q.prototype,"formFieldController",void 0),P([m()],q.prototype,"checkboxValueChangeObserver",void 0),P([m()],q.prototype,"checkboxEventPrevent",void 0),P([m()],q.prototype,"changeEventEmitter",void 0),P([m()],q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),P([D()],q.prototype,"watchVegaFlexProp",null),q.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-label{margin-bottom:16px}.vega-label label{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}.vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{F as vega_checkbox,q as vega_checkbox_group}
1
+ import{r as e,c as i,h as t,H as a,g as r}from"./p-1c298d5a.js";import{c as n}from"./p-86194314.js";import{s as o}from"./p-9b797118.js";import{C as s}from"./p-590fd123.js";import{C as c}from"./p-2d0d575f.js";import{C as h,b as l,i as p}from"./p-5773a9a3.js";import{O as d}from"./p-331a62d5.js";import{f as g,a as x}from"./p-bf953152.js";import{c as b,M as v,V as f,I as m}from"./p-6e1ab235.js";import{V as u,I as k}from"./p-4387d550.js";import{F as w}from"./p-7f6702f7.js";import{c as y}from"./p-a821bcf3.js";import{d as j,f as z}from"./p-6f81fe1e.js";import{c as C}from"./p-c754b32c.js";import{C as I}from"./p-431ab4dd.js";import{R}from"./p-280cbcdb.js";import{C as D}from"./p-75b58efe.js";import{C as O}from"./p-5064a804.js";import"./p-abd7aeaa.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-8d283666.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-6e898779.js";import"./p-987fbbd0.js";import"./p-b5f5a5e0.js";import"./p-3647d61d.js";import"./p-262ec334.js";import"./p-72ecfd40.js";import"./p-804f71b3.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";var V=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};class E extends f{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new d(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),c.register(j.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}disconnectedCallback(){c.unregister(j.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}V([b({writable:!0})],E.prototype,"showError",void 0),V([b()],E.prototype,"host",void 0),V([v("connectedCallback")],E.prototype,"connectedCallback",null),V([v("disconnectedCallback")],E.prototype,"disconnectedCallback",null);var G=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const F=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.vegaCheckboxShowErrorController=new E,this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new s:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=y(F,z),this.dropdownEventPrevent=new I([z],(()=>this.host),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.disabled=!1,this.size="default",this.required=!1,this.isValid=null,this.onCheckBoxChange=e=>{this.checked=e.currentTarget.checked},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchCheckedChange(){this.initValue(),this.changeEventEmitter.emit(this.value),c.notify(h,{host:this.host,detail:this.value}),c.notify(l,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden")}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){return o(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":"VEGA-CHECKBOX-GROUP"==this.host.parentElement.nodeName,checked:this.checked,disabled:this.isDisabled()}},t("label",{class:x(["vega-checkbox-container",this.showError&&"error",this.size&&`size-${this.size}`]),ref:e=>this.inputContainerRef=e},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined",disabled:this.isDisabled(),role:"button",tabIndex:0,onKeyDown:n()}),t("span",{class:"vega-checkbox-icon",onClick:this.onSelectedIconClick,tabIndex:-1},this.renderIconDom()),t("div",{class:"vega-checkbox-label-container",ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new d(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),c.register(p,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&c.unregister(p,this.groupDisabledObserver)}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};G([k()],F.prototype,"globalSlimmers",void 0),G([m()],F.prototype,"vegaCheckboxShowErrorController",void 0),G([m()],F.prototype,"formFieldController",void 0),G([m()],F.prototype,"changeEventEmitter",void 0),G([m()],F.prototype,"dropdownEventPrevent",void 0),G([m()],F.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),F.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{display:inline-flex;align-items:center;justify-content:center}:host(.disabled) .vega-checkbox-container{cursor:not-allowed}:host(:not(.disabled)) .vega-checkbox-container{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}.size-default input[type=checkbox]{width:24px;height:24px}.size-default .vega-checkbox-icon{width:24px;height:24px;min-width:24px;border-radius:4px}.size-default .vega-checkbox-label-container{margin-left:12px;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.size-small input[type=checkbox]{width:16px;height:16px}.size-small .vega-checkbox-icon{width:16px;height:16px;min-width:16px;border-radius:2px}.size-small .vega-checkbox-label-container{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}';var P=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const q=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new R:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new O(h,(e=>this.childCheckboxValueChange(e))),this.checkboxEventPrevent=new I([z],(()=>this.vegaFlexElement)),this.changeEventEmitter=y(q,z),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(){this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),c.notify(l,{host:this.host,detail:this.value})}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}render(){return o(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("div",{class:"vega-label"},t("label",{"aria-label":this.label},this.label,this.renderRequireDom()))}renderRequireDom(){return this.required?t("span",{class:"vega-require"},"*"):null}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){c.notify(p,{host:this.host})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};P([k()],q.prototype,"globalSlimmers",void 0),P([m()],q.prototype,"formFieldController",void 0),P([m()],q.prototype,"checkboxValueChangeObserver",void 0),P([m()],q.prototype,"checkboxEventPrevent",void 0),P([m()],q.prototype,"changeEventEmitter",void 0),P([m()],q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),P([D()],q.prototype,"watchVegaFlexProp",null),q.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-label{margin-bottom:16px}.vega-label label{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}.vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{F as vega_checkbox,q as vega_checkbox_group}