@heartlandone/vega 2.49.1 → 2.50.0-RTE-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 (646) hide show
  1. package/dist/cjs/{app-globals-65622aeb.js → app-globals-8e811cac.js} +6 -6
  2. package/dist/cjs/{child-nodes-event-prevent-slimmer-cc193ee1.js → child-nodes-event-prevent-slimmer-26ecfb15.js} +1 -1
  3. package/dist/cjs/{content-state-6a48bcb5.js → code-block-4cd8bccd.js} +1166 -1131
  4. package/dist/cjs/content-state-6cb98931.js +2496 -0
  5. package/dist/cjs/{design-token-cba4222e.js → design-token-8b48cb59.js} +1 -1
  6. package/dist/cjs/{element-appender-slimmer-4a26ecb2.js → element-appender-slimmer-d6b975e6.js} +3 -3
  7. package/dist/cjs/{event-emit-slimmer-8247249c.js → event-emit-slimmer-ee7a8c06.js} +1 -1
  8. package/dist/cjs/{form-field-controller-slimmer-4b0af5bc.js → form-field-controller-slimmer-88cbb139.js} +4 -4
  9. package/dist/cjs/{image-annotation-action-9c2b9c8e.js → image-annotation-action-f36b1a72.js} +65 -35
  10. package/dist/cjs/{index-c4dec3aa.js → index-4dd54e6b.js} +1 -1
  11. package/dist/cjs/{index-09acd3c9.js → index-7700600c.js} +9 -0
  12. package/dist/cjs/index.cjs.js +17 -16
  13. package/dist/cjs/{internal-vega-event-manager-c9948b59.js → internal-vega-event-manager-58afcde7.js} +1 -0
  14. package/dist/cjs/loader.cjs.js +11 -9
  15. package/dist/cjs/{public-rules-10ec636d.js → public-rules-555271e0.js} +8 -6
  16. package/dist/cjs/{responsive-format-facade-263d49f6.js → responsive-format-facade-8ce41c8a.js} +3 -3
  17. package/dist/cjs/{rich-text-editor-required-rule-5faded94.js → rich-text-editor-required-rule-d1b38bf7.js} +1 -1
  18. package/dist/cjs/selection-controller-828990cc.js +765 -0
  19. package/dist/cjs/string-39438062.js +24 -0
  20. package/dist/cjs/{string-input-formatter-slimmer-50322824.js → string-input-formatter-slimmer-9e7d7ce2.js} +2 -2
  21. package/dist/cjs/{style-formatter-ae0ef7fc.js → style-formatter-2294d77f.js} +1 -1
  22. package/dist/cjs/{sub-state-notify-slimmer-7f437b19.js → sub-state-notify-slimmer-f3ee01b7.js} +1 -1
  23. package/dist/cjs/{sub-state-observer-slimmer-e90362cd.js → sub-state-observer-slimmer-e1a00b74.js} +1 -1
  24. package/dist/cjs/{translation-212b1875.js → translation-e5003a00.js} +5 -0
  25. package/dist/cjs/{translation-slimmer-d1512c6d.js → translation-slimmer-127a0f83.js} +1 -1
  26. package/dist/cjs/vega-accordion.cjs.entry.js +11 -9
  27. package/dist/cjs/vega-app-footer.cjs.entry.js +1 -1
  28. package/dist/cjs/vega-app-header-button.cjs.entry.js +12 -10
  29. package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
  30. package/dist/cjs/vega-banner.cjs.entry.js +3 -3
  31. package/dist/cjs/vega-bar-chart.cjs.entry.js +1 -1
  32. package/dist/cjs/vega-box.cjs.entry.js +11 -9
  33. package/dist/cjs/vega-brand-logo.cjs.entry.js +1 -1
  34. package/dist/cjs/vega-breadcrumb.cjs.entry.js +4 -4
  35. package/dist/cjs/vega-button-circle.cjs.entry.js +12 -10
  36. package/dist/cjs/vega-button-group_2.cjs.entry.js +7 -7
  37. package/dist/cjs/vega-button-link.cjs.entry.js +4 -4
  38. package/dist/cjs/vega-button.cjs.entry.js +11 -9
  39. package/dist/cjs/vega-calendar_3.cjs.entry.js +9 -9
  40. package/dist/cjs/vega-card.cjs.entry.js +10 -8
  41. package/dist/cjs/vega-carousel.cjs.entry.js +10 -8
  42. package/dist/cjs/vega-checkbox_2.cjs.entry.js +9 -9
  43. package/dist/cjs/vega-chip.cjs.entry.js +12 -10
  44. package/dist/cjs/vega-code-block.cjs.entry.js +4073 -0
  45. package/dist/cjs/vega-color-picker.cjs.entry.js +8 -8
  46. package/dist/cjs/vega-combo-box.cjs.entry.js +9 -9
  47. package/dist/cjs/vega-counter-badge.cjs.entry.js +1 -1
  48. package/dist/cjs/vega-date-picker_2.cjs.entry.js +17 -16
  49. package/dist/cjs/vega-dialog_2.cjs.entry.js +12 -10
  50. package/dist/cjs/vega-divider.cjs.entry.js +10 -8
  51. package/dist/cjs/vega-dropdown_5.cjs.entry.js +15 -13
  52. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  53. package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
  54. package/dist/cjs/vega-field-label.cjs.entry.js +3 -3
  55. package/dist/cjs/vega-file-uploader.cjs.entry.js +9 -9
  56. package/dist/cjs/vega-flag-icon.cjs.entry.js +10 -8
  57. package/dist/cjs/vega-flex.cjs.entry.js +11 -9
  58. package/dist/cjs/vega-font.cjs.entry.js +10 -8
  59. package/dist/cjs/vega-form.cjs.entry.js +10 -10
  60. package/dist/cjs/vega-grid.cjs.entry.js +10 -8
  61. package/dist/cjs/vega-hint.cjs.entry.js +1 -1
  62. package/dist/cjs/vega-icon.cjs.entry.js +10 -8
  63. package/dist/cjs/vega-image-uploader.cjs.entry.js +14 -13
  64. package/dist/cjs/vega-input-credit-card.cjs.entry.js +9 -9
  65. package/dist/cjs/vega-input-numeric.cjs.entry.js +10 -10
  66. package/dist/cjs/vega-input-phone-number.cjs.entry.js +12 -11
  67. package/dist/cjs/vega-input-range.cjs.entry.js +10 -10
  68. package/dist/cjs/vega-input-select.cjs.entry.js +19 -18
  69. package/dist/cjs/vega-input.cjs.entry.js +10 -10
  70. package/dist/cjs/{vega-internal-event-id-bfea9b93.js → vega-internal-event-id-62371952.js} +2 -0
  71. package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
  72. package/dist/cjs/vega-left-nav_5.cjs.entry.js +13 -11
  73. package/dist/cjs/vega-line-chart.cjs.entry.js +1 -1
  74. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +9 -7
  75. package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
  76. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +4 -4
  77. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +4 -4
  78. package/dist/cjs/vega-pagination.cjs.entry.js +12 -10
  79. package/dist/cjs/vega-pie-chart.cjs.entry.js +1 -1
  80. package/dist/cjs/vega-popover_2.cjs.entry.js +11 -9
  81. package/dist/cjs/vega-progress-tracker.cjs.entry.js +3 -3
  82. package/dist/cjs/vega-radio_2.cjs.entry.js +9 -9
  83. package/dist/cjs/vega-rich-text-content.cjs.entry.js +311 -137
  84. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +1225 -2502
  85. package/dist/cjs/vega-section-title.cjs.entry.js +1 -1
  86. package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
  87. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +14 -13
  88. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +10 -10
  89. package/dist/cjs/vega-sidenav_3.cjs.entry.js +12 -10
  90. package/dist/cjs/vega-signature-capture.cjs.entry.js +14 -13
  91. package/dist/cjs/{vega-skeleton-loader-controller-db868c98.js → vega-skeleton-loader-controller-83e05b6c.js} +1 -1
  92. package/dist/cjs/vega-skeleton.cjs.entry.js +1 -1
  93. package/dist/cjs/vega-slot-container.cjs.entry.js +1 -1
  94. package/dist/cjs/vega-stepper.cjs.entry.js +9 -9
  95. package/dist/cjs/vega-tab-group_2.cjs.entry.js +4 -4
  96. package/dist/cjs/vega-table_8.cjs.entry.js +14 -12
  97. package/dist/cjs/vega-text.cjs.entry.js +1 -1
  98. package/dist/cjs/vega-textarea.cjs.entry.js +9 -9
  99. package/dist/cjs/vega-time-picker_2.cjs.entry.js +15 -14
  100. package/dist/cjs/vega-toggle-switch.cjs.entry.js +8 -8
  101. package/dist/cjs/vega-tooltip_2.cjs.entry.js +10 -8
  102. package/dist/cjs/vega.cjs.js +11 -9
  103. package/dist/collection/collection-manifest.json +7 -1
  104. package/dist/collection/components/vega-code-block/assets/copy.js +3 -0
  105. package/dist/collection/components/vega-code-block/slimmers/controllers/code-highlight-parser.abstract.js +62 -0
  106. package/dist/collection/components/vega-code-block/slimmers/controllers/default-code-highlight-parse-controller.js +48 -0
  107. package/dist/collection/components/vega-code-block/slimmers/controllers/prism-code-highlight-parse-controller.js +99 -0
  108. package/dist/collection/components/vega-code-block/slimmers/controllers/vega-code-block-content-parse-controller.js +50 -0
  109. package/dist/collection/components/vega-code-block/slimmers/controllers/vega-code-block-focus-controller.js +57 -0
  110. package/dist/collection/components/vega-code-block/slimmers/controllers/vega-code-block-input-controller.js +255 -0
  111. package/dist/collection/components/vega-code-block/slimmers/controllers/vega-code-block-selection-controller.js +266 -0
  112. package/dist/collection/components/vega-code-block/slimmers/controllers/vega-code-block-value-controller.js +44 -0
  113. package/dist/collection/components/vega-code-block/slimmers/renderers/vega-code-block-content-renderer.js +123 -0
  114. package/dist/collection/components/vega-code-block/slimmers/renderers/vega-code-block-copy-button-renderer.js +67 -0
  115. package/dist/collection/components/vega-code-block/slimmers/renderers/vega-code-block-renderer.js +122 -0
  116. package/dist/collection/components/vega-code-block/types.js +10 -0
  117. package/dist/collection/components/vega-code-block/vega-code-block.css +158 -0
  118. package/dist/collection/components/vega-code-block/vega-code-block.js +399 -0
  119. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +5 -5
  120. package/dist/collection/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.js +2 -0
  121. package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.css +60 -5
  122. package/dist/collection/components/vega-rich-text-editor/assets/file-code.js +3 -0
  123. package/dist/collection/components/vega-rich-text-editor/assets/rectangle-code.js +3 -0
  124. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +24 -0
  125. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-horizontal-alignment-strategy.js +15 -0
  126. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-indent-strategy.js +15 -0
  127. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.js +1 -0
  128. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/code-node-set-selection-range-strategy.js +13 -0
  129. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.js +14 -0
  130. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.js +3 -1
  131. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.js +1 -1
  132. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-code-block-strategy.js +48 -0
  133. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/code-block-insert-image-strategy.js +17 -0
  134. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/code-block-remove-self-strategy.js +77 -0
  135. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/switch-out-from-code-block-strategy.js +38 -0
  136. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/update-code-block-strategy.js +14 -0
  137. package/dist/collection/components/vega-rich-text-editor/dto/actions/custom-style-annotation-action.js +20 -0
  138. package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +4 -0
  139. package/dist/collection/components/vega-rich-text-editor/dto/actions/remove-code-block-action.js +13 -0
  140. package/dist/collection/components/vega-rich-text-editor/dto/actions/switch-out-from-code-block-action.js +15 -0
  141. package/dist/collection/components/vega-rich-text-editor/dto/actions/transform-to-code-block-action.js +13 -0
  142. package/dist/collection/components/vega-rich-text-editor/dto/actions/update-code-block-action.js +15 -0
  143. package/dist/collection/components/vega-rich-text-editor/dto/annotations/block-annotation.abstract.js +1 -0
  144. package/dist/collection/components/vega-rich-text-editor/dto/annotations/bold-annotation.js +13 -5
  145. package/dist/collection/components/vega-rich-text-editor/dto/annotations/clear-formatting-annotation.js +2 -0
  146. package/dist/collection/components/vega-rich-text-editor/dto/annotations/code-annotation.js +14 -9
  147. package/dist/collection/components/vega-rich-text-editor/dto/annotations/common-annotation.abstract.js +12 -0
  148. package/dist/collection/components/vega-rich-text-editor/dto/annotations/custom-attribute-annotation.js +65 -0
  149. package/dist/collection/components/vega-rich-text-editor/dto/annotations/custom-class-annotation.js +54 -0
  150. package/dist/collection/components/vega-rich-text-editor/dto/annotations/custom-style-annotation.js +57 -0
  151. package/dist/collection/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.js +26 -10
  152. package/dist/collection/components/vega-rich-text-editor/dto/annotations/image-annotation.js +16 -7
  153. package/dist/collection/components/vega-rich-text-editor/dto/annotations/indent-annotation.js +8 -2
  154. package/dist/collection/components/vega-rich-text-editor/dto/annotations/italic-annotation.js +13 -5
  155. package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-annotation.js +12 -9
  156. package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js +89 -0
  157. package/dist/collection/components/vega-rich-text-editor/dto/annotations/list-annotation.js +41 -0
  158. package/dist/collection/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.js +9 -9
  159. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-color-annotation.js +3 -7
  160. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-annotation.js +74 -12
  161. package/dist/collection/components/vega-rich-text-editor/dto/annotations/underline-annotation.js +9 -9
  162. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +69 -2
  163. package/dist/collection/components/vega-rich-text-editor/dto/blocks/code-block.js +106 -0
  164. package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +15 -1
  165. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +50 -0
  166. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +12 -1
  167. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +66 -2
  168. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +29 -0
  169. package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +56 -0
  170. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +26 -9
  171. package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +81 -0
  172. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +15 -2
  173. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-renderer.abstract.js +5 -22
  174. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.js +9 -93
  175. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/code-block-renderer.js +62 -0
  176. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/image-block-renderer.js +1 -1
  177. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.js +121 -0
  178. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.js +1 -1
  179. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.js +1 -1
  180. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.js +2 -23
  181. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/code-block-node-renderer.js +81 -0
  182. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/image-node-renderer.js +47 -7
  183. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/node-renderer.abstract.js +0 -27
  184. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +3 -2
  185. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/delete-selected-nodes-controller.js +19 -4
  186. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/block-to-rte-block-strategy.abstract.js +155 -15
  187. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.js +2 -1
  188. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.js +6 -1
  189. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-rte-image-block-strategy.abstract.js +38 -0
  190. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/img-to-rte-image-block-strategy.js +3 -20
  191. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-block-to-rte-text-block-strategy.js +59 -5
  192. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/jira-code-to-rte-code-block-strategy.js +54 -0
  193. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/li-to-rte-list-item-block-strategy.js +1 -1
  194. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ol-to-rte-list-block-strategy.js +3 -2
  195. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/span-img-to-rte-image-block-strategy.js +3 -20
  196. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-not-li-child-to-rte-list-item-block.js +7 -3
  197. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-to-rte-list-block-strategy.js +3 -2
  198. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/vega-code-block-to-rte-code-block-strategy.js +69 -0
  199. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/vega-image-to-rte-image-block-strategy.js +4 -7
  200. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +7 -5
  201. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +7 -5
  202. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +25 -10
  203. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/internal-code-block-selection-controller.js +64 -0
  204. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +59 -53
  205. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +21 -8
  206. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.js +10 -0
  207. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bold-toolbar-button-slimmer.js +5 -3
  208. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.js +5 -3
  209. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-toolbar-button-slimmer.js +5 -3
  210. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/numbers-toolbar-button-slimmer.js +5 -3
  211. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/clear-style-toolbar-button-slimmer.js +5 -3
  212. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/code-block-toolbar-button-slimmer.js +65 -0
  213. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/code-toolbar-button-slimmer.js +5 -3
  214. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/center-align-toolbar-button-slimmer.js +2 -2
  215. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/horizontal-alignment-toolbar-button-slimmer.js +8 -2
  216. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/justify-align-toolbar-button-slimmer.js +2 -2
  217. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/left-align-toolbar-button-slimmer.js +2 -2
  218. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/right-align-toolbar-button-slimmer.js +2 -2
  219. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +2 -2
  220. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/italic-toolbar-button-slimmer.js +5 -3
  221. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/less-indent-toolbar-button-slimmer.js +3 -3
  222. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/link-toolbar-button-slimmer.js +2 -2
  223. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/more-indent-toolbar-button-slimmer.js +3 -3
  224. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.js +60 -0
  225. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/strikethrough-toolbar-button-slimmer.js +5 -3
  226. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-color-toolbar-button-slimmer.js +5 -3
  227. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.js +6 -4
  228. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/toolbar-button-slimmer.abstract.js +3 -2
  229. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/underline-toolbar-button-slimmer.js +5 -3
  230. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/visual-mode-toolbar-button-slimmer.abstract.js +28 -0
  231. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +31 -3
  232. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/code-block-strategy-registry.test.js +21 -0
  233. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.js +2 -0
  234. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.js +3 -0
  235. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.js +23 -1
  236. package/dist/collection/components/vega-rich-text-editor/test/dto/annotations.test.js +247 -27
  237. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/code-block.test.js +54 -0
  238. package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +1793 -0
  239. package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/image-node.test.js +12 -0
  240. package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/text-node.test.js +41 -4
  241. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/jira-code-to-rte-code-block-strategy.test.js +32 -0
  242. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/vega-code-block-to-rte-code-block-strategy.test.js +61 -0
  243. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +7 -0
  244. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +18 -1
  245. package/dist/collection/helpers/code-format/code-formatter.js +108 -0
  246. package/dist/collection/helpers/code-format/test/code-formatter.test.js +362 -0
  247. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +2 -1
  248. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
  249. package/dist/collection/helpers/slimmers/auto-run-when-re-render-task-queue-slimmer.abstract.js +47 -0
  250. package/dist/collection/helpers/slimmers/test/auto-run-when-re-render-task-queue-slimmer.test.js +46 -0
  251. package/dist/collection/helpers/translation/locales/en.js +5 -0
  252. package/dist/collection/helpers/translation/tests/internal-translation-controller.test.js +5 -0
  253. package/dist/collection/polyfill/shadow-selection/shadow-selection-polyfill.js +17 -15
  254. package/dist/collection/polyfill/shadow-selection/test/shadow-selection-polyfill.test.js +1 -0
  255. package/dist/collection/polyfill/test-polyfill/unit/methods.js +9 -0
  256. package/dist/collection/utils/string.js +10 -0
  257. package/dist/esm/{app-globals-1f8c30e9.js → app-globals-9058ac3b.js} +6 -6
  258. package/dist/esm/{child-nodes-event-prevent-slimmer-5d45361e.js → child-nodes-event-prevent-slimmer-1142fb79.js} +1 -1
  259. package/dist/esm/{content-state-dbc9f635.js → code-block-8b5bd928.js} +1141 -1122
  260. package/dist/esm/content-state-8c3f862b.js +2489 -0
  261. package/dist/esm/{design-token-0699f0ca.js → design-token-bd436e0d.js} +1 -1
  262. package/dist/esm/{dom-node-subject-factory-f77cf9cc.js → dom-node-subject-factory-eb6bba5d.js} +1 -1
  263. package/dist/esm/{dom-node-subject-observer-factory-715dccf9.js → dom-node-subject-observer-factory-6083d518.js} +1 -1
  264. package/dist/esm/{element-appender-slimmer-96cb54e2.js → element-appender-slimmer-baf5e249.js} +5 -5
  265. package/dist/esm/{event-emit-slimmer-b7d511f6.js → event-emit-slimmer-480d3b54.js} +3 -3
  266. package/dist/esm/{form-field-controller-slimmer-89a72ee7.js → form-field-controller-slimmer-bfb4034d.js} +6 -6
  267. package/dist/esm/{image-annotation-action-1aa938ab.js → image-annotation-action-a8b860ad.js} +57 -28
  268. package/dist/esm/{index-187f71d1.js → index-d0a47531.js} +9 -0
  269. package/dist/esm/{index-4aa167d6.js → index-db0ec3ee.js} +2 -2
  270. package/dist/esm/index.js +12 -11
  271. package/dist/esm/{internal-vega-event-manager-87dc436c.js → internal-vega-event-manager-56c6469a.js} +2 -1
  272. package/dist/esm/loader.js +12 -10
  273. package/dist/esm/polyfills/core-js.js +0 -0
  274. package/dist/esm/polyfills/dom.js +0 -0
  275. package/dist/esm/polyfills/es5-html-element.js +0 -0
  276. package/dist/esm/polyfills/index.js +0 -0
  277. package/dist/esm/polyfills/system.js +0 -0
  278. package/dist/esm/{public-rules-5cf6aa95.js → public-rules-90fbd41a.js} +8 -6
  279. package/dist/esm/{responsive-format-facade-42f3fcfa.js → responsive-format-facade-827de03a.js} +3 -3
  280. package/dist/esm/{rich-text-editor-required-rule-6a7cd3ee.js → rich-text-editor-required-rule-0d470d82.js} +1 -1
  281. package/dist/esm/selection-controller-dd4f4407.js +759 -0
  282. package/dist/esm/string-a953eafc.js +21 -0
  283. package/dist/esm/{string-input-formatter-slimmer-c61f82d6.js → string-input-formatter-slimmer-0d30b976.js} +3 -3
  284. package/dist/esm/{style-formatter-cb00c709.js → style-formatter-232842f5.js} +1 -1
  285. package/dist/esm/{sub-state-notify-slimmer-4e3cf09d.js → sub-state-notify-slimmer-04e06501.js} +2 -2
  286. package/dist/esm/{sub-state-observer-slimmer-be7a6ce3.js → sub-state-observer-slimmer-b4c2ddc3.js} +2 -2
  287. package/dist/esm/{translation-cf7f020a.js → translation-71e0711d.js} +5 -0
  288. package/dist/esm/{translation-slimmer-88966d5c.js → translation-slimmer-e6b130bf.js} +1 -1
  289. package/dist/esm/vega-accordion.entry.js +13 -11
  290. package/dist/esm/vega-app-footer.entry.js +1 -1
  291. package/dist/esm/vega-app-header-button.entry.js +14 -12
  292. package/dist/esm/vega-backdrop.entry.js +1 -1
  293. package/dist/esm/vega-banner.entry.js +5 -5
  294. package/dist/esm/vega-bar-chart.entry.js +1 -1
  295. package/dist/esm/vega-box.entry.js +12 -10
  296. package/dist/esm/vega-brand-logo.entry.js +1 -1
  297. package/dist/esm/vega-breadcrumb.entry.js +6 -6
  298. package/dist/esm/vega-button-circle.entry.js +14 -12
  299. package/dist/esm/vega-button-group_2.entry.js +9 -9
  300. package/dist/esm/vega-button-link.entry.js +6 -6
  301. package/dist/esm/vega-button.entry.js +13 -11
  302. package/dist/esm/vega-calendar_3.entry.js +11 -11
  303. package/dist/esm/vega-card.entry.js +11 -9
  304. package/dist/esm/vega-carousel.entry.js +12 -10
  305. package/dist/esm/vega-checkbox_2.entry.js +11 -11
  306. package/dist/esm/vega-chip.entry.js +14 -12
  307. package/dist/esm/vega-code-block.entry.js +4069 -0
  308. package/dist/esm/vega-color-picker.entry.js +10 -10
  309. package/dist/esm/vega-combo-box.entry.js +11 -11
  310. package/dist/esm/vega-counter-badge.entry.js +1 -1
  311. package/dist/esm/vega-date-picker_2.entry.js +19 -18
  312. package/dist/esm/vega-dialog_2.entry.js +14 -12
  313. package/dist/esm/vega-divider.entry.js +11 -9
  314. package/dist/esm/vega-dropdown_5.entry.js +17 -15
  315. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  316. package/dist/esm/vega-field-error.entry.js +1 -1
  317. package/dist/esm/vega-field-label.entry.js +5 -5
  318. package/dist/esm/vega-file-uploader.entry.js +11 -11
  319. package/dist/esm/vega-flag-icon.entry.js +11 -9
  320. package/dist/esm/vega-flex.entry.js +12 -10
  321. package/dist/esm/vega-font.entry.js +11 -9
  322. package/dist/esm/vega-form.entry.js +12 -12
  323. package/dist/esm/vega-grid.entry.js +11 -9
  324. package/dist/esm/vega-hint.entry.js +1 -1
  325. package/dist/esm/vega-icon.entry.js +11 -9
  326. package/dist/esm/vega-image-uploader.entry.js +16 -15
  327. package/dist/esm/vega-input-credit-card.entry.js +11 -11
  328. package/dist/esm/vega-input-numeric.entry.js +12 -12
  329. package/dist/esm/vega-input-phone-number.entry.js +14 -13
  330. package/dist/esm/vega-input-range.entry.js +12 -12
  331. package/dist/esm/vega-input-select.entry.js +21 -20
  332. package/dist/esm/vega-input.entry.js +12 -12
  333. package/dist/esm/{vega-internal-event-id-85ad403f.js → vega-internal-event-id-820393ad.js} +2 -1
  334. package/dist/esm/vega-item-toggle.entry.js +5 -5
  335. package/dist/esm/vega-left-nav_5.entry.js +15 -13
  336. package/dist/esm/vega-line-chart.entry.js +1 -1
  337. package/dist/esm/vega-loader-wrapper_2.entry.js +10 -8
  338. package/dist/esm/vega-page-notification_2.entry.js +3 -3
  339. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +6 -6
  340. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +6 -6
  341. package/dist/esm/vega-pagination.entry.js +14 -12
  342. package/dist/esm/vega-pie-chart.entry.js +1 -1
  343. package/dist/esm/vega-popover_2.entry.js +13 -11
  344. package/dist/esm/vega-progress-tracker.entry.js +5 -5
  345. package/dist/esm/vega-radio_2.entry.js +11 -11
  346. package/dist/esm/vega-rich-text-content.entry.js +305 -131
  347. package/dist/esm/vega-rich-text-editor_4.entry.js +1132 -2409
  348. package/dist/esm/vega-section-title.entry.js +1 -1
  349. package/dist/esm/vega-segment-control.entry.js +5 -5
  350. package/dist/esm/vega-selection-chip_2.entry.js +16 -15
  351. package/dist/esm/vega-selection-tile_2.entry.js +12 -12
  352. package/dist/esm/vega-sidenav_3.entry.js +14 -12
  353. package/dist/esm/vega-signature-capture.entry.js +16 -15
  354. package/dist/esm/{vega-skeleton-loader-controller-c2a8bd27.js → vega-skeleton-loader-controller-878e1b28.js} +1 -1
  355. package/dist/esm/vega-skeleton.entry.js +1 -1
  356. package/dist/esm/vega-slot-container.entry.js +1 -1
  357. package/dist/esm/vega-stepper.entry.js +11 -11
  358. package/dist/esm/vega-tab-group_2.entry.js +6 -6
  359. package/dist/esm/vega-table_8.entry.js +16 -14
  360. package/dist/esm/vega-text.entry.js +1 -1
  361. package/dist/esm/vega-textarea.entry.js +11 -11
  362. package/dist/esm/vega-time-picker_2.entry.js +17 -16
  363. package/dist/esm/vega-toggle-switch.entry.js +10 -10
  364. package/dist/esm/vega-tooltip_2.entry.js +12 -10
  365. package/dist/esm/vega.js +12 -10
  366. package/dist/types/components/vega-code-block/assets/copy.d.ts +3 -0
  367. package/dist/types/components/vega-code-block/slimmers/controllers/code-highlight-parser.abstract.d.ts +40 -0
  368. package/dist/types/components/vega-code-block/slimmers/controllers/default-code-highlight-parse-controller.d.ts +19 -0
  369. package/dist/types/components/vega-code-block/slimmers/controllers/prism-code-highlight-parse-controller.d.ts +43 -0
  370. package/dist/types/components/vega-code-block/slimmers/controllers/vega-code-block-content-parse-controller.d.ts +23 -0
  371. package/dist/types/components/vega-code-block/slimmers/controllers/vega-code-block-focus-controller.d.ts +21 -0
  372. package/dist/types/components/vega-code-block/slimmers/controllers/vega-code-block-input-controller.d.ts +100 -0
  373. package/dist/types/components/vega-code-block/slimmers/controllers/vega-code-block-selection-controller.d.ts +93 -0
  374. package/dist/types/components/vega-code-block/slimmers/controllers/vega-code-block-value-controller.d.ts +21 -0
  375. package/dist/types/components/vega-code-block/slimmers/renderers/vega-code-block-content-renderer.d.ts +57 -0
  376. package/dist/types/components/vega-code-block/slimmers/renderers/vega-code-block-copy-button-renderer.d.ts +23 -0
  377. package/dist/types/components/vega-code-block/slimmers/renderers/vega-code-block-renderer.d.ts +50 -0
  378. package/dist/types/components/vega-code-block/types.d.ts +19 -0
  379. package/dist/types/components/vega-code-block/vega-code-block.d.ts +116 -0
  380. package/dist/types/components/vega-rich-text-editor/assets/file-code.d.ts +3 -0
  381. package/dist/types/components/vega-rich-text-editor/assets/rectangle-code.d.ts +3 -0
  382. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.d.ts +15 -0
  383. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-horizontal-alignment-strategy.d.ts +15 -0
  384. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-indent-strategy.d.ts +15 -0
  385. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/code-node-set-selection-range-strategy.d.ts +12 -0
  386. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.d.ts +3 -3
  387. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.d.ts +4 -5
  388. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-code-block-strategy.d.ts +29 -0
  389. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/code-block-insert-image-strategy.d.ts +15 -0
  390. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/code-block-remove-self-strategy.d.ts +28 -0
  391. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/switch-out-from-code-block-strategy.d.ts +12 -0
  392. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/update-code-block-strategy.d.ts +12 -0
  393. package/dist/types/components/vega-rich-text-editor/dto/actions/custom-style-annotation-action.d.ts +17 -0
  394. package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +5 -1
  395. package/dist/types/components/vega-rich-text-editor/dto/actions/remove-code-block-action.d.ts +10 -0
  396. package/dist/types/components/vega-rich-text-editor/dto/actions/switch-out-from-code-block-action.d.ts +14 -0
  397. package/dist/types/components/vega-rich-text-editor/dto/actions/transform-to-code-block-action.d.ts +14 -0
  398. package/dist/types/components/vega-rich-text-editor/dto/actions/update-code-block-action.d.ts +14 -0
  399. package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation.abstract.d.ts +2 -1
  400. package/dist/types/components/vega-rich-text-editor/dto/annotations/block-annotation.abstract.d.ts +17 -4
  401. package/dist/types/components/vega-rich-text-editor/dto/annotations/bold-annotation.d.ts +7 -5
  402. package/dist/types/components/vega-rich-text-editor/dto/annotations/clear-formatting-annotation.d.ts +2 -1
  403. package/dist/types/components/vega-rich-text-editor/dto/annotations/code-annotation.d.ts +5 -9
  404. package/dist/types/components/vega-rich-text-editor/dto/annotations/common-annotation.abstract.d.ts +20 -0
  405. package/dist/types/components/vega-rich-text-editor/dto/annotations/custom-attribute-annotation.d.ts +43 -0
  406. package/dist/types/components/vega-rich-text-editor/dto/annotations/custom-class-annotation.d.ts +40 -0
  407. package/dist/types/components/vega-rich-text-editor/dto/annotations/custom-style-annotation.d.ts +42 -0
  408. package/dist/types/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.d.ts +5 -9
  409. package/dist/types/components/vega-rich-text-editor/dto/annotations/image-annotation.d.ts +7 -5
  410. package/dist/types/components/vega-rich-text-editor/dto/annotations/indent-annotation.d.ts +5 -1
  411. package/dist/types/components/vega-rich-text-editor/dto/annotations/italic-annotation.d.ts +7 -5
  412. package/dist/types/components/vega-rich-text-editor/dto/annotations/link-annotation.d.ts +6 -4
  413. package/dist/types/components/vega-rich-text-editor/dto/annotations/link-group-annotation.d.ts +48 -0
  414. package/dist/types/components/vega-rich-text-editor/dto/annotations/list-annotation.d.ts +25 -0
  415. package/dist/types/components/vega-rich-text-editor/dto/annotations/node-annotation.abstract.d.ts +15 -3
  416. package/dist/types/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.d.ts +5 -9
  417. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-color-annotation.d.ts +3 -7
  418. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-annotation.d.ts +7 -5
  419. package/dist/types/components/vega-rich-text-editor/dto/annotations/underline-annotation.d.ts +5 -9
  420. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +39 -4
  421. package/dist/types/components/vega-rich-text-editor/dto/blocks/code-block.d.ts +56 -0
  422. package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +4 -0
  423. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +20 -2
  424. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +4 -0
  425. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +14 -4
  426. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +13 -0
  427. package/dist/types/components/vega-rich-text-editor/dto/nodes/code-block-node.d.ts +45 -0
  428. package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +4 -0
  429. package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +46 -2
  430. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +7 -2
  431. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-renderer.abstract.d.ts +4 -11
  432. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.d.ts +7 -5
  433. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/code-block-renderer.d.ts +39 -0
  434. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.d.ts +24 -0
  435. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.d.ts +0 -1
  436. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/code-block-node-renderer.d.ts +37 -0
  437. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/image-node-renderer.d.ts +22 -0
  438. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/node-renderer.abstract.d.ts +1 -15
  439. package/dist/types/components/vega-rich-text-editor/interface.d.ts +65 -26
  440. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/block-to-rte-block-strategy.abstract.d.ts +64 -6
  441. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.d.ts +3 -1
  442. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-rte-image-block-strategy.abstract.d.ts +20 -0
  443. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/img-to-rte-image-block-strategy.d.ts +2 -2
  444. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-block-to-rte-text-block-strategy.d.ts +30 -1
  445. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/jira-code-to-rte-code-block-strategy.d.ts +31 -0
  446. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ol-to-rte-list-block-strategy.d.ts +2 -3
  447. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/span-img-to-rte-image-block-strategy.d.ts +2 -2
  448. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-to-rte-list-block-strategy.d.ts +2 -3
  449. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/vega-code-block-to-rte-code-block-strategy.d.ts +42 -0
  450. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/vega-image-to-rte-image-block-strategy.d.ts +2 -2
  451. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.d.ts +7 -1
  452. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/internal-code-block-selection-controller.d.ts +45 -0
  453. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +17 -23
  454. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +6 -4
  455. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.d.ts +2 -0
  456. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bold-toolbar-button-slimmer.d.ts +2 -2
  457. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.d.ts +3 -2
  458. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-toolbar-button-slimmer.d.ts +2 -2
  459. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/numbers-toolbar-button-slimmer.d.ts +2 -2
  460. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/clear-style-toolbar-button-slimmer.d.ts +2 -2
  461. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/code-block-toolbar-button-slimmer.d.ts +22 -0
  462. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/code-toolbar-button-slimmer.d.ts +2 -2
  463. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/center-align-toolbar-button-slimmer.d.ts +2 -2
  464. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/horizontal-alignment-toolbar-button-slimmer.d.ts +4 -2
  465. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/justify-align-toolbar-button-slimmer.d.ts +2 -2
  466. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/left-align-toolbar-button-slimmer.d.ts +2 -2
  467. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/right-align-toolbar-button-slimmer.d.ts +2 -2
  468. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.d.ts +3 -2
  469. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/italic-toolbar-button-slimmer.d.ts +2 -2
  470. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/less-indent-toolbar-button-slimmer.d.ts +2 -2
  471. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/link-toolbar-button-slimmer.d.ts +3 -2
  472. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/more-indent-toolbar-button-slimmer.d.ts +2 -2
  473. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.d.ts +13 -0
  474. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/strikethrough-toolbar-button-slimmer.d.ts +2 -2
  475. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/text-color-toolbar-button-slimmer.d.ts +3 -2
  476. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.d.ts +3 -2
  477. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/toolbar-button-slimmer.abstract.d.ts +3 -2
  478. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/underline-toolbar-button-slimmer.d.ts +2 -2
  479. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/visual-mode-toolbar-button-slimmer.abstract.d.ts +17 -0
  480. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.d.ts +8 -2
  481. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/code-block-strategy-registry.test.d.ts +1 -0
  482. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/code-block.test.d.ts +1 -0
  483. package/dist/types/components/vega-rich-text-editor/test/dto/content-state.test.d.ts +1 -1
  484. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/jira-code-to-rte-code-block-strategy.test.d.ts +1 -0
  485. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/vega-code-block-to-rte-code-block-strategy.test.d.ts +1 -0
  486. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +7 -0
  487. package/dist/types/components.d.ts +95 -0
  488. package/dist/types/helpers/code-format/code-formatter.d.ts +34 -0
  489. package/dist/types/helpers/code-format/test/code-formatter.test.d.ts +1 -0
  490. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
  491. package/dist/types/helpers/slimmers/auto-run-when-re-render-task-queue-slimmer.abstract.d.ts +20 -0
  492. package/dist/types/helpers/slimmers/test/auto-run-when-re-render-task-queue-slimmer.test.d.ts +1 -0
  493. package/dist/types/helpers/translation/interface.d.ts +6 -1
  494. package/dist/types/polyfill/shadow-selection/shadow-selection-polyfill.d.ts +26 -0
  495. package/dist/types/types/components.type.d.ts +1 -0
  496. package/dist/types/utils/string.d.ts +7 -0
  497. package/dist/vega/index.esm.js +1 -1
  498. package/dist/vega/p-0104207d.entry.js +1 -0
  499. package/dist/vega/p-010f1715.entry.js +1 -0
  500. package/dist/vega/p-01593f9d.js +1 -0
  501. package/dist/vega/p-020b04ed.js +1 -0
  502. package/dist/vega/p-02841589.js +1 -0
  503. package/dist/vega/p-03cfb331.entry.js +9 -0
  504. package/dist/vega/{p-b649e86e.entry.js → p-0bff8716.entry.js} +1 -1
  505. package/dist/vega/p-1056a049.entry.js +1 -0
  506. package/dist/vega/p-10e41bbe.js +1 -0
  507. package/dist/vega/{p-83ef9e7d.entry.js → p-12e6173c.entry.js} +1 -1
  508. package/dist/vega/{p-54add0d2.js → p-1397ba3f.js} +1 -1
  509. package/dist/vega/p-13d9a1fd.entry.js +1 -0
  510. package/dist/vega/p-13eae47f.entry.js +1 -0
  511. package/dist/vega/p-1630864e.entry.js +1 -0
  512. package/dist/vega/p-1b335e30.entry.js +1 -0
  513. package/dist/vega/{p-8ade44bf.js → p-1e194737.js} +1 -1
  514. package/dist/vega/{p-252e42c7.entry.js → p-1f346008.entry.js} +1 -1
  515. package/dist/vega/p-1f86ab76.entry.js +1 -0
  516. package/dist/vega/p-1fe746ab.entry.js +1 -0
  517. package/dist/vega/{p-8c388b58.entry.js → p-211c028f.entry.js} +1 -1
  518. package/dist/vega/p-21d26bb4.js +2 -0
  519. package/dist/vega/{p-b351ace3.entry.js → p-23e6f2b2.entry.js} +1 -1
  520. package/dist/vega/p-268aea63.js +1 -0
  521. package/dist/vega/{p-a01f149d.entry.js → p-27ccf34d.entry.js} +1 -1
  522. package/dist/vega/{p-913eb7f9.entry.js → p-29f9be26.entry.js} +1 -1
  523. package/dist/vega/{p-27003a81.entry.js → p-30dcf606.entry.js} +1 -1
  524. package/dist/vega/{p-89ab72e3.js → p-3c20ae84.js} +1 -1
  525. package/dist/vega/p-4172fb81.js +1 -0
  526. package/dist/vega/{p-45f696b4.js → p-419697c6.js} +1 -1
  527. package/dist/vega/p-427e4cee.entry.js +1 -0
  528. package/dist/vega/p-4604ed0e.entry.js +1 -0
  529. package/dist/vega/{p-8d283666.js → p-4ab3df00.js} +1 -1
  530. package/dist/vega/{p-72ecfd40.js → p-4e8fb53a.js} +1 -1
  531. package/dist/vega/p-50a3ae3d.js +1 -0
  532. package/dist/vega/{p-b847a143.entry.js → p-50b80d76.entry.js} +1 -1
  533. package/dist/vega/p-531ffb18.entry.js +1 -0
  534. package/dist/vega/p-53daeb45.entry.js +1 -0
  535. package/dist/vega/p-54fdd401.entry.js +1 -0
  536. package/dist/vega/{p-47ff95ba.entry.js → p-5741ecf0.entry.js} +1 -1
  537. package/dist/vega/{p-6cabdb36.js → p-58f8928a.js} +1 -1
  538. package/dist/vega/{p-4a32a6c0.entry.js → p-5c4cb804.entry.js} +1 -1
  539. package/dist/vega/{p-a46bc9f1.entry.js → p-5ce386c8.entry.js} +1 -1
  540. package/dist/vega/p-5f377954.js +1 -1
  541. package/dist/vega/{p-0079088b.entry.js → p-5fd5a538.entry.js} +1 -1
  542. package/dist/vega/{p-0969877b.entry.js → p-64f452fe.entry.js} +1 -1
  543. package/dist/vega/p-66759f4e.js +1 -0
  544. package/dist/vega/{p-bc2dd43d.js → p-6ea42854.js} +1 -1
  545. package/dist/vega/p-70f25341.entry.js +1 -0
  546. package/dist/vega/{p-ec1f2d21.entry.js → p-737bccb9.entry.js} +1 -1
  547. package/dist/vega/{p-bcb10ae3.entry.js → p-7503fe08.entry.js} +1 -1
  548. package/dist/vega/{p-46714da3.entry.js → p-7b0a4688.entry.js} +1 -1
  549. package/dist/vega/p-7def7b74.entry.js +1 -0
  550. package/dist/vega/{p-48517a5d.entry.js → p-7f5a85c6.entry.js} +1 -1
  551. package/dist/vega/p-825ae7c4.js +1 -0
  552. package/dist/vega/p-831c4144.entry.js +1 -0
  553. package/dist/vega/p-85dc08b4.entry.js +1 -0
  554. package/dist/vega/{p-a821bcf3.js → p-86782109.js} +1 -1
  555. package/dist/vega/p-87459914.js +1 -0
  556. package/dist/vega/{p-1971d980.entry.js → p-87a1fc77.entry.js} +1 -1
  557. package/dist/vega/p-89565247.entry.js +1 -0
  558. package/dist/vega/{p-7088ead9.entry.js → p-89e915e9.entry.js} +1 -1
  559. package/dist/vega/{p-81fbfb6d.entry.js → p-8aa7e56e.entry.js} +1 -1
  560. package/dist/vega/p-94263ece.entry.js +1 -0
  561. package/dist/vega/{p-d0007822.entry.js → p-9524e48a.entry.js} +1 -1
  562. package/dist/vega/{p-147e3cbd.entry.js → p-991b4717.entry.js} +1 -1
  563. package/dist/vega/{p-647025dd.entry.js → p-99b9b320.entry.js} +1 -1
  564. package/dist/vega/{p-aea89be5.entry.js → p-9ba14b7c.entry.js} +1 -1
  565. package/dist/vega/p-9cb79f8d.entry.js +1 -0
  566. package/dist/vega/p-9e3f52f0.entry.js +1 -0
  567. package/dist/vega/{p-6586e2a2.entry.js → p-a0e122a6.entry.js} +1 -1
  568. package/dist/vega/{p-9803042f.entry.js → p-b0fe6c0f.entry.js} +1 -1
  569. package/dist/vega/{p-b2bca332.entry.js → p-b518e1a0.entry.js} +1 -1
  570. package/dist/vega/p-b538e81a.entry.js +1 -0
  571. package/dist/vega/p-b824baf7.entry.js +1 -0
  572. package/dist/vega/{p-2fadef27.entry.js → p-b959b4d4.entry.js} +1 -1
  573. package/dist/vega/{p-54f17c2e.entry.js → p-bb4f0fa1.entry.js} +1 -1
  574. package/dist/vega/{p-2da83c2a.js → p-bbb39d6f.js} +1 -1
  575. package/dist/vega/{p-cfda64fd.entry.js → p-bc8fd0ee.entry.js} +1 -1
  576. package/dist/vega/p-bcaf8375.entry.js +1 -0
  577. package/dist/vega/{p-02d7d948.entry.js → p-bec90ff3.entry.js} +1 -1
  578. package/dist/vega/p-c6b94dde.entry.js +1 -0
  579. package/dist/vega/{p-c754b32c.js → p-ce6b62c4.js} +1 -1
  580. package/dist/vega/{p-5e34ea25.entry.js → p-d00fbc11.entry.js} +1 -1
  581. package/dist/vega/{p-10a40dfb.entry.js → p-d2a2af2c.entry.js} +1 -1
  582. package/dist/vega/p-d64b20c2.js +1 -0
  583. package/dist/vega/p-da779940.entry.js +1 -0
  584. package/dist/vega/{p-a7dcb2a3.js → p-db910162.js} +1 -1
  585. package/dist/vega/{p-6f81fe1e.js → p-e1a2a701.js} +1 -1
  586. package/dist/vega/p-e3694aa5.entry.js +1 -0
  587. package/dist/vega/p-e7318c4c.entry.js +1 -0
  588. package/dist/vega/{p-a5c39ba2.entry.js → p-e8fc027e.entry.js} +1 -1
  589. package/dist/vega/{p-6a830bc5.entry.js → p-e92ecb78.entry.js} +1 -1
  590. package/dist/vega/p-e969c3f4.entry.js +1 -0
  591. package/dist/vega/{p-61eb7f32.entry.js → p-ec8b7f01.entry.js} +1 -1
  592. package/dist/vega/p-eed9bda2.entry.js +1 -0
  593. package/dist/vega/p-f4c54c98.entry.js +1 -0
  594. package/dist/vega/{p-5160a6b9.entry.js → p-f5fc80bc.entry.js} +1 -1
  595. package/dist/vega/p-f67be7ef.js +1 -0
  596. package/dist/vega/{p-5e3a15a1.js → p-f9fafc55.js} +1 -1
  597. package/dist/vega/{p-27e56c67.entry.js → p-fc21fb2d.entry.js} +1 -1
  598. package/dist/vega/p-fed9220b.entry.js +1 -0
  599. package/dist/vega/vega.esm.js +1 -1
  600. package/package.json +2 -1
  601. package/dist/cjs/string-21427167.js +0 -13
  602. package/dist/esm/string-be824360.js +0 -11
  603. package/dist/vega/p-06adb37e.entry.js +0 -1
  604. package/dist/vega/p-06c5fe97.entry.js +0 -1
  605. package/dist/vega/p-0bb29d98.js +0 -1
  606. package/dist/vega/p-0ed7a098.entry.js +0 -1
  607. package/dist/vega/p-0f6b3a89.entry.js +0 -1
  608. package/dist/vega/p-136f665b.entry.js +0 -1
  609. package/dist/vega/p-1503f791.js +0 -1
  610. package/dist/vega/p-16fd7c32.js +0 -1
  611. package/dist/vega/p-1a263af1.entry.js +0 -1
  612. package/dist/vega/p-1af4771a.entry.js +0 -1
  613. package/dist/vega/p-1c298d5a.js +0 -2
  614. package/dist/vega/p-1c63afd2.entry.js +0 -1
  615. package/dist/vega/p-1e05b7b4.entry.js +0 -1
  616. package/dist/vega/p-1ea863a6.entry.js +0 -1
  617. package/dist/vega/p-271b30b9.entry.js +0 -1
  618. package/dist/vega/p-2d1d4f33.entry.js +0 -1
  619. package/dist/vega/p-353b3ded.entry.js +0 -1
  620. package/dist/vega/p-44b0a005.js +0 -1
  621. package/dist/vega/p-4e76904e.entry.js +0 -1
  622. package/dist/vega/p-4ec0d36f.entry.js +0 -1
  623. package/dist/vega/p-5c954088.entry.js +0 -1
  624. package/dist/vega/p-646a9198.entry.js +0 -1
  625. package/dist/vega/p-6d7d923b.js +0 -1
  626. package/dist/vega/p-6e898779.js +0 -1
  627. package/dist/vega/p-77492977.entry.js +0 -1
  628. package/dist/vega/p-804f71b3.js +0 -1
  629. package/dist/vega/p-8789d34d.entry.js +0 -1
  630. package/dist/vega/p-8813c0ac.entry.js +0 -1
  631. package/dist/vega/p-8a85c7af.entry.js +0 -1
  632. package/dist/vega/p-8ba43640.entry.js +0 -1
  633. package/dist/vega/p-98c64d77.entry.js +0 -1
  634. package/dist/vega/p-9f3539a4.entry.js +0 -1
  635. package/dist/vega/p-b42aea55.entry.js +0 -1
  636. package/dist/vega/p-b5d70ee0.entry.js +0 -1
  637. package/dist/vega/p-bf1894ec.js +0 -1
  638. package/dist/vega/p-bfb344e1.entry.js +0 -1
  639. package/dist/vega/p-c9a4e79a.entry.js +0 -1
  640. package/dist/vega/p-dbc82247.js +0 -1
  641. package/dist/vega/p-e2e36d2b.entry.js +0 -1
  642. package/dist/vega/p-ef8272b5.entry.js +0 -1
  643. package/dist/vega/p-f4c1d961.js +0 -1
  644. package/dist/vega/p-f5279deb.entry.js +0 -1
  645. package/dist/vega/p-f8033cd3.entry.js +0 -1
  646. package/dist/vega/p-fe63bd50.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as a,g as r}from"./p-1c298d5a.js";import{M as n,a as s}from"./p-cdbbdcc2.js";import{R as o}from"./p-280cbcdb.js";import{s as p}from"./p-9b797118.js";import{I as h}from"./p-6e1ab235.js";import{V as d,I as l}from"./p-4387d550.js";import{F as x}from"./p-a7dcb2a3.js";import{b as g}from"./p-5773a9a3.js";import{C as f}from"./p-2d0d575f.js";import{c as m}from"./p-a821bcf3.js";import{f as c,B as b}from"./p-6f81fe1e.js";import{C as v}from"./p-45f696b4.js";import"./p-abd7aeaa.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-bf953152.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-c754b32c.js";import"./p-8d283666.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-6e898779.js";import"./p-987fbbd0.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-72ecfd40.js";import"./p-804f71b3.js";import"./p-5f377954.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-112455b1.js";const u=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the text area",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the text area",payloadValue:e=>!1===e.autoValidation}];var w=function(e,t,i,a){var r,n=arguments.length,s=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const y=class{constructor(a){e(this,a),this.vegaChange=t(this,"vegaChange",7),this.change=t(this,"change",7),this.vegaBlur=t(this,"vegaBlur",7),this.blur=t(this,"blur",7),this.globalSlimmers={},this.formFieldController=new x({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new o:null},{propertyName:"minLength",ruleFactory:e=>e?new n({minStrLength:e}):null},{propertyName:"maxLength",ruleFactory:e=>e?new s({maxStrLength:e}):null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.textareaRef]}),this.changeEventEmitter=m(y,c),this.blurEventEmitter=m(y,b),this.textareaEventPrevent=new v([c],(()=>this.inputContainerRef)),this.vegaComponentUsageRuntimeMetricsSlimmer=new d(u),this.currentCharCount=0,this.placeholder="",this.hint="",this.disabled=!1,this.label="",this.showCounter=!1,this.value="",this.isValid=null,this.autoValidation=!0,this.required=!1,this.maxLength=null,this.minLength=null,this.resizable=!0,this.validationRules=[],this.renderTextareaContainer=()=>i("div",{class:{"vega-textarea-container":!0,"vega-textarea-not-resizable":!this.resizable},ref:e=>this.inputContainerRef=e},i("textarea",{rows:4,placeholder:this.placeholder,disabled:this.disabled,required:this.required,ref:this.setTextareaRef,maxLength:this.maxLength,minLength:this.minLength,value:this.value,onBlur:this.handleTextareaBlur,"aria-label":this.label||"No label defined"}),this.showCounter&&this.renderCharacterCounter()),this.renderHintMessage=()=>i("vega-text",null,this.hint),this.renderCharacterCounter=()=>i("div",{class:{"vega-textarea-counter":!0,"counter-exceed-max-length":this.isExceedMaxLength(this.value,this.maxLength)}},i("span",{id:"current"},this.currentCharCount),null!=this.maxLength&&this.renderMaxLengthNumber()),this.renderMaxLengthNumber=()=>i("span",{id:"maximum"},"/",this.maxLength),this.setTextareaRef=e=>{e&&this.textareaRef!==e&&(this.textareaRef=e)},this.inputFocus=()=>{this.textareaRef.focus()},this.handleTextareaBlur=e=>{this.blurEventEmitter.emit(void 0,e)},this.isExceedMaxLength=(e,t)=>null!=t&&e.length>t}watchValue(e){this.changeEventEmitter.emit(e),this.textareaRef.value!==this.value&&(this.textareaRef.value=this.value),e&&(this.currentCharCount=e.length),f.notify(g,{host:this.host,detail:e})}watchValidationRules(){}componentWillLoad(){this.currentCharCount=this.value.length}handleValueTextarea(){this.value=this.textareaRef.value,this.currentCharCount=this.value.length}render(){return p(i(a,{class:{disabled:this.disabled}},this.renderLabelDom(),this.renderTextareaContainer(),this.hint&&this.renderHintMessage()),this.host)}renderLabelDom(){return i("vega-field-label",{onClick:this.inputFocus,"is-field-required":this.required,disabled:this.disabled,label:this.label})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};w([l()],y.prototype,"globalSlimmers",void 0),w([h()],y.prototype,"formFieldController",void 0),w([h()],y.prototype,"changeEventEmitter",void 0),w([h()],y.prototype,"blurEventEmitter",void 0),w([h()],y.prototype,"textareaEventPrevent",void 0),w([h()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=':host{display:inline-block;width:100%;text-align:left}:host .vega-textarea-container{display:flex;position:relative;width:100%;resize:vertical;box-sizing:border-box;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;overflow:hidden;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));min-height:50px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host textarea{display:block;position:relative;padding-top:12px;padding-right:16px;padding-bottom:32px;padding-left:16px;width:100%;resize:vertical;box-sizing:border-box;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:8px;outline:2px solid transparent;outline-offset:2px;border-style:none;overflow:auto;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));min-height:48px}@media screen and (min-width: 768px) and (max-width: 1023px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-textarea-container.vega-textarea-not-resizable{resize:none}:host .vega-textarea-container.vega-textarea-not-resizable textarea{resize:none}:host vega-field-label{margin-bottom:8px}:host .vega-textarea-counter{position:absolute;bottom:8px;right:8px;display:flex;padding-left:4px;padding-right:4px;padding-top:2px;padding-bottom:2px;border-radius:4px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));background-color:rgba(var(--v-bg-textarea-count, 4, 4, 28, 0.6))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-textarea-counter{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-textarea-counter{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-textarea-counter{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-textarea-counter.counter-exceed-max-length{background-color:rgba(var(--v-bg-textarea-counter-exceed-max-length, 214, 46, 81))}:host textarea::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host vega-text{padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-textarea-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-textarea-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}:host .vega-textarea-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-textarea-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-textarea-container.error:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}:host(.disabled) textarea{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host(.disabled) .vega-textarea-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host .vega-hidden{display:none}';export{y as vega_textarea}
1
+ import{r as e,c as t,h as i,H as a,g as r}from"./p-21d26bb4.js";import{M as n,a as s}from"./p-cdbbdcc2.js";import{R as o}from"./p-280cbcdb.js";import{s as p}from"./p-9b797118.js";import{I as h}from"./p-6e1ab235.js";import{V as d,I as l}from"./p-4387d550.js";import{F as x}from"./p-db910162.js";import{b as g}from"./p-5773a9a3.js";import{C as f}from"./p-2d0d575f.js";import{c as m}from"./p-86782109.js";import{f as c,B as b}from"./p-e1a2a701.js";import{C as v}from"./p-419697c6.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-bf953152.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-ce6b62c4.js";import"./p-4ab3df00.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-66759f4e.js";import"./p-987fbbd0.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-4e8fb53a.js";import"./p-020b04ed.js";import"./p-5f377954.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-112455b1.js";const u=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the text area",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the text area",payloadValue:e=>!1===e.autoValidation}];var w=function(e,t,i,a){var r,n=arguments.length,s=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const y=class{constructor(a){e(this,a),this.vegaChange=t(this,"vegaChange",7),this.change=t(this,"change",7),this.vegaBlur=t(this,"vegaBlur",7),this.blur=t(this,"blur",7),this.globalSlimmers={},this.formFieldController=new x({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new o:null},{propertyName:"minLength",ruleFactory:e=>e?new n({minStrLength:e}):null},{propertyName:"maxLength",ruleFactory:e=>e?new s({maxStrLength:e}):null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.textareaRef]}),this.changeEventEmitter=m(y,c),this.blurEventEmitter=m(y,b),this.textareaEventPrevent=new v([c],(()=>this.inputContainerRef)),this.vegaComponentUsageRuntimeMetricsSlimmer=new d(u),this.currentCharCount=0,this.placeholder="",this.hint="",this.disabled=!1,this.label="",this.showCounter=!1,this.value="",this.isValid=null,this.autoValidation=!0,this.required=!1,this.maxLength=null,this.minLength=null,this.resizable=!0,this.validationRules=[],this.renderTextareaContainer=()=>i("div",{class:{"vega-textarea-container":!0,"vega-textarea-not-resizable":!this.resizable},ref:e=>this.inputContainerRef=e},i("textarea",{rows:4,placeholder:this.placeholder,disabled:this.disabled,required:this.required,ref:this.setTextareaRef,maxLength:this.maxLength,minLength:this.minLength,value:this.value,onBlur:this.handleTextareaBlur,"aria-label":this.label||"No label defined"}),this.showCounter&&this.renderCharacterCounter()),this.renderHintMessage=()=>i("vega-text",null,this.hint),this.renderCharacterCounter=()=>i("div",{class:{"vega-textarea-counter":!0,"counter-exceed-max-length":this.isExceedMaxLength(this.value,this.maxLength)}},i("span",{id:"current"},this.currentCharCount),null!=this.maxLength&&this.renderMaxLengthNumber()),this.renderMaxLengthNumber=()=>i("span",{id:"maximum"},"/",this.maxLength),this.setTextareaRef=e=>{e&&this.textareaRef!==e&&(this.textareaRef=e)},this.inputFocus=()=>{this.textareaRef.focus()},this.handleTextareaBlur=e=>{this.blurEventEmitter.emit(void 0,e)},this.isExceedMaxLength=(e,t)=>null!=t&&e.length>t}watchValue(e){this.changeEventEmitter.emit(e),this.textareaRef.value!==this.value&&(this.textareaRef.value=this.value),e&&(this.currentCharCount=e.length),f.notify(g,{host:this.host,detail:e})}watchValidationRules(){}componentWillLoad(){this.currentCharCount=this.value.length}handleValueTextarea(){this.value=this.textareaRef.value,this.currentCharCount=this.value.length}render(){return p(i(a,{class:{disabled:this.disabled}},this.renderLabelDom(),this.renderTextareaContainer(),this.hint&&this.renderHintMessage()),this.host)}renderLabelDom(){return i("vega-field-label",{onClick:this.inputFocus,"is-field-required":this.required,disabled:this.disabled,label:this.label})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};w([l()],y.prototype,"globalSlimmers",void 0),w([h()],y.prototype,"formFieldController",void 0),w([h()],y.prototype,"changeEventEmitter",void 0),w([h()],y.prototype,"blurEventEmitter",void 0),w([h()],y.prototype,"textareaEventPrevent",void 0),w([h()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=':host{display:inline-block;width:100%;text-align:left}:host .vega-textarea-container{display:flex;position:relative;width:100%;resize:vertical;box-sizing:border-box;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;overflow:hidden;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));min-height:50px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host textarea{display:block;position:relative;padding-top:12px;padding-right:16px;padding-bottom:32px;padding-left:16px;width:100%;resize:vertical;box-sizing:border-box;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:8px;outline:2px solid transparent;outline-offset:2px;border-style:none;overflow:auto;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));min-height:48px}@media screen and (min-width: 768px) and (max-width: 1023px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-textarea-container.vega-textarea-not-resizable{resize:none}:host .vega-textarea-container.vega-textarea-not-resizable textarea{resize:none}:host vega-field-label{margin-bottom:8px}:host .vega-textarea-counter{position:absolute;bottom:8px;right:8px;display:flex;padding-left:4px;padding-right:4px;padding-top:2px;padding-bottom:2px;border-radius:4px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));background-color:rgba(var(--v-bg-textarea-count, 4, 4, 28, 0.6))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-textarea-counter{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-textarea-counter{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-textarea-counter{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-textarea-counter.counter-exceed-max-length{background-color:rgba(var(--v-bg-textarea-counter-exceed-max-length, 214, 46, 81))}:host textarea::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host vega-text{padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-textarea-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-textarea-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}:host .vega-textarea-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-textarea-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-textarea-container.error:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}:host(.disabled) textarea{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host(.disabled) .vega-textarea-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host .vega-hidden{display:none}';export{y as vega_textarea}
@@ -0,0 +1 @@
1
+ import{B as e,R as t,a as n,A as s,b as r,I as i,c as o,d as a,e as l,S as c,M as h,f as d,g as u,h as w,i as p,j as g,k as m,l as f,m as y,n as x,o as b,H as A,p as C,q as k,N as E,r as N,s as O,t as v,u as B,v as T,w as I,C as j,x as S,y as H,z as L,D as P}from"./p-01593f9d.js";import{g as R}from"./p-37b05e0b.js";import{i as D}from"./p-b1f65b13.js";import{d as z}from"./p-02841589.js";import{r as M}from"./p-bf953152.js";class G extends h{constructor(e,t){super(),this.type=d.BREAK_SINGLE_BLOCK,this.startContainerNode=e,this.startOffset=t}}class U extends p{constructor(e){super(e),this.type="image",this.nodes=[]}static from(e){const t=new U(e.id),{annotations:s}=e;return t.nodes=e.nodes.map((e=>n.from(e,t))),s&&Object.entries(s).forEach((([e,n])=>{const s=this.createAnnotationEntity(e,n);D(s)&&t.annotationMap.set(...s)})),t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.nodes.map((e=>e.toJSON()))})}toHtml(){return[`<div${super.generateAttributeString()}>`,this.nodes.map((e=>e.toHtml())).join(""),"</div>"].join("")}isNotEmpty(){return this.nodes.length>0&&this.nodes.some((e=>e.url.length>0))}getLastNode(){return this.nodes[this.nodes.length-1]}createNewImageBlock(){return new U(R())}clone(){const e=new U(this.id);return e.nodes=this.nodes.map((t=>{const n=t.clone();return n.parentBlock=e,n})),e.annotationMap=super.cloneAnnotations(),e.parent=this.parent,e}}g.register(d.DELETE_BLOCK_CONTENT,U.name,new class extends e{handleAction(e,t){this.deleteNodeContent(e,t)}deleteNodeContent(e,s){const r=e.startContainerNode,i=e.startOffset;let o=this.getPreviousNode(r),a=null;if(1===i){const e=s;this.isContentFirstNode(r)&&(a=this.getNextNode(r)),1===e.nodes.length?e.parent.apply(new t(e)):e.apply(new t(r))}else{const s=o;s&&s instanceof n&&(o=this.getPreviousNode(s),s.parentBlock.apply(new t(s)),o||(e.nextNode=r))}o?e.previousNode=o:a&&(e.nextNode=a)}}),g.register(d.MERGE_TWO_BLOCKS_NODES,U.name,new m),g.register(d.DELETE_CHILD,U.name,new f),g.register(d.APPEND_CHILD_NODES,U.name,new y),g.register(d.REPLACE_CHILD_NODES,U.name,new x),g.register(d.SPLIT_BLOCK_WITH_NODE,U.name,new class extends s{handleAction(e,t){e.newBlock=this.splitImageNodes(e.splitPointNode,e.startOffsetOfNode,t)}splitImageNodes(e,t,n){const s=n.nodes.indexOf(e);if(s>-1){const e=n.nodes.slice(0,s+t),o=n.nodes.slice(s+t);n.apply(new r(e));const a=this.cloneWithNodes(o,n);return n.parent.apply(new i(n,a)),a}}cloneWithNodes(e,t){const n=t.createNewImageBlock();return n.nodes=[],n.apply(new o(e)),n}}),g.register(d.BREAK_SINGLE_BLOCK,U.name,new class extends s{handleAction(e,t){e.newBlock=this.breakSingleBlock(e.startContainerNode,e.startOffset,t)}breakSingleBlock(e,t,n){const s=a.from({id:R(),type:"paragraph",nodes:[{id:R(),type:"text",text:""}]});if(this.isCaretPositionAtImageBlockEnd(n,e,t))n.parent.apply(new i(n,s));else{if(!this.isCaretPositionAtImageBlockStart(n,e,t)){const s=new c(e,t);return n.apply(s),s.newBlock}n.parent.apply(new l(n,s))}return s}}),g.register(d.LINE_BREAK_SINGLE_BLOCK,U.name,new class extends s{handleAction(e,t){const n=new G(e.startContainerNode,e.startOffset);t.apply(n);const s=n.newBlock;s&&(e.lineBreakNode=s.nodes[0])}}),g.register(d.LINE_BREAK_MULTIPLE_BLOCKS,U.name,new class extends s{handleAction(e,t){e.lineBreakNode=this.lineBreakMultipleBlocks(e.selectedBlocks,t)}lineBreakMultipleBlocks(e,t){const n=a.from({id:R(),type:"paragraph",nodes:[{id:R(),type:"text",text:"\n"}]});t.parent.apply(new i(t,n));const s=this.concatBlocksNodes(e.slice(1));return(0===s.length||s[0]&&""===s[0].text)&&s.push(new u(R(),"\n",n)),n.apply(new o(s)),n.nodes[0]}concatBlocksNodes(e){const n=[];return e.map((e=>{"image"!==e.type&&(n.push(...e.nodes),e.parent.apply(new t(e)))})),n}}),g.register(d.INSERT_IMAGE_TO_BLOCK,U.name,new class extends s{handleAction(e,t){const n=e.splitPointNode,s=e.startOffsetOfNode,r=e.imageBlockToBeInserted;t.nodes.length<1?t.apply(new o(r.nodes)):this.isCaretPositionAtImageBlockEnd(t,n,s)?t.parent.apply(new i(t,r)):this.isCaretPositionAtImageBlockStart(t,n,s)?t.parent.apply(new l(t,r)):(t.apply(new c(n,s)),t.parent.apply(new i(t,r)))}}),g.register(d.INSERT_NODES_BEFORE,U.name,new b),g.register(d.INSERT_NODES_AFTER,U.name,new class extends w{handleAction(e,t){const n=e.referNode,s=[n,...e.nodesToBeInserted];this.replaceNodeWithNodes(t,n,s)}}),g.register(A.name,U.name,new C);class $ extends a{constructor(e,t){super(e,"list-item"),this.children=[],this.children=t}static from(e){const t=new $(e.id);t.nodes=e.nodes.map((e=>u.from(e,t))),e.children&&(t.children=e.children.map((e=>{const n=F.from(e);return n.parent=t,n})));const{annotations:n}=e;return n&&Object.entries(n).forEach((([e,n])=>{const s=this.createAnnotationEntity(e,n);D(s)&&t.annotationMap.set(...s)})),t}toJSON(){var e;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(e=this.children)||void 0===e?void 0:e.map((e=>e.toJSON()))})}toHtml(){return[`<li${super.generateAttributeString()}>`,this.nodes.map((e=>e.toHtml())).join(""),"</li>"].join("")}cloneWithNodes(e){const t=new $(R());return t.nodes=[],t.apply(new o(e)),t}getLastNode(){return this.children&&this.children.length>0?this.children[this.children.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new $(R())}clone(){var e;const t=new $(this.id);return t.nodes=this.nodes.map((e=>{const n=e.clone();return n.parentBlock=t,n})),t.annotationMap=super.cloneAnnotations(),t.children=null===(e=this.children)||void 0===e?void 0:e.map((e=>{const n=e.clone();return n.parent=t,n})),t.parent=this.parent,t}}g.register(d.DELETE_BLOCK_CONTENT,$.name,new class extends k{handleAction(e,n){const s=n.parent;this.deleteNodeContent(e,n),0===s.blocks.length&&s.parent.apply(new t(s))}}),g.register(d.LINE_BREAK_SINGLE_BLOCK,$.name,new N),g.register(d.LINE_BREAK_MULTIPLE_BLOCKS,$.name,new O),g.register(d.DELETE_CHILD,$.name,new class extends s{handleAction(e,n){n.nodes=n.nodes.filter((t=>t!==e.entityToBeRemoved)),0!==n.nodes.length||n.children&&n.children.length||n.parent.apply(new t(n))}}),g.register(d.DELETE_NEST_LIST,$.name,new class extends s{handleAction(e,t){t.children&&(t.children=t.children.length>1?t.children.filter((t=>t!==e.nestListBlockToBeRemoved)):void 0)}}),g.register(d.APPEND_CHILD_NODES,$.name,new y),g.register(d.SPLIT_BLOCK_WITH_NODE,$.name,new v),g.register(d.REPLACE_CHILD_NODES,$.name,new x),g.register(d.REPLACE_NEST_LIST,$.name,new class extends s{handleAction(e,t){e.newList.forEach((e=>{e.parent=t})),t.children=e.newList}}),g.register(d.MERGE_TWO_BLOCKS_NODES,$.name,new m),g.register(d.BREAK_SINGLE_BLOCK,$.name,new class extends s{handleAction(e,t){e.newBlock=this.breakSingleListItemBlock(e.startContainerNode,e.startOffset,t)}breakSingleListItemBlock(e,t,n){const s=n.createNewListItem(),r=this.copyInlineStyleToNewNode(e);if(s.apply(new o([r])),this.isCaretPositionAtTextBlockEnd(n,e,t))return this.breakListItemAtEnd(s,n);if(!this.isCaretPositionAtTextBlockStart(n,e,t)){const s=new c(e,t);return n.apply(s),s.newBlock}return n.parent.apply(new l(n,s)),s}breakListItemAtEnd(e,n){const s=n.parent.blocks[n.parent.blocks.length-1],r=1===n.nodes.length&&n.nodes[0].isEmpty();if(n===s&&r){const s=n.parent.parent;if("list-item"!==s.type){const r=a.from({id:R(),type:"paragraph",nodes:[]});return r.apply(new o(e.nodes)),s.apply(new i(n.parent,r)),n.parent.apply(new t(n)),r}s.parent.apply(new i(s,e)),n.parent.apply(new t(n))}else n.parent.apply(new i(n,e));return e}copyInlineStyleToNewNode(e){const t=e.cloneWithText("");return t.annotationMap.delete(E.LINK),t}}),g.register(d.INSERT_IMAGE_TO_BLOCK,$.name,new class extends s{handleAction(e,t){t.parent.apply(e)}}),g.register(d.INSERT_NODES_BEFORE,$.name,new b);class J extends s{handleAction(e,t){this.replaceBlockWithBlocks(t,e.referBlock,[...e.blocksToBeInserted,e.referBlock])}replaceBlockWithBlocks(e,t,n){e.blocks&&(n.forEach((t=>{t.parent=e})),e.blocks=e.blocks.flatMap((e=>e===t?n:e)))}}class V extends J{handleAction(e,t){this.replaceBlockWithBlocks(t,e.referBlock,[e.referBlock,...e.blocksToBeInserted])}}class K extends s{handleAction(e,t){const n=e.entityToBeAppended;t.blocks&&(n.forEach((e=>{e.parent=t})),t.blocks=t.blocks.concat(n))}}class W extends h{constructor(e){super(),this.type=d.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=e}}class X extends s{handleAction(e,t){const n=e.entityToBeRemoved;t.blocks&&(t.blocks=t.blocks.filter((e=>e!==n)))}}class q extends T{constructor(){super(...arguments),this.type=I.LIST}renderStyle(e){return(null==e?void 0:e.standalone)?{paddingLeft:"8px",marginLeft:"16px"}:null}renderClass(e){return(null==e?void 0:e.standalone)?null:"v-rte--list"}clone(){return new q}toJSON(){}}class F extends p{constructor(e,t){super(e),this.type="bullet-list",this.blocks=[],this.type=t,this.annotationMap.set(I.LIST,new q)}static from(e){const t=new F(e.id,e.type),{annotations:n}=e;return n&&Object.entries(n).forEach((([e,n])=>{const s=this.createAnnotationEntity(e,n);D(s)&&t.annotationMap.set(...s)})),t.blocks=e.blocks.map((e=>{const n=$.from(e);return n.parent=t,n})),t}static createAnnotationEntity(e,t){switch(e){case"customAttribute":return H.from(t);case"customClass":return S.from(t);case"customStyle":return j.from(t)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.blocks.map((e=>e.toJSON()))})}toHtml(){const e="number-list"===this.type?"ol":"ul";return[`<${e}${super.generateAttributeString()}>`,this.blocks.map((e=>e.toHtml())).join(""),`</${e}>`].join("")}isNotEmpty(){return this.blocks.length>0}getLastNode(){return this.blocks[this.blocks.length-1].getLastNode()}clone(){const e=new F(this.id,this.type);return e.blocks=this.blocks.map((t=>{const n=t.clone();return n.parent=e,n})),e.annotationMap=super.cloneAnnotations(),e.parent=this.parent,e}}g.register(d.DELETE_CHILD,F.name,new class extends X{handleAction(e,n){super.handleAction(e,n);const s=n.parent;0===n.blocks.length&&s&&s.apply("list-item"===s.type?new W(n):new t(n))}}),g.register(d.INSERT_BLOCKS_BEFORE,F.name,new J),g.register(d.INSERT_BLOCKS_AFTER,F.name,new V),g.register(d.APPEND_CHILD_NODES,F.name,new K),g.register(d.TRANSFORM_LIST_BLOCK,F.name,new class extends s{handleAction(e,n){const s=e.selectedBlocks,r=n.parent.createList(e.listType);if(s.every((e=>e.parent===n)))r.apply(new o(n.blocks)),n.parent.apply(new i(n,r)),n.parent.apply(new t(n)),s.forEach((e=>e.nodes.map((e=>e.apply(new B)))));else{const s=e.selectedBlocks.map((e=>n.parent.toListItem(e)));r.apply(new o(s)),n.parent.apply(new i(n,r)),e.selectedBlocks.forEach((e=>{e.parent.apply(new t(e))})),0===n.blocks.length&&n.parent.apply(new t(n))}}}),g.register(d.TRANSFORM_PARAGRAPH_BLOCK,F.name,new class extends s{handleAction(e,n){let s=!1,r=!1;const a=e.selectedBlocks,c=a.map((e=>(e.nodes.map((e=>e.apply(new B))),e===n.blocks[0]&&(s=!0),e===n.blocks[n.blocks.length-1]&&(r=!0),this.toParagraph(e))));if(s)n.parent.apply(new l(n,...c));else if(r)n.parent.apply(new i(n,...c));else{const e=n.blocks.indexOf(a[0]),s=n.blocks.indexOf(a[a.length-1]),r=n.parent.createList(n.type);r.apply(new o(n.blocks.slice(0,e)));const i=n.parent.createList(n.type);i.apply(new o(n.blocks.slice(s+1))),n.parent.apply(new l(n,r,...c,i)),n.parent.apply(new t(n))}a.map((e=>{n.apply(new t(e))})),0===n.blocks.length&&n.parent.apply(new t(n))}toParagraph(e){const t=new a(R(),"paragraph");return t.apply(new o(e.nodes)),t.annotationMap=e.annotationMap,t}}),g.register(d.INSERT_IMAGE_TO_BLOCK,F.name,new class extends s{handleAction(e,t){t.parent.apply("list-item"!==t.parent.type?new i(t,e.imageBlockToBeInserted):e)}});class Y{constructor(e,t){this.childrenOutput=[],this.currentStrategy=e,this.currentElements=t}setChildrenOutput(e){this.childrenOutput=e}toDto(){const e=this.currentStrategy.handle(this.currentElements);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto())).filter(D)),e}}class Q extends class{}{generateChildNodes(e,t={}){const n=[];return e.forEach((e=>{if(e.nodeType===Node.TEXT_NODE){if(this.isInvalidTextNode(e))return;n.push({id:R(),type:"text",text:String(e.textContent),annotations:t})}else n.push(...this.generateChildNodes(Array.from(e.childNodes),this.inheritAndGenerateTextNodeAnnotations(e,t)))})),n}generateBlockAnnotations(e){const t={},n=this.getTextAlign(e),s=this.getIndent(e);return n&&(t.textAlign=n),s&&(t.indent=s),this.generateCommonAnnotations(e,t),t}generateCustomAttrAnnotations(e,t){return t.reduce(((t,n)=>(t[n]=e.getAttribute(n),t)),{})}generateCustomStyleAnnotations(e){return e.getAttribute("style").split(";").filter(Boolean).filter((e=>" "!==e)).map((e=>{const t=e.replace(/(['"])((?:\\\1|[^\1])*?)\1/g,"$2").split(":");return{[z(t[0].trim())]:t[1].trim().replace(";","")}})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})}generateBlockInheritAnnotations(e){const t=this.generateTextNodeAnnotations(e);return this.filterOutCustomAnnotation(t)}generateCommonAnnotations(e,t={}){const n=this.getCustomAttributeName(e),s=this.getCustomClass(e);return n.length>0&&(t.customAttribute=this.generateCustomAttrAnnotations(e,n)),s.length>0&&(t.customClass=s),e.getAttribute("style")&&(t.customStyle=this.generateCustomStyleAnnotations(e)),t}inheritAndGenerateTextNodeAnnotations(e,t){const n=this.filterOutCustomAnnotation(t),s=this.generateTextNodeAnnotations(e);return t.bold&&(s.bold=!0),t.underline&&(s.underline=!0),t.italic&&(s.italic=!0),t.strikethrough&&(s.strikethrough=!0),Object.assign({},n,s)}generateTextNodeAnnotations(e){const t={bold:this.isBold(e),italic:this.isItalic(e),underline:this.isUnderline(e),strikethrough:this.isStrikethrough(e),code:this.isCode(e)},n=this.getColor(e),s=this.getLink(e);return n&&(t.textColor=n),s?t.link=s:this.generateCommonAnnotations(e,t),t}filterOutCustomAnnotation(e){return function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n}(e,["customAttribute","customClass","customStyle"])}getCustomClass(e){return e.classList.toString().split(" ").filter((e=>!e.includes("v-rte")&&""!==e))}isInvalidTextNode(e){return!(!e.nodeValue||!e.nodeValue.includes("\t")||0!==e.nodeValue.replace(/\n|\t/gm,"").length)}isCode(e){return e.classList.contains("v-rte--code")||"CODE"===e.nodeName||"PRE"===e.nodeName||"monospace"===e.style.fontFamily}isBold(e){return"STRONG"===e.nodeName||"B"===e.nodeName||"bold"===e.style.fontWeight||"700"===e.style.fontWeight||e.classList.contains("v-rte--bold")}isItalic(e){return"I"===e.nodeName||"italic"===e.style.fontStyle||"EM"===e.nodeName||e.classList.contains("v-rte--italic")}isUnderline(e){return e.style.textDecoration.includes("underline")||"U"===e.nodeName||"INS"===e.nodeName||e.classList.contains("v-rte--underline")}isStrikethrough(e){return e.style.textDecoration.includes("line-through")||"S"===e.nodeName||"DEL"===e.nodeName||e.classList.contains("v-rte--strikethrough")}getColor(e){var t;const n=null===(t=M(e.style.color))||void 0===t?void 0:t.toUpperCase();if(n){const e=P.find((e=>e.light===n||e.dark===n));return e?e.key:null}for(const t of P)if(e.style.color.includes(t.key))return t.key;return null}getLink(e){if("A"===e.nodeName){const t={href:e.href,groupKey:R()},n=this.getCustomAttributeName(e),s=this.getCustomClass(e);return n.length>0&&(t.customAttribute=this.generateCustomAttrAnnotations(e,n)),s.length>0&&(t.customClass=s),e.getAttribute("style")&&(t.customStyle=this.generateCustomStyleAnnotations(e)),t}return null}getTextAlign(e){const t=e.classList;if(t.contains("v-rte--horizontal-alignment-left"))return"left";if(t.contains("v-rte--horizontal-alignment-center"))return"center";if(t.contains("v-rte--horizontal-alignment-right"))return"right";if(t.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(e.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}getIndent(e){const t=e.style;let n;if(t.marginLeft)n=t.marginLeft;else{if(!t.margin)return null;{const e=t.margin.split(" ");switch(e.length){case 4:n=e[3];break;case 2:case 3:n=e[1];break;default:n=e[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}getCustomAttributeName(e){return e.getAttributeNames().filter((e=>"style"!==e&&"class"!==e))}}class Z extends Q{canHandle(e,t){let n=0;for(let s=t;s<e.length;s++){const t=e[s];if(t.nodeType!==Node.TEXT_NODE&&(!Z.canHandleTags.includes(t.nodeName)||""===t.textContent&&t.querySelector("IMG")))break;n++}return n}handle(e){const t=e[0].parentElement,n=this.generateChildNodes(e,this.generateBlockInheritAnnotations(t));return 0===n.length?null:a.from({id:R(),type:"paragraph",nodes:n,annotations:this.generateBlockAnnotations(t)})}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}Z.canHandleTags=["SPAN","STRONG","CODE","I","EM","S","U","A","VEGA-RICH-TEXT-LINK-EDITOR","B","INS","DEL","PRE"];class _ extends Q{canHandle(e,t){return"UL"===e[t].tagName?1:0}handle(e){return 0===e[0].childNodes.length?null:F.from({id:R(),type:"bullet-list",blocks:[],annotations:this.generateBlockAnnotations(e[0])})}appendChildBlocks(e,t){e.blocks=t.filter((e=>e instanceof $)),t.forEach((t=>t.parent=e))}shouldProceedToElementChildren(){return!0}}class ee extends Q{canHandle(e,t){return"LI"===e[t].tagName?1:0}handle(e){return 0===e[0].childNodes.length?null:$.from({id:R(),type:"list-item",nodes:this.generateChildNodes(Array.from(e[0].childNodes).filter((e=>!["UL","OL"].includes(e.nodeName))),this.generateBlockInheritAnnotations(e[0])),annotations:this.generateBlockAnnotations(e[0])})}appendChildBlocks(e,t){e.children=t.filter((e=>["bullet-list","number-list"].includes(e.type)))}shouldProceedToElementChildren(){return!0}}class te extends Q{canHandle(e,t){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(this.getElementType(e[t]))?1:0}handle(e){const t=this.generateChildNodes(Array.from(e[0].childNodes));return 0===t.length?null:a.from({id:R(),type:this.getElementType(e[0]),nodes:t,annotations:Object.assign(Object.assign({},this.generateBlockAnnotations(e[0])),{textStyle:this.getElementType(e[0])})})}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}getElementType(e){const t=this.getElementTypeByDataType(e);if(t)return t;const n=this.getElementTypeByNodeName(e);if(n)return n;const s=this.getElementTypeByFontSize(e);if(s)return s;return this.getElementTypeByClassName(e)||"paragraph"}getElementTypeByDataType(e){return e.nodeType!==Node.TEXT_NODE&&e.hasAttribute("data-type")?e.getAttribute("data-type"):null}getElementTypeByFontSize(e){var t;switch(null===(t=e.style)||void 0===t?void 0:t.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(e){switch(e.nodeName){case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(e){if(e.className){const t=/\bv-rte--text-style-(title|subtitle|heading-1|heading-2|heading-3|paragraph)\b/.exec(e.className);if(t)return t[1]}return null}}class ne extends Q{getImageSize(e){return e.getAttribute("data-size")?e.getAttribute("data-size"):"md"}createRTEImageBlock(e){return U.from({id:R(),type:"image",nodes:[{id:R(),type:"image",url:e.src,annotations:Object.assign({size:this.getImageSize(e),alt:e.alt},this.generateCommonAnnotations(e))}],annotations:this.generateBlockAnnotations(e.parentElement)})}}class se extends ne{canHandle(e,t){return"IMG"===e[t].tagName?1:0}handle(e){return this.createRTEImageBlock(e[0])}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class re extends ne{canHandle(e,t){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===e[t].tagName?1:0}handle(e){const t=e[0],n=t.querySelector("img");if(D(n))return U.from({id:R(),type:"image",nodes:[{id:R(),type:"image",url:n.src,annotations:Object.assign({size:this.getImageSize(t),alt:t.alt},this.generateCommonAnnotations(t))}],annotations:this.generateBlockAnnotations(t.parentElement)})}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class ie extends Q{canHandle(e,t){return"OL"===e[t].tagName?1:0}handle(e){return 0===e[0].childNodes.length?null:F.from({id:R(),type:"number-list",blocks:[],annotations:this.generateBlockAnnotations(e[0])})}appendChildBlocks(e,t){e.blocks=t.filter((e=>e instanceof $)),t.forEach((t=>t.parent=e))}shouldProceedToElementChildren(){return!0}}class oe extends ne{canHandle(e,t){const n=e[t];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(e){const t=e[0].querySelector("img");return this.createRTEImageBlock(t)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class ae extends Q{canHandle(e,t){const n=e[t],s=n.parentElement,r="LI"!==n.nodeName,i=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),o=D(s)&&["UL","OL"].includes(s.nodeName);return r&&!i&&o?1:0}handle(e){const t=this.generateChildNodes(e);return $.from({id:R(),type:"list-item",nodes:t,annotations:{}})}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class le extends Q{canHandle(e,t){return"PRE"!==e[t].tagName&&"CODE"!==e[t].tagName||!e[t].hasAttribute("data-language")?0:1}handle(e){const t=e[0];if(t){const e=t.textContent,n=t.dataset.language;return L.from({id:R(),type:"code-block",content:e,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class ce extends le{canHandle(e,t){return"VEGA-CODE-BLOCK"===e[t].tagName&&0==!!e[t].querySelector("vega-code-block")||this.isCodeBlockContainer(e[t])?1:0}handle(e){const t=this.isCodeBlockContainer(e[0])?e[0].querySelector("vega-code-block"):e[0],n=t.querySelector("code");if(n)return super.handle([n]);if(t.hasAttribute("data-content")){const e=document.createElement("code");return e.textContent=t.dataset.content,e.dataset.language=t.dataset.language,super.handle([e])}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isCodeBlockContainer(e){return"PRE"===e.tagName&&e.classList.contains("code-block-container")&&1===e.querySelectorAll("vega-code-block").length}}const he=new class{constructor(){this.elementStrategies=[new _,new ie,new ae,new ee,new ce,new le,new te,new se,new re,new oe,new Z]}process(e){const t=[];for(let n=0;n<e.length;n++){if(this.isInvalidElement(e[n]))continue;let s=0;for(const r of this.elementStrategies)if(s=r.canHandle(e,n),s>0){const i=e.slice(n,n+s),o=new Y(r,i);1===s&&r.shouldProceedToElementChildren()&&o.setChildrenOutput(this.process(Array.from(i[0].childNodes))),t.push(o),n+=s-1;break}if(0===s&&n<e.length){const s=Array.from(e[n].childNodes),r=this.process(Array.from(s));r.length>0&&t.push(...r)}}return t}isInvalidElement(e){return e.nodeType===Node.COMMENT_NODE||["META","BUTTON","STYLE"].includes(e.nodeName)}};class de{constructor(e){e.forEach((e=>{e.parent=this})),this.blocks=e}static fromJSON(e){const t=e.map((e=>{switch(e.type){case"paragraph":case"title":case"subtitle":case"heading-1":case"heading-2":case"heading-3":return a.from(e);case"image":return U.from(e);case"bullet-list":case"number-list":return F.from(e);case"code-block":return L.from(e);default:throw new Error(`[Vega] Unknown block type: ${e.type}`)}}));return new de(t)}static createEmptyContent(){return de.fromJSON([{id:R(),type:"paragraph",nodes:[{id:R(),type:"text",text:""}]}])}static fromHtml(e){const t=(new DOMParser).parseFromString(e,"text/html").body,n=he.process(Array.from(t.childNodes)).filter(D).map((e=>e.toDto())).filter(D);return new de(n)}clone(e=!1){return new de(e?this.blocks.map((e=>e.clone())):[...this.blocks])}toJSON(){return this.blocks.map((e=>e.toJSON()))}toHtml(){return this.blocks.map((e=>e.toHtml())).join("")}apply(e){g.executeTheStrategy(e,this)}toListItem(e){e.nodes.map((e=>e.apply(new B)));const t=new $(R());return t.apply(new o(e.nodes)),t.annotationMap=e.annotationMap,t}createList(e){return new F(R(),e)}findNodeById(e){return this.findNodeInBlocksById(e,this.blocks)}findNodeInBlocksById(e,t){for(const n of t){if("nodes"in n)for(const t of n.nodes)if(t.id===e)return t;if(n instanceof $&&n.children)for(const t of n.children){const n=this.findNodeInBlocksById(e,t.blocks);if(n)return n}if(n instanceof F&&n.blocks){const t=this.findNodeInBlocksById(e,n.blocks);if(t)return t}}return null}}g.register(d.DELETE_CHILD,de.name,new X),g.register(d.APPEND_CHILD_NODES,de.name,new K),g.register(d.INSERT_BLOCKS_BEFORE,de.name,new J),g.register(d.INSERT_BLOCKS_AFTER,de.name,new V),g.register(d.TRANSFORM_TO_CODE_BLOCK,de.name,new class extends s{handleAction(e,t){const n=e.selectedBlocks,s=new L(R(),this.getCodeContent(n),"plainText");t.apply(new l(n[0],s)),e.newCodeBlock=s,this.removeSelectBlocks(n,t)}getCodeContent(e){return e.filter((e=>"image"!==e.type&&"list-item"!==e.type)).map((e=>e.nodes.map((e=>e.text)).join(""))).join("\n")}removeSelectBlocks(e,n){for(let s=0;s<e.length;s++)n.apply(new t(e[s]))}});export{G as B,he as E,U as R,de as V,$ as a,F as b}
@@ -1 +1 @@
1
- import{h as t,r as e,H as i,g as n}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as r,V as o,I as a}from"./p-6e1ab235.js";import{V as c,I as l}from"./p-4387d550.js";var p=function(t,e,i,n){var s,r=arguments.length,o=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,i,o):s(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class f extends o{render(){return t("vega-flex",{"align-items":"start","justify-content":"start",gap:"size-8"},this.renderPrefixIcon(),this.renderText())}renderPrefixIcon(){return this.icon&&"left"===this.iconAlign&&t("div",{class:"section-title-icon-container"},this.renderIcon())}renderText(){return t("vega-flex",{class:"vega-flex-grow",direction:"col","align-items":"start","justify-content":"start",gap:"size-4"},this.renderTitle(),this.renderDescription())}renderTitle(){return t("div",{class:"section-title-text vega-flex-grow"},t("span",null,this.titleText),this.renderSuffixIcon())}renderDescription(){return t("div",{class:"section-title-description"},this.description)}renderSuffixIcon(){return this.icon&&"right"===this.iconAlign&&t("div",{class:"right-icon-container"},this.renderIcon())}renderIcon(){return t("vega-icon",{icon:this.icon,color:"text-primary",size:"size-20",class:"vega-flex-shrink-0"})}}p([r()],f.prototype,"host",void 0),p([r()],f.prototype,"titleText",void 0),p([r()],f.prototype,"description",void 0),p([r()],f.prototype,"icon",void 0),p([r()],f.prototype,"iconAlign",void 0);var d=function(t,e,i,n){var s,r=arguments.length,o=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,i,o):s(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};const h=class{constructor(t){e(this,t),this.globalSlimmers={},this.renderer=new f,this.vegaComponentUsageRuntimeMetricsSlimmer=new c,this.titleText="",this.iconAlign="left"}render(){return s(t(i,null,this.renderer.render()),this.host)}get host(){return n(this)}};d([l()],h.prototype,"globalSlimmers",void 0),d([a()],h.prototype,"renderer",void 0),d([a()],h.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),h.style=':host{display:block}.section-title-text{color:rgba(var(--v-text-primary, 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){.section-title-text{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){.section-title-text{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){.section-title-text{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}.section-title-description{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:28px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.section-title-description{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){.section-title-description{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){.section-title-description{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.section-title-icon-container{margin-top:4px}.right-icon-container{display:inline-block;margin-left:8px;margin-top:4px;vertical-align:middle}';export{h as vega_section_title}
1
+ import{h as t,r as e,H as i,g as n}from"./p-21d26bb4.js";import{s}from"./p-9b797118.js";import{c as r,V as o,I as a}from"./p-6e1ab235.js";import{V as l,I as c}from"./p-4387d550.js";var p=function(t,e,i,n){var s,r=arguments.length,o=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,i,o):s(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class f extends o{render(){return t("vega-flex",{"align-items":"start","justify-content":"start",gap:"size-8"},this.renderPrefixIcon(),this.renderText())}renderPrefixIcon(){return this.icon&&"left"===this.iconAlign&&t("div",{class:"section-title-icon-container"},this.renderIcon())}renderText(){return t("vega-flex",{class:"vega-flex-grow",direction:"col","align-items":"start","justify-content":"start",gap:"size-4"},this.renderTitle(),this.renderDescription())}renderTitle(){return t("div",{class:"section-title-text vega-flex-grow"},t("span",null,this.titleText),this.renderSuffixIcon())}renderDescription(){return t("div",{class:"section-title-description"},this.description)}renderSuffixIcon(){return this.icon&&"right"===this.iconAlign&&t("div",{class:"right-icon-container"},this.renderIcon())}renderIcon(){return t("vega-icon",{icon:this.icon,color:"text-primary",size:"size-20",class:"vega-flex-shrink-0"})}}p([r()],f.prototype,"host",void 0),p([r()],f.prototype,"titleText",void 0),p([r()],f.prototype,"description",void 0),p([r()],f.prototype,"icon",void 0),p([r()],f.prototype,"iconAlign",void 0);var d=function(t,e,i,n){var s,r=arguments.length,o=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,i,o):s(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};const h=class{constructor(t){e(this,t),this.globalSlimmers={},this.renderer=new f,this.vegaComponentUsageRuntimeMetricsSlimmer=new l,this.titleText="",this.iconAlign="left"}render(){return s(t(i,null,this.renderer.render()),this.host)}get host(){return n(this)}};d([c()],h.prototype,"globalSlimmers",void 0),d([a()],h.prototype,"renderer",void 0),d([a()],h.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),h.style=':host{display:block}.section-title-text{color:rgba(var(--v-text-primary, 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){.section-title-text{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){.section-title-text{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){.section-title-text{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}.section-title-description{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:28px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.section-title-description{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){.section-title-description{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){.section-title-description{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.section-title-icon-container{margin-top:4px}.right-icon-container{display:inline-block;margin-left:8px;margin-top:4px;vertical-align:middle}';export{h as vega_section_title}
@@ -1 +1 @@
1
- import{h as t,H as o,r as e,c as i,g as r}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as a,M as c,V as n,I as l}from"./p-6e1ab235.js";import{V as p,I as b}from"./p-4387d550.js";import{a as d}from"./p-bf953152.js";var v=function(t,o,e,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,o,e,i);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(a=(s<3?r(a):s>3?r(o,e,a):r(o,e))||a);return s>3&&a&&Object.defineProperty(o,e,a),a};class f extends n{componentDidLoad(){this.updateBackdropStyle()}watchVisible(){this.updateBackdropStyle()}updateBackdropStyle(){this.visible?(this.host.style.display="block",setTimeout((()=>{this.host.style.opacity="1"}))):(this.host.style.opacity="0",setTimeout((()=>{this.visible||(this.host.style.display="none")}),this.duration))}}v([a()],f.prototype,"host",void 0),v([a()],f.prototype,"visible",void 0),v([a()],f.prototype,"duration",void 0),v([c("componentDidLoad")],f.prototype,"componentDidLoad",null),v([c("watchVisible")],f.prototype,"watchVisible",null);var h=function(t,o,e,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,o,e,i);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(a=(s<3?r(a):s>3?r(o,e,a):r(o,e))||a);return s>3&&a&&Object.defineProperty(o,e,a),a};class u extends n{render(){const{duration:e=0,color:i}=this;return t(o,{style:{transitionDuration:e?`${e}ms`:""},class:d([i]),onClick:()=>this.vegaClick.emit()})}}h([a()],u.prototype,"visible",void 0),h([a()],u.prototype,"color",void 0),h([a()],u.prototype,"duration",void 0),h([a()],u.prototype,"vegaClick",void 0);var m=function(t,o,e,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,o,e,i);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(a=(s<3?r(a):s>3?r(o,e,a):r(o,e))||a);return s>3&&a&&Object.defineProperty(o,e,a),a};const g=class{constructor(t){e(this,t),this.vegaClick=i(this,"vegaClick",7),this.globalSlimmers={},this.vegaBackdropVisibleController=new f,this.vegaBackdropRenderer=new u,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.color="bg-backdrop-modal",this.visible=!1}watchVisible(){}render(){return s(this.vegaBackdropRenderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{visible:["watchVisible"]}}};m([b()],g.prototype,"globalSlimmers",void 0),m([l()],g.prototype,"vegaBackdropVisibleController",void 0),m([l()],g.prototype,"vegaBackdropRenderer",void 0),m([l()],g.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),g.style=":host{position:fixed;top:0px;left:0px;right:0px;bottom:0px;opacity:0;display:none;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:opacity}:host(.bg-backdrop-modal){background-color:rgba(var(--v-bg-backdrop-modal, 18, 18, 39, 0.85))}:host(.bg-backdrop-popover){background-color:rgba(var(--v-bg-backdrop-popover, 32, 54, 69, 0.16))}:host(.bg-transparent){background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}";export{g as vega_backdrop}
1
+ import{h as t,H as o,r as e,c as i,g as r}from"./p-21d26bb4.js";import{s}from"./p-9b797118.js";import{c as a,M as c,V as n,I as l}from"./p-6e1ab235.js";import{V as p,I as b}from"./p-4387d550.js";import{a as d}from"./p-bf953152.js";var v=function(t,o,e,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,o,e,i);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(a=(s<3?r(a):s>3?r(o,e,a):r(o,e))||a);return s>3&&a&&Object.defineProperty(o,e,a),a};class f extends n{componentDidLoad(){this.updateBackdropStyle()}watchVisible(){this.updateBackdropStyle()}updateBackdropStyle(){this.visible?(this.host.style.display="block",setTimeout((()=>{this.host.style.opacity="1"}))):(this.host.style.opacity="0",setTimeout((()=>{this.visible||(this.host.style.display="none")}),this.duration))}}v([a()],f.prototype,"host",void 0),v([a()],f.prototype,"visible",void 0),v([a()],f.prototype,"duration",void 0),v([c("componentDidLoad")],f.prototype,"componentDidLoad",null),v([c("watchVisible")],f.prototype,"watchVisible",null);var h=function(t,o,e,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,o,e,i);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(a=(s<3?r(a):s>3?r(o,e,a):r(o,e))||a);return s>3&&a&&Object.defineProperty(o,e,a),a};class u extends n{render(){const{duration:e=0,color:i}=this;return t(o,{style:{transitionDuration:e?`${e}ms`:""},class:d([i]),onClick:()=>this.vegaClick.emit()})}}h([a()],u.prototype,"visible",void 0),h([a()],u.prototype,"color",void 0),h([a()],u.prototype,"duration",void 0),h([a()],u.prototype,"vegaClick",void 0);var m=function(t,o,e,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,o,e,i);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(a=(s<3?r(a):s>3?r(o,e,a):r(o,e))||a);return s>3&&a&&Object.defineProperty(o,e,a),a};const g=class{constructor(t){e(this,t),this.vegaClick=i(this,"vegaClick",7),this.globalSlimmers={},this.vegaBackdropVisibleController=new f,this.vegaBackdropRenderer=new u,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.color="bg-backdrop-modal",this.visible=!1}watchVisible(){}render(){return s(this.vegaBackdropRenderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{visible:["watchVisible"]}}};m([b()],g.prototype,"globalSlimmers",void 0),m([l()],g.prototype,"vegaBackdropVisibleController",void 0),m([l()],g.prototype,"vegaBackdropRenderer",void 0),m([l()],g.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),g.style=":host{position:fixed;top:0px;left:0px;right:0px;bottom:0px;opacity:0;display:none;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:opacity}:host(.bg-backdrop-modal){background-color:rgba(var(--v-bg-backdrop-modal, 18, 18, 39, 0.85))}:host(.bg-backdrop-popover){background-color:rgba(var(--v-bg-backdrop-popover, 32, 54, 69, 0.16))}:host(.bg-transparent){background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}";export{g as vega_backdrop}
@@ -1 +1 @@
1
- import{r as t,c as e,h as s,H as i,g as o}from"./p-1c298d5a.js";import{s as a}from"./p-9b797118.js";import{I as g}from"./p-74168615.js";import{D as r}from"./p-6e898779.js";import{F as n,a as l}from"./p-6f81fe1e.js";import{c as d}from"./p-a821bcf3.js";import{I as c}from"./p-6e1ab235.js";import{V as p,I as h}from"./p-4387d550.js";import{c as u}from"./p-acd9bfa4.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-bf953152.js";import"./p-6a334573.js";import"./p-804f71b3.js";import"./p-47a4c625.js";const v=[{payloadKey:"ITEM_TOGGLE_STATUS_MAP_IS_DEFAULT_VALUE",payloadDescription:"@deprecated Defines the labels and icons associated with the toggle states.",payloadValue:t=>"plus-sign"===t.itemToggleStatusMap.unToggledIcon&&"delete-bin"===t.itemToggleStatusMap.toggledIcon&&"Add"===t.itemToggleStatusMap.unToggledLabel&&"Added"===t.itemToggleStatusMap.togglingLabel&&"Remove"===t.itemToggleStatusMap.toggledLabel&&"Removed"===t.itemToggleStatusMap.unTogglingLabel},{payloadKey:"ITEM_TOGGLE_STATUS_MAP_IS_NOT_DEFAULT_VALUE",payloadDescription:"@deprecated Defines the labels and icons associated with the toggle states.",payloadValue:t=>"plus-sign"!==t.itemToggleStatusMap.unToggledIcon||"delete-bin"!==t.itemToggleStatusMap.toggledIcon||"Add"!==t.itemToggleStatusMap.unToggledLabel||"Added"!==t.itemToggleStatusMap.togglingLabel||"Remove"!==t.itemToggleStatusMap.toggledLabel||"Removed"!==t.itemToggleStatusMap.unTogglingLabel}];var m=function(t,e,s,i){var o,a=arguments.length,g=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(g=(a<3?o(g):a>3?o(e,s,g):o(e,s))||g);return a>3&&g&&Object.defineProperty(e,s,g),g};const b=class{constructor(s){t(this,s),this.vegaToggleStatus=e(this,"vegaToggleStatus",7),this.toggleStatus=e(this,"toggleStatus",7),this.globalSlimmers={},this.toggleStatusEventEmitter=d(b,n),this.deprecatedPropertySlimmer=u(b,"statusMap","itemToggleStatusMap",b.defaultStatusMap),this.vegaComponentUsageRuntimeMetricsSlimmer=new p(v),this.toggleItemStatus="unToggled",this.itemToggleStatusMap=b.defaultStatusMap,this.statusMap=b.defaultStatusMap,this.isToggled=!1,this.handleToggle=()=>{this.isTogglingOrUnToggling()||this.updateToggleStatus()}}onToggledPropsChange(){this.updateTransitionStatus()}componentWillLoad(){this.updateTransitionStatus()}render(){return a(s(i,{class:{"vega-toggled-status":this.isTogglingOrUnToggling()}},this.renderLabelDom(),s("vega-button-circle",{size:"small",variant:"secondary",icon:"unToggled"===this.toggleItemStatus?this.deprecatedPropertySlimmer.getValue().unToggledIcon||"plus-sign":"toggled"===this.toggleItemStatus?this.deprecatedPropertySlimmer.getValue().toggledIcon||"delete-bin":"checkmark",ref:t=>{r.addUniqueObserverToNode(t,l,this.handleToggle)}})),this.host)}renderLabelDom(){let t;switch(this.toggleItemStatus){case"unToggled":t=this.deprecatedPropertySlimmer.getValue().unToggledLabel;break;case"toggling":t=this.deprecatedPropertySlimmer.getValue().togglingLabel;break;case"toggled":t=this.deprecatedPropertySlimmer.getValue().toggledLabel;break;case"unToggling":t=this.deprecatedPropertySlimmer.getValue().unTogglingLabel}return s("div",null,t||"No label defined")}isTogglingOrUnToggling(){return"toggling"===this.toggleItemStatus||"unToggling"===this.toggleItemStatus}updateToggleStatus(){switch(this.toggleItemStatus){case"unToggled":this.toggleItemStatus="toggling",setTimeout((()=>{this.isToggled=!0}),g);break;case"toggled":this.toggleItemStatus="unToggling",setTimeout((()=>{this.isToggled=!1}),g)}}updateTransitionStatus(){this.toggleItemStatus=this.isToggled?"toggled":"unToggled",this.toggleStatusEventEmitter.emit(this.isToggled)}get host(){return o(this)}static get watchers(){return{isToggled:["onToggledPropsChange"]}}};b.defaultStatusMap={unToggledIcon:"plus-sign",toggledIcon:"delete-bin",unToggledLabel:"Add",togglingLabel:"Added",toggledLabel:"Remove",unTogglingLabel:"Removed"},m([h()],b.prototype,"globalSlimmers",void 0),m([c()],b.prototype,"toggleStatusEventEmitter",void 0),m([c()],b.prototype,"deprecatedPropertySlimmer",void 0),m([c()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b.style=':host{display:inline-block;text-align:left;line-height:normal}div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));padding-right:8px;display:inline-block}@media screen and (min-width: 768px) and (max-width: 1023px){div{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){div{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){div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}div:hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}vega-button-circle::part(button):hover{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1))}vega-button-circle::part(button):active{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1))}:host(.vega-toggled-status)>div,:host(.vega-toggled-status) vega-button-circle{animation:fadein 1.4s ease}:host(.vega-toggled-status)>div{cursor:default;color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.vega-toggled-status)>div:hover{color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.vega-toggled-status) vega-button-circle::part(button){border:2px solid rgba(var(--v-border-success, 1, 128, 31, 1));cursor:default;box-shadow:0 0 0 0}:host(.vega-toggled-status) vega-button-circle::part(button):hover{border:2px solid rgba(var(--v-border-success, 1, 128, 31, 1))}:host(.vega-toggled-status) vega-button-circle::part(icon){color:rgba(var(--v-text-success, 1, 128, 31, 1))}@keyframes fadein{0%{opacity:0}10%{opacity:0.1}50%{opacity:0.5}80%{opacity:0.8}100%{opacity:1}}';export{b as vega_item_toggle}
1
+ import{r as t,c as e,h as s,H as i,g as o}from"./p-21d26bb4.js";import{s as a}from"./p-9b797118.js";import{I as g}from"./p-74168615.js";import{D as r}from"./p-66759f4e.js";import{F as n,a as l}from"./p-e1a2a701.js";import{c as d}from"./p-86782109.js";import{I as c}from"./p-6e1ab235.js";import{V as p,I as h}from"./p-4387d550.js";import{c as u}from"./p-acd9bfa4.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-bf953152.js";import"./p-6a334573.js";import"./p-020b04ed.js";import"./p-47a4c625.js";const v=[{payloadKey:"ITEM_TOGGLE_STATUS_MAP_IS_DEFAULT_VALUE",payloadDescription:"@deprecated Defines the labels and icons associated with the toggle states.",payloadValue:t=>"plus-sign"===t.itemToggleStatusMap.unToggledIcon&&"delete-bin"===t.itemToggleStatusMap.toggledIcon&&"Add"===t.itemToggleStatusMap.unToggledLabel&&"Added"===t.itemToggleStatusMap.togglingLabel&&"Remove"===t.itemToggleStatusMap.toggledLabel&&"Removed"===t.itemToggleStatusMap.unTogglingLabel},{payloadKey:"ITEM_TOGGLE_STATUS_MAP_IS_NOT_DEFAULT_VALUE",payloadDescription:"@deprecated Defines the labels and icons associated with the toggle states.",payloadValue:t=>"plus-sign"!==t.itemToggleStatusMap.unToggledIcon||"delete-bin"!==t.itemToggleStatusMap.toggledIcon||"Add"!==t.itemToggleStatusMap.unToggledLabel||"Added"!==t.itemToggleStatusMap.togglingLabel||"Remove"!==t.itemToggleStatusMap.toggledLabel||"Removed"!==t.itemToggleStatusMap.unTogglingLabel}];var m=function(t,e,s,i){var o,a=arguments.length,g=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(g=(a<3?o(g):a>3?o(e,s,g):o(e,s))||g);return a>3&&g&&Object.defineProperty(e,s,g),g};const b=class{constructor(s){t(this,s),this.vegaToggleStatus=e(this,"vegaToggleStatus",7),this.toggleStatus=e(this,"toggleStatus",7),this.globalSlimmers={},this.toggleStatusEventEmitter=d(b,n),this.deprecatedPropertySlimmer=u(b,"statusMap","itemToggleStatusMap",b.defaultStatusMap),this.vegaComponentUsageRuntimeMetricsSlimmer=new p(v),this.toggleItemStatus="unToggled",this.itemToggleStatusMap=b.defaultStatusMap,this.statusMap=b.defaultStatusMap,this.isToggled=!1,this.handleToggle=()=>{this.isTogglingOrUnToggling()||this.updateToggleStatus()}}onToggledPropsChange(){this.updateTransitionStatus()}componentWillLoad(){this.updateTransitionStatus()}render(){return a(s(i,{class:{"vega-toggled-status":this.isTogglingOrUnToggling()}},this.renderLabelDom(),s("vega-button-circle",{size:"small",variant:"secondary",icon:"unToggled"===this.toggleItemStatus?this.deprecatedPropertySlimmer.getValue().unToggledIcon||"plus-sign":"toggled"===this.toggleItemStatus?this.deprecatedPropertySlimmer.getValue().toggledIcon||"delete-bin":"checkmark",ref:t=>{r.addUniqueObserverToNode(t,l,this.handleToggle)}})),this.host)}renderLabelDom(){let t;switch(this.toggleItemStatus){case"unToggled":t=this.deprecatedPropertySlimmer.getValue().unToggledLabel;break;case"toggling":t=this.deprecatedPropertySlimmer.getValue().togglingLabel;break;case"toggled":t=this.deprecatedPropertySlimmer.getValue().toggledLabel;break;case"unToggling":t=this.deprecatedPropertySlimmer.getValue().unTogglingLabel}return s("div",null,t||"No label defined")}isTogglingOrUnToggling(){return"toggling"===this.toggleItemStatus||"unToggling"===this.toggleItemStatus}updateToggleStatus(){switch(this.toggleItemStatus){case"unToggled":this.toggleItemStatus="toggling",setTimeout((()=>{this.isToggled=!0}),g);break;case"toggled":this.toggleItemStatus="unToggling",setTimeout((()=>{this.isToggled=!1}),g)}}updateTransitionStatus(){this.toggleItemStatus=this.isToggled?"toggled":"unToggled",this.toggleStatusEventEmitter.emit(this.isToggled)}get host(){return o(this)}static get watchers(){return{isToggled:["onToggledPropsChange"]}}};b.defaultStatusMap={unToggledIcon:"plus-sign",toggledIcon:"delete-bin",unToggledLabel:"Add",togglingLabel:"Added",toggledLabel:"Remove",unTogglingLabel:"Removed"},m([h()],b.prototype,"globalSlimmers",void 0),m([c()],b.prototype,"toggleStatusEventEmitter",void 0),m([c()],b.prototype,"deprecatedPropertySlimmer",void 0),m([c()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b.style=':host{display:inline-block;text-align:left;line-height:normal}div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));padding-right:8px;display:inline-block}@media screen and (min-width: 768px) and (max-width: 1023px){div{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){div{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){div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}div:hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}vega-button-circle::part(button):hover{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1))}vega-button-circle::part(button):active{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1))}:host(.vega-toggled-status)>div,:host(.vega-toggled-status) vega-button-circle{animation:fadein 1.4s ease}:host(.vega-toggled-status)>div{cursor:default;color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.vega-toggled-status)>div:hover{color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.vega-toggled-status) vega-button-circle::part(button){border:2px solid rgba(var(--v-border-success, 1, 128, 31, 1));cursor:default;box-shadow:0 0 0 0}:host(.vega-toggled-status) vega-button-circle::part(button):hover{border:2px solid rgba(var(--v-border-success, 1, 128, 31, 1))}:host(.vega-toggled-status) vega-button-circle::part(icon){color:rgba(var(--v-text-success, 1, 128, 31, 1))}@keyframes fadein{0%{opacity:0}10%{opacity:0.1}50%{opacity:0.5}80%{opacity:0.8}100%{opacity:1}}';export{b as vega_item_toggle}
@@ -1 +1 @@
1
- import{c as t,I as e,V as i,L as s,M as o}from"./p-6e1ab235.js";import{f as n,c as h,i as r}from"./p-bf953152.js";import{I as c}from"./p-8ade44bf.js";import{c as l}from"./p-6a334573.js";import{P as a}from"./p-c0291e2e.js";import{P as d,A as u}from"./p-74168615.js";import{A as f}from"./p-b1f65b13.js";import{R as p}from"./p-bc2dd43d.js";import{C as v}from"./p-2d0d575f.js";import{S as m}from"./p-5773a9a3.js";import{O as g}from"./p-331a62d5.js";import{d as b}from"./p-6f81fe1e.js";import{p as w}from"./p-c754b32c.js";import{D as j}from"./p-6e898779.js";class R{canRetrieve(){return!0}retrieve(){const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],R.prototype,"showConfig",void 0);class y{canRetrieve(){return!this.showConfig.isScreenPosition}}class C extends y{canRetrieve(){return super.canRetrieve()&&!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo)}retrieve(){const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],C.prototype,"showConfig",void 0);class x extends y{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,"vega-modal")}retrieve(){return this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=n(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t({writable:!0})],x.prototype,"showConfig",void 0);class O extends y{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,".vega-popover")}retrieve(){const t=n(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],O.prototype,"showConfig",void 0);var S=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class E extends i{constructor(){super(...arguments),this.positionRelativeToWrapper=new C,this.vegaPopoverWrapper=new O,this.vegaModalWrapper=new x,this.defaultWrapper=new R}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.defaultWrapper]}}S([t({writable:!0})],E.prototype,"container",void 0),S([t({writable:!0})],E.prototype,"showConfig",void 0),S([e()],E.prototype,"positionRelativeToWrapper",void 0),S([e()],E.prototype,"vegaPopoverWrapper",void 0),S([e()],E.prototype,"vegaModalWrapper",void 0),S([e()],E.prototype,"defaultWrapper",void 0);class A extends i{getPositionBox(t,e){const i=t||this.getPlacements(),s=e||this.getAlignments(),o=this.getTargetBoundBox(),n=this.getElementBoundBox(),h=this.getElementScrollDimension(),r=this.getSuitablePlacement(h,n,o,i),c=this.getSuitableAlignment(h,n,o,r,s),l=this.calculatePosition(n,o,r,c),a=this.getTranslocationBox(r);return l.placement=r,l.alignment=c,l.left+=a.X,l.top+=a.Y,l}getElementBoundBox(){const t=this.showConfig.appendableElement,e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}getPlacements(){const t=this.showConfig.placement;if("string"==typeof t){const e=d.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...d]}getAlignments(){const t=this.showConfig.alignment;if("string"==typeof t){const e=u.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...u]}calculatePosition(t,e,i,s){return{top:this.calculateTop(t,e,i,s),left:this.calculateLeft(t,e,i,s)}}getTranslocationBox(t){const e=Array.isArray(this.showConfig.placement)?this.showConfig.placement[0]:this.showConfig.placement,i=this.getTranslocation(),s={X:0,Y:0};if(f(i)){let o=i.X,n=i.Y;(e&&["left","right"].includes(e)&&["top","bottom"].includes(t)||e&&["top","bottom"].includes(e)&&["left","right"].includes(t))&&(o=i.Y,n=i.X),["bottom","top"].includes(t)&&(s.Y="top"===t?-n:n,s.X=o),["left","right"].includes(t)&&(s.X="left"===t?-o:o,s.Y=n)}return s}calculateLeft(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}calculateTop(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}getSuitablePlacement(t,e,i,o){const n=o[0];return o.find((s=>this.hasEnoughSpace(t,s,i,e)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined placement:\n ${n}\n `),n)}getSuitableAlignment(t,e,i,o,n){const h=n[0];return n.find((s=>this.hasEnoughAlignmentSpace(t,i,e,o,s)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined alignment:\n ${h}\n `),h)}hasEnoughAlignmentSpace(t,e,i,s,o){if(["top","bottom"].includes(s))switch(o){case"start":return e.left+i.width<=t.width;case"center":return e.left>=(i.width-e.width)/2&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(o){case"start":return e.top+i.height<=t.height;case"center":return e.top>=(i.height-e.height)/2&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}hasEnoughSpace(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}getTranslocation(){const t=this.showConfig.translocation;return t&&p.format(t,"translocation")}}var P=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class k extends A{getPosition(){return"relative"!==window.getComputedStyle(this.container).position&&s.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate."),this.getPositionBox()}getTargetBoundBox(){const t=this.container.getBoundingClientRect(),e=this.showConfig.target.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top-t.top+this.container.scrollTop,left:e.left-t.left+this.container.scrollLeft}}getElementScrollDimension(){return{width:this.container.scrollWidth,height:this.container.scrollHeight}}}P([t()],k.prototype,"container",void 0),P([t()],k.prototype,"showConfig",void 0);class T extends A{getPosition(t){const e=t?this.getPositionBox([this.previousPositionBox.placement],[this.previousPositionBox.alignment]):this.getPositionBox();return this.previousPositionBox=e,e}getTargetBoundBox(){const t=this.showConfig.target.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,left:t.left}}getElementScrollDimension(){return{width:window.innerWidth,height:window.innerHeight}}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],T.prototype,"showConfig",void 0);var $=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class D extends i{constructor(){super(...arguments),this.bodyPositionStrategy=new k,this.screenPositionStrategy=new T}setCalculationStrategy(){this.positionStrategy=this.showConfig.isScreenPosition?this.screenPositionStrategy:this.bodyPositionStrategy}adjustPosition(t){this.adjustWidth(),this.adjustHeight(),this.applyPosition(this.positionStrategy.getPosition(t))}applyPosition(t){const e=this.showConfig.appendableElement;this.showConfig.isScreenPosition&&(e.style.position="fixed"),e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom"),e.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end"),e.classList.add(`vega-placement-${t.placement}`),e.classList.add(`vega-alignment-${t.alignment}`)}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=p.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight&&!this.showConfig.isScreenPosition){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}}$([t()],D.prototype,"container",void 0),$([t()],D.prototype,"showConfig",void 0),$([e()],D.prototype,"bodyPositionStrategy",void 0),$([e()],D.prototype,"screenPositionStrategy",void 0);var B=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class L{constructor(t,e){var i,s;this.resizeObserverSlimmer=l(L,a,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{h(this.showConfig.target)&&h(this.showConfig.appendableElement)&&this.adjustPosition()},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new E,this.positionCalculationController=new D,this.showConfigCallback=t,this.showConfigCallbackTarget=e;const o=this.getShowConfig();null===(i=o.appendableElement)||void 0===i||i.classList.add("vega-force-hidden"),null===(s=o.appendableElement)||void 0===s||s.classList.add("vega-element-appender-appendable")}show(){this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):s.error("No appendable element found, please add it at new elementAppender."):s.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.toggleShow(!1),this.resetContainerPosition(),c.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(){var t;const e=this.showConfig.target.getBoundingClientRect();!this.showConfig.isScreenPosition||e.left===(null===(t=this.previousTargetRect)||void 0===t?void 0:t.left)&&e.top===this.previousTargetRect.top||this.adjustPosition(!0)}destroy(){this.showConfig&&(this.removeVisibleAppendElement(this.showConfig.appendableElement),this.resetContainerPosition(),c.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showConfig.appendableElement.classList.remove("vega-force-hidden"),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.showConfig.appendableElement.classList.add("vega-force-hidden"),this.removeVisibleAppendElement(this.showConfig.appendableElement))}saveVisibleAppendElement(t){const e=L.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=L.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=L.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,L.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){this.showConfig.isScreenPosition||this.initVisibleAppendElement(),this.showConfig.appendableElement.style.boxSizing="border-box",this.positionCalculationController.setCalculationStrategy()}initVisibleAppendElement(){const t=window.getComputedStyle(this.container).position;L.containerMap.has(this.container)||L.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative")}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){c.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}L.containerMap=new Map,B([e()],L.prototype,"resizeObserverSlimmer",void 0),B([e()],L.prototype,"elementAppenderContainerController",void 0),B([e()],L.prototype,"positionCalculationController",void 0);var W,z=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};!function(t){t.SHOW="show",t.HIDE="hide"}(W||(W={}));class M extends i{constructor(t){super(),this.childrenEA=[],this.currentEA=t}componentDidLoad(){this.register()}onShow(){this.notify(W.SHOW)}onHide(){this.notify(W.HIDE)}getParent(){return this.parentEA}getChildren(){return this.childrenEA}notify(t){const e=n(this.showConfig.target,".vega-element-appender-appendable");e&&v.notify(b.getSubject(e,w),{type:t,child:this.currentEA,callback:t=>{this.parentEA=t}})}register(){this.showConfig&&j.addUniqueObserverToNode(this.showConfig.appendableElement,w,(t=>{t.type===W.SHOW?this.childrenEA.push(t.child):t.type===W.HIDE&&(this.childrenEA=this.childrenEA.filter((e=>e!==t.child))),t.callback(this.currentEA)}))}}z([t()],M.prototype,"showConfig",void 0),z([o("componentDidLoad")],M.prototype,"componentDidLoad",null),z([o("show")],M.prototype,"onShow",null),z([o("hide")],M.prototype,"onHide",null);var V=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class F extends i{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.hierarchyTreeManager=new M(this),this.registerElementAppenderListener=()=>{var t,e,i,s,o,n;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler),document.addEventListener("scroll",this.globalScrollHandler,{capture:!0}),this.listenShadowRootElementScrolling()},this.targetClickHandler=()=>{this.shouldListenerWork("click")&&(this.isShowing()?this.hide():this.show())},this.targetMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&(!1===this.isShowing()&&this.show(),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&this.createDelayHideTimer()},this.targetFocusoutHandler=t=>{var e;t.relatedTarget!==(null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)&&this.targetMouseLeaveHandler()},this.elementMouseEnterHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseEnterHandler(),this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseLeaveHandler(),this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer()},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0];!this.hierarchyTreeManager.getChildren().some((t=>t.isShowing()))&&this.shouldListenerWork("custom")&&this.isShowing()&&this.showConfig&&!r(e,this.showConfig.appendableElement)&&!r(e,this.showConfig.target)&&n(e,"vega-modal")===n(this.showConfig.target,"vega-modal")&&this.hide()},this.globalScrollHandler=()=>{var t;this.showConfig&&this.showConfig.isScreenPosition&&this.isShowing()&&(null===(t=this.elementAppender)||void 0===t||t.onScroll())},this.createDelayHideTimer=()=>{this.delayHideTimer=setTimeout((()=>{this.hide(),clearTimeout(this.delayHideTimer)}),F.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.shouldListenerWork=t=>{const e=this.getTrigger();switch(t){case"custom":return"none"!==e;case"click":return"click"===e;case"hover":return"hover"===e}throw new Error(`Unexpected trigger: ${t}. Expected values are custom, click, or hover.`)},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.destroyElementAppender()}componentDidLoad(){this.initElementAppender()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1,this.hierarchyTreeManager.getChildren().map((t=>{t.hide()}))}destroy(){this.destroyElementAppender(),this[this.isDropdownShowName]=!1}updateShowConfigFactory(t){this.showConfigFactory=t,this.initElementAppender()}destroyElementAppender(){this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}initElementAppender(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}setElementAppender(){this.elementAppender=new L(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,o,n;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler),document.removeEventListener("scroll",this.globalScrollHandler),this.removeShadowRootElementScrolling()}listenShadowRootElementScrolling(){this.shadowRootElementScrollingObserver=new g(this.canAcceptShadowRootScrollEvent.bind(this),this.globalScrollHandler.bind(this)),v.register(m,this.shadowRootElementScrollingObserver)}canAcceptShadowRootScrollEvent(t){return Boolean(this.showConfig&&r(this.showConfig.target,t.host))}removeShadowRootElementScrolling(){v.unregister(m,this.shadowRootElementScrollingObserver)}}F.DELAY_HIDE_TIME=100,V([e()],F.prototype,"hierarchyTreeManager",void 0),V([o("connectedCallback")],F.prototype,"connectedCallback",null),V([o("disconnectedCallback")],F.prototype,"disconnectedCallback",null),V([o("componentDidLoad")],F.prototype,"componentDidLoad",null);export{F as E}
1
+ import{c as t,I as e,V as i,L as s,M as o}from"./p-6e1ab235.js";import{f as n,c as h,i as r}from"./p-bf953152.js";import{I as c}from"./p-1e194737.js";import{c as l}from"./p-6a334573.js";import{P as a}from"./p-c0291e2e.js";import{P as d,A as u}from"./p-74168615.js";import{A as f}from"./p-b1f65b13.js";import{R as p}from"./p-6ea42854.js";import{C as v}from"./p-2d0d575f.js";import{S as m}from"./p-5773a9a3.js";import{O as g}from"./p-331a62d5.js";import{d as w}from"./p-e1a2a701.js";import{q as b}from"./p-ce6b62c4.js";import{D as j}from"./p-66759f4e.js";class R{canRetrieve(){return!0}retrieve(){const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],R.prototype,"showConfig",void 0);class y{canRetrieve(){return!this.showConfig.isScreenPosition}}class C extends y{canRetrieve(){return super.canRetrieve()&&!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo)}retrieve(){const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],C.prototype,"showConfig",void 0);class x extends y{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,"vega-modal")}retrieve(){return this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=n(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t({writable:!0})],x.prototype,"showConfig",void 0);class O extends y{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,".vega-popover")}retrieve(){const t=n(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],O.prototype,"showConfig",void 0);var S=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class E extends i{constructor(){super(...arguments),this.positionRelativeToWrapper=new C,this.vegaPopoverWrapper=new O,this.vegaModalWrapper=new x,this.defaultWrapper=new R}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.defaultWrapper]}}S([t({writable:!0})],E.prototype,"container",void 0),S([t({writable:!0})],E.prototype,"showConfig",void 0),S([e()],E.prototype,"positionRelativeToWrapper",void 0),S([e()],E.prototype,"vegaPopoverWrapper",void 0),S([e()],E.prototype,"vegaModalWrapper",void 0),S([e()],E.prototype,"defaultWrapper",void 0);class A extends i{getPositionBox(t,e){const i=t||this.getPlacements(),s=e||this.getAlignments(),o=this.getTargetBoundBox(),n=this.getElementBoundBox(),h=this.getElementScrollDimension(),r=this.getSuitablePlacement(h,n,o,i),c=this.getSuitableAlignment(h,n,o,r,s),l=this.calculatePosition(n,o,r,c),a=this.getTranslocationBox(r);return l.placement=r,l.alignment=c,l.left+=a.X,l.top+=a.Y,l}getElementBoundBox(){const t=this.showConfig.appendableElement,e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}getPlacements(){const t=this.showConfig.placement;if("string"==typeof t){const e=d.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...d]}getAlignments(){const t=this.showConfig.alignment;if("string"==typeof t){const e=u.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...u]}calculatePosition(t,e,i,s){return{top:this.calculateTop(t,e,i,s),left:this.calculateLeft(t,e,i,s)}}getTranslocationBox(t){const e=Array.isArray(this.showConfig.placement)?this.showConfig.placement[0]:this.showConfig.placement,i=this.getTranslocation(),s={X:0,Y:0};if(f(i)){let o=i.X,n=i.Y;(e&&["left","right"].includes(e)&&["top","bottom"].includes(t)||e&&["top","bottom"].includes(e)&&["left","right"].includes(t))&&(o=i.Y,n=i.X),["bottom","top"].includes(t)&&(s.Y="top"===t?-n:n,s.X=o),["left","right"].includes(t)&&(s.X="left"===t?-o:o,s.Y=n)}return s}calculateLeft(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}calculateTop(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}getSuitablePlacement(t,e,i,o){const n=o[0];return o.find((s=>this.hasEnoughSpace(t,s,i,e)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined placement:\n ${n}\n `),n)}getSuitableAlignment(t,e,i,o,n){const h=n[0];return n.find((s=>this.hasEnoughAlignmentSpace(t,i,e,o,s)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined alignment:\n ${h}\n `),h)}hasEnoughAlignmentSpace(t,e,i,s,o){if(["top","bottom"].includes(s))switch(o){case"start":return e.left+i.width<=t.width;case"center":return e.left>=(i.width-e.width)/2&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(o){case"start":return e.top+i.height<=t.height;case"center":return e.top>=(i.height-e.height)/2&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}hasEnoughSpace(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}getTranslocation(){const t=this.showConfig.translocation;return t&&p.format(t,"translocation")}}var P=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class k extends A{getPosition(){return"relative"!==window.getComputedStyle(this.container).position&&s.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate."),this.getPositionBox()}getTargetBoundBox(){const t=this.container.getBoundingClientRect(),e=this.showConfig.target.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top-t.top+this.container.scrollTop,left:e.left-t.left+this.container.scrollLeft}}getElementScrollDimension(){return{width:this.container.scrollWidth,height:this.container.scrollHeight}}}P([t()],k.prototype,"container",void 0),P([t()],k.prototype,"showConfig",void 0);class T extends A{getPosition(t){const e=t?this.getPositionBox([this.previousPositionBox.placement],[this.previousPositionBox.alignment]):this.getPositionBox();return this.previousPositionBox=e,e}getTargetBoundBox(){const t=this.showConfig.target.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,left:t.left}}getElementScrollDimension(){return{width:window.innerWidth,height:window.innerHeight}}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],T.prototype,"showConfig",void 0);var $=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class D extends i{constructor(){super(...arguments),this.bodyPositionStrategy=new k,this.screenPositionStrategy=new T}setCalculationStrategy(){this.positionStrategy=this.showConfig.isScreenPosition?this.screenPositionStrategy:this.bodyPositionStrategy}adjustPosition(t){this.adjustWidth(),this.adjustHeight(),this.applyPosition(this.positionStrategy.getPosition(t))}applyPosition(t){const e=this.showConfig.appendableElement;this.showConfig.isScreenPosition&&(e.style.position="fixed"),e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom"),e.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end"),e.classList.add(`vega-placement-${t.placement}`),e.classList.add(`vega-alignment-${t.alignment}`)}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=p.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight&&!this.showConfig.isScreenPosition){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}}$([t()],D.prototype,"container",void 0),$([t()],D.prototype,"showConfig",void 0),$([e()],D.prototype,"bodyPositionStrategy",void 0),$([e()],D.prototype,"screenPositionStrategy",void 0);var B=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class L{constructor(t,e){var i,s;this.resizeObserverSlimmer=l(L,a,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{h(this.showConfig.target)&&h(this.showConfig.appendableElement)&&this.adjustPosition()},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new E,this.positionCalculationController=new D,this.showConfigCallback=t,this.showConfigCallbackTarget=e;const o=this.getShowConfig();null===(i=o.appendableElement)||void 0===i||i.classList.add("vega-force-hidden"),null===(s=o.appendableElement)||void 0===s||s.classList.add("vega-element-appender-appendable")}show(){this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):s.error("No appendable element found, please add it at new elementAppender."):s.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.toggleShow(!1),this.resetContainerPosition(),c.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(){var t;const e=this.showConfig.target.getBoundingClientRect();!this.showConfig.isScreenPosition||e.left===(null===(t=this.previousTargetRect)||void 0===t?void 0:t.left)&&e.top===this.previousTargetRect.top||this.adjustPosition(!0)}destroy(){this.showConfig&&(this.removeVisibleAppendElement(this.showConfig.appendableElement),this.resetContainerPosition(),c.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showConfig.appendableElement.classList.remove("vega-force-hidden"),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.showConfig.appendableElement.classList.add("vega-force-hidden"),this.removeVisibleAppendElement(this.showConfig.appendableElement))}saveVisibleAppendElement(t){const e=L.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=L.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=L.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,L.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){this.showConfig.isScreenPosition||this.initVisibleAppendElement(),this.showConfig.appendableElement.style.boxSizing="border-box",this.positionCalculationController.setCalculationStrategy()}initVisibleAppendElement(){const t=window.getComputedStyle(this.container).position;L.containerMap.has(this.container)||L.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative")}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){c.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}L.containerMap=new Map,B([e()],L.prototype,"resizeObserverSlimmer",void 0),B([e()],L.prototype,"elementAppenderContainerController",void 0),B([e()],L.prototype,"positionCalculationController",void 0);var W,z=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};!function(t){t.SHOW="show",t.HIDE="hide"}(W||(W={}));class M extends i{constructor(t){super(),this.childrenEA=[],this.currentEA=t}componentDidLoad(){this.register()}onShow(){this.notify(W.SHOW)}onHide(){this.notify(W.HIDE)}getParent(){return this.parentEA}getChildren(){return this.childrenEA}notify(t){const e=n(this.showConfig.target,".vega-element-appender-appendable");e&&v.notify(w.getSubject(e,b),{type:t,child:this.currentEA,callback:t=>{this.parentEA=t}})}register(){this.showConfig&&j.addUniqueObserverToNode(this.showConfig.appendableElement,b,(t=>{t.type===W.SHOW?this.childrenEA.push(t.child):t.type===W.HIDE&&(this.childrenEA=this.childrenEA.filter((e=>e!==t.child))),t.callback(this.currentEA)}))}}z([t()],M.prototype,"showConfig",void 0),z([o("componentDidLoad")],M.prototype,"componentDidLoad",null),z([o("show")],M.prototype,"onShow",null),z([o("hide")],M.prototype,"onHide",null);var V=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class F extends i{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.hierarchyTreeManager=new M(this),this.registerElementAppenderListener=()=>{var t,e,i,s,o,n;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler),document.addEventListener("scroll",this.globalScrollHandler,{capture:!0}),this.listenShadowRootElementScrolling()},this.targetClickHandler=()=>{this.shouldListenerWork("click")&&(this.isShowing()?this.hide():this.show())},this.targetMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&(!1===this.isShowing()&&this.show(),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&this.createDelayHideTimer()},this.targetFocusoutHandler=t=>{var e;t.relatedTarget!==(null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)&&this.targetMouseLeaveHandler()},this.elementMouseEnterHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseEnterHandler(),this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseLeaveHandler(),this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer()},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0];!this.hierarchyTreeManager.getChildren().some((t=>t.isShowing()))&&this.shouldListenerWork("custom")&&this.isShowing()&&this.showConfig&&!r(e,this.showConfig.appendableElement)&&!r(e,this.showConfig.target)&&n(e,"vega-modal")===n(this.showConfig.target,"vega-modal")&&this.hide()},this.globalScrollHandler=()=>{var t;this.showConfig&&this.showConfig.isScreenPosition&&this.isShowing()&&(null===(t=this.elementAppender)||void 0===t||t.onScroll())},this.createDelayHideTimer=()=>{this.delayHideTimer=setTimeout((()=>{this.hide(),clearTimeout(this.delayHideTimer)}),F.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.shouldListenerWork=t=>{const e=this.getTrigger();switch(t){case"custom":return"none"!==e;case"click":return"click"===e;case"hover":return"hover"===e}throw new Error(`Unexpected trigger: ${t}. Expected values are custom, click, or hover.`)},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.destroyElementAppender()}componentDidLoad(){this.initElementAppender()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1,this.hierarchyTreeManager.getChildren().map((t=>{t.hide()}))}destroy(){this.destroyElementAppender(),this[this.isDropdownShowName]=!1}updateShowConfigFactory(t){this.showConfigFactory=t,this.initElementAppender()}destroyElementAppender(){this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}initElementAppender(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}setElementAppender(){this.elementAppender=new L(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,o,n;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler),document.removeEventListener("scroll",this.globalScrollHandler),this.removeShadowRootElementScrolling()}listenShadowRootElementScrolling(){this.shadowRootElementScrollingObserver=new g(this.canAcceptShadowRootScrollEvent.bind(this),this.globalScrollHandler.bind(this)),v.register(m,this.shadowRootElementScrollingObserver)}canAcceptShadowRootScrollEvent(t){return Boolean(this.showConfig&&r(this.showConfig.target,t.host))}removeShadowRootElementScrolling(){v.unregister(m,this.shadowRootElementScrollingObserver)}}F.DELAY_HIDE_TIME=100,V([e()],F.prototype,"hierarchyTreeManager",void 0),V([o("connectedCallback")],F.prototype,"connectedCallback",null),V([o("disconnectedCallback")],F.prototype,"disconnectedCallback",null),V([o("componentDidLoad")],F.prototype,"componentDidLoad",null);export{F as E}
@@ -0,0 +1 @@
1
+ import{M as t,V as e,L as s,c as i}from"./p-6e1ab235.js";import{d as n}from"./p-1bc5b3bc.js";import{E as o,F as h,a as r,V as a,g as c,Z as f,P as d,G as l,z as u}from"./p-01593f9d.js";import{g as p}from"./p-9b797118.js";import{C as g}from"./p-2d0d575f.js";import{d as m}from"./p-e1a2a701.js";import{b as w}from"./p-ce6b62c4.js";import{O}from"./p-331a62d5.js";import{f as R}from"./p-bf953152.js";import{S as b}from"./p-1fb56e14.js";let v=!1;class C{constructor(){this.rangeCount=0,this.ranges=[]}getRangeAt(t){return this.ranges[t]}addRange(t){if(this.ranges.push(t),this.rangeCount=this.ranges.length,!v){const e=window.getSelection();e.removeAllRanges(),e.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset)}}removeAllRanges(){this.ranges=[],this.rangeCount=0}}const N=new class{constructor(){this.supportShadowSelection="function"==typeof window.ShadowRoot.prototype.getSelection,this.supportBeforeInput="function"==typeof window.InputEvent.prototype.getTargetRanges,this.isFirefox=window.navigator.userAgent.toLowerCase().indexOf("firefox")>0,this.listen()}getSelection(t){return this.supportShadowSelection?t.getSelection():this.isFirefox?this.getFirefoxSelection():this.polyfilledShadowSelection}getFirefoxSelection(){const t=document.getSelection();if(t.rangeCount>0){const e=t.getRangeAt(0),s=e.startContainer,i=e.endContainer;if(s!==i&&s.textContent.length===e.startOffset){const t=s.nodeType===Node.TEXT_NODE?s.parentNode.nextSibling:s.nextSibling;e.setStart(t.firstChild,0)}if(i!==s&&0===e.endOffset){const t=i.nodeType===Node.TEXT_NODE?i.parentNode.previousSibling:i.previousSibling;e.setEnd(t.lastChild,t.lastChild.textContent.length)}}return t}listen(){this.isFirefox||this.supportShadowSelection||!this.supportBeforeInput||(this.polyfilledShadowSelection=new C,window.addEventListener("selectionchange",(()=>{if(!v){v=!0;const t=p();t&&t.hasAttribute("contenteditable")?document.execCommand("indent"):this.polyfilledShadowSelection.removeAllRanges(),v=!1}}),!0),window.addEventListener("beforeinput",(t=>{if(v){const e=t.getTargetRanges()[0],s=new Range;s.setStart(e.startContainer,e.startOffset),s.setEnd(e.endContainer,e.endOffset),this.polyfilledShadowSelection.removeAllRanges(),this.polyfilledShadowSelection.addRange(s),t.preventDefault(),t.stopImmediatePropagation()}}),!0))}};class S extends e{constructor(t){super(),this.autoRunTaskQueue=new b(t)}async executeTaskHook(){this.autoRunTaskQueue.queue.length&&await this.autoRunTaskQueue.runTask()}enqueueTheTaskIntoQueue(t=!1){this.autoRunTaskQueue.enqueue({run:async()=>{try{await this.doTask()}catch(t){s.error("The auto task run failed.",t)}}},t)}}!function(t,e,s,i){var n,o=arguments.length,h=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,s,h):n(e,s))||h);o>3&&h&&Object.defineProperty(e,s,h)}([t("componentDidUpdate")],S.prototype,"executeTaskHook",null);class E{constructor(t,e,s=0,i=0,n,o,h){this._startOffset=0,this._endOffset=0,this._startContainer=t,this._endContainer=e,this._startOffset=s,this._endOffset=i,this._startNode=n,this._endNode=o,h&&(this._oldNativeRange=h)}get startContainer(){return this._startContainer}get endContainer(){return this._endContainer}get startNode(){return this._startNode}get endNode(){return this._endNode}get startOffset(){return this._startOffset}get endOffset(){return this._endOffset}updateRTERange(t,e){const{startOffset:s,endOffset:i}=t;this._startOffset=s,this._endOffset=i;const n=t.startNode,h=t.endNode;if(n instanceof o){this._startNode=n,this._endNode=h;const t=this.getElementByRTENode(this._startNode),e=this._startNode===this._endNode?t:this.getElementByRTENode(this._endNode);t&&(this._startContainer=t,this._endContainer=e)}else this._startContainer=n,this._endContainer=h,this._startNode=this.getRTENodeByElement(this._startContainer),this._endNode=this._startContainer===this._endContainer?this._startNode:this.getRTENodeByElement(this._endContainer),e&&(this._oldNativeRange=e);return new E(this._startContainer,this._endContainer,this._startOffset,this._endOffset,this._startNode,this._endNode,this._oldNativeRange)}clone(){return new E(this._startContainer,this._endContainer,this._startOffset,this._endOffset,this._startNode,this._endNode,this._oldNativeRange)}toNativeRange(){const t=this.getElementByRTENode(this._startNode),e=this._startNode===this._endNode?t:this.getElementByRTENode(this._endNode),s=new Range;return t&&e?(s.setStart(t,this._startOffset),s.setEnd(e,this._endOffset),this._startContainer=t,this._endContainer=e,this._oldNativeRange=s,s):this._oldNativeRange?this._oldNativeRange:void 0}getElementByRTENode(t){if(t){const e=h.getDOMByEntity(t);if(e)return t instanceof r?R(e,"vega-rich-text-image-editor"):e.firstChild}}getRTENodeByElement(t){if(t){const e=t.nodeType===Node.TEXT_NODE?t.parentElement:"VEGA-RICH-TEXT-IMAGE-EDITOR"===t.nodeName?t.querySelector("img"):t;return h.getEntityByDOM(e)}}}class j{constructor(t){this.range=t}clone(){const t=this.range.clone();return new j(t)}}var T=function(t,e,s,i){var n,o=arguments.length,h=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,s,h):n(e,s))||h);return o>3&&h&&Object.defineProperty(e,s,h),h};class y extends S{constructor(){super(1),this.currentRange=new E,this.handleSelectionWithDebounce=n(this.handleSelectionChange,y.SELECTION_CHANGE_DEBOUNCE_TIME,this),this.pendingRestoreSelectionNodes=[],this.doTask=async()=>{await Promise.resolve();const t=this.currentRange.toNativeRange();t&&this.setSelectionRange(t)}}connectedCallback(){this.registerSelectionRangeChangeObserver()}disconnectedCallback(){g.unregister(m.getSubject(this.host,w),this.selectionRangeChangeObserver)}componentDidLoad(){document.addEventListener("selectionchange",this.handleSelectionWithDebounce)}watchValueUpdate(){this.prepareRestoreSelectionState(),this.restoreSelection()}getCurrentRange(){return this.currentRange}getSelectedNodes(){return Array.from(this.selectionMap.values()).flat()}getSelectedBlocks(){return Array.from(this.selectionMap.keys())}setSelectionState(t){this.selectionState=t}enqueueSelectionRangeFutureState(t,e,s,i,n=!1){t instanceof a?this.internalCodeBlockSelectionController.enqueueSelectionRangeFutureState(t,e,n):(this.currentRange=this.currentRange.updateRTERange({startNode:t,endNode:s=s||t,startOffset:e,endOffset:i=i||0===i?i:e}),super.enqueueTheTaskIntoQueue(n))}setSelectionRange(t){const e=this.getSelection();e&&(e.removeAllRanges(),e.addRange(t),this.saveSelection())}getSelection(){const t=this.vegaRichTextEditorRenderer.getRichTextContentRef();return N.getSelection(t.shadowRoot)}saveSelection(){const t=this.getSelection();if(t&&t.rangeCount>0&&0===this.autoRunTaskQueue.queue.length&&!this.insertCompositionTextController.isComposing()){const e=t.getRangeAt(0),{startContainer:s,endContainer:i,startOffset:n,endOffset:o}=e;this.currentRange=this.currentRange.updateRTERange({startNode:s,endNode:i,startOffset:n,endOffset:o},e)}}restoreSelection(){if(this.selectionState){const{startNode:t,endNode:e,startOffset:s,endOffset:i}=this.selectionState.range;t instanceof c&&t===e&&0===t.text.length?this.enqueueSelectionRangeFutureState(t,f.length):this.enqueueSelectionRangeFutureState(t,s,e,i),this.selectionState=null}}handleSelectionChange(){if(this.disabled||this.sourceView)return;const t=this.getSelection();if(!t||0===t.rangeCount)return;this.clearSelectionMap(),this.saveSelection();const e=t.getRangeAt(0),s=[],i=t=>{if(e.intersectsNode(t)){if(t.nodeType===Node.TEXT_NODE){const e=h.getEntityByDOM(t.parentElement);if(e instanceof o)return void s.push(e)}if(t.nodeType===Node.ELEMENT_NODE){const i="VEGA-RICH-TEXT-IMAGE-EDITOR"===t.nodeName?t.querySelector("img"):t,n=h.getEntityByDOM(i);if(n instanceof u)return void(this.internalCodeBlockSelectionController.isCodeBlockSelected(n,e)&&s.push(n.nodes[0]));if(n instanceof o)return void s.push(n)}t.childNodes.forEach(i)}};i(e.commonAncestorContainer),s.forEach((t=>{this.selectionMap.has(t.parentBlock)?this.selectionMap.get(t.parentBlock).push(t):this.selectionMap.set(t.parentBlock,[t])})),this.getSelectedNodes().forEach((t=>t.apply(new d(e))))}clearSelectionMap(){this.getSelectedNodes().filter((t=>"CODE_BLOCK_NODE"!==t.type)).forEach((t=>{t.annotationMap.delete(l.SELECTION_RANGE)})),this.selectionMap=new Map}isAcceptableSelectionRangeChange(){return!0}registerSelectionRangeChangeObserver(){this.selectionRangeChangeObserver=new O(this.isAcceptableSelectionRangeChange.bind(this),(t=>{t.updateDirectly?this.enqueueSelectionRangeFutureState(t.node,t.offset):this.pendingRestoreSelectionNodes.push(t.node)})),g.register(m.getSubject(this.host,w),this.selectionRangeChangeObserver)}prepareRestoreSelectionState(){if(this.pendingRestoreSelectionNodes.length>0){const t=this.pendingRestoreSelectionNodes[0],e=this.pendingRestoreSelectionNodes.length>1?this.pendingRestoreSelectionNodes[this.pendingRestoreSelectionNodes.length-1]:t,{startOffset:s,endOffset:i,endContainer:n,startContainer:o}=this.currentRange;o&&h.getDOMByEntity(t)===o.parentElement&&n&&h.getDOMByEntity(e)===n.parentElement?(this.currentRange=this.currentRange.updateRTERange({startNode:t,endNode:e,startOffset:s,endOffset:i}),this.selectionState=new j(this.currentRange)):(this.currentRange=this.currentRange.updateRTERange({startNode:t,endNode:e,startOffset:0,endOffset:e.text.length}),this.selectionState=new j(this.currentRange)),this.pendingRestoreSelectionNodes=[]}}}y.SELECTION_CHANGE_DEBOUNCE_TIME=50,T([i()],y.prototype,"vegaRichTextEditorRenderer",void 0),T([i({writable:!0})],y.prototype,"selectionMap",void 0),T([i()],y.prototype,"host",void 0),T([i()],y.prototype,"value",void 0),T([i()],y.prototype,"disabled",void 0),T([i()],y.prototype,"sourceView",void 0),T([i()],y.prototype,"valueController",void 0),T([i()],y.prototype,"insertCompositionTextController",void 0),T([i()],y.prototype,"historyController",void 0),T([i()],y.prototype,"internalCodeBlockSelectionController",void 0),T([t("connectedCallback")],y.prototype,"connectedCallback",null),T([t("disconnectedCallback")],y.prototype,"disconnectedCallback",null),T([t("componentDidLoad")],y.prototype,"componentDidLoad",null),T([t("watchValueUpdate")],y.prototype,"watchValueUpdate",null);export{S as A,j as R,C as S,N as a,y as b}
@@ -1 +1 @@
1
- import{c as t,M as e,V as s}from"./p-6e1ab235.js";import{i,j as n}from"./p-804f71b3.js";import{v as r}from"./p-5f377954.js";import{F as h}from"./p-4d793cb0.js";var o=function(t,e,s,i){var n,r=arguments.length,h=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,s,i);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(h=(r<3?n(h):r>3?n(e,s,h):n(e,s))||h);return r>3&&h&&Object.defineProperty(e,s,h),h};class a extends s{constructor(t,e,s,i){if(super(),this.eventIds=[],this.useCapture=!1,this.isEventListenerAdded=!1,this.disabled=!1,this.preventChildEvent=t=>{const e=this.getHostElement();if(!this.shouldSkipEventPrevent())if("function"==typeof this.customPreventHandle)this.customPreventHandle(t);else{const s=t.composedPath();e===t.target&&e===s[0]||t.stopImmediatePropagation()}},this.eventIds=t,this.getHostElement=e,!0===s)this.useCapture=!0;else if(s){const{useCapture:t=!1,customPreventHandle:e}=s;this.useCapture=t,this.customPreventHandle=e}this.disabled=!0===i}setup(){this.addOrRemoveEventListener("add")}checkEventListenerStatus(){this.isEventListenerAdded||this.setup(),this.setSkipEventPreventFlag()}destroy(){this.addOrRemoveEventListener("remove")}setSkipEventPreventFlag(){h.isEnabled("VEGA_REACT.SKIP_NATIVE_EVENT_PREVENT_BY_DEFAULT")&&this.disabled&&this.host&&"react"===r.getVegaEnv().framework&&"native"===i.getSemantics(this.host).namespace&&this.getHostElement().setAttribute("data-vega-no-event-prevent","true")}addOrRemoveEventListener(t){const e=this.getHostElement();this.eventIds&&this.eventIds.length&&e&&(this.eventIds.filter((t=>this.shouldPrevent(t))).forEach((s=>{e["add"===t?"addEventListener":"removeEventListener"](this.getCurrentEventName(s),this.preventChildEvent,this.useCapture)})),this.isEventListenerAdded="add"===t)}getCurrentEventName(t){return t.getCurrentName(i.getSemantics(this.host))}shouldPrevent(t){const{namespace:e,jqueryDelegatedEvent:s}=i.getSemantics(this.host);return!("native"===e&&s&&n.isSupportDelegated(this.host,t))}shouldSkipEventPrevent(){const t=this.getHostElement();return t&&"true"===t.dataset.vegaNoEventPrevent}}o([t()],a.prototype,"host",void 0),o([e("connectedCallback")],a.prototype,"setup",null),o([e("componentDidLoad")],a.prototype,"checkEventListenerStatus",null),o([e("disconnectedCallback")],a.prototype,"destroy",null);export{a as C}
1
+ import{c as t,M as e,V as s}from"./p-6e1ab235.js";import{i,j as n}from"./p-020b04ed.js";import{v as r}from"./p-5f377954.js";import{F as h}from"./p-4d793cb0.js";var o=function(t,e,s,i){var n,r=arguments.length,h=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,s,i);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(h=(r<3?n(h):r>3?n(e,s,h):n(e,s))||h);return r>3&&h&&Object.defineProperty(e,s,h),h};class a extends s{constructor(t,e,s,i){if(super(),this.eventIds=[],this.useCapture=!1,this.isEventListenerAdded=!1,this.disabled=!1,this.preventChildEvent=t=>{const e=this.getHostElement();if(!this.shouldSkipEventPrevent())if("function"==typeof this.customPreventHandle)this.customPreventHandle(t);else{const s=t.composedPath();e===t.target&&e===s[0]||t.stopImmediatePropagation()}},this.eventIds=t,this.getHostElement=e,!0===s)this.useCapture=!0;else if(s){const{useCapture:t=!1,customPreventHandle:e}=s;this.useCapture=t,this.customPreventHandle=e}this.disabled=!0===i}setup(){this.addOrRemoveEventListener("add")}checkEventListenerStatus(){this.isEventListenerAdded||this.setup(),this.setSkipEventPreventFlag()}destroy(){this.addOrRemoveEventListener("remove")}setSkipEventPreventFlag(){h.isEnabled("VEGA_REACT.SKIP_NATIVE_EVENT_PREVENT_BY_DEFAULT")&&this.disabled&&this.host&&"react"===r.getVegaEnv().framework&&"native"===i.getSemantics(this.host).namespace&&this.getHostElement().setAttribute("data-vega-no-event-prevent","true")}addOrRemoveEventListener(t){const e=this.getHostElement();this.eventIds&&this.eventIds.length&&e&&(this.eventIds.filter((t=>this.shouldPrevent(t))).forEach((s=>{e["add"===t?"addEventListener":"removeEventListener"](this.getCurrentEventName(s),this.preventChildEvent,this.useCapture)})),this.isEventListenerAdded="add"===t)}getCurrentEventName(t){return t.getCurrentName(i.getSemantics(this.host))}shouldPrevent(t){const{namespace:e,jqueryDelegatedEvent:s}=i.getSemantics(this.host);return!("native"===e&&s&&n.isSupportDelegated(this.host,t))}shouldSkipEventPrevent(){const t=this.getHostElement();return t&&"true"===t.dataset.vegaNoEventPrevent}}o([t()],a.prototype,"host",void 0),o([e("connectedCallback")],a.prototype,"setup",null),o([e("componentDidLoad")],a.prototype,"checkEventListenerStatus",null),o([e("disconnectedCallback")],a.prototype,"destroy",null);export{a as C}
@@ -0,0 +1 @@
1
+ import{h as e,F as t,r as i,c as o,H as r,g as n}from"./p-21d26bb4.js";import{g as s,s as a}from"./p-9b797118.js";import{c as l,M as d,V as h,L as c,I as p}from"./p-6e1ab235.js";import{m as v,s as u}from"./p-6bd5c49b.js";import{V as f,I as g}from"./p-4387d550.js";import{f as m,k as w,l as x}from"./p-bf953152.js";import{N as b,O as y}from"./p-b1f65b13.js";import{c as S}from"./p-86194314.js";import{D as R}from"./p-66759f4e.js";import{f as j,d as C,n as I,o as k,b as O,p as D,l as T,q as M,r as E,a as L}from"./p-e1a2a701.js";import{K as z}from"./p-d7937711.js";import{E as H}from"./p-3c20ae84.js";import{r as K}from"./p-77e64f26.js";import{p as A,g as V,n as N,m as W,i as $}from"./p-ce6b62c4.js";import{i as _}from"./p-d27ae9ff.js";import{c as P}from"./p-58f8928a.js";import{M as B}from"./p-987fbbd0.js";import{C as U}from"./p-2d0d575f.js";import{c as F}from"./p-86782109.js";import{C as q}from"./p-5064a804.js";import{S as G,m as Y}from"./p-5773a9a3.js";import{T as X}from"./p-d64b20c2.js";import{C as J}from"./p-419697c6.js";import{C as Q}from"./p-af7a3154.js";import{S as Z}from"./p-4e8fb53a.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-331a62d5.js";import"./p-56a0b13d.js";import"./p-1e194737.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-c0291e2e.js";import"./p-50677c8e.js";import"./p-112455b1.js";import"./p-020b04ed.js";import"./p-262ec334.js";import"./p-6ea42854.js";import"./p-0c667d6a.js";import"./p-5f377954.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-cc63e827.js";import"./p-0fd6c35b.js";import"./p-4ab3df00.js";import"./p-268aea63.js";import"./p-01593f9d.js";import"./p-02841589.js";var ee=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class te extends h{componentDidRender(){this.setVirtualContainer(),this.appendItemsToContentBox(),this.appendDropdownToContentBox()}getDropdownRef(){return this.dropdownRef}getDropdownContentBoxRef(){return this.dropdownContentBoxRef}getVirtualContainerRef(){return this.virtualContainerRef}getNextActiveItem(e){const t=this.getAllItems(),i=this.getCurrentActiveItem();if(i){const o=t.findIndex((e=>e===i)),r="ArrowDown"===e?o+1:o-1,n=t[r];return n?n.disabled?this.findNextCallFocusItem(t,r,e):n:null}return t[0]}render(){return e(t,null,this.renderContentSlot(),this.renderDropdown())}renderContentSlot(){return this.renderModeController.isSourceRenderMode()?e("slot",null):e(t,null,e("slot",{name:"dropdown-content"}),e("slot",null))}renderDropdown(){return e("vega-dropdown-content-box",{ref:e=>this.dropdownContentBoxRef=e,style:{maxHeight:`${this.maxHeight}px`},"data-parent-ref":this.host,"data-vega-no-event-prevent":this.host&&"true"===this.host.dataset.vegaNoEventPrevent?"true":"false"},e("div",{ref:e=>this.dropdownRef=e,class:"vega-dropdown"},e("div",{class:"vega-dropdown-actions"},this.resetRenderer.render(),this.searchRenderer.render(),this.createRenderer.render()),e("div",null,e("div",{class:"vega-dropdown-container"},this.renderModeController.isSourceRenderMode()?this.listRenderer.renderBySource():this.listRenderer.renderBySlot()))))}setVirtualContainer(){this.virtualContainerRef=this.dropdownRef.querySelector(".vega-dropdown-container")}appendItemsToContentBox(){if(!this.renderModeController.isSourceRenderMode()){const e=this.host.querySelector("[slot='items']");!this.dropdownContentBoxRef.contains(e)&&e&&this.dropdownContentBoxRef.append(e)}}appendDropdownToContentBox(){var e,t;(null===(e=this.dropdownContentBoxRef.shadowRoot)||void 0===e?void 0:e.contains(this.dropdownRef))||null===(t=this.dropdownContentBoxRef.shadowRoot)||void 0===t||t.append(this.dropdownRef)}getAllItems(){const e=this.dropdownRef.querySelector("vega-virtual-scroll");return Array.from((e?e.shadowRoot:this.dropdownRef).querySelectorAll("vega-dropdown-item"))}getCurrentActiveItem(){return m(s(this.dropdownContentBoxRef.shadowRoot),"vega-dropdown-item")}findNextCallFocusItem(e,t,i){const o="ArrowDown"===i?t+1:t-1,r=e[o];return r?r.disabled?this.findNextCallFocusItem(e,o,i):r:null}}ee([l()],te.prototype,"host",void 0),ee([l()],te.prototype,"maxHeight",void 0),ee([l()],te.prototype,"searchable",void 0),ee([l()],te.prototype,"searchRenderer",void 0),ee([l()],te.prototype,"createRenderer",void 0),ee([l()],te.prototype,"listRenderer",void 0),ee([l()],te.prototype,"renderModeController",void 0),ee([l()],te.prototype,"resetRenderer",void 0),ee([d("componentDidRender")],te.prototype,"componentDidRender",null);var ie=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class oe extends h{componentWillLoad(){this.handleSource()}watchSource(){this.handleSource()}setRenderSource(){this.renderModeController.isSourceRenderMode()&&(this.sourceForRender=this.searchController.search(this.source))}handleSource(){this.validSource(),this.setRenderSource()}validSource(){this.source=b(this.source,y)?this.source:[]}}ie([l({writable:!0})],oe.prototype,"source",void 0),ie([l({writable:!0})],oe.prototype,"sourceForRender",void 0),ie([l()],oe.prototype,"searchController",void 0),ie([l()],oe.prototype,"renderModeController",void 0),ie([d("componentWillLoad")],oe.prototype,"componentWillLoad",null),ie([d("watchSource")],oe.prototype,"watchSource",null);var re=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class ne extends h{constructor(){super(...arguments),this.onItemAdd=()=>{this.createEventEmitter.emit(this.searchString),this.appenderController.hide()}}render(){return this.searchString&&this.dynamicOption&&!this.childrenController.isLabelExist(this.searchString)&&e("fragment",null,e("div",{class:"vega-dropdown-add-item",onClick:this.onItemAdd,tabIndex:0,role:"button","aria-label":`Add ${this.searchString}`,onKeyDown:S()},e("div",null,e("vega-icon",{icon:"plus-sign"})),e("span",{class:"v-break-all"},`Add "${this.searchString}"`)),e("div",{class:"vega-dropdown-divider"}))}}re([l()],ne.prototype,"searchString",void 0),re([l()],ne.prototype,"dynamicOption",void 0),re([l()],ne.prototype,"sourceForRender",void 0),re([l()],ne.prototype,"appenderController",void 0),re([l()],ne.prototype,"childrenController",void 0),re([l()],ne.prototype,"renderModeController",void 0),re([l()],ne.prototype,"createEventEmitter",void 0);var se=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class ae extends h{constructor(){super(...arguments),this.defaultMaxHeightOfItemsContainer=400}getVirtualScrollRef(){return this.virtualScrollRef}getTemplateContainerRef(){return this.templateContainerRef}renderBySource(){return e(t,null,this.renderLoading(),this.renderDropdownListBySource())}renderBySlot(){return e(t,null,this.renderLoading(),this.renderDropdownListBySlot())}renderLoading(){return e("div",{class:{"vega-dropdown-loading":!0,"v-hidden":!this.isLoading}},e("vega-flex",{gap:"size-8",direction:"row"},e("vega-loading-indicator",{size:"small"}),e("span",null,"Loading")))}renderDropdownListBySource(){return e(t,null,e("div",{class:{"vega-dropdown-empty-list":!0,"v-hidden":this.sourceForRender.length>0}},this.translationSlimmer.t(this.searchString?"No results found":"No options")),e("ul",{role:"menu","aria-label":"dropdown-ul",class:{"v-hidden":0===this.sourceForRender.length}},e("vega-virtual-scroll",{source:this.sourceForRender,renderItem:(e,t,i)=>e.children?this.groupLevelRenderer.render(e,t,i):this.itemLevelRenderer.render(e,i),viewportMaxHeight:this.defaultMaxHeightOfItemsContainer,ref:e=>this.virtualScrollRef=e,isLoading:this.isLazyLoading})))}renderDropdownListBySlot(){return e("ul",{role:"menu","aria-label":"dropdown-ul",class:{[`vega-dropdown-item-display-${this.itemDisplayRule}`]:!0,"v-hidden":this.isLoading},ref:e=>this.templateContainerRef=e,onScroll:this.scrollableController.onScroll},e("slot",{name:"items"}))}}se([l()],ae.prototype,"host",void 0),se([l()],ae.prototype,"isLoading",void 0),se([l()],ae.prototype,"searchString",void 0),se([l()],ae.prototype,"itemDisplayRule",void 0),se([l()],ae.prototype,"sourceForRender",void 0),se([l()],ae.prototype,"itemLevelRenderer",void 0),se([l()],ae.prototype,"groupLevelRenderer",void 0),se([l()],ae.prototype,"isLazyLoading",void 0),se([l()],ae.prototype,"isDropdownShow",void 0),se([l()],ae.prototype,"renderModeController",void 0),se([l()],ae.prototype,"scrollableController",void 0),se([l()],ae.prototype,"translationSlimmer",void 0);var le=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class de extends h{render(t,i){return this.remoteInvocationController.callRemoteItemRender(t,i)||e("vega-dropdown-item",Object.assign({},t,{itemKey:t.key,height:i,prefixIcon:t.prefixIcon}))}}le([l()],de.prototype,"host",void 0),le([l()],de.prototype,"selectType",void 0),le([l()],de.prototype,"caseSensitive",void 0),le([l()],de.prototype,"searchString",void 0),le([l()],de.prototype,"selectedController",void 0),le([l()],de.prototype,"sourceController",void 0),le([l()],de.prototype,"remoteInvocationController",void 0);var he=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class ce extends h{constructor(){super(...arguments),this.clear=()=>{this.searchString=null,this.searchInputRef&&(this.searchInputRef.value="")},this.onInputSearch=e=>{e&&(this.searchInputRef=e),R.addUniqueObserverToNode(e,j,(e=>{this.search(e.detail,"input")}))},this.search=(e,t)=>{this.searchTriggerBy&&this.searchTriggerBy!==t||(this.searchString=e,this.renderModeController.isSourceRenderMode()?this.useDefaultFilter?(this.sourceController.setRenderSource(),this.focus()):this.isDropdownShow&&(this.searchEventEmitter.emit(e),this.searchTriggerEventEmitter.emit({trigger:t,value:e})):(this.searchEventEmitter.emit(e),this.searchTriggerEventEmitter.emit({trigger:t,value:e})))}}userSearch(e){this.search(e,"input")}focus(){this.searchInputRef&&this.searchInputRef.shadowRoot.querySelector("input").focus()}render(){return this.searchable&&e(t,null,e("div",{class:"vega-dropdown-search"},e("vega-input",{"prefix-icon":"search",size:"small",autoValidation:!1,ref:this.onInputSearch,onKeyDown:e=>{"Enter"===e.code&&this.search(this.searchInputRef.value,"enter")}})),e("vega-divider",{margin:{y:"size-4"}}))}}he([l()],ce.prototype,"searchable",void 0),he([l({writable:!0})],ce.prototype,"searchString",void 0),he([l()],ce.prototype,"source",void 0),he([l()],ce.prototype,"useDefaultFilter",void 0),he([l()],ce.prototype,"searchEventEmitter",void 0),he([l()],ce.prototype,"searchTriggerEventEmitter",void 0),he([l()],ce.prototype,"isDropdownShow",void 0),he([l()],ce.prototype,"sourceController",void 0),he([l()],ce.prototype,"renderModeController",void 0),he([l()],ce.prototype,"searchTriggerBy",void 0),he([d("search")],ce.prototype,"userSearch",null);var pe=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class ve extends z{constructor(){super((e=>{const t=this.renderer.getDropdownRef(),i=this.renderer.getVirtualContainerRef();return[{keyCode:"Tab",activeElementInScope:[e.host],callback:e.showDropdownIfHover},{keyCode:"Escape",activeElementInScope:[e.host,t,i],callback:()=>e.appenderController.hide()},{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[e.host,t],callback:t=>e.controlDirectionByKeyboard(t.code)},{keyCode:"Tab",activeElementOutScope:[e.host,t,i],callback:()=>e.isDropdownShow&&e.appenderController.hide()}]})),this.showDropdownIfHover=async()=>{"hover"===this.trigger&&this.appenderController.show()},this.controlDirectionByKeyboard=e=>{var t;null===(t=this.renderer.getNextActiveItem(e))||void 0===t||t.shadowRoot.querySelector("li").focus()}}}pe([l()],ve.prototype,"host",void 0),pe([l()],ve.prototype,"trigger",void 0),pe([l()],ve.prototype,"isDropdownShow",void 0),pe([l()],ve.prototype,"renderer",void 0),pe([l()],ve.prototype,"appenderController",void 0),pe([l()],ve.prototype,"listRenderer",void 0);var ue=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class fe extends H{constructor(){super((()=>this.generateShowConfigFactory()),(()=>this.trigger))}connectedCallback(){this.registerRemoteMethod()}disconnectedCallback(){K.unRegister(C.getSubject(this.host,A))}async watchIsDropdownShow(){this.isDropdownShow?this.showEventEmitter.emit():(this.searchRenderer.clear(),this.hideEventEmitter.emit())}userShow(){this.isDropdownShow||this.show()}userHide(){this.isDropdownShow&&this.hide()}generateShowConfigFactory(){return{target:this.target||this.host,appendableElement:this.renderer.getDropdownContentBoxRef(),positionRelativeTo:this.positionRelativeTo,matchTargetWidth:this.matchTargetWidth,matchContainerHeight:this.matchContainerHeight,size:this.size,minWidth:this.minWidth,maxWidth:this.maxWidth,translocation:this.translocation,maxHeight:this.maxHeight,placement:this.placement,alignment:this.alignment,isScreenPosition:this.isScreenPosition}}registerRemoteMethod(){K.register(C.getSubject(this.host,A),(e=>{this.target=e,super.updateShowConfigFactory(this.generateShowConfigFactory.bind(this))}))}}ue([l()],fe.prototype,"host",void 0),ue([l()],fe.prototype,"trigger",void 0),ue([l({writable:!0})],fe.prototype,"isDropdownShow",void 0),ue([l()],fe.prototype,"positionRelativeTo",void 0),ue([l()],fe.prototype,"matchTargetWidth",void 0),ue([l()],fe.prototype,"matchContainerHeight",void 0),ue([l()],fe.prototype,"size",void 0),ue([l()],fe.prototype,"minWidth",void 0),ue([l()],fe.prototype,"maxWidth",void 0),ue([l()],fe.prototype,"translocation",void 0),ue([l()],fe.prototype,"maxHeight",void 0),ue([l()],fe.prototype,"placement",void 0),ue([l()],fe.prototype,"alignment",void 0),ue([l()],fe.prototype,"renderer",void 0),ue([l()],fe.prototype,"searchRenderer",void 0),ue([l()],fe.prototype,"showEventEmitter",void 0),ue([l()],fe.prototype,"hideEventEmitter",void 0),ue([l()],fe.prototype,"isScreenPosition",void 0),ue([d("connectedCallback")],fe.prototype,"connectedCallback",null),ue([d("disconnectedCallback")],fe.prototype,"disconnectedCallback",null),ue([d("watchIsDropdownShow")],fe.prototype,"watchIsDropdownShow",null),ue([d("show")],fe.prototype,"userShow",null),ue([d("hide")],fe.prototype,"userHide",null);var ge=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class me extends h{render(t,i,o){return e("vega-dropdown-group",{label:t.label,key:t.key,divide:i<this.sourceForRender.length-1},t.children.map((e=>this.itemLevelRenderer.render(e,o))))}}ge([l()],me.prototype,"sourceForRender",void 0),ge([l()],me.prototype,"itemLevelRenderer",void 0);var we=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class xe extends h{search(e){return this.canSearch()?this.searchSource(e,[]):e}canSearch(){return this.useDefaultFilter&&!!this.searchString}searchSource(e,t){return this.remoteInvocationController.callRemoteSearch(e,this.searchString,this.caseSensitive)||(e.forEach((e=>{if(e.children){const i=this.searchSource(e.children,[]);i.length>0&&t.push(Object.assign(Object.assign({},e),{children:i}))}else this.isLabelIncludeSearchString(e.label)&&t.push(Object.assign(Object.assign({},e),{label:this.replaceLabelBySearchString(e.label)}))})),t)}isLabelIncludeSearchString(e){return this.caseSensitive?e.includes(this.searchString):e.toLowerCase().includes(this.searchString.toLowerCase())}replaceLabelBySearchString(e){return e.replace(new RegExp(`(${this.searchString})`,"g"+(this.caseSensitive?"":"i")),"<b>$1</b>")}}we([l()],xe.prototype,"host",void 0),we([l()],xe.prototype,"searchString",void 0),we([l()],xe.prototype,"caseSensitive",void 0),we([l()],xe.prototype,"useDefaultFilter",void 0),we([l()],xe.prototype,"searchable",void 0),we([l()],xe.prototype,"remoteInvocationController",void 0);var be=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class ye extends h{componentWillLoad(){this.checkSelectedSourceKey(this.selectedSourceKey)}clearSelection(){this.selectedSourceKey="multiple"===this.selectType?[]:""}getSelection(){return this.selectedSourceKey}watchSelectedRowKeySet(e){this.checkSelectedSourceKey(e)}watchSelectType(){this.checkSelectedSourceKey(this.selectedSourceKey)}watchSelectedSourceKey(e,t){Array.isArray(t)&&Array.isArray(e)&&_(t,e)||this.checkSelectedSourceKey(e)}watchSource(){this.checkSelectedSourceKey(this.selectedSourceKey)}isAcceptableItemSelectionObserver(e){return"VEGA-DROPDOWN-ITEM"===e.host.tagName&&this.isCurrentDropdown(e.host)}select(e){"multiple"===this.selectType?this.selectedSourceKey=this.selectedSourceKey.includes(e)?[...this.selectedSourceKey.filter((t=>t!==e))]:[...this.selectedSourceKey,e]:"single"===this.selectType?(this.selectedSourceKey=e,this.appenderController.hide()):this.appenderController.hide(),this.dropdownClickEventEmitter.emit(e)}reset(){this.selectedSourceKey="multiple"===this.selectType?[]:"","multiple"!==this.selectType&&this.appenderController.hide(),this.resetEventEmitter.emit()}isCurrentDropdown(e){const t=m(e,"vega-dropdown-content-box"),i="VEGA-DROPDOWN"===e.parentElement.tagName||!!m(e,"vega-dropdown");return this.host===t["data-parent-ref"]&&!i}checkSelectedSourceKey(e){if(this.renderModeController.isSourceRenderMode()){let t;"string"==typeof e&&"single"===this.selectType&&this.childrenController.isKeyExist(e)?t=e:Array.isArray(e)&&"multiple"===this.selectType?t=this.checkMultipleSelectedKeys(e):(c.warn(`Invalid selectedSourceKey ${e} for ${this.selectType} mode`),t="multiple"===this.selectType?[]:""),this.selectedSourceKey=t}else this.selectedSourceKey=e}checkMultipleSelectedKeys(e){const t=[],i=e.filter((e=>{const i=this.childrenController.isKeyExist(e);return i||t.push(e),i}));return t.length>0&&c.warn(`Invalid selectedSourceKey ${e} for ${this.selectType} mode`),i}}be([l()],ye.prototype,"host",void 0),be([l()],ye.prototype,"selectType",void 0),be([l()],ye.prototype,"source",void 0),be([l({writable:!0})],ye.prototype,"selectedSourceKey",void 0),be([l()],ye.prototype,"vegaDropdownClick",void 0),be([l()],ye.prototype,"appenderController",void 0),be([l()],ye.prototype,"childrenController",void 0),be([l()],ye.prototype,"renderModeController",void 0),be([l()],ye.prototype,"dropdownClickEventEmitter",void 0),be([l()],ye.prototype,"resetEventEmitter",void 0),be([d("componentWillLoad")],ye.prototype,"componentWillLoad",null),be([d("clearSelection")],ye.prototype,"clearSelection",null),be([d("getSelection")],ye.prototype,"getSelection",null),be([d("setSelection")],ye.prototype,"watchSelectedRowKeySet",null),be([d("watchSelectType")],ye.prototype,"watchSelectType",null),be([d("watchSelectedSourceKey")],ye.prototype,"watchSelectedSourceKey",null),be([d("watchSource")],ye.prototype,"watchSource",null);var Se=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class Re extends h{constructor(){super(...arguments),this.renderMode="SOURCE"}connectedCallback(){this.setRenderMode()}isSourceRenderMode(){return"SOURCE"===this.renderMode}setRenderMode(){const e=this.renderer.getDropdownContentBoxRef()||this.host;this.renderMode=e.querySelector("[slot=items]")?"SLOT":"SOURCE"}}Se([l()],Re.prototype,"host",void 0),Se([l()],Re.prototype,"renderer",void 0),Se([d("connectedCallback")],Re.prototype,"connectedCallback",null);var je=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class Ce extends h{constructor(){super(...arguments),this.mutationObserver=new B({target:()=>this.renderer.getDropdownContentBoxRef(),options:{childList:!0,subtree:!0},callback:()=>this.syncUpDropdownCurrentData()}),this.labelSet=new Set,this.keySet=new Set,this.collectKeyAndLabelFromSlot=()=>{const e=this.renderer.getDropdownContentBoxRef()||this.host;Array.from(e.querySelectorAll("vega-dropdown-item")).forEach((e=>{e.label&&this.labelSet.add(e.label),e.itemKey&&this.keySet.add(e.itemKey)}))}}disconnectedCallback(){}componentWillLoad(){this.syncUpDropdownCurrentData()}componentDidLoad(){}watchSource(){this.renderModeController.isSourceRenderMode()&&this.syncUpDropdownCurrentData()}isLabelExist(e){return this.labelSet.has(e)}isKeyExist(e){return this.keySet.has(e)}syncUpDropdownCurrentData(){this.clearDropdownCurrentData(),this.renderModeController.isSourceRenderMode()?this.collectKeyAndLabelFromSource(this.source):(this.collectKeyAndLabelFromSlot(),this.notifyTemplateItemsChange())}collectKeyAndLabelFromSource(e){e.forEach((e=>{e.children?this.collectKeyAndLabelFromSource(e.children):(this.labelSet.add(e.label),this.keySet.add(e.key))}))}clearDropdownCurrentData(){this.keySet.clear(),this.labelSet.clear()}notifyTemplateItemsChange(){const e=this.renderer.getDropdownContentBoxRef()||this.host;U.notify(C.getSubject(this.host,V),e.querySelectorAll("vega-dropdown-item"))}}je([l()],Ce.prototype,"host",void 0),je([l()],Ce.prototype,"source",void 0),je([l()],Ce.prototype,"sourceController",void 0),je([l()],Ce.prototype,"renderModeController",void 0),je([l()],Ce.prototype,"listRenderer",void 0),je([l()],Ce.prototype,"renderer",void 0),je([l()],Ce.prototype,"selectedController",void 0),je([p()],Ce.prototype,"mutationObserver",void 0),je([d("disconnectedCallback")],Ce.prototype,"disconnectedCallback",null),je([d("componentWillLoad")],Ce.prototype,"componentWillLoad",null),je([d("componentDidLoad")],Ce.prototype,"componentDidLoad",null),je([d("watchSource")],Ce.prototype,"watchSource",null);const Ie=[{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the dropdown",payloadValue:e=>0===e.source.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the dropdown",payloadValue:e=>e.source.length>0}];var ke=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class Oe extends h{constructor(){super(...arguments),this.onScroll=()=>{!this.renderModeController.isSourceRenderMode()&&U.notify(G,{host:this.renderer.getDropdownContentBoxRef()})}}async watchIsDropdownShow(){this.isDropdownShow&&(this.adjustListContainerMaxHeight(),await this.scrollToSelectedIndex())}watchSelectedSourceKey(e,t){this.resettable&&(e&&e.length>0&&(!t||0===t.length)||(!e||0===e.length)&&t&&t.length>0)&&this.adjustListContainerMaxHeight()}async scrollToSelectedIndex(){this.renderModeController.isSourceRenderMode()?await this.scrollToVirtualIndex():this.scrollToTemplateIndex()}async scrollToVirtualIndex(){const e=this.sourceForRender.findIndex((e=>e.key===this.getSelectedKey()));e>=0&&await this.listRenderer.getVirtualScrollRef().scrollToIndex(e)}scrollToTemplateIndex(){const e=this.getSelectedKey();if(e){const t=this.renderer.getDropdownContentBoxRef(),i=t.querySelector(`vega-dropdown-item[item-key='${e}']`),o=t.shadowRoot.querySelector("ul"),r=o.getBoundingClientRect(),n=i.getBoundingClientRect();o.scrollTop=n.top-r.top+o.scrollTop}}getSelectedKey(){return"multiple"===this.selectType?this.selectedSourceKey[0]:this.selectedSourceKey}adjustListContainerMaxHeight(){const e=this.renderer.getDropdownContentBoxRef();if(!e)return;const t=w(e.style.maxHeight),i=this.resettable&&this.selectedSourceKey.length>0?Oe.actionButtonContentHeight:0,o=t-(this.searchable?Oe.actionButtonContentHeight:0)-(e.classList.contains("vega-placement-top")?0:Oe.dropdownLayoutSpaceHeight)-i;o<=40?(this.setItemsContainerMaxHeight(40),c.error("There have no space on the bottom to display dropdown, if you want to adjust position, you should make 'match-container-height' as false.")):this.setItemsContainerMaxHeight(o)}setItemsContainerMaxHeight(e){if(this.renderModeController.isSourceRenderMode())this.listRenderer.getVirtualScrollRef().viewportMaxHeight=e;else{const t=this.listRenderer.getTemplateContainerRef();t.style.overflowY="auto",t.style.maxHeight=`${e}px`}}}Oe.actionButtonContentHeight=49,Oe.dropdownLayoutSpaceHeight=10,ke([l()],Oe.prototype,"isDropdownShow",void 0),ke([l()],Oe.prototype,"renderModeController",void 0),ke([l()],Oe.prototype,"sourceForRender",void 0),ke([l()],Oe.prototype,"selectType",void 0),ke([l()],Oe.prototype,"selectedSourceKey",void 0),ke([l()],Oe.prototype,"searchable",void 0),ke([l()],Oe.prototype,"listRenderer",void 0),ke([l()],Oe.prototype,"renderer",void 0),ke([l()],Oe.prototype,"resettable",void 0),ke([d("watchIsDropdownShow")],Oe.prototype,"watchIsDropdownShow",null),ke([d("watchSelectedSourceKey")],Oe.prototype,"watchSelectedSourceKey",null);var De=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class Te extends h{connectedCallback(){this.remotePhoneNumberSearchSubject=C.getSubjectFromParentNodeByEventId(this.host,N),this.remotePhoneNumberItemRenderSubject=C.getSubjectFromParentNodeByEventId(this.host,W)}callRemoteSearch(...e){if(this.remotePhoneNumberSearchSubject){const t=K.call(this.remotePhoneNumberSearchSubject,...e);if(t)return t}return null}callRemoteItemRender(...e){if(this.remotePhoneNumberItemRenderSubject){const t=K.call(this.remotePhoneNumberItemRenderSubject,...e);if(t)return t}return null}}De([l()],Te.prototype,"host",void 0),De([d("connectedCallback")],Te.prototype,"connectedCallback",null);var Me=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class Ee extends h{render(){return this.resettable&&this.selectedSourceKey.length>0&&e(t,null,e("vega-font",{variant:"font-field-value",color:"text-link",class:"vega-dropdown-reset",onClick:()=>this.selectedController.reset(),tabIndex:0,role:"button","aria-label":"Reset",onKeyDown:S()},this.translationSlimmer.t("Reset Selection")),e("vega-divider",{margin:{y:"size-4"}}))}}Me([l()],Ee.prototype,"resettable",void 0),Me([l()],Ee.prototype,"translationSlimmer",void 0),Me([l()],Ee.prototype,"selectedController",void 0),Me([l()],Ee.prototype,"selectedSourceKey",void 0);var Le=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const ze=class{constructor(e){i(this,e),this.vegaDropdownClick=o(this,"vegaDropdownClick",7),this.dropdownClick=o(this,"dropdownClick",7),this.vegaShow=o(this,"vegaShow",7),this.dropdownShow=o(this,"dropdownShow",7),this.vegaHide=o(this,"vegaHide",7),this.dropdownHide=o(this,"dropdownHide",7),this.vegaCreate=o(this,"vegaCreate",7),this.create=o(this,"create",7),this.vegaSearch=o(this,"vegaSearch",7),this.dropdownSearch=o(this,"dropdownSearch",7),this.vegaReset=o(this,"vegaReset",7),this.reset=o(this,"reset",7),this.vegaSearchTrigger=o(this,"vegaSearchTrigger",7),this.searchTrigger=o(this,"searchTrigger",7),this.globalSlimmers={},this.translationSlimmer=new X,this.renderer=new te,this.sourceController=new oe,this.searchRenderer=new ce,this.createRenderer=new ne,this.listRenderer=new ae,this.resetRenderer=new Ee,this.groupLevelRenderer=new me,this.itemLevelRenderer=new de,this.keyboardController=new ve,this.appenderController=new fe,this.searchController=new xe,this.childrenController=new Ce,this.selectedController=new ye,this.renderModeController=new Re,this.scrollableController=new Oe,this.remoteInvocationController=new Te,this.selectTypeNotifySlimmer=P(ze,"selectType","watchSelectType"),this.selectedSourceKeyNotifySlimmer=P(ze,"selectedSourceKey","watchSelectedSourceKey"),this.prefixIconSlotNotifySlimmer=P(ze,"prefixIconSlot","watchPrefixIconSlot"),this.itemClickObserver=new q(Y,(e=>this.selectedController.select(e.detail.itemKey)),this.selectedController.isAcceptableItemSelectionObserver.bind(this.selectedController)),this.showEventEmitter=F(ze,I),this.hideEventEmitter=F(ze,k),this.dropdownClickEventEmitter=F(ze,O),this.resetEventEmitter=F(ze,D),this.createEventEmitter=F(ze,T),this.searchEventEmitter=F(ze,M),this.searchTriggerEventEmitter=F(ze,E),this.itemDisplayRuleNotifySlimmer=P(ze,"itemDisplayRule","watchItemDisplayRule"),this.vegaComponentUsageRuntimeMetricsSlimmer=new f(Ie),this.searchString=null,this.isDropdownShow=!1,this.trigger="hover",this.translocation={X:0,Y:8},this.source=[],this.selectType="none",this.selectedSourceKey="multiple"===this.selectType?[]:"",this.prefixIconSlot=!1,this.maxHeight=400,this.searchable=!1,this.matchTargetWidth=!1,this.itemDisplayRule="newline",this.matchContainerHeight=!1,this.caseSensitive=!1,this.dynamicOption=!1,this.useDefaultFilter=!0,this.isLoading=!1,this.placement=["bottom","top"],this.alignment="start",this.isLazyLoading=!1,this.isScreenPosition=!1,this.resettable=!1}watchIsDropdownShow(){}watchSource(){}watchSelectType(){}watchSelectedSourceKey(){}watchPrefixIconSlot(){}watchItemDisplayRule(){}async show(){}async hide(){}async search(e){}async clearSelection(){}async getSelection(){return v()}async setSelection(e){}render(){return u(e("slot",null)),a(e(r,null,this.renderer.render()),this.host)}get host(){return n(this)}static get watchers(){return{isDropdownShow:["watchIsDropdownShow"],source:["watchSource","watchItemDisplayRule"],selectType:["watchSelectType"],selectedSourceKey:["watchSelectedSourceKey"],prefixIconSlot:["watchPrefixIconSlot"]}}};Le([g()],ze.prototype,"globalSlimmers",void 0),Le([p()],ze.prototype,"translationSlimmer",void 0),Le([p()],ze.prototype,"renderer",void 0),Le([p()],ze.prototype,"sourceController",void 0),Le([p()],ze.prototype,"searchRenderer",void 0),Le([p()],ze.prototype,"createRenderer",void 0),Le([p()],ze.prototype,"listRenderer",void 0),Le([p()],ze.prototype,"resetRenderer",void 0),Le([p()],ze.prototype,"groupLevelRenderer",void 0),Le([p()],ze.prototype,"itemLevelRenderer",void 0),Le([p()],ze.prototype,"keyboardController",void 0),Le([p()],ze.prototype,"appenderController",void 0),Le([p()],ze.prototype,"searchController",void 0),Le([p()],ze.prototype,"childrenController",void 0),Le([p()],ze.prototype,"selectedController",void 0),Le([p()],ze.prototype,"renderModeController",void 0),Le([p()],ze.prototype,"scrollableController",void 0),Le([p()],ze.prototype,"remoteInvocationController",void 0),Le([p()],ze.prototype,"selectTypeNotifySlimmer",void 0),Le([p()],ze.prototype,"selectedSourceKeyNotifySlimmer",void 0),Le([p()],ze.prototype,"prefixIconSlotNotifySlimmer",void 0),Le([p()],ze.prototype,"itemClickObserver",void 0),Le([p()],ze.prototype,"showEventEmitter",void 0),Le([p()],ze.prototype,"hideEventEmitter",void 0),Le([p()],ze.prototype,"dropdownClickEventEmitter",void 0),Le([p()],ze.prototype,"resetEventEmitter",void 0),Le([p()],ze.prototype,"createEventEmitter",void 0),Le([p()],ze.prototype,"searchEventEmitter",void 0),Le([p()],ze.prototype,"searchTriggerEventEmitter",void 0),Le([p()],ze.prototype,"itemDisplayRuleNotifySlimmer",void 0),Le([p()],ze.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ze.style=":host{display:inline-block}";var He=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const Ke=class{constructor(e){i(this,e),this.globalSlimmers={},this.componentGlobalStyleSlimmer=new Q("vega-dropdown-content-box vega-dropdown{display:block}"),this.eventPrevent=new J([L],(()=>this.host),void 0,!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new f}render(){return a(e(r,null,e("slot",null)),this.host)}get host(){return n(this)}};He([g()],Ke.prototype,"globalSlimmers",void 0),He([p()],Ke.prototype,"componentGlobalStyleSlimmer",void 0),He([p()],Ke.prototype,"eventPrevent",void 0),He([p()],Ke.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ke.style=':host{display:block;position:absolute}:host .vega-dropdown{box-shadow:var(--v-shadow-dropdown-menu, 0px 2px 4px -2px rgba(0, 0, 0, 0.1), 0px 4px 6px -1px rgba(0, 0, 0, 0.1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding-top:4px;padding-bottom:4px;text-align:left;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;overflow:hidden;box-sizing:border-box;width:inherit}:host(.vega-force-hidden){display:none}:host .vega-dropdown .vega-dropdown-container{overflow-y:auto;position:relative;min-width:100px;min-height:40px}:host .vega-dropdown .vega-dropdown-container>ul{padding-left:0px;margin:0px;list-style-type:none}:host .vega-dropdown .vega-dropdown-search{padding-top:8px;padding-bottom:8px;padding-left:16px;padding-right:16px;margin-left:4px;margin-right:4px}:host .vega-dropdown .vega-dropdown-search vega-input{display:block}:host .vega-dropdown .vega-dropdown-search vega-input::part(input-container){padding:0px;border-width:0px;--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host .vega-dropdown .vega-dropdown-search vega-input::part(prefix-icon-container){color:rgba(var(--v-text-secondary, 107, 116, 125, 1));width:16px;height:16px;padding-top:0px}:host .vega-dropdown .vega-dropdown-search vega-input::part(input-container):focus-within{outline:none}:host .vega-dropdown .vega-dropdown-search vega-input::part(input-container):hover{border-width:0px}:host .vega-dropdown .vega-dropdown-loading{padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}:host .v-hidden{display:none}:host .vega-dropdown .vega-dropdown-loading>vega-flex>span{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))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-dropdown .vega-dropdown-loading>vega-flex>span{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-dropdown .vega-dropdown-loading>vega-flex>span{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-dropdown .vega-dropdown-loading>vega-flex>span{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-dropdown .vega-dropdown-add-item{padding-top:8px;padding-bottom:8px;padding-left:16px;padding-right:16px;margin-left:4px;margin-right:4px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));cursor:pointer;display:flex;gap:8px;align-items:center}:host .vega-dropdown .vega-dropdown-add-item>div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-dropdown .vega-dropdown-add-item>span{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))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-dropdown .vega-dropdown-add-item>span{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-dropdown .vega-dropdown-add-item>span{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-dropdown .vega-dropdown-add-item>span{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-dropdown .vega-dropdown-add-item:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px;border-radius:4px}:host .vega-dropdown .vega-dropdown-clear-icon{width:16px;height:16px;cursor:pointer}:host .vega-dropdown .vega-dropdown-empty-list{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));padding-top:8px;padding-bottom:8px;padding-left:16px;padding-right:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-dropdown .vega-dropdown-empty-list{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-dropdown .vega-dropdown-empty-list{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-dropdown .vega-dropdown-empty-list{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-dropdown .vega-dropdown-divider{margin-top:4px;margin-bottom:4px;border-bottom:1px solid rgb(171, 198, 216)}:host .vega-dropdown .vega-dropdown-reset{padding-top:8px;padding-bottom:8px;padding-left:16px;padding-right:16px;margin-left:4px;margin-right:4px;display:block;cursor:pointer}:host .vega-dropdown .vega-dropdown-reset:hover{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1));color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host .vega-dropdown .vega-dropdown-reset:focus-visible{border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1))}';var Ae=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class Ve extends h{render(){return e("li",{class:"vega-dropdown-group"},this.renderLabel(),this.renderChildren(),this.renderDivide())}renderLabel(){return this.label&&e("div",{class:"vega-dropdown-group-label"},this.label)}renderChildren(){return e("ul",{class:"vega-dropdown-group-items"},e("slot",null))}renderDivide(){return this.divide&&e("div",{class:"vega-dropdown-group-divide"})}}Ae([l()],Ve.prototype,"label",void 0),Ae([l()],Ve.prototype,"divide",void 0);var Ne=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const We=class{constructor(e){i(this,e),this.globalSlimmers={},this.renderer=new Ve,this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.divide=!0}render(){return u(e("slot",null)),a(e(r,null,this.renderer.render()),this.host)}get host(){return n(this)}};Ne([g()],We.prototype,"globalSlimmers",void 0),Ne([p()],We.prototype,"renderer",void 0),Ne([p()],We.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),We.style=':host{display:block}:host .vega-dropdown-group{padding:0px;margin:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));cursor:default;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-dropdown-group{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-dropdown-group{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-dropdown-group{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}:host .vega-dropdown-group-label{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:4px}:host .vega-dropdown-group-items{padding:0px;margin:0px}:host .vega-dropdown-group-divide{background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1));margin-top:4px;margin-bottom:4px;height:1px}';var $e=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class _e extends h{render(){return e("li",{key:this.label,role:"menuitem","aria-label":this.label,class:{"vega-dropdown-item-selected":this.selected,"vega-dropdown-item-disabled":this.disabled,[`vega-dropdown-item-display-${this.itemDisplayRule}`]:!0,danger:this.danger&&"none"===this.selectType},tabIndex:this.disabled?-1:0,onClick:e=>this.onSelect(e),onKeyDown:S(),style:this.height>0&&{height:`${this.height}px`,boxSizing:"border-box",overflow:"hidden"}},this.renderSelectIcon(),this.renderPrefixIcon(),this.renderLabel(),this.renderCounter())}renderSelectIcon(){return"none"!==this.selectType&&e("span",{class:"selected-prefix"},"single"===this.selectType&&this.renderSingleSelectIcon(),"multiple"===this.selectType&&this.renderMultipleSelectIcon())}renderSingleSelectIcon(){return this.selected&&e("vega-icon",{icon:"checkmark",size:"size-16"})}renderMultipleSelectIcon(){return e("vega-checkbox",{size:"small",checked:this.selected,disabled:this.disabled})}renderPrefixIcon(){return(this.prefixIcon||this.prefixIconSlot)&&e("div",{class:"item-prefix"},this.renderItemPrefixIcon())}renderItemPrefixIcon(){return this.prefixIcon&&e("vega-icon",{icon:this.prefixIcon,size:"size-16"})}renderLabel(){return this.host.childElementCount>0||""!==this.host.textContent.trim()?e("span",{class:"vega-dropdown-item-label"},e("slot",null)):e(t,null,e("span",{innerHTML:this.label,class:"vega-dropdown-item-label"}),e("span",{class:"v-hidden"},e("slot",null)))}renderCounter(){return this.count>0&&e("div",{class:"item-counter"},e("vega-counter-badge",{count:this.count,color:"bg-action",offset:[10,10]}))}onSelect(e){this.vegaDropdownItemClickController.handleClick(e)}}$e([l()],_e.prototype,"host",void 0),$e([l()],_e.prototype,"label",void 0),$e([l()],_e.prototype,"count",void 0),$e([l()],_e.prototype,"prefixIcon",void 0),$e([l()],_e.prototype,"prefixIconSlot",void 0),$e([l()],_e.prototype,"disabled",void 0),$e([l()],_e.prototype,"selected",void 0),$e([l()],_e.prototype,"selectType",void 0),$e([l()],_e.prototype,"height",void 0),$e([l()],_e.prototype,"itemDisplayRule",void 0),$e([l()],_e.prototype,"danger",void 0),$e([l()],_e.prototype,"vegaDropdownItemClickController",void 0);var Pe=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class Be extends Z{constructor(){super({parent:()=>{const e=m(this.host,"vega-dropdown");if(e)return e;{const e=m(this.host,"vega-dropdown-content-box");if(e&&e["data-parent-ref"])return e["data-parent-ref"]}},subStates:[{subStateName:"selectType",parentStateName:"selectType"},{subStateName:"prefixIconSlot",parentStateName:"prefixIconSlot"},{subStateName:"itemDisplayRule",parentStateName:"itemDisplayRule"},{subStateName:"selected",parentStateName:"selectedSourceKey",callback:e=>{this.selected=Array.isArray(e)?e.includes(this.itemKey):e===this.itemKey}}],pullStatesWhenReattached:!0})}}Pe([l()],Be.prototype,"host",void 0),Pe([l({writable:!0})],Be.prototype,"selectType",void 0),Pe([l()],Be.prototype,"itemKey",void 0),Pe([l({writable:!0})],Be.prototype,"selected",void 0),Pe([l({writable:!0})],Be.prototype,"prefixIconSlot",void 0),Pe([l({writable:!0})],Be.prototype,"itemDisplayRule",void 0);var Ue=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class Fe extends h{handleClick(e){this.clickEventEmitter.emit({itemKey:this.itemKey},e),U.notify(Y,{host:this.host,detail:{itemKey:this.itemKey}})}}Ue([l()],Fe.prototype,"host",void 0),Ue([l()],Fe.prototype,"itemKey",void 0),Ue([l()],Fe.prototype,"vegaClick",void 0),Ue([l()],Fe.prototype,"clickEventEmitter",void 0);var qe=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const Ge=class{constructor(e){i(this,e),this.vegaClick=o(this,"vegaClick",7),this.click=o(this,"click",7),this.globalSlimmers={},this.renderer=new _e,this.vegaDropdownItemStateController=new Be,this.vegaDropdownItemClickController=new Fe,this.dropdownItemEventPrevent=new J([j],(()=>this.host)),this.clickEventEmitter=F(Ge,L),this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.prefixIconSlot=!1,this.selected=!1,this.itemDisplayRule="newline",this.disabled=!1,this.danger=!1}render(){return u(e("slot",null)),a(e(r,null,this.renderer.render()),this.host)}get host(){return n(this)}};qe([g()],Ge.prototype,"globalSlimmers",void 0),qe([p()],Ge.prototype,"renderer",void 0),qe([p()],Ge.prototype,"vegaDropdownItemStateController",void 0),qe([p()],Ge.prototype,"vegaDropdownItemClickController",void 0),qe([p()],Ge.prototype,"dropdownItemEventPrevent",void 0),qe([p()],Ge.prototype,"clickEventEmitter",void 0),qe([p()],Ge.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ge.style=':host{display:block}:host li{padding-top:8px;padding-bottom:8px;padding-left:16px;padding-right:16px;margin-left:4px;margin-right:4px;cursor:pointer;display:flex;align-items:center;gap:8px}:host li:focus{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1));outline:0}:host li,:host li a{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;text-decoration:none}@media screen and (min-width: 768px) and (max-width: 1023px){:host li,:host li a{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host li,:host li a{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host li,:host li a{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host li:hover{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}:host li:focus{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}:host li.vega-dropdown-item-disabled{color:rgba(var(--v-text-disabled, 176, 180, 181, 1));pointer-events:none}:host li.vega-dropdown-item-disabled .item-prefix,:host li.vega-dropdown-item-disabled .selected-prefix{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host li.danger .item-prefix,:host li.danger .vega-dropdown-item-label{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}:host li .item-prefix{display:flex;width:16px;height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:1}:host li .selected-prefix{color:rgba(var(--v-text-link, 19, 98, 226, 1));width:16px;height:16px;display:flex;align-items:center;min-width:16px}:host li .item-counter{width:20px;height:20px}:host .vega-dropdown-item-label{flex-grow:1}:host .vega-dropdown-item-display-newline .vega-dropdown-item-label{overflow-wrap:break-word}:host .vega-dropdown-item-display-ellipsis .vega-dropdown-item-label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .v-hidden{display:none}';var Ye=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class Xe extends h{constructor(){super(...arguments),this.extendItemsCount=10,this.totalCount=0,this.viewportItemsCount=0}componentWillLoad(){this.initVirtualScroll(),this.initPositionConfig()}watchSourceChange(e,t){this.isSameSource(e,t)||this.initVirtualScroll()}watchApproxItemHeight(){this.initVirtualScroll()}watchViewportMaxHeight(){this.initVirtualScroll()}getMaxStartIndex(){return this.maxStartIndex}setPositionByScrollTop(){if("virtual"===this.modeController.getMode()){const e=Math.floor(this.scrollTop/this.approxItemHeight),t=Math.min(Math.max(e-this.extendItemsCount,0),this.maxStartIndex),i=0===t?e:t+this.extendItemsCount,o=i+this.viewportItemsCount+this.extendItemsCount,r=Math.min(Math.max(this.scrollTop-this.extendItemsCount*this.approxItemHeight,0),this.maxStartIndex*this.approxItemHeight);this.positionConfig={startIndex:t,viewportStartIndex:i,endIndex:o,transformY:r}}}changeModeFromNormalToVirtual(){this.initVirtualScroll(),this.setPositionByScrollTop()}initVirtualScroll(){"virtual"===this.modeController.getMode()&&(this.totalCount=this.source.length,this.viewportItemsCount=Math.ceil(this.viewportMaxHeight/this.approxItemHeight),this.maxStartIndex=this.totalCount-this.viewportItemsCount-this.extendItemsCount)}initPositionConfig(){this.positionConfig={startIndex:0,viewportStartIndex:0,endIndex:this.viewportItemsCount+this.extendItemsCount,transformY:0},this.scrollableController.resetScrollTop()}isSameSource(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i][this.sourceItemIdentifier]!==t[i][this.sourceItemIdentifier])return!1;return!0}}Ye([l()],Xe.prototype,"sourceItemIdentifier",void 0),Ye([l()],Xe.prototype,"source",void 0),Ye([l()],Xe.prototype,"approxItemHeight",void 0),Ye([l()],Xe.prototype,"viewportMaxHeight",void 0),Ye([l({writable:!0})],Xe.prototype,"positionConfig",void 0),Ye([l()],Xe.prototype,"scrollTop",void 0),Ye([l()],Xe.prototype,"scrollableController",void 0),Ye([l()],Xe.prototype,"modeController",void 0),Ye([d("componentWillLoad")],Xe.prototype,"componentWillLoad",null),Ye([d("watchSourceChange")],Xe.prototype,"watchSourceChange",null),Ye([d("watchApproxItemHeight")],Xe.prototype,"watchApproxItemHeight",null),Ye([d("watchViewportMaxHeight")],Xe.prototype,"watchViewportMaxHeight",null);var Je=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class Qe extends h{componentDidLoad(){this.listenScrollContainer()}componentDidRender(){this.renderer.getContainerRef().scrollTop=this.scrollTop}watchScrollTop(){this.handleScroll()}watchSourceChange(){this.adjustScrollTopInVirtualMode()}watchApproxItemHeight(){this.adjustScrollTopInVirtualMode()}watchViewportMaxHeight(){this.adjustScrollTopInVirtualMode()}scrollToIndex(e){const t=this.renderer.getContainerRef();if(e>=0)if("normal"===this.modeController.getMode()){const i=t.querySelector(`:nth-child(${e+1})`);x(t,i)}else this.scrollTop=e*this.approxItemHeight}resetScrollTop(){this.scrollTop=0}listenScrollContainer(){this.renderer.getContainerRef().addEventListener("scroll",(()=>{this.scrollTop=this.renderer.getContainerRef().scrollTop}))}handleScroll(){const e=this.renderer.getContainerRef();e&&(e.scrollTop=this.scrollTop),this.positionController.setPositionByScrollTop(),this.checkIsScrollToBottom()}adjustScrollTopInVirtualMode(){"normal"!==this.modeController.getMode()&&(this.scrollTop=Math.min((this.source.length-Math.floor(this.viewportMaxHeight/this.approxItemHeight))*this.approxItemHeight,this.scrollTop))}checkIsScrollToBottom(){this.isLoading||!this.isScrollToBottomInVirtualMode()&&!this.isScrollToBottomInNormalMode()||U.notify(C.getSubject(this.host,$),{endIndex:this.source.length-1})}isScrollToBottomInVirtualMode(){return"virtual"===this.modeController.getMode()&&this.positionConfig.startIndex===this.positionController.getMaxStartIndex()}isScrollToBottomInNormalMode(){const e=this.renderer.getContainerRef();return"normal"===this.modeController.getMode()&&e.scrollHeight-this.scrollTop>=this.viewportMaxHeight}}Je([l()],Qe.prototype,"sourceItemIdentifier",void 0),Je([l()],Qe.prototype,"source",void 0),Je([l()],Qe.prototype,"host",void 0),Je([l()],Qe.prototype,"viewportMaxHeight",void 0),Je([l()],Qe.prototype,"approxItemHeight",void 0),Je([l({writable:!0})],Qe.prototype,"scrollTop",void 0),Je([l()],Qe.prototype,"positionConfig",void 0),Je([l()],Qe.prototype,"isLoading",void 0),Je([l()],Qe.prototype,"renderer",void 0),Je([l()],Qe.prototype,"positionController",void 0),Je([l()],Qe.prototype,"modeController",void 0),Je([d("componentDidLoad")],Qe.prototype,"componentDidLoad",null),Je([d("componentDidRender")],Qe.prototype,"componentDidRender",null),Je([d("watchScrollTop")],Qe.prototype,"watchScrollTop",null),Je([d("watchSourceChange")],Qe.prototype,"watchSourceChange",null),Je([d("watchApproxItemHeight")],Qe.prototype,"watchApproxItemHeight",null),Je([d("watchViewportMaxHeight")],Qe.prototype,"watchViewportMaxHeight",null),Je([d("scrollToIndex")],Qe.prototype,"scrollToIndex",null);var Ze=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class et extends h{getContainerRef(){return this.virtualScrollContainerRef}render(){return e("div",{style:{maxHeight:`${this.viewportMaxHeight}px`,overflow:"auto"},class:"virtual-scroll-container",ref:e=>this.virtualScrollContainerRef=e},"normal"===this.modeController.getMode()?this.renderNormal():this.renderVirtualScroll())}renderNormal(){return e(t,null,this.source.map(((e,t)=>this.renderItem(e,t))),this.loadingRenderer.render())}renderVirtualScroll(){return e("div",{style:{height:this.source.length*this.approxItemHeight+"px",position:"relative"}},e("div",{class:"virtual-scroll-block",style:{transform:`translateY(${this.positionConfig.transformY}px)`}},this.source.slice(this.positionConfig.startIndex,this.positionConfig.viewportStartIndex).map(((e,t)=>this.renderItem(e,this.positionConfig.startIndex+t,this.approxItemHeight))),this.source.slice(this.positionConfig.viewportStartIndex,this.positionConfig.endIndex).map(((e,t)=>this.renderItem(e,this.positionConfig.viewportStartIndex+t))),this.loadingRenderer.render()))}}Ze([l()],et.prototype,"source",void 0),Ze([l()],et.prototype,"renderItem",void 0),Ze([l()],et.prototype,"approxItemHeight",void 0),Ze([l()],et.prototype,"positionConfig",void 0),Ze([l()],et.prototype,"viewportMaxHeight",void 0),Ze([l()],et.prototype,"modeController",void 0),Ze([l()],et.prototype,"loadingRenderer",void 0);var tt=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class it extends h{constructor(){super(...arguments),this.mode="normal"}componentWillLoad(){this.setMode()}watchVirtualizationThreshold(){this.setMode()}watchSourceChange(){this.setMode()}getMode(){return this.mode}setMode(){const e=this.mode;this.mode=this.source.length>this.virtualizationThreshold?"virtual":"normal","normal"===e&&"virtual"===this.mode&&this.positionController.changeModeFromNormalToVirtual()}}tt([l()],it.prototype,"source",void 0),tt([l()],it.prototype,"virtualizationThreshold",void 0),tt([l()],it.prototype,"positionController",void 0),tt([d("componentWillLoad")],it.prototype,"componentWillLoad",null),tt([d("watchVirtualizationThreshold")],it.prototype,"watchVirtualizationThreshold",null),tt([d("watchSourceChange")],it.prototype,"watchSourceChange",null);class ot extends h{render(){return this.isLoading&&e("div",{class:"virtual-scroll-more-loading"},e("vega-flex",{gap:"size-8",direction:"row"},e("vega-loading-indicator",{size:"small"}),e("vega-font",{variant:"font-field-value",color:"text-secondary"},"Loading")))}}!function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);n>3&&s&&Object.defineProperty(t,i,s)}([l()],ot.prototype,"isLoading",void 0);var rt=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const nt=class{constructor(e){i(this,e),this.globalSlimmers={},this.modeController=new it,this.positionController=new Xe,this.scrollableController=new Qe,this.renderer=new et,this.loadingRenderer=new ot,this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.scrollTop=0,this.source=[],this.approxItemHeight=40,this.viewportMaxHeight=320,this.isLoading=!1,this.virtualizationThreshold=60,this.sourceItemIdentifier="key"}watchScrollTop(){}watchSourceChange(e,t){}watchApproxItemHeight(){}watchViewportMaxHeight(){}watchVirtualizationThreshold(){}async scrollToIndex(e){}render(){return a(e(r,null,this.renderer.render()),this.host)}get host(){return n(this)}static get watchers(){return{scrollTop:["watchScrollTop"],source:["watchSourceChange"],approxItemHeight:["watchApproxItemHeight"],viewportMaxHeight:["watchViewportMaxHeight"],virtualizationThreshold:["watchVirtualizationThreshold"]}}};rt([g()],nt.prototype,"globalSlimmers",void 0),rt([p()],nt.prototype,"modeController",void 0),rt([p()],nt.prototype,"positionController",void 0),rt([p()],nt.prototype,"scrollableController",void 0),rt([p()],nt.prototype,"renderer",void 0),rt([p()],nt.prototype,"loadingRenderer",void 0),rt([p()],nt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),nt.style=":host .virtual-scroll-more-loading{padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}";export{ze as vega_dropdown,Ke as vega_dropdown_content_box,We as vega_dropdown_group,Ge as vega_dropdown_item,nt as vega_virtual_scroll}