@heartlandone/vega 2.74.0-RTE-table-preview → 2.75.0-RTE-table-preview

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 (595) hide show
  1. package/dist/cjs/{app-globals-be2e868e.js → app-globals-6c9a0e62.js} +11 -10
  2. package/dist/cjs/{child-nodes-event-prevent-slimmer-536d29fc.js → child-nodes-event-prevent-slimmer-aca87dac.js} +1 -1
  3. package/dist/cjs/click-outside-only-to-dismiss-strategy-407f6d1e.js +32 -0
  4. package/dist/cjs/{code-block-22ee2550.js → code-block-d9001f03.js} +2 -2
  5. package/dist/cjs/{component-value-history-controller-slimmer.abstract-3486cbc0.js → component-value-history-controller-slimmer.abstract-b00e9f58.js} +4 -4
  6. package/dist/cjs/{content-state-0be6fda3.js → content-state-466f277f.js} +3 -3
  7. package/dist/cjs/{date-required-rule-99cca681.js → date-required-rule-30ee62d0.js} +1 -1
  8. package/dist/cjs/{design-token-505997df.js → design-token-a569577e.js} +2 -2
  9. package/dist/cjs/{dom-node-subject-observer-factory-1c8f7880.js → dom-node-subject-observer-factory-b5e71bf6.js} +4 -0
  10. package/dist/cjs/{element-appender-slimmer-26420c09.js → element-appender-slimmer-b7fdd82e.js} +160 -36
  11. package/dist/cjs/{event-emit-slimmer-6a591353.js → event-emit-slimmer-2dacabbd.js} +2 -2
  12. package/dist/cjs/{form-field-controller-slimmer-56c551ea.js → form-field-controller-slimmer-3ea2464a.js} +2 -2
  13. package/dist/cjs/{image-annotation-action-462fd073.js → image-annotation-action-4435d531.js} +3 -31
  14. package/dist/cjs/{index-fc538f17.js → index-19e5b936.js} +1 -1
  15. package/dist/cjs/index.cjs.js +22 -22
  16. package/dist/cjs/{inject-keyboard-manager-a6101379.js → inject-keyboard-manager-d21b4387.js} +1 -1
  17. package/dist/cjs/{internal-vega-event-manager-d587a33c.js → internal-vega-event-manager-6befeb34.js} +13 -2
  18. package/dist/cjs/{keyboard-manager-d8adb0ed.js → keyboard-manager-3dea6b28.js} +1 -1
  19. package/dist/cjs/{keyboard-manager-slimmer-15e65357.js → keyboard-manager-slimmer-0d45f944.js} +1 -1
  20. package/dist/cjs/{language-extension-414149c2.js → language-extension-26331915.js} +2 -2
  21. package/dist/cjs/loader.cjs.js +15 -15
  22. package/dist/cjs/{month-view-generator-706c5477.js → month-view-generator-49cc5fc2.js} +1 -1
  23. package/dist/cjs/{public-rules-2d18cf41.js → public-rules-942bd931.js} +7 -7
  24. package/dist/cjs/{range-439a0c0c.js → range-cafe69a9.js} +1 -1
  25. package/dist/cjs/{responsive-format-facade-0ececeb3.js → responsive-format-facade-6c22bbbd.js} +5 -4
  26. package/dist/cjs/{rich-text-editor-required-rule-5a4f3626.js → rich-text-editor-required-rule-0dcb08c8.js} +1 -1
  27. package/dist/cjs/sanitize-fb222510.js +131 -0
  28. package/dist/cjs/{styles.constants-3aff0b56.js → split-cell-operation-9930fde8.js} +1230 -403
  29. package/dist/cjs/{string-format-strategy.abstract-a8264fca.js → string-format-strategy.abstract-63514c60.js} +1 -1
  30. package/dist/cjs/{string-input-formatter-slimmer-a8f4a9b1.js → string-input-formatter-slimmer-655d0322.js} +3 -3
  31. package/dist/cjs/{string-mask-strategy-4e7d3780.js → string-mask-strategy-d23ac21a.js} +2 -2
  32. package/dist/cjs/{style-formatter-142500c0.js → style-formatter-0e0ae896.js} +2 -2
  33. package/dist/cjs/{sub-state-notify-slimmer-011866d9.js → sub-state-notify-slimmer-3fa87162.js} +1 -1
  34. package/dist/cjs/{sub-state-observer-slimmer-23d43f1e.js → sub-state-observer-slimmer-77deba40.js} +1 -1
  35. package/dist/cjs/{table-extension-2a20da57.js → table-extension-5f27207f.js} +676 -373
  36. package/dist/cjs/{time-required-rule-9d39a620.js → time-required-rule-c96ecdc9.js} +1 -1
  37. package/dist/cjs/{type-guard-69d2cf01.js → type-guard-a0f026d8.js} +12 -0
  38. package/dist/cjs/{valid-credit-card-number-rule-9f40d1d9.js → valid-credit-card-number-rule-c854bed9.js} +1 -1
  39. package/dist/cjs/vega-accordion.cjs.entry.js +12 -12
  40. package/dist/cjs/vega-app-header-button.cjs.entry.js +13 -13
  41. package/dist/cjs/vega-banner.cjs.entry.js +3 -3
  42. package/dist/cjs/vega-box.cjs.entry.js +12 -12
  43. package/dist/cjs/vega-breadcrumb.cjs.entry.js +4 -4
  44. package/dist/cjs/vega-button-circle.cjs.entry.js +12 -12
  45. package/dist/cjs/vega-button-group_2.cjs.entry.js +6 -6
  46. package/dist/cjs/vega-button-link.cjs.entry.js +4 -4
  47. package/dist/cjs/vega-button.cjs.entry.js +11 -11
  48. package/dist/cjs/vega-calendar_4.cjs.entry.js +8 -8
  49. package/dist/cjs/vega-card.cjs.entry.js +12 -12
  50. package/dist/cjs/vega-carousel.cjs.entry.js +11 -11
  51. package/dist/cjs/vega-checkbox_2.cjs.entry.js +6 -6
  52. package/dist/cjs/vega-chip.cjs.entry.js +13 -13
  53. package/dist/cjs/vega-code-block.cjs.entry.js +10 -10
  54. package/dist/cjs/vega-color-picker.cjs.entry.js +5 -5
  55. package/dist/cjs/vega-combo-box.cjs.entry.js +11 -10
  56. package/dist/cjs/vega-date-picker_2.cjs.entry.js +392 -345
  57. package/dist/cjs/vega-dialog_2.cjs.entry.js +14 -14
  58. package/dist/cjs/vega-divider.cjs.entry.js +13 -13
  59. package/dist/cjs/vega-dropdown_5.cjs.entry.js +40 -22
  60. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  61. package/dist/cjs/vega-field-label.cjs.entry.js +3 -3
  62. package/dist/cjs/vega-file-uploader.cjs.entry.js +5 -5
  63. package/dist/cjs/vega-flag-icon.cjs.entry.js +11 -11
  64. package/dist/cjs/vega-flex.cjs.entry.js +13 -13
  65. package/dist/cjs/vega-font.cjs.entry.js +12 -12
  66. package/dist/cjs/vega-form.cjs.entry.js +8 -8
  67. package/dist/cjs/vega-grid.cjs.entry.js +12 -12
  68. package/dist/cjs/vega-icon.cjs.entry.js +12 -12
  69. package/dist/cjs/vega-image-uploader.cjs.entry.js +14 -14
  70. package/dist/cjs/vega-input-credit-card.cjs.entry.js +10 -10
  71. package/dist/cjs/vega-input-numeric.cjs.entry.js +10 -10
  72. package/dist/cjs/vega-input-passcode.cjs.entry.js +9 -9
  73. package/dist/cjs/vega-input-phone-number.cjs.entry.js +14 -14
  74. package/dist/cjs/vega-input-range.cjs.entry.js +6 -6
  75. package/dist/cjs/vega-input-select.cjs.entry.js +21 -16
  76. package/dist/cjs/vega-input.cjs.entry.js +339 -98
  77. package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
  78. package/dist/cjs/vega-left-nav_5.cjs.entry.js +12 -12
  79. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +13 -13
  80. package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
  81. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +3 -3
  82. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +1 -1
  83. package/dist/cjs/vega-pagination.cjs.entry.js +13 -13
  84. package/dist/cjs/vega-popover_2.cjs.entry.js +15 -15
  85. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +12 -12
  86. package/dist/cjs/vega-radio_2.cjs.entry.js +9 -9
  87. package/dist/cjs/vega-rich-text-content.cjs.entry.js +13 -16
  88. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +143 -194
  89. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +312 -104
  90. package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
  91. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +14 -14
  92. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +7 -7
  93. package/dist/cjs/vega-sidenav_3.cjs.entry.js +15 -15
  94. package/dist/cjs/vega-signature-capture.cjs.entry.js +14 -14
  95. package/dist/cjs/vega-stepper.cjs.entry.js +6 -6
  96. package/dist/cjs/vega-tab-group_2.cjs.entry.js +4 -4
  97. package/dist/cjs/vega-table_11.cjs.entry.js +13 -13
  98. package/dist/cjs/vega-textarea.cjs.entry.js +6 -6
  99. package/dist/cjs/vega-time-picker_2.cjs.entry.js +19 -18
  100. package/dist/cjs/vega-toggle-switch.cjs.entry.js +5 -5
  101. package/dist/cjs/vega-tooltip_2.cjs.entry.js +14 -14
  102. package/dist/cjs/vega.cjs.js +15 -15
  103. package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +1 -1
  104. package/dist/collection/components/vega-button-group/vega-button-group-item/vega-button-group-item.js +1 -1
  105. package/dist/collection/components/vega-calendar/vega-calendar.js +1 -1
  106. package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.js +2 -1
  107. package/dist/collection/components/vega-date-picker/assets/icons.js +4 -1
  108. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-calendar-open-state-controller.js +2 -1
  109. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +2 -2
  110. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.js +109 -0
  111. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.js +4 -0
  112. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.js +42 -70
  113. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +12 -56
  114. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +435 -108
  115. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +5 -0
  116. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-search-controller.js +5 -1
  117. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-source-controller.js +7 -0
  118. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +3 -2
  119. package/dist/collection/components/vega-dropdown/vega-dropdown.js +21 -6
  120. package/dist/collection/components/vega-field-label/vega-field-label.js +1 -1
  121. package/dist/collection/components/vega-input/slimmers/controllers/vega-input-render-mode-controller.js +51 -0
  122. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +6 -0
  123. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-suggestions-renderer.js +142 -0
  124. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-renderer.js +12 -1
  125. package/dist/collection/components/vega-input/vega-input.js +200 -3
  126. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +8 -3
  127. package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.js +9 -1
  128. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +0 -10
  129. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.js +74 -28
  130. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.js +120 -0
  131. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.js +143 -0
  132. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.js +80 -0
  133. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.js +2 -1
  134. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.js +2 -2
  135. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.js +17 -0
  136. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.js +12 -0
  137. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.js +12 -0
  138. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +9 -30
  139. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +26 -0
  140. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +26 -11
  141. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +52 -12
  142. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.js +66 -0
  143. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.js +11 -6
  144. package/dist/collection/components/vega-rich-text-editor/extensions/table/constants/styles.constants.js +8 -8
  145. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +1 -1
  146. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +32 -1
  147. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +1 -1
  148. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +1 -1
  149. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.js +3 -1
  150. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +2 -9
  151. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.js +4 -0
  152. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.js +19 -15
  153. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.js +100 -0
  154. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.js +1 -0
  155. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.js +57 -0
  156. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +14 -2
  157. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-selection.js +102 -13
  158. package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.js +51 -0
  159. package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/utils.js +253 -0
  160. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/controllers/vega-rich-text-table-properties-color-controller.js +33 -2
  161. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-cell-properties-form-field-renderer.js +1 -1
  162. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.js +38 -6
  163. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-field-renderer.js +1 -1
  164. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-renderer.js +20 -2
  165. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.css +1 -0
  166. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.js +24 -14
  167. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.js +2 -2
  168. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.js +117 -0
  169. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +6 -4
  170. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.js +6 -1
  171. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.js +15 -8
  172. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.js +41 -46
  173. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.js +69 -48
  174. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.js +50 -54
  175. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.js +106 -14
  176. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.js +204 -9
  177. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.js +32 -0
  178. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-dto.test.js +583 -6
  179. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.js +114 -25
  180. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +0 -5
  181. package/dist/collection/components/vega-selection-chip/vega-selection-chip.js +1 -1
  182. package/dist/collection/components/vega-time-picker/slimmers/controllers/vega-time-picker-range-dropdown-controller.js +2 -1
  183. package/dist/collection/components/vega-time-picker/slimmers/controllers/vega-time-picker-single-dropdown-controller.js +2 -1
  184. package/dist/collection/constants/ui.js +2 -0
  185. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +13 -2
  186. package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +2 -0
  187. package/dist/collection/helpers/event-manager/test/component-event-id-map.test.js +3 -1
  188. package/dist/collection/helpers/event-manager/test/vega-event-manager.test.js +3 -1
  189. package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +60 -32
  190. package/dist/collection/helpers/slimmers/element-appender/test/element-appender-slimmer.test.js +3 -2
  191. package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/click-outside-only-to-dismiss-strategy.js +28 -0
  192. package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/click-trigger-strategy.js +33 -0
  193. package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/hover-trigger-strategy.js +42 -0
  194. package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/none-trigger-strategy.js +22 -0
  195. package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/trigger-strategy.interface.js +1 -0
  196. package/dist/collection/types/test/type-guard.test.js +8 -1
  197. package/dist/collection/types/type-guard.js +11 -0
  198. package/dist/collection/utils/sanitize.js +126 -0
  199. package/dist/collection/utils/test/sanitize.test.js +65 -0
  200. package/dist/esm/{app-globals-8b873b6f.js → app-globals-4146c01c.js} +9 -8
  201. package/dist/esm/{child-nodes-event-prevent-slimmer-a6afdb1e.js → child-nodes-event-prevent-slimmer-225e7b58.js} +1 -1
  202. package/dist/esm/click-outside-only-to-dismiss-strategy-3d286c1b.js +30 -0
  203. package/dist/esm/{code-block-76b29be1.js → code-block-36393b45.js} +3 -3
  204. package/dist/esm/{component-value-history-controller-slimmer.abstract-e1b0e163.js → component-value-history-controller-slimmer.abstract-82339b2b.js} +4 -4
  205. package/dist/esm/{content-state-03f1d302.js → content-state-e8ef033a.js} +3 -3
  206. package/dist/esm/{date-required-rule-a9980386.js → date-required-rule-47ecc28f.js} +1 -1
  207. package/dist/esm/{design-token-8fedb532.js → design-token-c57a58b4.js} +2 -2
  208. package/dist/esm/{dom-node-subject-observer-factory-e998eba4.js → dom-node-subject-observer-factory-d4e16f66.js} +3 -1
  209. package/dist/esm/{element-appender-slimmer-7b9326e2.js → element-appender-slimmer-a7341fc1.js} +160 -36
  210. package/dist/esm/{event-emit-slimmer-bbf6668c.js → event-emit-slimmer-1bb4b533.js} +2 -2
  211. package/dist/esm/{form-field-controller-slimmer-a0cff4d3.js → form-field-controller-slimmer-907bf7c2.js} +2 -2
  212. package/dist/esm/{image-annotation-action-47cdc068.js → image-annotation-action-82cef6e4.js} +4 -31
  213. package/dist/esm/{index-da7e5fe5.js → index-2466b0c0.js} +1 -1
  214. package/dist/esm/index.js +21 -21
  215. package/dist/esm/{inject-keyboard-manager-9241968c.js → inject-keyboard-manager-83d76ff5.js} +1 -1
  216. package/dist/esm/{internal-vega-event-manager-e799c54a.js → internal-vega-event-manager-2cbb828a.js} +13 -2
  217. package/dist/esm/{keyboard-manager-89acac79.js → keyboard-manager-c92808d8.js} +1 -1
  218. package/dist/esm/{keyboard-manager-slimmer-e303cb7d.js → keyboard-manager-slimmer-79c78ce8.js} +1 -1
  219. package/dist/esm/{language-extension-de6e6caf.js → language-extension-dcc43702.js} +2 -2
  220. package/dist/esm/loader.js +15 -15
  221. package/dist/esm/{month-view-generator-4bec99fd.js → month-view-generator-16192182.js} +1 -1
  222. package/dist/esm/{public-rules-c48cc5c9.js → public-rules-b8ea651f.js} +7 -7
  223. package/dist/esm/{range-af6150a8.js → range-872aad9f.js} +1 -1
  224. package/dist/esm/{responsive-format-facade-16da4623.js → responsive-format-facade-9278eae4.js} +5 -4
  225. package/dist/esm/{rich-text-editor-required-rule-7255832e.js → rich-text-editor-required-rule-36dd4242.js} +1 -1
  226. package/dist/esm/sanitize-fd0cb40d.js +129 -0
  227. package/dist/esm/{styles.constants-0dd6f7fa.js → split-cell-operation-6749f654.js} +1218 -405
  228. package/dist/esm/{string-format-strategy.abstract-75540c16.js → string-format-strategy.abstract-fc60db79.js} +1 -1
  229. package/dist/esm/{string-input-formatter-slimmer-82f85b0b.js → string-input-formatter-slimmer-7a1e8754.js} +3 -3
  230. package/dist/esm/{string-mask-strategy-4a18ed1a.js → string-mask-strategy-0b0accaa.js} +2 -2
  231. package/dist/esm/{style-formatter-6ca58f6b.js → style-formatter-e937952a.js} +2 -2
  232. package/dist/esm/{sub-state-notify-slimmer-4060c333.js → sub-state-notify-slimmer-2ecdba12.js} +1 -1
  233. package/dist/esm/{sub-state-observer-slimmer-bfa5e63e.js → sub-state-observer-slimmer-2d5dba8d.js} +1 -1
  234. package/dist/esm/{table-extension-c83b7a56.js → table-extension-6b31754b.js} +587 -283
  235. package/dist/esm/{time-required-rule-8ec1faf5.js → time-required-rule-5fa43804.js} +1 -1
  236. package/dist/esm/{type-guard-b48aec98.js → type-guard-c65a227d.js} +12 -1
  237. package/dist/esm/{valid-credit-card-number-rule-96eaf9b1.js → valid-credit-card-number-rule-666c415d.js} +1 -1
  238. package/dist/esm/vega-accordion.entry.js +12 -12
  239. package/dist/esm/vega-app-header-button.entry.js +13 -13
  240. package/dist/esm/vega-banner.entry.js +3 -3
  241. package/dist/esm/vega-box.entry.js +12 -12
  242. package/dist/esm/vega-breadcrumb.entry.js +4 -4
  243. package/dist/esm/vega-button-circle.entry.js +12 -12
  244. package/dist/esm/vega-button-group_2.entry.js +6 -6
  245. package/dist/esm/vega-button-link.entry.js +4 -4
  246. package/dist/esm/vega-button.entry.js +11 -11
  247. package/dist/esm/vega-calendar_4.entry.js +8 -8
  248. package/dist/esm/vega-card.entry.js +12 -12
  249. package/dist/esm/vega-carousel.entry.js +11 -11
  250. package/dist/esm/vega-checkbox_2.entry.js +6 -6
  251. package/dist/esm/vega-chip.entry.js +13 -13
  252. package/dist/esm/vega-code-block.entry.js +10 -10
  253. package/dist/esm/vega-color-picker.entry.js +5 -5
  254. package/dist/esm/vega-combo-box.entry.js +11 -10
  255. package/dist/esm/vega-date-picker_2.entry.js +392 -345
  256. package/dist/esm/vega-dialog_2.entry.js +14 -14
  257. package/dist/esm/vega-divider.entry.js +13 -13
  258. package/dist/esm/vega-dropdown_5.entry.js +40 -22
  259. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  260. package/dist/esm/vega-field-label.entry.js +3 -3
  261. package/dist/esm/vega-file-uploader.entry.js +5 -5
  262. package/dist/esm/vega-flag-icon.entry.js +11 -11
  263. package/dist/esm/vega-flex.entry.js +13 -13
  264. package/dist/esm/vega-font.entry.js +12 -12
  265. package/dist/esm/vega-form.entry.js +8 -8
  266. package/dist/esm/vega-grid.entry.js +12 -12
  267. package/dist/esm/vega-icon.entry.js +12 -12
  268. package/dist/esm/vega-image-uploader.entry.js +14 -14
  269. package/dist/esm/vega-input-credit-card.entry.js +10 -10
  270. package/dist/esm/vega-input-numeric.entry.js +10 -10
  271. package/dist/esm/vega-input-passcode.entry.js +9 -9
  272. package/dist/esm/vega-input-phone-number.entry.js +14 -14
  273. package/dist/esm/vega-input-range.entry.js +6 -6
  274. package/dist/esm/vega-input-select.entry.js +21 -16
  275. package/dist/esm/vega-input.entry.js +340 -99
  276. package/dist/esm/vega-item-toggle.entry.js +3 -3
  277. package/dist/esm/vega-left-nav_5.entry.js +12 -12
  278. package/dist/esm/vega-loader-wrapper_2.entry.js +13 -13
  279. package/dist/esm/vega-page-notification_2.entry.js +1 -1
  280. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
  281. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +1 -1
  282. package/dist/esm/vega-pagination.entry.js +13 -13
  283. package/dist/esm/vega-popover_2.entry.js +15 -15
  284. package/dist/esm/vega-progress-tracker_2.entry.js +12 -12
  285. package/dist/esm/vega-radio_2.entry.js +9 -9
  286. package/dist/esm/vega-rich-text-content.entry.js +14 -17
  287. package/dist/esm/vega-rich-text-editor_4.entry.js +144 -195
  288. package/dist/esm/vega-rich-text-table-properties_3.entry.js +293 -85
  289. package/dist/esm/vega-segment-control.entry.js +3 -3
  290. package/dist/esm/vega-selection-chip_2.entry.js +14 -14
  291. package/dist/esm/vega-selection-tile_2.entry.js +7 -7
  292. package/dist/esm/vega-sidenav_3.entry.js +15 -15
  293. package/dist/esm/vega-signature-capture.entry.js +14 -14
  294. package/dist/esm/vega-stepper.entry.js +6 -6
  295. package/dist/esm/vega-tab-group_2.entry.js +4 -4
  296. package/dist/esm/vega-table_11.entry.js +13 -13
  297. package/dist/esm/vega-textarea.entry.js +6 -6
  298. package/dist/esm/vega-time-picker_2.entry.js +19 -18
  299. package/dist/esm/vega-toggle-switch.entry.js +5 -5
  300. package/dist/esm/vega-tooltip_2.entry.js +14 -14
  301. package/dist/esm/vega.js +15 -15
  302. package/dist/sri/vega-sri-manifest.json +339 -715
  303. package/dist/types/components/vega-date-picker/assets/icons.d.ts +1 -1
  304. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.d.ts +20 -0
  305. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +1 -0
  306. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.d.ts +4 -11
  307. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.d.ts +4 -9
  308. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +2 -0
  309. package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-source-controller.d.ts +2 -0
  310. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +9 -4
  311. package/dist/types/components/vega-input/slimmers/controllers/vega-input-render-mode-controller.d.ts +27 -0
  312. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +1 -0
  313. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-suggestions-renderer.d.ts +40 -0
  314. package/dist/types/components/vega-input/slimmers/renderers/vega-input-renderer.d.ts +3 -0
  315. package/dist/types/components/vega-input/types.d.ts +4 -0
  316. package/dist/types/components/vega-input/vega-input.d.ts +55 -1
  317. package/dist/types/components/vega-rich-text-content/vega-rich-text-content.d.ts +3 -0
  318. package/dist/types/components/vega-rich-text-editor/dto/annotations/custom-attribute-annotation.d.ts +1 -1
  319. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +0 -2
  320. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.d.ts +17 -0
  321. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.d.ts +38 -0
  322. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.d.ts +43 -0
  323. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.d.ts +27 -0
  324. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.d.ts +33 -0
  325. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.d.ts +10 -0
  326. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.d.ts +10 -0
  327. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +0 -7
  328. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.d.ts +14 -0
  329. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +15 -6
  330. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +11 -2
  331. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.d.ts +43 -0
  332. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.d.ts +2 -2
  333. package/dist/types/components/vega-rich-text-editor/extensions/table/constants/styles.constants.d.ts +2 -2
  334. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +19 -0
  335. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.d.ts +2 -2
  336. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +1 -8
  337. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.d.ts +44 -0
  338. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.d.ts +2 -1
  339. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.d.ts +31 -0
  340. package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +3 -3
  341. package/dist/types/components/vega-rich-text-editor/extensions/table/table-selection.d.ts +15 -0
  342. package/dist/types/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.d.ts +26 -0
  343. package/dist/types/components/vega-rich-text-editor/extensions/table/utils/utils.d.ts +102 -2
  344. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/controllers/vega-rich-text-table-properties-color-controller.d.ts +16 -1
  345. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.d.ts +18 -6
  346. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-renderer.d.ts +7 -1
  347. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.d.ts +14 -11
  348. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.d.ts +3 -3
  349. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.d.ts +23 -0
  350. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.d.ts +1 -0
  351. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.d.ts +9 -6
  352. package/dist/types/components/vega-rich-text-editor/interface.d.ts +0 -5
  353. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.d.ts +8 -1
  354. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.d.ts +1 -0
  355. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +0 -2
  356. package/dist/types/components.d.ts +72 -30
  357. package/dist/types/constants/ui.d.ts +1 -1
  358. package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +2 -0
  359. package/dist/types/helpers/slimmers/element-appender/element-appender-slimmer.d.ts +4 -9
  360. package/dist/types/helpers/slimmers/element-appender/trigger-strategies/click-outside-only-to-dismiss-strategy.d.ts +21 -0
  361. package/dist/types/helpers/slimmers/element-appender/trigger-strategies/click-trigger-strategy.d.ts +21 -0
  362. package/dist/types/helpers/slimmers/element-appender/trigger-strategies/hover-trigger-strategy.d.ts +22 -0
  363. package/dist/types/helpers/slimmers/element-appender/trigger-strategies/none-trigger-strategy.d.ts +18 -0
  364. package/dist/types/helpers/slimmers/element-appender/trigger-strategies/trigger-strategy.interface.d.ts +37 -0
  365. package/dist/types/types/components.type.d.ts +3 -1
  366. package/dist/types/types/type-guard.d.ts +8 -0
  367. package/dist/types/types/ui.type.d.ts +9 -0
  368. package/dist/types/utils/sanitize.d.ts +71 -0
  369. package/dist/types/utils/spec-utils.d.ts +2 -0
  370. package/dist/types/utils/test/sanitize.test.d.ts +1 -0
  371. package/dist/vega/index.esm.js +1 -57
  372. package/dist/vega/{p-780cbfb0.entry.js → p-01dc2e48.entry.js} +1 -1
  373. package/dist/vega/p-0459a474.entry.js +1 -0
  374. package/dist/vega/p-0770a0eb.entry.js +1 -0
  375. package/dist/vega/{p-a924c1e2.entry.js → p-0bf4a3a7.entry.js} +1 -1
  376. package/dist/vega/{p-ff9a0e6e.js → p-0d57293b.js} +1 -1
  377. package/dist/vega/{p-22da15d7.entry.js → p-1199ebf6.entry.js} +1 -1
  378. package/dist/vega/p-11a6c1b7.js +1 -0
  379. package/dist/vega/{p-79e8236a.entry.js → p-1415d93b.entry.js} +1 -1
  380. package/dist/vega/p-1431c8b9.js +1 -0
  381. package/dist/vega/p-18560714.entry.js +1 -0
  382. package/dist/vega/{p-a007b493.entry.js → p-1a161082.entry.js} +1 -1
  383. package/dist/vega/{p-161b9c5b.js → p-1f83cebf.js} +1 -1
  384. package/dist/vega/{p-16af7681.js → p-20010bd6.js} +1 -1
  385. package/dist/vega/p-205d8401.js +1 -0
  386. package/dist/vega/{p-29a9c8f5.entry.js → p-20a98a99.entry.js} +1 -1
  387. package/dist/vega/{p-86caa739.entry.js → p-228784f7.entry.js} +1 -1
  388. package/dist/vega/{p-b91c2c9d.js → p-22989693.js} +1 -1
  389. package/dist/vega/{p-1bda4016.entry.js → p-273911b2.entry.js} +1 -1
  390. package/dist/vega/{p-e797bf8d.entry.js → p-28e630b2.entry.js} +1 -1
  391. package/dist/vega/{p-d466baf7.js → p-29f6b2d5.js} +1 -1
  392. package/dist/vega/{p-6d9731c1.entry.js → p-2af2e1ad.entry.js} +1 -1
  393. package/dist/vega/{p-d55365b9.entry.js → p-2af78c38.entry.js} +1 -1
  394. package/dist/vega/{p-c3d388b5.entry.js → p-2c830cba.entry.js} +1 -1
  395. package/dist/vega/{p-61ae4e9c.entry.js → p-3224d794.entry.js} +1 -1
  396. package/dist/vega/{p-216f3436.entry.js → p-326b5392.entry.js} +1 -1
  397. package/dist/vega/{p-69af3422.entry.js → p-3413a678.entry.js} +1 -1
  398. package/dist/vega/p-3532aa12.js +1 -0
  399. package/dist/vega/p-395cdd84.entry.js +1 -0
  400. package/dist/vega/{p-9aac9879.entry.js → p-3a6ff599.entry.js} +1 -1
  401. package/dist/vega/p-3be82c0f.entry.js +1 -0
  402. package/dist/vega/p-3c0f55f7.entry.js +1 -0
  403. package/dist/vega/{p-10ffb765.js → p-3e30567a.js} +1 -1
  404. package/dist/vega/p-3e5f362f.js +1 -0
  405. package/dist/vega/p-42cd1fde.js +1 -0
  406. package/dist/vega/p-476a173a.js +1 -0
  407. package/dist/vega/p-4b6c60cb.entry.js +1 -0
  408. package/dist/vega/{p-12a97dad.entry.js → p-4c36b528.entry.js} +1 -1
  409. package/dist/vega/{p-fa34ace2.entry.js → p-4ecf0ee7.entry.js} +1 -1
  410. package/dist/vega/{p-813b2915.entry.js → p-4f4c7593.entry.js} +1 -1
  411. package/dist/vega/p-585edae4.entry.js +1 -0
  412. package/dist/vega/{p-39d56e3d.js → p-5b048141.js} +1 -1
  413. package/dist/vega/p-5f377954.js +1 -1
  414. package/dist/vega/{p-63246470.js → p-5fdb9047.js} +1 -1
  415. package/dist/vega/{p-d4e35d2e.entry.js → p-60483e3d.entry.js} +1 -1
  416. package/dist/vega/{p-de70aac1.js → p-60851f9d.js} +1 -1
  417. package/dist/vega/{p-73688c4e.entry.js → p-61145506.entry.js} +1 -1
  418. package/dist/vega/{p-8162980c.js → p-61ddae59.js} +1 -1
  419. package/dist/vega/{p-98b78c75.entry.js → p-64386be8.entry.js} +1 -1
  420. package/dist/vega/{p-73689ec0.entry.js → p-6490b69a.entry.js} +1 -1
  421. package/dist/vega/{p-50a506ea.entry.js → p-6bc1552e.entry.js} +1 -1
  422. package/dist/vega/{p-206245d2.entry.js → p-6e4e7192.entry.js} +1 -1
  423. package/dist/vega/{p-8ac453cb.entry.js → p-76d144f5.entry.js} +1 -1
  424. package/dist/vega/{p-dc2813eb.entry.js → p-76eb9cd0.entry.js} +1 -1
  425. package/dist/vega/{p-e788598a.entry.js → p-77c9949d.entry.js} +1 -1
  426. package/dist/vega/p-8187878e.js +1 -0
  427. package/dist/vega/p-8198a77c.js +1 -0
  428. package/dist/vega/{p-0e4cecbd.entry.js → p-82ad1006.entry.js} +1 -1
  429. package/dist/vega/{p-8a4d8139.entry.js → p-839c9d62.entry.js} +1 -1
  430. package/dist/vega/{p-d07d04e0.entry.js → p-849f78a7.entry.js} +1 -1
  431. package/dist/vega/{p-ac4bd1f8.js → p-85bfa0f7.js} +1 -1
  432. package/dist/vega/{p-dd5d917b.entry.js → p-87764570.entry.js} +1 -1
  433. package/dist/vega/{p-abf871cd.entry.js → p-88c894e8.entry.js} +1 -1
  434. package/dist/vega/{p-c00adad9.js → p-89083d63.js} +1 -1
  435. package/dist/vega/{p-a8dad05d.js → p-920719ad.js} +1 -1
  436. package/dist/vega/p-9472d19a.js +1 -0
  437. package/dist/vega/{p-c6d98c60.entry.js → p-96657262.entry.js} +1 -1
  438. package/dist/vega/p-979e4bd4.entry.js +1 -0
  439. package/dist/vega/{p-f6eab527.entry.js → p-9c624e03.entry.js} +1 -1
  440. package/dist/vega/{p-088f4613.entry.js → p-a01f985f.entry.js} +1 -1
  441. package/dist/vega/{p-a4ec6575.js → p-a2aeb646.js} +1 -1
  442. package/dist/vega/{p-22c76be7.entry.js → p-a495463f.entry.js} +1 -1
  443. package/dist/vega/p-b4ea3fad.js +1 -0
  444. package/dist/vega/{p-151b1deb.js → p-b56b0b89.js} +1 -1
  445. package/dist/vega/{p-3bc7e162.entry.js → p-b5b75a2f.entry.js} +1 -1
  446. package/dist/vega/{p-d991fb11.js → p-badad9ed.js} +1 -1
  447. package/dist/vega/{p-24766b9d.entry.js → p-bccaf3d2.entry.js} +1 -1
  448. package/dist/vega/{p-e13c163c.entry.js → p-bde5c990.entry.js} +1 -1
  449. package/dist/vega/{p-ab0e013c.entry.js → p-beb6c1ce.entry.js} +1 -1
  450. package/dist/vega/{p-068ee55e.entry.js → p-c02b01ec.entry.js} +1 -1
  451. package/dist/vega/p-c1fdcb62.js +1 -0
  452. package/dist/vega/{p-5d2704c1.entry.js → p-c5e7035b.entry.js} +1 -1
  453. package/dist/vega/{p-5367eaab.js → p-c841be8d.js} +1 -1
  454. package/dist/vega/{p-6f08e3e1.entry.js → p-cd078909.entry.js} +1 -1
  455. package/dist/vega/{p-d1d0f08a.js → p-d0e31633.js} +1 -1
  456. package/dist/vega/{p-a439e59b.entry.js → p-d5c09a94.entry.js} +1 -1
  457. package/dist/vega/{p-c8ad47c9.js → p-d907f8a2.js} +1 -1
  458. package/dist/vega/{p-6c1ef2ed.js → p-dd11f735.js} +1 -1
  459. package/dist/vega/{p-c9541fc2.entry.js → p-de850e98.entry.js} +1 -1
  460. package/dist/vega/{p-3d85411d.js → p-e16b3adf.js} +1 -1
  461. package/dist/vega/{p-34a994a1.entry.js → p-e1dd23f8.entry.js} +1 -1
  462. package/dist/vega/{p-7ca9f6f1.js → p-e1de1cdc.js} +1 -1
  463. package/dist/vega/{p-1f4a814e.entry.js → p-e7cfb6b6.entry.js} +1 -1
  464. package/dist/vega/{p-ddf81373.js → p-e819940c.js} +1 -1
  465. package/dist/vega/{p-e0cefd90.entry.js → p-e95ed6f3.entry.js} +1 -1
  466. package/dist/vega/p-ebb14c84.js +1 -0
  467. package/dist/vega/{p-f519cdc3.entry.js → p-f0a8aed3.entry.js} +1 -1
  468. package/dist/vega/p-f2b8abd3.entry.js +1 -0
  469. package/dist/vega/{p-d4719c14.entry.js → p-fb238751.entry.js} +1 -1
  470. package/dist/vega/p-fdebc47f.entry.js +1 -0
  471. package/dist/vega/vega.esm.js +1 -172
  472. package/package.json +1 -1
  473. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.js +0 -51
  474. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.js +0 -26
  475. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.d.ts +0 -22
  476. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.d.ts +0 -22
  477. package/dist/vega/app-globals-955a2b3b.js +0 -427
  478. package/dist/vega/child-nodes-event-prevent-slimmer-a604a6dd.js +0 -156
  479. package/dist/vega/design-token-56b26205.js +0 -402
  480. package/dist/vega/element-appender-slimmer-8355fb28.js +0 -1508
  481. package/dist/vega/event-emit-slimmer-7a14f5e9.js +0 -265
  482. package/dist/vega/internal-vega-event-manager-8c62c88e.js +0 -458
  483. package/dist/vega/p-08b4d097.entry.js +0 -1
  484. package/dist/vega/p-207cfa6a.js +0 -1
  485. package/dist/vega/p-213be5e9.entry.js +0 -1
  486. package/dist/vega/p-224a4f3f.entry.js +0 -1
  487. package/dist/vega/p-40660c09.js +0 -1
  488. package/dist/vega/p-550ce71a.entry.js +0 -1
  489. package/dist/vega/p-6665d083.entry.js +0 -1
  490. package/dist/vega/p-7172332a.entry.js +0 -1
  491. package/dist/vega/p-82ec9721.entry.js +0 -1
  492. package/dist/vega/p-99e3dcab.js +0 -1
  493. package/dist/vega/p-9a83a6b0.js +0 -1
  494. package/dist/vega/p-a4d0ab07.js +0 -1
  495. package/dist/vega/p-a6e03df4.entry.js +0 -1
  496. package/dist/vega/p-c335088c.js +0 -1
  497. package/dist/vega/p-c674b07c.js +0 -1
  498. package/dist/vega/p-d1349401.entry.js +0 -1
  499. package/dist/vega/p-d2033624.js +0 -1
  500. package/dist/vega/p-db482ee1.js +0 -1
  501. package/dist/vega/p-f4b46f6b.entry.js +0 -1
  502. package/dist/vega/p-fbfb4c70.entry.js +0 -1
  503. package/dist/vega/p-ff57c872.js +0 -1
  504. package/dist/vega/p-ff921d10.js +0 -1
  505. package/dist/vega/public-api-8dd022fa.js +0 -6043
  506. package/dist/vega/public-api-baaf7593.js +0 -4
  507. package/dist/vega/responsive-format-facade-98596535.js +0 -913
  508. package/dist/vega/style-formatter-0ae102e9.js +0 -32
  509. package/dist/vega/vega-accordion.entry.js +0 -291
  510. package/dist/vega/vega-app-header-button.entry.js +0 -452
  511. package/dist/vega/vega-banner.entry.js +0 -351
  512. package/dist/vega/vega-box.entry.js +0 -353
  513. package/dist/vega/vega-breadcrumb.entry.js +0 -249
  514. package/dist/vega/vega-button-circle.entry.js +0 -245
  515. package/dist/vega/vega-button-group.entry.js +0 -203
  516. package/dist/vega/vega-button-link.entry.js +0 -226
  517. package/dist/vega/vega-button.entry.js +0 -259
  518. package/dist/vega/vega-calendar.entry.js +0 -3884
  519. package/dist/vega/vega-card.entry.js +0 -226
  520. package/dist/vega/vega-carousel.entry.js +0 -540
  521. package/dist/vega/vega-checkbox-group.entry.js +0 -266
  522. package/dist/vega/vega-checkbox.entry.js +0 -335
  523. package/dist/vega/vega-chip.entry.js +0 -321
  524. package/dist/vega/vega-code-block.entry.js +0 -4372
  525. package/dist/vega/vega-color-picker.entry.js +0 -258
  526. package/dist/vega/vega-combo-box.entry.js +0 -748
  527. package/dist/vega/vega-date-picker-calendar.entry.js +0 -1381
  528. package/dist/vega/vega-date-picker.entry.js +0 -1646
  529. package/dist/vega/vega-dialog.entry.js +0 -158
  530. package/dist/vega/vega-divider.entry.js +0 -179
  531. package/dist/vega/vega-dropdown-content-box.entry.js +0 -57
  532. package/dist/vega/vega-dropdown-item.entry.js +0 -352
  533. package/dist/vega/vega-dropdown.entry.js +0 -2136
  534. package/dist/vega/vega-field-label.entry.js +0 -182
  535. package/dist/vega/vega-file-uploader.entry.js +0 -751
  536. package/dist/vega/vega-flag-icon.entry.js +0 -216
  537. package/dist/vega/vega-flex.entry.js +0 -224
  538. package/dist/vega/vega-font.entry.js +0 -327
  539. package/dist/vega/vega-form.entry.js +0 -1008
  540. package/dist/vega/vega-grid.entry.js +0 -129
  541. package/dist/vega/vega-icon.entry.js +0 -256
  542. package/dist/vega/vega-image-uploader.entry.js +0 -977
  543. package/dist/vega/vega-input-credit-card.entry.js +0 -549
  544. package/dist/vega/vega-input-numeric.entry.js +0 -471
  545. package/dist/vega/vega-input-passcode.entry.js +0 -728
  546. package/dist/vega/vega-input-phone-number.entry.js +0 -9143
  547. package/dist/vega/vega-input-range.entry.js +0 -693
  548. package/dist/vega/vega-input-select.entry.js +0 -1268
  549. package/dist/vega/vega-input.entry.js +0 -1735
  550. package/dist/vega/vega-item-toggle.entry.js +0 -190
  551. package/dist/vega/vega-left-nav-group.entry.js +0 -433
  552. package/dist/vega/vega-left-nav-link.entry.js +0 -317
  553. package/dist/vega/vega-left-nav-section.entry.js +0 -97
  554. package/dist/vega/vega-left-nav.entry.js +0 -654
  555. package/dist/vega/vega-loading-indicator.entry.js +0 -209
  556. package/dist/vega/vega-modal.entry.js +0 -1287
  557. package/dist/vega/vega-nav-card.entry.js +0 -163
  558. package/dist/vega/vega-pagination-page-selector-mobile.entry.js +0 -214
  559. package/dist/vega/vega-pagination.entry.js +0 -629
  560. package/dist/vega/vega-popover-content-box.entry.js +0 -101
  561. package/dist/vega/vega-popover.entry.js +0 -362
  562. package/dist/vega/vega-progress-tracker.entry.js +0 -757
  563. package/dist/vega/vega-radio-group.entry.js +0 -496
  564. package/dist/vega/vega-radio.entry.js +0 -272
  565. package/dist/vega/vega-rich-text-editor-toolbar-button.entry.js +0 -169
  566. package/dist/vega/vega-rich-text-editor.entry.js +0 -4107
  567. package/dist/vega/vega-rich-text-image-editor.entry.js +0 -216
  568. package/dist/vega/vega-rich-text-link-editor.entry.js +0 -238
  569. package/dist/vega/vega-rich-text-table-properties.entry.js +0 -641
  570. package/dist/vega/vega-rich-text-table-setting.entry.js +0 -525
  571. package/dist/vega/vega-segment-control.entry.js +0 -350
  572. package/dist/vega/vega-selection-chip-group.entry.js +0 -447
  573. package/dist/vega/vega-selection-chip.entry.js +0 -443
  574. package/dist/vega/vega-selection-tile-group.entry.js +0 -438
  575. package/dist/vega/vega-selection-tile.entry.js +0 -409
  576. package/dist/vega/vega-sidenav-link.entry.js +0 -160
  577. package/dist/vega/vega-sidenav.entry.js +0 -766
  578. package/dist/vega/vega-signature-capture.entry.js +0 -589
  579. package/dist/vega/vega-stepper.entry.js +0 -292
  580. package/dist/vega/vega-tab-group-panel.entry.js +0 -79
  581. package/dist/vega/vega-tab-group.entry.js +0 -1281
  582. package/dist/vega/vega-table-body.entry.js +0 -48
  583. package/dist/vega/vega-table-cell.entry.js +0 -243
  584. package/dist/vega/vega-table-foot-cell.entry.js +0 -169
  585. package/dist/vega/vega-table-foot-row.entry.js +0 -219
  586. package/dist/vega/vega-table-foot.entry.js +0 -136
  587. package/dist/vega/vega-table-head-cell.entry.js +0 -339
  588. package/dist/vega/vega-table-head-row.entry.js +0 -416
  589. package/dist/vega/vega-table-head.entry.js +0 -113
  590. package/dist/vega/vega-table-row.entry.js +0 -666
  591. package/dist/vega/vega-table.entry.js +0 -3707
  592. package/dist/vega/vega-textarea.entry.js +0 -329
  593. package/dist/vega/vega-time-picker.entry.js +0 -2039
  594. package/dist/vega/vega-toggle-switch.entry.js +0 -194
  595. package/dist/vega/vega-tooltip.entry.js +0 -339
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as i,H as n,g as s}from"./p-6b2342e0.js";import{I as o}from"./p-abd7aeaa.js";import{M as a,a as r}from"./p-f0ff4463.js";import{M as l,a as p}from"./p-cdbbdcc2.js";import{R as c}from"./p-280cbcdb.js";import{s as h}from"./p-519a7d55.js";import{C as d}from"./p-75b58efe.js";import{c as u,V as f,M as g,I as v}from"./p-6e1ab235.js";import{s as x}from"./p-6bd5c49b.js";import{V as m,I as b}from"./p-d849e0f5.js";import{F as w}from"./p-20010bd6.js";import{c as y}from"./p-c841be8d.js";import{D as C,a as j,d as k,y as I,V as S,i as R,H as z,I as E,J as O,K as D,L as T}from"./p-11a6c1b7.js";import{S as V}from"./p-dd11f735.js";import{S as L}from"./p-badad9ed.js";import{i as M}from"./p-1f83cebf.js";import{S as N}from"./p-22989693.js";import{i as F}from"./p-d27ae9ff.js";import{d as A}from"./p-bf19682d.js";import{p as P,q as $,r as B,m as _}from"./p-1b44db34.js";import{P as U}from"./p-10ac8b57.js";import{S as W}from"./p-0d57293b.js";import{a as K}from"./p-8c9ea6f4.js";import{c as q}from"./p-86194314.js";import{C as H}from"./p-2d0d575f.js";import{F as G}from"./p-a528714c.js";import{C as J}from"./p-8187878e.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-f69f84a7.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-3532aa12.js";import"./p-b75ee3ba.js";import"./p-ed45b3b6.js";import"./p-40f39194.js";import"./p-d884c644.js";import"./p-9472d19a.js";import"./p-5d676a94.js";const X=/^(?:[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 Y extends o{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=X.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 Q extends f{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);o>3&&a&&Object.defineProperty(e,i,a)}([u()],Q.prototype,"disableCopyPaste",void 0);var Z=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class tt extends f{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"]')}}Z([u()],tt.prototype,"host",void 0),Z([u()],tt.prototype,"prefixIcon",void 0);class et extends L{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),s=i.substring(0,e),o=(n.match(/,/g)||[]).length;return e+((s.match(/,/g)||[]).length-o)}}class it extends L{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(M(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 nt extends L{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(M(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class st extends it{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),s=t.substring(0,e),o=n.substring(0,e),a=(s.match(/,/g)||[]).length;return e+((o.match(/,/g)||[]).length-a)-(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):"",s=Number(e.split(".")[0]);return!isNaN(s)&&s<=Number.MAX_SAFE_INTEGER?s.toLocaleString("en-US")+n:e}}var ot=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class at extends N{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRenderer.getInputRef(),this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}connectedCallback(){this.initSetupMaskConfigObserver()}disconnectedCallback(){this.removeSetupMaskConfigObserver()}watchValue(t,e){t!==e&&this.formatValueAfterValueChange()}watchMaskChange(t,e){this.areMaskConfigsEqual(t,e)||this.setup()}watchTypeChange(t,e){"number"!==t&&"number"!==e||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=V.PHONE_MASK;break;case"taxId":i=V.TAX_ID_MASK;break;case"zipcode":i=V.ZIPCODE_MASK;break;case"thousand-comma":i=new et;break;case"number":i=this.getNumberTypeMaskStrategy(e.options);break;case"custom":i=e.strategy?e.strategy():new V(e.options);break;case"custom-formatter":i=new nt(e.formatter,e.resetCaretPosition)}return"number"!==this.type||"input"!==t||e||(i=new it),i}getNumberTypeMaskStrategy(t){return t&&t.thousandComma?new st(t):new it(t)}isBlurModeMaskConfig(t){return"custom"===t.type&&"blur"===t.trigger}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return F(i,n,!0,((t,e)=>A(t,e)?0:-1))}initSetupMaskConfigObserver(){C.addUniqueObserverToNode(this.host,P,this.setup.bind(this))}removeSetupMaskConfigObserver(){C.removeUniqueObserverFromNode(this.host,P)}}ot([u()],at.prototype,"maskConfig",void 0),ot([u()],at.prototype,"disableCopyPaste",void 0),ot([u()],at.prototype,"type",void 0),ot([u()],at.prototype,"inputRenderer",void 0),ot([g("connectedCallback")],at.prototype,"connectedCallback",null),ot([g("disconnectedCallback")],at.prototype,"disconnectedCallback",null),ot([g("watchValue")],at.prototype,"watchValue",null),ot([g("watchMaskChange")],at.prototype,"watchMaskChange",null),ot([g("watchTypeChange")],at.prototype,"watchTypeChange",null);const rt=[{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 lt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class pt extends f{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}}lt([u()],pt.prototype,"host",void 0),lt([u()],pt.prototype,"value",void 0),lt([u()],pt.prototype,"placeholder",void 0),lt([u()],pt.prototype,"isCompactInputWidth",void 0),lt([u()],pt.prototype,"suffixText",void 0),lt([g("componentDidLoad")],pt.prototype,"componentDidLoad",null),lt([g("watchValue")],pt.prototype,"watchValue",null),lt([g("watchSuffixText")],pt.prototype,"watchSuffixText",null);var ct=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class ht extends W{constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"prefixText",parentStateName:"prefixText"},{subStateName:"suffixText",parentStateName:"suffixText"},{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}ct([u()],ht.prototype,"host",void 0),ct([u({writable:!0})],ht.prototype,"prefixText",void 0),ct([u({writable:!0})],ht.prototype,"suffixText",void 0),ct([u({writable:!0})],ht.prototype,"isCompactInputWidth",void 0);var dt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class ut extends f{render(){return t("vega-button-circle",{icon:K.getIconKey(this.isPasswordDisplay?"eye":"eye-slash"),variant:"icon-only",size:"small",class:"password-eye-button",ref:t=>{this.addEyeIconObserver(t)}})}addEyeIconObserver(t){C.addUniqueObserverToNode(t,j,(()=>{this.isPasswordDisplay=!this.isPasswordDisplay}))}}K.register({eye:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 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="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>'},"eye-slash":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 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="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"/></svg>'}}),dt([u()],ut.prototype,"host",void 0),dt([u({writable:!0})],ut.prototype,"isPasswordDisplay",void 0),dt([u()],ut.prototype,"type",void 0);var ft=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class gt extends f{constructor(){super(...arguments),this.renderPrefixText=()=>this.prefixText&&t("div",{class:"prefix-text"},this.prefixText),this.renderSuffixText=()=>this.suffixText&&t("div",{class:"suffix-text"},this.suffixText),this.onClickClearIcon=()=>{H.notify(k.getSubject(this.host,$),"")},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value),this.onClearInputFocus=()=>{this.inputContainerRef.classList.add("no-focus")},this.onClearInputBlur=()=>{this.inputContainerRef.classList.remove("no-focus")},this.onContainerClick=()=>{H.notify(k.getSubject(this.host,B),{})}}getInputContainerRef(){return this.inputContainerRef}render(){return t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:{"vega-input-container":!0,"with-value":!!this.value,[`vega-input-size-${this.size}`]:!0,"vega-input-disabled":this.disabled,"compact-input-width":this.isCompactInputWidth},onClick:this.onContainerClick,"aria-label":"input container","aria-disabled":`${this.disabled}`,role:"textbox",tabIndex:this.disabled?null:-1,onKeyDown:q()},this.prefixSlotRenderer.render(),this.renderPrefixText(),this.inputRenderer.render(),this.renderSuffixText(),"password"===this.type?this.passwordEyeRenderer.render():this.showClearIcon&&this.renderClearIcon())}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:q(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}}ft([u()],gt.prototype,"host",void 0),ft([u()],gt.prototype,"value",void 0),ft([u()],gt.prototype,"size",void 0),ft([u()],gt.prototype,"disabled",void 0),ft([u()],gt.prototype,"type",void 0),ft([u()],gt.prototype,"showClearIcon",void 0),ft([u()],gt.prototype,"prefixText",void 0),ft([u()],gt.prototype,"suffixText",void 0),ft([u()],gt.prototype,"isCompactInputWidth",void 0),ft([u()],gt.prototype,"prefixSlotRenderer",void 0),ft([u()],gt.prototype,"passwordEyeRenderer",void 0),ft([u()],gt.prototype,"inputRenderer",void 0);var vt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class xt extends f{constructor(){super(...arguments),this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.notifySetupMaskConfig())},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.onInputHandler=()=>{"change"!==this.valueUpdateTrigger&&this.notifyInputValueChange()},this.inputChangeHandler=()=>{"change"===this.valueUpdateTrigger&&this.notifyInputValueChange()}}connectedCallback(){this.initInputFocusObserver()}disconnectedCallback(){this.removeInputFocusObserver()}doFocus(){this.focusInput()}doBlur(){this.inputRef.blur()}getInputRef(){return this.inputRef}render(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:this.getInputType(),autoComplete:this.autocomplete,inputmode:this.inputmode,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())))}getInputType(){switch(this.type){case"number":return"text";case"password":return this.isPasswordDisplay?"text":"password";default:return this.type}}notifyInputValueChange(){this.inputRef.value!==this.value&&this.nativeInputChangeEventEmitter.emit(this.inputRef.value),H.notify(k.getSubject(this.host,$),this.inputRef.value)}notifySetupMaskConfig(){H.notify(k.getSubject(this.host,P),{})}initInputFocusObserver(){C.addUniqueObserverToNode(this.host,B,this.focusInput.bind(this))}removeInputFocusObserver(){C.removeUniqueObserverFromNode(this.host,B)}focusInput(){this.inputRef.focus()}}vt([u()],xt.prototype,"host",void 0),vt([u()],xt.prototype,"value",void 0),vt([u()],xt.prototype,"disabled",void 0),vt([u()],xt.prototype,"type",void 0),vt([u()],xt.prototype,"label",void 0),vt([u()],xt.prototype,"name",void 0),vt([u()],xt.prototype,"autocomplete",void 0),vt([u()],xt.prototype,"inputmode",void 0),vt([u()],xt.prototype,"placeholder",void 0),vt([u()],xt.prototype,"minLength",void 0),vt([u()],xt.prototype,"maxLength",void 0),vt([u()],xt.prototype,"isPasswordDisplay",void 0),vt([u()],xt.prototype,"valueUpdateTrigger",void 0),vt([u()],xt.prototype,"focusEventEmitter",void 0),vt([u()],xt.prototype,"blurEventEmitter",void 0),vt([u()],xt.prototype,"pasteEventEmitter",void 0),vt([u()],xt.prototype,"copyPasteController",void 0),vt([u()],xt.prototype,"nativeInputChangeEventEmitter",void 0),vt([g("connectedCallback")],xt.prototype,"connectedCallback",null),vt([g("disconnectedCallback")],xt.prototype,"disconnectedCallback",null),vt([g("doFocus")],xt.prototype,"doFocus",null),vt([g("doBlur")],xt.prototype,"doBlur",null);var mt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class bt extends f{constructor(){super(...arguments),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()},this.handleLabelClick=()=>{H.notify(k.getSubject(this.host,B),{})}}render(){return t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),this.renderInputContainer(),this.renderHintDom())}renderInputContainer(){return this.renderModeController.isSource()||this.renderModeController.isTemplate()?this.inputSuggestionsRenderer.render(this.inputContainerRenderer.render()):this.inputContainerRenderer.render()}renderLabelDom(){return t("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label,suffixButtonProps:this.labelSuffixButtonProps,suffixButtonConfig:this.labelSuffixButtonConfig,ref:t=>{C.addUniqueObserverToNode(t,I,this.handleLabelButtonClick),C.addUniqueObserverToNode(t,j,this.handleLabelClick)}})}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}}mt([u()],bt.prototype,"host",void 0),mt([u()],bt.prototype,"disabled",void 0),mt([u()],bt.prototype,"required",void 0),mt([u()],bt.prototype,"label",void 0),mt([u()],bt.prototype,"hint",void 0),mt([u()],bt.prototype,"labelSuffixButtonProps",void 0),mt([u()],bt.prototype,"labelSuffixButtonConfig",void 0),mt([u()],bt.prototype,"labelButtonClickEventEmitter",void 0),mt([u()],bt.prototype,"inputContainerRenderer",void 0),mt([u()],bt.prototype,"inputSuggestionsRenderer",void 0),mt([u()],bt.prototype,"renderModeController",void 0);var wt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class yt extends f{connectedCallback(){this.initValueUpdateObserver()}disconnectedCallback(){this.removeValueUpdateObserver()}watchValue(t){this.changeEventEmitter.emit(t);const e=this.inputRenderer.getInputRef();e.value!==this.value&&(e.value=this.value),H.notify(G,{host:this.host,detail:this.value})}initValueUpdateObserver(){C.addUniqueObserverToNode(this.host,$,this.setValue.bind(this))}removeValueUpdateObserver(){C.removeUniqueObserverFromNode(this.host,$)}setValue(t){this.value=t}}wt([u()],yt.prototype,"host",void 0),wt([u({writable:!0})],yt.prototype,"value",void 0),wt([u()],yt.prototype,"changeEventEmitter",void 0),wt([u()],yt.prototype,"inputRenderer",void 0),wt([g("connectedCallback")],yt.prototype,"connectedCallback",null),wt([g("disconnectedCallback")],yt.prototype,"disconnectedCallback",null),wt([g("watchValue")],yt.prototype,"watchValue",null);var Ct=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class jt extends f{constructor(){super(...arguments),this.templateItems=[],this.onDropdownItemClick=async t=>{const e=this.renderModeController.isTemplate()?this.templateItems:this.suggestionsDropdownSource,i=this.findItem(e,t.detail);if(i){const t=this.suggestionItemClickEventEmitter.emit(i);H.notify(k.getSubject(this.host,$),t.defaultPrevented?this.value:i.label)}}}appendHostItemsToDropdown(){this.renderModeController.isTemplate()&&this.itemsSlotRef&&this.dropdownRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(this.host.querySelector("[slot=items]")))}async showSuggestionsDropdown(t={}){this.suggestionsDropdownConfig=t,await this.showSuggestions()}async hideSuggestionsDropdown(){await this.dropdownRef.hide()}async watchValue(){await this.searchSuggestions()}async watchSuggestionsDropdownSource(){await this.searchSuggestions()}render(e){return t("vega-dropdown",Object.assign({},this.suggestionsDropdownConfig,{source:this.suggestionsDropdownSource,trigger:new J,matchTargetWidth:!0,searchable:!1,placement:["top","bottom"],translocation:{X:0,Y:6},ref:t=>{this.dropdownRef=t,this.addDropdownObserver(t)},style:{display:"block"}}),e,this.renderItemsSlot())}renderItemsSlot(){return this.renderModeController.isTemplate()&&t("div",{slot:"items",ref:t=>{this.itemsSlotRef=t}})}addDropdownObserver(t){C.addUniqueObserverToNode(t,S,this.onDropdownItemClick.bind(this)),C.addUniqueObserverToNode(t,_,(t=>{this.templateItems=Array.from(t).map((t=>({key:t.itemKey,label:t.label})))}))}findItem(t,e){for(const i of t){if(i.children&&i.children.length>0){const t=this.findItem(i.children,e);if(t)return t}if(i.key.toString()===e)return i}return null}async showSuggestions(){(this.renderModeController.isSource()||this.renderModeController.isTemplate())&&await this.dropdownRef.show()}async searchSuggestions(){this.renderModeController.isSource()&&this.suggestionsDropdownSource.length>0&&await this.dropdownRef.search(this.value)}}Ct([u()],jt.prototype,"host",void 0),Ct([u()],jt.prototype,"value",void 0),Ct([u({writable:!0})],jt.prototype,"suggestionsDropdownConfig",void 0),Ct([u()],jt.prototype,"suggestionsDropdownSource",void 0),Ct([u()],jt.prototype,"renderModeController",void 0),Ct([u()],jt.prototype,"suggestionItemClickEventEmitter",void 0),Ct([g("componentDidLoad")],jt.prototype,"appendHostItemsToDropdown",null),Ct([g("showSuggestionsDropdown")],jt.prototype,"showSuggestionsDropdown",null),Ct([g("hideSuggestionsDropdown")],jt.prototype,"hideSuggestionsDropdown",null),Ct([g("watchValue")],jt.prototype,"watchValue",null),Ct([g("watchSuggestionsDropdownSource")],jt.prototype,"watchSuggestionsDropdownSource",null);var kt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class It extends f{constructor(){super(...arguments),this.hasItemsSlot=!1,this.hasDropdownSource=!1}connectedCallback(){this.setRenderMode()}isSource(){return this.hasDropdownSource}isTemplate(){return this.hasItemsSlot}setRenderMode(){this.hasItemsSlot=!!this.host.querySelector("[slot=items]"),this.hasDropdownSource=Array.isArray(this.suggestionsDropdownSource)}}kt([u()],It.prototype,"host",void 0),kt([u()],It.prototype,"suggestionsDropdownSource",void 0),kt([g("connectedCallback")],It.prototype,"connectedCallback",null);var St=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};const Rt=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaNativeInputChange=i(this,"vegaNativeInputChange",7),this.nativeInputChange=i(this,"nativeInputChange",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.vegaSuggestionItemClick=i(this,"vegaSuggestionItemClick",7),this.suggestionItemClick=i(this,"suggestionItemClick",7),this.globalSlimmers={},this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new c:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new a({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new r({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new l({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new p({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new Y:null},{propertyName:"type",ruleFactory:t=>"email"===t?new Y:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRenderer.getInputContainerRef(),touchableAreaGetter:()=>[this.inputRenderer.getInputRef()]}),this.pageResizeObserverSlimmer=new U({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.renderModeController=new It,this.copyPasteController=new Q,this.compactWidthController=new pt,this.stateController=new ht,this.maskConfigController=new at,this.valueController=new yt,this.prefixSlotRenderer=new tt,this.renderer=new bt,this.inputContainerRenderer=new gt,this.inputRenderer=new xt,this.inputSuggestionsRenderer=new jt,this.changeEventEmitter=y(Rt,R),this.nativeInputChangeEventEmitter=y(Rt,z),this.focusEventEmitter=y(Rt,E),this.blurEventEmitter=y(Rt,O),this.labelButtonClickEventEmitter=y(Rt,I),this.suggestionItemClickEventEmitter=y(Rt,D),this.pasteEventEmitter=y(Rt,T),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(rt),this.passwordEyeRenderer=new ut,this.label="",this.labelSuffixButtonProps=null,this.labelSuffixButtonConfig=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}watchSuffixText(){}watchValue(t){}watchTypeChange(t,e){}watchValidationRules(){}watchMaskChange(t,e){}watchSuggestionsDropdownSource(){}async doFocus(){}async doBlur(){}async showSuggestionsDropdown(t){}async hideSuggestionsDropdown(){}render(){return x(t("slot",null)),h(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.renderer.render()),this.host)}get host(){return s(this)}static get watchers(){return{suffixText:["watchSuffixText"],value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"],suggestionsDropdownSource:["watchSuggestionsDropdownSource"]}}};St([b()],Rt.prototype,"globalSlimmers",void 0),St([v()],Rt.prototype,"formFieldController",void 0),St([v()],Rt.prototype,"pageResizeObserverSlimmer",void 0),St([v()],Rt.prototype,"renderModeController",void 0),St([v()],Rt.prototype,"copyPasteController",void 0),St([v()],Rt.prototype,"compactWidthController",void 0),St([v()],Rt.prototype,"stateController",void 0),St([v()],Rt.prototype,"maskConfigController",void 0),St([v()],Rt.prototype,"valueController",void 0),St([v()],Rt.prototype,"prefixSlotRenderer",void 0),St([v()],Rt.prototype,"renderer",void 0),St([v()],Rt.prototype,"inputContainerRenderer",void 0),St([v()],Rt.prototype,"inputRenderer",void 0),St([v()],Rt.prototype,"inputSuggestionsRenderer",void 0),St([v()],Rt.prototype,"changeEventEmitter",void 0),St([v()],Rt.prototype,"nativeInputChangeEventEmitter",void 0),St([v()],Rt.prototype,"focusEventEmitter",void 0),St([v()],Rt.prototype,"blurEventEmitter",void 0),St([v()],Rt.prototype,"labelButtonClickEventEmitter",void 0),St([v()],Rt.prototype,"suggestionItemClickEventEmitter",void 0),St([v()],Rt.prototype,"pasteEventEmitter",void 0),St([v()],Rt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),St([v()],Rt.prototype,"passwordEyeRenderer",void 0),St([d()],Rt.prototype,"watchMaskChange",null),Rt.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}}.vega-input-container .password-eye-button{width:16px;height:16px}.vega-input-container .password-eye-button::part(button){width:16px;height:16px;padding:0px}.vega-input-container .password-eye-button::part(button):hover{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}@supports (-webkit-touch-callout: none){:host([data-vega-form=pageSelectorMobile_goTo]) .vega-input-container input{box-sizing:border-box;padding-left:0px;padding-right:0px}}';export{Rt as vega_input}
@@ -1 +1 @@
1
- import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-ff57c872.js";import{e as s,f as n}from"./p-1b44db34.js";import{c as r}from"./p-02841589.js";import{L as i}from"./p-6e1ab235.js";import{i as o}from"./p-161b9c5b.js";import{g as c}from"./p-a4670e23.js";import{V as a}from"./p-ef9cbad1.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 s=this.rootDomToContentEntity.get(t);s&&s!==e&&this.contentEntityToRootDom.delete(s),this.rootDomToContentEntity.set(t,e),this.contentEntityToRootDom.set(e,t)}isVegaRTEContent(t){return t&&"VegaRTEContent"===t.constructor.name}};var x,E,g,w;!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",t.PASTE_CONTENT="PASTE_CONTENT"}(x||(x={}));class m{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,s)=>{t.linkGroups.set(s,e.map((t=>t.clone(t.parent))))})),t}toString(t,e){const s=this.toJsx(t,e);return Object.entries(s).map((([t,e])=>{const s="string"==typeof e?e:this.formatStyleToString(e);return`${r(t)}="${s}"`})).join(" ")}toJsx(t,e){const s=this.getStyle(t,e),n=this.getClass(t,e),r=this.getAttribute(t);return n.length>0&&(r.class=n.join(" ")),s&&Object.keys(s).length>0&&(r.style=s),r}getClass(t,e){const s=[];return t.link.customClass&&s.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&s.push("v-rte--link"),s}getStyle(t,e){const s={};return t.link.customStyle&&Object.assign(s,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&(s.color="rgba(var(--v-text-link, 19, 98, 226, 1))"),s}getAttribute(t){const{href:e,customAttribute:s={}}=t.link,n=t.useInternalStyle,r=s.target||(n?"_blank":"");return Object.assign(Object.assign(Object.assign({},s),e||n?{href:e}:{}),r?{target:r}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${r(t)}: ${e};`)).join(" ")}}class O extends f{constructor(t){super(),this.type=d.ALIGNMENT,this.textAlign=t}static from(t){return[d.ALIGNMENT,new O(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 O(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 N extends f{constructor(t){super(),this.type=d.INDENT,this.indent=Math.max(0,t)}static from(t){return[d.INDENT,new N(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new N(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class R{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).has(t)||this.registry.get(e).set(t,new Set),this.registry.get(e).get(t).add(s)}static unregister(t,e,s){const n=this.registry.get(e);if(n){const e=n.get(t);e&&e.delete(s)}}static get(t,e){const s=t instanceof m?t.type:t.constructor.name,n=this.registry.get(e.constructor.name);if(n){const r=n.get(s);if(r&&r.size>0)return Array.from(r).find((s=>s.canIntercept(t,e)))}}}R.registry=new Map;class y{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,s)}static unregister(t,e){const s=this.registry.get(e);s&&s.delete(t)}static get(t,e){const s=this.registry.get(e);if(s)return s.get(t)}static executeTheStrategy(t,e){const s=R.get(t,e),n=()=>{const s=t instanceof m?t.type:t.constructor.name,n=y.get(s,e.constructor.name);if(n)return t.executedFlag=!0,n.execute(t,e);i.warn(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)};return s?s.intercept(n,t,e):n()}static canHandle(t,e){return!!y.get(t,e.constructor.name)}}y.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(E||(E={}));class S extends p{}class C extends S{constructor(t){super(),this.type=E.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[E.CUSTOM_ATTRIBUTE,new C(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new C(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 s=Object.assign({},this.customAttribute);return null===(e=t.filterAttributes)||void 0===e||e.forEach((t=>delete s[t])),Object.keys(s).forEach((t=>{this.BOOLEAN_ATTRS.has(t)&&""===s[t]&&(s[t]="true")})),s}}class b extends S{constructor(t){super(),this.type=E.CUSTOM_CLASS,this.customClass=t}static from(t){return[E.CUSTOM_CLASS,new b(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new b(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class B extends S{constructor(t){super(),this.type=E.CUSTOM_STYLE,this.customStyle=t}static from(t){return[E.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}}!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{}class _{constructor(t){this.dtoType=t instanceof RTEBlock?"block":"node",this.annotationMap=t.annotationMap}toCssText(t={standalone:!1},e,s){return s=s||this.toJSON(t,e),Object.entries(Object.assign({},s)).map((([t,e])=>`${r(t)}: ${e};`)).join("")}toJSON(t={standalone:!1},e){const s=Array.from(this.annotationMap.values()).filter((t=>this.filterAnnotation(t)||t instanceof B)).map((e=>e.renderStyle(t))).filter(o);return e&&e.length>0?this.mergeAnnotationStyles(s,e):s.reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})}filterAnnotation(t){return"block"===this.dtoType?t instanceof f:t instanceof v}mergeAnnotationStyles(t,e){const s={};for(const n of t)for(const t in n){const r=n[t],i=s[t];s[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return s}}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(w||(w={}));class RTENode{constructor(t,e){this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}static from(t,e,s){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}, ${s}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return C.from(e);case"customClass":return b.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}){return new _(this).toJSON(t,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof b)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(E.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return T.getDOMByEntity(this)}generateAttributeString(...t){var e;const s=new _(this).toCssText({standalone:!0},["textDecoration"]),n=this.annotationMap.get(E.CUSTOM_CLASS),r=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==n?void 0:n.toString(),s?`style="${s}"`:null,...t].filter(o);return r.length?` ${r.join(" ")}`:""}doApply(t){t instanceof m?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const n=T.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}doAnnotationActionApply(t){}doModifyActionApply(t){}}const L=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 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 generateBlockChildren(t,e,s){return t.map((t=>{const n=L.getRTEBlockClass(t.type);if(n){const r=n.from(t,e);return r.parent=s,r}})).filter(o)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return O.from(e);case"indent":return N.from(e);case"customAttribute":return C.from(e);case"customClass":return b.from(e);case"customStyle":return B.from(e);case"internalWrapper":return k.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,s])=>{const n=this.createAnnotationEntity(e,s);o(n)&&t.set(...n)}))}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 S)).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(n){if(this.doApply(n),n.isFlushable){const n=T.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}getFirstNode(){if(!this.children||!this.children[0])return null;const t=this.children[0];return t instanceof RTEBlock?t.getFirstNode():t}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){const e=new _(this).toJSON(t);return Object.assign(Object.assign({},e),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof b)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(E.CUSTOM_ATTRIBUTE)}generateAttributeString(...t){var e;const s=new _(this).toCssText({standalone:!0}),n=this.annotationMap.get(E.CUSTOM_CLASS),r=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==n?void 0:n.toString(),s?`style="${s}"`:null,...t].filter(o);return r.length?` ${r.join(" ")}`:""}doApply(t){t instanceof m?y.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();if(e instanceof A||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply)this.doAnnotationActionApply(t);else{const e=y.get(t.constructor.name,this.constructor.name);e&&e.execute(t,this)}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}class j{}class D extends j{constructor(){super(...arguments),this.doSplit=!0}}class I extends p{constructor(t){super(),this.type=u.SELECTION_RANGE,this.range=t}clone(){return new I(this.range)}}class $ extends v{constructor(t){super(),this.type=g.STRIKETHROUGH,this.strikethrough=t}static from(t){return[g.STRIKETHROUGH,new $(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new $(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 M extends v{constructor(t){super(),this.type=g.UNDERLINE,this.underline=t}static from(t){return[g.UNDERLINE,new M(t)]}toJSON(){return{underline:this.underline}}clone(){return new M(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 H extends v{constructor(t){super(),this.type=g.ITALIC,this.italic=t}static from(t){return[g.ITALIC,new H(t)]}toJSON(){return{italic:this.italic}}clone(){return new H(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 P extends v{constructor(t){super(),this.type=g.BOLD,this.bold=t}static from(t){return[g.BOLD,new P(t)]}toJSON(){return{bold:this.bold}}clone(){return new P(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 F 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 F(t,e)]}toJSON(){return{code:this.code}}clone(){return new F(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 J={key:"black",light:"#111128",dark:"#E3E3E8"},K=[J,{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"}],U="​",W=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]];class G extends v{constructor(t){super(),this.type=g.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[g.TEXT_COLOR,new G(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new G(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:a.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return K.find((e=>e.key===t))||K[0]}}class z 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 z(t,e)]}toJSON(){return{link:this.link}}clone(){return new z(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class V extends j{constructor(t,e,s){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=s}toAnnotation(){return new A(this.groupKey)}}class X extends j{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class q{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 s=t.annotationMap.get(E.CUSTOM_STYLE);s&&this.isCustomStyle(s,e)&&t.annotationMap.set(s.type,new B(s.removeStyles(e)))}createNewParagraph(t){const e=L.getRTEBlockClass("paragraph");if(e)return e.from({id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.constructor.name?e:this.getRootContent(e)}isCaretPositionAtBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtBlockEnd(t,e,s){return e.isContentEditable()?this.isCaretPositionAtTextBlockEnd(t,e,s):this.isCaretPositionAtDecoratorBlockEnd(t,e,s)}getDOMByEntity(t){return T.getDOMByEntity(t)}isCaretPositionAtTextBlockEnd(t,e,s){const n=t.children[t.children.length-1];return e===n&&(e.isEmpty()||s===n.text.length)}isCaretPositionAtDecoratorBlockEnd(t,e,s){return e===t.children[t.children.length-1]&&0!==s}isCustomStyle(t,e){return e.some((e=>Object.keys(t.customStyle).includes(e)))}}class Y extends m{constructor(t){super(),this.type=x.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class Q extends q{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(u.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof D&&t.doSplit&&s){const{startContainer:t,endContainer:n,startOffset:r,endOffset:i}=s.range,o=t===n&&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(s.range)&&e.isContentEditable()){const n=this.splitTextNode(s.range,e);return t.annotationMap.has("LINK")&&t.apply(new Y(n)),n}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const s=e.cloneWithText("");this.setApplyTargetNode(s);const n=e.parent.children.findIndex((t=>t===e));return 0===t||!e.isContentEditable()&&t===n?[s,e]:t===e.text.length||!e.isContentEditable()&&t===n+1?[e,s]:[e.cloneWithText(e.text.substring(0,t)),s,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:s,startOffset:n,endOffset:r}=t;return e!==s||n>0||r<(s.textContent?s.textContent.length:0)}splitTextNode(t,e){const{startContainer:s,endContainer:n,startOffset:r}=t,i=s.parentElement,o=n.parentElement,c=(t,s,n)=>{const r=t.substring(0,s),i=t.substring(s,n),o=t.substring(n);return[e.cloneWithText(r),e.cloneWithText(i),e.cloneWithText(o)]},a=i&&T.getEntityByDOM(i),l=o&&T.getEntityByDOM(o);if(a&&a.id===e.id){const i=s===n?t.endOffset:e.text.length,[o,a,l]=c(e.text,r,i);return this.setApplyTargetNode(a),[o,a,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[s,n,r]=c(e.text,0,t.endOffset);return this.setApplyTargetNode(n),[s,n,r].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}class Z extends D{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new P(this.bold)}}class tt 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,E.CUSTOM_STYLE]}}class et extends D{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new tt}}class st extends D{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new F(this.code)}}class nt extends j{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class rt extends D{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new H(this.italic)}}class it extends D{constructor({link:t,newText:e,needMergeNode:s,doSplit:n,type:r}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=s,this.newText=e,this.type=r,o(n)&&(this.doSplit=n)}toAnnotation(){return new z(this.link)}}class ot extends D{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new $(this.strikethrough)}}class ct extends D{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new M(this.underline)}}class at extends q{handleAction(t,e){const s=t.toAnnotation();if(t instanceof nt)e.annotationMap.delete(t.annotationType);else{if(!(s instanceof tt))return s instanceof v||s instanceof I?(t instanceof it&&(o(t.newText)&&(e.text=t.newText),e.parent.apply(new V(t.link.groupKey,[e],t.type))),t instanceof st&&this.handleAction(new et,e),t instanceof Z&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof rt&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof ct||t instanceof ot)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(s.type,s)):void 0;s.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class lt extends m{constructor(){super(...arguments),this.type=x.DELETE_LINK_GROUP}}class ht extends q{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new lt)}}class ut extends m{constructor(t){super(),this.type=x.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class dt extends q{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,s){if(e&&e.startContainer&&e.endContainer){const{startContainer:n,endContainer:r,startOffset:i,endOffset:o}=e;let c=s.text;if(n===r&&i===o&&t)c=s.text.slice(0,i)+t+s.text.slice(i);else{const e=n.parentElement,a=r.parentElement,l=e&&T.getEntityByDOM(e),h=a&&T.getEntityByDOM(a);let u=0,d=s.text.length;l&&l===s?(u=i,d=n===r?o:d):h&&h===s&&(d=o),c=s.text.slice(0,u)+t+s.text.slice(d)}s.apply(new ut(c))}}}class pt extends p{constructor(t){super(),this.type=g.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:s,customStyle:n,customClass:r,customAttribute:i}=t,o=new pt(e);return o.child=s?pt.from(s)[1]:void 0,o.customAttribute=i?C.from(i)[1]:void 0,o.customClass=r?b.from(r)[1]:void 0,o.customStyle=n?B.from(n)[1]:void 0,[g.INLINE_HTML,o]}clone(){var t,e,s,n;const r=new pt(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===(s=this.customClass)||void 0===s?void 0:s.clone(),r.customStyle=null===(n=this.customStyle)||void 0===n?void 0:n.clone(),r}toJSON(){var t,e,s,n;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===(s=this.customClass)||void 0===s?void 0:s.toJSON().customClass,customStyle:null===(n=this.customStyle)||void 0===n?void 0:n.toJSON().customStyle})}}}class ft extends q{handleAction(t,e){const s=e.parent.getAnnotationByType(u.LINK_GROUP);if(s){const n=e.annotationMap.get("LINK").link.groupKey,r=s.linkGroups.get(n);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),s.linkGroups.set(n,r))}}}}class Tt extends q{handleAction(t,e){const s=e.parent.getAnnotationByType(u.LINK_GROUP);if(s){const t=e.annotationMap.get(g.LINK).link.groupKey,n=s.linkGroups.get(t);if(n){const r=n.indexOf(e);-1!==r&&n.splice(r,1),0===n.length&&s.linkGroups.delete(t),0===s.linkGroups.size&&e.parent.annotationMap.delete(u.LINK_GROUP)}}e.annotationMap.delete(g.LINK)}}class xt extends v{constructor(t){super(),this.type=g.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[g.PLAIN_TEXT,new xt(t)]}clone(){return new xt(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class Et extends D{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new G(this.textColor)}}class RTETextNode extends RTENode{constructor(t,e,s,n){super(t,n),this.type=w.TEXT,this.parent=s,this.text=e,this.registerModifyStrategy()}static supportsHtmlTag(t){return["span","code"].includes(t)}static from(t,e,s={autoMatchFormat:!0}){const n=new RTETextNode(t.id,t.text,e),{annotations:r}=t;return r&&(n.annotationMap=this.generateTextAnnotationMap(r,s,e,n)),n}static generateTextAnnotationMap(t,e,s,n){return new Map(Object.keys(t).map((r=>("link"===r&&t.link&&s&&n&&s.apply(new V(t.link.groupKey,[n],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(o))}static createAnnotationEntity(t,e,s){const n=!(!s||!s.autoMatchFormat);switch(t){case"bold":return P.from(e);case"italic":return H.from(e);case"underline":return M.from(e);case"strikethrough":return $.from(e);case"code":return F.from(e,n);case"textColor":return G.from(e);case"link":return z.from(e,n);case"inlineHtml":return pt.from(e);case"plainText":return xt.from(e)}return RTENode.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof S||t instanceof pt)).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(c(),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()&&(y.register(x.UPDATE_TEXT,t,new ht),y.register(x.REPLACE_SELECTED_TEXT,t,new dt),y.register(x.LINK_GROUP_NODE_SPLIT,t,new ft),y.register(it.name,t,new at)),y.register(D.name,t,new Q),y.register(x.DELETE_LINK_GROUP,t,new Tt),y.register(Z.name,t,new at),y.register(et.name,t,new at),y.register(rt.name,t,new at),y.register(ct.name,t,new at),y.register(Et.name,t,new at),y.register(ot.name,t,new at),y.register(st.name,t,new at),y.register(j.name,t,new at),RTETextNode.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(u.SELECTION_RANGE);if(t instanceof D&&t.doSplit&&e){const e=y.get(D.name,this.constructor.name);if(e){const s=e.execute(t,this);s&&this.applyActionToNode(s,t)}}else this.applyActionToNode(this,t);"function"==typeof this.parent.mergeNodes&&this.parent.mergeNodes(t)}doModifyActionApply(t){y.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof X)return void this.syncUpSelectedNodes(t);s instanceof I||this.syncUpSelectedNodes(t);const n=y.get(e.constructor.name,t.constructor.name);if(n)return void n.execute(e,t);const r=y.get(j.name,RTETextNode.name);r&&r.execute(e,t)}syncUpSelectedNodes(s){const r=this.getElementRef();if(r){const i=e.getSubjectFromParentNodeByEventId(r,n);i&&t.notify(i,{node:s})}}renderWithWrapperStr(t){const{htmlTag:e,customAttribute:s,customClass:n,customStyle:r,child:i}=t,c=[...(null==s?void 0:s.toString())||[],null==n?void 0:n.toString(),null==r?void 0:r.toString()].filter(o),a=c.length>0?` ${c.join(" ")}`:"";return i?`<${e}${a}>${this.renderWithWrapperStr(i)}</${e}>`:`<${e}${a}>${this.renderTextStr()}</${e}>`}renderTextStr(){var t;const e=(null===(t=this.getAnnotationByType(g.CODE))||void 0===t?void 0:t.code)?"code":"span",s=super.generateAttributeString();return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${e}${s}>${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 z)&&!(t instanceof xt)||t instanceof S)).length}}RTETextNode.registerActionStrategyStatus={},RTETextNode.htmlTag="span";class gt extends m{constructor(t){super(),this.type=x.APPEND_CHILDREN,this.entityToBeAppended=t}}class wt extends f{constructor(t){super(),this.type=d.TEXT_STYLE,this.textStyle=t}static from(t){return[d.TEXT_STYLE,new wt(t)]}toJSON(){return{textStyle:this.textStyle}}clone(){return new wt(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",minHeight:"22px",fontWeight:"500"},s=Object.assign(Object.assign({},e),{marginTop:"0px",marginBottom:"0px"});switch(this.textStyle){case"paragraph":return s;case"title":return Object.assign(Object.assign({},e),{fontSize:"36px",lineHeight:"40px",minHeight:"40px"});case"subtitle":return Object.assign(Object.assign({},e),{fontSize:"28px",lineHeight:"32px",minHeight:"32px"});case"heading-1":return Object.assign(Object.assign({},e),{fontSize:"22px",lineHeight:"24px",minHeight:"24px",marginTop:"0px",marginBottom:"0px"});case"heading-2":return Object.assign(Object.assign({},e),{fontSize:"20px",lineHeight:"24px",minHeight:"24px",marginTop:"0px",marginBottom:"0px"});case"heading-3":return Object.assign(Object.assign({},e),{fontSize:"18px",lineHeight:"22px",minHeight:"22px",marginTop:"0px",marginBottom:"0px"});case"heading-4":return Object.assign(Object.assign({},e),{fontSize:"16px",lineHeight:"22px",minHeight:"22px",marginTop:"0px",marginBottom:"0px"});case"heading-5":return Object.assign(Object.assign({},e),{fontSize:"14px",lineHeight:"22px",minHeight:"22px",marginTop:"0px",marginBottom:"0px"});case"heading-6":return Object.assign(Object.assign({},e),{fontSize:"12px",lineHeight:"22px",minHeight:"22px",marginTop:"0px",marginBottom:"0px"})}}}class mt extends j{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new wt(this.textStyle)}}class At extends q{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new Z(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new nt(g.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}class Ot extends m{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class Nt extends m{constructor(t){super(),this.type=x.REPLACE_CHILD_NODES,this.newChildNodes=t}}class Rt extends q{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,s){if(t){const n=t.text.slice(0,e),r=t.text.slice(e),i=s.children.indexOf(t);if(i>-1){const e=s.children.slice(0,i),o=s.children.slice(i+1);n&&e.push(t.cloneWithText(n)),r&&o.unshift(t.cloneWithText(r)),s.apply(new Nt(e));const c=s.cloneWithNodes(o);return s.parent.apply(new Ot(s,c)),c}}}}class yt extends q{handleAction(t,e){e.children=[],e.apply(new gt(t.newChildNodes))}}class St extends m{constructor(t){super(),this.type=x.DELETE_CHILDREN,this.entityToBeRemoved=t}}class Ct extends q{handleAction(t,e){const s=t.blockNeedToBeMerged;if(e.type===s.type||"image"!==e.type&&"image"!==s.type){let t=s.children;"image"!==s.type&&(t=s.children.filter((t=>t.text))),e.apply(new gt(t)),s.parent.apply(new St(s))}}}class bt extends q{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new RTETextNode(c(),"\n",s),r=t.text.slice(0,e),i=t.text.slice(e),o=s.children.indexOf(t);if(o>-1){const e=s.children.slice(0,o),c=s.children.slice(o+1);r&&e.push(t.cloneWithText(r)),i&&c.unshift(t.cloneWithText(i)),this.mergeLineBreakNodes(e,n,c,s)}return n}}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new RTETextNode(c(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Nt([...t,e,...s]))}}class Bt extends q{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new RTETextNode(c(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,r,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new St(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new RTETextNode(c(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Nt([...t,e,...s]))}}class kt extends m{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class vt extends m{constructor(t,e){super(),this.type=x.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class _t extends j{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new O(this.textAlign)}}class Lt extends q{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class jt extends j{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new N(this.indent)}}class RTETextBlock extends RTEBlock{constructor(t,e,s){super(t),this.children=[],this.type=e;const{autoMatchFormat:n}=s||{autoMatchFormat:!0};n&&(this.annotationMap=RTETextBlock.isAcceptableTextStyle(e)?new Map([wt.from(e)]):new Map([wt.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var s,n;const r=new RTETextBlock(t.id,t.type,e),i=e.autoMatchFormat?Object.assign(Object.assign({},t.annotations),{textStyle:null!==(n=null===(s=t.annotations)||void 0===s?void 0:s.textStyle)&&void 0!==n?n:r.type}):t.annotations;return r.children=t.nodes.map((t=>{const s=L.getRTENodeClass(t.type);if(s)return s.from(t,r,e)})).filter(o),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?wt.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,s)=>{const n=e.at(-1);if(t instanceof it&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(g.LINK),r=s.getAnnotationByType(g.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,s]}),[])}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(),s=this.getChildrenHtml();return super.shouldRenderAsInternalWrapper()?s:[`<${t}${e}>`,s,`</${t}>`].join("")}cloneWithNodes(t){const e=new RTETextBlock(c(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new gt(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"}}getChildrenHtml(){const t=this.getAnnotationByType(u.LINK_GROUP);let e=this.children.map((t=>t.toHtml())).join("");return t&&this.children.length>0&&(e=this.generateLinkHtml(t,e)),e}doAnnotationActionApply(t){const e=y.get(t.constructor.name,RTETextBlock.name);e&&e.execute(t,this)}generateLinkHtml(t,e){e="";let s=[];for(let n=0;n<this.children.length;n++){const r=this.children[n].getAnnotationByType(g.LINK),i=this.children[n+1]?this.children[n+1].getAnnotationByType(g.LINK):null;if(r){if(s.push(this.children[n]),!i||r.link.groupKey!==i.link.groupKey){const n=t.toString(r,{standalone:!0});e+=[`<a${n?` ${n}`:""}>`,s.map((t=>t.toHtml())).join(""),"</a>"].join(""),s=[]}}else e+=this.children[n].toHtml()}return e}}y.register(mt.name,RTETextBlock.name,new At),y.register(_t.name,RTETextBlock.name,new Lt),y.register(jt.name,RTETextBlock.name,new class extends q{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),y.register(V.name,RTETextBlock.name,new class extends q{handleAction(t,e){let s=e.getAnnotationByType(u.LINK_GROUP);if("update_link"===t.type){if(s){const e=s.linkGroups.get(t.groupKey);e&&s.linkGroups.set(t.groupKey,[e[0]])}}else{if(s){const e=s.linkGroups.get(t.groupKey)||[];s.linkGroups.set(t.groupKey,[...e,...t.nodes])}else s=t.toAnnotation(),s.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(u.LINK_GROUP,s)}}}),y.register(x.UNLINK_LINK_GROUP,RTETextBlock.name,new class extends q{handleAction(t,e){const s=e.getAnnotationByType(u.LINK_GROUP);s&&(s.linkGroups.size>1?s.linkGroups.delete(t.groupKey):e.annotationMap.delete(u.LINK_GROUP))}}),y.register(x.SPLIT_BLOCK_WITH_NODE,RTETextBlock.name,new Rt),y.register(x.REPLACE_CHILD_NODES,RTETextBlock.name,new yt),y.register(x.MERGE_TWO_BLOCKS_NODES,RTETextBlock.name,new Ct),y.register(x.LINE_BREAK_SINGLE_BLOCK,RTETextBlock.name,new bt),y.register(x.LINE_BREAK_MULTIPLE_BLOCKS,RTETextBlock.name,new Bt),y.register(x.INSERT_IMAGE_TO_BLOCK,RTETextBlock.name,new class extends q{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,s,n))e.parent.apply(new Ot(e,r));else if(this.isCaretPositionAtBlockStart(e,s,n))e.parent.apply(new kt(e,r));else{const t=new vt(s,n);e.apply(t),e.parent.apply(new Ot(e,r))}}}),y.register(x.TRANSFORM_LIST_BLOCK,RTETextBlock.name,new class extends q{handleAction(t,e){const s=e.parent,n=s.createList(t.listType),r=t.selectedBlocks,i=r.map((t=>s.toListItem(t)));n.apply(new gt(i)),s.apply(new Ot(t.selectedBlocks[0],n)),r.forEach((t=>{t.parent.apply(new St(t))}))}});class Dt extends q{getPreviousNode(t){const e=t.parent,s=e.children.indexOf(t);if(s>0)return e.children[s-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,s=e.children.indexOf(t);if(e.children[s+1])return e.children[s+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,s=e.children.indexOf(t),n=e.parent;if(e.isListItemBlock()){const t=n.parent;return 0===s&&Array.isArray(n.children)&&n.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===n}return 0===s&&Array.isArray(n.children)&&n.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(this.isRTEBlock(t.parent)&&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)}}isRTEBlock(t){return t&&"VegaRTEContent"!==t.constructor.name}}class It extends m{constructor(t,e){super(),this.isFlushable=!0,this.type=x.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class $t extends j{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new I(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,s,n){super(t),this.type=w.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s}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){y.executeTheStrategy(t,this)}doModifyActionApply(t){y.executeTheStrategy(t,this)}}y.register(x.UPDATE_CODE_BLOCK,RTECodeBlockNode.name,new class extends q{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),y.register($t.name,RTECodeBlockNode.name,new class extends q{handleAction(t,e){e.annotationMap.set(u.SELECTION_RANGE,t.toAnnotation())}});var Mt;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(Mt||(Mt={}));class Ht extends q{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 St(e)))}}class RTECodeBlock extends RTEBlock{constructor(t,e,s){super(t),this.type="code-block",this.children=[new RTECodeBlockNode(`${t}-1`,e,s,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=Mt["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(n){if(n instanceof m&&y.executeTheStrategy(n,this),n.isFlushable){const n=T.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(u.SELECTION_RANGE)}}y.register(x.DELETE_CODE_BLOCK,RTECodeBlock.name,new class extends Dt{handleAction(t,e){const s=e.children[0],n=e.parent;if(n){let t=this.getPreviousNode(s),r=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(s),r=0),n.apply(new St(e));const i=t?T.getDOMByEntity(t):null;if(0===n.children.length){const s=RTETextBlock.from({id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:""}]});e.parent.apply(new gt([s])),t=s.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(s,r,i,o){const c=T.getDOMByEntity(o);if(c){const o=e.getSubjectFromParentNodeByEventId(c,n);o&&t.notify(o,{node:s,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),y.register(x.DELETE_CHILDREN,RTECodeBlock.name,new Ht),y.register(x.SWITCH_OUT_FROM_CODE_BLOCK,RTECodeBlock.name,new class extends q{handleAction(s,r){const{content:i,language:o}=s,a=i.split("\n"),l=new It(a.slice(0,a.length-2).join("\n"),o);l.isFlushable=!1,r.children[0].apply(l);const h=RTETextBlock.from({id:c(),type:"paragraph",nodes:[{id:c(),text:"",type:"text"}]});r.parent.apply(new Ot(r,h));const u=T.getDOMByEntity(r);if(u){const s=e.getSubjectFromParentNodeByEventId(u,n);s&&t.notify(s,{node:h.children[0]})}}}),y.register(x.INSERT_IMAGE_TO_BLOCK,RTECodeBlock.name,new class extends q{handleAction(t,e){e.parent.apply(new Ot(e,t.imageBlockToBeInserted))}}),RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{Et as $,y as A,f as B,C,RTEDecoratorNode as D,w as E,S as F,Nt as G,_t as H,Ot as I,vt as J,Dt as K,Ht as L,m as M,v as N,K as O,J as P,Mt as Q,L as R,X as S,mt as T,ut as U,W as V,it as W,E as X,It as Y,U as Z,$t as _,R as a,RTECodeBlockNode as a0,Z as a1,rt as a2,ct as a3,wt as a4,P as a5,et as a6,st as a7,ot as a8,jt as a9,RTETextNode as b,x as c,q as d,RTETextBlock as e,RTEBlock as f,_ as g,gt as h,RTENode as i,kt as j,u as k,j as l,St as m,At as n,Lt as o,bt as p,Bt as q,Rt as r,T as s,yt as t,Ct as u,d as v,B as w,b as x,RTECodeBlock as y,g as z}
1
+ import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-11a6c1b7.js";import{e as s,f as n}from"./p-1b44db34.js";import{c as r}from"./p-02841589.js";import{L as i}from"./p-6e1ab235.js";import{i as o}from"./p-1f83cebf.js";import{g as c}from"./p-a4670e23.js";import{V as a}from"./p-ef9cbad1.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 s=this.rootDomToContentEntity.get(t);s&&s!==e&&this.contentEntityToRootDom.delete(s),this.rootDomToContentEntity.set(t,e),this.contentEntityToRootDom.set(e,t)}isVegaRTEContent(t){return t&&"VegaRTEContent"===t.constructor.name}};var x,E,g,w;!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",t.PASTE_CONTENT="PASTE_CONTENT"}(x||(x={}));class m{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,s)=>{t.linkGroups.set(s,e.map((t=>t.clone(t.parent))))})),t}toString(t,e){const s=this.toJsx(t,e);return Object.entries(s).map((([t,e])=>{const s="string"==typeof e?e:this.formatStyleToString(e);return`${r(t)}="${s}"`})).join(" ")}toJsx(t,e){const s=this.getStyle(t,e),n=this.getClass(t,e),r=this.getAttribute(t);return n.length>0&&(r.class=n.join(" ")),s&&Object.keys(s).length>0&&(r.style=s),r}getClass(t,e){const s=[];return t.link.customClass&&s.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&s.push("v-rte--link"),s}getStyle(t,e){const s={};return t.link.customStyle&&Object.assign(s,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&(s.color="rgba(var(--v-text-link, 19, 98, 226, 1))"),s}getAttribute(t){const{href:e,customAttribute:s={}}=t.link,n=t.useInternalStyle,r=s.target||(n?"_blank":"");return Object.assign(Object.assign(Object.assign({},s),e||n?{href:e}:{}),r?{target:r}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${r(t)}: ${e};`)).join(" ")}}class O extends f{constructor(t){super(),this.type=d.ALIGNMENT,this.textAlign=t}static from(t){return[d.ALIGNMENT,new O(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 O(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 N extends f{constructor(t){super(),this.type=d.INDENT,this.indent=Math.max(0,t)}static from(t){return[d.INDENT,new N(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new N(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class R{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).has(t)||this.registry.get(e).set(t,new Set),this.registry.get(e).get(t).add(s)}static unregister(t,e,s){const n=this.registry.get(e);if(n){const e=n.get(t);e&&e.delete(s)}}static get(t,e){const s=t instanceof m?t.type:t.constructor.name,n=this.registry.get(e.constructor.name);if(n){const r=n.get(s);if(r&&r.size>0)return Array.from(r).find((s=>s.canIntercept(t,e)))}}}R.registry=new Map;class y{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,s)}static unregister(t,e){const s=this.registry.get(e);s&&s.delete(t)}static get(t,e){const s=this.registry.get(e);if(s)return s.get(t)}static executeTheStrategy(t,e){const s=R.get(t,e),n=()=>{const s=t instanceof m?t.type:t.constructor.name,n=y.get(s,e.constructor.name);if(n)return t.executedFlag=!0,n.execute(t,e);i.warn(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)};return s?s.intercept(n,t,e):n()}static canHandle(t,e){return!!y.get(t,e.constructor.name)}}y.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(E||(E={}));class S extends p{}class C extends S{constructor(t){super(),this.type=E.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[E.CUSTOM_ATTRIBUTE,new C(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new C(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 s=Object.assign({},this.customAttribute);return null===(e=t.filterAttributes)||void 0===e||e.forEach((t=>delete s[t])),Object.keys(s).forEach((t=>{this.BOOLEAN_ATTRS.has(t)&&""===s[t]&&(s[t]="true")})),s}}class b extends S{constructor(t){super(),this.type=E.CUSTOM_CLASS,this.customClass=t}static from(t){return[E.CUSTOM_CLASS,new b(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new b(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class B extends S{constructor(t){super(),this.type=E.CUSTOM_STYLE,this.customStyle=t}static from(t){return[E.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}}!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{}class _{constructor(t){this.dtoType=t instanceof RTEBlock?"block":"node",this.annotationMap=t.annotationMap}toCssText(t={standalone:!1},e,s){return s=s||this.toJSON(t,e),Object.entries(Object.assign({},s)).map((([t,e])=>`${r(t)}: ${e};`)).join("")}toJSON(t={standalone:!1},e){const s=Array.from(this.annotationMap.values()).filter((t=>this.filterAnnotation(t)||t instanceof B)).map((e=>e.renderStyle(t))).filter(o);return e&&e.length>0?this.mergeAnnotationStyles(s,e):s.reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})}filterAnnotation(t){return"block"===this.dtoType?t instanceof f:t instanceof v}mergeAnnotationStyles(t,e){const s={};for(const n of t)for(const t in n){const r=n[t],i=s[t];s[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return s}}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(w||(w={}));class RTENode{constructor(t,e){this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}static from(t,e,s){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}, ${s}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return C.from(e);case"customClass":return b.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}){return new _(this).toJSON(t,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof b)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(E.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return T.getDOMByEntity(this)}generateAttributeString(...t){var e;const s=new _(this).toCssText({standalone:!0},["textDecoration"]),n=this.annotationMap.get(E.CUSTOM_CLASS),r=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==n?void 0:n.toString(),s?`style="${s}"`:null,...t].filter(o);return r.length?` ${r.join(" ")}`:""}doApply(t){t instanceof m?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const n=T.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}doAnnotationActionApply(t){}doModifyActionApply(t){}}const L=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 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 generateBlockChildren(t,e,s){return t.map((t=>{const n=L.getRTEBlockClass(t.type);if(n){const r=n.from(t,e);return r.parent=s,r}})).filter(o)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return O.from(e);case"indent":return N.from(e);case"customAttribute":return C.from(e);case"customClass":return b.from(e);case"customStyle":return B.from(e);case"internalWrapper":return k.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,s])=>{const n=this.createAnnotationEntity(e,s);o(n)&&t.set(...n)}))}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 S)).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(n){if(this.doApply(n),n.isFlushable){const n=T.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}getFirstNode(){if(!this.children||!this.children[0])return null;const t=this.children[0];return t instanceof RTEBlock?t.getFirstNode():t}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){const e=new _(this).toJSON(t);return Object.assign(Object.assign({},e),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof b)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(E.CUSTOM_ATTRIBUTE)}generateAttributeString(...t){var e;const s=new _(this).toCssText({standalone:!0}),n=this.annotationMap.get(E.CUSTOM_CLASS),r=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==n?void 0:n.toString(),s?`style="${s}"`:null,...t].filter(o);return r.length?` ${r.join(" ")}`:""}doApply(t){t instanceof m?y.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();if(e instanceof A||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply)this.doAnnotationActionApply(t);else{const e=y.get(t.constructor.name,this.constructor.name);e&&e.execute(t,this)}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}class j{}class D extends j{constructor(){super(...arguments),this.doSplit=!0}}class I extends p{constructor(t){super(),this.type=u.SELECTION_RANGE,this.range=t}clone(){return new I(this.range)}}class $ extends v{constructor(t){super(),this.type=g.STRIKETHROUGH,this.strikethrough=t}static from(t){return[g.STRIKETHROUGH,new $(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new $(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 M extends v{constructor(t){super(),this.type=g.UNDERLINE,this.underline=t}static from(t){return[g.UNDERLINE,new M(t)]}toJSON(){return{underline:this.underline}}clone(){return new M(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 H extends v{constructor(t){super(),this.type=g.ITALIC,this.italic=t}static from(t){return[g.ITALIC,new H(t)]}toJSON(){return{italic:this.italic}}clone(){return new H(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 P extends v{constructor(t){super(),this.type=g.BOLD,this.bold=t}static from(t){return[g.BOLD,new P(t)]}toJSON(){return{bold:this.bold}}clone(){return new P(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 F 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 F(t,e)]}toJSON(){return{code:this.code}}clone(){return new F(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 J={key:"black",light:"#111128",dark:"#E3E3E8"},K=[J,{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"}],U="​",W=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]];class G extends v{constructor(t){super(),this.type=g.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[g.TEXT_COLOR,new G(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new G(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:a.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return K.find((e=>e.key===t))||K[0]}}class z 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 z(t,e)]}toJSON(){return{link:this.link}}clone(){return new z(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class V extends j{constructor(t,e,s){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=s}toAnnotation(){return new A(this.groupKey)}}class X extends j{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class q{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 s=t.annotationMap.get(E.CUSTOM_STYLE);s&&this.isCustomStyle(s,e)&&t.annotationMap.set(s.type,new B(s.removeStyles(e)))}createNewParagraph(t){const e=L.getRTEBlockClass("paragraph");if(e)return e.from({id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.constructor.name?e:this.getRootContent(e)}isCaretPositionAtBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtBlockEnd(t,e,s){return e.isContentEditable()?this.isCaretPositionAtTextBlockEnd(t,e,s):this.isCaretPositionAtDecoratorBlockEnd(t,e,s)}getDOMByEntity(t){return T.getDOMByEntity(t)}isCaretPositionAtTextBlockEnd(t,e,s){const n=t.children[t.children.length-1];return e===n&&(e.isEmpty()||s===n.text.length)}isCaretPositionAtDecoratorBlockEnd(t,e,s){return e===t.children[t.children.length-1]&&0!==s}isCustomStyle(t,e){return e.some((e=>Object.keys(t.customStyle).includes(e)))}}class Y extends m{constructor(t){super(),this.type=x.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class Q extends q{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(u.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof D&&t.doSplit&&s){const{startContainer:t,endContainer:n,startOffset:r,endOffset:i}=s.range,o=t===n&&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(s.range)&&e.isContentEditable()){const n=this.splitTextNode(s.range,e);return t.annotationMap.has("LINK")&&t.apply(new Y(n)),n}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const s=e.cloneWithText("");this.setApplyTargetNode(s);const n=e.parent.children.findIndex((t=>t===e));return 0===t||!e.isContentEditable()&&t===n?[s,e]:t===e.text.length||!e.isContentEditable()&&t===n+1?[e,s]:[e.cloneWithText(e.text.substring(0,t)),s,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:s,startOffset:n,endOffset:r}=t;return e!==s||n>0||r<(s.textContent?s.textContent.length:0)}splitTextNode(t,e){const{startContainer:s,endContainer:n,startOffset:r}=t,i=s.parentElement,o=n.parentElement,c=(t,s,n)=>{const r=t.substring(0,s),i=t.substring(s,n),o=t.substring(n);return[e.cloneWithText(r),e.cloneWithText(i),e.cloneWithText(o)]},a=i&&T.getEntityByDOM(i),l=o&&T.getEntityByDOM(o);if(a&&a.id===e.id){const i=s===n?t.endOffset:e.text.length,[o,a,l]=c(e.text,r,i);return this.setApplyTargetNode(a),[o,a,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[s,n,r]=c(e.text,0,t.endOffset);return this.setApplyTargetNode(n),[s,n,r].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}class Z extends D{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new P(this.bold)}}class tt 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,E.CUSTOM_STYLE]}}class et extends D{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new tt}}class st extends D{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new F(this.code)}}class nt extends j{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class rt extends D{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new H(this.italic)}}class it extends D{constructor({link:t,newText:e,needMergeNode:s,doSplit:n,type:r}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=s,this.newText=e,this.type=r,o(n)&&(this.doSplit=n)}toAnnotation(){return new z(this.link)}}class ot extends D{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new $(this.strikethrough)}}class ct extends D{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new M(this.underline)}}class at extends q{handleAction(t,e){const s=t.toAnnotation();if(t instanceof nt)e.annotationMap.delete(t.annotationType);else{if(!(s instanceof tt))return s instanceof v||s instanceof I?(t instanceof it&&(o(t.newText)&&(e.text=t.newText),e.parent.apply(new V(t.link.groupKey,[e],t.type))),t instanceof st&&this.handleAction(new et,e),t instanceof Z&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof rt&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof ct||t instanceof ot)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(s.type,s)):void 0;s.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class lt extends m{constructor(){super(...arguments),this.type=x.DELETE_LINK_GROUP}}class ht extends q{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new lt)}}class ut extends m{constructor(t){super(),this.type=x.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class dt extends q{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,s){if(e&&e.startContainer&&e.endContainer){const{startContainer:n,endContainer:r,startOffset:i,endOffset:o}=e;let c=s.text;if(n===r&&i===o&&t)c=s.text.slice(0,i)+t+s.text.slice(i);else{const e=n.parentElement,a=r.parentElement,l=e&&T.getEntityByDOM(e),h=a&&T.getEntityByDOM(a);let u=0,d=s.text.length;l&&l===s?(u=i,d=n===r?o:d):h&&h===s&&(d=o),c=s.text.slice(0,u)+t+s.text.slice(d)}s.apply(new ut(c))}}}class pt extends p{constructor(t){super(),this.type=g.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:s,customStyle:n,customClass:r,customAttribute:i}=t,o=new pt(e);return o.child=s?pt.from(s)[1]:void 0,o.customAttribute=i?C.from(i)[1]:void 0,o.customClass=r?b.from(r)[1]:void 0,o.customStyle=n?B.from(n)[1]:void 0,[g.INLINE_HTML,o]}clone(){var t,e,s,n;const r=new pt(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===(s=this.customClass)||void 0===s?void 0:s.clone(),r.customStyle=null===(n=this.customStyle)||void 0===n?void 0:n.clone(),r}toJSON(){var t,e,s,n;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===(s=this.customClass)||void 0===s?void 0:s.toJSON().customClass,customStyle:null===(n=this.customStyle)||void 0===n?void 0:n.toJSON().customStyle})}}}class ft extends q{handleAction(t,e){const s=e.parent.getAnnotationByType(u.LINK_GROUP);if(s){const n=e.annotationMap.get("LINK").link.groupKey,r=s.linkGroups.get(n);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),s.linkGroups.set(n,r))}}}}class Tt extends q{handleAction(t,e){const s=e.parent.getAnnotationByType(u.LINK_GROUP);if(s){const t=e.annotationMap.get(g.LINK).link.groupKey,n=s.linkGroups.get(t);if(n){const r=n.indexOf(e);-1!==r&&n.splice(r,1),0===n.length&&s.linkGroups.delete(t),0===s.linkGroups.size&&e.parent.annotationMap.delete(u.LINK_GROUP)}}e.annotationMap.delete(g.LINK)}}class xt extends v{constructor(t){super(),this.type=g.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[g.PLAIN_TEXT,new xt(t)]}clone(){return new xt(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class Et extends D{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new G(this.textColor)}}class RTETextNode extends RTENode{constructor(t,e,s,n){super(t,n),this.type=w.TEXT,this.parent=s,this.text=e,this.registerModifyStrategy()}static supportsHtmlTag(t){return["span","code"].includes(t)}static from(t,e,s={autoMatchFormat:!0}){const n=new RTETextNode(t.id,t.text,e),{annotations:r}=t;return r&&(n.annotationMap=this.generateTextAnnotationMap(r,s,e,n)),n}static generateTextAnnotationMap(t,e,s,n){return new Map(Object.keys(t).map((r=>("link"===r&&t.link&&s&&n&&s.apply(new V(t.link.groupKey,[n],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(o))}static createAnnotationEntity(t,e,s){const n=!(!s||!s.autoMatchFormat);switch(t){case"bold":return P.from(e);case"italic":return H.from(e);case"underline":return M.from(e);case"strikethrough":return $.from(e);case"code":return F.from(e,n);case"textColor":return G.from(e);case"link":return z.from(e,n);case"inlineHtml":return pt.from(e);case"plainText":return xt.from(e)}return RTENode.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof S||t instanceof pt)).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(c(),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()&&(y.register(x.UPDATE_TEXT,t,new ht),y.register(x.REPLACE_SELECTED_TEXT,t,new dt),y.register(x.LINK_GROUP_NODE_SPLIT,t,new ft),y.register(it.name,t,new at)),y.register(D.name,t,new Q),y.register(x.DELETE_LINK_GROUP,t,new Tt),y.register(Z.name,t,new at),y.register(et.name,t,new at),y.register(rt.name,t,new at),y.register(ct.name,t,new at),y.register(Et.name,t,new at),y.register(ot.name,t,new at),y.register(st.name,t,new at),y.register(j.name,t,new at),RTETextNode.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(u.SELECTION_RANGE);if(t instanceof D&&t.doSplit&&e){const e=y.get(D.name,this.constructor.name);if(e){const s=e.execute(t,this);s&&this.applyActionToNode(s,t)}}else this.applyActionToNode(this,t);"function"==typeof this.parent.mergeNodes&&this.parent.mergeNodes(t)}doModifyActionApply(t){y.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof X)return void this.syncUpSelectedNodes(t);s instanceof I||this.syncUpSelectedNodes(t);const n=y.get(e.constructor.name,t.constructor.name);if(n)return void n.execute(e,t);const r=y.get(j.name,RTETextNode.name);r&&r.execute(e,t)}syncUpSelectedNodes(s){const r=this.getElementRef();if(r){const i=e.getSubjectFromParentNodeByEventId(r,n);i&&t.notify(i,{node:s})}}renderWithWrapperStr(t){const{htmlTag:e,customAttribute:s,customClass:n,customStyle:r,child:i}=t,c=[...(null==s?void 0:s.toString())||[],null==n?void 0:n.toString(),null==r?void 0:r.toString()].filter(o),a=c.length>0?` ${c.join(" ")}`:"";return i?`<${e}${a}>${this.renderWithWrapperStr(i)}</${e}>`:`<${e}${a}>${this.renderTextStr()}</${e}>`}renderTextStr(){var t;const e=(null===(t=this.getAnnotationByType(g.CODE))||void 0===t?void 0:t.code)?"code":"span",s=super.generateAttributeString();return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${e}${s}>${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 z)&&!(t instanceof xt)||t instanceof S)).length}}RTETextNode.registerActionStrategyStatus={},RTETextNode.htmlTag="span";class gt extends m{constructor(t){super(),this.type=x.APPEND_CHILDREN,this.entityToBeAppended=t}}class wt extends f{constructor(t){super(),this.type=d.TEXT_STYLE,this.textStyle=t}static from(t){return[d.TEXT_STYLE,new wt(t)]}toJSON(){return{textStyle:this.textStyle}}clone(){return new wt(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",minHeight:"22px",fontWeight:"500"},s=Object.assign(Object.assign({},e),{marginTop:"0px",marginBottom:"0px"});switch(this.textStyle){case"paragraph":return s;case"title":return Object.assign(Object.assign({},e),{fontSize:"36px",lineHeight:"40px",minHeight:"40px"});case"subtitle":return Object.assign(Object.assign({},e),{fontSize:"28px",lineHeight:"32px",minHeight:"32px"});case"heading-1":return Object.assign(Object.assign({},e),{fontSize:"22px",lineHeight:"24px",minHeight:"24px",marginTop:"0px",marginBottom:"0px"});case"heading-2":return Object.assign(Object.assign({},e),{fontSize:"20px",lineHeight:"24px",minHeight:"24px",marginTop:"0px",marginBottom:"0px"});case"heading-3":return Object.assign(Object.assign({},e),{fontSize:"18px",lineHeight:"22px",minHeight:"22px",marginTop:"0px",marginBottom:"0px"});case"heading-4":return Object.assign(Object.assign({},e),{fontSize:"16px",lineHeight:"22px",minHeight:"22px",marginTop:"0px",marginBottom:"0px"});case"heading-5":return Object.assign(Object.assign({},e),{fontSize:"14px",lineHeight:"22px",minHeight:"22px",marginTop:"0px",marginBottom:"0px"});case"heading-6":return Object.assign(Object.assign({},e),{fontSize:"12px",lineHeight:"22px",minHeight:"22px",marginTop:"0px",marginBottom:"0px"})}}}class mt extends j{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new wt(this.textStyle)}}class At extends q{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new Z(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new nt(g.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}class Ot extends m{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class Nt extends m{constructor(t){super(),this.type=x.REPLACE_CHILD_NODES,this.newChildNodes=t}}class Rt extends q{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,s){if(t){const n=t.text.slice(0,e),r=t.text.slice(e),i=s.children.indexOf(t);if(i>-1){const e=s.children.slice(0,i),o=s.children.slice(i+1);n&&e.push(t.cloneWithText(n)),r&&o.unshift(t.cloneWithText(r)),s.apply(new Nt(e));const c=s.cloneWithNodes(o);return s.parent.apply(new Ot(s,c)),c}}}}class yt extends q{handleAction(t,e){e.children=[],e.apply(new gt(t.newChildNodes))}}class St extends m{constructor(t){super(),this.type=x.DELETE_CHILDREN,this.entityToBeRemoved=t}}class Ct extends q{handleAction(t,e){const s=t.blockNeedToBeMerged;if(e.type===s.type||"image"!==e.type&&"image"!==s.type){let t=s.children;"image"!==s.type&&(t=s.children.filter((t=>t.text))),e.apply(new gt(t)),s.parent.apply(new St(s))}}}class bt extends q{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new RTETextNode(c(),"\n",s),r=t.text.slice(0,e),i=t.text.slice(e),o=s.children.indexOf(t);if(o>-1){const e=s.children.slice(0,o),c=s.children.slice(o+1);r&&e.push(t.cloneWithText(r)),i&&c.unshift(t.cloneWithText(i)),this.mergeLineBreakNodes(e,n,c,s)}return n}}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new RTETextNode(c(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Nt([...t,e,...s]))}}class Bt extends q{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new RTETextNode(c(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,r,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new St(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new RTETextNode(c(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Nt([...t,e,...s]))}}class kt extends m{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class vt extends m{constructor(t,e){super(),this.type=x.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class _t extends j{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new O(this.textAlign)}}class Lt extends q{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class jt extends j{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new N(this.indent)}}class RTETextBlock extends RTEBlock{constructor(t,e,s){super(t),this.children=[],this.type=e;const{autoMatchFormat:n}=s||{autoMatchFormat:!0};n&&(this.annotationMap=RTETextBlock.isAcceptableTextStyle(e)?new Map([wt.from(e)]):new Map([wt.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var s,n;const r=new RTETextBlock(t.id,t.type,e),i=e.autoMatchFormat?Object.assign(Object.assign({},t.annotations),{textStyle:null!==(n=null===(s=t.annotations)||void 0===s?void 0:s.textStyle)&&void 0!==n?n:r.type}):t.annotations;return r.children=t.nodes.map((t=>{const s=L.getRTENodeClass(t.type);if(s)return s.from(t,r,e)})).filter(o),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?wt.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,s)=>{const n=e.at(-1);if(t instanceof it&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(g.LINK),r=s.getAnnotationByType(g.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,s]}),[])}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(),s=this.getChildrenHtml();return super.shouldRenderAsInternalWrapper()?s:[`<${t}${e}>`,s,`</${t}>`].join("")}cloneWithNodes(t){const e=new RTETextBlock(c(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new gt(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"}}getChildrenHtml(){const t=this.getAnnotationByType(u.LINK_GROUP);let e=this.children.map((t=>t.toHtml())).join("");return t&&this.children.length>0&&(e=this.generateLinkHtml(t,e)),e}doAnnotationActionApply(t){const e=y.get(t.constructor.name,RTETextBlock.name);e&&e.execute(t,this)}generateLinkHtml(t,e){e="";let s=[];for(let n=0;n<this.children.length;n++){const r=this.children[n].getAnnotationByType(g.LINK),i=this.children[n+1]?this.children[n+1].getAnnotationByType(g.LINK):null;if(r){if(s.push(this.children[n]),!i||r.link.groupKey!==i.link.groupKey){const n=t.toString(r,{standalone:!0});e+=[`<a${n?` ${n}`:""}>`,s.map((t=>t.toHtml())).join(""),"</a>"].join(""),s=[]}}else e+=this.children[n].toHtml()}return e}}y.register(mt.name,RTETextBlock.name,new At),y.register(_t.name,RTETextBlock.name,new Lt),y.register(jt.name,RTETextBlock.name,new class extends q{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),y.register(V.name,RTETextBlock.name,new class extends q{handleAction(t,e){let s=e.getAnnotationByType(u.LINK_GROUP);if("update_link"===t.type){if(s){const e=s.linkGroups.get(t.groupKey);e&&s.linkGroups.set(t.groupKey,[e[0]])}}else{if(s){const e=s.linkGroups.get(t.groupKey)||[];s.linkGroups.set(t.groupKey,[...e,...t.nodes])}else s=t.toAnnotation(),s.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(u.LINK_GROUP,s)}}}),y.register(x.UNLINK_LINK_GROUP,RTETextBlock.name,new class extends q{handleAction(t,e){const s=e.getAnnotationByType(u.LINK_GROUP);s&&(s.linkGroups.size>1?s.linkGroups.delete(t.groupKey):e.annotationMap.delete(u.LINK_GROUP))}}),y.register(x.SPLIT_BLOCK_WITH_NODE,RTETextBlock.name,new Rt),y.register(x.REPLACE_CHILD_NODES,RTETextBlock.name,new yt),y.register(x.MERGE_TWO_BLOCKS_NODES,RTETextBlock.name,new Ct),y.register(x.LINE_BREAK_SINGLE_BLOCK,RTETextBlock.name,new bt),y.register(x.LINE_BREAK_MULTIPLE_BLOCKS,RTETextBlock.name,new Bt),y.register(x.INSERT_IMAGE_TO_BLOCK,RTETextBlock.name,new class extends q{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,s,n))e.parent.apply(new Ot(e,r));else if(this.isCaretPositionAtBlockStart(e,s,n))e.parent.apply(new kt(e,r));else{const t=new vt(s,n);e.apply(t),e.parent.apply(new Ot(e,r))}}}),y.register(x.TRANSFORM_LIST_BLOCK,RTETextBlock.name,new class extends q{handleAction(t,e){const s=e.parent,n=s.createList(t.listType),r=t.selectedBlocks,i=r.map((t=>s.toListItem(t)));n.apply(new gt(i)),s.apply(new Ot(t.selectedBlocks[0],n)),r.forEach((t=>{t.parent.apply(new St(t))}))}});class Dt extends q{getPreviousNode(t){const e=t.parent,s=e.children.indexOf(t);if(s>0)return e.children[s-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,s=e.children.indexOf(t);if(e.children[s+1])return e.children[s+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,s=e.children.indexOf(t),n=e.parent;if(e.isListItemBlock()){const t=n.parent;return 0===s&&Array.isArray(n.children)&&n.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===n}return 0===s&&Array.isArray(n.children)&&n.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(this.isRTEBlock(t.parent)&&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)}}isRTEBlock(t){return t&&"VegaRTEContent"!==t.constructor.name}}class It extends m{constructor(t,e){super(),this.isFlushable=!0,this.type=x.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class $t extends j{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new I(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,s,n){super(t),this.type=w.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s}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){y.executeTheStrategy(t,this)}doModifyActionApply(t){y.executeTheStrategy(t,this)}}y.register(x.UPDATE_CODE_BLOCK,RTECodeBlockNode.name,new class extends q{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),y.register($t.name,RTECodeBlockNode.name,new class extends q{handleAction(t,e){e.annotationMap.set(u.SELECTION_RANGE,t.toAnnotation())}});var Mt;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(Mt||(Mt={}));class Ht extends q{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 St(e)))}}class RTECodeBlock extends RTEBlock{constructor(t,e,s){super(t),this.type="code-block",this.children=[new RTECodeBlockNode(`${t}-1`,e,s,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=Mt["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(n){if(n instanceof m&&y.executeTheStrategy(n,this),n.isFlushable){const n=T.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(u.SELECTION_RANGE)}}y.register(x.DELETE_CODE_BLOCK,RTECodeBlock.name,new class extends Dt{handleAction(t,e){const s=e.children[0],n=e.parent;if(n){let t=this.getPreviousNode(s),r=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(s),r=0),n.apply(new St(e));const i=t?T.getDOMByEntity(t):null;if(0===n.children.length){const s=RTETextBlock.from({id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:""}]});e.parent.apply(new gt([s])),t=s.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(s,r,i,o){const c=T.getDOMByEntity(o);if(c){const o=e.getSubjectFromParentNodeByEventId(c,n);o&&t.notify(o,{node:s,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),y.register(x.DELETE_CHILDREN,RTECodeBlock.name,new Ht),y.register(x.SWITCH_OUT_FROM_CODE_BLOCK,RTECodeBlock.name,new class extends q{handleAction(s,r){const{content:i,language:o}=s,a=i.split("\n"),l=new It(a.slice(0,a.length-2).join("\n"),o);l.isFlushable=!1,r.children[0].apply(l);const h=RTETextBlock.from({id:c(),type:"paragraph",nodes:[{id:c(),text:"",type:"text"}]});r.parent.apply(new Ot(r,h));const u=T.getDOMByEntity(r);if(u){const s=e.getSubjectFromParentNodeByEventId(u,n);s&&t.notify(s,{node:h.children[0]})}}}),y.register(x.INSERT_IMAGE_TO_BLOCK,RTECodeBlock.name,new class extends q{handleAction(t,e){e.parent.apply(new Ot(e,t.imageBlockToBeInserted))}}),RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{Et as $,y as A,f as B,C,g as D,RTEDecoratorNode as E,w as F,S as G,_t as H,Ot as I,Nt as J,vt as K,Dt as L,m as M,v as N,Ht as O,K as P,J as Q,L as R,X as S,mt as T,ut as U,W as V,Mt as W,it as X,It as Y,U as Z,$t as _,R as a,RTECodeBlockNode as a0,Z as a1,rt as a2,ct as a3,wt as a4,P as a5,et as a6,st as a7,ot as a8,jt as a9,RTETextNode as b,x as c,q as d,RTETextBlock as e,RTEBlock as f,_ as g,gt as h,RTENode as i,kt as j,u as k,j as l,St as m,E as n,At as o,Lt as p,bt as q,Bt as r,T as s,Rt as t,yt as u,Ct as v,d as w,B as x,b as y,RTECodeBlock as z}
@@ -1 +1 @@
1
- var t;!function(t){t.Angular="angular",t.Vue="vue",t.React="react",t.Next="next",t.VanillaJs="vanilla-js"}(t||(t={}));const s=new class{constructor(){this.vegaVersion="2.74.0-RTE-table-preview",this.framework=t.VanillaJs}getVegaEnv(){return{version:this.vegaVersion,framework:this.framework}}setVegaFramework(t){this.framework=t}};export{t as F,s as v}
1
+ var t;!function(t){t.Angular="angular",t.Vue="vue",t.React="react",t.Next="next",t.VanillaJs="vanilla-js"}(t||(t={}));const s=new class{constructor(){this.vegaVersion="2.75.0-RTE-table-preview",this.framework=t.VanillaJs}getVegaEnv(){return{version:this.vegaVersion,framework:this.framework}}setVegaFramework(t){this.framework=t}};export{t as F,s as v}
@@ -1 +1 @@
1
- import{j as r,k as e,b as t,e as a,l as s,f as o,g as n,m as i,n as u,o as f,p as c,q as l,r as d,s as b,t as v,u as p,h as m,v as $,B as h,C as g,w as j}from"./p-161b9c5b.js";import{B as k}from"./p-ed45b3b6.js";import{L as w}from"./p-6e1ab235.js";import{R as x}from"./p-d2033624.js";import{a as T}from"./p-d884c644.js";import{B as O}from"./p-40f39194.js";const C=new class extends r{constructor(){super(...arguments),this.states=["default","focus-visible","hover","active"]}formatToken(r){return e(r)?`border-color: ${a[r]};`:(w.warn(`The borderColor value ${r} is invalid, it must be a value of: `,t),"")}getStates(){return this.states}},S=new class extends r{constructor(){super(...arguments),this.states=["default","focus-visible","hover"]}formatToken(r){return s(r)?`box-shadow: ${n[r]};`:(w.warn(`The shadow value ${r} is invalid, it must be a value of: `,o),"")}getStates(){return this.states}},B=new class extends r{constructor(){super(...arguments),this.states=["default","focus-visible","hover","active"]}formatToken(r){return i(r)?`border: ${f[r]};`:(w.warn(`The border value ${r} is invalid, it must be a value of: `,u),"")}getStates(){return this.states}},F=new class{format(r,e){switch(e){case"backgroundColor":return c.format(r);case"borderColor":return C.format(r);case"shadow":return S.format(r);case"border":return B.format(r);default:throw new Error(`Invalid flag ${e} passed into StateFormatFacade`)}}};function q(r,e,t){w.warn(`The ${r} value ${e} is invalid, it must be a value of: `,t)}function y(r,e){let t="";return e.includes("dark")&&(t+=` dark:v-dark-${r}`),t}function E(r){if(l(r))return`v-p-${r}`;q("padding",r,Object.keys(m))}function I(r){if($(r))return`v-border-${r}`;q("border-style",r,O)}function L(r){if(d(r))return`v-${r}`;q("border-radius",r,Object.keys(h))}function R(r){if(e(r))return`v-${r}`;q("border-color",r,g.filter((()=>/^border-color-.+$/.test)))}function z(r,e=[]){if(b(r))return`v-${r}`+y(r,e);q("background-color",r,g.filter((()=>/^bg-.+$/.test)))}function A(r,e=[]){if(v(r))return`v-${r}`+y(r,e);q("text-color",r,g.filter((()=>/^text-.+$/.test)))}function D(r){if(p(r))return`vega-flex-${r}`;q("breakpoint",r,Object.keys(k))}function G(r){if(p(r))return k[r];q("breakpoint",r,Object.keys(k))}function H(r){if(l(r))return`v-gap-${r}`;q("gap",r,Object.keys(m))}function J(r,e=[]){if(s(r))return`v-${r}`+y(r,e);q("shadows",r,o)}function K(r,e){if(null!=r)return x.format(r,e)}function M(r){if(j(r))return`v-${r}`;q("font",r,T)}function N(r,e){if(null!=r)return F.format(r,e)}export{H as a,J as b,G as c,z as d,R as e,K as f,L as g,E as h,A as i,N as j,I as k,D as l,M as m}
1
+ import{j as r,k as e,b as t,e as a,l as s,f as o,g as n,m as i,n as u,o as f,p as c,q as l,r as d,s as b,t as v,u as p,h as m,v as $,B as h,C as g,w as j}from"./p-1f83cebf.js";import{B as k}from"./p-ed45b3b6.js";import{L as w}from"./p-6e1ab235.js";import{R as x}from"./p-ebb14c84.js";import{a as T}from"./p-d884c644.js";import{B as O}from"./p-40f39194.js";const C=new class extends r{constructor(){super(...arguments),this.states=["default","focus-visible","hover","active"]}formatToken(r){return e(r)?`border-color: ${a[r]};`:(w.warn(`The borderColor value ${r} is invalid, it must be a value of: `,t),"")}getStates(){return this.states}},S=new class extends r{constructor(){super(...arguments),this.states=["default","focus-visible","hover"]}formatToken(r){return s(r)?`box-shadow: ${n[r]};`:(w.warn(`The shadow value ${r} is invalid, it must be a value of: `,o),"")}getStates(){return this.states}},B=new class extends r{constructor(){super(...arguments),this.states=["default","focus-visible","hover","active"]}formatToken(r){return i(r)?`border: ${f[r]};`:(w.warn(`The border value ${r} is invalid, it must be a value of: `,u),"")}getStates(){return this.states}},F=new class{format(r,e){switch(e){case"backgroundColor":return c.format(r);case"borderColor":return C.format(r);case"shadow":return S.format(r);case"border":return B.format(r);default:throw new Error(`Invalid flag ${e} passed into StateFormatFacade`)}}};function q(r,e,t){w.warn(`The ${r} value ${e} is invalid, it must be a value of: `,t)}function y(r,e){let t="";return e.includes("dark")&&(t+=` dark:v-dark-${r}`),t}function E(r){if(l(r))return`v-p-${r}`;q("padding",r,Object.keys(m))}function I(r){if($(r))return`v-border-${r}`;q("border-style",r,O)}function L(r){if(d(r))return`v-${r}`;q("border-radius",r,Object.keys(h))}function R(r){if(e(r))return`v-${r}`;q("border-color",r,g.filter((()=>/^border-color-.+$/.test)))}function z(r,e=[]){if(b(r))return`v-${r}`+y(r,e);q("background-color",r,g.filter((()=>/^bg-.+$/.test)))}function A(r,e=[]){if(v(r))return`v-${r}`+y(r,e);q("text-color",r,g.filter((()=>/^text-.+$/.test)))}function D(r){if(p(r))return`vega-flex-${r}`;q("breakpoint",r,Object.keys(k))}function G(r){if(p(r))return k[r];q("breakpoint",r,Object.keys(k))}function H(r){if(l(r))return`v-gap-${r}`;q("gap",r,Object.keys(m))}function J(r,e=[]){if(s(r))return`v-${r}`+y(r,e);q("shadows",r,o)}function K(r,e){if(null!=r)return x.format(r,e)}function M(r){if(j(r))return`v-${r}`;q("font",r,T)}function N(r,e){if(null!=r)return F.format(r,e)}export{H as a,J as b,G as c,z as d,R as e,K as f,L as g,E as h,A as i,N as j,I as k,D as l,M as m}
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,H as a,g as r}from"./p-6b2342e0.js";import{M as s,a as p}from"./p-f0ff4463.js";import{s as o}from"./p-519a7d55.js";import{c as n,n as h}from"./p-262ec334.js";import{I as l}from"./p-6e1ab235.js";import{V as d,I as m}from"./p-d849e0f5.js";import{F as c}from"./p-16af7681.js";import{C as f}from"./p-c00adad9.js";import{i as u,I as g,D as b,a as v}from"./p-ff57c872.js";import{F as y}from"./p-a528714c.js";import{C as x}from"./p-2d0d575f.js";import{c as j}from"./p-5367eaab.js";import{a as w}from"./p-d9671d27.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-1b44db34.js";import"./p-f69f84a7.js";import"./p-10ac8b57.js";import"./p-40f39194.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-ff9a0e6e.js";import"./p-c335088c.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";const I=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the stepper component",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the stepper component",payloadValue:t=>!1===t.autoValidation},{payloadKey:"BUTTON_VARIANT_IS_PRIMARY",payloadDescription:"Specifies the style variant for the stepper buttons.",payloadValue:t=>"primary"===t.buttonVariant},{payloadKey:"BUTTON_VARIANT_IS_SECONDARY",payloadDescription:"Specifies the style variant for the stepper buttons.",payloadValue:t=>"secondary"===t.buttonVariant}];var A=function(t,e,i,a){var r,s=arguments.length,p=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,i,a);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(p=(s<3?r(p):s>3?r(e,i,p):r(e,i))||p);return s>3&&p&&Object.defineProperty(e,i,p),p};const V=class{constructor(i){t(this,i),this.vegaChange=e(this,"vegaChange",7),this.change=e(this,"change",7),this.globalSlimmers={},this.formFieldController=new c({propertyRules:[{propertyName:"min",ruleFactory:t=>"number"==typeof t?new s({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new p({maxValue:t}):null}],defaultValue:0,attributeGetter:t=>this[t],touchableAreaGetter:()=>this.touchableAreaGetter(),inputContainerGetter:()=>this.stepperContainerRef}),this.changeEventEmitter=j(V,u),this.inputEventPrevent=new f([g,u],(()=>this.stepperContainerRef)),this.vegaComponentUsageRuntimeMetricsSlimmer=new d(I),this.max=9999,this.min=0,this.value=0,this.label="",this.inputDisabled=null,this.disabled=!1,this.isValid=null,this.autoValidation=!0,this.buttonVariant="primary",this.onDecrease=()=>{this.value>this.max?this.value=this.max:this.value>this.min&&(this.value-=1)},this.onIncrease=()=>{this.value<this.max&&(this.value+=1)},this.onChildInputChange=t=>{""!==t.detail&&(this.value=n(t.detail))},this.handleInputBlur=t=>{""===t.host.value&&(this.value=this.min)},this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValue(){const t=h(n(this.value,0),this.min,this.max);this.value=t,this.inputRef.value=t.toString(),this.changeEventEmitter.emit(this.value),x.notify(y,{host:this.host,detail:this.value})}render(){return o(i(a,{class:w(["vega-flex-shrink-0",this.inputDisabled||this.disabled?"disabled":""])},this.renderLabelDom(),i("div",{class:{"vega-stepper-container":!0,"vega-stepper-container-edited":this.inputDisabled},ref:t=>this.stepperContainerRef=t},i("vega-button-circle",{label:"Decrease",showTooltip:!1,icon:"minus-sign",ref:t=>{b.addUniqueObserverToNode(t,v,(()=>this.onDecrease()))},disabled:this.value<=this.min||this.disabled,size:"small",variant:"secondary"==this.buttonVariant?"secondary":"primary"}),i("vega-input",{size:"small",type:"number",max:this.max,min:this.min,value:`${this.value}`,disabled:this.inputDisabled||this.disabled,showClearIcon:!1,ref:t=>(b.addUniqueObserverToNode(t,g,(t=>this.handleInputBlur(t))),b.addUniqueObserverToNode(t,u,(t=>this.onChildInputChange(t))),this.inputRef=t)}),i("vega-button-circle",{label:"Increase",showTooltip:!1,ref:t=>{b.addUniqueObserverToNode(t,v,(()=>this.onIncrease()))},icon:"plus-sign",disabled:this.value>=this.max||this.disabled,size:"small",variant:"secondary"==this.buttonVariant?"secondary":"primary"}))),this.host)}renderLabelDom(){return this.label?i("label",{class:"v-text-center v-text-medium-typeset-1",htmlFor:this.stepperId},this.label):null}get host(){return r(this)}static get watchers(){return{value:["watchValue"]}}};A([m()],V.prototype,"globalSlimmers",void 0),A([l()],V.prototype,"formFieldController",void 0),A([l()],V.prototype,"changeEventEmitter",void 0),A([l()],V.prototype,"inputEventPrevent",void 0),A([l()],V.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),V.style=':host{display:inline-block;line-height:normal}:host>label{display:block;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));text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){:host>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>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>label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host>div{display:inline-flex;justify-content:center;align-items:center;margin-top:8px}:host div.vega-stepper-container-edited vega-input::part(container-wrapper){padding-left:0px;padding-right:0px}:host(.disabled) vega-input::part(input-container){text-align:center;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));padding:0px;border:0;box-shadow:unset}:host(.disabled) vega-input::part(input-container):hover{border:0}:host(.disabled) vega-input::part(input){background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));color:rgba(var(--v-text-primary, 32, 54, 69, 1));border:0}:host vega-input::part(input){width:48px;text-align:center;-moz-appearance:textfield}:host vega-input::part(input)::-webkit-inner-spin-button{-webkit-appearance:none}:host vega-input::part(input)::-webkit-outer-spin-button{-webkit-appearance:none}:host vega-input::part(error){display:none}:host vega-input::part(container-wrapper){padding-left:8px;padding-right:8px}:host .vega-error{display:none}:host .vega-stepper-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-stepper-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-stepper-container.error vega-input::part(input-container):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))}';export{V as vega_stepper}
1
+ import{r as t,c as e,h as i,H as a,g as r}from"./p-6b2342e0.js";import{M as s,a as p}from"./p-f0ff4463.js";import{s as o}from"./p-519a7d55.js";import{c as n,n as h}from"./p-262ec334.js";import{I as l}from"./p-6e1ab235.js";import{V as d,I as m}from"./p-d849e0f5.js";import{F as c}from"./p-20010bd6.js";import{C as u}from"./p-89083d63.js";import{i as f,J as b,D as g,a as v}from"./p-11a6c1b7.js";import{F as y}from"./p-a528714c.js";import{C as x}from"./p-2d0d575f.js";import{c as j}from"./p-c841be8d.js";import{a as w}from"./p-d9671d27.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-1b44db34.js";import"./p-f69f84a7.js";import"./p-10ac8b57.js";import"./p-40f39194.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-0d57293b.js";import"./p-3532aa12.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";const I=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the stepper component",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the stepper component",payloadValue:t=>!1===t.autoValidation},{payloadKey:"BUTTON_VARIANT_IS_PRIMARY",payloadDescription:"Specifies the style variant for the stepper buttons.",payloadValue:t=>"primary"===t.buttonVariant},{payloadKey:"BUTTON_VARIANT_IS_SECONDARY",payloadDescription:"Specifies the style variant for the stepper buttons.",payloadValue:t=>"secondary"===t.buttonVariant}];var A=function(t,e,i,a){var r,s=arguments.length,p=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,i,a);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(p=(s<3?r(p):s>3?r(e,i,p):r(e,i))||p);return s>3&&p&&Object.defineProperty(e,i,p),p};const V=class{constructor(i){t(this,i),this.vegaChange=e(this,"vegaChange",7),this.change=e(this,"change",7),this.globalSlimmers={},this.formFieldController=new c({propertyRules:[{propertyName:"min",ruleFactory:t=>"number"==typeof t?new s({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new p({maxValue:t}):null}],defaultValue:0,attributeGetter:t=>this[t],touchableAreaGetter:()=>this.touchableAreaGetter(),inputContainerGetter:()=>this.stepperContainerRef}),this.changeEventEmitter=j(V,f),this.inputEventPrevent=new u([b,f],(()=>this.stepperContainerRef)),this.vegaComponentUsageRuntimeMetricsSlimmer=new d(I),this.max=9999,this.min=0,this.value=0,this.label="",this.inputDisabled=null,this.disabled=!1,this.isValid=null,this.autoValidation=!0,this.buttonVariant="primary",this.onDecrease=()=>{this.value>this.max?this.value=this.max:this.value>this.min&&(this.value-=1)},this.onIncrease=()=>{this.value<this.max&&(this.value+=1)},this.onChildInputChange=t=>{""!==t.detail&&(this.value=n(t.detail))},this.handleInputBlur=t=>{""===t.host.value&&(this.value=this.min)},this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValue(){const t=h(n(this.value,0),this.min,this.max);this.value=t,this.inputRef.value=t.toString(),this.changeEventEmitter.emit(this.value),x.notify(y,{host:this.host,detail:this.value})}render(){return o(i(a,{class:w(["vega-flex-shrink-0",this.inputDisabled||this.disabled?"disabled":""])},this.renderLabelDom(),i("div",{class:{"vega-stepper-container":!0,"vega-stepper-container-edited":this.inputDisabled},ref:t=>this.stepperContainerRef=t},i("vega-button-circle",{label:"Decrease",showTooltip:!1,icon:"minus-sign",ref:t=>{g.addUniqueObserverToNode(t,v,(()=>this.onDecrease()))},disabled:this.value<=this.min||this.disabled,size:"small",variant:"secondary"==this.buttonVariant?"secondary":"primary"}),i("vega-input",{size:"small",type:"number",max:this.max,min:this.min,value:`${this.value}`,disabled:this.inputDisabled||this.disabled,showClearIcon:!1,ref:t=>(g.addUniqueObserverToNode(t,b,(t=>this.handleInputBlur(t))),g.addUniqueObserverToNode(t,f,(t=>this.onChildInputChange(t))),this.inputRef=t)}),i("vega-button-circle",{label:"Increase",showTooltip:!1,ref:t=>{g.addUniqueObserverToNode(t,v,(()=>this.onIncrease()))},icon:"plus-sign",disabled:this.value>=this.max||this.disabled,size:"small",variant:"secondary"==this.buttonVariant?"secondary":"primary"}))),this.host)}renderLabelDom(){return this.label?i("label",{class:"v-text-center v-text-medium-typeset-1",htmlFor:this.stepperId},this.label):null}get host(){return r(this)}static get watchers(){return{value:["watchValue"]}}};A([m()],V.prototype,"globalSlimmers",void 0),A([l()],V.prototype,"formFieldController",void 0),A([l()],V.prototype,"changeEventEmitter",void 0),A([l()],V.prototype,"inputEventPrevent",void 0),A([l()],V.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),V.style=':host{display:inline-block;line-height:normal}:host>label{display:block;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));text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){:host>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>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>label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host>div{display:inline-flex;justify-content:center;align-items:center;margin-top:8px}:host div.vega-stepper-container-edited vega-input::part(container-wrapper){padding-left:0px;padding-right:0px}:host(.disabled) vega-input::part(input-container){text-align:center;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));padding:0px;border:0;box-shadow:unset}:host(.disabled) vega-input::part(input-container):hover{border:0}:host(.disabled) vega-input::part(input){background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));color:rgba(var(--v-text-primary, 32, 54, 69, 1));border:0}:host vega-input::part(input){width:48px;text-align:center;-moz-appearance:textfield}:host vega-input::part(input)::-webkit-inner-spin-button{-webkit-appearance:none}:host vega-input::part(input)::-webkit-outer-spin-button{-webkit-appearance:none}:host vega-input::part(error){display:none}:host vega-input::part(container-wrapper){padding-left:8px;padding-right:8px}:host .vega-error{display:none}:host .vega-stepper-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-stepper-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-stepper-container.error vega-input::part(input-container):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))}';export{V as vega_stepper}
@@ -1 +1 @@
1
- import{V as t,M as r,A as s,D as i}from"./p-161b9c5b.js";import{m as e,a,s as d}from"./p-262ec334.js";import{I as n}from"./p-abd7aeaa.js";class o extends n{static validateCreditCardDigits(t){const r=e(t).reverse();return!(r.length<12||r.length>19)&&a(r,(t=>t%2==0)).reduce(d,0)%10==0}evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const r=this.formatCreditCardNumber(t),s=this.isValidVisaCreditCard(t)||this.isValidAmexCreditCard(t)||this.isValidDiscoverCreditCard(t)||this.isValidMasterCardCreditCard(t)||!this.isSupportedCreditCardType(r)&&o.validateCreditCardDigits(r);return{isValid:s,message:s?"":"Credit card number is invalid"}}canEvaluate(t,r){return r?this.isAcceptedInputType(t)&&!r.disabled&&r.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isValidVisaCreditCard(r){const s=this.formatCreditCardNumber(r);return t.test(s)&&(13===s.length||16===s.length||19===s.length)&&o.validateCreditCardDigits(s)}isValidMasterCardCreditCard(t){const s=this.formatCreditCardNumber(t);return r.test(s)&&16===s.length&&o.validateCreditCardDigits(s)}isValidAmexCreditCard(t){const r=this.formatCreditCardNumber(t);return s.test(r)&&15===r.length&&o.validateCreditCardDigits(r)}isValidDiscoverCreditCard(t){const r=this.formatCreditCardNumber(t);return i.test(r)&&16===r.length&&o.validateCreditCardDigits(r)}isAcceptedInputType(t){return"string"==typeof t}formatCreditCardNumber(t){return t.replace(/\s/g,"")}isSupportedCreditCardType(e){return t.test(e)||r.test(e)||s.test(e)||i.test(e)}}export{o as V}
1
+ import{V as t,M as r,A as s,D as e}from"./p-1f83cebf.js";import{m as i,a,s as d}from"./p-262ec334.js";import{I as n}from"./p-abd7aeaa.js";class o extends n{static validateCreditCardDigits(t){const r=i(t).reverse();return!(r.length<12||r.length>19)&&a(r,(t=>t%2==0)).reduce(d,0)%10==0}evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const r=this.formatCreditCardNumber(t),s=this.isValidVisaCreditCard(t)||this.isValidAmexCreditCard(t)||this.isValidDiscoverCreditCard(t)||this.isValidMasterCardCreditCard(t)||!this.isSupportedCreditCardType(r)&&o.validateCreditCardDigits(r);return{isValid:s,message:s?"":"Credit card number is invalid"}}canEvaluate(t,r){return r?this.isAcceptedInputType(t)&&!r.disabled&&r.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isValidVisaCreditCard(r){const s=this.formatCreditCardNumber(r);return t.test(s)&&(13===s.length||16===s.length||19===s.length)&&o.validateCreditCardDigits(s)}isValidMasterCardCreditCard(t){const s=this.formatCreditCardNumber(t);return r.test(s)&&16===s.length&&o.validateCreditCardDigits(s)}isValidAmexCreditCard(t){const r=this.formatCreditCardNumber(t);return s.test(r)&&15===r.length&&o.validateCreditCardDigits(r)}isValidDiscoverCreditCard(t){const r=this.formatCreditCardNumber(t);return e.test(r)&&16===r.length&&o.validateCreditCardDigits(r)}isAcceptedInputType(t){return"string"==typeof t}formatCreditCardNumber(t){return t.replace(/\s/g,"")}isSupportedCreditCardType(i){return t.test(i)||r.test(i)||s.test(i)||e.test(i)}}export{o as V}
@@ -1 +1 @@
1
- import{r as t,h as i,H as e,g as n}from"./p-6b2342e0.js";import{c as a}from"./p-86194314.js";import{s as o}from"./p-519a7d55.js";import{g as s,D as r,a as p}from"./p-d9671d27.js";import{I as g}from"./p-6e1ab235.js";import{V as f,I as c}from"./p-d849e0f5.js";import{D as h,a as l}from"./p-ff57c872.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";var x=function(t,i,e,n){var a,o=arguments.length,s=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const d={success:"checkmark-circle",warning:"warning-triangle-filled",error:"help-filled",info:"info-circle-filled"},m=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.isMobileDevice=s()===r.MOBILE,this.notificationTitle="",this.message="",this.type="info",this.duration=5e3,this.showCloseButton=!0,this.actionButtons=[],this.renderPrefixIcon=()=>i("div",{class:"vega-page-notification-prefix"},i("vega-icon",{icon:d[this.type],size:this.isMobileDevice?"size-16":"size-24"})),this.renderContent=()=>i("div",{class:"vega-page-notification-content"},this.notificationTitle&&i("div",{class:"vega-page-notification-title"},this.notificationTitle),i("div",{class:"vega-page-notification-message"},this.message)),this.autoCloseAfterDuration=()=>{this.duration>0&&setTimeout((()=>{this.close()}),this.duration)}}componentDidLoad(){this.autoCloseAfterDuration()}async close(){this.host.classList.add("vega-page-notification-fade-out"),setTimeout((()=>{this.host.remove()}),300)}render(){const t=p([this.type,this.isMobileDevice&&"mobile"].filter(Boolean));return o(i(e,{class:t},i("vega-box",{padding:this.isMobileDevice?"size-16":"size-24"},i("vega-flex",{gap:"size-16"},this.renderPrefixIcon(),this.renderContent(),this.renderCloseButtons()),this.renderActionButtons())),this.host)}renderCloseButtons(){if(this.showCloseButton)return i("div",{"aria-label":"Close Button",class:"vega-page-notification-close-btn",onClick:()=>this.close(),role:"button",tabIndex:0,onKeyDown:a()},i("vega-icon",{icon:"close",size:this.isMobileDevice?"size-12":"size-16"}))}renderActionButtons(){if(this.actionButtons&&0!==this.actionButtons.length)return i("div",{class:"vega-page-notification-actions-container"},this.actionButtons.map((t=>i("vega-button",{size:this.isMobileDevice?"small":"default",label:t.label,variant:"secondary",ref:i=>{h.addUniqueObserverToNode(i,l,t.onVegaClick)}}))))}get host(){return n(this)}};x([c()],m.prototype,"globalSlimmers",void 0),x([g()],m.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),m.style=':host{display:inline-block;box-sizing:border-box;border-radius:12px;max-width:480px;box-shadow:0 4px 8px rgba(2, 2, 15, 0.1), 0 12px 20px rgba(2, 2, 15, 0.15);animation:fade-in-right 300ms ease-in-out}:host(.mobile){width:100%;max-width:100%;animation:fade-in-up 300ms ease-in-out}:host(.vega-page-notification-fade-out){opacity:0;animation:fade-out 300ms ease-in-out}:host vega-icon{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1))}:host .vega-page-notification-prefix{display:flex}:host(.mobile) .vega-page-notification-prefix{padding-top:4px}:host .vega-page-notification-content{flex:1 1 0%;overflow:auto}:host .vega-page-notification-close-btn{cursor:pointer;display:inline-flex;margin-top:4px}:host(.mobile) .vega-page-notification-close-btn{padding:2px}:host .vega-page-notification-actions-container{display:flex;align-items:flex-end;flex-wrap:wrap;gap:16px;justify-content:flex-end;margin-top:24px}:host(.mobile) .vega-page-notification-actions-container{margin-top:16px}:host .vega-page-notification-title{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-page-notification-message{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:28px;letter-spacing:0px;overflow-wrap:break-word;margin-top:2px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-message{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-page-notification-message{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-page-notification-message{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));border:2px solid rgba(var(--v-text-page-notification-content, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host(.success){background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.warning){background-color:rgba(var(--v-bg-status-warning, 255, 220, 131, 1))}:host(.error){background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.info){background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1))}.vega-page-notification-list{display:flex;flex-direction:column;align-items:flex-end;position:fixed}.vega-page-notification-list-topRight{top:24px;right:24px}.vega-page-notification-list-bottom{left:0px;right:0px;padding-left:16px;padding-right:16px;align-items:center;bottom:0px}@keyframes fade-in-right{from{opacity:0;transform:translateX(100%)}to{opacity:1;transform:none}}@keyframes fade-in-up{from{opacity:0;transform:translateY(100%)}to{opacity:1;transform:none}}@keyframes fade-out{from{opacity:1}to{opacity:0}}';var v=function(t,i,e,n){var a,o=arguments.length,s=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const b=class{constructor(i){t(this,i),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new f}render(){return i(e,null,i("slot",null))}get host(){return n(this)}};v([c()],b.prototype,"globalSlimmers",void 0),v([g()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b.style=":host{position:fixed;display:flex;flex-direction:column;align-items:flex-end}:host(.vega-page-notification-list-topRight){top:24px;right:24px}:host(.vega-page-notification-list-bottom){align-items:center;padding-left:16px;padding-right:16px;left:0px;right:0px;bottom:0px}";export{m as vega_page_notification,b as vega_page_notification_list}
1
+ import{r as t,h as i,H as e,g as n}from"./p-6b2342e0.js";import{c as a}from"./p-86194314.js";import{s as o}from"./p-519a7d55.js";import{g as s,D as r,a as p}from"./p-d9671d27.js";import{I as g}from"./p-6e1ab235.js";import{V as f,I as c}from"./p-d849e0f5.js";import{D as h,a as l}from"./p-11a6c1b7.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";var x=function(t,i,e,n){var a,o=arguments.length,s=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const d={success:"checkmark-circle",warning:"warning-triangle-filled",error:"help-filled",info:"info-circle-filled"},m=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.isMobileDevice=s()===r.MOBILE,this.notificationTitle="",this.message="",this.type="info",this.duration=5e3,this.showCloseButton=!0,this.actionButtons=[],this.renderPrefixIcon=()=>i("div",{class:"vega-page-notification-prefix"},i("vega-icon",{icon:d[this.type],size:this.isMobileDevice?"size-16":"size-24"})),this.renderContent=()=>i("div",{class:"vega-page-notification-content"},this.notificationTitle&&i("div",{class:"vega-page-notification-title"},this.notificationTitle),i("div",{class:"vega-page-notification-message"},this.message)),this.autoCloseAfterDuration=()=>{this.duration>0&&setTimeout((()=>{this.close()}),this.duration)}}componentDidLoad(){this.autoCloseAfterDuration()}async close(){this.host.classList.add("vega-page-notification-fade-out"),setTimeout((()=>{this.host.remove()}),300)}render(){const t=p([this.type,this.isMobileDevice&&"mobile"].filter(Boolean));return o(i(e,{class:t},i("vega-box",{padding:this.isMobileDevice?"size-16":"size-24"},i("vega-flex",{gap:"size-16"},this.renderPrefixIcon(),this.renderContent(),this.renderCloseButtons()),this.renderActionButtons())),this.host)}renderCloseButtons(){if(this.showCloseButton)return i("div",{"aria-label":"Close Button",class:"vega-page-notification-close-btn",onClick:()=>this.close(),role:"button",tabIndex:0,onKeyDown:a()},i("vega-icon",{icon:"close",size:this.isMobileDevice?"size-12":"size-16"}))}renderActionButtons(){if(this.actionButtons&&0!==this.actionButtons.length)return i("div",{class:"vega-page-notification-actions-container"},this.actionButtons.map((t=>i("vega-button",{size:this.isMobileDevice?"small":"default",label:t.label,variant:"secondary",ref:i=>{h.addUniqueObserverToNode(i,l,t.onVegaClick)}}))))}get host(){return n(this)}};x([c()],m.prototype,"globalSlimmers",void 0),x([g()],m.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),m.style=':host{display:inline-block;box-sizing:border-box;border-radius:12px;max-width:480px;box-shadow:0 4px 8px rgba(2, 2, 15, 0.1), 0 12px 20px rgba(2, 2, 15, 0.15);animation:fade-in-right 300ms ease-in-out}:host(.mobile){width:100%;max-width:100%;animation:fade-in-up 300ms ease-in-out}:host(.vega-page-notification-fade-out){opacity:0;animation:fade-out 300ms ease-in-out}:host vega-icon{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1))}:host .vega-page-notification-prefix{display:flex}:host(.mobile) .vega-page-notification-prefix{padding-top:4px}:host .vega-page-notification-content{flex:1 1 0%;overflow:auto}:host .vega-page-notification-close-btn{cursor:pointer;display:inline-flex;margin-top:4px}:host(.mobile) .vega-page-notification-close-btn{padding:2px}:host .vega-page-notification-actions-container{display:flex;align-items:flex-end;flex-wrap:wrap;gap:16px;justify-content:flex-end;margin-top:24px}:host(.mobile) .vega-page-notification-actions-container{margin-top:16px}:host .vega-page-notification-title{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.mobile) .vega-page-notification-title{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-page-notification-message{color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:28px;letter-spacing:0px;overflow-wrap:break-word;margin-top:2px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-message{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-page-notification-message{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-page-notification-message{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.mobile) .vega-page-notification-message{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));color:rgba(var(--v-text-page-notification-content, 32, 54, 69, 1));border:2px solid rgba(var(--v-text-page-notification-content, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-page-notification-actions-container vega-button::part(button):hover,:host .vega-page-notification-actions-container vega-button::part(button){font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host(.success){background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.warning){background-color:rgba(var(--v-bg-status-warning, 255, 220, 131, 1))}:host(.error){background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.info){background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1))}.vega-page-notification-list{display:flex;flex-direction:column;align-items:flex-end;position:fixed}.vega-page-notification-list-topRight{top:24px;right:24px}.vega-page-notification-list-bottom{left:0px;right:0px;padding-left:16px;padding-right:16px;align-items:center;bottom:0px}@keyframes fade-in-right{from{opacity:0;transform:translateX(100%)}to{opacity:1;transform:none}}@keyframes fade-in-up{from{opacity:0;transform:translateY(100%)}to{opacity:1;transform:none}}@keyframes fade-out{from{opacity:1}to{opacity:0}}';var v=function(t,i,e,n){var a,o=arguments.length,s=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const b=class{constructor(i){t(this,i),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new f}render(){return i(e,null,i("slot",null))}get host(){return n(this)}};v([c()],b.prototype,"globalSlimmers",void 0),v([g()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b.style=":host{position:fixed;display:flex;flex-direction:column;align-items:flex-end}:host(.vega-page-notification-list-topRight){top:24px;right:24px}:host(.vega-page-notification-list-bottom){align-items:center;padding-left:16px;padding-right:16px;left:0px;right:0px;bottom:0px}";export{m as vega_page_notification,b as vega_page_notification_list}
@@ -1 +1 @@
1
- import{h as t}from"./p-6b2342e0.js";import{a as e}from"./p-8c9ea6f4.js";import{c as o,V as s}from"./p-6e1ab235.js";import{A as r,O as i,b as n,$ as c,z as l,l as a}from"./p-39d56e3d.js";import{D as h,a as u,b as d,c as p,i as f}from"./p-ff57c872.js";import{a as v}from"./p-ef9cbad1.js";import{g as b}from"./p-151b1deb.js";var m=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class C extends s{constructor({icon:e,tooltip:o,autoFocusOnClick:s=!0}){super(),this.renderBtn=({showArrowIcon:e,iconColor:o}={})=>{var s;return t("vega-tooltip",{text:this.translationSlimmer.t(this.tooltip.text),placement:["bottom","top"]},t("vega-rich-text-editor-toolbar-button",Object.assign({showArrowIcon:e,icon:this.icon,iconColor:o,ref:t=>{h.addUniqueObserverToNode(t,u,(()=>{this.handleClick()}))},selected:this.isSelected(),disabled:this.isDisabled(),hidden:this.isHidden()},this.preventLostFocus()),null===(s=this.renderSlotContent)||void 0===s?void 0:s.call(this)))},this.handleClick=()=>{"function"==typeof this.onClick&&(!this.selectionController.getSelectedNodes().length&&this.autoFocusOnClick?this.focusController.focusOnLastTextNode().then((()=>{this.onClick()})):this.onClick())},this.icon=e,this.tooltip=o,this.autoFocusOnClick=s}setIcon(t){this.icon=t}isHidden(){return!1}render(){return"function"==typeof this.renderBtnWrapper?this.renderBtnWrapper(this.renderBtn):this.renderBtn()}isDisabled(){return this.disabled}preventLostFocus(){return{onMouseDown:t=>t.preventDefault()}}}m([o()],C.prototype,"translationSlimmer",void 0),m([o()],C.prototype,"selectionController",void 0),m([o()],C.prototype,"focusController",void 0),m([o()],C.prototype,"disabled",void 0);class w extends C{constructor(t){super(t)}isHidden(){return this.sourceView}isDisabled(){return super.isDisabled()&&!this.sourceView}shouldDisabledToolbar(t,e){return t&&!r.canHandle(e,t)}}!function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);i>3&&n&&Object.defineProperty(e,o,n)}([o()],w.prototype,"sourceView",void 0);var g=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class x extends w{constructor(){super({icon:"text",tooltip:{text:"Text Color"}}),this.popoverShow=!1,v.registerCustomDarkModeColor(x.formatDarkModeColor())}static formatDarkModeColor(){return i.reduce(((t,e)=>(e.dark&&(t[`rich-text-editor-${e.key}`]=e.dark),t)),{})}renderSlotContent(){return t("div",{class:{"toolbar-btn-color-preview-box":!0,disabled:this.isDisabled()},style:{backgroundColor:this.getCurrentColor()}})}handlePopoverShowChange(){this.popoverShow=!0}handlePopoverHideChange(){this.popoverShow=!1}renderBtnWrapper(e){return t("vega-popover",{placement:"bottom",alignment:"center",ref:t=>{this.popoverRef=t,h.addUniqueObserverToNode(t,d,this.handlePopoverShowChange.bind(this)),h.addUniqueObserverToNode(t,p,this.handlePopoverHideChange.bind(this))}},t("div",{slot:"popover-content"},e({showArrowIcon:!1})),t("div",Object.assign({slot:"popover",style:{userSelect:"none"}},super.preventLostFocus()),this.renderPopoverContent()))}renderPopoverContent(){return t("vega-color-picker",{isInline:!0,colors:i.map((t=>t[this.isInDarkMode?"dark":"light"])),ref:t=>{h.addUniqueObserverToNode(t,f,this.handleChange.bind(this))},value:this.getCurrentColor()})}async handleChange(t){this.popoverShow&&(this.selectionController.getSelectedNodes().length||await this.focusController.focusOnLastTextNode(),this.selectionController.getSelectedNodes().filter((t=>t instanceof n)).forEach((e=>e.apply(new c(this.matchColor(t.detail).key))))),this.popoverRef.hide()}matchColor(t){return i.find((e=>e[this.isInDarkMode?"dark":"light"]===t))}getCurrentColor(){let t=i[0];const e=this.selectionController.getSelectedNodes();return e.length>1&&(t=this.isSelectedSameColor(e)?this.getTextColor(e[0]):null),1===e.length&&(t=this.getTextColor(e[0])),t?t[this.isInDarkMode?"dark":"light"]:null}isSelected(){return!1}isSelectedSameColor(t){return t.every((e=>this.getTextColor(e).key===this.getTextColor(t[0]).key))}getTextColor(t){var e;return(null===(e=t.getAnnotationByType("TEXT_COLOR"))||void 0===e?void 0:e.textColor)||i[0]}isDisabled(){const t=this.selectionController.getSelectedNodes();return super.isDisabled()||t.some((t=>{var e;return(null===(e=t.getAnnotationByType(l.CODE))||void 0===e?void 0:e.code)||t.getAnnotationByType(l.LINK)||this.shouldDisabledToolbar(t,c.name)}))}}e.register({text:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M64 96v32c0 17.7-14.3 32-32 32s-32-14.3-32-32V80C0 53.5 21.5 32 48 32H224 400c26.5 0 48 21.5 48 48v48c0 17.7-14.3 32-32 32s-32-14.3-32-32V96H256l0 320h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H144c-17.7 0-32-14.3-32-32s14.3-32 32-32h48l0-320H64z"/></svg>'}}),g([o()],x.prototype,"host",void 0),g([o()],x.prototype,"isInDarkMode",void 0),g([o()],x.prototype,"selectionController",void 0),g([o()],x.prototype,"focusController",void 0);const j=new class{constructor(){this.textNodeElements=new Map}register(t,e){this.textNodeElements.set(t,e)}getTextNodeElements(){return this.textNodeElements}};class y extends a{constructor(t,e){super(),this.isFlushable=!0,this.size=t,this.alt=e}toAnnotation(){return new b(this.size,this.alt)}}export{y as I,j as T,w as V,x as a,C as b}
1
+ import{h as t}from"./p-6b2342e0.js";import{a as e}from"./p-8c9ea6f4.js";import{c as o,V as s}from"./p-6e1ab235.js";import{A as r,P as i,b as n,$ as c,D as l,l as a}from"./p-5b048141.js";import{D as h,a as u,b as d,c as p,i as f}from"./p-11a6c1b7.js";import{a as v}from"./p-ef9cbad1.js";import{g as b}from"./p-b56b0b89.js";var m=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class C extends s{constructor({icon:e,tooltip:o,autoFocusOnClick:s=!0}){super(),this.renderBtn=({showArrowIcon:e,iconColor:o}={})=>{var s;return t("vega-tooltip",{text:this.translationSlimmer.t(this.tooltip.text),placement:["bottom","top"]},t("vega-rich-text-editor-toolbar-button",Object.assign({showArrowIcon:e,icon:this.icon,iconColor:o,ref:t=>{h.addUniqueObserverToNode(t,u,(()=>{this.handleClick()}))},selected:this.isSelected(),disabled:this.isDisabled(),hidden:this.isHidden()},this.preventLostFocus()),null===(s=this.renderSlotContent)||void 0===s?void 0:s.call(this)))},this.handleClick=()=>{"function"==typeof this.onClick&&(!this.selectionController.getSelectedNodes().length&&this.autoFocusOnClick?this.focusController.focusOnLastTextNode().then((()=>{this.onClick()})):this.onClick())},this.icon=e,this.tooltip=o,this.autoFocusOnClick=s}setIcon(t){this.icon=t}isHidden(){return!1}render(){return"function"==typeof this.renderBtnWrapper?this.renderBtnWrapper(this.renderBtn):this.renderBtn()}isDisabled(){return this.disabled}preventLostFocus(){return{onMouseDown:t=>t.preventDefault()}}}m([o()],C.prototype,"translationSlimmer",void 0),m([o()],C.prototype,"selectionController",void 0),m([o()],C.prototype,"focusController",void 0),m([o()],C.prototype,"disabled",void 0);class w extends C{constructor(t){super(t)}isHidden(){return this.sourceView}isDisabled(){return super.isDisabled()&&!this.sourceView}shouldDisabledToolbar(t,e){return t&&!r.canHandle(e,t)}}!function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);i>3&&n&&Object.defineProperty(e,o,n)}([o()],w.prototype,"sourceView",void 0);var j=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class x extends w{constructor(){super({icon:"text",tooltip:{text:"Text Color"}}),this.popoverShow=!1,v.registerCustomDarkModeColor(x.formatDarkModeColor())}static formatDarkModeColor(){return i.reduce(((t,e)=>(e.dark&&(t[`rich-text-editor-${e.key}`]=e.dark),t)),{})}renderSlotContent(){return t("div",{class:{"toolbar-btn-color-preview-box":!0,disabled:this.isDisabled()},style:{backgroundColor:this.getCurrentColor()}})}handlePopoverShowChange(){this.popoverShow=!0}handlePopoverHideChange(){this.popoverShow=!1}renderBtnWrapper(e){return t("vega-popover",{placement:"bottom",alignment:"center",ref:t=>{this.popoverRef=t,h.addUniqueObserverToNode(t,d,this.handlePopoverShowChange.bind(this)),h.addUniqueObserverToNode(t,p,this.handlePopoverHideChange.bind(this))}},t("div",{slot:"popover-content"},e({showArrowIcon:!1})),t("div",Object.assign({slot:"popover",style:{userSelect:"none"}},super.preventLostFocus()),this.renderPopoverContent()))}renderPopoverContent(){return t("vega-color-picker",{isInline:!0,colors:i.map((t=>t[this.isInDarkMode?"dark":"light"])),ref:t=>{h.addUniqueObserverToNode(t,f,this.handleChange.bind(this))},value:this.getCurrentColor()})}async handleChange(t){this.popoverShow&&(this.selectionController.getSelectedNodes().length||await this.focusController.focusOnLastTextNode(),this.selectionController.getSelectedNodes().filter((t=>t instanceof n)).forEach((e=>e.apply(new c(this.matchColor(t.detail).key))))),this.popoverRef.hide()}matchColor(t){return i.find((e=>e[this.isInDarkMode?"dark":"light"]===t))}getCurrentColor(){let t=i[0];const e=this.selectionController.getSelectedNodes();return e.length>1&&(t=this.isSelectedSameColor(e)?this.getTextColor(e[0]):null),1===e.length&&(t=this.getTextColor(e[0])),t?t[this.isInDarkMode?"dark":"light"]:null}isSelected(){return!1}isSelectedSameColor(t){return t.every((e=>this.getTextColor(e).key===this.getTextColor(t[0]).key))}getTextColor(t){var e;return(null===(e=t.getAnnotationByType("TEXT_COLOR"))||void 0===e?void 0:e.textColor)||i[0]}isDisabled(){const t=this.selectionController.getSelectedNodes();return super.isDisabled()||t.some((t=>{var e;return(null===(e=t.getAnnotationByType(l.CODE))||void 0===e?void 0:e.code)||t.getAnnotationByType(l.LINK)||this.shouldDisabledToolbar(t,c.name)}))}}e.register({text:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M64 96v32c0 17.7-14.3 32-32 32s-32-14.3-32-32V80C0 53.5 21.5 32 48 32H224 400c26.5 0 48 21.5 48 48v48c0 17.7-14.3 32-32 32s-32-14.3-32-32V96H256l0 320h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H144c-17.7 0-32-14.3-32-32s14.3-32 32-32h48l0-320H64z"/></svg>'}}),j([o()],x.prototype,"host",void 0),j([o()],x.prototype,"isInDarkMode",void 0),j([o()],x.prototype,"selectionController",void 0),j([o()],x.prototype,"focusController",void 0);class g extends a{constructor(t,e){super(),this.isFlushable=!0,this.size=t,this.alt=e}toAnnotation(){return new b(this.size,this.alt)}}export{g as I,x as T,w as V,C as a}