@heartlandone/vega 2.67.0 → 2.68.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 (424) hide show
  1. package/dist/cjs/{app-globals-ab28f910.js → app-globals-f7106a22.js} +15 -14
  2. package/dist/cjs/{child-nodes-event-prevent-slimmer-eb803b14.js → child-nodes-event-prevent-slimmer-f8840f1b.js} +1 -1
  3. package/dist/cjs/{code-block-ab97a0a0.js → code-block-39074880.js} +514 -319
  4. package/dist/cjs/{component-value-history-controller-slimmer.abstract-5630341e.js → component-value-history-controller-slimmer.abstract-ddedf543.js} +2 -2
  5. package/dist/cjs/{design-token-847739f1.js → design-token-e14a4e66.js} +1 -1
  6. package/dist/cjs/{dto-renderer-manager-d0f0f2c0.js → dto-renderer-manager-b7969d6c.js} +1587 -1563
  7. package/dist/cjs/{element-appender-slimmer-aead9bbb.js → element-appender-slimmer-7ee27ab3.js} +5 -5
  8. package/dist/cjs/{event-emit-slimmer-d21a0935.js → event-emit-slimmer-7afe8d78.js} +1 -1
  9. package/dist/cjs/{token-extension-aa8d5cce.js → function-extension-f0e845f2.js} +1019 -96
  10. package/dist/cjs/{image-annotation-action-d84de785.js → image-annotation-action-7f0626c8.js} +15 -25
  11. package/dist/cjs/index.cjs.js +36 -24
  12. package/dist/cjs/{internal-vega-event-manager-4d1ce667.js → internal-vega-event-manager-45d451de.js} +5 -2
  13. package/dist/cjs/{language-extension-d257e65d.js → language-extension-d0103d1a.js} +5 -5
  14. package/dist/cjs/loader.cjs.js +8 -8
  15. package/dist/cjs/{public-rules-d2b9b8f0.js → public-rules-8b67eaba.js} +3 -3
  16. package/dist/cjs/{range-d610028e.js → range-002671b6.js} +1 -1
  17. package/dist/cjs/{responsive-format-facade-71e7b74c.js → responsive-format-facade-347db035.js} +3 -3
  18. package/dist/cjs/{rich-text-editor-required-rule-a8fe5f50.js → rich-text-editor-required-rule-5392bd8a.js} +1 -1
  19. package/dist/cjs/{style-formatter-6facb42b.js → style-formatter-0a09f0dd.js} +1 -1
  20. package/dist/cjs/vega-accordion.cjs.entry.js +7 -7
  21. package/dist/cjs/vega-app-header-button.cjs.entry.js +8 -8
  22. package/dist/cjs/vega-banner.cjs.entry.js +2 -2
  23. package/dist/cjs/vega-box.cjs.entry.js +8 -8
  24. package/dist/cjs/vega-breadcrumb.cjs.entry.js +3 -3
  25. package/dist/cjs/vega-button-circle.cjs.entry.js +9 -9
  26. package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
  27. package/dist/cjs/vega-button-link.cjs.entry.js +3 -3
  28. package/dist/cjs/vega-button.cjs.entry.js +8 -8
  29. package/dist/cjs/vega-calendar_4.cjs.entry.js +307 -269
  30. package/dist/cjs/vega-card.cjs.entry.js +7 -7
  31. package/dist/cjs/vega-carousel.cjs.entry.js +7 -7
  32. package/dist/cjs/vega-checkbox_2.cjs.entry.js +3 -3
  33. package/dist/cjs/vega-chip.cjs.entry.js +9 -9
  34. package/dist/cjs/vega-code-block.cjs.entry.js +6 -6
  35. package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
  36. package/dist/cjs/vega-combo-box.cjs.entry.js +3 -3
  37. package/dist/cjs/vega-date-picker_2.cjs.entry.js +12 -12
  38. package/dist/cjs/vega-dialog_2.cjs.entry.js +15 -15
  39. package/dist/cjs/vega-divider.cjs.entry.js +7 -7
  40. package/dist/cjs/vega-dropdown_5.cjs.entry.js +9 -9
  41. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  42. package/dist/cjs/vega-field-label.cjs.entry.js +24 -5
  43. package/dist/cjs/vega-file-uploader.cjs.entry.js +2 -2
  44. package/dist/cjs/vega-flag-icon.cjs.entry.js +6 -6
  45. package/dist/cjs/vega-flex.cjs.entry.js +8 -8
  46. package/dist/cjs/vega-font.cjs.entry.js +7 -7
  47. package/dist/cjs/vega-form.cjs.entry.js +3 -3
  48. package/dist/cjs/vega-grid.cjs.entry.js +7 -7
  49. package/dist/cjs/vega-icon.cjs.entry.js +6 -6
  50. package/dist/cjs/vega-image-uploader.cjs.entry.js +8 -8
  51. package/dist/cjs/vega-input-credit-card.cjs.entry.js +3 -3
  52. package/dist/cjs/vega-input-numeric.cjs.entry.js +3 -3
  53. package/dist/cjs/vega-input-passcode.cjs.entry.js +3 -3
  54. package/dist/cjs/vega-input-phone-number.cjs.entry.js +6 -6
  55. package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
  56. package/dist/cjs/vega-input-select.cjs.entry.js +38 -14
  57. package/dist/cjs/vega-input.cjs.entry.js +14 -3
  58. package/dist/cjs/vega-item-toggle.cjs.entry.js +2 -2
  59. package/dist/cjs/vega-left-nav_5.cjs.entry.js +11 -11
  60. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +8 -8
  61. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +2 -2
  62. package/dist/cjs/vega-pagination.cjs.entry.js +7 -7
  63. package/dist/cjs/vega-popover_2.cjs.entry.js +9 -9
  64. package/dist/cjs/vega-progress-tracker.cjs.entry.js +2 -2
  65. package/dist/cjs/vega-radio_2.cjs.entry.js +3 -3
  66. package/dist/cjs/vega-rich-text-content.cjs.entry.js +93 -16
  67. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +107 -54
  68. package/dist/cjs/vega-segment-control.cjs.entry.js +2 -2
  69. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +8 -8
  70. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +3 -3
  71. package/dist/cjs/vega-sidenav_3.cjs.entry.js +10 -10
  72. package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
  73. package/dist/cjs/vega-stepper.cjs.entry.js +3 -3
  74. package/dist/cjs/vega-tab-group_2.cjs.entry.js +3 -3
  75. package/dist/cjs/vega-table_8.cjs.entry.js +11 -11
  76. package/dist/cjs/vega-textarea.cjs.entry.js +24 -4
  77. package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
  78. package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
  79. package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -7
  80. package/dist/cjs/vega.cjs.js +8 -8
  81. package/dist/collection/components/vega-calendar/slimmers/common/helpers/calendar-event-sorter.js +3 -3
  82. package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-event-item-renderer.js +1 -1
  83. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/timed-event/layout/day-view-timed-event-layout-column.js +1 -1
  84. package/dist/collection/components/vega-calendar/vega-calendar-event/slimmers/renderers/vega-calendar-event-renderer.js +3 -4
  85. package/dist/collection/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.js +11 -3
  86. package/dist/collection/components/vega-field-label/vega-field-label.js +42 -0
  87. package/dist/collection/components/vega-input/vega-input.js +48 -2
  88. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-renderer.js +16 -5
  89. package/dist/collection/components/vega-input-select/vega-input-select.css +2 -44
  90. package/dist/collection/components/vega-input-select/vega-input-select.js +81 -1
  91. package/dist/collection/components/vega-rich-text-content/slimmers/controllers/vega-rich-text-content-extensions-styles-controller.js +60 -0
  92. package/dist/collection/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.js +7 -1
  93. package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.js +17 -1
  94. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-interceptor-registry.js +61 -0
  95. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-interceptor.abstract.js +5 -0
  96. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.js +30 -6
  97. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +10 -3
  98. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-or-decorator-node-strategy.js +2 -1
  99. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/paste-content-strategy.js +28 -0
  100. package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -0
  101. package/dist/collection/components/vega-rich-text-editor/dto/actions/paste-content-action.js +17 -0
  102. package/dist/collection/components/vega-rich-text-editor/dto/actions/update-cursor-position-action.js +5 -0
  103. package/dist/collection/components/vega-rich-text-editor/dto/annotations/annotation-style.js +87 -0
  104. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +27 -9
  105. package/dist/collection/components/vega-rich-text-editor/dto/blocks/html-block.js +1 -12
  106. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +6 -0
  107. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +14 -5
  108. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +11 -0
  109. package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +7 -37
  110. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +14 -3
  111. package/dist/collection/components/vega-rich-text-editor/extensions/base-extension-renderer.js +19 -1
  112. package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +44 -3
  113. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +51 -1
  114. package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-interceptor/prevent-new-paragraph-interceptor.js +30 -0
  115. package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-interceptor/prevent-paste-content-interceptor.js +25 -0
  116. package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/function-block-insert-paragraph-strategy.js +30 -0
  117. package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/insert-function-block-strategy.js +99 -0
  118. package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/paste-plain-text-strategy.js +68 -0
  119. package/dist/collection/components/vega-rich-text-editor/extensions/functions/actions/insert-function-block-action.js +15 -0
  120. package/dist/collection/components/vega-rich-text-editor/extensions/functions/actions/paste-plain-text-action.js +17 -0
  121. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +97 -0
  122. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.js +73 -0
  123. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.js +69 -0
  124. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.js +49 -0
  125. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-content-strategy.js +27 -0
  126. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-logic-control-block-strategy.js +55 -0
  127. package/dist/collection/components/vega-rich-text-editor/extensions/functions/function-extension.js +75 -0
  128. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-block-renderer.js +38 -0
  129. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.js +71 -0
  130. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/logic-control-block-renderer.js +20 -0
  131. package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.js +1 -1
  132. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/span-to-token-node-strategy.js +3 -1
  133. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-node-renderer.js +5 -6
  134. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-toolbar-button-renderer.js +1 -1
  135. package/dist/collection/components/vega-rich-text-editor/public-api.js +8 -1
  136. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/delete-selected-nodes-controller.js +9 -1
  137. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy.abstract.js +0 -12
  138. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +3 -1
  139. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +12 -10
  140. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bold-toolbar-button-slimmer.js +2 -4
  141. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.js +30 -5
  142. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/clear-style-toolbar-button-slimmer.js +1 -4
  143. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/code-block-toolbar-button-slimmer.js +10 -1
  144. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/code-toolbar-button-slimmer.js +2 -4
  145. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/horizontal-alignment-toolbar-button-slimmer.js +2 -1
  146. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +4 -1
  147. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/italic-toolbar-button-slimmer.js +2 -4
  148. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/less-indent-toolbar-button-slimmer.js +1 -4
  149. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/link-toolbar-button-slimmer.js +1 -4
  150. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/more-indent-toolbar-button-slimmer.js +1 -4
  151. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/strikethrough-toolbar-button-slimmer.js +2 -4
  152. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-color-toolbar-button-slimmer.js +2 -4
  153. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.js +2 -5
  154. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/underline-toolbar-button-slimmer.js +2 -4
  155. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/visual-mode-toolbar-button-slimmer.abstract.js +11 -0
  156. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +4 -1
  157. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.js +32 -2
  158. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-delete-node-content-strategy.test.js +69 -0
  159. package/dist/collection/components/vega-rich-text-editor/test/dto/annotation-style.test.js +70 -0
  160. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/vega-rich-text-editor-toolbar-button.css +3 -0
  161. package/dist/collection/components/vega-selection-chip/vega-selection-chip.js +1 -1
  162. package/dist/collection/components/vega-table/vega-table.css +2 -1
  163. package/dist/collection/components/vega-textarea/vega-textarea.js +88 -2
  164. package/dist/collection/global/scripts/before-vega-load.js +2 -0
  165. package/dist/collection/helpers/calendar/calendar-date-time.js +136 -0
  166. package/dist/collection/helpers/calendar/calendar-date.js +10 -4
  167. package/dist/collection/helpers/calendar/calendar-event.js +38 -193
  168. package/dist/collection/helpers/calendar/calendar-time.js +120 -0
  169. package/dist/collection/helpers/calendar/index.js +2 -0
  170. package/dist/collection/helpers/calendar/test/calendar-date-time.test.js +27 -0
  171. package/dist/collection/helpers/calendar/test/calendar-event.test.js +24 -22
  172. package/dist/collection/helpers/calendar/test/calendar-period/day-period.test.js +2 -2
  173. package/dist/collection/helpers/calendar/test/calendar-period/month-period.test.js +2 -2
  174. package/dist/collection/helpers/calendar/test/calendar-period/week-period.test.js +6 -6
  175. package/dist/collection/helpers/calendar/test/calendar-time.test.js +45 -0
  176. package/dist/collection/helpers/calendar/test/utils.test.js +1 -29
  177. package/dist/collection/helpers/calendar/utils.js +0 -66
  178. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +5 -2
  179. package/dist/collection/helpers/rte-manager/dto-action-strategy-manager.js +2 -0
  180. package/dist/esm/{app-globals-37a60cc1.js → app-globals-2f689986.js} +6 -5
  181. package/dist/esm/{child-nodes-event-prevent-slimmer-735cb880.js → child-nodes-event-prevent-slimmer-76331524.js} +1 -1
  182. package/dist/esm/{code-block-11b2bc1c.js → code-block-e8839202.js} +511 -318
  183. package/dist/esm/{component-value-history-controller-slimmer.abstract-16c5cb96.js → component-value-history-controller-slimmer.abstract-c6f94113.js} +2 -2
  184. package/dist/esm/{design-token-297dc528.js → design-token-e9e6b011.js} +1 -1
  185. package/dist/esm/{dto-renderer-manager-a1a3b6d2.js → dto-renderer-manager-7abc53bf.js} +1587 -1565
  186. package/dist/esm/{element-appender-slimmer-f7233708.js → element-appender-slimmer-8dbc8387.js} +2 -2
  187. package/dist/esm/{event-emit-slimmer-28fd360c.js → event-emit-slimmer-4e28e9f8.js} +1 -1
  188. package/dist/esm/{token-extension-b690953f.js → function-extension-eb1d062f.js} +1018 -97
  189. package/dist/esm/{image-annotation-action-fc46c920.js → image-annotation-action-7957653a.js} +14 -24
  190. package/dist/esm/index.js +9 -9
  191. package/dist/esm/{internal-vega-event-manager-a5a5938d.js → internal-vega-event-manager-516aa721.js} +5 -2
  192. package/dist/esm/{language-extension-314a2b18.js → language-extension-3331131f.js} +3 -3
  193. package/dist/esm/loader.js +8 -8
  194. package/dist/esm/{public-rules-c6a6946d.js → public-rules-e613dead.js} +3 -3
  195. package/dist/esm/{range-b78254de.js → range-adf206fd.js} +1 -1
  196. package/dist/esm/{responsive-format-facade-a41e1be7.js → responsive-format-facade-b0712993.js} +3 -3
  197. package/dist/esm/{rich-text-editor-required-rule-d50c24da.js → rich-text-editor-required-rule-43857573.js} +1 -1
  198. package/dist/esm/{style-formatter-f7effaac.js → style-formatter-a20a1ef4.js} +1 -1
  199. package/dist/esm/vega-accordion.entry.js +7 -7
  200. package/dist/esm/vega-app-header-button.entry.js +8 -8
  201. package/dist/esm/vega-banner.entry.js +2 -2
  202. package/dist/esm/vega-box.entry.js +8 -8
  203. package/dist/esm/vega-breadcrumb.entry.js +3 -3
  204. package/dist/esm/vega-button-circle.entry.js +9 -9
  205. package/dist/esm/vega-button-group_2.entry.js +3 -3
  206. package/dist/esm/vega-button-link.entry.js +3 -3
  207. package/dist/esm/vega-button.entry.js +8 -8
  208. package/dist/esm/vega-calendar_4.entry.js +307 -269
  209. package/dist/esm/vega-card.entry.js +7 -7
  210. package/dist/esm/vega-carousel.entry.js +7 -7
  211. package/dist/esm/vega-checkbox_2.entry.js +3 -3
  212. package/dist/esm/vega-chip.entry.js +9 -9
  213. package/dist/esm/vega-code-block.entry.js +6 -6
  214. package/dist/esm/vega-color-picker.entry.js +2 -2
  215. package/dist/esm/vega-combo-box.entry.js +3 -3
  216. package/dist/esm/vega-date-picker_2.entry.js +8 -8
  217. package/dist/esm/vega-dialog_2.entry.js +9 -9
  218. package/dist/esm/vega-divider.entry.js +7 -7
  219. package/dist/esm/vega-dropdown_5.entry.js +9 -9
  220. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  221. package/dist/esm/vega-field-label.entry.js +24 -5
  222. package/dist/esm/vega-file-uploader.entry.js +2 -2
  223. package/dist/esm/vega-flag-icon.entry.js +6 -6
  224. package/dist/esm/vega-flex.entry.js +8 -8
  225. package/dist/esm/vega-font.entry.js +7 -7
  226. package/dist/esm/vega-form.entry.js +3 -3
  227. package/dist/esm/vega-grid.entry.js +7 -7
  228. package/dist/esm/vega-icon.entry.js +6 -6
  229. package/dist/esm/vega-image-uploader.entry.js +7 -7
  230. package/dist/esm/vega-input-credit-card.entry.js +3 -3
  231. package/dist/esm/vega-input-numeric.entry.js +3 -3
  232. package/dist/esm/vega-input-passcode.entry.js +3 -3
  233. package/dist/esm/vega-input-phone-number.entry.js +6 -6
  234. package/dist/esm/vega-input-range.entry.js +3 -3
  235. package/dist/esm/vega-input-select.entry.js +38 -14
  236. package/dist/esm/vega-input.entry.js +14 -3
  237. package/dist/esm/vega-item-toggle.entry.js +2 -2
  238. package/dist/esm/vega-left-nav_5.entry.js +7 -7
  239. package/dist/esm/vega-loader-wrapper_2.entry.js +6 -6
  240. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +2 -2
  241. package/dist/esm/vega-pagination.entry.js +7 -7
  242. package/dist/esm/vega-popover_2.entry.js +9 -9
  243. package/dist/esm/vega-progress-tracker.entry.js +2 -2
  244. package/dist/esm/vega-radio_2.entry.js +3 -3
  245. package/dist/esm/vega-rich-text-content.entry.js +93 -16
  246. package/dist/esm/vega-rich-text-editor_4.entry.js +107 -54
  247. package/dist/esm/vega-segment-control.entry.js +2 -2
  248. package/dist/esm/vega-selection-chip_2.entry.js +8 -8
  249. package/dist/esm/vega-selection-tile_2.entry.js +3 -3
  250. package/dist/esm/vega-sidenav_3.entry.js +6 -6
  251. package/dist/esm/vega-signature-capture.entry.js +7 -7
  252. package/dist/esm/vega-stepper.entry.js +3 -3
  253. package/dist/esm/vega-tab-group_2.entry.js +3 -3
  254. package/dist/esm/vega-table_8.entry.js +8 -8
  255. package/dist/esm/vega-textarea.entry.js +25 -5
  256. package/dist/esm/vega-time-picker_2.entry.js +9 -9
  257. package/dist/esm/vega-toggle-switch.entry.js +2 -2
  258. package/dist/esm/vega-tooltip_2.entry.js +7 -7
  259. package/dist/esm/vega.js +8 -8
  260. package/dist/sri/vega-sri-manifest.json +273 -273
  261. package/dist/types/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.d.ts +1 -0
  262. package/dist/types/components/vega-field-label/types.d.ts +12 -0
  263. package/dist/types/components/vega-field-label/vega-field-label.d.ts +13 -1
  264. package/dist/types/components/vega-input/vega-input.d.ts +14 -2
  265. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-renderer.d.ts +3 -0
  266. package/dist/types/components/vega-input-select/vega-input-select.d.ts +25 -0
  267. package/dist/types/components/vega-rich-text-content/slimmers/controllers/vega-rich-text-content-extensions-styles-controller.d.ts +26 -0
  268. package/dist/types/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.d.ts +1 -0
  269. package/dist/types/components/vega-rich-text-content/vega-rich-text-content.d.ts +7 -0
  270. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-interceptor-registry.d.ts +42 -0
  271. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-interceptor.abstract.d.ts +26 -0
  272. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.d.ts +9 -2
  273. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.d.ts +7 -0
  274. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/paste-content-strategy.d.ts +12 -0
  275. package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -1
  276. package/dist/types/components/vega-rich-text-editor/dto/actions/paste-content-action.d.ts +20 -0
  277. package/dist/types/components/vega-rich-text-editor/dto/actions/update-cursor-position-action.d.ts +1 -0
  278. package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation-style.d.ts +46 -0
  279. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +10 -1
  280. package/dist/types/components/vega-rich-text-editor/dto/blocks/html-block.d.ts +3 -3
  281. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +6 -0
  282. package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +0 -11
  283. package/dist/types/components/vega-rich-text-editor/extensions/base-extension-renderer.d.ts +16 -0
  284. package/dist/types/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.d.ts +19 -3
  285. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +36 -3
  286. package/dist/types/components/vega-rich-text-editor/extensions/functions/action-handler-interceptor/prevent-new-paragraph-interceptor.d.ts +25 -0
  287. package/dist/types/components/vega-rich-text-editor/extensions/functions/action-handler-interceptor/prevent-paste-content-interceptor.d.ts +17 -0
  288. package/dist/types/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/function-block-insert-paragraph-strategy.d.ts +18 -0
  289. package/dist/types/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/insert-function-block-strategy.d.ts +27 -0
  290. package/dist/types/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/paste-plain-text-strategy.d.ts +26 -0
  291. package/dist/types/components/vega-rich-text-editor/extensions/functions/actions/insert-function-block-action.d.ts +17 -0
  292. package/dist/types/components/vega-rich-text-editor/extensions/functions/actions/paste-plain-text-action.d.ts +17 -0
  293. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +58 -0
  294. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.d.ts +55 -0
  295. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.d.ts +48 -0
  296. package/dist/types/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.d.ts +27 -0
  297. package/dist/types/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-content-strategy.d.ts +14 -0
  298. package/dist/types/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-logic-control-block-strategy.d.ts +32 -0
  299. package/dist/types/components/vega-rich-text-editor/extensions/functions/function-extension.d.ts +19 -0
  300. package/dist/types/components/vega-rich-text-editor/extensions/functions/renderers/function-block-renderer.d.ts +25 -0
  301. package/dist/types/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.d.ts +33 -0
  302. package/dist/types/components/vega-rich-text-editor/extensions/functions/renderers/logic-control-block-renderer.d.ts +12 -0
  303. package/dist/types/components/vega-rich-text-editor/extensions/languages/language-extension.d.ts +2 -2
  304. package/dist/types/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.d.ts +2 -2
  305. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-extension.d.ts +2 -2
  306. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-node-renderer.d.ts +3 -4
  307. package/dist/types/components/vega-rich-text-editor/interface.d.ts +8 -2
  308. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +8 -1
  309. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy.abstract.d.ts +2 -11
  310. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/state-entity-rendering-registry.d.ts +1 -1
  311. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.d.ts +15 -0
  312. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/code-block-toolbar-button-slimmer.d.ts +1 -0
  313. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/visual-mode-toolbar-button-slimmer.abstract.d.ts +11 -0
  314. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.d.ts +1 -0
  315. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-delete-node-content-strategy.test.d.ts +1 -0
  316. package/dist/types/components/vega-rich-text-editor/test/dto/annotation-style.test.d.ts +1 -0
  317. package/dist/types/components/vega-textarea/vega-textarea.d.ts +26 -0
  318. package/dist/types/components.d.ts +65 -3
  319. package/dist/types/helpers/calendar/calendar-date-time.d.ts +76 -0
  320. package/dist/types/helpers/calendar/calendar-event.d.ts +18 -57
  321. package/dist/types/helpers/calendar/calendar-time.d.ts +64 -0
  322. package/dist/types/helpers/calendar/index.d.ts +2 -0
  323. package/dist/types/helpers/calendar/test/calendar-date-time.test.d.ts +1 -0
  324. package/dist/types/helpers/calendar/test/calendar-time.test.d.ts +1 -0
  325. package/dist/types/helpers/calendar/utils.d.ts +0 -25
  326. package/dist/types/types/components.type.d.ts +1 -1
  327. package/dist/types/types/public-api.d.ts +2 -0
  328. package/dist/vega/index.esm.js +1 -1
  329. package/dist/vega/{p-6f7d42a0.entry.js → p-00376f71.entry.js} +1 -1
  330. package/dist/vega/p-018d70a5.js +1 -0
  331. package/dist/vega/p-0849f85e.js +1 -0
  332. package/dist/vega/{p-b431f9d5.entry.js → p-0a55f984.entry.js} +1 -1
  333. package/dist/vega/p-0f7dec29.entry.js +1 -0
  334. package/dist/vega/{p-47cae62d.entry.js → p-113d305b.entry.js} +1 -1
  335. package/dist/vega/{p-015cdbe7.entry.js → p-115b42e6.entry.js} +1 -1
  336. package/dist/vega/p-16358fec.entry.js +1 -0
  337. package/dist/vega/{p-af5bfe34.js → p-16d68187.js} +1 -1
  338. package/dist/vega/{p-92a22562.entry.js → p-18e8c54a.entry.js} +1 -1
  339. package/dist/vega/{p-6f6ccf67.entry.js → p-1922303e.entry.js} +1 -1
  340. package/dist/vega/{p-74d61782.entry.js → p-19256107.entry.js} +1 -1
  341. package/dist/vega/{p-59298f5e.entry.js → p-1dcb1fcd.entry.js} +2 -2
  342. package/dist/vega/{p-7f69081b.entry.js → p-1dd7f8b2.entry.js} +1 -1
  343. package/dist/vega/{p-d006e732.entry.js → p-22fe8c61.entry.js} +1 -1
  344. package/dist/vega/{p-524693d8.entry.js → p-238afe1b.entry.js} +1 -1
  345. package/dist/vega/p-240d9d35.entry.js +1 -0
  346. package/dist/vega/{p-b82d3915.entry.js → p-24419ebe.entry.js} +1 -1
  347. package/dist/vega/p-2478f65e.js +1 -0
  348. package/dist/vega/{p-358e9800.entry.js → p-2c945862.entry.js} +1 -1
  349. package/dist/vega/{p-5f58d1da.entry.js → p-2e32fbe6.entry.js} +1 -1
  350. package/dist/vega/p-2f04d2ac.js +1 -0
  351. package/dist/vega/{p-a73dc4b3.entry.js → p-30a8d9d6.entry.js} +1 -1
  352. package/dist/vega/{p-e6cccee4.js → p-369810ae.js} +1 -1
  353. package/dist/vega/p-3ad87199.entry.js +1 -0
  354. package/dist/vega/{p-fe2e859f.entry.js → p-3b800f1b.entry.js} +1 -1
  355. package/dist/vega/p-437f865f.js +1 -0
  356. package/dist/vega/{p-de624f7d.entry.js → p-48bc03fa.entry.js} +1 -1
  357. package/dist/vega/{p-46830028.entry.js → p-54ddd06f.entry.js} +1 -1
  358. package/dist/vega/{p-5a0524ab.entry.js → p-56636a58.entry.js} +1 -1
  359. package/dist/vega/{p-fc8c5869.entry.js → p-56f77466.entry.js} +1 -1
  360. package/dist/vega/p-5f377954.js +1 -1
  361. package/dist/vega/{p-ab1001f5.entry.js → p-61d9cdf9.entry.js} +1 -1
  362. package/dist/vega/{p-39b9c57b.entry.js → p-626246b4.entry.js} +1 -1
  363. package/dist/vega/{p-ff3bb4e2.entry.js → p-634499cb.entry.js} +1 -1
  364. package/dist/vega/p-6609d87e.entry.js +1 -0
  365. package/dist/vega/p-69d27eaf.entry.js +1 -0
  366. package/dist/vega/{p-7efb5ebe.entry.js → p-705dad87.entry.js} +1 -1
  367. package/dist/vega/{p-8d574fbd.entry.js → p-75b5894f.entry.js} +1 -1
  368. package/dist/vega/{p-00071542.entry.js → p-76b1dae4.entry.js} +1 -1
  369. package/dist/vega/{p-54b62ecf.js → p-7747c163.js} +1 -1
  370. package/dist/vega/{p-0ed53cce.entry.js → p-787caad3.entry.js} +1 -1
  371. package/dist/vega/{p-129c0ce1.js → p-79e6e12c.js} +1 -1
  372. package/dist/vega/{p-cc519f53.entry.js → p-7dde3be9.entry.js} +1 -1
  373. package/dist/vega/p-8233d814.entry.js +1 -0
  374. package/dist/vega/{p-5e32866d.entry.js → p-83a50ac2.entry.js} +1 -1
  375. package/dist/vega/p-8506e8c3.js +1 -0
  376. package/dist/vega/{p-47fa359b.js → p-85407fb9.js} +1 -1
  377. package/dist/vega/{p-892cbe7c.entry.js → p-880569ec.entry.js} +1 -1
  378. package/dist/vega/{p-0113a83c.entry.js → p-8dba59a6.entry.js} +1 -1
  379. package/dist/vega/p-94e167b8.entry.js +1 -0
  380. package/dist/vega/{p-b2aaab66.entry.js → p-98fb9eaa.entry.js} +1 -1
  381. package/dist/vega/{p-3288a65b.entry.js → p-99bf5993.entry.js} +1 -1
  382. package/dist/vega/p-a211ae63.js +1 -0
  383. package/dist/vega/{p-fef846d5.entry.js → p-a2506cb5.entry.js} +1 -1
  384. package/dist/vega/{p-4e33fff6.entry.js → p-a6fb5a40.entry.js} +1 -1
  385. package/dist/vega/{p-bee1cc34.entry.js → p-b5060e84.entry.js} +1 -1
  386. package/dist/vega/{p-616cd622.entry.js → p-b78670c9.entry.js} +1 -1
  387. package/dist/vega/{p-d5761532.entry.js → p-b8558278.entry.js} +1 -1
  388. package/dist/vega/{p-8d655fd2.entry.js → p-bb0f2b5f.entry.js} +1 -1
  389. package/dist/vega/{p-a7631c6b.js → p-bb37a401.js} +1 -1
  390. package/dist/vega/p-bccee21e.js +1 -0
  391. package/dist/vega/{p-2553031f.entry.js → p-bd0e55a2.entry.js} +1 -1
  392. package/dist/vega/{p-65693321.entry.js → p-c0223a17.entry.js} +1 -1
  393. package/dist/vega/{p-2d430dc4.entry.js → p-c26332ae.entry.js} +1 -1
  394. package/dist/vega/{p-7f9ec104.entry.js → p-c54148fb.entry.js} +1 -1
  395. package/dist/vega/{p-276b1163.entry.js → p-d3905af1.entry.js} +2 -2
  396. package/dist/vega/p-d4893487.js +1 -0
  397. package/dist/vega/{p-d1dacaeb.entry.js → p-d67200e8.entry.js} +1 -1
  398. package/dist/vega/{p-725f0a2c.js → p-db57dddc.js} +1 -1
  399. package/dist/vega/{p-ed8bc4f0.entry.js → p-de02f404.entry.js} +1 -1
  400. package/dist/vega/{p-d4452dbc.entry.js → p-de8c5fae.entry.js} +1 -1
  401. package/dist/vega/{p-7b145620.js → p-de97c6d9.js} +1 -1
  402. package/dist/vega/{p-34800282.entry.js → p-e0979451.entry.js} +1 -1
  403. package/dist/vega/{p-1a3cb65e.entry.js → p-e6351dab.entry.js} +1 -1
  404. package/dist/vega/{p-8d096fea.entry.js → p-f0fb3fdd.entry.js} +1 -1
  405. package/dist/vega/{p-ea05a2fc.entry.js → p-f3399ef1.entry.js} +1 -1
  406. package/dist/vega/vega.esm.js +1 -1
  407. package/package.json +1 -1
  408. package/dist/vega/p-019f7f95.js +0 -1
  409. package/dist/vega/p-03a1e82e.entry.js +0 -1
  410. package/dist/vega/p-0d1eca78.entry.js +0 -1
  411. package/dist/vega/p-16370cfb.js +0 -1
  412. package/dist/vega/p-3a7f177a.entry.js +0 -1
  413. package/dist/vega/p-41c3fcb4.js +0 -1
  414. package/dist/vega/p-81105691.entry.js +0 -1
  415. package/dist/vega/p-822c6092.js +0 -1
  416. package/dist/vega/p-8edf3513.js +0 -1
  417. package/dist/vega/p-a1b7a179.entry.js +0 -1
  418. package/dist/vega/p-ab8f99e9.entry.js +0 -1
  419. package/dist/vega/p-bf7f755b.js +0 -1
  420. package/dist/vega/p-bf9476cd.entry.js +0 -1
  421. package/dist/vega/p-c6ce2869.js +0 -1
  422. package/dist/vega/p-d0e6454e.entry.js +0 -1
  423. package/dist/vega/p-d88e88a7.js +0 -1
  424. package/dist/vega/p-f360c9ba.js +0 -1
@@ -1 +0,0 @@
1
- import{h as t,r as e,c as i,H as n,g as a}from"./p-6b2342e0.js";import{I as r}from"./p-abd7aeaa.js";import{M as s,a as o}from"./p-f0ff4463.js";import{M as p,a as l}from"./p-cdbbdcc2.js";import{R as h}from"./p-280cbcdb.js";import{s as d}from"./p-519a7d55.js";import{c as u}from"./p-86194314.js";import{C as c}from"./p-75b58efe.js";import{c as f,V as x,M as g,I as m}from"./p-6e1ab235.js";import{s as v}from"./p-6bd5c49b.js";import{V as b,I as w}from"./p-d849e0f5.js";import{F as y}from"./p-9fb6fbcc.js";import{c as j}from"./p-7b145620.js";import{f as I,C,E as z,u as k,F as S,D as R}from"./p-447c7590.js";import{F as N}from"./p-a528714c.js";import{C as E}from"./p-2d0d575f.js";import{S as T}from"./p-71f9c4d4.js";import{S as V}from"./p-867a4970.js";import{i as F}from"./p-b1faebe0.js";import{S as O}from"./p-85f9a980.js";import{P as A}from"./p-7d9cd9c8.js";import{S as D}from"./p-fde50319.js";import{i as $}from"./p-d27ae9ff.js";import{d as L}from"./p-bf19682d.js";import"./p-262ec334.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-308aa2e3.js";import"./p-39482a1a.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-41c3fcb4.js";import"./p-b75ee3ba.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-8350506e.js";import"./p-5d676a94.js";const P=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)])$/;class M extends r{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=P.test(t.toLowerCase());return{isValid:e,message:e?"":"Please enter the correct email format."}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t&&t.length>0}}class _ extends x{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);r>3&&s&&Object.defineProperty(e,i,s)}([f()],_.prototype,"disableCopyPaste",void 0);var B=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class U extends x{render(){const e=this.hasPrefixSlot();if(this.prefixIcon||e)return t("div",{class:{"vega-input-prefix":!0,"vega-input-prefix-slot":e},part:"prefix-icon-container"},this.prefixIcon&&!e?t("vega-icon",{icon:this.prefixIcon,size:"size-16"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}B([f()],U.prototype,"host",void 0),B([f()],U.prototype,"prefixIcon",void 0);class W extends V{format(t){if(!t.length)return t;const e=Number(t.replace(/,/g,""));return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e.toLocaleString("en-US"):t}calculateCaretPosition(t,e){const i=this.format(t),n=t.substring(0,e),a=i.substring(0,e),r=(n.match(/,/g)||[]).length;return e+((a.match(/,/g)||[]).length-r)}}class K extends V{constructor(t){super(),this.maskConfig={allowNegative:!0},this.skipFormat=t=>this.maskConfig.allowNegative&&"-"===t||null!=this.maskConfig.precision&&this.maskConfig.precision>0&&t.split(".").length-1==1&&t.endsWith(".")&&!t.startsWith("."),this.maskConfig=Object.assign(Object.assign({},this.maskConfig),t),this.mask=new RegExp(this.getRegExp())}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t)&&i.pop()}return i.join("")}calculateCaretPosition(t,e){if(F(e)){const i=this.redressAbnormalNumber(t);return e-(t.length-i.length)}}inputNeedFormat(t){return!this.mask.test(t)}redressAbnormalNumber(t){let e=t.replace(/^0+(?!$)/,"");return e.startsWith(".")&&(e=`0${e}`),e}getRegExp(){const t=this.maskConfig.allowNegative?"(\\-)?":"";let e;return e=0===this.maskConfig.precision?`^${t}(0|[1-9][0-9]*)$`:this.maskConfig.precision&&this.maskConfig.precision>0?`^${t}(0|0\\.\\d{1,${this.maskConfig.precision}}|[1-9][0-9]*(\\.\\d{1,${this.maskConfig.precision}})?)$`:`^${t}(0|0\\.\\d*|[1-9][0-9]*(\\.\\d*)?)$`,e}}class q extends V{constructor(t,e=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(F(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class G extends K{constructor(t){super(t)}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t.replace(/,/g,""))&&i.pop()}return this.thousandCommaFormat(i.join(""))}calculateCaretPosition(t,e){const i=this.redressAbnormalNumber(t),n=this.format(t),a=t.substring(0,e),r=n.substring(0,e),s=(a.match(/,/g)||[]).length;return e+((r.match(/,/g)||[]).length-s)-(t.length-i.length)}thousandCommaFormat(t){if(!t.length)return t;const e=t.replace(/[^\d.-]/g,""),i=e.indexOf("."),n=e.length>1&&i>=1?e.slice(i):"",a=Number(e.split(".")[0]);return!isNaN(a)&&a<=Number.MAX_SAFE_INTEGER?a.toLocaleString("en-US")+n:e}}var H=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class J extends O{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRef,this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}watchValue(t,e){t!==e&&this.formatValueAfterValueChange()}setupStringFormatter(t){this.inputRef=t,this.setup()}generateMaskStrategy(t){let e=null;Array.isArray(this.maskConfig)?e=this.maskConfig.find((e=>"blur"===t?this.isBlurModeMaskConfig(e):!this.isBlurModeMaskConfig(e))):this.maskConfig&&("blur"===t&&this.isBlurModeMaskConfig(this.maskConfig)?e=this.maskConfig:"input"!==t||this.isBlurModeMaskConfig(this.maskConfig)||(e=this.maskConfig));let i=null;switch(null==e?void 0:e.type){case"phone":i=T.PHONE_MASK;break;case"taxId":i=T.TAX_ID_MASK;break;case"zipcode":i=T.ZIPCODE_MASK;break;case"thousand-comma":i=new W;break;case"number":i=this.getNumberTypeMaskStrategy(e.options);break;case"custom":i=e.strategy?e.strategy():new T(e.options);break;case"custom-formatter":i=new q(e.formatter,e.resetCaretPosition)}return"number"!==this.type||"input"!==t||e||(i=new K),i}getNumberTypeMaskStrategy(t){return t&&t.thousandComma?new G(t):new K(t)}isBlurModeMaskConfig(t){return"custom"===t.type&&"blur"===t.trigger}}H([f()],J.prototype,"maskConfig",void 0),H([f()],J.prototype,"disableCopyPaste",void 0),H([f()],J.prototype,"type",void 0),H([g("watchValue")],J.prototype,"watchValue",null);const Q=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!1===t.autoValidation},{payloadKey:"EMAIL_IS_TRUE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!0===t.email},{payloadKey:"EMAIL_IS_FALSE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!1===t.email}];var X=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Y extends x{componentDidLoad(){this.setInputAutoWidth()}watchValue(){this.setInputAutoWidth()}watchSuffixText(){this.setInputAutoWidth()}setInputAutoWidth(){const t=this.host.shadowRoot.querySelector(".vega-input-container"),e=null==t?void 0:t.querySelector(".vega-input-input"),i=null==e?void 0:e.querySelector("input");if(i&&(t.classList.remove("auto-width"),i.style.removeProperty("width"),this.isCompactInputWidth&&this.suffixText)){const n=this.getActualInputWidth();e.getBoundingClientRect().width>n&&(i.style.width=`${n}px`,t.classList.add("auto-width"))}}getActualInputWidth(){const t=this.getCalculateTextWidthContainer();t.style.display="inline-block",t.textContent=`${this.value||this.placeholder||""}`;const e=t.getBoundingClientRect().width;return t.style.display="none",e}getCalculateTextWidthContainer(){if(!this.calculateTextWidthContainer){const t=document.createElement("div");t.classList.add("v-font-field-value"),t.style.visibility="hidden",t.style.display="none",this.host.shadowRoot.append(t),this.calculateTextWidthContainer=t}return this.calculateTextWidthContainer}}X([f()],Y.prototype,"host",void 0),X([f()],Y.prototype,"value",void 0),X([f()],Y.prototype,"placeholder",void 0),X([f()],Y.prototype,"isCompactInputWidth",void 0),X([f()],Y.prototype,"suffixText",void 0),X([g("componentDidLoad")],Y.prototype,"componentDidLoad",null),X([g("watchValue")],Y.prototype,"watchValue",null),X([g("watchSuffixText")],Y.prototype,"watchSuffixText",null);var Z=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class tt extends D{constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"prefixText",parentStateName:"prefixText"},{subStateName:"suffixText",parentStateName:"suffixText"},{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}Z([f()],tt.prototype,"host",void 0),Z([f({writable:!0})],tt.prototype,"prefixText",void 0),Z([f({writable:!0})],tt.prototype,"suffixText",void 0),Z([f({writable:!0})],tt.prototype,"isCompactInputWidth",void 0);var et=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const it=class{constructor(n){e(this,n),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",7),this.labelButtonClick=i(this,"labelButtonClick",7),this.vegaPaste=i(this,"vegaPaste",7),this.paste=i(this,"paste",7),this.globalSlimmers={},this.formFieldController=new y({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new h:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new s({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new o({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new p({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new l({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new M:null},{propertyName:"type",ruleFactory:t=>"email"===t?new M:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.pageResizeObserverSlimmer=new A({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.copyPasteController=new _,this.compactWidthController=new Y,this.stateController=new tt,this.maskConfigController=new J,this.prefixSlotRenderer=new U,this.changeEventEmitter=j(it,I),this.focusEventEmitter=j(it,C),this.blurEventEmitter=j(it,z),this.labelButtonClickEventEmitter=j(it,k),this.pasteEventEmitter=j(it,S),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(Q),this.label="",this.labelSuffixButtonProps=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.email=!1,this.required=!1,this.min=null,this.max=null,this.minLength=null,this.maxLength=null,this.showClearIcon=!0,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.disabled=!1,this.hint="",this.disableCopyPaste=!1,this.focusInput=()=>{this.inputRef.focus()},this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.maskConfigController.setupStringFormatter(t))},this.renderPrefixText=()=>this.prefixText&&t("div",{class:"prefix-text"},this.prefixText),this.renderSuffixText=()=>this.suffixText&&t("div",{class:"suffix-text"},this.suffixText),this.handleInputFocus=t=>{this.focusEventEmitter.emit(void 0,t)},this.handleInputBlur=t=>{this.blurEventEmitter.emit(void 0,t)},this.handleInputPaste=t=>{this.pasteEventEmitter.emit(t.clipboardData).defaultPrevented&&t.preventDefault()},this.onClickClearIcon=()=>{this.value=""},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value),this.onClearInputFocus=()=>{this.inputContainerRef.classList.add("no-focus")},this.onClearInputBlur=()=>{this.inputContainerRef.classList.remove("no-focus")},this.onInputHandler=t=>{"change"!==this.valueUpdateTrigger&&(this.value=t.target.value)},this.inputChangeHandler=t=>{"change"===this.valueUpdateTrigger&&(this.value=t.target.value)},this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()}}watchSuffixText(){}watchValue(t){this.changeEventEmitter.emit(t),this.inputRef.value!==this.value&&(this.inputRef.value=this.value),E.notify(N,{host:this.host,detail:this.value})}watchTypeChange(t,e){"number"!==t&&"number"!==e||this.maskConfigController.setupStringFormatter(this.inputRef)}watchValidationRules(){}watchMaskChange(t,e){this.areMaskConfigsEqual(t,e)||this.maskConfigController.setupStringFormatter(this.inputRef)}async doFocus(){this.focusInput()}async doBlur(){this.inputRef.blur()}render(){return v(t("slot",null)),d(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.groupDom()),this.host)}containerDom(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:"number"===this.type?"text":this.type,autoComplete:this.autocomplete,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,"aria-label":this.label||"No label defined",minLength:this.minLength,maxLength:this.maxLength,onBlur:t=>this.handleInputBlur(t),onFocus:t=>this.handleInputFocus(t),onChange:this.inputChangeHandler,onInput:this.onInputHandler,onPaste:t=>this.handleInputPaste(t)},this.copyPasteController.getCopyPasteProps())))}groupDom(){let e="vega-input-container";return this.value&&(e+=" with-value"),e+="small"===this.size?" vega-input-size-small":" vega-input-size-default",e+=this.disabled?" vega-input-disabled":"",this.isCompactInputWidth&&(e+=" compact-input-width"),t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:e,onClick:this.focusInput,"aria-label":"input container","aria-disabled":`${this.disabled}`,role:"textbox",tabIndex:this.disabled?null:-1,onKeyDown:u()},this.prefixSlotRenderer.render(),this.renderPrefixText(),this.containerDom(),this.renderSuffixText(),this.showClearIcon&&this.renderClearIcon()),this.renderHintDom())}renderLabelDom(){return t("vega-field-label",{onClick:this.focusInput,"is-field-required":this.required,disabled:this.disabled,label:this.label,suffixButtonProps:this.labelSuffixButtonProps,ref:t=>{R.addUniqueObserverToNode(t,k,this.handleLabelButtonClick)}})}renderClearIcon(){return t("div",{class:{"vega-input-clear-icon":!0,invisible:!this.isClearIconVisible()},tabIndex:this.disabled?-1:0,"aria-label":"clear input",role:"button",onClick:this.onClickClearIcon,onKeyDown:u(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return $(i,n,!0,((t,e)=>L(t,e)?0:-1))}get host(){return a(this)}static get watchers(){return{suffixText:["watchSuffixText"],value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"]}}};et([w()],it.prototype,"globalSlimmers",void 0),et([m()],it.prototype,"formFieldController",void 0),et([m()],it.prototype,"pageResizeObserverSlimmer",void 0),et([m()],it.prototype,"copyPasteController",void 0),et([m()],it.prototype,"compactWidthController",void 0),et([m()],it.prototype,"stateController",void 0),et([m()],it.prototype,"maskConfigController",void 0),et([m()],it.prototype,"prefixSlotRenderer",void 0),et([m()],it.prototype,"changeEventEmitter",void 0),et([m()],it.prototype,"focusEventEmitter",void 0),et([m()],it.prototype,"blurEventEmitter",void 0),et([m()],it.prototype,"labelButtonClickEventEmitter",void 0),et([m()],it.prototype,"pasteEventEmitter",void 0),et([m()],it.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),et([c()],it.prototype,"watchMaskChange",null),it.style=':host{cursor:text;display:block;text-align:left;line-height:normal}:host(.vega-input-inline-block){display:inline-block;width:100%}:host(.vega-input-hidden){display:none}vega-field-label{margin-bottom:8px}.vega-input-container{display:flex;align-items:center;border-radius:8px;gap:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))}.vega-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-container.vega-input-disabled{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))}.vega-input-container.vega-input-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled input{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.vega-input-container.with-value{border-width:1px;border-style:solid;border-radius:8px}.vega-input-container:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}.vega-input-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-input-container.error:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.vega-input-container.error .vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}.vega-input-prefix{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}.vega-input-prefix.vega-input-prefix-slot{height:24px;overflow:hidden}.vega-input-input{flex:1 1 0%;position:relative}.vega-input-input input{width:100%;outline:2px solid transparent;outline-offset:2px;border-style:none;height:24px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-input input{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-input-input input{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-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-input input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-input-size-small{padding-top:8px;padding-right:12px;padding-bottom:8px;padding-left:12px}.vega-input-size-default{padding-top:12px;padding-right:16px;padding-bottom:12px;padding-left:16px}.vega-input-input input:disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.vega-hint{padding-top:12px;padding-right:8px;padding-left:8px}.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}}.vega-error{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));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@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-input-clear-icon{width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border-radius:4px;padding:2px}.vega-input-clear-icon.invisible{visibility:hidden}.vega-input-clear-icon vega-icon{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=password]::-ms-reveal{display:none}.vega-input-container.compact-input-width{gap:0px}.vega-input-container.compact-input-width .vega-input-prefix{margin-right:8px}.vega-input-container.compact-input-width .prefix-text,.vega-input-container.compact-input-width .suffix-text{margin-right:2px}.vega-input-container.compact-input-width .vega-input-clear-icon{margin-left:2px}.vega-input-container.compact-input-width .vega-input-input input{padding:0px;min-width:1px}.vega-input-container.compact-input-width.auto-width .vega-input-input{flex-grow:0}.vega-input-container.compact-input-width.auto-width .suffix-text{flex-grow:1}.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0;flex-grow:0}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{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-input-container .prefix-text,.vega-input-container .suffix-text{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-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.v-font-field-value{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){.v-font-field-value{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){.v-font-field-value{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){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}';export{it as vega_input}
@@ -1 +0,0 @@
1
- import{i as f}from"./p-b1faebe0.js";import{R as o}from"./p-47fa359b.js";function i(i,r,e,s){return f(i)?{flex:`${o.formatCustom(i)}`}:{flexGrow:f(r)?`${o.formatCustom(r)}`:void 0,flexShrink:f(e)?`${o.formatCustom(e)}`:void 0,flexBasis:f(s)?`${o.formatCustom(s)}`:void 0}}export{i as f}
@@ -1 +0,0 @@
1
- import{h as e,F as t,f as i,r as n,c as r,H as o,g as a}from"./p-6b2342e0.js";import{s}from"./p-519a7d55.js";import{c as l,V as d,L as c,M as h,I as v}from"./p-6e1ab235.js";import{V as p,I as f}from"./p-d849e0f5.js";import{D as w,a as u,f as m,V as g,d as b,S as x,g as y,h as k,i as C,j as R}from"./p-447c7590.js";import{a as j}from"./p-8c9ea6f4.js";import{c as D}from"./p-86194314.js";import{p as E}from"./p-08835909.js";import{c as z}from"./p-7b145620.js";import{V as I}from"./p-39482a1a.js";import{s as M}from"./p-824a06ba.js";import{q as O}from"./p-b1faebe0.js";import{C as P}from"./p-725f0a2c.js";import{y as S,z as T,A as $,B as V}from"./p-308aa2e3.js";import{O as L}from"./p-331a62d5.js";import{C as A}from"./p-2d0d575f.js";import{f as B}from"./p-d27ae9ff.js";import{g as N}from"./p-a4670e23.js";import{P as F}from"./p-7d9cd9c8.js";import{d as W}from"./p-1bc5b3bc.js";import{c as H}from"./p-a0467b83.js";import{T as _}from"./p-d5ff8b7f.js";import{s as U}from"./p-6bd5c49b.js";import{v as Y}from"./p-54ae02db.js";import{S as Z}from"./p-fde50319.js";import{b as K}from"./p-0c667d6a.js";import{f as q}from"./p-d9671d27.js";import"./p-6a334573.js";import"./p-41c3fcb4.js";import"./p-b75ee3ba.js";import"./p-a528714c.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-262ec334.js";var X=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class G extends d{getEventPreviewRef(){return this.eventPreviewRef}render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render(),e("vega-calendar-event-preview",{ref:e=>{this.eventPreviewRef=e}}))}}X([l()],G.prototype,"host",void 0),X([l()],G.prototype,"switchPanelRenderer",void 0),X([l()],G.prototype,"viewRenderer",void 0);var J=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Q extends d{constructor(){super(...arguments),this.handleViewChange=e=>{this.currentPeriodController.updateCalendarPeriod(e.detail,this.postOperationDate)},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.showSwitchView?this.renderViewSwitch():null,this.renderMoreActionMenu()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{w.addUniqueObserverToNode(e,u,this.todayButtonClick)},label:this.translationSlimmer.t("Today")}),e("vega-button-circle",{variant:"secondary",size:"small",icon:j.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{w.addUniqueObserverToNode(e,u,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:j.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{w.addUniqueObserverToNode(e,u,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:Q.views.map((e=>Object.assign(Object.assign({},e),{text:this.translationSlimmer.t(e.text)}))),size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{w.addUniqueObserverToNode(e,m,this.handleViewChange)}})}renderMoreActionMenu(){var t,i;if(null===(i=null===(t=this.moreActionDropdownProps)||void 0===t?void 0:t.source)||void 0===i?void 0:i.length)return e("vega-dropdown",Object.assign({alignment:"end",trigger:"click"},this.moreActionDropdownProps,{ref:e=>{w.addUniqueObserverToNode(e,g,this.moreActionMenuClick)}}),e("vega-button-circle",{size:"small",icon:j.getIconKey("ellipsis-vertical"),variant:"icon-only"}))}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":{const i=this.translationSlimmer.t(e.getMonthName());t=`${e.date} ${i}, ${e.year}`;break}case"week":{const e=this.calendarView.dateItems[0],i=e[0],n=e[e.length-1],[r,o]=[i,n].map((e=>this.translationSlimmer.t(e.getMonthName())));t=`${i.date} ${r}${i.year===n.year?"":", "+i.year} - ${n.date} ${o}, ${n.year}`;break}case"month":t=`${this.translationSlimmer.t(e.getMonthName())}, ${e.year}`}return t}}j.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>'}}),Q.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],J([l()],Q.prototype,"viewMode",void 0),J([l()],Q.prototype,"calendarView",void 0),J([l()],Q.prototype,"currentPeriod",void 0),J([l()],Q.prototype,"moreActionDropdownProps",void 0),J([l()],Q.prototype,"moreActionClickEmitter",void 0),J([l()],Q.prototype,"currentPeriodController",void 0),J([l()],Q.prototype,"calendarViewController",void 0),J([l()],Q.prototype,"translationSlimmer",void 0),J([l()],Q.prototype,"postOperationDate",void 0),J([l()],Q.prototype,"showSwitchView",void 0);var ee=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class te extends d{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())}}ee([l()],te.prototype,"viewMode",void 0),ee([l()],te.prototype,"showWeekends",void 0),ee([l()],te.prototype,"monthViewRenderer",void 0),ee([l()],te.prototype,"viewWithTimeRenderer",void 0);var ie=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class ne extends d{emit(e,t){this.shouldHandleClickEvent(e)?this.dateClickEmitter.emit(t):this.shouldHandleDblClickEvent(e)&&this.dateDblClickEmitter.emit(t)}shouldHandleClickEvent(e){return!0===this.enableDateClick&&"click"===e.type}shouldHandleDblClickEvent(e){return!0!==this.enableDateClick&&"dblclick"===e.type}generateDateBlockRenderProps(e,t,i){const n={};return e||(this.enableDateClick?(n.tabIndex=0,n.role="button",n.onClick=e=>{this.handleDateBlockClick(e,t,i)},n.onKeyDown=D()):n.onDblClick=e=>{this.handleDateBlockClick(e,t,i)}),n}}ie([l()],ne.prototype,"enableDateClick",void 0),ie([l()],ne.prototype,"dateClickEmitter",void 0),ie([l()],ne.prototype,"dateDblClickEmitter",void 0);var re=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class oe extends ne{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())}handleDateBlockClick(e,t){const{target:i,clientX:n,clientY:r}=e;if(this.isMonthBlockBlankArea(i)){const{year:i,month:o,date:a}=t;this.emit(e,{year:i,month:o,date:a,hour:0,mouseEventInfo:{clientX:n,clientY:r}})}}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((i,n)=>{const r=this.monthEventRenderer.getCurrentRowEvents(i),o=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:n,class:"calendar-view-row border-divider-bottom"},i.map(((i,n)=>{var a;const s=null===(a=this.isDateDisabled)||void 0===a?void 0:a.call(this,i.toDate()),l=this.generateDateBlockRenderProps(s,i);return e("div",Object.assign({class:{"row-cell border-divider-right":!0,"current-month-day":i.compare(t).inMonth,active:i.isToday(this.timezone),disabled:s},key:`${i.month}-${i.date}`},l),this.renderDateBlock(i),this.monthEventRenderer.render(i,r[n],o[n],n))})))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},t.getMonthName(!0)),e("div",{role:"button",tabIndex:0,class:"grid-col",onDblClick:e=>{this.handleDateLabelClick(e,t)},onClick:e=>{this.handleDateLabelClick(e,t)},onKeyDown:D()},t.date))}goToCurrentDayView(e){this.currentPeriodController.updateCalendarPeriod("day",e)}handleDateLabelClick(e,t){e.stopPropagation(),this.showSwitchView&&(this.shouldHandleClickEvent(e)||this.shouldHandleDblClickEvent(e))&&this.goToCurrentDayView(t)}isMonthBlockBlankArea(e){return!e.classList.contains("more-button")&&"VEGA-CALENDAR-EVENT"!==e.tagName}}re([l()],oe.prototype,"viewMode",void 0),re([l()],oe.prototype,"calendarView",void 0),re([l()],oe.prototype,"currentPeriod",void 0),re([l()],oe.prototype,"currentPeriodController",void 0),re([l()],oe.prototype,"monthEventRenderer",void 0),re([l()],oe.prototype,"translationSlimmer",void 0),re([l()],oe.prototype,"isDateDisabled",void 0),re([l()],oe.prototype,"showSwitchView",void 0),re([l()],oe.prototype,"timezone",void 0);var ae=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class se extends ne{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}handleDateBlockClick(e,t,i){const{year:n,month:r,date:o}=t,{clientX:a,clientY:s}=e;this.emit(e,{year:n,month:r,date:o,hour:i,mouseEventInfo:{clientX:a,clientY:s}})}renderViewTitle(){const t=this.calendarView.dateItems[0],i=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,n)=>e("div",{key:t.date,class:{active:t.isToday(this.timezone)}},e("div",null,this.translationSlimmer.t(i[n])),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=>{var i;const n=null===(i=this.isDateDisabled)||void 0===i?void 0:i.call(this,t.toDate());return e("div",{class:{"grid-col border-divider-left":!0,disabled:n},key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock(t,n))}))),this.dayViewTimedEventRenderer.render(),this.timeMarkerRenderer.render(t)))}renderHourBlock(t,i){return Array(24).fill("").map(((n,r)=>{var o;let a=!1;if(!i){const e=new Date(t.toDate().setHours(r));a=null===(o=this.isDateDisabled)||void 0===o?void 0:o.call(this,e)}const s=this.generateDateBlockRenderProps(i||a,t,r);return e("div",Object.assign({key:r,class:{"grid-cell border-divider-top":!0,disabled:i||a}},s))}))}}ae([l()],se.prototype,"viewMode",void 0),ae([l()],se.prototype,"timeLineRenderer",void 0),ae([l()],se.prototype,"timeMarkerRenderer",void 0),ae([l()],se.prototype,"dayViewTimedEventRenderer",void 0),ae([l()],se.prototype,"dayViewFullDayEventRenderer",void 0),ae([l()],se.prototype,"calendarView",void 0),ae([l()],se.prototype,"translationSlimmer",void 0),ae([l()],se.prototype,"isDateDisabled",void 0),ae([l()],se.prototype,"enableDateClick",void 0),ae([l()],se.prototype,"timezone",void 0);class le extends d{render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line"},e("div",{class:"hour-empty"}),t.map(((t,i)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===i?24:i},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(`${E(t)}`);return e}}!function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);o>3&&a&&Object.defineProperty(t,i,a)}([l()],le.prototype,"timeFormat",void 0);const de=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};var ce;!function(e){e.sun="Sunday",e.mon="Monday",e.tue="Tuesday",e.wed="Wednesday",e.thu="Thursday",e.fri="Friday",e.sat="Saturday"}(ce||(ce={}));const he=(e,t)=>{const[i,n]=t.split(":");if("24-hour"===e)return`${i.padStart(2,"0")}:${n.padStart(2,"0")}`;{const e=Number(i),t=e>=12?"pm":"am",r=n.padStart(2,"0");return e>12?`${e-12}:${r} ${I.t("pm")}`:0===e?`12:${r} ${I.t("am")}`:`${e}:${r} ${I.t(t)}`}};function ve(e,t){if(e&&e!==pe())try{const i=new Intl.DateTimeFormat([],{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(t),n=i.find((e=>"year"===e.type)),r=i.find((e=>"month"===e.type)),o=i.find((e=>"day"===e.type));if(n&&r&&o){const e=parseInt(n.value,10);return{year:e,month:parseInt(r.value,10),date:parseInt(o.value,10)}}}catch(t){c.warn("Invalid timezone:",e)}return{year:t.getFullYear(),month:t.getMonth()+1,date:t.getDate()}}const pe=()=>Intl.DateTimeFormat().resolvedOptions().timeZone;class fe{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=de()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),i=[];for(let n=0;n<e.count;n++)i.push(new Date(t)),t.setDate(t.getDate()+1);return i}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class we{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class ue extends fe{generate(e){return new we([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class me{constructor(e,t,i){this._date=i,this._month=t,this._year=e}static from(e,t=pe()){const{year:i,month:n,date:r}=ve(t,e);return new me(i,n,r)}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(e=pe()){const{year:t,month:i,date:n}=ve(e,new Date);return t===this.year&&i===this.month&&n===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:i}=e,n={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<i?n.isPreviousMonth=!0:this.month>i?n.isNextMonth=!0:n.inMonth=!0:this.year>t?n.isNextMonth=!0:n.isPreviousMonth=!0,n}equal(e){const{year:t,month:i,date:n}=e;return this._year===t&&this._month===i&&this._date===n}getMonthName(e=!1){return I.t(this.toDate().toLocaleDateString("en-US",{month:e?"short":"long"}))}}class ge extends fe{generate(e){const t=this.generateDates(e),i=e.showWeekends;let n=this.generateWeekHead(),r=[t.map((e=>me.from(e)))];return!1===i&&(n=n.slice(1,6),r=r.map((e=>e.slice(1,6)))),new we(n,r)}}class be extends fe{generate(e){const t=e.showWeekends;let i=[],n=[];this.generateDates(e).forEach(((e,t)=>{t%7||(i[t/7]=n=[]);const r=me.from(e);n.push(r)}));let r=this.generateWeekHead();return!1===t&&(r=r.slice(1,6),i=i.map((e=>e.slice(1,6)))),new we(r,i)}}class xe{constructor(e,t,i){this._count=e,this._timezone=i||pe(),this._current=t||me.from(new Date,this._timezone),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}get timezone(){return this._timezone}goTo(e){return this.createBy(e)}now(){return this.createBy(me.from(new Date,this._timezone))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-de().indexOf(t.getDay())),this._startDate=me.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=me.from(t)}}var ye;function ke(e,t=15){const[i,n]=e.split(":");return Math.round((60*Number(i)+Number(n))/t)}function Ce(e){return"vega-calendar-event-slot-"+e}function Re(e,t=ye.NEXT){const i=e.toDate().getDay();if(0===i||6===i){let n=0===i?1:2;return t===ye.PREVIOUS&&(n=0===i?-2:-1),me.from(new Date(e.year,e.month-1,e.date+n))}return e}function je(e="bg-accent6-primary"){return O(e)?`.event-bg-color{${M.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}!function(e){e.PREVIOUS="-1",e.NEXT="1"}(ye||(ye={}));class De extends xe{constructor(e,t,i){super(De.DISPLAY_DATE_COUNT,e,i),this._type="day",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();e.setDate(e.getDate()+1);let t=me.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=me.from(e);return!1===this._showWeekends&&(t=Re(t,ye.PREVIOUS)),this.createBy(t)}now(){let e=me.from(new Date,this.timezone);return!1===this._showWeekends&&(e=Re(e)),this.createBy(e)}createBy(e){return new De(e,this._showWeekends,this.timezone)}}De.DISPLAY_DATE_COUNT=1;class Ee extends xe{constructor(e,t,i){super(Ee.DISPLAY_DATE_COUNT,e,i),this._type="week",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();return e.setDate(e.getDate()+7),this.createBy(me.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-7),this.createBy(me.from(e))}createBy(e){return new Ee(e,this._showWeekends,this.timezone)}}Ee.DISPLAY_DATE_COUNT=7;class ze extends xe{constructor(e,t,i){super(ze.DISPLAY_DATE_COUNT,e,i),this._type="month",this._showWeekends=!0,this._showWeekends=!1!==t}static getMonthFirstDay(e,t){const i=e||me.from(new Date,t);return new me(i.year,i.month,1)}calculatePeriod(e){const t=ze.getMonthFirstDay(e).toDate();t.setDate(t.getDate()-de().indexOf(t.getDay())),this._startDate=me.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=me.from(t)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(me.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(me.from(e))}createBy(e){return new ze(e,this._showWeekends,this.timezone)}}ze.DISPLAY_DATE_COUNT=42;var Ie=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Me extends d{constructor(){super(...arguments),this.monthViewGenerator=new be,this.weekViewGenerator=new ge,this.dayViewGenerator=new ue}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}}Ie([l({writable:!0})],Me.prototype,"calendarView",void 0),Ie([l()],Me.prototype,"currentPeriod",void 0),Ie([l()],Me.prototype,"showWeekends",void 0),Ie([l()],Me.prototype,"currentPeriodController",void 0),Ie([h("componentWillLoad")],Me.prototype,"initialCalendarView",null),Ie([h("watchCurrentPeriodChange")],Me.prototype,"generateCalendarView",null);var Oe=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Pe extends d{setCurrentPeriod(e){this.currentPeriod=e}updateCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new ze(t,this.showWeekends,this.timezone));break;case"week":this.setCurrentPeriod(new Ee(t,this.showWeekends,this.timezone));break;case"day":t=!1===this.showWeekends?Re(t):t,this.setCurrentPeriod(new De(t,this.showWeekends,this.timezone))}}initialCurrentPeriod(){this.updateCalendarPeriod(this.viewMode,me.from(new Date,this.timezone))}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:i}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:i.date,month:i.month,year:i.year}}}}Oe([l({writable:!0})],Pe.prototype,"currentPeriod",void 0),Oe([l()],Pe.prototype,"changeEventEmitter",void 0),Oe([l({writable:!0})],Pe.prototype,"viewMode",void 0),Oe([l()],Pe.prototype,"showWeekends",void 0),Oe([l()],Pe.prototype,"timezone",void 0),Oe([h("componentWillLoad")],Pe.prototype,"initialCurrentPeriod",null),Oe([h("watchCurrentPeriodChange")],Pe.prototype,"emitChangeEvent",null),Oe([h("watchViewModeChange")],Pe.prototype,"updateCurrentPeriodByViewMode",null),Oe([h("watchShowWeekendsChange")],Pe.prototype,"updateCurrentPeriodAfterHideWeekEndsChange",null);var Se=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Te extends d{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2,this.popoverHideObserver=null}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const i=this.calendarEventController.getCurrentDateEvents(e);t.push(i)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const i=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(i)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,i,n,r){const o=i.slice(n.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(n,r,t)),this.renderMoreButton(i,o,t))}addMaxDisplayCountChange(){w.addUniqueObserverToNode(this.host,S,(e=>{this.maxMonthDisplayEventsCount!==e.detail&&(this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&i(this.host))}))}renderMoreButton(t,i,n){if(i){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),o=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right",padding:"0",ref:e=>{this.setPopoverHideObserver(e)},isScreenPosition:!0},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:D()},`${i} More`),e("vega-flex",{slot:"popover"},e("vega-box",{padding:"size-12",width:256},e("vega-flex",{direction:"col",gap:"0",class:"group-events"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},`${n.date} ${n.getMonthName()} ${n.year}`),e("vega-box",{maxHeight:"calc(60vh - 6px)",style:{overflowY:"auto"},padding:"size-4"},e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:o.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0},n,!0)))),o.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0},n,!0)))))),e("div",{class:"preview-container",ref:e=>{e?this.eventPreviewPopoverController.setEventPreviewContainerMap(t,n,e):this.eventPreviewPopoverController.deleteEventPreviewContainer(t,n)}}))))}}hideTheCutOffEvents(e,t){const i=[],n=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((i=>{e.filter((e=>e.includes(i))).length>t.filter((e=>e.includes(i))).length&&n.push(i)})),n.length?(t.forEach((e=>{e.length&&e[e.length-1]&&n.includes(e[e.length-1])?i.push(e.slice(0,e.length-1)):i.push(e)})),i):t}setPopoverHideObserver(e){e?(this.popoverHideObserver=new L((()=>!0),(async()=>await e.hide())),A.register(b.getSubject(this.host,T),this.popoverHideObserver)):this.popoverHideObserver&&A.unregister(b.getSubject(this.host,T),this.popoverHideObserver),e&&w.addUniqueObserverToNode(e,x,(()=>{A.notify(b.getSubject(this.renderer.getEventPreviewRef(),$),{})}))}}Se([l()],Te.prototype,"viewMode",void 0),Se([l()],Te.prototype,"host",void 0),Se([l()],Te.prototype,"calendarEventController",void 0),Se([l()],Te.prototype,"eventItemRenderer",void 0),Se([l()],Te.prototype,"fullDayEventLayoutRenderer",void 0),Se([l()],Te.prototype,"eventPreviewPopoverRenderer",void 0),Se([l()],Te.prototype,"renderer",void 0),Se([l()],Te.prototype,"eventPreviewPopoverController",void 0),Se([h("componentWillLoad")],Te.prototype,"addMaxDisplayCountChange",null);class $e{constructor(e,t,i,n){this.repeatStartDate=e,this.interval=t,this.count=i,this.until=n}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.cache.filter((i=>this.isSeriesInPeriod(i,t,e)))}isSeriesInPeriod(e,t,i){const n=e.toDate(),r=new Date(e.year,e.month-1,e.date+t-1),{startDate:o,endDate:a}=i,s=o.toDate(),l=a.toDate();return n>=s&&n<=l||r>=s&&r<=l||n<=s&&r>=l}generateRepeatEndsString(){return this.until?` ${I.t("until {0}",`${this.until.getMonthName()} ${this.until.date}, ${this.until.year}`)}`:this.count?` ${I.t("after {0} occurrences",this.count)}`:""}}$e.daySeconds=864e5;class Ve extends $e{constructor(e,t,i,n){super(e,t,i,n),this.initCache()}generateRepeatString(){return(this.interval>1?I.t("Repeat every {0} days",this.interval):I.t("Repeat daily"))+this.generateRepeatEndsString()}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 i=this.getNextRepeatStartDate(t);for(;i&&i.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(i);if(e&&e.toDate()<=i.toDate()){this.cache.pop();break}if(i=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),i=me.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(i),i)}}class Le extends $e{constructor(e,t,i,n){super(e,t,i,n),this.byMonthDay=this.repeatStartDate.date,this.initCache()}generateRepeatString(){return(this.interval>1?I.t("Repeat every {0} months on day {1}",this.interval,this.byMonthDay):I.t("Repeat monthly on day {0}",this.byMonthDay))+this.generateRepeatEndsString()}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 i=this.getNextRepeatStartDate(t);for(;i&&i.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(i);if(e&&e.toDate()<=i.toDate()){this.cache.pop();break}if(i=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),i=me.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(i),i)}getNextStartDate(e,t){const i=new Date(e,t,this.byMonthDay);return i.getDate()===this.byMonthDay?i:this.getNextStartDate(e,t+1)}}class Ae extends $e{constructor(e,t,i,n,r){super(e,t,i,n),this.byWeekDay=this.sortWeekDay(r),this.initCache()}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.getValidCache().filter((i=>this.isSeriesInPeriod(i,t,e)))}generateRepeatString(){const e=this.byWeekDay.map((e=>I.t(ce[e])));return(this.interval>1?I.t("Repeat every {0} weeks on {1}",this.interval,e.join(", ")):I.t("Repeat weekly on {0}",e.join(", ")))+this.generateRepeatEndsString()}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 i=this.getNextRepeatStartDate(t);for(;i&&i[0].toDate()<e.toDate();){const e=this.getNextRepeatStartDate(i);if(e&&e[0]&&e[0].toDate()<=i[0].toDate()){this.cache.pop();break}if(i=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=>me.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((i=>{const n=Ae.weekDay.indexOf(i)-t,{year:r,month:o,date:a}=this.repeatStartDate,s=me.from(new Date(r,o-1,a+n));(!this.until||s.toDate()<=this.until.toDate())&&e.push(s)})),this.cache=[e]}sortWeekDay(e){return e&&e.length?e.map((e=>e.toLocaleLowerCase())).sort(((e,t)=>Ae.weekDay.indexOf(e)-Ae.weekDay.indexOf(t))):[Ae.weekDay[this.getCurrentDayIndex(this.repeatStartDate)]]}getCurrentDayIndex(e){return e.toDate().getDay()}getValidCache(){const e=B(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)}}Ae.weekDay=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>e.toLowerCase()));class Be extends $e{constructor(e,t,i,n){super(e,t,i,n),this.matchDay=this.repeatStartDate.date,this.matchMonth=this.repeatStartDate.month,this.initCache()}generateRepeatString(){const e=I.t(this.repeatStartDate.getMonthName());return(this.interval>1?I.t("Repeat every {0} years on {1} {2}",this.interval,e,this.matchDay):I.t("Repeat yearly on {0} {1}",e,this.matchDay))+this.generateRepeatEndsString()}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 i=this.getNextRepeatStartDate(t);for(;i&&i.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(i);if(e&&e.toDate()<=i.toDate()){this.cache.pop();break}if(i=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year+this.interval),i=me.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(i),i)}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 Ne=new class{getPattern(e,t,i=pe()){const n=me.from(e),{frequency:r,interval:o=1,byWeekDay:a,until:s,count:l}=t,d=this.initDate(s,i);return this.initRepeatPattern(r,n,o<1?1:o,l,d,a)}initDate(e,t){if(e)return me.from(new Date(e),t)}initRepeatPattern(e,t,i,n,r,o){switch(e){case"daily":return new Ve(t,i,n,r);case"weekly":return new Ae(t,i,n,r,o);case"monthly":return new Le(t,i,n,r);default:return new Be(t,i,n,r)}}},Fe=/^\d{1,2}\/\d{1,2}\/\d{4}/,We=/^\d{1,2}:\d{1,2}/;class He{constructor(e,t,i){this._eventSpansDays=1,this.repeatPattern=null,this._event=e,this._eventKey=t||N(),this._timezone=i||pe(),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 i=this._eventSpansDays>1?new Date(t.year,t.month-1,t.date+(this._eventSpansDays-1)):t.toDate();return new He(Object.assign(Object.assign({},this._event),{startDate:t.toDate(),endDate:i,startTime:this.startTime,endTime:this.endTime}),e)}isGroupEvent(){return this._eventSpansDays>1}isCurrentDayEvent(e){const{startDate:t,endDate:i}=this,n=me.from(t),r=me.from(new Date(i.getFullYear(),i.getMonth(),i.getDate()+1)),o=e.toDate();return n.toDate()<=o&&r.toDate()>o}generateRepeatString(){var e;return(null===(e=this.repeatPattern)||void 0===e?void 0:e.generateRepeatString())||""}generateDateTimeString(e,t){const i=I.t(Object.values(ce)[e.toDate().getDay()]),n=he(t,this.startTime),r=he(t,this.endTime);return`${i}, ${e.date} ${e.getMonthName(!0)} ${e.year} ${n} - ${r}`}getEventDuration(){const[e,t]=this.startTime.split(":"),[i,n]=this.endTime.split(":"),r=me.from(new Date,this._timezone),o=new Date(r.year,r.month,r.date,Number(e),Number(t));return(new Date(r.year,r.month,r.date,0===Number(i)&&0!==Number(e)?24:Number(i),Number(n)).valueOf()-o.valueOf())/6e4}getRepeatSeries(e){return this.repeatPattern?this.repeatPattern.getRepeatSeries(e,this._eventSpansDays):[]}updateTimezone(e){this._timezone=e,this.initDate(this._event),this.initEventSpansDays(),this.initRepeatPattern()}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,i]=e.split(":");return`${"12"===t?"00":t}:${i}`}{e=e.replace("pm","").trim();const[t,i]=e.split(":");return`${"12"===t?"12":Number(t)+12}:${i}`}}return e}checkEventRequireField(e){const{title:t,startDate:i,endDate:n,startTime:r,endTime:o}=e;if(i&&"string"==typeof i&&!Fe.test(i)||n&&"string"==typeof n&&!Fe.test(n))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!We.test(r)||o&&"string"==typeof o&&!We.test(o))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!i||!n&&!o)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:i,endDate:n,endTime:r}=e,o=this.processStartDate(t,i||"");this._startTime=this.formatTimeForDisplay(this._startDate,i||""),this.processEndDate(n||"",r||"",o),this._endTime=this.formatTimeForDisplay(this._endDate,r||"")}processStartDate(e,t){let i,n;if(e&&"object"==typeof e)i={year:e.getFullYear(),month:e.getMonth(),date:e.getDate()},n=e;else if(e&&"string"==typeof e){const[t,r,o]=e.split("/");i={year:Number(o),month:Number(t)-1,date:Number(r)},n=new Date(i.year,i.month,i.date)}if(t&&i&&n){const{timeHours:e,timeMinutes:r}=this.getCurrentHourAndMinutes(t);n=new Date(i.year,i.month,i.date,e,r,0)}return n&&(this._startDate=this.convertDateToTimezone(n)),i}processEndDate(e,t,i){let n;if(e&&"object"==typeof e)n=e;else if(e&&"string"==typeof e){const[t,i,r]=e.split("/");n=new Date(Number(r),Number(t)-1,Number(i),23,59,59)}else i&&(n=new Date(i.year,i.month,i.date,23,59,59));if(t&&n){const{timeHours:e,timeMinutes:i}=this.getCurrentHourAndMinutes(t,23,59);n=new Date(n.getFullYear(),n.getMonth(),n.getDate(),e,i,59)}n&&(this._endDate=this.convertDateToTimezone(n))}formatTimeForDisplay(e,t){if(Boolean(t)&&this._timezone===pe()){const i=this.convertTimeTo24Hour(t),[n,r]=i.split(":");return`${e.getHours().toString().padStart(n.length,"0")}:${e.getMinutes().toString().padStart(r.length,"0")}`}return`${e.getHours()}:${e.getMinutes()}`}getCurrentHourAndMinutes(e,t=0,i=0){let n=t,r=i;if(e){const t=this.convertTimeTo24Hour(e).split(":");n=Number(t[0]),r=Number(t[1])}return{timeHours:n,timeMinutes:r}}convertDateToTimezone(e){if(this._timezone&&this._timezone!==pe())try{const t=new Intl.DateTimeFormat([],{timeZone:this._timezone,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(e),i=t.find((e=>"year"===e.type)),n=t.find((e=>"month"===e.type)),r=t.find((e=>"day"===e.type)),o=t.find((e=>"hour"===e.type)),a=t.find((e=>"minute"===e.type)),s=t.find((e=>"second"===e.type));if(i&&n&&r&&o&&a&&s){const e=parseInt(i.value,10),t=parseInt(n.value,10),l=parseInt(r.value,10),d=parseInt(o.value,10),c=parseInt(a.value,10),h=parseInt(s.value,10);return new Date(e,t-1,l,d,c,h)}}catch(e){c.warn("Invalid timezone:",this._timezone)}return e}initRepeatPattern(){this._event.repeatOptions&&this._event.repeatOptions.frequency&&(this.repeatPattern=Ne.getPattern(this._startDate,this._event.repeatOptions,this._timezone))}initEventSpansDays(){const e=me.from(this.startDate),t=me.from(this.endDate);this._eventSpansDays=(t.toDate().valueOf()-e.toDate().valueOf())/864e5+1}}var _e=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Ue extends d{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)}updateAfterTimezoneChange(){this.calendarEvents.length>0&&this.calendarEvents.forEach((e=>e.updateTimezone(this.timezone))),A.notify(b.getSubject(this.host,T),{}),this.repeatEventMap.clear()}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const i=new He(e,void 0,this.timezone);t.push(i)}catch(t){c.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}createRepeatEvents(){const e=[],t=[];return this.calendarEvents.forEach((i=>{i.isRepeatEvent?i.getRepeatSeries(this.currentPeriod).forEach((e=>{t.push(this.generateCalendarEventByRepeatSeries(i,e))})):e.push(i)})),t.concat(e)}generateCalendarEventByRepeatSeries(e,t){const i=`${e.eventKey}-${t.year}${t.month}${t.date}`;if(this.repeatEventMap.has(i))return this.repeatEventMap.get(i);{const n=e.copyTo(i,t);return this.repeatEventMap.set(i,n),n}}}_e([l()],Ue.prototype,"host",void 0),_e([l({writable:!0})],Ue.prototype,"calendarEvents",void 0),_e([l()],Ue.prototype,"currentPeriod",void 0),_e([l()],Ue.prototype,"events",void 0),_e([l()],Ue.prototype,"timezone",void 0),_e([h("watchEventsChange")],Ue.prototype,"updateAfterEventChange",null),_e([h("componentWillLoad")],Ue.prototype,"updateWhenComponentWillLoad",null),_e([h("watchTimezoneChange")],Ue.prototype,"updateAfterTimezoneChange",null);var Ye=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Ze extends d{render(t,i,n,r=!1){return e("vega-calendar-event",{"data-calendar-ref":this.host,key:`${t.eventKey}-${t.startTime}-${t.endTime}`,calendarEvent:t,class:i,onKeyDown:D(),onClick:()=>{this.handleEventClick(t),this.enabledEventPreview&&this.setupPreviewContainer(t,n,r)}},!t.isRepeatEvent&&e("slot",{name:Ce(t.event.key)}))}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}setupPreviewContainer(e,t,i){const n=this.eventPreviewPopoverController.getEventPreviewContainer(e,t,i);if(n){const r=this.renderer.getEventPreviewRef();i?(r.classList.remove("single-event-preview"),r.classList.add("group-event-preview")):(r.classList.remove("group-event-preview"),r.classList.add("single-event-preview")),A.notify(b.getSubject(r,V),{event:e,targetCalendarViewDate:t,timeFormat:this.timeFormat});const o=this.host.querySelector("[slot=event-preview-additional-fields]");o&&r.append(o);const a=Ce(e.event.key),s=this.host.querySelector(`[slot=${a}]`),l=r.querySelector(`[slot=${a}]`);s&&!l&&r.append(s.cloneNode(!0)),n.append(r)}}}Ze.backgroundColorModeEventHeight=18,Ye([l()],Ze.prototype,"host",void 0),Ye([l()],Ze.prototype,"calendarView",void 0),Ye([l()],Ze.prototype,"eventClickEmitter",void 0),Ye([l()],Ze.prototype,"timeFormat",void 0),Ye([l()],Ze.prototype,"enabledEventPreview",void 0),Ye([l()],Ze.prototype,"renderer",void 0),Ye([l()],Ze.prototype,"eventPreviewPopoverController",void 0);var Ke=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class qe extends F{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=W(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e&&e.parentElement){const t=e.parentElement.getBoundingClientRect().height,i=Math.floor((t-qe.monthDateTitleHeight)/Ze.backgroundColorModeEventHeight);A.notify(b.getSubject(this.host,S),{host:this.host,detail:i})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}qe.monthDateTitleHeight=26,Ke([l()],qe.prototype,"host",void 0),Ke([l()],qe.prototype,"monthEventRenderer",void 0),Ke([l()],qe.prototype,"viewMode",void 0),Ke([h("componentDidLoad")],qe.prototype,"updateMaxDisplayCount",null),Ke([h("watchViewModeChange")],qe.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var Xe=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Ge extends d{render(){const t=this.calendarView.dateItems[0],i=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),n=this.fullDayEventLayoutRenderer.sortLongEvents(i),r=this.filterDisplayEvents(n);return e("div",{class:"calendar-view-event-all"},t.map(((t,i)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(r[i],i,n[i],t)))))}renderCurrentFullDayEvents(i,n,r,o){const a=i.length*Ze.backgroundColorModeEventHeight-2,s=r.slice(i.length).filter(Boolean).length;return e(t,null,e("div",{class:"placeholder-block",style:{height:a+"px"}},e("span",null,i.length," events")),this.fullDayEventLayoutRenderer.render(i,n,o),s>0&&this.dayViewFullDayEventMoreButtonRenderer.render(s))}filterDisplayEvents(e){if(this.showAllEventsInDayOrWeekView)return e;{const t=[],i=Ge.maxDisplayEventLength;return e.forEach((e=>{const n=e.length>i?e.slice(0,i):e;t.push(n)})),t}}}Ge.maxDisplayEventLength=2,Xe([l()],Ge.prototype,"calendarView",void 0),Xe([l()],Ge.prototype,"calendarEventController",void 0),Xe([l()],Ge.prototype,"eventItemRenderer",void 0),Xe([l()],Ge.prototype,"fullDayEventLayoutRenderer",void 0),Xe([l()],Ge.prototype,"showAllEventsInDayOrWeekView",void 0),Xe([l()],Ge.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0);var Je=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Qe extends d{render(t,i){const n=[];return t.eventLayoutCells.forEach(((r,o)=>{let a=r.getEventBySlotIndex(0),s=0;for(let l=0;l<Qe.totalNumberOfCells;l++){const d=r.getEventBySlotIndex(l);d!==a&&(a&&n.push(e("div",{key:o,class:"time-event-block",style:this.getTimeEventStyle(s,l,o,t.getEventColumnsSpannedCount(a))},this.eventPreviewPopoverRenderer.render(a,i,{"day-event":!0,"bg-shadow":o>0}))),a=d,s=l)}})),n}getTimeEventStyle(e,t,i,n){const r=i*(1/n);return{position:"absolute",left:100*r+"%",top:100/Qe.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/Qe.totalNumberOfCells*(t-e)+"%",zIndex:i>0?`${i}`:void 0}}}Qe.totalNumberOfCells=96,Je([l()],Qe.prototype,"eventItemRenderer",void 0),Je([l()],Qe.prototype,"eventPreviewPopoverRenderer",void 0);class et{addCurrentEventToLayout(e,t){let i=e.find((e=>!e.hasOverlapEvent(t)));i?i.updateSlots(t):(i=this.createNewLayoutCell(),i.updateSlots(t),e.push(i))}}class tt{get eventLayoutCells(){return this.cells}}class it extends tt{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let i=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&i++})),i}}class nt{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let i=t;if(t>=0)for(let n=t+1;n<this.slots.length;n++){if(this.slots[n]!==e){i=n-1;break}n===this.slots.length-1&&(i=n)}return i}}class rt extends nt{constructor(){super(...arguments),this.slots=rt.defaultSlots}hasOverlapEvent(e){const[t,i]=this.getIndexRangeFromEvent(e);let n=!1;for(let e=t;e<i;e++)if(this.slots[e]){n=!0;break}return n}updateSlots(e){const[t,i]=this.getIndexRangeFromEvent(e);i>t&&(this.slots=this.slots.slice(0,t).concat(Array(i-t).fill(e),this.slots.slice(i)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:i}=e;return[ke(t),ke(i)]}}rt.defaultSlots=Array(96).fill(null);class ot extends et{generate(e){const t=[new rt];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new it(t)}createNewLayoutCell(){return new rt}}class at{sort(e,t,i){const n=[],r=[],o=[];for(let t=0;t<e.length;t++){const i=e[t];i&&(i.isGroupEvent()?r.push(i):i.isAllDayEvent?n.push(i):o.push(i))}let a=n.concat(this.sortCalendarEventByTime(o)),s=i.getEventsByIndex(t);const l=s.filter((e=>e));if(a=r.filter((e=>l.findIndex((t=>t===e))<0)).concat(a),s.length>l.length){const e=a.slice(0,s.length-l.length);a=a.slice(s.length-l.length),s=this.insertEventsToEmptyPosition(s,e)}return a=s.concat(a),a}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const i=ke(e.startTime),n=ke(t.startTime);return i===n?ke(t.endTime)-ke(e.endTime):i-n}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var st=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class lt extends d{constructor(){super(...arguments),this.calendarEventSorter=new at,this.dayViewTimedEventLayoutGenerator=new ot}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())),i=this.calendarEventSorter.sortCalendarEventByTime(t),n=this.dayViewTimedEventLayoutGenerator.generate(i);return this.dayViewEventLayoutRenderer.render(n,e)}}st([l()],lt.prototype,"calendarView",void 0),st([l()],lt.prototype,"calendarEventController",void 0),st([l()],lt.prototype,"dayViewEventLayoutRenderer",void 0);class dt extends tt{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let i=0;return this.cells.forEach(((n,r)=>{const o=n.getEventBySlotIndex(e);t.push(o),o&&(i=r)})),t.slice(0,i+1)}}class ct extends nt{constructor(){super(...arguments),this.slots=ct.defaultSlots}updateSlots(e){const{start:t,end:i}=e;this.slots=this.slots.slice(0,t).concat(Array(i-t+1).fill(e.event),this.slots.slice(i+1))}hasOverlapEvent(e){const{start:t,end:i}=e;let n=!1;for(let e=t;e<i+1;e++)if(this.slots[e]){n=!0;break}return n}}ct.defaultSlots=Array(7).fill(null);class ht extends et{generate(e){const t=this.collectAllShouldOrderLongEvents(e),i=[this.createNewLayoutCell()];return t.forEach((e=>{this.addCurrentEventToLayout(i,e)})),new dt(i)}createNewLayoutCell(){return new ct}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,i)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:i,start:i-t[e.eventKey].end!=1?i:t[e.eventKey].start}):{start:i,end:i,event:e}}))}));const i=Object.values(t);return this.sortLongEventViews(i)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:i,endDate:n}=e.event,{startDate:r,endDate:o}=t.event;i.setHours(0,0,0),r.setHours(0,0,0),n.setHours(23,59,59),o.setHours(23,59,59);const a=o.valueOf()-r.valueOf()-(n.valueOf()-i.valueOf());return i.valueOf()!==r.valueOf()?i.valueOf()-r.valueOf():a}))}}var vt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class pt extends d{constructor(){super(...arguments),this.longEventLayoutGenerator=new ht,this.calendarEventSorter=new at}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,i,n){return t.map(((t,r)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,i,r,"month"===this.viewMode?pt.monthViewEventOffsetTop:0)},this.eventPreviewPopoverRenderer.render(t,n,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,i,n){const r=this.calendarView.weekdays.length,o=t;let a=t+1;const s=i;let l=!0;const d=this.fullDayEventLayout.getEventRowsIndex(e);if(d>=0){const i=this.fullDayEventLayout.eventLayoutCells[d].getEventStartIndex(e),n=this.fullDayEventLayout.eventLayoutCells[d].getEventEndIndex(e);i===t?a=n+1:l=!1}return{position:"absolute",left:100/r*o+"%",top:`${s*Ze.backgroundColorModeEventHeight+n}px`,width:100/r*(a-o)+"%",opacity:l?"1":"0"}}}pt.monthViewEventOffsetTop=26,vt([l()],pt.prototype,"eventItemRenderer",void 0),vt([l()],pt.prototype,"viewMode",void 0),vt([l()],pt.prototype,"calendarView",void 0),vt([l()],pt.prototype,"eventPreviewPopoverRenderer",void 0);var ft=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class wt extends d{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:D(),onClick:this.updateShowAllFlag},`${t} More`)}resetShowAllFlag(){this.showAllEventsInDayOrWeekView=!1}}ft([l({writable:!0})],wt.prototype,"showAllEventsInDayOrWeekView",void 0),ft([h("watchViewModeChange")],wt.prototype,"resetShowAllFlag",null);var ut=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class mt extends d{render(t){const i=t.findIndex((e=>e.isToday(this.timezone)))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!i}},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(this.timezone)}})))))}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;if(this.timezone&&this.timezone!==pe())try{const t=new Intl.DateTimeFormat([],{timeZone:this.timezone,hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(e),i=t.find((e=>"hour"===e.type)),n=t.find((e=>"minute"===e.type));if(void 0!==i&&void 0!==n){return(60*parseInt(i.value,10)+parseInt(n.value,10))/1440*100+"%"}}catch(e){c.warn("Invalid timezone:",this.timezone)}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"),i=t?t.offsetHeight:0,n=Math.max(("number"==typeof e.offsetHeight?e.offsetHeight:0)-i,0)/2,r="number"==typeof e.scrollHeight?e.scrollHeight:0,o=16,a=Number(this.getTimeMarkerPosition().replace("%",""))/100*Math.max(r-o-i,0);if(!isNaN(n)&&a&&a>n)return a-n+o}return 0}}ut([l()],mt.prototype,"viewMode",void 0),ut([l()],mt.prototype,"viewRenderer",void 0),ut([l()],mt.prototype,"timezone",void 0),ut([h("watchViewModeChange")],mt.prototype,"updateTimeLine",null),ut([h("disconnectedCallback")],mt.prototype,"clearTimer",null),ut([h("connectedCallback")],mt.prototype,"updateTimeLineIfComponentAddBack",null),ut([h("componentDidLoad")],mt.prototype,"displayCurrentTimeBlockByDefault",null);var gt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class bt extends d{setPostOperationDate(e){this.postOperationDate=e}setDate(e,t){if(e.current!==this.postOperationDate)if(this.shouldSetCurrentDateToFirstDayOfMonth(e,t)){const t=e.current.toDate();t&&(t.setDate(1),this.setPostOperationDate(me.from(t)))}else this.setPostOperationDate(me.from(e.current.toDate()))}updateAfterTimezoneChange(){this.postOperationDate=me.from(new Date,this.timezone)}shouldSetCurrentDateToFirstDayOfMonth(e,t){return"month"===e.type&&"month"===(null==t?void 0:t.type)&&!e.current.equal(me.from(new Date,this.timezone))}}gt([l({writable:!0})],bt.prototype,"postOperationDate",void 0),gt([l()],bt.prototype,"timezone",void 0),gt([h("watchCurrentPeriodChange")],bt.prototype,"setDate",null),gt([h("watchTimezoneChange")],bt.prototype,"updateAfterTimezoneChange",null);var xt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class yt extends d{constructor(){super(...arguments),this.popoverHideObserver=null}render(e,t,i){return this.enabledEventPreview?this.renderPreviewPopover(e,i,t):this.eventItemRenderer.render(e,i,t)}renderPreviewPopover(t,i,n){return e("vega-popover",{placement:"day"===this.viewMode?"top":"right",alignment:"center",class:{"event-preview-popover":!0,block:!0},padding:"0",size:yt.SINGLE_EVENT_PREVIEW_WIDTH,ref:e=>{this.setPopoverHideObserver(e)}},e("div",{slot:"popover-content",class:"event-preview-popover-content"},this.eventItemRenderer.render(t,i,n)),e("div",{slot:"popover"},e("div",{class:"preview-container",ref:e=>{e?this.eventPreviewPopoverController.setEventPreviewContainerMap(t,n,e):this.eventPreviewPopoverController.deleteEventPreviewContainer(t,n)}})))}setPopoverHideObserver(e){e?(this.popoverHideObserver=new L((()=>!0),(async()=>await e.hide())),A.register(b.getSubject(this.host,T),this.popoverHideObserver)):this.popoverHideObserver&&A.unregister(b.getSubject(this.host,T),this.popoverHideObserver)}}yt.SINGLE_EVENT_PREVIEW_WIDTH=400,xt([l()],yt.prototype,"host",void 0),xt([l()],yt.prototype,"renderer",void 0),xt([l()],yt.prototype,"viewMode",void 0),xt([l()],yt.prototype,"timeFormat",void 0),xt([l()],yt.prototype,"eventItemRenderer",void 0),xt([l()],yt.prototype,"enabledEventPreview",void 0),xt([l()],yt.prototype,"eventPreviewPopoverController",void 0);class kt extends d{constructor(){super(...arguments),this.singleEventPreviewContainerMap=new Map,this.groupEventsPreviewContainerMap=new Map}setEventPreviewContainerMap(e,t,i){(Array.isArray(e)?this.groupEventsPreviewContainerMap:this.singleEventPreviewContainerMap).set(this.generateMapKey(e,t),i)}deleteEventPreviewContainer(e,t){(Array.isArray(e)?this.groupEventsPreviewContainerMap:this.singleEventPreviewContainerMap).delete(this.generateMapKey(e,t))}getEventPreviewContainer(e,t,i){const n=i?this.groupEventsPreviewContainerMap:this.singleEventPreviewContainerMap,r=this.generateMapKey(e,t);if(n.has(r))return n.get(r);{const i=this.getDateString(t),r=Array.from(n.keys()).find((t=>t.includes(e.eventKey)&&t.endsWith(i)));if(r)return n.get(r)}}clearAllPreviewContainers(){this.singleEventPreviewContainerMap.clear(),this.groupEventsPreviewContainerMap.clear()}generateMapKey(e,t){const i=this.getDateString(t);return Array.isArray(e)?e.filter((e=>e)).map((e=>e.eventKey)).join("-")+i:e.eventKey+i}getDateString(e){return`-${e.year}-${e.month}-${e.date}`}}!function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);o>3&&a&&Object.defineProperty(t,i,a)}([h("watchTimezoneChange")],kt.prototype,"clearAllPreviewContainers",null);var Ct=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Rt=class{constructor(e){n(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.vegaDateClick=r(this,"vegaDateClick",7),this.dateClick=r(this,"dateClick",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 G,this.switchPanelRenderer=new Q,this.viewRenderer=new te,this.monthViewRenderer=new oe,this.viewWithTimeRenderer=new se,this.timeLineRenderer=new le,this.timeMarkerRenderer=new mt,this.monthEventRenderer=new Te,this.currentPeriodController=new Pe,this.calendarViewController=new Me,this.postOperationDateController=new bt,this.dayViewFullDayEventRenderer=new Ge,this.eventPreviewPopoverController=new kt,this.dayViewFullDayEventMoreButtonRenderer=new wt,this.dayViewTimedEventRenderer=new lt,this.eventItemRenderer=new Ze,this.dayViewEventLayoutRenderer=new Qe,this.fullDayEventLayoutRenderer=new pt,this.eventPreviewPopoverRenderer=new yt,this.calendarEventController=new Ue,this.eventResponsiveController=new qe,this.changeEventEmitter=z(Rt,m),this.eventClickEmitter=z(Rt,y),this.dateDblClickEmitter=z(Rt,k),this.moreActionClickEmitter=z(Rt,C),this.dateClickEmitter=z(Rt,R),this.changeEventPrevent=new P([m],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=H(Rt,"timeFormat","watchTimeFormat"),this.showEventColorBarNotifySlimmer=H(Rt,"showEventColorBar","watchShowEventColorBar"),this.postOperationDate=this.getInitialPostOperationDate(),this.showAllEventsInDayOrWeekView=!1,this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour",this.isDateDisabled=()=>!1,this.showEventColorBar=!0,this.showSwitchView=!0,this.enableDateClick=!1,this.showWeekends=!0,this.enabledEventPreview=!0,this.timezone=pe()}watchCurrentPeriodChange(e,t){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}watchShowEventColorBar(e){}watchShowWeekendsChange(){}watchTimezoneChange(){}render(){return s(e(o,null,this.renderer.render()),this.host)}getInitialPostOperationDate(){return me.from(new Date,this.timezone)}get host(){return a(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"],showEventColorBar:["watchShowEventColorBar"],showWeekends:["watchShowWeekendsChange"],timezone:["watchTimezoneChange"]}}};Ct([f()],Rt.prototype,"globalSlimmer",void 0),Ct([v()],Rt.prototype,"translationSlimmer",void 0),Ct([v()],Rt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ct([v()],Rt.prototype,"renderer",void 0),Ct([v()],Rt.prototype,"switchPanelRenderer",void 0),Ct([v()],Rt.prototype,"viewRenderer",void 0),Ct([v()],Rt.prototype,"monthViewRenderer",void 0),Ct([v()],Rt.prototype,"viewWithTimeRenderer",void 0),Ct([v()],Rt.prototype,"timeLineRenderer",void 0),Ct([v()],Rt.prototype,"timeMarkerRenderer",void 0),Ct([v()],Rt.prototype,"monthEventRenderer",void 0),Ct([v()],Rt.prototype,"currentPeriodController",void 0),Ct([v()],Rt.prototype,"calendarViewController",void 0),Ct([v()],Rt.prototype,"postOperationDateController",void 0),Ct([v()],Rt.prototype,"dayViewFullDayEventRenderer",void 0),Ct([v()],Rt.prototype,"eventPreviewPopoverController",void 0),Ct([v()],Rt.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0),Ct([v()],Rt.prototype,"dayViewTimedEventRenderer",void 0),Ct([v()],Rt.prototype,"eventItemRenderer",void 0),Ct([v()],Rt.prototype,"dayViewEventLayoutRenderer",void 0),Ct([v()],Rt.prototype,"fullDayEventLayoutRenderer",void 0),Ct([v()],Rt.prototype,"eventPreviewPopoverRenderer",void 0),Ct([v()],Rt.prototype,"calendarEventController",void 0),Ct([v()],Rt.prototype,"eventResponsiveController",void 0),Ct([v()],Rt.prototype,"changeEventEmitter",void 0),Ct([v()],Rt.prototype,"eventClickEmitter",void 0),Ct([v()],Rt.prototype,"dateDblClickEmitter",void 0),Ct([v()],Rt.prototype,"moreActionClickEmitter",void 0),Ct([v()],Rt.prototype,"dateClickEmitter",void 0),Ct([v()],Rt.prototype,"changeEventPrevent",void 0),Ct([v()],Rt.prototype,"timeFormatNotifySlimmer",void 0),Ct([v()],Rt.prototype,"showEventColorBarNotifySlimmer",void 0),Rt.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-top.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.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-left.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.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}.event-preview-popover{height:100%}.event-preview-popover.block{display:block}.event-preview-popover .event-preview-popover-content{height:100%}';var jt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Dt extends d{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:i}=this.calendarEvent,n=t||"primary",r=!this.host.classList.contains("day-event"),o={"slot-container":this.slotMode,"event-container":!0,disabled:i,[n]:!0};if(r)return e("div",{role:"button",tabIndex:0,class:o,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({},o),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!i,"bg-disabled":i}),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:i}=this.calendarEvent;return e("div",{class:"event-title"},`${he(this.timeFormat,t)} ${i}`)}defaultNormalTimedEventContentRender(t){const{startTime:i,endTime:n,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:j.getIconKey("clock-three")}),e("span",null,`${he(this.timeFormat,i)} - ${he(this.timeFormat,n)}`)))}getSlotElement(){if(!this.calendarEvent.isRepeatEvent)return e("slot",null)}injectBackgroundColorStyle(){return e("style",{nonce:Y.nonce},je(this.calendarEvent.color))}}j.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>'}}),jt([l()],Dt.prototype,"host",void 0),jt([l()],Dt.prototype,"timeFormat",void 0),jt([l()],Dt.prototype,"calendarEvent",void 0),jt([l()],Dt.prototype,"slotMode",void 0),jt([l()],Dt.prototype,"showColorBar",void 0);var Et=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class zt extends Z{constructor(){super({parent:()=>this.host["data-calendar-ref"],subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"},{subStateName:"showColorBar",parentStateName:"showEventColorBar"}]})}}Et([l({writable:!0})],zt.prototype,"timeFormat",void 0),Et([l({writable:!0})],zt.prototype,"showColorBar",void 0);class It extends d{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),i=K(t.height),n=K(t.lineHeight),r=Math.max(Math.floor(i/n),1);e.style.maxHeight=r*n+"px"}}}!function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);o>3&&a&&Object.defineProperty(t,i,a)}([l()],It.prototype,"renderer",void 0);var Mt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Ot extends d{findTheCalendarEventSlot(){if(this.calendarEvent){const{event:e}=this.calendarEvent,t=this.getParentCalendarElement();if(t){const i=t.querySelector(`vega-calendar-event-slot[event-key='${e.key}']`);i&&(this.slotMode=!0,this.matchSlotElement=i)}}}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")}}Mt([l()],Ot.prototype,"host",void 0),Mt([l()],Ot.prototype,"calendarEvent",void 0),Mt([l({writable:!0})],Ot.prototype,"slotMode",void 0),Mt([l()],Ot.prototype,"renderer",void 0),Mt([h("componentWillLoad")],Ot.prototype,"findTheCalendarEventSlot",null),Mt([h("componentDidLoad")],Ot.prototype,"appendTheRepeatEventSlotToContainer",null);var Pt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const St=class{constructor(e){n(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new F({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new Dt,this.slotController=new Ot,this.subStateController=new zt,this.titleMaxHeightController=new It,this.timeFormat="24-hour",this.slotMode=!1,this.showColorBar=!0}render(){return U(e("slot",null)),s(e(o,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return a(this)}};Pt([f()],St.prototype,"globalSlimmer",void 0),Pt([v()],St.prototype,"pageResizeObserverSlimmer",void 0),Pt([v()],St.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Pt([v()],St.prototype,"renderer",void 0),Pt([v()],St.prototype,"slotController",void 0),Pt([v()],St.prototype,"subStateController",void 0),Pt([v()],St.prototype,"titleMaxHeightController",void 0),St.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 Tt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class $t extends d{registerEventPreviewUpdateObserver(){w.addUniqueObserverToNode(this.host,V,(e=>{this.previewPayload=e,this.currentEvent=e.event})),w.addUniqueObserverToNode(this.host,$,(()=>{this.currentEvent=null}))}unregisterEventPreviewUpdateObserver(){w.removeUniqueObserverFromNode(this.host,V),w.removeUniqueObserverFromNode(this.host,$)}}Tt([l()],$t.prototype,"host",void 0),Tt([l({writable:!0})],$t.prototype,"currentEvent",void 0),Tt([l({writable:!0})],$t.prototype,"previewPayload",void 0),Tt([h("connectedCallback")],$t.prototype,"registerEventPreviewUpdateObserver",null),Tt([h("disconnectedCallback")],$t.prototype,"unregisterEventPreviewUpdateObserver",null);var Vt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Lt extends d{componentWillLoad(){this.calendarRef=q(this.host,"vega-calendar")}render(){return this.currentEvent&&e("vega-box",{class:"event-preview"},this.injectBackgroundColorStyle(),this.renderActions(),e("vega-box",{class:"preview-content"},e("vega-flex",{gap:"size-16",direction:"col"},this.renderBasicFields(),this.renderDivider(),e("slot",{name:"event-preview-additional-fields"}))))}renderActions(){return e("vega-flex",{justifyContent:"end",class:"preview-actions"},e("vega-button-circle",{icon:j.getIconKey("close"),color:"text-primary",variant:"icon-only",onVegaClick:this.onHidePopover.bind(this)}))}renderBasicFields(){const i=this.currentEvent;return e(t,null,e("vega-flex",{alignItems:"start",gap:"size-16"},this.renderEventTitle()),e("vega-flex",{alignItems:"start",gap:"size-12"},e("vega-icon",{icon:j.getIconKey("clock"),color:"text-secondary"}),e("vega-flex",{direction:"col",gap:"size-4"},e("vega-font",{variant:"font-footnote1-long",color:"text-primary"},i.generateDateTimeString(this.previewPayload.targetCalendarViewDate,this.previewPayload.timeFormat)),i.isRepeatEvent&&e("vega-font",{variant:"font-footnote1-long",color:"text-primary"},i.generateRepeatString()))))}onHidePopover(){this.calendarRef&&A.notify(b.getSubject(this.calendarRef,T),{})}renderEventTitle(){const i=this.currentEvent,n=Ce(i.event.key);return this.host.querySelector(`[slot=${n}]`)?e("slot",{name:n}):e(t,null,e("vega-box",{corners:"rounded-full",class:{"event-bg-color":!0,"event-bg-disabled":i.disabled},flexShrink:0},e("span",{class:{[`event-color-dot-${i.variant}`]:!0}})),e("vega-font",{variant:"font-h5",color:"text-primary"},i.title))}renderDivider(){return this.host.querySelector("[slot=event-preview-additional-fields]")&&e("vega-box",null,e("vega-divider",null))}injectBackgroundColorStyle(){return e("style",{nonce:Y.nonce},je(this.currentEvent.color))}}j.register({close:{icon:'<svg width="17" height="16" viewBox="0 0 17 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_80261_51160)"><path d="M13.9604 1.29376C14.3511 0.903137 14.9854 0.903137 15.3761 1.29376C15.7667 1.68439 15.7667 2.31876 15.3761 2.70939L10.0823 8.00001L15.3729 13.2938C15.7636 13.6844 15.7636 14.3188 15.3729 14.7094C14.9823 15.1 14.3479 15.1 13.9573 14.7094L8.66668 9.41564L3.37293 14.7063C2.98231 15.0969 2.34793 15.0969 1.95731 14.7063C1.56668 14.3156 1.56668 13.6813 1.95731 13.2906L7.25106 8.00001L1.96043 2.70626C1.56981 2.31564 1.56981 1.68439 1.96043 1.29376C2.35106 0.903137 2.98543 0.903137 3.37606 1.29376L8.66668 6.58439L13.9604 1.29376Z" fill="currentColor" fill-opacity="0.95"/></g><defs><clipPath id="clip0_80261_51160"><rect width="14" height="16" fill="currentColor" transform="translate(1.66669)"/></clipPath></defs></svg>'},clock:{icon:'<svg width="17" height="16" viewBox="0 0 17 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_80261_52574)"><path d="M7.91669 3.75C7.91669 3.33437 8.25106 3 8.66669 3C9.08231 3 9.41669 3.33437 9.41669 3.75V7.6L12.0823 9.375C12.4261 9.60625 12.5198 10.0719 12.2636 10.4156C12.0604 10.7594 11.5948 10.8531 11.2511 10.5969L8.25106 8.59688C8.04169 8.48438 7.91669 8.25 7.91669 7.97188V3.75ZM8.66669 0C13.0854 0 16.6667 3.58125 16.6667 8C16.6667 12.4187 13.0854 16 8.66669 16C4.24794 16 0.666687 12.4187 0.666687 8C0.666687 3.58125 4.24794 0 8.66669 0ZM2.16669 8C2.16669 11.5906 5.07606 14.5 8.66669 14.5C12.2573 14.5 15.1667 11.5906 15.1667 8C15.1667 4.40938 12.2573 1.5 8.66669 1.5C5.07606 1.5 2.16669 4.40938 2.16669 8Z" fill="currentColor" fill-opacity="0.64"/></g><defs><clipPath id="clip0_80261_52574"><rect width="16" height="16" fill="currentColor" transform="translate(0.666687)"/></defs></svg>'}}),Vt([l()],Lt.prototype,"host",void 0),Vt([l()],Lt.prototype,"previewPayload",void 0),Vt([l()],Lt.prototype,"currentEvent",void 0),Vt([h("componentWillLoad")],Lt.prototype,"componentWillLoad",null);var At=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Bt=class{constructor(e){n(this,e),this.detailRenderer=new Lt,this.stateController=new $t,this.translationSlimmer=new _,this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(o,null,this.previewPayload&&this.detailRenderer.render()),this.host)}get host(){return a(this)}};At([v()],Bt.prototype,"detailRenderer",void 0),At([v()],Bt.prototype,"stateController",void 0),At([v()],Bt.prototype,"translationSlimmer",void 0),At([f()],Bt.prototype,"globalSlimmer",void 0),At([v()],Bt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Bt.style=":host(.single-event-preview) .event-preview{width:398px;box-sizing:border-box}:host(.single-event-preview) .preview-actions{padding-top:4px;padding-left:4px;padding-right:4px}:host(.single-event-preview) .preview-content{margin-bottom:24px;margin-left:12px;margin-right:12px;padding-left:12px;padding-right:12px}:host(.group-event-preview) .event-preview{width:320px;box-sizing:border-box;height:100%}:host(.group-event-preview) .event-preview{border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));border-right-width:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:1px;border-left-style:solid}:host(.group-event-preview) .preview-actions{padding-top:4px;padding-left:4px;padding-right:4px}:host(.group-event-preview) .preview-content{margin-bottom:16px;margin-left:12px;margin-right:12px;padding-left:4px;padding-right:4px}:host .preview-content{max-height:60vh;overflow-y:auto}:host .event-bg-color{width:12px;height:12px;margin-top:8px;position:relative}:host .event-bg-color.event-bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host .event-bg-color span{display:block;position:absolute;top:0px;left:0px;opacity:0.8}:host .event-bg-color span.event-color-dot-secondary{width:100%;height:100%;background-size:4px 4px;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%)}:host .event-bg-color span.event-color-dot-tertiary{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));opacity:1}";var Nt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Ft=class{constructor(e){n(this,e),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(o,{slot:Ce(this.eventKey)},e("slot",null)),this.host)}get host(){return a(this)}};Nt([f()],Ft.prototype,"globalSlimmer",void 0),Nt([v()],Ft.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ft.style=":host{width:100%;height:100%;position:relative}";export{Rt as vega_calendar,St as vega_calendar_event,Bt as vega_calendar_event_preview,Ft as vega_calendar_event_slot}
@@ -1 +0,0 @@
1
- import{b as e,a as t,V as a,c as s,e as n,f as r,g as c,h as o,i,j as g,k as v,l as u,m as l,n as h,o as p,p as d,q as b,r as m,s as w,t as x,u as f,v as k,w as E,x as y,y as S,z as T,A as j,B as A,C as M,E as I,F as O,G as B,H as C,I as N,J as R,K as $,L as D,M as F,N as G,O as H,P as L,Q as q,R as z,S as J,T as K,U as P,W as Q,X as U,Y as V,Z as W,_ as X,$ as Y}from"./p-447c7590.js";import{L as Z}from"./p-6e1ab235.js";const _=new Map([["vega-accordion",[e]],["vega-app-header-button",[t,a]],["vega-banner",[s,n]],["vega-breadcrumb",[t]],["vega-button",[t]],["vega-button-circle",[t]],["vega-button-group",[t]],["vega-button-link",[t]],["vega-calendar",[r,c,o,i,g]],["vega-carousel",[v]],["vega-checkbox",[r]],["vega-checkbox-group",[r]],["vega-chip",[s,t]],["vega-code-block",[r,u]],["vega-color-picker",[r]],["vega-combo-box",[r,l,h]],["vega-date-picker",[p,r]],["vega-dropdown",[d,b,a,m,l,w,x]],["vega-dropdown-item",[t]],["vega-field-label",[t,f]],["vega-file-uploader",[r,k,u,E,y]],["vega-form",[S,T,j]],["vega-image-uploader",[r,u,A]],["vega-input",[r,M,I,f,O]],["vega-input-credit-card",[r,I,M]],["vega-input-numeric",[r]],["vega-input-passcode",[r,B]],["vega-input-phone-number",[r,C]],["vega-input-range",[r]],["vega-input-select",[r,h,x,N,R]],["vega-item-toggle",[$]],["vega-modal",[D,s]],["vega-left-nav",[F]],["vega-left-nav-group",[G]],["vega-left-nav-link",[H]],["vega-left-nav-section",[L]],["vega-pagination",[r,q]],["vega-popover",[z,J]],["vega-progress-tracker",[K]],["vega-radio",[r,M,I]],["vega-radio-group",[r]],["vega-rich-text-editor",[r,P]],["vega-rich-text-editor-toolbar-button",[t]],["vega-rich-text-image-editor",[r]],["vega-rich-text-link-editor",[r]],["vega-segment-control",[r]],["vega-selection-chip",[r]],["vega-selection-chip-group",[r]],["vega-selection-tile",[r]],["vega-selection-tile-group",[r]],["vega-sidenav",[F]],["vega-sidenav-link",[t]],["vega-signature-capture",[r]],["vega-stepper",[r]],["vega-tab-group",[t]],["vega-table",[r,Q,U,V,W,X,Y]],["vega-table-head-cell",[t]],["vega-table-row",[t,e]],["vega-textarea",[r,I]],["vega-time-picker",[r]],["vega-toggle-switch",[r]]]);class ee{getHostName(){return this.vegaComponentName}getEventName(){return this.eventName}handle(e,t){const a=this.createEventTarget(e);a.style.display="none",e.appendChild(a);const s=this.createEvent(this.eventName);return t&&Object.defineProperty(s,"detail",{configurable:!0,value:t}),a.dispatchEvent(s),a.remove(),s}copyAttributesToTarget(e,t){e&&t&&Array.from(e.attributes).filter((e=>!e.name.startsWith("on"))).forEach((a=>{try{t.setAttribute(a.name,a.value)}catch(t){Z.error(`Delegated strategy copy ${e.tagName} attribute '${a.name}' error.`)}}))}createEvent(e){let t=new Event(e,{bubbles:!0,cancelable:!0});return"click"===e&&(t=new MouseEvent(e,{bubbles:!0,cancelable:!0})),t}}class te extends ee{constructor(){super(...arguments),this.eventName="click",this.vegaComponentName="vega-button"}createEventTarget(e){const t=document.createElement("button");return this.copyAttributesToTarget(e,t),t.type=e.type,t}}class ae extends ee{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-checkbox"}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type="checkbox",t.checked=e.checked,t}}class se extends ee{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-input-select"}createEventTarget(e){const t=document.createElement("select");return this.copyAttributesToTarget(e,t),e.value&&(t.value=e.value.toString()),t}}class ne extends ee{constructor(e){super(),this.vegaComponentName="vega-input",this.eventName=e}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type=e.type,t.value=e.value,t}}class re extends ee{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-radio"}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type="radio",t.checked=e.checked,t}}class ce extends ee{constructor(){super(...arguments),this.vegaComponentName="vega-textarea",this.eventName="change"}createEventTarget(e){const t=document.createElement("textarea");return this.copyAttributesToTarget(e,t),t.value=e.value,t}}const oe=new class{constructor(){this.strategyRegistry=new Map,this.updateStrategyRegistry([new te,new ne("change"),new ne("focus"),new ne("blur"),new se,new ce,new ae,new re])}isSupportDelegated(e,t){let a=!1;const s=e.tagName.toLowerCase();return this.strategyRegistry.get(s)&&this.strategyRegistry.get(s).get(t.getNativeName())&&(a=!0),a}updateRegistryFromEventSemantics(e){let t=[];const{global:a,components:s}=e;if(a&&Array.isArray(a.jqueryDelegatedEvent)&&(t=t.concat(a.jqueryDelegatedEvent)),s)for(const e in s)Array.isArray(s[e].jqueryDelegatedEvent)&&(t=t.concat(s[e].jqueryDelegatedEvent));t.length&&this.updateStrategyRegistry(t)}getStrategy(e,t){const a=e.tagName.toLowerCase();if(this.strategyRegistry&&this.strategyRegistry.get(a))return this.strategyRegistry.get(a).get(t.getNativeName())}updateStrategyRegistry(e){e.forEach((e=>{const t=e.getHostName(),a=e.getEventName();if(this.strategyRegistry.get(t))this.strategyRegistry.get(t).set(a,e);else{const s=new Map;s.set(a,e),this.strategyRegistry.set(t,s)}}))}},ie=new class{constructor(){this.config={},this.defaultEventSemantics={namespace:"vega"}}setSemantics(e){this.config=e,oe.updateRegistryFromEventSemantics(e)}getSemantics(e){return Object.assign({},this.defaultEventSemantics,this.getSemanticsInGlobal(),this.getSemanticsInComponents(e))}getEnabledEventIdsByComponent(e){return _.get(e)}getSemanticsInGlobal(){return this.config.global}getSemanticsInComponents(e){const t=e.tagName.toLocaleLowerCase();return this.config.components&&Object.prototype.hasOwnProperty.call(this.config.components,t)?this.config.components[t]:null}};export{ee as B,ie as i,oe as j}
@@ -1 +0,0 @@
1
- import{h as e,H as t,r as i,c as s,g as o}from"./p-6b2342e0.js";import{R as r}from"./p-280cbcdb.js";import{s as a}from"./p-519a7d55.js";import{P as n,g as l}from"./p-7d9cd9c8.js";import{c as p,V as d,M as c,L as h,I as f}from"./p-6e1ab235.js";import{a as v}from"./p-d9671d27.js";import{R as u}from"./p-47fa359b.js";import{V as g,I as m}from"./p-d849e0f5.js";import{D as x,p as b,q as w,V as y,s as j,t as I,r as R,d as S,f as O,n as z,I as D,J as C}from"./p-447c7590.js";import{j as E,k as L,l as T}from"./p-308aa2e3.js";import{i as V}from"./p-d27ae9ff.js";import{C as k}from"./p-2d0d575f.js";import{F as A}from"./p-a528714c.js";import{c as _}from"./p-86194314.js";import{c as N}from"./p-1ec763ab.js";import{c as P}from"./p-613ddaab.js";import{a as U}from"./p-8c9ea6f4.js";import{F}from"./p-9fb6fbcc.js";import{c as G}from"./p-7b145620.js";import{C as K}from"./p-725f0a2c.js";import{Q as q,U as M}from"./p-b1faebe0.js";import{M as $}from"./p-78a57a17.js";import{T as B}from"./p-52b8f2d2.js";import{T as H}from"./p-d5ff8b7f.js";import{r as W}from"./p-77e64f26.js";import"./p-abd7aeaa.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-5f377954.js";import"./p-f360c9ba.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-4c192985.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-54ae02db.js";import"./p-41c3fcb4.js";import"./p-8edf3513.js";import"./p-822c6092.js";import"./p-02841589.js";import"./p-bf19682d.js";import"./p-a7b5f497.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-39482a1a.js";import"./p-fde50319.js";import"./p-d884c644.js";var J=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class Q extends d{constructor(){super(...arguments),this.renderLabel=()=>this.label&&e("div",{class:"vega-input-select-label"},e("span",null,this.label),this.required&&e("span",{class:"vega-input-select-required"},"*")),this.renderErrorMessage=()=>e("div",{class:"vega-input-select-error-message"}),this.renderHelpMessage=()=>e("div",{class:"vega-input-select-hint"},this.hint)}render(){return e(t,{class:v([this.disabled?"vega-input-select-disabled":"",u.formatCustom(this.size)])},this.renderLabel(),this.dropdownRenderer.render(),this.renderErrorMessage(),this.hint&&this.renderHelpMessage())}}J([p()],Q.prototype,"disabled",void 0),J([p()],Q.prototype,"size",void 0),J([p()],Q.prototype,"hint",void 0),J([p()],Q.prototype,"label",void 0),J([p()],Q.prototype,"required",void 0),J([p({componentFieldName:"vegaInputSelectDropdownRenderer"})],Q.prototype,"dropdownRenderer",void 0);var X=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class Y extends d{constructor(){super(...arguments),this.onDropdownShow=()=>{this.isDropdownShow=!0},this.onDropdownHide=()=>{this.isDropdownShow=!1}}addDropdownObserver(e){x.addUniqueObserverToNode(e,b,(e=>{this.onDropdownShow(),this.showEventEmitter.emit(e.detail)})),x.addUniqueObserverToNode(e,w,(e=>{this.onDropdownHide(),this.hideEventEmitter.emit(e.detail)})),x.addUniqueObserverToNode(e,y,(async e=>{this.vegaInputSelectValueController.setValue(await e.host.getSelection())})),x.addUniqueObserverToNode(e,j,(e=>{this.searchEventEmitter.emit(e.detail)})),x.addUniqueObserverToNode(e,I,(e=>{this.searchTriggerEventEmitter.emit(e.detail)})),x.addUniqueObserverToNode(e,E,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.id===e.itemKey)))).map((e=>({id:e.itemKey,displayName:e.label})));this.sourceController.appendSourceItems(t)})),x.addUniqueObserverToNode(e,R,(async()=>{this.vegaInputSelectValueController.setValue("multiple"===this.selectType?[]:"")}))}}X([p({writable:!0})],Y.prototype,"isDropdownShow",void 0),X([p()],Y.prototype,"vegaSearch",void 0),X([p()],Y.prototype,"searchEventEmitter",void 0),X([p()],Y.prototype,"searchTriggerEventEmitter",void 0),X([p()],Y.prototype,"vegaInputSelectValueController",void 0),X([p()],Y.prototype,"sourceController",void 0),X([p()],Y.prototype,"source",void 0),X([p()],Y.prototype,"showEventEmitter",void 0),X([p()],Y.prototype,"hideEventEmitter",void 0),X([p()],Y.prototype,"selectType",void 0);var Z=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class ee extends d{constructor(){super(...arguments),this.handleValueChange=(e,t)=>{if("multiple"===this.selectType){t=t;const i=(e=e)?e.filter((e=>this.sourceController.getItem(e))):[];V(i,t,!0)?V(i,e,!0)||this.setValue(i):(this.setValue(i),this.changeEventEmitter.emit(i),k.notify(A,{host:this.host,detail:i}))}else if(e!==t){const t=this.sourceController.getItem(e);this.setValue(t?t.id:""),this.changeEventEmitter.emit(this.value),k.notify(A,{host:this.host,detail:this.value})}}}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"single":return null===e||"string"==typeof e;case"multiple":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return h.warn(`Invalid input select value ${e} for ${this.selectType} mode`),!1}}}Z([p({writable:!0})],ee.prototype,"value",void 0),Z([p()],ee.prototype,"selectType",void 0),Z([p()],ee.prototype,"changeEventEmitter",void 0),Z([p()],ee.prototype,"host",void 0),Z([p()],ee.prototype,"sourceController",void 0),Z([c("watchValue")],ee.prototype,"handleValueChange",void 0);var te=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class ie extends d{constructor(){super(...arguments),this.renderContainer=()=>e("div",{role:"button",class:"vega-input-select-container",ref:e=>this.inputSelectContainer=e,tabIndex:0,"aria-disabled":`${this.disabled}`,onKeyDown:_(),onBlur:this.preventBlur,part:"select-container"},this.renderPrefixIcon(),this.renderSelectContainer(),this.renderToggleIcon()),this.renderPrefixIcon=()=>this.vegaInputSelectPrefixIconRenderer.render(),this.renderToggleIcon=()=>e("div",{class:"vega-input-select-toggle-icon",part:"toggle-icon-container"},e("vega-icon",{part:"toggle-icon",icon:U.getIconKey(this.isDropdownShow?"chevron-up":"chevron-down")})),this.renderSelectContainer=()=>e("div",{class:"vega-input-select-select-container"},e("div",{class:"vega-input-select-selected-box"},"multiple"===this.selectType?this.renderMultipleSelected():this.renderSingleSelected())),this.renderMultipleSelected=()=>{if(this.value.length>0){const t=this.selectedLabel(this.value);return e("span",{class:"vega-input-select-selected"},e("vega-text",{overflow:"ellipsis",tooltip:{placement:"bottom"},key:t},t))}return e("div",{class:"vega-input-select-placeholder"},this.translationSlimmer.t(this.placeholder))},this.renderSingleSelected=()=>{const t=this.sourceController.getItem(this.value);return t?e("span",{class:"vega-input-select-selected",part:"selected-box"},e("vega-text",{overflow:"ellipsis",tooltip:{placement:"bottom"},key:t.displayName},t.displayName)):e("div",{class:"vega-input-select-placeholder",part:"placeholder"},this.translationSlimmer.t(this.placeholder))},this.getVegaDropdownProperties=()=>Object.assign({searchable:!0,caseSensitive:!1},this.vegaDropdownProps)}show(){return this.dropdown.show()}hide(){return this.dropdown.hide()}getDropdownRef(){return this.dropdown}getInputSelectContainerRef(){return this.inputSelectContainer}getItemsSlotRef(){return this.itemsSlotRef}render(){return e("vega-dropdown",Object.assign({trigger:"click",source:this.getDropdownSource(),selectType:this.selectType,selectedSourceKey:this.value,matchTargetWidth:!0},this.getVegaDropdownProperties(),{ref:e=>{this.dropdown=e,this.vegaInputSelectDropdownController.addDropdownObserver(e)},isLazyLoading:this.isLazyLoading}),this.renderContainer(),this.renderItemsSlot())}renderItemsSlot(){return this.host.querySelector("[slot=items]")&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}preventBlur(e){e.stopImmediatePropagation()}getDropdownSource(){return this.source.map((e=>({key:e.id,label:e.displayName})))}}U.register({"chevron-up":N,"chevron-down":P}),te([p()],ie.prototype,"value",void 0),te([p()],ie.prototype,"source",void 0),te([p()],ie.prototype,"host",void 0),te([p()],ie.prototype,"selectType",void 0),te([p()],ie.prototype,"isDropdownShow",void 0),te([p()],ie.prototype,"vegaDropdownProps",void 0),te([p()],ie.prototype,"placeholder",void 0),te([p()],ie.prototype,"selectedLabel",void 0),te([p()],ie.prototype,"isLazyLoading",void 0),te([p()],ie.prototype,"vegaInputSelectDropdownController",void 0),te([p()],ie.prototype,"vegaInputSelectPrefixIconRenderer",void 0),te([p()],ie.prototype,"sourceController",void 0),te([p()],ie.prototype,"translationSlimmer",void 0),te([p()],ie.prototype,"disabled",void 0);var se=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class oe extends d{constructor(){super(...arguments),this.hasMore=!0}componentDidLoad(){const e=this.getVirtualScroll();e&&x.addUniqueObserverToNode(e,L,this.onScrollToBottom.bind(this))}getVirtualScroll(){var e,t,i;return null===(i=null===(t=null===(e=this.vegaInputSelectDropdownRenderer.getDropdownRef().shadowRoot)||void 0===e?void 0:e.querySelector("vega-dropdown-content-box"))||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("vega-virtual-scroll")}async onScrollToBottom(e){if(this.sourceLazyLoadCallback&&this.hasMore){this.isLazyLoading=!0;const t=await this.sourceLazyLoadCallback(e.endIndex);this.hasMore=t.hasMore,t.items.length>0&&this.sourceController.appendSourceItems(t.items),this.isLazyLoading=!1}}}se([p()],oe.prototype,"sourceLazyLoadCallback",void 0),se([p({writable:!0})],oe.prototype,"isLazyLoading",void 0),se([p()],oe.prototype,"sourceController",void 0),se([p()],oe.prototype,"vegaInputSelectDropdownRenderer",void 0),se([c("componentDidLoad")],oe.prototype,"componentDidLoad",null);const re=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!1===e.autoValidation},{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>0===e.source.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>e.source.length>0}];var ae=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class ne extends d{constructor(){super(...arguments),this.handleSourceChange=()=>{this.source=q(this.source,M)?this.source:[]}}appendSourceItems(e){this.source=[...this.source,...e]}getItem(e){return this.source.find((t=>t.id===e))}}ae([p({writable:!0})],ne.prototype,"source",void 0),ae([c("watchSource")],ne.prototype,"handleSourceChange",void 0);var le=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class pe extends d{constructor(){super(...arguments),this.mutationObserver=new $({mutationFilter:B("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){const e=this.host.querySelector("[slot=items]"),t=this.vegaInputSelectDropdownRenderer.getItemsSlotRef();e&&t&&(t.remove(),this.vegaInputSelectDropdownRenderer.getDropdownRef().append(e))}}le([f()],pe.prototype,"mutationObserver",void 0),le([p()],pe.prototype,"host",void 0),le([p()],pe.prototype,"vegaInputSelectDropdownRenderer",void 0),le([c("componentDidLoad")],pe.prototype,"componentDidLoad",null);var de=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class ce extends d{connectedCallback(){this.remotePhoneNumberPrefixIconRenderSubject=S.getSubjectFromParentNodeByEventId(this.host,T)}callRemotePrefixIconRender(...e){if(this.remotePhoneNumberPrefixIconRenderSubject){const t=W.call(this.remotePhoneNumberPrefixIconRenderSubject,...e);if(t)return t}return null}render(){const t=this.callRemotePrefixIconRender(this.prefixIcon);return this.prefixIcon&&e("div",{class:"vega-input-select-prefix-icon"},t||e("vega-icon",{icon:this.prefixIcon,size:"size-16"}))}}de([p()],ce.prototype,"host",void 0),de([p()],ce.prototype,"prefixIcon",void 0),de([c("connectedCallback")],ce.prototype,"connectedCallback",null);var he=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const fe=class{constructor(e){i(this,e),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaSearch=s(this,"vegaSearch",7),this.search=s(this,"search",7),this.vegaSearchTrigger=s(this,"vegaSearchTrigger",7),this.searchTrigger=s(this,"searchTrigger",7),this.vegaShow=s(this,"vegaShow",7),this.vegaHide=s(this,"vegaHide",7),this.globalSlimmers={},this.translationSlimmer=new H,this.sourceController=new ne,this.vegaInputSelectRenderer=new Q,this.vegaInputSelectPrefixIconRenderer=new ce,this.vegaInputSelectDropdownController=new Y,this.vegaInputSelectValueController=new ee,this.vegaInputSelectDropdownRenderer=new ie,this.vegaInputSelectItemsSlotController=new pe,this.formFieldControllerSlimmer=new F({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new r:null}],validationRulesName:"validationRules",defaultValue:e=>"multiple"===e.selectType?[]:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaInputSelectDropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.vegaInputSelectDropdownRenderer.getInputSelectContainerRef()]}),this.pageResizeObserverSlimmer=new n,this.lazyLoadController=new oe,this.changeEventEmitter=G(fe,O),this.searchEventEmitter=G(fe,z),this.searchTriggerEventEmitter=G(fe,I),this.showEventEmitter=G(fe,D),this.hideEventEmitter=G(fe,C),this.eventPrevent=new K([z,I,D,C],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new g(re),this.isDropdownShow=!1,this.currentBreakpoint=l(),this.isLazyLoading=!1,this.label="",this.required=!1,this.selectedLabel=e=>`${e.length} Selected`,this.selectType="single",this.source=[],this.value="multiple"===this.selectType?[]:"",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="Please select",this.vegaDropdownProps={},this.size="default"}watchSource(){}watchValue(e,t){}watchValidationRules(){}componentWillLoad(){}async doClose(){await this.vegaInputSelectDropdownRenderer.hide()}async doOpen(){await this.vegaInputSelectDropdownRenderer.show()}async doChange(e){this.vegaInputSelectValueController.setValue(e)}render(){return a(this.vegaInputSelectRenderer.render(),this.host)}get host(){return o(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"]}}};he([m()],fe.prototype,"globalSlimmers",void 0),he([f()],fe.prototype,"translationSlimmer",void 0),he([f()],fe.prototype,"sourceController",void 0),he([f()],fe.prototype,"vegaInputSelectRenderer",void 0),he([f()],fe.prototype,"vegaInputSelectPrefixIconRenderer",void 0),he([f()],fe.prototype,"vegaInputSelectDropdownController",void 0),he([f()],fe.prototype,"vegaInputSelectValueController",void 0),he([f()],fe.prototype,"vegaInputSelectDropdownRenderer",void 0),he([f()],fe.prototype,"vegaInputSelectItemsSlotController",void 0),he([f()],fe.prototype,"formFieldControllerSlimmer",void 0),he([f()],fe.prototype,"pageResizeObserverSlimmer",void 0),he([f()],fe.prototype,"lazyLoadController",void 0),he([f()],fe.prototype,"changeEventEmitter",void 0),he([f()],fe.prototype,"searchEventEmitter",void 0),he([f()],fe.prototype,"searchTriggerEventEmitter",void 0),he([f()],fe.prototype,"showEventEmitter",void 0),he([f()],fe.prototype,"hideEventEmitter",void 0),he([f()],fe.prototype,"eventPrevent",void 0),he([f()],fe.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),fe.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}:host(.default) .vega-input-select-container{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px}:host(.small) .vega-input-select-container{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px}:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));padding-bottom:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-input-select-label .vega-input-select-required{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}:host .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:8px;gap:8px;display:block;display:flex;align-items:center;cursor:pointer}:host .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}:host .error .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .error .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .error .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}:host(.vega-input-select-disabled) .vega-input-select-label{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}:host(.vega-input-select-disabled) vega-dropdown{pointer-events:none}:host(.vega-input-select-disabled) .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-input-select-disabled) .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-input-select-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-input-select-select-container{flex-grow:1;min-width:0px}:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));display:block;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-selected{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){:host .vega-input-select-selected{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){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.vega-input-select-disabled) .vega-input-select-selected{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-placeholder{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){:host .vega-input-select-placeholder{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){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-input-select-prefix-icon{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}:host .vega-input-select-toggle-icon{width:16px;height:16px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-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){:host .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){:host .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){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-input-select-hint{padding-left:8px;padding-right:8px;padding-top:12px;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){:host .vega-input-select-hint{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){:host .vega-input-select-hint{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){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host vega-dropdown{display:block}';export{fe as vega_input_select}
@@ -1 +0,0 @@
1
- import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-447c7590.js";import{b as n,c as s}from"./p-308aa2e3.js";import{c as r}from"./p-02841589.js";import{L as i}from"./p-6e1ab235.js";import{i as o}from"./p-b1faebe0.js";import{g as a}from"./p-a4670e23.js";import{V as c}from"./p-4c192985.js";import{c as l}from"./p-bf19682d.js";import{f as h}from"./p-d9671d27.js";var u,d;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(u||(u={}));class p{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT",t.LIST="LIST",t.INTERNAL_WRAPPER="INTERNAL_WRAPPER"}(d||(d={}));class f extends p{}const T=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap,this.contentEntityToRootDom=new Map,this.rootDomToContentEntity=new WeakMap}register(t,e){this.isVegaRTEContent(e)?this.registerRootDomAndContentEntity(t,e):(this.domToEntity.set(t,e),this.entityToDOM.set(e,t))}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.isVegaRTEContent(t)?this.contentEntityToRootDom.get(t):this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}registerRootDomAndContentEntity(t,e){const n=this.rootDomToContentEntity.get(t);n&&n!==e&&this.contentEntityToRootDom.delete(n),this.rootDomToContentEntity.set(t,e),this.contentEntityToRootDom.set(e,t)}isVegaRTEContent(t){return t&&"VegaRTEContent"===t.constructor.name}};var E,x,g,m;!function(t){t.DELETE_CHILDREN="DELETE_CHILDREN",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILDREN="APPEND_CHILDREN",t.INSERT_CHILDREN_AFTER="INSERT_CHILDREN_AFTER",t.INSERT_CHILDREN_BEFORE="INSERT_CHILDREN_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.INSERT_NEW_PARAGRAPH="INSERT_NEW_PARAGRAPH",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK",t.UNLINK_LINK_GROUP="UNLINK_LINK_GROUP",t.LINK_GROUP_NODE_SPLIT="LINK_GROUP_NODE_SPLIT",t.DELETE_LINK_GROUP="DELETE_LINK_GROUP",t.UPDATE_CURSOR_POSITION="UPDATE_CURSOR_POSITION",t.INSERT_TEXT_TO_DECORATOR_NODE="INSERT_TEXT_TO_DECORATOR_NODE",t.INSERT_NODE_TO_NEAREST_ROOT="INSERT_NODE_TO_NEAREST_ROOT"}(E||(E={}));class w{constructor(){this.isFlushable=!1}}class A extends p{constructor(t){super(),this.type=u.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}clone(){const t=new A("");return this.linkGroups.forEach(((e,n)=>{t.linkGroups.set(n,e.map((t=>t.clone(t.parent))))})),t}toString(t,e){const n=this.toJsx(t,e);return Object.entries(n).map((([t,e])=>{const n="string"==typeof e?e:this.formatStyleToString(e);return`${r(t)}="${n}"`})).join(" ")}toJsx(t,e){const n=this.getStyle(t,e),s=this.getClass(t,e),r=this.getAttribute(t);return s.length>0&&(r.class=s.join(" ")),n&&Object.keys(n).length>0&&(r.style=n),r}getClass(t,e){const n=[];return t.link.customClass&&n.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&n.push("v-rte--link"),n}getStyle(t,e){const n={};return t.link.customStyle&&Object.assign(n,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&(n.color="rgba(var(--v-text-link, 19, 98, 226, 1))"),n}getAttribute(t){const{href:e,customAttribute:n={}}=t.link,s=t.useInternalStyle,r=n.target||(s?"_blank":"");return Object.assign(Object.assign(Object.assign({},n),e||s?{href:e}:{}),r?{target:r}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${r(t)}: ${e};`)).join(" ")}}class N extends f{constructor(t){super(),this.type=d.ALIGNMENT,this.textAlign=t}static from(t){return[d.ALIGNMENT,new N(t)]}toJSON(){return{textAlign:this.textAlign}}renderClass(t){if(null==t?void 0:t.standalone)return null;switch(this.textAlign){case"right":case"center":case"justify":return`v-rte--horizontal-alignment-${this.textAlign}`;case"left":default:return"v-rte--horizontal-alignment-left"}}clone(){return new N(this.textAlign)}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;switch(this.textAlign){case"right":case"center":case"justify":return{textAlign:this.textAlign};case"left":default:return{textAlign:"left"}}}}class y extends f{constructor(t){super(),this.type=d.INDENT,this.indent=Math.max(0,t)}static from(t){return[d.INDENT,new y(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new y(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class R{static register(t,e,n){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,n)}static get(t,e){const n=this.registry.get(e);if(n)return n.get(t)}static executeTheStrategy(t,e){const n=t instanceof w?t.type:t.constructor.name,s=R.get(n,e.constructor.name);if(s)return s.execute(t,e);i.error(`Type ${n} action handle strategy is not registered in class ${e.constructor.name}`)}static canHandle(t,e){return!!R.get(t,e.constructor.name)}}R.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(x||(x={}));class O extends p{}class S extends O{constructor(t){super(),this.type=x.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[x.CUSTOM_ATTRIBUTE,new S(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new S(this.customAttribute)}toString(t=[]){const e=t.map((t=>t.split("=")[0]));return Object.keys(this.customAttribute).map((t=>e.includes(t)?null:`${t}="${this.customAttribute[t]}"`)).filter(o)}render(t={}){var e;const n=Object.assign({},this.customAttribute);return null===(e=t.filterAttributes)||void 0===e||e.forEach((t=>delete n[t])),Object.keys(n).forEach((t=>{this.BOOLEAN_ATTRS.has(t)&&""===n[t]&&(n[t]="true")})),n}}class C extends O{constructor(t){super(),this.type=x.CUSTOM_CLASS,this.customClass=t}static from(t){return[x.CUSTOM_CLASS,new C(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new C(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class B extends O{constructor(t){super(),this.type=x.CUSTOM_STYLE,this.customStyle=t}static from(t){return[x.CUSTOM_STYLE,new B(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new B(this.customStyle)}renderStyle(){return this.customStyle}removeStyles(t){const e=Object.assign({},this.customStyle);return t.forEach((t=>delete e[t])),e}toString(){return`style="${Object.entries(this.customStyle).map((([t,e])=>`${t}: ${e};`)).join(" ")}"`}}class k extends f{constructor(t){super(),this.type=d.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[d.INTERNAL_WRAPPER,new k(t)]}clone(){return new k(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class RTEBlock{constructor(t){this.annotationMap=new Map,this.id=t}static from(t,e){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return N.from(e);case"indent":return y.from(e);case"customAttribute":return S.from(e);case"customClass":return C.from(e);case"customStyle":return B.from(e);case"internalWrapper":return k.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,n])=>{const s=this.createAnnotationEntity(e,n);o(s)&&t.set(...s)}))}shouldRenderAsInternalWrapper(){const t=this.getAnnotationByType(d.INTERNAL_WRAPPER);return!!t&&t.internalWrapper&&0===Array.from(this.annotationMap.values()).filter((t=>!(t instanceof A||t instanceof k))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof O)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(s){if(this.doApply(s),s.isFlushable){const s=T.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){return Object.assign(Object.assign({},Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof B)).map((e=>e.renderStyle(t))).filter(o).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof C)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(x.CUSTOM_ATTRIBUTE)}generateAttributeString(...t){var e;const n=Object.entries(Object.assign({},this.getStyles({standalone:!0}))).map((([t,e])=>`${r(t)}: ${e};`)).join(""),s=this.annotationMap.get(x.CUSTOM_CLASS),i=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==s?void 0:s.toString(),n?`style="${n}"`:null,...t].filter(o);return i.length?` ${i.join(" ")}`:""}doApply(t){t instanceof w?R.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();e instanceof A||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply&&this.doAnnotationActionApply(t)}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}!function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK",t.INLINE_HTML="INLINE_HTML",t.PLAIN_TEXT="PLAIN_TEXT"}(g||(g={}));class v extends p{}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(m||(m={}));class RTENode{constructor(t,e){this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}static from(t,e,n){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}, ${n}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return S.from(e);case"customClass":return C.from(e);case"customStyle":return B.from(e)}}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}getStyles(t={standalone:!1}){const e=Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof B)).map((e=>e.renderStyle(t))).filter(Boolean);return this.mergeAnnotationStyles(e,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof C)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(x.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return T.getDOMByEntity(this)}generateAttributeString(...t){var e;const n=Object.entries(Object.assign({},this.getStyles({standalone:!0}))).map((([t,e])=>`${r(t)}: ${e};`)).join(""),s=this.annotationMap.get(x.CUSTOM_CLASS),i=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==s?void 0:s.toString(),n?`style="${n}"`:null,...t].filter(o);return i.length?` ${i.join(" ")}`:""}doApply(t){t instanceof w?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const s=T.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}doAnnotationActionApply(t){}doModifyActionApply(t){}mergeAnnotationStyles(t,e){const n={};for(const s of t)for(const t in s){const r=s[t],i=n[t];n[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return n}}class b{}class _ extends b{constructor(){super(...arguments),this.doSplit=!0}}class L extends p{constructor(t){super(),this.type=u.SELECTION_RANGE,this.range=t}clone(){return new L(this.range)}}class I extends v{constructor(t){super(),this.type=g.STRIKETHROUGH,this.strikethrough=t}static from(t){return[g.STRIKETHROUGH,new I(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new I(this.strikethrough)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.strikethrough?"v-rte--strikethrough":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.strikethrough?{textDecoration:"line-through"}:null}}class D extends v{constructor(t){super(),this.type=g.UNDERLINE,this.underline=t}static from(t){return[g.UNDERLINE,new D(t)]}toJSON(){return{underline:this.underline}}clone(){return new D(this.underline)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.underline?"v-rte--underline":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.underline?{textDecoration:"underline"}:null}}class $ extends v{constructor(t){super(),this.type=g.ITALIC,this.italic=t}static from(t){return[g.ITALIC,new $(t)]}toJSON(){return{italic:this.italic}}clone(){return new $(this.italic)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.italic?"v-rte--italic":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.italic?{fontStyle:"italic"}:null}}class M extends v{constructor(t){super(),this.type=g.BOLD,this.bold=t}static from(t){return[g.BOLD,new M(t)]}toJSON(){return{bold:this.bold}}clone(){return new M(this.bold)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.bold?"v-rte--bold":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.bold?{fontWeight:"700"}:null}}class j extends v{constructor(t,e=!0){super(),this.type=g.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[g.CODE,new j(t,e)]}toJSON(){return{code:this.code}}clone(){return new j(this.code,this.useInternalStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.code&&this.useInternalStyle?"v-rte--code":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.code&&this.useInternalStyle?{fontFamily:"Roboto Mono",whiteSpace:"pre-wrap"}:null}}const P={key:"black",light:"#111128",dark:"#E3E3E8"},F=[P,{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],H="​",W=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]];class K extends v{constructor(t){super(),this.type=g.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[g.TEXT_COLOR,new K(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new K(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:c.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return F.find((e=>e.key===t))||F[0]}}class J extends v{constructor(t,e=!0){super(),this.type=g.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[g.LINK,new J(t,e)]}toJSON(){return{link:this.link}}clone(){return new J(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class U extends b{constructor(t,e,n){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=n}toAnnotation(){return new A(this.groupKey)}}class G extends b{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}const z=new class{constructor(){this.RTE_BLOCK_DTO_CLASS_MAP=new Map,this.RTE_NODE_DTO_CLASS_MAP=new Map}registerRTEDTOClass(t,e){if(e.prototype instanceof RTEBlock)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof RTENode))throw new Error(`Invalid RTE DTO class type: ${t}`);this.RTE_NODE_DTO_CLASS_MAP.set(t,e)}}getRTEBlockClass(t){return this.RTE_BLOCK_DTO_CLASS_MAP.get(t)}getRTENodeClass(t){return this.RTE_NODE_DTO_CLASS_MAP.get(t)}};class X{execute(t,e){return i.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}updateCustomStyleAnnotation(t,e){const n=t.annotationMap.get(x.CUSTOM_STYLE);n&&this.isCustomStyle(n,e)&&t.annotationMap.set(n.type,new B(n.removeStyles(e)))}createNewParagraph(t){const e=z.getRTEBlockClass("paragraph");if(e)return e.from({id:a(),type:"paragraph",nodes:[{id:a(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.constructor.name?e:this.getRootContent(e)}isCaretPositionAtBlockStart(t,e,n){return e===t.children[0]&&0===n}isCaretPositionAtBlockEnd(t,e,n){return e.isContentEditable()?this.isCaretPositionAtTextBlockEnd(t,e,n):this.isCaretPositionAtDecoratorBlockEnd(t,e,n)}isCaretPositionAtTextBlockEnd(t,e,n){const s=t.children[t.children.length-1];return e===s&&(e.isEmpty()||n===s.text.length)}isCaretPositionAtDecoratorBlockEnd(t,e,n){return e===t.children[t.children.length-1]&&0!==n}isCustomStyle(t,e){return e.some((e=>Object.keys(t.customStyle).includes(e)))}}class V extends w{constructor(t){super(),this.type=E.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class q extends X{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const n=e.getAnnotationByType(u.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof _&&t.doSplit&&n){const{startContainer:t,endContainer:s,startOffset:r,endOffset:i}=n.range,o=t===s&&r===i;e.parent.children=e.parent.children.flatMap((t=>{if(t.id===e.id){if(o)return this.insertNewNode(r,e);if(this.shouldSplitSelection(n.range)&&e.isContentEditable()){const s=this.splitTextNode(n.range,e);return t.annotationMap.has("LINK")&&t.apply(new V(s)),s}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const n=e.cloneWithText("");this.setApplyTargetNode(n);const s=e.parent.children.findIndex((t=>t===e));return 0===t||!e.isContentEditable()&&t===s?[n,e]:t===e.text.length||!e.isContentEditable()&&t===s+1?[e,n]:[e.cloneWithText(e.text.substring(0,t)),n,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:n,startOffset:s,endOffset:r}=t;return e!==n||s>0||r<(n.textContent?n.textContent.length:0)}splitTextNode(t,e){const{startContainer:n,endContainer:s,startOffset:r}=t,i=n.parentElement,o=s.parentElement,a=(t,n,s)=>{const r=t.substring(0,n),i=t.substring(n,s),o=t.substring(s);return[e.cloneWithText(r),e.cloneWithText(i),e.cloneWithText(o)]},c=i&&T.getEntityByDOM(i),l=o&&T.getEntityByDOM(o);if(c&&c.id===e.id){const i=n===s?t.endOffset:e.text.length,[o,c,l]=a(e.text,r,i);return this.setApplyTargetNode(c),[o,c,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[n,s,r]=a(e.text,0,t.endOffset);return this.setApplyTargetNode(s),[n,s,r].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}class Y extends _{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new M(this.bold)}}class Q extends p{constructor(){super(...arguments),this.type=u.CLEAR_FORMATTING,this.items=[g.BOLD,g.ITALIC,g.UNDERLINE,g.STRIKETHROUGH,g.TEXT_COLOR,g.CODE,x.CUSTOM_STYLE]}}class Z extends _{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Q}}class tt extends _{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new j(this.code)}}class et extends b{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class nt extends _{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new $(this.italic)}}class st extends _{constructor({link:t,newText:e,needMergeNode:n,doSplit:s,type:r}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=n,this.newText=e,this.type=r,o(s)&&(this.doSplit=s)}toAnnotation(){return new J(this.link)}}class rt extends _{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new I(this.strikethrough)}}class it extends _{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new D(this.underline)}}class ot extends X{handleAction(t,e){const n=t.toAnnotation();if(t instanceof et)e.annotationMap.delete(t.annotationType);else{if(!(n instanceof Q))return n instanceof v||n instanceof L?(t instanceof st&&(o(t.newText)&&(e.text=t.newText),e.parent.apply(new U(t.link.groupKey,[e],t.type))),t instanceof tt&&this.handleAction(new Z,e),t instanceof Y&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof nt&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof it||t instanceof rt)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(n.type,n)):void 0;n.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class at extends w{constructor(){super(...arguments),this.type=E.DELETE_LINK_GROUP}}class ct extends X{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new at)}}class lt extends w{constructor(t){super(),this.type=E.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class ht extends X{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,n){if(e&&e.startContainer&&e.endContainer){const{startContainer:s,endContainer:r,startOffset:i,endOffset:o}=e;let a=n.text;if(s===r&&i===o&&t)a=n.text.slice(0,i)+t+n.text.slice(i);else{const e=s.parentElement,c=r.parentElement,l=e&&T.getEntityByDOM(e),h=c&&T.getEntityByDOM(c);let u=0,d=n.text.length;l&&l===n?(u=i,d=s===r?o:d):h&&h===n&&(d=o),a=n.text.slice(0,u)+t+n.text.slice(d)}n.apply(new lt(a))}}}class ut extends p{constructor(t){super(),this.type=g.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:n,customStyle:s,customClass:r,customAttribute:i}=t,o=new ut(e);return o.child=n?ut.from(n)[1]:void 0,o.customAttribute=i?S.from(i)[1]:void 0,o.customClass=r?C.from(r)[1]:void 0,o.customStyle=s?B.from(s)[1]:void 0,[g.INLINE_HTML,o]}clone(){var t,e,n,s;const r=new ut(this.htmlTag);return r.child=null===(t=this.child)||void 0===t?void 0:t.clone(),r.customAttribute=null===(e=this.customAttribute)||void 0===e?void 0:e.clone(),r.customClass=null===(n=this.customClass)||void 0===n?void 0:n.clone(),r.customStyle=null===(s=this.customStyle)||void 0===s?void 0:s.clone(),r}toJSON(){var t,e,n,s;return{inlineHtml:l({htmlTag:this.htmlTag,child:null===(t=this.child)||void 0===t?void 0:t.toJSON().inlineHtml,customAttribute:null===(e=this.customAttribute)||void 0===e?void 0:e.toJSON().customAttribute,customClass:null===(n=this.customClass)||void 0===n?void 0:n.toJSON().customClass,customStyle:null===(s=this.customStyle)||void 0===s?void 0:s.toJSON().customStyle})}}}class dt extends X{handleAction(t,e){const n=e.parent.getAnnotationByType(u.LINK_GROUP);if(n){const s=e.annotationMap.get("LINK").link.groupKey,r=n.linkGroups.get(s);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),n.linkGroups.set(s,r))}}}}class pt extends X{handleAction(t,e){const n=e.parent.getAnnotationByType(u.LINK_GROUP);if(n){const t=e.annotationMap.get(g.LINK).link.groupKey,s=n.linkGroups.get(t);if(s){const r=s.indexOf(e);-1!==r&&s.splice(r,1),0===s.length&&n.linkGroups.delete(t),0===n.linkGroups.size&&e.parent.annotationMap.delete(u.LINK_GROUP)}}e.annotationMap.delete(g.LINK)}}class ft extends v{constructor(t){super(),this.type=g.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[g.PLAIN_TEXT,new ft(t)]}clone(){return new ft(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return{plainText:this.plainText}}}class RTETextNode extends RTENode{constructor(t,e,n,s){super(t,s),this.type=m.TEXT,this.parent=n,this.text=e,this.registerModifyStrategy()}static supportsHtmlTag(t){return["span","code"].includes(t)}static from(t,e,n={autoMatchFormat:!0}){const s=new RTETextNode(t.id,t.text,e),{annotations:r}=t;return r&&(s.annotationMap=this.generateTextAnnotationMap(r,n,e,s)),s}static generateTextAnnotationMap(t,e,n,s){return new Map(Object.keys(t).map((r=>("link"===r&&t.link&&n&&s&&n.apply(new U(t.link.groupKey,[s],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(o))}static createAnnotationEntity(t,e,n){const s=!(!n||!n.autoMatchFormat);switch(t){case"bold":return M.from(e);case"italic":return $.from(e);case"underline":return D.from(e);case"strikethrough":return I.from(e);case"code":return j.from(e,s);case"textColor":return K.from(e);case"link":return J.from(e,s);case"inlineHtml":return ut.from(e);case"plainText":return ft.from(e)}return RTENode.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof O||t instanceof ut)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}toHtml(){const t=this.getAnnotationByType(g.INLINE_HTML);return t?this.renderWithWrapperStr(t):this.renderTextStr()}cloneWithText(t){return new RTETextNode(a(),t,this.parent,super.cloneAnnotations())}clone(t){return new RTETextNode(this.id,this.text,t,super.cloneAnnotations())}isEmpty(){return!this.text||"​"===this.text||"\n"===this.text}isTextNode(){return!0}getRangeEndOffset(){return!this.isContentEditable()&&this.parent?this.parent.children.indexOf(this)+1:"\n"===this.text?0:this.text.length}getRangeContainer(){const t=this.getElementRef();if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}registerModifyStrategy(){const t=this.constructor.name;RTETextNode.registerActionStrategyStatus[t]||(this.isContentEditable()&&(R.register(E.UPDATE_TEXT,t,new ct),R.register(E.REPLACE_SELECTED_TEXT,t,new ht),R.register(E.LINK_GROUP_NODE_SPLIT,t,new dt),R.register(st.name,t,new ot)),R.register(_.name,t,new q),R.register(E.DELETE_LINK_GROUP,t,new pt),R.register(b.name,t,new ot),RTETextNode.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(u.SELECTION_RANGE);if(t instanceof _&&t.doSplit&&e){const e=R.get(_.name,this.constructor.name);if(e){const n=e.execute(t,this);n&&this.applyActionToNode(n,t)}}else this.applyActionToNode(this,t);"function"==typeof this.parent.mergeNodes&&this.parent.mergeNodes(t)}doModifyActionApply(t){R.executeTheStrategy(t,this)}applyActionToNode(t,e){const n=e.toAnnotation();if(e instanceof G)return void this.syncUpSelectedNodes(t);n instanceof L||this.syncUpSelectedNodes(t);const s=R.get(e.constructor.name,t.constructor.name);if(s)return void s.execute(e,t);const r=R.get(b.name,RTETextNode.name);r&&r.execute(e,t)}syncUpSelectedNodes(n){const r=this.getElementRef();if(r){const i=e.getSubjectFromParentNodeByEventId(r,s);i&&t.notify(i,{node:n})}}renderWithWrapperStr(t){const{htmlTag:e,customAttribute:n,customClass:s,customStyle:r,child:i}=t,a=[...(null==n?void 0:n.toString())||[],null==s?void 0:s.toString(),null==r?void 0:r.toString()].filter(o),c=a.length>0?` ${a.join(" ")}`:"";return i?`<${e}${c}>${this.renderWithWrapperStr(i)}</${e}>`:`<${e}${c}>${this.renderTextStr()}</${e}>`}renderTextStr(){var t;const e=(null===(t=this.getAnnotationByType(g.CODE))||void 0===t?void 0:t.code)?"code":"span",n=super.generateAttributeString();return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${e}${n}>${this.text}</${e}>`}shouldRenderAsPlainText(){const t=super.getAnnotationByType(g.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof v&&!(t instanceof J)&&!(t instanceof ft)||t instanceof O)).length}}RTETextNode.registerActionStrategyStatus={},RTETextNode.htmlTag="span";class Tt extends w{constructor(t){super(),this.type=E.APPEND_CHILDREN,this.entityToBeAppended=t}}class Et extends f{constructor(t){super(),this.type=d.TEXT_STYLE,this.textStyle=t}static from(t){return[d.TEXT_STYLE,new Et(t)]}toJSON(){return{textStyle:this.textStyle}}clone(){return new Et(this.textStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.textStyle?`v-rte--text-style-${this.textStyle}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};switch(this.textStyle){case"paragraph":return e;case"title":return{fontFamily:"Inter",fontSize:"36px",lineHeight:"40px",fontWeight:"500"};case"subtitle":return{fontFamily:"Inter",fontSize:"28px",lineHeight:"32px",fontWeight:"500"};case"heading-1":return{fontFamily:"Inter",fontSize:"22px",lineHeight:"24px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-2":return{fontFamily:"Inter",fontSize:"20px",lineHeight:"24px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-3":return{fontFamily:"Inter",fontSize:"18px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-4":return{fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-5":return{fontFamily:"Inter",fontSize:"14px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-6":return{fontFamily:"Inter",fontSize:"12px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"}}}}class xt extends b{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new Et(this.textStyle)}}class gt extends w{constructor(t,...e){super(),this.type=E.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class mt extends w{constructor(t){super(),this.type=E.REPLACE_CHILD_NODES,this.newChildNodes=t}}class wt extends X{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,n){if(t){const s=t.text.slice(0,e),r=t.text.slice(e),i=n.children.indexOf(t);if(i>-1){const e=n.children.slice(0,i),o=n.children.slice(i+1);s&&e.push(t.cloneWithText(s)),r&&o.unshift(t.cloneWithText(r)),n.apply(new mt(e));const a=n.cloneWithNodes(o);return n.parent.apply(new gt(n,a)),a}}}}class At extends X{handleAction(t,e){e.children=[],e.apply(new Tt(t.newChildNodes))}}class Nt extends w{constructor(t){super(),this.type=E.DELETE_CHILDREN,this.entityToBeRemoved=t}}class yt extends X{handleAction(t,e){const n=t.blockNeedToBeMerged;if(e.type===n.type||"image"!==e.type&&"image"!==n.type){let t=n.children;"image"!==n.type&&(t=n.children.filter((t=>t.text))),e.apply(new Tt(t)),n.parent.apply(new Nt(n))}}}class Rt extends X{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,n){if(t){const s=new RTETextNode(a(),"\n",n),r=t.text.slice(0,e),i=t.text.slice(e),o=n.children.indexOf(t);if(o>-1){const e=n.children.slice(0,o),a=n.children.slice(o+1);r&&e.push(t.cloneWithText(r)),i&&a.unshift(t.cloneWithText(i)),this.mergeLineBreakNodes(e,s,a,n)}return s}}mergeLineBreakNodes(t,e,n,s){(0===n.length||n[0]&&""===n[0].text)&&n.push(new RTETextNode(a(),"\n",s,t[t.length-1]&&t[t.length-1].annotationMap)),s.apply(new mt([...t,e,...n]))}}class Ot extends X{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const n=e.children,s=new RTETextNode(a(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(n,s,r,e),s}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new Nt(t)))})),e}mergeLineBreakNodes(t,e,n,s){(0===n.length||n[0]&&""===n[0].text)&&n.push(new RTETextNode(a(),"\n",s,t[t.length-1]&&t[t.length-1].annotationMap)),s.apply(new mt([...t,e,...n]))}}class St extends w{constructor(t,...e){super(),this.type=E.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class Ct extends w{constructor(t,e){super(),this.type=E.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class Bt extends b{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new N(this.textAlign)}}class kt extends X{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class vt extends b{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new y(this.indent)}}class RTETextBlock extends RTEBlock{constructor(t,e,n){super(t),this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&(this.annotationMap=RTETextBlock.isAcceptableTextStyle(e)?new Map([Et.from(e)]):new Map([Et.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var n,s;const r=new RTETextBlock(t.id,t.type,e),i=e.autoMatchFormat?Object.assign(Object.assign({},t.annotations),{textStyle:null!==(s=null===(n=t.annotations)||void 0===n?void 0:n.textStyle)&&void 0!==s?s:r.type}):t.annotations;return r.children=t.nodes.map((t=>{const n=z.getRTENodeClass(t.type);if(n)return n.from(t,r,e)})).filter(o),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?Et.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,n)=>{const s=e.at(-1);if(t instanceof st&&t.needMergeNode){const t=null==s?void 0:s.getAnnotationByType(g.LINK),r=n.getAnnotationByType(g.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,n]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}toHtml(){const t=this.getBlockTag(),e=super.generateAttributeString(),n=this.getAnnotationByType(u.LINK_GROUP);let s=this.children.map((t=>t.toHtml())).join("");return n&&this.children.length>0&&(s=this.generateLinkHtml(n,s)),super.shouldRenderAsInternalWrapper()?s:[`<${t}${e}>`,s,`</${t}>`].join("")}cloneWithNodes(t){const e=new RTETextBlock(a(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Tt(t)),e}clone(t){const e=new RTETextBlock(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.isEmpty()))}getLastNode(){return this.children[this.children.length-1]}getBlockTag(){switch(this.type){case"title":case"subtitle":return"div";case"heading-1":return"h1";case"heading-2":return"h2";case"heading-3":return"h3";case"heading-4":return"h4";case"heading-5":return"h5";case"heading-6":return"h6";case"paragraph":default:return"p"}}doAnnotationActionApply(t){const e=R.get(t.constructor.name,RTETextBlock.name);e&&e.execute(t,this)}generateLinkHtml(t,e){e="";let n=[];for(let s=0;s<this.children.length;s++){const r=this.children[s].getAnnotationByType(g.LINK),i=this.children[s+1]?this.children[s+1].getAnnotationByType(g.LINK):null;if(r){if(n.push(this.children[s]),!i||r.link.groupKey!==i.link.groupKey){const s=t.toString(r,{standalone:!0});e+=[`<a${s?` ${s}`:""}>`,n.map((t=>t.toHtml())).join(""),"</a>"].join(""),n=[]}}else e+=this.children[s].toHtml()}return e}}R.register(xt.name,RTETextBlock.name,new class extends X{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new Y(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new et(g.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}),R.register(Bt.name,RTETextBlock.name,new kt),R.register(vt.name,RTETextBlock.name,new class extends X{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),R.register(U.name,RTETextBlock.name,new class extends X{handleAction(t,e){let n=e.getAnnotationByType(u.LINK_GROUP);if("update_link"===t.type){if(n){const e=n.linkGroups.get(t.groupKey);e&&n.linkGroups.set(t.groupKey,[e[0]])}}else{if(n){const e=n.linkGroups.get(t.groupKey)||[];n.linkGroups.set(t.groupKey,[...e,...t.nodes])}else n=t.toAnnotation(),n.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(u.LINK_GROUP,n)}}}),R.register(E.UNLINK_LINK_GROUP,RTETextBlock.name,new class extends X{handleAction(t,e){const n=e.getAnnotationByType(u.LINK_GROUP);n&&(n.linkGroups.size>1?n.linkGroups.delete(t.groupKey):e.annotationMap.delete(u.LINK_GROUP))}}),R.register(E.SPLIT_BLOCK_WITH_NODE,RTETextBlock.name,new wt),R.register(E.REPLACE_CHILD_NODES,RTETextBlock.name,new At),R.register(E.MERGE_TWO_BLOCKS_NODES,RTETextBlock.name,new yt),R.register(E.LINE_BREAK_SINGLE_BLOCK,RTETextBlock.name,new Rt),R.register(E.LINE_BREAK_MULTIPLE_BLOCKS,RTETextBlock.name,new Ot),R.register(E.INSERT_IMAGE_TO_BLOCK,RTETextBlock.name,new class extends X{handleAction(t,e){const n=t.splitPointNode,s=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,n,s))e.parent.apply(new gt(e,r));else if(this.isCaretPositionAtBlockStart(e,n,s))e.parent.apply(new St(e,r));else{const t=new Ct(n,s);e.apply(t),e.parent.apply(new gt(e,r))}}}),R.register(E.TRANSFORM_LIST_BLOCK,RTETextBlock.name,new class extends X{handleAction(t,e){const n=e.parent,s=n.createList(t.listType),r=t.selectedBlocks,i=r.map((t=>n.toListItem(t)));s.apply(new Tt(i)),n.apply(new gt(t.selectedBlocks[0],s)),r.forEach((t=>{t.parent.apply(new Nt(t))}))}});class bt extends X{getPreviousNode(t){const e=t.parent,n=e.children.indexOf(t);if(n>0)return e.children[n-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,n=e.children.indexOf(t);if(e.children[n+1])return e.children[n+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,n=e.children.indexOf(t),s=e.parent;if(e.isListItemBlock()){const t=s.parent;return 0===n&&Array.isArray(s.children)&&s.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===s}return 0===n&&Array.isArray(s.children)&&s.children[0]===e}getPreviousBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(("number-list"===t.parent.type||"bullet-list"===t.parent.type)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}}class _t extends w{constructor(t,e){super(),this.isFlushable=!0,this.type=E.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class Lt extends b{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new L(this.range)}}class RTEDecoratorNode extends RTENode{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(RTEDecoratorNode.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${RTEDecoratorNode.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=this.getElementRef();if(t)return h(t,`.${RTEDecoratorNode.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}RTEDecoratorNode.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",RTEDecoratorNode.DECORATOR_NODE_CLASS="v-internal-decorator-node";class RTECodeBlockNode extends RTEDecoratorNode{constructor(t,e,n,s){super(t),this.type=m.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=s,this.language=n}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}toHtml(){return`<code style='box-sizing: border-box;color: rgba(var(--v-text-primary, 32, 54, 69, 1));text-align: left;font-family: "Roboto Mono";font-weight: 400;line-height: 22px;font-size: 16px;white-space: pre-wrap;min-height: 22px;tab-size: 2px;'>${this.text}</code>`}clone(t){return new RTECodeBlockNode(this.id,this.text,this.language,t)}doAnnotationActionApply(t){R.executeTheStrategy(t,this)}doModifyActionApply(t){R.executeTheStrategy(t,this)}}R.register(E.UPDATE_CODE_BLOCK,RTECodeBlockNode.name,new class extends X{handleAction(t,e){const{content:n,language:s}=t;e.language=s,e.text=n}}),R.register(Lt.name,RTECodeBlockNode.name,new class extends X{handleAction(t,e){e.annotationMap.set(u.SELECTION_RANGE,t.toAnnotation())}});var It;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(It||(It={}));class Dt extends X{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&"parent"in e&&e.parent&&(e.isListItemBlock()&&e.nestList&&e.nestList.length||e.parent.apply(new Nt(e)))}}class RTECodeBlock extends RTEBlock{constructor(t,e,n){super(t),this.type="code-block",this.children=[new RTECodeBlockNode(`${t}-1`,e,n,this)]}static from(t){return new RTECodeBlock(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}toHtml(){const{language:t=It["Plain Text"]}=this.children[0];return`<pre data-language="${t}" style="background-color: rgba(var(--v-bg-secondary, 245, 247, 247, 1)); padding: 12px">${this.children.map((t=>t.toHtml()))}</pre>`}clone(t){const e=RTECodeBlock.from(this.toJSON());return e.parent=t,e}apply(s){if(s instanceof w&&R.executeTheStrategy(s,this),s.isFlushable){const s=T.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(u.SELECTION_RANGE)}}R.register(E.DELETE_CODE_BLOCK,RTECodeBlock.name,new class extends bt{handleAction(t,e){const n=e.children[0],s=e.parent;if(s){let t=this.getPreviousNode(n),r=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(n),r=0),s.apply(new Nt(e));const i=t?T.getDOMByEntity(t):null;if(0===s.children.length){const n=RTETextBlock.from({id:a(),type:"paragraph",nodes:[{id:a(),type:"text",text:""}]});e.parent.apply(new Tt([n])),t=n.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(n,r,i,o){const a=T.getDOMByEntity(o);if(a){const o=e.getSubjectFromParentNodeByEventId(a,s);o&&t.notify(o,{node:n,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),R.register(E.DELETE_CHILDREN,RTECodeBlock.name,new Dt),R.register(E.SWITCH_OUT_FROM_CODE_BLOCK,RTECodeBlock.name,new class extends X{handleAction(n,r){const{content:i,language:o}=n,c=i.split("\n"),l=new _t(c.slice(0,c.length-2).join("\n"),o);l.isFlushable=!1,r.children[0].apply(l);const h=RTETextBlock.from({id:a(),type:"paragraph",nodes:[{id:a(),text:"",type:"text"}]});r.parent.apply(new gt(r,h));const u=T.getDOMByEntity(r);if(u){const n=e.getSubjectFromParentNodeByEventId(u,s);n&&t.notify(n,{node:h.children[0]})}}}),R.register(E.INSERT_IMAGE_TO_BLOCK,RTECodeBlock.name,new class extends X{handleAction(t,e){e.parent.apply(new gt(e,t.imageBlockToBeInserted))}}),RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{nt as $,R as A,Rt as B,B as C,Ct as D,kt as E,bt as F,Dt as G,Bt as H,gt as I,RTENode as J,It as K,st as L,w as M,v as N,u as O,x as P,_t as Q,z as R,G as S,Lt as T,lt as U,W as V,_ as W,K as X,RTECodeBlockNode as Y,H as Z,Y as _,RTETextNode as a,it as a0,xt as a1,Et as a2,M as a3,Z as a4,tt as a5,rt as a6,vt as a7,E as b,X as c,RTETextBlock as d,Tt as e,Ot as f,wt as g,At as h,yt as i,Nt as j,St as k,f as l,d as m,RTEBlock as n,C as o,S as p,RTECodeBlock as q,F as r,T as s,P as t,g as u,RTEDecoratorNode as v,m as w,O as x,b as y,mt as z}