@heartlandone/vega 2.80.0 → 2.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (564) hide show
  1. package/dist/cjs/{app-globals-7a48292d.js → app-globals-25e1bfac.js} +6 -6
  2. package/dist/cjs/{aria-dialog-focusable-trap-slimmer-5a0a78fe.js → aria-dialog-focusable-trap-slimmer-ced9566d.js} +14 -69
  3. package/dist/cjs/{child-nodes-notify-observer-slimmer-a8d13f4c.js → child-nodes-notify-observer-slimmer-2631c381.js} +1 -1
  4. package/dist/cjs/{code-block-71a330a1.js → code-block-24b3d0e7.js} +802 -61
  5. package/dist/cjs/{component-value-history-controller-slimmer.abstract-fd077a6c.js → component-value-history-controller-slimmer.abstract-bd662b32.js} +5 -5
  6. package/dist/cjs/{content-state-afa26456.js → content-state-0f26036c.js} +969 -466
  7. package/dist/cjs/{date-required-rule-9f0e3e99.js → date-required-rule-4377217a.js} +1 -1
  8. package/dist/cjs/{design-token-3f9589eb.js → design-token-40276b11.js} +2 -2
  9. package/dist/cjs/{dom-node-subject-observer-factory-a3a60da4.js → dom-node-subject-observer-factory-9110cb94.js} +1 -1
  10. package/dist/cjs/{element-appender-slimmer-7a66229b.js → element-appender-slimmer-be1b4d57.js} +4 -4
  11. package/dist/cjs/{event-emit-slimmer-024e26bb.js → event-emit-slimmer-bee6b676.js} +1 -1
  12. package/dist/cjs/{form-field-controller-slimmer-c487cf2b.js → form-field-controller-slimmer-982dbfe4.js} +3 -3
  13. package/dist/cjs/{image-annotation-action-4e72af4b.js → image-annotation-action-e0df5a20.js} +3 -3
  14. package/dist/cjs/index.cjs.js +15 -14
  15. package/dist/cjs/{inject-keyboard-manager-d1a82089.js → inject-keyboard-manager-12b65e98.js} +1 -1
  16. package/dist/cjs/{keyboard-manager-9dbbb0d4.js → keyboard-manager-c89a66d3.js} +2 -2
  17. package/dist/cjs/{keyboard-manager-slimmer-68cff676.js → keyboard-manager-slimmer-93fcbf46.js} +1 -1
  18. package/dist/cjs/loader.cjs.js +10 -10
  19. package/dist/cjs/{month-view-generator-65a2f883.js → month-view-generator-0d25e950.js} +1 -1
  20. package/dist/cjs/page-size-option-utils-d038dd3a.js +68 -0
  21. package/dist/cjs/{public-rules-36f202b3.js → public-rules-652ec269.js} +8 -8
  22. package/dist/cjs/{range-fa15d524.js → range-cdd61881.js} +2 -2
  23. package/dist/cjs/{responsive-format-facade-4419b4ae.js → responsive-format-facade-9cae7f27.js} +3 -3
  24. package/dist/cjs/{rich-text-editor-required-rule-7d4c2973.js → rich-text-editor-required-rule-4b919054.js} +1 -1
  25. package/dist/cjs/{split-cell-operation-19f98afb.js → split-cell-operation-3596f738.js} +58 -23
  26. package/dist/cjs/{string-format-strategy.abstract-c65d9861.js → string-format-strategy.abstract-ebdb2573.js} +1 -1
  27. package/dist/cjs/{string-input-formatter-slimmer-c2e04acc.js → string-input-formatter-slimmer-9b6a8399.js} +3 -3
  28. package/dist/cjs/{string-mask-strategy-418fc0b8.js → string-mask-strategy-6cc9f391.js} +2 -2
  29. package/dist/cjs/{style-formatter-3c9ce0e5.js → style-formatter-18289c4d.js} +2 -2
  30. package/dist/cjs/{sub-state-notify-slimmer-7a4c6061.js → sub-state-notify-slimmer-39bfcfe3.js} +1 -1
  31. package/dist/cjs/{sub-state-observer-slimmer-f728e068.js → sub-state-observer-slimmer-e5b50cbf.js} +2 -2
  32. package/dist/cjs/{time-required-rule-ad091302.js → time-required-rule-3517beff.js} +1 -1
  33. package/dist/cjs/{token-extension-90396de7.js → token-extension-addc97c1.js} +208 -34
  34. package/dist/cjs/{type-guard-d760850a.js → type-guard-362d7da3.js} +23 -0
  35. package/dist/cjs/{ui-9e8c9732.js → ui-ae4ee13d.js} +69 -0
  36. package/dist/cjs/{valid-credit-card-number-rule-5ce8e973.js → valid-credit-card-number-rule-1d8bf49c.js} +1 -1
  37. package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
  38. package/dist/cjs/vega-app-header-button.cjs.entry.js +6 -6
  39. package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
  40. package/dist/cjs/vega-banner.cjs.entry.js +5 -4
  41. package/dist/cjs/vega-box.cjs.entry.js +5 -5
  42. package/dist/cjs/vega-breadcrumb.cjs.entry.js +27 -10
  43. package/dist/cjs/vega-button-circle.cjs.entry.js +6 -6
  44. package/dist/cjs/vega-button-group_2.cjs.entry.js +5 -5
  45. package/dist/cjs/vega-button-link.cjs.entry.js +3 -3
  46. package/dist/cjs/vega-button.cjs.entry.js +5 -5
  47. package/dist/cjs/vega-calendar_4.cjs.entry.js +7 -7
  48. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  49. package/dist/cjs/vega-carousel.cjs.entry.js +5 -5
  50. package/dist/cjs/vega-checkbox_2.cjs.entry.js +6 -6
  51. package/dist/cjs/vega-chip.cjs.entry.js +7 -7
  52. package/dist/cjs/vega-code-block.cjs.entry.js +9 -9
  53. package/dist/cjs/vega-color-picker.cjs.entry.js +5 -5
  54. package/dist/cjs/vega-combo-box.cjs.entry.js +8 -8
  55. package/dist/cjs/vega-date-picker_2.cjs.entry.js +337 -279
  56. package/dist/cjs/vega-dialog_2.cjs.entry.js +73 -10
  57. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  58. package/dist/cjs/vega-dropdown_5.cjs.entry.js +51 -13
  59. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  60. package/dist/cjs/vega-field-label.cjs.entry.js +3 -3
  61. package/dist/cjs/vega-file-uploader.cjs.entry.js +5 -5
  62. package/dist/cjs/vega-flag-icon.cjs.entry.js +3 -3
  63. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  64. package/dist/cjs/vega-font.cjs.entry.js +4 -4
  65. package/dist/cjs/vega-form.cjs.entry.js +8 -8
  66. package/dist/cjs/vega-grid.cjs.entry.js +4 -4
  67. package/dist/cjs/vega-icon.cjs.entry.js +4 -4
  68. package/dist/cjs/vega-image-uploader.cjs.entry.js +7 -7
  69. package/dist/cjs/vega-input-credit-card.cjs.entry.js +9 -9
  70. package/dist/cjs/vega-input-numeric.cjs.entry.js +9 -9
  71. package/dist/cjs/vega-input-passcode.cjs.entry.js +8 -8
  72. package/dist/cjs/vega-input-phone-number.cjs.entry.js +7 -7
  73. package/dist/cjs/vega-input-range.cjs.entry.js +5 -5
  74. package/dist/cjs/vega-input-select.cjs.entry.js +7 -7
  75. package/dist/cjs/vega-input.cjs.entry.js +14 -11
  76. package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
  77. package/dist/cjs/vega-left-nav_5.cjs.entry.js +117 -12
  78. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  79. package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -2
  80. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +2 -2
  81. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +23 -7
  82. package/dist/cjs/vega-pagination.cjs.entry.js +43 -19
  83. package/dist/cjs/vega-popover_2.cjs.entry.js +10 -10
  84. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +42 -11
  85. package/dist/cjs/vega-radio_2.cjs.entry.js +9 -9
  86. package/dist/cjs/vega-rich-text-content.cjs.entry.js +100 -19
  87. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +29 -18
  88. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +8 -8
  89. package/dist/cjs/vega-section-title.cjs.entry.js +21 -3
  90. package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
  91. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +8 -8
  92. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +7 -7
  93. package/dist/cjs/vega-sidenav_3.cjs.entry.js +7 -7
  94. package/dist/cjs/vega-signature-capture.cjs.entry.js +8 -8
  95. package/dist/cjs/vega-stepper.cjs.entry.js +6 -6
  96. package/dist/cjs/vega-tab-group_2.cjs.entry.js +3 -3
  97. package/dist/cjs/vega-table_11.cjs.entry.js +7 -7
  98. package/dist/cjs/vega-text.cjs.entry.js +1 -1
  99. package/dist/cjs/vega-textarea.cjs.entry.js +5 -5
  100. package/dist/cjs/vega-time-picker_2.cjs.entry.js +11 -11
  101. package/dist/cjs/vega-toggle-switch.cjs.entry.js +5 -5
  102. package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -7
  103. package/dist/cjs/vega.cjs.js +10 -10
  104. package/dist/cjs/{wait-for-component-did-render-b6aba2de.js → wait-for-component-did-render-b6d12d51.js} +1 -1
  105. package/dist/collection/components/vega-banner/slimmers/renderers/vega-banner-renderer.js +1 -0
  106. package/dist/collection/components/vega-banner/vega-banner.css +36 -0
  107. package/dist/collection/components/vega-box/vega-box.js +1 -1
  108. package/dist/collection/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-item-renderer.js +9 -6
  109. package/dist/collection/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-renderer.js +4 -0
  110. package/dist/collection/components/vega-breadcrumb/vega-breadcrumb.css +6 -0
  111. package/dist/collection/components/vega-breadcrumb/vega-breadcrumb.js +31 -0
  112. package/dist/collection/components/vega-card/vega-card.css +157 -0
  113. package/dist/collection/components/vega-card/vega-card.js +1 -1
  114. package/dist/collection/components/vega-chip/vega-chip.js +26 -1
  115. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-current-period-controller.js +5 -10
  116. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-is-dual-months-controller.js +64 -0
  117. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.js +3 -6
  118. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.js +3 -11
  119. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.js +2 -2
  120. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +4 -5
  121. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +13 -15
  122. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +41 -2
  123. package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
  124. package/dist/collection/components/vega-divider/slimmers/controllers/vega-divider-size-controller.js +1 -1
  125. package/dist/collection/components/vega-divider/vega-divider.css +157 -0
  126. package/dist/collection/components/vega-divider/vega-divider.js +1 -1
  127. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.js +37 -1
  128. package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-renderer.js +4 -1
  129. package/dist/collection/components/vega-flex/vega-flex.css +157 -0
  130. package/dist/collection/components/vega-flex/vega-flex.js +1 -1
  131. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +4 -1
  132. package/dist/collection/components/vega-input/vega-input.js +25 -0
  133. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.js +37 -1
  134. package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +11 -1
  135. package/dist/collection/components/vega-modal/vega-modal.css +2683 -7
  136. package/dist/collection/components/vega-modal/vega-modal.js +75 -0
  137. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.js +85 -2
  138. package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.js +23 -0
  139. package/dist/collection/components/vega-pagination/constants/page-size.js +2 -0
  140. package/dist/collection/components/vega-pagination/internal/vega-pagination-page-size-selector.js +11 -7
  141. package/dist/collection/components/vega-pagination/slimmers/controllers/vega-pagination-page-size-observer-controller.js +11 -1
  142. package/dist/collection/components/vega-pagination/utils/page-size-option-utils.js +57 -0
  143. package/dist/collection/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-dropdown-renderer.js +15 -5
  144. package/dist/collection/components/vega-pagination/vega-pagination-page-size-selector-mobile/vega-pagination-page-size-selector-mobile.js +39 -3
  145. package/dist/collection/components/vega-pagination/vega-pagination.js +32 -11
  146. package/dist/collection/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-direction-controller.js +34 -3
  147. package/dist/collection/components/vega-progress-tracker/slimmers/renderers/vega-progress-tracker-renderer.js +3 -2
  148. package/dist/collection/components/vega-rich-text-editor/constants/constant.js +20 -0
  149. package/dist/collection/components/vega-rich-text-editor/dto/annotations/image-annotation.js +1 -0
  150. package/dist/collection/components/vega-rich-text-editor/dto/annotations/inline-html-annotation.js +12 -0
  151. package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js +8 -2
  152. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +15 -4
  153. package/dist/collection/components/vega-rich-text-editor/dto/blocks/code-block.js +6 -2
  154. package/dist/collection/components/vega-rich-text-editor/dto/blocks/html-block.js +9 -15
  155. package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +3 -3
  156. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +3 -3
  157. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +3 -7
  158. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +50 -9
  159. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +25 -6
  160. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-block-filter-styles-strategy.js +39 -0
  161. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-node-filter-styles-strategy.js +47 -0
  162. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.js +64 -0
  163. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.js +147 -14
  164. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/image-node/image-filter-styles-strategy.js +26 -3
  165. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.js +24 -0
  166. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-heading-item-block-filter-styles-strategy.js +29 -0
  167. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.js +39 -1
  168. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-title-item-block-filter-styles-strategy.js +29 -0
  169. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/predicate.js +94 -0
  170. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/heading-filter-styles-strategy.js +15 -0
  171. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/paragraph-filter-styles-strategy.js +48 -0
  172. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/title-filter-styles-strategy.js +16 -0
  173. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/code-filter-styles-strategy.js +32 -3
  174. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/link-filter-styles-strategy.js +42 -3
  175. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.js +108 -0
  176. package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +7 -2
  177. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +2 -2
  178. package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +15 -4
  179. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +84 -14
  180. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.js +61 -6
  181. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.js +16 -0
  182. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +14 -3
  183. package/dist/collection/components/vega-rich-text-editor/dto/setup.js +36 -6
  184. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +10 -0
  185. package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-extension.js +9 -3
  186. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +17 -1
  187. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.js +17 -18
  188. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +19 -0
  189. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +3 -3
  190. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +3 -3
  191. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +21 -4
  192. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +3 -3
  193. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +3 -3
  194. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +3 -3
  195. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +3 -3
  196. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.js +2 -1
  197. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +2 -2
  198. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-block/table-block-filter-styles-strategy.js +39 -0
  199. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-caption/table-caption-filter-styles-strategy.js +39 -0
  200. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-cell/table-cell-filter-styles-strategy.js +63 -0
  201. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +7 -0
  202. package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +24 -0
  203. package/dist/collection/components/vega-rich-text-editor/public-api.js +2 -0
  204. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/custom-style-annotation-handler.js +2 -25
  205. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +8 -2
  206. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/inline-html-annotation-handler.js +30 -53
  207. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/link-annotation-handler.js +2 -1
  208. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.js +2 -1
  209. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.js +85 -17
  210. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.js +12 -5
  211. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/html-block-strategy.js +95 -43
  212. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-element-to-text-node-strategy.js +1 -2
  213. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/predicate.js +29 -0
  214. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/strategy-tags.js +142 -0
  215. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.js +1 -0
  216. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.js +12 -2
  217. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +1 -1
  218. package/dist/collection/components/vega-section-title/slimmers/renderers/vega-section-title-renderer.js +8 -2
  219. package/dist/collection/components/vega-section-title/vega-section-title.css +35 -0
  220. package/dist/collection/components/vega-section-title/vega-section-title.js +64 -0
  221. package/dist/collection/components/vega-stepper/vega-stepper.css +3 -0
  222. package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-margin-formatter.js +3 -3
  223. package/dist/collection/helpers/slimmers/aria-dialog-focusable-trap-slimmer.js +13 -68
  224. package/dist/collection/types/type-guard.js +21 -0
  225. package/dist/collection/utils/ui.js +68 -0
  226. package/dist/esm/{app-globals-e77015e3.js → app-globals-80a7d395.js} +6 -6
  227. package/dist/esm/{aria-dialog-focusable-trap-slimmer-5a2f92be.js → aria-dialog-focusable-trap-slimmer-cc6a8c3e.js} +14 -69
  228. package/dist/esm/{child-nodes-notify-observer-slimmer-b7f0e419.js → child-nodes-notify-observer-slimmer-a8cb19cf.js} +1 -1
  229. package/dist/esm/{code-block-7d6f231b.js → code-block-cd913077.js} +796 -62
  230. package/dist/esm/{component-value-history-controller-slimmer.abstract-acf65b17.js → component-value-history-controller-slimmer.abstract-e595761d.js} +5 -5
  231. package/dist/esm/{content-state-084cd705.js → content-state-89f8eecb.js} +958 -455
  232. package/dist/esm/{date-required-rule-29608215.js → date-required-rule-2b08f32c.js} +1 -1
  233. package/dist/esm/{design-token-edcd787b.js → design-token-7566d54c.js} +2 -2
  234. package/dist/esm/{dom-node-subject-observer-factory-cea9248d.js → dom-node-subject-observer-factory-aca0116e.js} +1 -1
  235. package/dist/esm/{element-appender-slimmer-08ec429b.js → element-appender-slimmer-df2a2da2.js} +4 -4
  236. package/dist/esm/{event-emit-slimmer-4fba1b35.js → event-emit-slimmer-9abc9241.js} +1 -1
  237. package/dist/esm/{form-field-controller-slimmer-8dd39707.js → form-field-controller-slimmer-40fcb5c2.js} +3 -3
  238. package/dist/esm/{image-annotation-action-a6b33a81.js → image-annotation-action-6048d32e.js} +3 -3
  239. package/dist/esm/index.js +14 -14
  240. package/dist/esm/{inject-keyboard-manager-7557816f.js → inject-keyboard-manager-c6557f50.js} +1 -1
  241. package/dist/esm/{keyboard-manager-1846c6a5.js → keyboard-manager-c7b125d7.js} +2 -2
  242. package/dist/esm/{keyboard-manager-slimmer-1ae0aa4d.js → keyboard-manager-slimmer-6109039b.js} +1 -1
  243. package/dist/esm/loader.js +10 -10
  244. package/dist/esm/{month-view-generator-b700ed08.js → month-view-generator-139ace5a.js} +1 -1
  245. package/dist/esm/page-size-option-utils-50afc81a.js +61 -0
  246. package/dist/esm/{public-rules-fe2c7934.js → public-rules-e42bce9d.js} +8 -8
  247. package/dist/esm/{range-00afe462.js → range-b76edec7.js} +2 -2
  248. package/dist/esm/{responsive-format-facade-37d4d850.js → responsive-format-facade-151dbd10.js} +3 -3
  249. package/dist/esm/{rich-text-editor-required-rule-6487ec94.js → rich-text-editor-required-rule-1fc7c040.js} +1 -1
  250. package/dist/esm/{split-cell-operation-9445e642.js → split-cell-operation-548ea374.js} +58 -23
  251. package/dist/esm/{string-format-strategy.abstract-ec6d627b.js → string-format-strategy.abstract-6488031a.js} +1 -1
  252. package/dist/esm/{string-input-formatter-slimmer-959dff7a.js → string-input-formatter-slimmer-625e17a2.js} +3 -3
  253. package/dist/esm/{string-mask-strategy-49be41f0.js → string-mask-strategy-a165d316.js} +2 -2
  254. package/dist/esm/{style-formatter-ad0b2bac.js → style-formatter-280757ae.js} +2 -2
  255. package/dist/esm/{sub-state-notify-slimmer-ee8c417b.js → sub-state-notify-slimmer-6c972bb4.js} +1 -1
  256. package/dist/esm/{sub-state-observer-slimmer-4d30fa5c.js → sub-state-observer-slimmer-53643b5c.js} +2 -2
  257. package/dist/esm/{time-required-rule-414b1590.js → time-required-rule-3f5a8822.js} +1 -1
  258. package/dist/esm/{token-extension-600b1c88.js → token-extension-5ee7a3f1.js} +208 -34
  259. package/dist/esm/{type-guard-23a08026.js → type-guard-f6c9c89d.js} +22 -1
  260. package/dist/esm/{ui-ba5a4758.js → ui-b7600a48.js} +69 -1
  261. package/dist/esm/{valid-credit-card-number-rule-60abddac.js → valid-credit-card-number-rule-3bf19ad6.js} +1 -1
  262. package/dist/esm/vega-accordion.entry.js +6 -6
  263. package/dist/esm/vega-app-header-button.entry.js +6 -6
  264. package/dist/esm/vega-backdrop.entry.js +1 -1
  265. package/dist/esm/vega-banner.entry.js +5 -4
  266. package/dist/esm/vega-box.entry.js +5 -5
  267. package/dist/esm/vega-breadcrumb.entry.js +27 -10
  268. package/dist/esm/vega-button-circle.entry.js +6 -6
  269. package/dist/esm/vega-button-group_2.entry.js +5 -5
  270. package/dist/esm/vega-button-link.entry.js +3 -3
  271. package/dist/esm/vega-button.entry.js +5 -5
  272. package/dist/esm/vega-calendar_4.entry.js +7 -7
  273. package/dist/esm/vega-card.entry.js +5 -5
  274. package/dist/esm/vega-carousel.entry.js +5 -5
  275. package/dist/esm/vega-checkbox_2.entry.js +6 -6
  276. package/dist/esm/vega-chip.entry.js +7 -7
  277. package/dist/esm/vega-code-block.entry.js +9 -9
  278. package/dist/esm/vega-color-picker.entry.js +5 -5
  279. package/dist/esm/vega-combo-box.entry.js +8 -8
  280. package/dist/esm/vega-date-picker_2.entry.js +337 -279
  281. package/dist/esm/vega-dialog_2.entry.js +73 -10
  282. package/dist/esm/vega-divider.entry.js +5 -5
  283. package/dist/esm/vega-dropdown_5.entry.js +52 -14
  284. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  285. package/dist/esm/vega-field-label.entry.js +3 -3
  286. package/dist/esm/vega-file-uploader.entry.js +5 -5
  287. package/dist/esm/vega-flag-icon.entry.js +3 -3
  288. package/dist/esm/vega-flex.entry.js +6 -6
  289. package/dist/esm/vega-font.entry.js +4 -4
  290. package/dist/esm/vega-form.entry.js +8 -8
  291. package/dist/esm/vega-grid.entry.js +4 -4
  292. package/dist/esm/vega-icon.entry.js +4 -4
  293. package/dist/esm/vega-image-uploader.entry.js +7 -7
  294. package/dist/esm/vega-input-credit-card.entry.js +9 -9
  295. package/dist/esm/vega-input-numeric.entry.js +9 -9
  296. package/dist/esm/vega-input-passcode.entry.js +8 -8
  297. package/dist/esm/vega-input-phone-number.entry.js +7 -7
  298. package/dist/esm/vega-input-range.entry.js +5 -5
  299. package/dist/esm/vega-input-select.entry.js +7 -7
  300. package/dist/esm/vega-input.entry.js +14 -11
  301. package/dist/esm/vega-item-toggle.entry.js +3 -3
  302. package/dist/esm/vega-left-nav_5.entry.js +117 -12
  303. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  304. package/dist/esm/vega-page-notification_2.entry.js +2 -2
  305. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +2 -2
  306. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +23 -7
  307. package/dist/esm/vega-pagination.entry.js +43 -19
  308. package/dist/esm/vega-popover_2.entry.js +10 -10
  309. package/dist/esm/vega-progress-tracker_2.entry.js +42 -11
  310. package/dist/esm/vega-radio_2.entry.js +9 -9
  311. package/dist/esm/vega-rich-text-content.entry.js +100 -19
  312. package/dist/esm/vega-rich-text-editor_4.entry.js +29 -18
  313. package/dist/esm/vega-rich-text-table-properties_3.entry.js +8 -8
  314. package/dist/esm/vega-section-title.entry.js +21 -3
  315. package/dist/esm/vega-segment-control.entry.js +3 -3
  316. package/dist/esm/vega-selection-chip_2.entry.js +8 -8
  317. package/dist/esm/vega-selection-tile_2.entry.js +7 -7
  318. package/dist/esm/vega-sidenav_3.entry.js +7 -7
  319. package/dist/esm/vega-signature-capture.entry.js +8 -8
  320. package/dist/esm/vega-stepper.entry.js +6 -6
  321. package/dist/esm/vega-tab-group_2.entry.js +3 -3
  322. package/dist/esm/vega-table_11.entry.js +7 -7
  323. package/dist/esm/vega-text.entry.js +1 -1
  324. package/dist/esm/vega-textarea.entry.js +5 -5
  325. package/dist/esm/vega-time-picker_2.entry.js +11 -11
  326. package/dist/esm/vega-toggle-switch.entry.js +5 -5
  327. package/dist/esm/vega-tooltip_2.entry.js +7 -7
  328. package/dist/esm/vega.js +10 -10
  329. package/dist/esm/{wait-for-component-did-render-03e7ccb2.js → wait-for-component-did-render-6980a1a6.js} +1 -1
  330. package/dist/sri/vega-sri-manifest.json +345 -341
  331. package/dist/types/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-item-renderer.d.ts +1 -0
  332. package/dist/types/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-renderer.d.ts +1 -0
  333. package/dist/types/components/vega-breadcrumb/vega-breadcrumb.d.ts +10 -0
  334. package/dist/types/components/vega-chip/vega-chip.d.ts +9 -0
  335. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-current-period-controller.d.ts +1 -6
  336. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-is-dual-months-controller.d.ts +28 -0
  337. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.d.ts +1 -2
  338. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +1 -2
  339. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.d.ts +1 -1
  340. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.d.ts +1 -1
  341. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +12 -0
  342. package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.d.ts +12 -0
  343. package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-renderer.d.ts +1 -0
  344. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +1 -0
  345. package/dist/types/components/vega-input/types.d.ts +5 -0
  346. package/dist/types/components/vega-input/vega-input.d.ts +17 -1
  347. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.d.ts +9 -0
  348. package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +3 -0
  349. package/dist/types/components/vega-modal/vega-modal.d.ts +24 -1
  350. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.d.ts +17 -0
  351. package/dist/types/components/vega-pagination/constants/page-size.d.ts +2 -0
  352. package/dist/types/components/vega-pagination/internal/vega-pagination-page-size-selector.d.ts +3 -2
  353. package/dist/types/components/vega-pagination/slimmers/controllers/vega-pagination-page-size-observer-controller.d.ts +2 -0
  354. package/dist/types/components/vega-pagination/types.d.ts +9 -0
  355. package/dist/types/components/vega-pagination/utils/page-size-option-utils.d.ts +42 -0
  356. package/dist/types/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-dropdown-renderer.d.ts +2 -0
  357. package/dist/types/components/vega-pagination/vega-pagination-page-size-selector-mobile/vega-pagination-page-size-selector-mobile.d.ts +9 -2
  358. package/dist/types/components/vega-pagination/vega-pagination.d.ts +8 -3
  359. package/dist/types/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-direction-controller.d.ts +14 -2
  360. package/dist/types/components/vega-progress-tracker/slimmers/renderers/vega-progress-tracker-renderer.d.ts +1 -1
  361. package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +5 -0
  362. package/dist/types/components/vega-rich-text-editor/dto/annotations/image-annotation.d.ts +1 -0
  363. package/dist/types/components/vega-rich-text-editor/dto/annotations/inline-html-annotation.d.ts +14 -0
  364. package/dist/types/components/vega-rich-text-editor/dto/annotations/link-group-annotation.d.ts +8 -2
  365. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +4 -2
  366. package/dist/types/components/vega-rich-text-editor/dto/blocks/code-block.d.ts +2 -2
  367. package/dist/types/components/vega-rich-text-editor/dto/blocks/html-block.d.ts +1 -11
  368. package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +1 -1
  369. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +1 -1
  370. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +1 -1
  371. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +15 -2
  372. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +9 -3
  373. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-block-filter-styles-strategy.d.ts +27 -0
  374. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-node-filter-styles-strategy.d.ts +27 -0
  375. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.d.ts +27 -1
  376. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.d.ts +92 -8
  377. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/image-node/image-filter-styles-strategy.d.ts +21 -3
  378. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.d.ts +15 -0
  379. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-heading-item-block-filter-styles-strategy.d.ts +19 -0
  380. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.d.ts +25 -0
  381. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-title-item-block-filter-styles-strategy.d.ts +19 -0
  382. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/predicate.d.ts +72 -0
  383. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/heading-filter-styles-strategy.d.ts +10 -0
  384. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/paragraph-filter-styles-strategy.d.ts +34 -0
  385. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/title-filter-styles-strategy.d.ts +11 -0
  386. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/code-filter-styles-strategy.d.ts +25 -2
  387. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/link-filter-styles-strategy.d.ts +24 -4
  388. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.d.ts +62 -0
  389. package/dist/types/components/vega-rich-text-editor/dto/nodes/code-block-node.d.ts +7 -3
  390. package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +1 -1
  391. package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +5 -3
  392. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +43 -4
  393. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.d.ts +25 -0
  394. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.d.ts +5 -0
  395. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +12 -0
  396. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +8 -0
  397. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +8 -0
  398. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.d.ts +7 -1
  399. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +9 -1
  400. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +1 -1
  401. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +1 -1
  402. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +5 -2
  403. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +1 -1
  404. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +1 -1
  405. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +1 -1
  406. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +1 -1
  407. package/dist/types/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-block/table-block-filter-styles-strategy.d.ts +29 -0
  408. package/dist/types/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-caption/table-caption-filter-styles-strategy.d.ts +29 -0
  409. package/dist/types/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-cell/table-cell-filter-styles-strategy.d.ts +46 -0
  410. package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +8 -0
  411. package/dist/types/components/vega-rich-text-editor/interface.d.ts +27 -5
  412. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +1 -0
  413. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/custom-style-annotation-handler.d.ts +0 -7
  414. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +1 -1
  415. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/inline-html-annotation-handler.d.ts +11 -1
  416. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.d.ts +43 -7
  417. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.d.ts +8 -3
  418. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/html-block-strategy.d.ts +34 -1
  419. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/predicate.d.ts +21 -0
  420. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/strategy-tags.d.ts +83 -0
  421. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.d.ts +6 -0
  422. package/dist/types/components/vega-section-title/slimmers/renderers/vega-section-title-renderer.d.ts +2 -0
  423. package/dist/types/components/vega-section-title/types.d.ts +1 -0
  424. package/dist/types/components/vega-section-title/vega-section-title.d.ts +14 -0
  425. package/dist/types/components.d.ts +93 -8
  426. package/dist/types/helpers/slimmers/aria-dialog-focusable-trap-slimmer.d.ts +4 -12
  427. package/dist/types/types/components.type.d.ts +3 -0
  428. package/dist/types/types/type-guard.d.ts +15 -1
  429. package/dist/types/types/ui.type.d.ts +11 -1
  430. package/dist/types/utils/ui.d.ts +14 -0
  431. package/dist/vega/index.esm.js +1 -1
  432. package/dist/vega/{p-1c45565d.js → p-001d36af.js} +1 -1
  433. package/dist/vega/{p-7c2fecfd.entry.js → p-01541820.entry.js} +1 -1
  434. package/dist/vega/p-0304c3a7.js +1 -0
  435. package/dist/vega/{p-2d917e2d.entry.js → p-08f03a52.entry.js} +1 -1
  436. package/dist/vega/{p-9390a94b.entry.js → p-0a145766.entry.js} +1 -1
  437. package/dist/vega/p-0d205fbf.js +1 -0
  438. package/dist/vega/p-0fc2ccc4.entry.js +1 -0
  439. package/dist/vega/p-118aeed1.entry.js +1 -0
  440. package/dist/vega/{p-ea21462f.js → p-1a4e8d8a.js} +1 -1
  441. package/dist/vega/{p-5ae4ea20.entry.js → p-23dc4064.entry.js} +1 -1
  442. package/dist/vega/{p-2c2df248.js → p-24b45c85.js} +1 -1
  443. package/dist/vega/{p-010b5e74.js → p-262a27d0.js} +1 -1
  444. package/dist/vega/{p-9dc23325.entry.js → p-27dc6562.entry.js} +1 -1
  445. package/dist/vega/p-295326ca.entry.js +1 -0
  446. package/dist/vega/{p-6af55f1c.entry.js → p-2beace1c.entry.js} +1 -1
  447. package/dist/vega/p-2ce2972f.js +1 -0
  448. package/dist/vega/p-2e7d5e28.entry.js +1 -0
  449. package/dist/vega/{p-7618dde4.js → p-2f99c511.js} +1 -1
  450. package/dist/vega/p-32592497.entry.js +1 -0
  451. package/dist/vega/{p-65900dbf.entry.js → p-37a9f4b4.entry.js} +1 -1
  452. package/dist/vega/{p-a99e75a1.entry.js → p-4013d954.entry.js} +1 -1
  453. package/dist/vega/{p-19ad4f15.entry.js → p-42da45e3.entry.js} +1 -1
  454. package/dist/vega/p-42e246e4.entry.js +1 -0
  455. package/dist/vega/p-479a169c.entry.js +1 -0
  456. package/dist/vega/{p-35386999.entry.js → p-47a2eec1.entry.js} +1 -1
  457. package/dist/vega/{p-b696a861.js → p-49ae8c79.js} +1 -1
  458. package/dist/vega/p-4ed416e7.js +1 -0
  459. package/dist/vega/{p-dc9b5063.entry.js → p-53ba1adb.entry.js} +1 -1
  460. package/dist/vega/{p-d1494c7c.entry.js → p-55019e55.entry.js} +1 -1
  461. package/dist/vega/{p-434fc427.entry.js → p-565aac6e.entry.js} +1 -1
  462. package/dist/vega/{p-cc055723.entry.js → p-574586c9.entry.js} +1 -1
  463. package/dist/vega/{p-cca5042b.entry.js → p-5781b9f4.entry.js} +1 -1
  464. package/dist/vega/{p-1feb4f2a.entry.js → p-57827342.entry.js} +1 -1
  465. package/dist/vega/p-59c6f795.js +1 -0
  466. package/dist/vega/{p-f48c43f4.entry.js → p-5a8be21c.entry.js} +1 -1
  467. package/dist/vega/p-5baff397.js +1 -0
  468. package/dist/vega/{p-ffa2e3a6.entry.js → p-5e9f6fb6.entry.js} +1 -1
  469. package/dist/vega/p-5f377954.js +1 -1
  470. package/dist/vega/{p-44c5cbb7.js → p-5f95a2fa.js} +1 -1
  471. package/dist/vega/{p-576fe408.js → p-6216c30e.js} +1 -1
  472. package/dist/vega/{p-367d44d9.entry.js → p-62e80151.entry.js} +1 -1
  473. package/dist/vega/{p-ec1d76c6.entry.js → p-63d73fa0.entry.js} +1 -1
  474. package/dist/vega/{p-612e3ded.js → p-64e22fe5.js} +1 -1
  475. package/dist/vega/{p-0313393d.entry.js → p-679b1f00.entry.js} +1 -1
  476. package/dist/vega/p-6e70d3cc.js +1 -0
  477. package/dist/vega/{p-70f1cf4e.entry.js → p-757bfca2.entry.js} +1 -1
  478. package/dist/vega/{p-c9201bf4.js → p-76063dcb.js} +1 -1
  479. package/dist/vega/{p-8adf9732.entry.js → p-76daa632.entry.js} +1 -1
  480. package/dist/vega/{p-1a2f92a3.entry.js → p-77c6f14a.entry.js} +1 -1
  481. package/dist/vega/{p-382b71a3.entry.js → p-7ac9e8ff.entry.js} +1 -1
  482. package/dist/vega/p-83863463.js +1 -0
  483. package/dist/vega/{p-e84b95d4.js → p-88e6618d.js} +1 -1
  484. package/dist/vega/p-90a0b9f3.entry.js +1 -0
  485. package/dist/vega/{p-1557ed92.entry.js → p-9324dd2c.entry.js} +1 -1
  486. package/dist/vega/{p-cf70c57d.js → p-98c44c03.js} +1 -1
  487. package/dist/vega/p-9aa1c66a.entry.js +1 -0
  488. package/dist/vega/p-9b01a28a.entry.js +1 -0
  489. package/dist/vega/{p-4eb282ef.entry.js → p-9b14ac66.entry.js} +1 -1
  490. package/dist/vega/p-9dcecdd3.js +1 -0
  491. package/dist/vega/p-a1d51bc2.js +1 -0
  492. package/dist/vega/{p-04e56b0c.entry.js → p-ab4b06c9.entry.js} +1 -1
  493. package/dist/vega/{p-b5c2fff3.entry.js → p-ac43be09.entry.js} +1 -1
  494. package/dist/vega/{p-7ceab8c7.entry.js → p-add63fe0.entry.js} +1 -1
  495. package/dist/vega/{p-89e56502.js → p-ae0f03c1.js} +1 -1
  496. package/dist/vega/{p-21c9e1ca.entry.js → p-b525c800.entry.js} +1 -1
  497. package/dist/vega/p-be651266.entry.js +1 -0
  498. package/dist/vega/{p-c045e4c1.entry.js → p-c0d45f77.entry.js} +1 -1
  499. package/dist/vega/{p-204c7d41.js → p-c2e7992b.js} +1 -1
  500. package/dist/vega/{p-b5a6bd0f.entry.js → p-c56aa01c.entry.js} +1 -1
  501. package/dist/vega/{p-2e73582d.entry.js → p-cc3c661c.entry.js} +1 -1
  502. package/dist/vega/{p-cda45d2a.entry.js → p-cda09e99.entry.js} +1 -1
  503. package/dist/vega/{p-d1ca70a1.js → p-d0ac7af8.js} +1 -1
  504. package/dist/vega/p-d289a6af.js +3 -0
  505. package/dist/vega/p-d29e8972.entry.js +1 -0
  506. package/dist/vega/{p-76b80a0c.js → p-d47aa28f.js} +1 -1
  507. package/dist/vega/p-d90eee9a.entry.js +1 -0
  508. package/dist/vega/{p-be3517be.entry.js → p-da742a7f.entry.js} +1 -1
  509. package/dist/vega/p-dc6e7a77.js +1 -0
  510. package/dist/vega/{p-c61279a7.entry.js → p-dcf8f58f.entry.js} +1 -1
  511. package/dist/vega/{p-ab21fdf6.entry.js → p-dff66a67.entry.js} +1 -1
  512. package/dist/vega/{p-90137c68.entry.js → p-e1117034.entry.js} +1 -1
  513. package/dist/vega/p-e223e0dc.entry.js +1 -0
  514. package/dist/vega/p-e22e5aa1.js +1 -0
  515. package/dist/vega/{p-df5bfbc4.entry.js → p-e753fac2.entry.js} +1 -1
  516. package/dist/vega/{p-7912741f.entry.js → p-e7a4b760.entry.js} +1 -1
  517. package/dist/vega/{p-ba415db6.entry.js → p-e8fc8495.entry.js} +1 -1
  518. package/dist/vega/{p-18619467.js → p-ea2b5dbb.js} +1 -1
  519. package/dist/vega/{p-f3456993.entry.js → p-eccabba7.entry.js} +1 -1
  520. package/dist/vega/{p-517434d4.entry.js → p-f0d605e9.entry.js} +1 -1
  521. package/dist/vega/{p-878851f6.js → p-f28a6074.js} +1 -1
  522. package/dist/vega/{p-840ad046.entry.js → p-f2c65579.entry.js} +1 -1
  523. package/dist/vega/{p-07a2b42a.js → p-f2cef51a.js} +1 -1
  524. package/dist/vega/{p-47ca1f69.entry.js → p-f40d479d.entry.js} +1 -1
  525. package/dist/vega/p-f5013494.entry.js +1 -0
  526. package/dist/vega/{p-60cf2a68.js → p-f509b439.js} +1 -1
  527. package/dist/vega/p-f5d3ce94.js +1 -0
  528. package/dist/vega/{p-9551da9c.entry.js → p-f69e2801.entry.js} +1 -1
  529. package/dist/vega/p-fa654762.entry.js +1 -0
  530. package/dist/vega/{p-365d21ac.entry.js → p-fbc5a7f6.entry.js} +1 -1
  531. package/dist/vega/{p-b3e40faf.js → p-fd5ddc55.js} +1 -1
  532. package/dist/vega/p-ff47aeee.entry.js +1 -0
  533. package/dist/vega/vega.esm.js +1 -1
  534. package/package.json +1 -1
  535. package/dist/vega/p-01883ffc.entry.js +0 -1
  536. package/dist/vega/p-02578a59.js +0 -1
  537. package/dist/vega/p-043e685a.entry.js +0 -1
  538. package/dist/vega/p-08780df0.entry.js +0 -1
  539. package/dist/vega/p-10fa4eac.js +0 -1
  540. package/dist/vega/p-203bc4db.entry.js +0 -1
  541. package/dist/vega/p-22336063.js +0 -1
  542. package/dist/vega/p-224b67ff.entry.js +0 -1
  543. package/dist/vega/p-334e3b02.entry.js +0 -1
  544. package/dist/vega/p-559197f8.js +0 -1
  545. package/dist/vega/p-68124bc5.js +0 -1
  546. package/dist/vega/p-6c5250b3.js +0 -1
  547. package/dist/vega/p-6f2e5bc6.js +0 -1
  548. package/dist/vega/p-716c71e6.js +0 -1
  549. package/dist/vega/p-7362723e.entry.js +0 -1
  550. package/dist/vega/p-7942c042.entry.js +0 -1
  551. package/dist/vega/p-8327635d.js +0 -1
  552. package/dist/vega/p-8b891f36.entry.js +0 -1
  553. package/dist/vega/p-9341c1a9.js +0 -1
  554. package/dist/vega/p-9862d1a8.entry.js +0 -1
  555. package/dist/vega/p-a4dbf2cc.js +0 -1
  556. package/dist/vega/p-c4e32125.entry.js +0 -1
  557. package/dist/vega/p-c5b698f6.entry.js +0 -1
  558. package/dist/vega/p-c6d62f0d.js +0 -1
  559. package/dist/vega/p-cdf5b2f0.entry.js +0 -1
  560. package/dist/vega/p-d202e69d.entry.js +0 -1
  561. package/dist/vega/p-dcd18ab1.js +0 -1
  562. package/dist/vega/p-e4726dcd.entry.js +0 -1
  563. package/dist/vega/p-f4190826.entry.js +0 -1
  564. package/dist/vega/p-fdac91c4.entry.js +0 -1
@@ -1 +1 @@
1
- import{h as e,F as t,r as a,c as i,H as o,g as n}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as s,V as l,M as d,I as c}from"./p-6e1ab235.js";import{s as h}from"./p-6bd5c49b.js";import{V as b,I as g}from"./p-4415ad28.js";import{P as v}from"./p-81dd00d0.js";import{d as p}from"./p-1bc5b3bc.js";import{c as u}from"./p-86194314.js";import{D as f}from"./p-878851f6.js";import{V as m,a as y}from"./p-c5eb0fa6.js";import{C as x}from"./p-2d0d575f.js";import{O as w}from"./p-331a62d5.js";import{T}from"./p-a528714c.js";import{f as C}from"./p-dcd18ab1.js";import{S as R}from"./p-1fb56e14.js";import{C as j}from"./p-68a531cf.js";import{c as D}from"./p-d1ca70a1.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-3d2d267d.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-6a334573.js";var I=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class P extends l{getTabMenuContainer(){return this.tabMenuContainer}render(){return e(t,null,e("div",{class:{"tab-content-container":!0,"more-tab":this.tabPages.length>1,"tab-style-secondary":"secondary"===this.variant,"tab-style-primary":"secondary"!==this.variant,"swipe-more-tabs":"scroll"===this.overflow},ref:e=>this.tabMenuContainer=e},"menu"===this.overflow&&this.directionButtonRenderer.render("left"),this.tabListRenderer.render(),"menu"===this.overflow&&this.directionButtonRenderer.render("right")),e("div",{class:"horizontal-divider"}),this.contentRenderer.render())}}I([s()],P.prototype,"tabPages",void 0),I([s()],P.prototype,"variant",void 0),I([s()],P.prototype,"overflow",void 0),I([s({componentFieldName:"vegaTabGroupTabListRenderer"})],P.prototype,"tabListRenderer",void 0),I([s({componentFieldName:"vegaTabGroupDirectionButtonRenderer"})],P.prototype,"directionButtonRenderer",void 0),I([s({componentFieldName:"vegaTabGroupContentRenderer"})],P.prototype,"contentRenderer",void 0);var k=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class S extends l{setSelectedDataTarget(e){this.selectedTabDataTarget=e}handleTabItemClick(e){const t=this.clickEventEmitter.emit(e);t&&!t.defaultPrevented&&(e===this.selectedTabDataTarget?this.vegaTabGroupPageIndexController.setCurrentPageIndexBySelectedTab(e):this.setSelectedDataTarget(e))}}k([s()],S.prototype,"clickEventEmitter",void 0),k([s({writable:!0})],S.prototype,"selectedTabDataTarget",void 0),k([s()],S.prototype,"vegaTabGroupPageIndexController",void 0);class G{paginate(e,t,a){const i=e.map(t);return this.doPaginateByCapacity(e,i,a)}doPaginateByCapacity(e,t,a){const i=[];let o=0;for(;o<t.length;){const n=this.valueSum(o,t,a);if(0===n)break;i.push(e.slice(o,o+n)),o+=n}return i}valueSum(e,t,a){let i=0,o=!1,n=0;const r="function"==typeof a?a(e,t):a;return t.slice(e).forEach(((e,t)=>{i+=e,i>r&&!o&&(o=!0,n=t)})),o||(n=t.slice(e).length),n}}var O=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class A extends v{constructor(){super({callback:()=>{this.initTabPagesWithDebounce()},target:()=>this.host,shouldTrigger:()=>!this.sliderStateController.isAnimationInProgress()}),this.TAB_SIDE_BUTTON_WIDTH=37,this.TAB_SIDE_BUTTON_AND_CONTENT_SPACE=8,this.valuePaginator=new G,this.initTabPagesWithDebounce=p(this.initTabPages,80,this),this.getTabContainerSpace=(e,t)=>{const a=this.host.getBoundingClientRect().width;let i="secondary"===this.variant?a:a-48;return"menu"===this.overflow&&(e>0&&(i-=this.TAB_SIDE_BUTTON_WIDTH+this.TAB_SIDE_BUTTON_AND_CONTENT_SPACE),t.length>0&&t.slice(e).reduce(((e,t)=>e+t))>i&&i>0&&(i-=this.TAB_SIDE_BUTTON_WIDTH)),i},this.emptySourceAndHiddenDropdown=()=>{Array.from(this.host.shadowRoot.querySelectorAll("vega-dropdown")).forEach((async e=>{0===e.source.length&&await e.hide()}))}}componentDidLoad(){this.initTabPages()}componentDidRender(){this.initTabsWidthArray(),this.emptySourceAndHiddenDropdown()}handleGapChange(){this.initTabPages()}handleTabWidthArrayChange(){this.tabWidthArray.length>0&&this.initTabPages()}handleTabItemsChange(){this.initTabPagesWithDebounce()}setTabItems(e){this.tabItems=e}setTabWidthArray(e){this.tabWidthArray=e}initTabPages(){this.tabItems&&(this.tabPages="scroll"===this.overflow?[[...this.tabItems]]:this.valuePaginator.paginate(this.tabItems,((e,t)=>this.tabWidthArray[t]>0?this.tabWidthArray[t]+Number(this.formatAndValidGap(this.gap)):this.tabWidthArray[t]),this.getTabContainerSpace))}formatAndValidGap(e){return e.replace("size-","")}initTabsWidthArray(){if(0===this.tabWidthArray.length||this.tabWidthArray.some((e=>0===e))){const e=[];this.tabItems.forEach((t=>{const a=this.host.shadowRoot.querySelector(`.vega-tab[data-target='${t.dataTarget}']`);if(a){const t=a.getBoundingClientRect().width;e.push(t)}})),e.length>0&&!e.some((e=>0===e))&&(this.tabWidthArray=[...e])}}}O([s()],A.prototype,"host",void 0),O([s()],A.prototype,"gap",void 0),O([s({writable:!0})],A.prototype,"tabPages",void 0),O([s({writable:!0})],A.prototype,"tabWidthArray",void 0),O([s({writable:!0})],A.prototype,"tabItems",void 0),O([s()],A.prototype,"variant",void 0),O([s()],A.prototype,"overflow",void 0),O([s({componentFieldName:"vegaTabGroupSliderStateController"})],A.prototype,"sliderStateController",void 0),O([d("componentDidLoad")],A.prototype,"componentDidLoad",null),O([d("componentDidRender")],A.prototype,"componentDidRender",null),O([d("watchGapChange")],A.prototype,"handleGapChange",null),O([d("watchTabWidthArrayChange")],A.prototype,"handleTabWidthArrayChange",null),O([d("watchTabItemsChange")],A.prototype,"handleTabItemsChange",null);var L=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class z extends l{handleTabPagesChange(){this.selectedTabDataTarget?this.setCurrentPageIndexBySelectedTab(this.selectedTabDataTarget):this.setCurrentPageIndexWhenTabPagesChange()}handleSelectedDataTargetChange(){this.setCurrentPageIndexBySelectedTab(this.selectedTabDataTarget)}setCurrentPageIndexBySelectedTab(e){let t=-1;this.tabPages.forEach(((a,i)=>{-1!==a.findIndex((t=>t.dataTarget===e))&&(t=i)})),t>=0&&(this.currentPageIndex=t)}setPageIndex(e){this.currentPageIndex=e}setCurrentPageIndexWhenTabPagesChange(){this.tabPages&&this.tabPages.length&&!this.tabPages[this.currentPageIndex]&&(this.currentPageIndex=this.tabPages.length-1)}}L([s()],z.prototype,"tabPages",void 0),L([s({writable:!0})],z.prototype,"currentPageIndex",void 0),L([s()],z.prototype,"selectedTabDataTarget",void 0),L([d("watchTabPagesChange")],z.prototype,"handleTabPagesChange",null),L([d("watchSelectedTabDataTargetChange")],z.prototype,"handleSelectedDataTargetChange",null);var B=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class N extends l{constructor(){super(...arguments),this.onCloseTab=e=>{const t=e.currentTarget.closest(".vega-tab"),a=this.tabItems.findIndex((e=>e.dataTarget===t.getAttribute("data-target")));t.classList.contains("selected")&&this.selectedTargetController.setSelectedDataTarget(this.tabItems[a===this.tabItems.length-1?a-1:a+1].dataTarget);const i=this.tabItems.slice(0,a).concat(this.tabItems.slice(a+1));this.tabPagesController.setTabItems(i);const o=this.tabWidthArray.slice(0,a).concat(this.tabWidthArray.slice(a+1));this.tabPagesController.setTabWidthArray(o),e.stopPropagation()}}render(t){return this.showCloseButton&&this.tabItems.length>1&&e("div",{class:this.showCloseButton?"vega-close-icon":"vega-close-icon vega-hidden",onClick:this.onCloseTab,role:"button",tabIndex:t.disabled?-1:0,onKeyDown:u(),"aria-label":"Close Button"},e("vega-icon",{icon:"close",size:"size-12"}))}}B([s()],N.prototype,"tabWidthArray",void 0),B([s()],N.prototype,"showCloseButton",void 0),B([s()],N.prototype,"tabItems",void 0),B([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],N.prototype,"selectedTargetController",void 0),B([s({componentFieldName:"vegaTabGroupPagesController"})],N.prototype,"tabPagesController",void 0);var F=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class W extends l{constructor(){super(...arguments),this.onDirectionButtonClick=e=>{this.pageIndexController.setPageIndex("left"===e?this.currentPageIndex-1:this.currentPageIndex+1)}}getDropdownRef(){return this.dropdownRef}render(t){const a=[];this.tabPages.slice("left"===t?0:this.currentPageIndex+1,"left"===t?this.currentPageIndex:this.tabPages.length).flat().map((e=>{a.push({key:e.dataTarget,label:e.label,disabled:e.disabled})}));const i="left"===t?0===this.currentPageIndex:this.currentPageIndex+1===this.tabPages.length||this.tabPages.length<=1,o="left"===t?"chevron-backward-rounded":"chevron-forward-rounded",n=a.find((e=>e.key===this.selectedTabDataTarget))?this.selectedTabDataTarget:"";return e("div",{class:{"tab-left-button":"left"===t,"tab-right-button":"right"===t,"vega-hidden":i},onClick:()=>this.onDirectionButtonClick(t),"aria-label":"No label defined",role:"button",tabIndex:0,onKeyDown:u()},e("vega-dropdown",{source:a,translocation:{X:0,Y:16},selectType:"single",selectedSourceKey:n,"position-relative-to":this.positionRelativeTo,ref:e=>{this.dropdownRef=e,f.addUniqueObserverToNode(e,m,(e=>{this.vegaTabGroupSelectedTargetController.handleTabItemClick(e.detail)}))}},e("vega-icon",{size:"size-12",icon:o})))}}F([s()],W.prototype,"tabPages",void 0),F([s()],W.prototype,"currentPageIndex",void 0),F([s()],W.prototype,"selectedTabDataTarget",void 0),F([s()],W.prototype,"positionRelativeTo",void 0),F([s({componentFieldName:"vegaTabGroupPageIndexController"})],W.prototype,"pageIndexController",void 0),F([s()],W.prototype,"vegaTabGroupSelectedTargetController",void 0);var E=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class V extends l{constructor(){super(...arguments),this.tabPanels=[],this.handlePanelUpdate=e=>{const{host:t,type:a}=e;"ADD"===a?this.tabPanels.push(t):this.tabPanels=this.tabPanels.filter((e=>e!==t))}}connectedCallback(){this.tabPanelUpdateObserver=new w(this.canAcceptPanelUpdate.bind(this),this.handlePanelUpdate),x.register(T,this.tabPanelUpdateObserver)}disconnectedCallback(){x.unregister(T,this.tabPanelUpdateObserver),this.tabPanels=[]}componentDidLoad(){this.initSelectedTabDataTarget()}watchSelectedTabDataTargetChange(){this.updateTabPanelsStatus(this.selectedTabDataTarget)}canAcceptPanelUpdate(e){const{host:t,type:a}=e;return"ADD"===a?C(e.host,"VEGA-TAB-GROUP")===this.host&&!this.tabPanels.includes(t):this.tabPanels&&this.tabPanels.includes(t)}initSelectedTabDataTarget(){if(this.selectedTabDataTarget)this.updateTabPanelsStatus(this.selectedTabDataTarget);else{let e=this.getDefaultActivePanelId();!e&&this.tabItems&&this.tabItems.length&&(e=this.tabItems[0].dataTarget),e&&this.selectTargetController.setSelectedDataTarget(e)}}getDefaultActivePanelId(){if(this.tabPanels&&this.tabPanels.length){const e=this.tabPanels.find((e=>!0===e.isActive));return e?e.getAttribute("id"):null}}updateTabPanelsStatus(e){this.tabPanels.length&&e&&this.tabPanels.forEach((t=>{const a=t.getAttribute("id");t.isActive=a===e}))}}E([s()],V.prototype,"host",void 0),E([s()],V.prototype,"selectedTabDataTarget",void 0),E([s()],V.prototype,"tabItems",void 0),E([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],V.prototype,"selectTargetController",void 0),E([d("connectedCallback")],V.prototype,"connectedCallback",null),E([d("disconnectedCallback")],V.prototype,"disconnectedCallback",null),E([d("componentDidLoad")],V.prototype,"componentDidLoad",null),E([d("watchSelectedTabDataTargetChange")],V.prototype,"watchSelectedTabDataTargetChange",null);var _=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class K extends l{constructor(){super(...arguments),this.TAB_LABEL_MAX_SIZE=32,this.getCarouselDomRef=()=>this.carouselDom}render(){return e("div",{class:{"tab-list":!0,menu:"menu"===this.overflow,scroll:"scroll"===this.overflow}},"menu"===this.overflow&&this.renderTabListInMenuOverflow(),"scroll"===this.overflow&&this.renderTabListInScrollOverflow())}renderTabListInMenuOverflow(){return e("vega-carousel",{showSlider:!1,ref:e=>this.carouselDom=e},this.tabPages.length>0?this.tabPages.map(((t,a)=>e("div",{key:a},this.renderTabList(t)))):e("div",null,this.renderTabList(this.tabItems)))}renderTabListInScrollOverflow(){return e("div",{class:"overflow-scroll"},this.tabPages.map(((t,a)=>e("div",{key:a},this.renderTabList(t)))))}renderTabList(t){return e("vega-flex",{gap:this.gap},t.map((t=>e("div",{class:{"vega-tab":!0,selected:this.selectedTabDataTarget===t.dataTarget,"last-page":this.currentPageIndex+1===this.tabPages.length,"vega-flex-shrink-0":!0,"v-min-w-min":!0,disabled:Boolean(t.disabled)},"data-target":t.dataTarget,key:t.dataTarget},e("div",{class:"vega-tab-container"},e("div",{class:{label:!0,"vega-close-icon-space":this.showCloseButton},onClick:()=>this.handleTabItemClick(t.dataTarget),"aria-label":t.dataTarget,role:"button",tabIndex:t.disabled?-1:0,onKeyDown:u()},this.renderPrefixIconDom(t),this.renderTabLabelDom(t),this.renderCounterBadgeDom(t)),this.closeButtonRenderer.render(t))))))}renderPrefixIconDom(t){const a=t.prefixIcon;return a&&e("vega-icon",{icon:a})}renderTabLabelDom(t){return t.label.length>this.TAB_LABEL_MAX_SIZE?e("vega-tooltip",{text:t.label,placement:"bottom","position-relative-to":this.positionRelativeTo},e("span",null,t.label.substring(0,this.TAB_LABEL_MAX_SIZE),"...")):t.label}renderCounterBadgeDom(t){const a=t.counterBadge,i=this.getCounterBadgeClassByCount(a);return void 0!==(null==a?void 0:a.count)&&a.count>0&&e("div",{class:`vega-counter-badge ${i}`},e("vega-counter-badge",{count:a.count,color:a.color}))}getCounterBadgeClassByCount(e){if(e&&e.count){const t=e.count.toString().length;return 1===t?"one-digit":2===t?"two-digits":"multi-digits"}return""}handleTabItemClick(e){this.selectedTargetController.handleTabItemClick(e)}}_([s()],K.prototype,"tabPages",void 0),_([s()],K.prototype,"currentPageIndex",void 0),_([s()],K.prototype,"selectedTabDataTarget",void 0),_([s()],K.prototype,"gap",void 0),_([s()],K.prototype,"showCloseButton",void 0),_([s()],K.prototype,"tabItems",void 0),_([s()],K.prototype,"overflow",void 0),_([s()],K.prototype,"positionRelativeTo",void 0),_([s({componentFieldName:"vegaTabGroupCloseButtonRenderer"})],K.prototype,"closeButtonRenderer",void 0),_([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],K.prototype,"selectedTargetController",void 0);class M extends l{render(){return"secondary"===this.variant?e("div",{class:"vega-tab-group-content"},e("slot",null)):e("vega-card",{margin:"0",padding:{default:"size-24",S:"size-12"},variant:"shadow",backgroundColor:"bg-primary"},e("div",{class:"vega-tab-group-content"},e("slot",null)))}}!function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);n>3&&r&&Object.defineProperty(t,a,r)}([s()],M.prototype,"variant",void 0);var U=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class q extends l{constructor(){super(...arguments),this.UPDATE_ANIMATION_FLAG_DELAY=32,this.goToPageTaskQueue=new R,this.pendingCarouselActionCount=0}async componentDidRender(){await this.goToPageTaskQueue.runTask()}async handlePageIndexChange(){const e=this.tabListRenderer.getCarouselDomRef();e&&(this.pendingCarouselActionCount+=1,setTimeout((()=>{this&&"number"==typeof this.pendingCarouselActionCount&&(this.pendingCarouselActionCount-=1)}),this.UPDATE_ANIMATION_FLAG_DELAY),await this.goToPageTaskQueue.enqueue({run:async()=>await e.goToPage(this.currentPageIndex+1)},!1))}isAnimationInProgress(){return this.pendingCarouselActionCount>0}}U([s({componentFieldName:"vegaTabGroupTabListRenderer"})],q.prototype,"tabListRenderer",void 0),U([s()],q.prototype,"currentPageIndex",void 0),U([d("componentDidRender")],q.prototype,"componentDidRender",null),U([d("watchCurrentPageIndexChange")],q.prototype,"handlePageIndexChange",null);const Y=[{payloadKey:"VARIANT_IS_PRIMARY",payloadDescription:"Specifies the visual style and prominence of the tab group",payloadValue:e=>"primary"===e.variant},{payloadKey:"VARIANT_IS_SECONDARY",payloadDescription:"Specifies the visual style and prominence of the tab group",payloadValue:e=>"secondary"===e.variant}];var $=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};const H=class{constructor(e){a(this,e),this.vegaClick=i(this,"vegaClick",7),this.click=i(this,"click",7),this.globalSlimmers={},this.vegaTabGroupRenderer=new P,this.vegaTabGroupDirectionButtonRenderer=new W,this.vegaTabGroupTabListRenderer=new K,this.vegaTabGroupCloseButtonRenderer=new N,this.vegaTabGroupPagesController=new A,this.vegaTabGroupSelectedTargetController=new S,this.vegaTabGroupPageIndexController=new z,this.vegaTabGroupPanelController=new V,this.vegaTabGroupContentRenderer=new M,this.vegaTabGroupSliderStateController=new q,this.clickEventEmitter=D(H,y),this.dropdownEventPrevent=new j([y],(()=>this.vegaTabGroupRenderer.getTabMenuContainer())),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(Y),this.tabPages=[],this.tabWidthArray=[],this.currentPageIndex=0,this.selectedTabDataTarget="",this.gap="size-8",this.showCloseButton=!1,this.tabItems=[],this.variant="primary",this.overflow="menu"}watchTabPagesChange(){}watchTabWidthArrayChange(){}async watchCurrentPageIndexChange(e){}watchSelectedTabDataTargetChange(){}watchGapChange(){}watchTabItemsChange(){}componentDidLoad(){}componentDidRender(){}render(){return h(e("slot",null)),r(e(o,null,this.vegaTabGroupRenderer.render()),this.host)}get host(){return n(this)}static get watchers(){return{tabPages:["watchTabPagesChange"],tabWidthArray:["watchTabWidthArrayChange"],currentPageIndex:["watchCurrentPageIndexChange"],selectedTabDataTarget:["watchSelectedTabDataTargetChange"],gap:["watchGapChange"],tabItems:["watchTabItemsChange"]}}};$([g()],H.prototype,"globalSlimmers",void 0),$([c()],H.prototype,"vegaTabGroupRenderer",void 0),$([c()],H.prototype,"vegaTabGroupDirectionButtonRenderer",void 0),$([c()],H.prototype,"vegaTabGroupTabListRenderer",void 0),$([c()],H.prototype,"vegaTabGroupCloseButtonRenderer",void 0),$([c()],H.prototype,"vegaTabGroupPagesController",void 0),$([c()],H.prototype,"vegaTabGroupSelectedTargetController",void 0),$([c()],H.prototype,"vegaTabGroupPageIndexController",void 0),$([c()],H.prototype,"vegaTabGroupPanelController",void 0),$([c()],H.prototype,"vegaTabGroupContentRenderer",void 0),$([c()],H.prototype,"vegaTabGroupSliderStateController",void 0),$([c()],H.prototype,"clickEventEmitter",void 0),$([c()],H.prototype,"dropdownEventPrevent",void 0),$([c()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),H.style='.tab-content-container.tab-style-primary{margin-left:24px;margin-right:24px}.vega-tab{cursor:pointer;border-top-left-radius:8px;border-top-right-radius:8px;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}.tab-content-container .tab-list.scroll{width:100%;overflow:hidden}.tab-content-container .tab-list.scroll .overflow-scroll>div{display:flex;overflow-x:auto;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.tab-content-container .tab-list.scroll .overflow-scroll>div::-webkit-scrollbar{display:none}.tab-content-container.more-tab .vega-tab{flex-grow:1}.tab-content-container.more-tab .vega-tab.last-page{flex-grow:0}.vega-tab>div.vega-tab-container{display:flex;align-items:center}.vega-tab>div.vega-tab-container>div{flex-grow:1}.tab-style-primary .vega-tab:hover{background-color:rgba(var(--v-bg-tab-hover, 245, 247, 247, 1))}.tab-style-primary .vega-tab.selected,.tab-style-primary .vega-tab.selected:hover{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-tab>div>.label{display:inline-flex;align-items:center;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;padding-top:8px;padding-bottom:8px;padding-left:16px;padding-right:16px;cursor:pointer;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-tab>div>.label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-tab>div>.label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-tab>div>.label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.vega-tab>div>.label vega-icon{padding-right:8px}.vega-tab>div>.label .vega-counter-badge{position:relative;height:20px;padding-left:8px}.vega-tab>div>.label .vega-counter-badge vega-counter-badge{position:absolute;padding-left:8px;top:10px}.vega-tab>div>.label .vega-counter-badge.one-digit{width:20px}.vega-tab>div>.label .vega-counter-badge.one-digit vega-counter-badge{left:10px}.vega-tab>div>.label .vega-counter-badge.two-digits{width:28px}.vega-tab>div>.label .vega-counter-badge.two-digits vega-counter-badge{left:14px}.vega-tab>div>.label .vega-counter-badge.multi-digits{width:32px}.vega-tab>div>.label .vega-counter-badge.multi-digits vega-counter-badge{left:16px}.vega-tab>div>.label.vega-close-icon-space{padding-right:12px}.vega-tab>div>div.vega-close-icon{padding-left:0px;flex-grow:0;padding-right:13px}.vega-tab>div>div.vega-hidden{display:none}.vega-tab>div vega-icon{color:rgba(var(--v-text-primary, 32, 54, 69, 1));box-sizing:content-box}.vega-tab>div>div.vega-close-icon vega-icon{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-tab.disabled{pointer-events:none;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}.vega-tab.disabled .label,.vega-tab.disabled vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host{display:block;width:100%;text-align:left;line-height:normal;min-width:270px}.horizontal-divider{height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1));width:100%;display:none;margin-top:-1px}.tab-content-container{display:flex;gap:8px;justify-content:space-between}.tab-content-container.more-tab .tab-list{width:100%}div.tab-left-button,div.tab-right-button{display:inline-block;cursor:pointer;border-top-left-radius:8px;border-top-right-radius:8px;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1))}div.tab-left-button.vega-hidden,div.tab-right-button.vega-hidden{display:none}div.tab-left-button vega-icon,div.tab-right-button vega-icon{box-sizing:content-box;padding:13px 13px 13px 12px}.vega-tab-group-content vega-tab-group-panel{display:none}.vega-tab-group-content vega-tab-group-panel.active{display:block}.tab-style-secondary .vega-tab>div.vega-tab-container{align-items:baseline}.tab-style-secondary+.horizontal-divider{display:block}.tab-style-secondary .vega-tab{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}.tab-style-secondary .vega-tab>div>.label{padding-left:16px;padding-right:16px;padding-top:0px;padding-bottom:12px}.tab-style-secondary .vega-tab.selected>div>.label,.tab-style-secondary .vega-tab.selected>div>.label vega-icon,.tab-style-secondary .vega-tab:hover>div>.label,.tab-style-secondary .vega-tab:hover>div>.label vega-icon{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.tab-style-secondary .vega-tab{border-top-width:0px;border-left-width:0px;border-right-width:0px;border-bottom-width:2px;border-style:solid;border-color:transparent}.tab-style-secondary .vega-tab.selected{border-color:rgba(var(--v-border-color-action, 19, 98, 226, 1))}.tab-style-secondary div.tab-left-button,.tab-style-secondary div.tab-right-button{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}.tab-style-secondary div.tab-left-button vega-icon,.tab-style-secondary div.tab-right-button vega-icon{padding:6px 13px 13px 6px}.tab-style-secondary div.tab-left-button:hover vega-icon,.tab-style-secondary div.tab-right-button:hover vega-icon{color:rgba(var(--v-text-link, 19, 98, 226, 1))}';var X=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};const J=class{constructor(e){a(this,e),this.globalSlimmers={},this.clickEventPrevent=new j([y],(()=>this.host),void 0,!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.isActive=!1}connectedCallback(){this.notifyGroupAddOrDelPanel("ADD")}disconnectedCallback(){this.notifyGroupAddOrDelPanel("DEL")}componentWillLoad(){this.notifyGroupAddOrDelPanel("ADD")}render(){return r(e(o,{class:this.isActive?"active":""},e("slot",null)),this.host)}notifyGroupAddOrDelPanel(e){x.notify(T,{host:this.host,type:e})}get host(){return n(this)}};X([g()],J.prototype,"globalSlimmers",void 0),X([c()],J.prototype,"clickEventPrevent",void 0),X([c()],J.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),J.style=":host{display:none}:host(.active){display:block}";export{H as vega_tab_group,J as vega_tab_group_panel}
1
+ import{h as e,F as t,r as a,c as i,H as o,g as n}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as s,V as l,M as d,I as c}from"./p-6e1ab235.js";import{s as h}from"./p-6bd5c49b.js";import{V as b,I as g}from"./p-4415ad28.js";import{P as v}from"./p-81dd00d0.js";import{d as p}from"./p-1bc5b3bc.js";import{c as u}from"./p-86194314.js";import{D as f}from"./p-f28a6074.js";import{V as m,a as y}from"./p-c5eb0fa6.js";import{C as x}from"./p-2d0d575f.js";import{O as w}from"./p-331a62d5.js";import{T}from"./p-a528714c.js";import{f as C}from"./p-6e70d3cc.js";import{S as R}from"./p-1fb56e14.js";import{C as j}from"./p-68a531cf.js";import{c as D}from"./p-d0ac7af8.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-3d2d267d.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-6a334573.js";var I=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class P extends l{getTabMenuContainer(){return this.tabMenuContainer}render(){return e(t,null,e("div",{class:{"tab-content-container":!0,"more-tab":this.tabPages.length>1,"tab-style-secondary":"secondary"===this.variant,"tab-style-primary":"secondary"!==this.variant,"swipe-more-tabs":"scroll"===this.overflow},ref:e=>this.tabMenuContainer=e},"menu"===this.overflow&&this.directionButtonRenderer.render("left"),this.tabListRenderer.render(),"menu"===this.overflow&&this.directionButtonRenderer.render("right")),e("div",{class:"horizontal-divider"}),this.contentRenderer.render())}}I([s()],P.prototype,"tabPages",void 0),I([s()],P.prototype,"variant",void 0),I([s()],P.prototype,"overflow",void 0),I([s({componentFieldName:"vegaTabGroupTabListRenderer"})],P.prototype,"tabListRenderer",void 0),I([s({componentFieldName:"vegaTabGroupDirectionButtonRenderer"})],P.prototype,"directionButtonRenderer",void 0),I([s({componentFieldName:"vegaTabGroupContentRenderer"})],P.prototype,"contentRenderer",void 0);var k=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class S extends l{setSelectedDataTarget(e){this.selectedTabDataTarget=e}handleTabItemClick(e){const t=this.clickEventEmitter.emit(e);t&&!t.defaultPrevented&&(e===this.selectedTabDataTarget?this.vegaTabGroupPageIndexController.setCurrentPageIndexBySelectedTab(e):this.setSelectedDataTarget(e))}}k([s()],S.prototype,"clickEventEmitter",void 0),k([s({writable:!0})],S.prototype,"selectedTabDataTarget",void 0),k([s()],S.prototype,"vegaTabGroupPageIndexController",void 0);class G{paginate(e,t,a){const i=e.map(t);return this.doPaginateByCapacity(e,i,a)}doPaginateByCapacity(e,t,a){const i=[];let o=0;for(;o<t.length;){const n=this.valueSum(o,t,a);if(0===n)break;i.push(e.slice(o,o+n)),o+=n}return i}valueSum(e,t,a){let i=0,o=!1,n=0;const r="function"==typeof a?a(e,t):a;return t.slice(e).forEach(((e,t)=>{i+=e,i>r&&!o&&(o=!0,n=t)})),o||(n=t.slice(e).length),n}}var O=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class A extends v{constructor(){super({callback:()=>{this.initTabPagesWithDebounce()},target:()=>this.host,shouldTrigger:()=>!this.sliderStateController.isAnimationInProgress()}),this.TAB_SIDE_BUTTON_WIDTH=37,this.TAB_SIDE_BUTTON_AND_CONTENT_SPACE=8,this.valuePaginator=new G,this.initTabPagesWithDebounce=p(this.initTabPages,80,this),this.getTabContainerSpace=(e,t)=>{const a=this.host.getBoundingClientRect().width;let i="secondary"===this.variant?a:a-48;return"menu"===this.overflow&&(e>0&&(i-=this.TAB_SIDE_BUTTON_WIDTH+this.TAB_SIDE_BUTTON_AND_CONTENT_SPACE),t.length>0&&t.slice(e).reduce(((e,t)=>e+t))>i&&i>0&&(i-=this.TAB_SIDE_BUTTON_WIDTH)),i},this.emptySourceAndHiddenDropdown=()=>{Array.from(this.host.shadowRoot.querySelectorAll("vega-dropdown")).forEach((async e=>{0===e.source.length&&await e.hide()}))}}componentDidLoad(){this.initTabPages()}componentDidRender(){this.initTabsWidthArray(),this.emptySourceAndHiddenDropdown()}handleGapChange(){this.initTabPages()}handleTabWidthArrayChange(){this.tabWidthArray.length>0&&this.initTabPages()}handleTabItemsChange(){this.initTabPagesWithDebounce()}setTabItems(e){this.tabItems=e}setTabWidthArray(e){this.tabWidthArray=e}initTabPages(){this.tabItems&&(this.tabPages="scroll"===this.overflow?[[...this.tabItems]]:this.valuePaginator.paginate(this.tabItems,((e,t)=>this.tabWidthArray[t]>0?this.tabWidthArray[t]+Number(this.formatAndValidGap(this.gap)):this.tabWidthArray[t]),this.getTabContainerSpace))}formatAndValidGap(e){return e.replace("size-","")}initTabsWidthArray(){if(0===this.tabWidthArray.length||this.tabWidthArray.some((e=>0===e))){const e=[];this.tabItems.forEach((t=>{const a=this.host.shadowRoot.querySelector(`.vega-tab[data-target='${t.dataTarget}']`);if(a){const t=a.getBoundingClientRect().width;e.push(t)}})),e.length>0&&!e.some((e=>0===e))&&(this.tabWidthArray=[...e])}}}O([s()],A.prototype,"host",void 0),O([s()],A.prototype,"gap",void 0),O([s({writable:!0})],A.prototype,"tabPages",void 0),O([s({writable:!0})],A.prototype,"tabWidthArray",void 0),O([s({writable:!0})],A.prototype,"tabItems",void 0),O([s()],A.prototype,"variant",void 0),O([s()],A.prototype,"overflow",void 0),O([s({componentFieldName:"vegaTabGroupSliderStateController"})],A.prototype,"sliderStateController",void 0),O([d("componentDidLoad")],A.prototype,"componentDidLoad",null),O([d("componentDidRender")],A.prototype,"componentDidRender",null),O([d("watchGapChange")],A.prototype,"handleGapChange",null),O([d("watchTabWidthArrayChange")],A.prototype,"handleTabWidthArrayChange",null),O([d("watchTabItemsChange")],A.prototype,"handleTabItemsChange",null);var L=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class z extends l{handleTabPagesChange(){this.selectedTabDataTarget?this.setCurrentPageIndexBySelectedTab(this.selectedTabDataTarget):this.setCurrentPageIndexWhenTabPagesChange()}handleSelectedDataTargetChange(){this.setCurrentPageIndexBySelectedTab(this.selectedTabDataTarget)}setCurrentPageIndexBySelectedTab(e){let t=-1;this.tabPages.forEach(((a,i)=>{-1!==a.findIndex((t=>t.dataTarget===e))&&(t=i)})),t>=0&&(this.currentPageIndex=t)}setPageIndex(e){this.currentPageIndex=e}setCurrentPageIndexWhenTabPagesChange(){this.tabPages&&this.tabPages.length&&!this.tabPages[this.currentPageIndex]&&(this.currentPageIndex=this.tabPages.length-1)}}L([s()],z.prototype,"tabPages",void 0),L([s({writable:!0})],z.prototype,"currentPageIndex",void 0),L([s()],z.prototype,"selectedTabDataTarget",void 0),L([d("watchTabPagesChange")],z.prototype,"handleTabPagesChange",null),L([d("watchSelectedTabDataTargetChange")],z.prototype,"handleSelectedDataTargetChange",null);var B=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class N extends l{constructor(){super(...arguments),this.onCloseTab=e=>{const t=e.currentTarget.closest(".vega-tab"),a=this.tabItems.findIndex((e=>e.dataTarget===t.getAttribute("data-target")));t.classList.contains("selected")&&this.selectedTargetController.setSelectedDataTarget(this.tabItems[a===this.tabItems.length-1?a-1:a+1].dataTarget);const i=this.tabItems.slice(0,a).concat(this.tabItems.slice(a+1));this.tabPagesController.setTabItems(i);const o=this.tabWidthArray.slice(0,a).concat(this.tabWidthArray.slice(a+1));this.tabPagesController.setTabWidthArray(o),e.stopPropagation()}}render(t){return this.showCloseButton&&this.tabItems.length>1&&e("div",{class:this.showCloseButton?"vega-close-icon":"vega-close-icon vega-hidden",onClick:this.onCloseTab,role:"button",tabIndex:t.disabled?-1:0,onKeyDown:u(),"aria-label":"Close Button"},e("vega-icon",{icon:"close",size:"size-12"}))}}B([s()],N.prototype,"tabWidthArray",void 0),B([s()],N.prototype,"showCloseButton",void 0),B([s()],N.prototype,"tabItems",void 0),B([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],N.prototype,"selectedTargetController",void 0),B([s({componentFieldName:"vegaTabGroupPagesController"})],N.prototype,"tabPagesController",void 0);var F=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class W extends l{constructor(){super(...arguments),this.onDirectionButtonClick=e=>{this.pageIndexController.setPageIndex("left"===e?this.currentPageIndex-1:this.currentPageIndex+1)}}getDropdownRef(){return this.dropdownRef}render(t){const a=[];this.tabPages.slice("left"===t?0:this.currentPageIndex+1,"left"===t?this.currentPageIndex:this.tabPages.length).flat().map((e=>{a.push({key:e.dataTarget,label:e.label,disabled:e.disabled})}));const i="left"===t?0===this.currentPageIndex:this.currentPageIndex+1===this.tabPages.length||this.tabPages.length<=1,o="left"===t?"chevron-backward-rounded":"chevron-forward-rounded",n=a.find((e=>e.key===this.selectedTabDataTarget))?this.selectedTabDataTarget:"";return e("div",{class:{"tab-left-button":"left"===t,"tab-right-button":"right"===t,"vega-hidden":i},onClick:()=>this.onDirectionButtonClick(t),"aria-label":"No label defined",role:"button",tabIndex:0,onKeyDown:u()},e("vega-dropdown",{source:a,translocation:{X:0,Y:16},selectType:"single",selectedSourceKey:n,"position-relative-to":this.positionRelativeTo,ref:e=>{this.dropdownRef=e,f.addUniqueObserverToNode(e,m,(e=>{this.vegaTabGroupSelectedTargetController.handleTabItemClick(e.detail)}))}},e("vega-icon",{size:"size-12",icon:o})))}}F([s()],W.prototype,"tabPages",void 0),F([s()],W.prototype,"currentPageIndex",void 0),F([s()],W.prototype,"selectedTabDataTarget",void 0),F([s()],W.prototype,"positionRelativeTo",void 0),F([s({componentFieldName:"vegaTabGroupPageIndexController"})],W.prototype,"pageIndexController",void 0),F([s()],W.prototype,"vegaTabGroupSelectedTargetController",void 0);var E=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class V extends l{constructor(){super(...arguments),this.tabPanels=[],this.handlePanelUpdate=e=>{const{host:t,type:a}=e;"ADD"===a?this.tabPanels.push(t):this.tabPanels=this.tabPanels.filter((e=>e!==t))}}connectedCallback(){this.tabPanelUpdateObserver=new w(this.canAcceptPanelUpdate.bind(this),this.handlePanelUpdate),x.register(T,this.tabPanelUpdateObserver)}disconnectedCallback(){x.unregister(T,this.tabPanelUpdateObserver),this.tabPanels=[]}componentDidLoad(){this.initSelectedTabDataTarget()}watchSelectedTabDataTargetChange(){this.updateTabPanelsStatus(this.selectedTabDataTarget)}canAcceptPanelUpdate(e){const{host:t,type:a}=e;return"ADD"===a?C(e.host,"VEGA-TAB-GROUP")===this.host&&!this.tabPanels.includes(t):this.tabPanels&&this.tabPanels.includes(t)}initSelectedTabDataTarget(){if(this.selectedTabDataTarget)this.updateTabPanelsStatus(this.selectedTabDataTarget);else{let e=this.getDefaultActivePanelId();!e&&this.tabItems&&this.tabItems.length&&(e=this.tabItems[0].dataTarget),e&&this.selectTargetController.setSelectedDataTarget(e)}}getDefaultActivePanelId(){if(this.tabPanels&&this.tabPanels.length){const e=this.tabPanels.find((e=>!0===e.isActive));return e?e.getAttribute("id"):null}}updateTabPanelsStatus(e){this.tabPanels.length&&e&&this.tabPanels.forEach((t=>{const a=t.getAttribute("id");t.isActive=a===e}))}}E([s()],V.prototype,"host",void 0),E([s()],V.prototype,"selectedTabDataTarget",void 0),E([s()],V.prototype,"tabItems",void 0),E([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],V.prototype,"selectTargetController",void 0),E([d("connectedCallback")],V.prototype,"connectedCallback",null),E([d("disconnectedCallback")],V.prototype,"disconnectedCallback",null),E([d("componentDidLoad")],V.prototype,"componentDidLoad",null),E([d("watchSelectedTabDataTargetChange")],V.prototype,"watchSelectedTabDataTargetChange",null);var _=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class K extends l{constructor(){super(...arguments),this.TAB_LABEL_MAX_SIZE=32,this.getCarouselDomRef=()=>this.carouselDom}render(){return e("div",{class:{"tab-list":!0,menu:"menu"===this.overflow,scroll:"scroll"===this.overflow}},"menu"===this.overflow&&this.renderTabListInMenuOverflow(),"scroll"===this.overflow&&this.renderTabListInScrollOverflow())}renderTabListInMenuOverflow(){return e("vega-carousel",{showSlider:!1,ref:e=>this.carouselDom=e},this.tabPages.length>0?this.tabPages.map(((t,a)=>e("div",{key:a},this.renderTabList(t)))):e("div",null,this.renderTabList(this.tabItems)))}renderTabListInScrollOverflow(){return e("div",{class:"overflow-scroll"},this.tabPages.map(((t,a)=>e("div",{key:a},this.renderTabList(t)))))}renderTabList(t){return e("vega-flex",{gap:this.gap},t.map((t=>e("div",{class:{"vega-tab":!0,selected:this.selectedTabDataTarget===t.dataTarget,"last-page":this.currentPageIndex+1===this.tabPages.length,"vega-flex-shrink-0":!0,"v-min-w-min":!0,disabled:Boolean(t.disabled)},"data-target":t.dataTarget,key:t.dataTarget},e("div",{class:"vega-tab-container"},e("div",{class:{label:!0,"vega-close-icon-space":this.showCloseButton},onClick:()=>this.handleTabItemClick(t.dataTarget),"aria-label":t.dataTarget,role:"button",tabIndex:t.disabled?-1:0,onKeyDown:u()},this.renderPrefixIconDom(t),this.renderTabLabelDom(t),this.renderCounterBadgeDom(t)),this.closeButtonRenderer.render(t))))))}renderPrefixIconDom(t){const a=t.prefixIcon;return a&&e("vega-icon",{icon:a})}renderTabLabelDom(t){return t.label.length>this.TAB_LABEL_MAX_SIZE?e("vega-tooltip",{text:t.label,placement:"bottom","position-relative-to":this.positionRelativeTo},e("span",null,t.label.substring(0,this.TAB_LABEL_MAX_SIZE),"...")):t.label}renderCounterBadgeDom(t){const a=t.counterBadge,i=this.getCounterBadgeClassByCount(a);return void 0!==(null==a?void 0:a.count)&&a.count>0&&e("div",{class:`vega-counter-badge ${i}`},e("vega-counter-badge",{count:a.count,color:a.color}))}getCounterBadgeClassByCount(e){if(e&&e.count){const t=e.count.toString().length;return 1===t?"one-digit":2===t?"two-digits":"multi-digits"}return""}handleTabItemClick(e){this.selectedTargetController.handleTabItemClick(e)}}_([s()],K.prototype,"tabPages",void 0),_([s()],K.prototype,"currentPageIndex",void 0),_([s()],K.prototype,"selectedTabDataTarget",void 0),_([s()],K.prototype,"gap",void 0),_([s()],K.prototype,"showCloseButton",void 0),_([s()],K.prototype,"tabItems",void 0),_([s()],K.prototype,"overflow",void 0),_([s()],K.prototype,"positionRelativeTo",void 0),_([s({componentFieldName:"vegaTabGroupCloseButtonRenderer"})],K.prototype,"closeButtonRenderer",void 0),_([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],K.prototype,"selectedTargetController",void 0);class M extends l{render(){return"secondary"===this.variant?e("div",{class:"vega-tab-group-content"},e("slot",null)):e("vega-card",{margin:"0",padding:{default:"size-24",S:"size-12"},variant:"shadow",backgroundColor:"bg-primary"},e("div",{class:"vega-tab-group-content"},e("slot",null)))}}!function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);n>3&&r&&Object.defineProperty(t,a,r)}([s()],M.prototype,"variant",void 0);var U=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};class q extends l{constructor(){super(...arguments),this.UPDATE_ANIMATION_FLAG_DELAY=32,this.goToPageTaskQueue=new R,this.pendingCarouselActionCount=0}async componentDidRender(){await this.goToPageTaskQueue.runTask()}async handlePageIndexChange(){const e=this.tabListRenderer.getCarouselDomRef();e&&(this.pendingCarouselActionCount+=1,setTimeout((()=>{this&&"number"==typeof this.pendingCarouselActionCount&&(this.pendingCarouselActionCount-=1)}),this.UPDATE_ANIMATION_FLAG_DELAY),await this.goToPageTaskQueue.enqueue({run:async()=>await e.goToPage(this.currentPageIndex+1)},!1))}isAnimationInProgress(){return this.pendingCarouselActionCount>0}}U([s({componentFieldName:"vegaTabGroupTabListRenderer"})],q.prototype,"tabListRenderer",void 0),U([s()],q.prototype,"currentPageIndex",void 0),U([d("componentDidRender")],q.prototype,"componentDidRender",null),U([d("watchCurrentPageIndexChange")],q.prototype,"handlePageIndexChange",null);const Y=[{payloadKey:"VARIANT_IS_PRIMARY",payloadDescription:"Specifies the visual style and prominence of the tab group",payloadValue:e=>"primary"===e.variant},{payloadKey:"VARIANT_IS_SECONDARY",payloadDescription:"Specifies the visual style and prominence of the tab group",payloadValue:e=>"secondary"===e.variant}];var $=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};const H=class{constructor(e){a(this,e),this.vegaClick=i(this,"vegaClick",7),this.click=i(this,"click",7),this.globalSlimmers={},this.vegaTabGroupRenderer=new P,this.vegaTabGroupDirectionButtonRenderer=new W,this.vegaTabGroupTabListRenderer=new K,this.vegaTabGroupCloseButtonRenderer=new N,this.vegaTabGroupPagesController=new A,this.vegaTabGroupSelectedTargetController=new S,this.vegaTabGroupPageIndexController=new z,this.vegaTabGroupPanelController=new V,this.vegaTabGroupContentRenderer=new M,this.vegaTabGroupSliderStateController=new q,this.clickEventEmitter=D(H,y),this.dropdownEventPrevent=new j([y],(()=>this.vegaTabGroupRenderer.getTabMenuContainer())),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(Y),this.tabPages=[],this.tabWidthArray=[],this.currentPageIndex=0,this.selectedTabDataTarget="",this.gap="size-8",this.showCloseButton=!1,this.tabItems=[],this.variant="primary",this.overflow="menu"}watchTabPagesChange(){}watchTabWidthArrayChange(){}async watchCurrentPageIndexChange(e){}watchSelectedTabDataTargetChange(){}watchGapChange(){}watchTabItemsChange(){}componentDidLoad(){}componentDidRender(){}render(){return h(e("slot",null)),r(e(o,null,this.vegaTabGroupRenderer.render()),this.host)}get host(){return n(this)}static get watchers(){return{tabPages:["watchTabPagesChange"],tabWidthArray:["watchTabWidthArrayChange"],currentPageIndex:["watchCurrentPageIndexChange"],selectedTabDataTarget:["watchSelectedTabDataTargetChange"],gap:["watchGapChange"],tabItems:["watchTabItemsChange"]}}};$([g()],H.prototype,"globalSlimmers",void 0),$([c()],H.prototype,"vegaTabGroupRenderer",void 0),$([c()],H.prototype,"vegaTabGroupDirectionButtonRenderer",void 0),$([c()],H.prototype,"vegaTabGroupTabListRenderer",void 0),$([c()],H.prototype,"vegaTabGroupCloseButtonRenderer",void 0),$([c()],H.prototype,"vegaTabGroupPagesController",void 0),$([c()],H.prototype,"vegaTabGroupSelectedTargetController",void 0),$([c()],H.prototype,"vegaTabGroupPageIndexController",void 0),$([c()],H.prototype,"vegaTabGroupPanelController",void 0),$([c()],H.prototype,"vegaTabGroupContentRenderer",void 0),$([c()],H.prototype,"vegaTabGroupSliderStateController",void 0),$([c()],H.prototype,"clickEventEmitter",void 0),$([c()],H.prototype,"dropdownEventPrevent",void 0),$([c()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),H.style='.tab-content-container.tab-style-primary{margin-left:24px;margin-right:24px}.vega-tab{cursor:pointer;border-top-left-radius:8px;border-top-right-radius:8px;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}.tab-content-container .tab-list.scroll{width:100%;overflow:hidden}.tab-content-container .tab-list.scroll .overflow-scroll>div{display:flex;overflow-x:auto;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.tab-content-container .tab-list.scroll .overflow-scroll>div::-webkit-scrollbar{display:none}.tab-content-container.more-tab .vega-tab{flex-grow:1}.tab-content-container.more-tab .vega-tab.last-page{flex-grow:0}.vega-tab>div.vega-tab-container{display:flex;align-items:center}.vega-tab>div.vega-tab-container>div{flex-grow:1}.tab-style-primary .vega-tab:hover{background-color:rgba(var(--v-bg-tab-hover, 245, 247, 247, 1))}.tab-style-primary .vega-tab.selected,.tab-style-primary .vega-tab.selected:hover{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-tab>div>.label{display:inline-flex;align-items:center;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;padding-top:8px;padding-bottom:8px;padding-left:16px;padding-right:16px;cursor:pointer;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-tab>div>.label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-tab>div>.label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-tab>div>.label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.vega-tab>div>.label vega-icon{padding-right:8px}.vega-tab>div>.label .vega-counter-badge{position:relative;height:20px;padding-left:8px}.vega-tab>div>.label .vega-counter-badge vega-counter-badge{position:absolute;padding-left:8px;top:10px}.vega-tab>div>.label .vega-counter-badge.one-digit{width:20px}.vega-tab>div>.label .vega-counter-badge.one-digit vega-counter-badge{left:10px}.vega-tab>div>.label .vega-counter-badge.two-digits{width:28px}.vega-tab>div>.label .vega-counter-badge.two-digits vega-counter-badge{left:14px}.vega-tab>div>.label .vega-counter-badge.multi-digits{width:32px}.vega-tab>div>.label .vega-counter-badge.multi-digits vega-counter-badge{left:16px}.vega-tab>div>.label.vega-close-icon-space{padding-right:12px}.vega-tab>div>div.vega-close-icon{padding-left:0px;flex-grow:0;padding-right:13px}.vega-tab>div>div.vega-hidden{display:none}.vega-tab>div vega-icon{color:rgba(var(--v-text-primary, 32, 54, 69, 1));box-sizing:content-box}.vega-tab>div>div.vega-close-icon vega-icon{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-tab.disabled{pointer-events:none;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}.vega-tab.disabled .label,.vega-tab.disabled vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host{display:block;width:100%;text-align:left;line-height:normal;min-width:270px}.horizontal-divider{height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1));width:100%;display:none;margin-top:-1px}.tab-content-container{display:flex;gap:8px;justify-content:space-between}.tab-content-container.more-tab .tab-list{width:100%}div.tab-left-button,div.tab-right-button{display:inline-block;cursor:pointer;border-top-left-radius:8px;border-top-right-radius:8px;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1))}div.tab-left-button.vega-hidden,div.tab-right-button.vega-hidden{display:none}div.tab-left-button vega-icon,div.tab-right-button vega-icon{box-sizing:content-box;padding:13px 13px 13px 12px}.vega-tab-group-content vega-tab-group-panel{display:none}.vega-tab-group-content vega-tab-group-panel.active{display:block}.tab-style-secondary .vega-tab>div.vega-tab-container{align-items:baseline}.tab-style-secondary+.horizontal-divider{display:block}.tab-style-secondary .vega-tab{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}.tab-style-secondary .vega-tab>div>.label{padding-left:16px;padding-right:16px;padding-top:0px;padding-bottom:12px}.tab-style-secondary .vega-tab.selected>div>.label,.tab-style-secondary .vega-tab.selected>div>.label vega-icon,.tab-style-secondary .vega-tab:hover>div>.label,.tab-style-secondary .vega-tab:hover>div>.label vega-icon{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.tab-style-secondary .vega-tab{border-top-width:0px;border-left-width:0px;border-right-width:0px;border-bottom-width:2px;border-style:solid;border-color:transparent}.tab-style-secondary .vega-tab.selected{border-color:rgba(var(--v-border-color-action, 19, 98, 226, 1))}.tab-style-secondary div.tab-left-button,.tab-style-secondary div.tab-right-button{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}.tab-style-secondary div.tab-left-button vega-icon,.tab-style-secondary div.tab-right-button vega-icon{padding:6px 13px 13px 6px}.tab-style-secondary div.tab-left-button:hover vega-icon,.tab-style-secondary div.tab-right-button:hover vega-icon{color:rgba(var(--v-text-link, 19, 98, 226, 1))}';var X=function(e,t,a,i){var o,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(n<3?o(r):n>3?o(t,a,r):o(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r};const J=class{constructor(e){a(this,e),this.globalSlimmers={},this.clickEventPrevent=new j([y],(()=>this.host),void 0,!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.isActive=!1}connectedCallback(){this.notifyGroupAddOrDelPanel("ADD")}disconnectedCallback(){this.notifyGroupAddOrDelPanel("DEL")}componentWillLoad(){this.notifyGroupAddOrDelPanel("ADD")}render(){return r(e(o,{class:this.isActive?"active":""},e("slot",null)),this.host)}notifyGroupAddOrDelPanel(e){x.notify(T,{host:this.host,type:e})}get host(){return n(this)}};X([g()],J.prototype,"globalSlimmers",void 0),X([c()],J.prototype,"clickEventPrevent",void 0),X([c()],J.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),J.style=":host{display:none}:host(.active){display:block}";export{H as vega_tab_group,J as vega_tab_group_panel}
@@ -0,0 +1 @@
1
+ import{h as e,r as t,H as i,g as s}from"./p-6b2342e0.js";import{c as o,V as r,I as a}from"./p-6e1ab235.js";import{V as n,I as l}from"./p-4415ad28.js";import{s as c}from"./p-519a7d55.js";import{T as p}from"./p-3224e47c.js";import{V as d}from"./p-82016096.js";import{D as f,d as h}from"./p-f28a6074.js";import{V as m}from"./p-c5eb0fa6.js";import{f as v}from"./p-6e70d3cc.js";import{C as g}from"./p-2d0d575f.js";import{t as u}from"./p-33860e54.js";import{i as b,n as j,s as S,P as y}from"./p-9dcecdd3.js";import"./p-a528714c.js";import"./p-331a62d5.js";var R=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class w extends r{render(){return"pageSizeSelectorMobile"===this.type?this.renderPageSizeSelectorMobile():this.renderPageSizeSelectorMobileAndCurrentPageLabel()}renderPageSizeSelectorMobile(){const e=d.tWithPreservedBlocks("Show [{0} items / page]",w.clickableReg,this.pageSize);return this.renderTranslatedMessage(e)}renderPageSizeSelectorMobileAndCurrentPageLabel(){const e=this.total>0?this.pageSize*(this.current-1)+1:0,t=Math.min(this.current*this.pageSize,this.total),i=d.tWithPreservedBlocks("Viewing [{0}-{1}] of {2}",w.clickableReg,e,t,this.total);return this.renderTranslatedMessage(i)}renderTranslatedMessage(t){return e("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-4"},t.map((t=>t.isPreserved?this.pageSizeSelectorMobileDropdownRenderer.render(e("vega-button-link",{label:t.content})):e("vega-font",{variant:"font-field-label",color:"text-primary"},t.content))))}}w.clickableReg=/(\[[^\]]*\])/g,R([o()],w.prototype,"translationSlimmer",void 0),R([o()],w.prototype,"type",void 0),R([o()],w.prototype,"pageSize",void 0),R([o()],w.prototype,"total",void 0),R([o()],w.prototype,"current",void 0),R([o()],w.prototype,"pageSizeSelectorMobileDropdownRenderer",void 0);var z=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class P extends r{render(t){var i;const s=(this.isAllActive||b(this.pageSizeSelectorOptions,this.pageSize)?this.pageSizeSelectorOptions:[...this.pageSizeSelectorOptions,this.pageSize]).map(j),o=S(s),r=this.translationSlimmer.t("Items Per Page");return e("vega-dropdown",{trigger:"click",selectType:"single",alignment:"center",minWidth:160,selectedSourceKey:(this.isAllActive?y:this.pageSize).toString(),source:[{key:"items-per-page",label:r,children:[...o.map((e=>({key:e.value.toString(),label:e.label})))]}],ref:e=>{f.addUniqueObserverToNode(e,m,(e=>{this.notifyParentPagination(e.detail)}))},isScreenPosition:null===(i=this.dropdownProps)||void 0===i?void 0:i.isScreenPosition},t)}notifyParentPagination(e){const t=v(this.host,"vega-pagination");t&&g.notify(h.getSubject(t,u),{host:this.host,detail:e})}}z([o()],P.prototype,"host",void 0),z([o()],P.prototype,"translationSlimmer",void 0),z([o()],P.prototype,"pageSizeSelectorOptions",void 0),z([o({writable:!0})],P.prototype,"pageSize",void 0),z([o()],P.prototype,"dropdownProps",void 0),z([o()],P.prototype,"total",void 0),z([o()],P.prototype,"isAllActive",void 0);var M=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const O=class{constructor(e){t(this,e),this.globalSlimmers={},this.translationSlimmer=new p,this.vegaComponentUsageRuntimeMetricsSlimmer=new n,this.pageSizeSelectorMobileRenderer=new w,this.pageSizeSelectorMobileDropdownRenderer=new P,this.pageSize=10,this.pageSizeSelectorOptions=[10,20,50,100],this.total=0,this.current=1,this.isAllActive=!1}render(){return c(e(i,null,this.pageSizeSelectorMobileRenderer.render()),this.host)}get host(){return s(this)}};M([l()],O.prototype,"globalSlimmers",void 0),M([a()],O.prototype,"translationSlimmer",void 0),M([a()],O.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),M([a()],O.prototype,"pageSizeSelectorMobileRenderer",void 0),M([a()],O.prototype,"pageSizeSelectorMobileDropdownRenderer",void 0),O.style=":host{display:inline-block}";export{O as vega_pagination_page_size_selector_mobile}
@@ -0,0 +1 @@
1
+ import{h as e,F as t,r as s,c as r,H as o,g as i}from"./p-6b2342e0.js";import{m as a,W as n}from"./p-c5eb0fa6.js";import{s as p}from"./p-519a7d55.js";import{c,V as l,M as g,I as d}from"./p-6e1ab235.js";import{V as h,I as v}from"./p-4415ad28.js";import{c as f}from"./p-d0ac7af8.js";import{c as u}from"./p-2a9960c9.js";import{d as m,D as b}from"./p-f28a6074.js";import{c as x}from"./p-86194314.js";import{C as _}from"./p-2d0d575f.js";import{D as w}from"./p-33860e54.js";import{n as y}from"./p-262ec334.js";import{O as k}from"./p-331a62d5.js";import{S}from"./p-1fb56e14.js";import{c as C}from"./p-262a27d0.js";import{M as j}from"./p-78a57a17.js";import{P as z}from"./p-81dd00d0.js";import{R}from"./p-0d205fbf.js";import{x as D}from"./p-83863463.js";import{g as O}from"./p-49a2e141.js";import{A as P}from"./p-4d65756f.js";import{S as I}from"./p-6216c30e.js";import"./p-6a334573.js";import"./p-3d2d267d.js";import"./p-b75ee3ba.js";import"./p-a841cf13.js";import"./p-6e70d3cc.js";import"./p-d4ea8e22.js";import"./p-0c667d6a.js";import"./p-ed45b3b6.js";import"./p-d27ae9ff.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-d884c644.js";import"./p-82016096.js";import"./p-a528714c.js";const L=[{payloadKey:"COMPLETED_STEP_ARRAY_IS_EMPTY",payloadDescription:"@deprecated Specifies an array of completed step titles for the Progress Tracker component.",payloadValue:e=>0===e.completedStepArray.length},{payloadKey:"COMPLETED_STEP_ARRAY_IS_NOT_EMPTY",payloadDescription:"@deprecated Specifies an array of completed step titles for the Progress Tracker component.",payloadValue:e=>e.completedStepArray.length>0}];var A=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class E extends l{constructor(){super(...arguments),this.renderStepIcon=(t,s)=>e("div",{class:"vega-progress-step-icon-container"},e("div",{class:"vega-progress-step__icon"},t.isCompleted()?e("vega-icon",{icon:"checkmark-rounded",size:"size-16"}):e("span",null,s+1))),this.renderStep=(t,s)=>{var r;return e("div",{role:t.clickable?"button":null,class:["vega-progress-step",t.progressStatus,t.isCurrent?"current":"",t.clickable?"":"disabled"].filter(Boolean).join(" "),"data-index":s,tabIndex:t.clickable?0:null,onClick:t.clickable?this.onStepIconClick:null,onKeyDown:t.clickable?x():null,"aria-label":t.title},e("div",{class:"vega-progress-step-icon-divider"},e("div",{class:"vega-progress-step__divider left "+((null===(r=this.currentSteps[s-1])||void 0===r?void 0:r.isCompleted())?"background":"")}),this.renderStepIcon(t,s),e("div",{class:"vega-progress-step__divider right "+(t.isCompleted()?"complete":"default")})),e("div",{class:"vega-progress-step__title"},this.renderStepTitle(t,s,"top")))},this.onStepIconClick=e=>{const t=Number(e.currentTarget.getAttribute("data-index"));_.notify(m.getSubject(this.host,w),t)}}async gotoCarouselPage(e){const t=null!=e?e:this.current;this.carouselContainerRef.getBoundingClientRect().width>0&&await this.carouselRef.goToPage(t+1)}render(){return e(t,null,e("div",{class:"vega-progress-tracker__container"},e("div",{class:"vega-progress-tracker__slot"},this.currentSteps.map(((e,t)=>this.renderStep(e,t))))),e("div",{class:"vega-progress-tracker__box",ref:e=>this.carouselContainerRef=e},e("vega-carousel",{showSlider:!1,itemsPerPage:1,canSwipe:this.canClickStep,ref:e=>(b.addUniqueObserverToNode(e,a,(async e=>{await this.host.setCurrent(e.detail-1)})),this.carouselRef=e)},this.currentSteps.map(((e,t)=>this.renderStepTitle(e,t,"carousel"))))))}renderStepTitle(t,s,r){const o="horizontal-compact"===this.currentDirection;if(o&&"carousel"===r||!o&&"top"===r)return this.renderModeController.isSourceRenderMode()?e("vega-progress-tracker-step",{key:t.stepKey,stepKey:t.stepKey},t.title):e("slot",{name:`step-${s}`})}}A([c()],E.prototype,"host",void 0),A([c()],E.prototype,"currentSteps",void 0),A([c()],E.prototype,"canClickStep",void 0),A([c()],E.prototype,"current",void 0),A([c()],E.prototype,"deprecatedPropertySlimmer",void 0),A([c()],E.prototype,"currentStepController",void 0),A([c()],E.prototype,"currentDirection",void 0),A([c()],E.prototype,"renderModeController",void 0);var T,M=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class U extends l{constructor(){super(...arguments),this.goToPageTaskQueue=new S,this.updateCurrent=e=>{this.current=y(e,0,this.currentSteps.length-1)}}connectedCallback(){this.initStepClickObserver()}disconnectedCallback(){this.removeStepClickObserver()}componentDidLoad(){this.updateCurrent(this.current)}async componentDidRender(){await this.goToPageTaskQueue.runTask()}async watchCurrentChange(){var e;this.updateCurrent(this.current),this.currentStepUpdateEventEmitter.emit(null===(e=this.currentSteps[this.current])||void 0===e?void 0:e.stepKey),await this.renderer.gotoCarouselPage()}watchSteps(){this.updateCurrent(this.current)}nextStep(){this.updateCurrent(++this.current)}prevStep(){this.updateCurrent(--this.current)}setCurrent(e){this.updateCurrent(e)}async watchDirection(){await this.goToPageTaskQueue.enqueue({run:async()=>await this.renderer.gotoCarouselPage()},!1)}initStepClickObserver(){this.stepClickObserver=new k(this.canAcceptStepClickEvent.bind(this),this.updateCurrent.bind(this)),_.register(m.getSubject(this.host,w),this.stepClickObserver)}removeStepClickObserver(){_.unregister(m.getSubject(this.host,w),this.stepClickObserver)}canAcceptStepClickEvent(){return!0}}M([c()],U.prototype,"currentSteps",void 0),M([c({writable:!0})],U.prototype,"current",void 0),M([c()],U.prototype,"currentStepUpdateEventEmitter",void 0),M([c()],U.prototype,"renderer",void 0),M([c()],U.prototype,"host",void 0),M([g("connectedCallback")],U.prototype,"connectedCallback",null),M([g("disconnectedCallback")],U.prototype,"disconnectedCallback",null),M([g("componentDidLoad")],U.prototype,"componentDidLoad",null),M([g("componentDidRender")],U.prototype,"componentDidRender",null),M([g("watchCurrentChange")],U.prototype,"watchCurrentChange",null),M([g("watchSteps")],U.prototype,"watchSteps",null),M([g("nextStep")],U.prototype,"nextStep",null),M([g("prevStep")],U.prototype,"prevStep",null),M([g("setCurrent")],U.prototype,"setCurrent",null),M([g("watchDirection")],U.prototype,"watchDirection",null),function(e){e.DEFAULT="default",e.IN_PROGRESS="inProgress",e.COMPLETE="complete"}(T||(T={}));class q{constructor(e,t,s,r,o){this.stepKey=e,this.title=t,this.progressStatus=s,this.isCurrent=r,this.clickable=o}static fromSteps(e,t,s,r){return t.map(((t,o)=>{const i="string"==typeof t?t:t.title;return new q(i,i,this.getStepStatus(i,o,s,r),o===s,this.getIsStepClickable(e,t))}))}static fromHostSlot(e,t,s){return Array.from(e.querySelectorAll("vega-progress-tracker-step")).map(((r,o)=>{const i=r.stepKey;return new q(i,"",this.getStepStatus(i,o,t,s),o===t,this.getIsStepClickable(e,r))}))}static getIsStepClickable(e,t){return"string"==typeof t?e.canClickStep:!!e.canClickStep&&("boolean"==typeof t.clickable?t.clickable:e.canClickStep)}isCompleted(){return this.progressStatus===T.COMPLETE}}q.getStepStatus=(e,t,s,r)=>r.includes(e)?T.COMPLETE:t===s?T.IN_PROGRESS:T.DEFAULT;var W=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class K extends l{constructor(){super(...arguments),this.mutationObserver=new j({target:()=>this.host,options:{childList:!0,subtree:!0},callback:()=>{this.appendSlotAttribute(),this.syncUpCurrentSteps()}})}connectedCallback(){this.appendSlotAttribute()}disconnectedCallback(){}componentWillLoad(){this.syncUpCurrentSteps()}componentDidLoad(){}watchSteps(){this.syncUpCurrentSteps()}watchCurrentChange(){this.syncUpCurrentSteps()}watchCompletedStepArray(){this.syncUpCurrentSteps()}watchCompletedSteps(){this.syncUpCurrentSteps()}syncUpCurrentSteps(){this.currentSteps=this.renderModeController.isSourceRenderMode()?q.fromSteps(this.host,this.steps,this.current,this.deprecatedPropertySlimmer.getValue()):q.fromHostSlot(this.host,this.current,this.deprecatedPropertySlimmer.getValue())}appendSlotAttribute(){this.renderModeController.isSourceRenderMode()||Array.from(this.host.querySelectorAll("vega-progress-tracker-step")).map(((e,t)=>{e.setAttribute("slot",`step-${t}`)}))}}W([c()],K.prototype,"host",void 0),W([c()],K.prototype,"steps",void 0),W([c({writable:!0})],K.prototype,"currentSteps",void 0),W([c()],K.prototype,"renderModeController",void 0),W([c()],K.prototype,"current",void 0),W([c()],K.prototype,"deprecatedPropertySlimmer",void 0),W([d()],K.prototype,"mutationObserver",void 0),W([g("connectedCallback")],K.prototype,"connectedCallback",null),W([g("disconnectedCallback")],K.prototype,"disconnectedCallback",null),W([g("componentWillLoad")],K.prototype,"componentWillLoad",null),W([g("componentDidLoad")],K.prototype,"componentDidLoad",null),W([g("watchSteps")],K.prototype,"watchSteps",null),W([g("watchCurrentChange")],K.prototype,"watchCurrentChange",null),W([g("watchCompletedStepArray")],K.prototype,"watchCompletedStepArray",null),W([g("watchCompletedSteps")],K.prototype,"watchCompletedSteps",null);var N=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class V extends l{constructor(){super(...arguments),this.renderMode="SOURCE"}connectedCallback(){this.setRenderMode()}isSourceRenderMode(){return"SOURCE"===this.renderMode}setRenderMode(){this.renderMode=this.host.querySelector("vega-progress-tracker-step")?"SLOT":"SOURCE"}}N([c()],V.prototype,"host",void 0),N([g("connectedCallback")],V.prototype,"connectedCallback",null);var Y=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class H extends P{constructor(){super(...arguments),this.pageResizeObserverSlimmer=new z({callback:async()=>{const e=this.current,t=this.currentDirection;this.setCurrentDirection(),t!==this.currentDirection?this.enqueueSyncCarouselPage(e):await this.renderer.gotoCarouselPage(e)}})}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){this.setCurrentDirection()}componentDidLoad(){}watchDirection(){this.setCurrentDirection()}async doTask(){}enqueueSyncCarouselPage(e){this.autoRunTaskQueue.enqueue({run:async()=>{await this.renderer.gotoCarouselPage(e)}},!1)}setCurrentDirection(){let e=R.formatCustom(this.direction)||"vertical";["default","S"].includes(O())&&!D(this.direction)&&(e="horizontal-compact"),this.currentDirection=e}}Y([c()],H.prototype,"direction",void 0),Y([c()],H.prototype,"current",void 0),Y([c()],H.prototype,"renderer",void 0),Y([c({writable:!0})],H.prototype,"currentDirection",void 0),Y([d()],H.prototype,"pageResizeObserverSlimmer",void 0),Y([g("connectedCallback")],H.prototype,"connectedCallback",null),Y([g("disconnectedCallback")],H.prototype,"disconnectedCallback",null),Y([g("componentWillLoad")],H.prototype,"componentWillLoad",null),Y([g("componentDidLoad")],H.prototype,"componentDidLoad",null),Y([g("watchDirection")],H.prototype,"watchDirection",null);var $=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};const B=class{constructor(e){s(this,e),this.vegaCurrentStepUpdate=r(this,"vegaCurrentStepUpdate",7),this.currentStepUpdate=r(this,"currentStepUpdate",7),this.globalSlimmers={},this.renderModeController=new V,this.currentStepsController=new K,this.currentStepController=new U,this.currentDirectionController=new H,this.renderer=new E,this.currentStepUpdateEventEmitter=f(B,n),this.currentStepsSubStateSlimmer=C(B,"currentSteps","watchCurrentSteps"),this.deprecatedPropertySlimmer=u(B,"completedSteps","completedStepArray",[]),this.vegaComponentUsageRuntimeMetricsSlimmer=new h(L),this.currentSteps=[],this.current=0,this.direction="vertical",this.steps=[],this.completedStepArray=[],this.completedSteps=[],this.canClickStep=!0}watchCurrentSteps(){}async watchCurrentChange(){}async watchDirection(){}watchSteps(){}watchCompletedStepArray(){}watchCompletedSteps(){}async nextStep(){}async prevStep(){}async setCurrent(e){}async getCurrent(){return this.current}render(){return p(e(o,{class:{"vega-progress-tracker":!0,[this.currentDirection]:!0,"click-step-disabled":!this.canClickStep}},this.renderer.render()),this.host)}get host(){return i(this)}static get watchers(){return{currentSteps:["watchCurrentSteps"],current:["watchCurrentChange"],direction:["watchDirection"],steps:["watchSteps"],completedStepArray:["watchCompletedStepArray"],completedSteps:["watchCompletedSteps"]}}};$([v()],B.prototype,"globalSlimmers",void 0),$([d()],B.prototype,"renderModeController",void 0),$([d()],B.prototype,"currentStepsController",void 0),$([d()],B.prototype,"currentStepController",void 0),$([d()],B.prototype,"currentDirectionController",void 0),$([d()],B.prototype,"renderer",void 0),$([d()],B.prototype,"currentStepUpdateEventEmitter",void 0),$([d()],B.prototype,"currentStepsSubStateSlimmer",void 0),$([d()],B.prototype,"deprecatedPropertySlimmer",void 0),$([d()],B.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),B.style=':host .vega-progress-tracker__container{display:flex;align-items:center;padding-top:0px;padding-bottom:0px}:host .vega-progress-tracker__slot{width:100%;display:block}:host .vega-progress-step{display:flex;gap:16px}:host(:not(.click-step-disabled)) .vega-progress-step{cursor:pointer}:host(:not(.click-step-disabled)) .vega-progress-step.default:hover .vega-progress-step__icon{background-color:rgba(var(--v-bg-action-quaternary-hover, 239, 239, 239, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.default .vega-progress-step__icon:hover{background-color:rgba(var(--v-bg-action-quaternary-hover, 239, 239, 239, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.default:active .vega-progress-step__icon{background-color:rgba(var(--v-bg-action-quaternary-active, 205, 209, 211, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.inProgress .vega-progress-step__icon:hover,:host(:not(.click-step-disabled)) .vega-progress-step.current .vega-progress-step__icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.inProgress:hover .vega-progress-step__icon,:host(:not(.click-step-disabled)) .vega-progress-step.current:hover .vega-progress-step__icon{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.inProgress:active .vega-progress-step__icon,:host(:not(.click-step-disabled)) .vega-progress-step.current:active .vega-progress-step__icon{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.complete:hover .vega-progress-step__icon{border-color:rgba(var(--v-border-color-action-hover, 4, 112, 236, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.complete:hover .vega-progress-step__icon vega-icon{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.complete:active .vega-progress-step__icon{border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.complete:active .vega-progress-step__icon vega-icon{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.complete.current:hover .vega-progress-step__icon vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.disabled{cursor:initial}:host(:not(.click-step-disabled)) .vega-progress-step.disabled.default:hover .vega-progress-step__icon{background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.disabled.default:active .vega-progress-step__icon{background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.disabled.inProgress:hover .vega-progress-step__icon,:host(:not(.click-step-disabled)) .vega-progress-step.disabled.current:hover .vega-progress-step__icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host .vega-progress-step:focus-visible{outline-width:0px}:host .vega-progress-step:focus-visible .vega-progress-step-icon-container{border-radius:8px;outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-progress-step .vega-progress-step-icon-divider{display:flex;flex-direction:column;align-items:center;gap:0px}:host .vega-progress-step .vega-progress-step-icon-container{padding:8px}:host .vega-progress-step .vega-progress-step__icon{display:block;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:9999px;box-sizing:content-box;height:32px;width:32px;min-width:32px;line-height:32px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-progress-step .vega-progress-step__icon{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-progress-step .vega-progress-step__icon{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-progress-step .vega-progress-step__icon{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-progress-step .vega-progress-step__icon span{display:block}:host .vega-progress-step .vega-progress-step__icon:not(.disable-responsive){line-height:32px}:host .vega-progress-step .vega-progress-step__divider{width:1px;flex-grow:1;height:100%;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1));display:block}:host .vega-progress-step .vega-progress-step__divider.right.complete{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host .vega-progress-step .vega-progress-step__divider.left{display:none}:host .vega-progress-step:last-child .vega-progress-step__divider.right{display:none}:host .vega-progress-step.default .vega-progress-step__icon{color:rgba(var(--v-text-primary, 32, 54, 69, 1));background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}:host .vega-progress-step.complete .vega-progress-step__icon{display:flex;justify-content:center;align-items:center;background-color:rgba(var(--v-bg-action-tertiary, 0, 0, 0, 0));box-sizing:border-box;border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action, 19, 98, 226, 1))}:host .vega-progress-step.complete .vega-progress-step__icon vega-icon{color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-progress-step.complete.current .vega-progress-step__icon vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}:host .vega-progress-step.inProgress .vega-progress-step__icon,:host .vega-progress-step.current .vega-progress-step__icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}:host(.horizontal-compact){flex:1 1 100%;padding-top:0px}:host(.horizontal-compact) .vega-progress-tracker__container{padding-top:16px;padding-bottom:16px}:host(.horizontal-compact) .vega-progress-tracker__slot{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:0px}:host(.horizontal-compact) .vega-progress-step{display:flex;flex-grow:1;flex-basis:0}:host(.horizontal-compact) .vega-progress-step .vega-progress-step-icon-divider{display:flex;flex-direction:row;gap:4px;width:100%}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__icon{height:16px;width:16px;min-width:16px}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__icon{line-height:16px}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__icon vega-icon{height:8px;width:8px}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__icon span{display:none}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__divider{height:1px;flex-grow:1}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__divider.left{display:block}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__divider.left.background{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__divider.right{display:block}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__title{display:none}:host(.horizontal-compact) .vega-progress-step:first-child .vega-progress-step__divider.left{opacity:0}:host(.horizontal-compact) .vega-progress-step:last-child .vega-progress-step__divider.right{display:block;opacity:0}:host(:not(.horizontal-compact)) .vega-progress-tracker__box{display:none}:host(.vertical) .vega-progress-step__title{padding-top:12px;padding-bottom:36px}:host(.horizontal){display:block;overflow-x:auto;padding-top:4px}:host(.horizontal) .vega-progress-tracker__slot{display:flex}:host(.horizontal) .vega-progress-step{flex-direction:column;align-items:center;gap:4px;flex-grow:1;flex-basis:0}:host(.horizontal) .vega-progress-step .vega-progress-step-icon-divider{flex-direction:row;align-items:center;gap:4px;width:100%}:host(.horizontal) .vega-progress-step .vega-progress-step__divider{height:1px;display:block}:host(.horizontal) .vega-progress-step .vega-progress-step__divider.left{display:block}:host(.horizontal) .vega-progress-step .vega-progress-step__divider.right.complete{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.horizontal) .vega-progress-step .vega-progress-step__divider.left.background{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.horizontal) .vega-progress-step .vega-progress-step__title{padding-top:0px;padding-bottom:0px;text-align:center;padding-left:4px;padding-right:4px}:host(.horizontal) .vega-progress-step:first-child .vega-progress-step__divider.left{opacity:0}:host(.horizontal) .vega-progress-step:last-child .vega-progress-step__divider.right{display:block;opacity:0}:host vega-carousel .subTitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;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-carousel .subTitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host vega-carousel .subTitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host vega-carousel .subTitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-progress-tracker__box{display:flex;align-items:center}:host .vega-progress-tracker__box vega-carousel{width:100%;text-align:center}';var F=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class G extends I{constructor(){super({parent:"vega-progress-tracker",subStates:[{subStateName:"status",parentStateName:"currentSteps",callback:e=>{const t=e.find((e=>e.stepKey===this.stepKey));this.progressStatus=t.progressStatus,this.isCurrent=t.isCurrent}}]})}}F([c()],G.prototype,"host",void 0),F([c({writable:!0})],G.prototype,"progressStatus",void 0),F([c({writable:!0})],G.prototype,"isCurrent",void 0),F([c()],G.prototype,"stepKey",void 0);var J=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};const Q=class{constructor(e){s(this,e),this.globalSlimmers={},this.stateController=new G,this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.progressStatus=T.DEFAULT,this.isCurrent=!1,this.stepKey="",this.clickable=!0}render(){return p(e(o,null,e("div",{class:{"title-container":!0,[this.progressStatus]:!0,current:this.isCurrent}},e("slot",null))),this.host)}get host(){return i(this)}};J([v()],Q.prototype,"globalSlimmers",void 0),J([d()],Q.prototype,"stateController",void 0),J([d()],Q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Q.style=':host .title-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));display:block}@media screen and (min-width: 768px) and (max-width: 1023px){:host .title-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .title-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .title-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .title-container.inProgress,:host .title-container.current{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .title-container.inProgress,:host .title-container.current{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .title-container.inProgress,:host .title-container.current{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .title-container.inProgress,:host .title-container.current{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:22px;letter-spacing:0px}}:host .title-container.complete{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}';export{B as vega_progress_tracker,Q as vega_progress_tracker_step}
@@ -1 +1 @@
1
- import{r as e,h as t,H as a,g as i}from"./p-6b2342e0.js";import{c as r,M as o,V as s,I as n}from"./p-6e1ab235.js";import{V as l,I as d}from"./p-4415ad28.js";import{I as c}from"./p-781fd6e0.js";import{s as g}from"./p-519a7d55.js";import{a as h}from"./p-dcd18ab1.js";import{R as p}from"./p-716c71e6.js";import{g as m}from"./p-49a2e141.js";import{P as f}from"./p-81dd00d0.js";import"./p-262ec334.js";import"./p-c6d62f0d.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-82016096.js";import"./p-2d0d575f.js";import"./p-a528714c.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-b75ee3ba.js";var v=function(e,t,a,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,a,i);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,a,s):r(t,a))||s);return o>3&&s&&Object.defineProperty(t,a,s),s};class b extends s{connectedCallback(){this.setIndex()}disconnectedCallback(){this.removeIndex()}setIndex(){const e=document.querySelector(this.host.dataset.container);e&&"BODY"===e.tagName&&c.setZIndex(this.host,"base")}removeIndex(){c.removeZIndex(this.host,"base")}}v([r()],b.prototype,"host",void 0),v([o("connectedCallback")],b.prototype,"connectedCallback",null),v([o("disconnectedCallback")],b.prototype,"disconnectedCallback",null);var x=function(e,t,a,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,a,i);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,a,s):r(t,a))||s);return o>3&&s&&Object.defineProperty(t,a,s),s};const u=class{constructor(t){e(this,t),this.globalSlimmers={},this.manageVegaLoaderWrapperZIndexController=new b,this.vegaComponentUsageRuntimeMetricsSlimmer=new l}render(){return t(a,{class:"vega-loader-wrapper"},t("slot",null))}get host(){return i(this)}};x([d()],u.prototype,"globalSlimmers",void 0),x([n()],u.prototype,"manageVegaLoaderWrapperZIndexController",void 0),x([n()],u.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),u.style=":host{display:block;display:inline-flex;align-items:center;justify-content:center;top:0px;right:0px;bottom:0px;left:0px;background-color:rgba(var(--v-bg-backdrop-loading, 255, 255, 255, 0.5))}:host(.absolute-wrapper){position:absolute}:host(.fixed-wrapper){width:100%;height:100%;position:fixed}";const k=[{payloadKey:"MODE_IS_INDETERMINATE",payloadDescription:"Specifies the mode of the loading indicator",payloadValue:e=>"indeterminate"===e.mode},{payloadKey:"MODE_IS_DETERMINATE",payloadDescription:"Specifies the mode of the loading indicator",payloadValue:e=>"determinate"===e.mode}];var w=function(e,t,a,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,a,i);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,a,s):r(t,a))||s);return o>3&&s&&Object.defineProperty(t,a,s),s};const y=class{constructor(a){e(this,a),this.globalSlimmers={},this.pageResizeObserverSlimmer=new f,this.vegaComponentUsageRuntimeMetricsSlimmer=new l(k),this.currentBreakpoint=m(),this.shape="circle",this.size="default",this.mode="indeterminate",this.percent=0,this.label="",this.hint="",this.status="default",this.renderCircleLoader=()=>{const e=this.getCircleLoaderRadius(this.getResponsiveSize()),a="indeterminate"===this.mode?.75:this.percent/100,i=2*Math.PI*e,r="error"===this.status?i:i*a;return t("svg",{class:"circle-loader"},t("circle",{r:e,class:"circle-loader-track",part:"circle-loader-track"}),t("circle",{r:e,class:"circle-loader-progress",part:"circle-loader-progress","stroke-linecap":"indeterminate"===this.mode?"round":"butt","stroke-dasharray":[r,i].join(" ")}),"determinate"===this.mode&&t("circle",{r:e,class:h(["circle-loader-progress-pointer",0===a&&"v-hidden"].filter(Boolean)),"stroke-dashoffset":-r,"stroke-dasharray":[0,i].join(" ")}))},this.renderBarLoader=()=>{let e=75;return"determinate"===this.mode&&(e="error"===this.status?100:this.percent),t("div",{class:"bar-loader-track"},t("div",{class:h(["bar-loader",this.getResponsiveSize()]),style:{width:`${e}%`}}))},this.renderLabelAndHint=()=>{if(this.label||this.hint)return t("vega-flex",{direction:"col",gap:"size-4",alignItems:"center"},this.label&&t("span",{class:"vega-loading-indicator-label"},this.label),this.hint&&t("span",{class:"vega-loading-indicator-hint"},this.hint))},this.getResponsiveSize=()=>p.formatCustom(this.size),this.getCircleLoaderRadius=e=>{switch(e){case"micro":return 6.5;case"small":return 10;case"large":return 52;default:return 20}}}render(){const e=h([this.getResponsiveSize(),this.mode,`status-${this.status}`,this.shape].map((e=>`vega-loading-indicator-${e}`)));return g(t(a,{class:e},t("vega-flex",{direction:"col",gap:"size-16",alignItems:"center"},"circle"===this.shape?this.renderCircleLoader():this.renderBarLoader(),this.renderLabelAndHint())),this.host)}get host(){return i(this)}};w([d()],y.prototype,"globalSlimmers",void 0),w([n()],y.prototype,"pageResizeObserverSlimmer",void 0),w([n()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=':host{display:inline-block}:host(.vega-loading-indicator-bar){width:100%}:host(.vega-loading-indicator-indeterminate) .circle-loader{animation:circle-loader-animation 2000ms linear infinite;transform:rotate(-90deg)}:host(.vega-loading-indicator-determinate) .circle-loader{transform:rotate(-180deg)}:host(.vega-loading-indicator-default) .circle-loader{width:48px;height:48px}:host(.vega-loading-indicator-micro) .circle-loader{width:16px;height:16px}:host(.vega-loading-indicator-small) .circle-loader{width:24px;height:24px}:host(.vega-loading-indicator-large) .circle-loader{width:120px;height:120px}:host .circle-loader-track{stroke:rgba(var(--v-bg-loading-track, 229, 239, 255, 1));fill:none;cy:50%;cx:50%}:host .circle-loader-progress-pointer.v-hidden{display:none}:host .circle-loader-progress-pointer,:host .circle-loader-progress{stroke:rgba(var(--v-bg-loading-progress, 153, 192, 255, 1));fill:none;cy:50%;cx:50%}:host(.vega-loading-indicator-status-success) .circle-loader-progress-pointer,:host(.vega-loading-indicator-status-success) .circle-loader-progress{stroke:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.vega-loading-indicator-status-error) .circle-loader-progress-pointer,:host(.vega-loading-indicator-status-error) .circle-loader-progress{stroke:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.vega-loading-indicator-default) .circle-loader-progress-pointer,:host(.vega-loading-indicator-default) .circle-loader-track,:host(.vega-loading-indicator-default) .circle-loader-progress{stroke-width:8px}:host .circle-loader-progress-pointer{stroke-linecap:round}:host(.vega-loading-indicator-micro) .circle-loader-progress-pointer,:host(.vega-loading-indicator-micro) .circle-loader-track,:host(.vega-loading-indicator-micro) .circle-loader-progress{stroke-width:3px}:host(.vega-loading-indicator-small) .circle-loader-progress-pointer,:host(.vega-loading-indicator-small) .circle-loader-track,:host(.vega-loading-indicator-small) .circle-loader-progress{stroke-width:4px}:host(.vega-loading-indicator-large) .circle-loader-progress-pointer,:host(.vega-loading-indicator-large) .circle-loader-track,:host(.vega-loading-indicator-large) .circle-loader-progress{stroke-width:16px}@keyframes circle-loader-animation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host .bar-loader{border-radius:9999px;position:absolute;box-sizing:border-box;height:8px;background-color:rgba(var(--v-bg-loading-progress, 153, 192, 255, 1));content:"";width:75%;top:0;left:0}:host(.vega-loading-indicator-status-success) .bar-loader{background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.vega-loading-indicator-status-error) .bar-loader{background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.vega-loading-indicator-micro) .bar-loader,:host(.vega-loading-indicator-micro) .bar-loader-track{height:3px}:host(.vega-loading-indicator-small) .bar-loader,:host(.vega-loading-indicator-small) .bar-loader-track{height:4px}:host(.vega-loading-indicator-large) .bar-loader,:host(.vega-loading-indicator-large) .bar-loader-track{height:16px}:host(.vega-loading-indicator-indeterminate) .bar-loader{animation:bar-loader-animation 1250ms cubic-bezier(0.75, 0, 0.5, 1) infinite;animation-delay:50ms}@keyframes bar-loader-animation{0%{left:0;transform:translateX(-100%)}100%{left:100%;transform:translateX(0%)}}:host .bar-loader-track{display:inline-block;border-radius:9999px;position:relative;overflow:hidden;height:8px;width:100%;background-color:rgba(var(--v-bg-loading-track, 229, 239, 255, 1))}:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;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-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-loading-indicator-hint{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-loading-indicator-hint{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-loading-indicator-hint{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-loading-indicator-hint{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}';export{u as vega_loader_wrapper,y as vega_loading_indicator}
1
+ import{r as e,h as t,H as a,g as i}from"./p-6b2342e0.js";import{c as r,M as o,V as s,I as n}from"./p-6e1ab235.js";import{V as l,I as d}from"./p-4415ad28.js";import{I as c}from"./p-781fd6e0.js";import{s as g}from"./p-519a7d55.js";import{a as h}from"./p-6e70d3cc.js";import{R as p}from"./p-0d205fbf.js";import{g as m}from"./p-49a2e141.js";import{P as f}from"./p-81dd00d0.js";import"./p-262ec334.js";import"./p-83863463.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-82016096.js";import"./p-2d0d575f.js";import"./p-a528714c.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-b75ee3ba.js";var v=function(e,t,a,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,a,i);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,a,s):r(t,a))||s);return o>3&&s&&Object.defineProperty(t,a,s),s};class b extends s{connectedCallback(){this.setIndex()}disconnectedCallback(){this.removeIndex()}setIndex(){const e=document.querySelector(this.host.dataset.container);e&&"BODY"===e.tagName&&c.setZIndex(this.host,"base")}removeIndex(){c.removeZIndex(this.host,"base")}}v([r()],b.prototype,"host",void 0),v([o("connectedCallback")],b.prototype,"connectedCallback",null),v([o("disconnectedCallback")],b.prototype,"disconnectedCallback",null);var x=function(e,t,a,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,a,i);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,a,s):r(t,a))||s);return o>3&&s&&Object.defineProperty(t,a,s),s};const u=class{constructor(t){e(this,t),this.globalSlimmers={},this.manageVegaLoaderWrapperZIndexController=new b,this.vegaComponentUsageRuntimeMetricsSlimmer=new l}render(){return t(a,{class:"vega-loader-wrapper"},t("slot",null))}get host(){return i(this)}};x([d()],u.prototype,"globalSlimmers",void 0),x([n()],u.prototype,"manageVegaLoaderWrapperZIndexController",void 0),x([n()],u.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),u.style=":host{display:block;display:inline-flex;align-items:center;justify-content:center;top:0px;right:0px;bottom:0px;left:0px;background-color:rgba(var(--v-bg-backdrop-loading, 255, 255, 255, 0.5))}:host(.absolute-wrapper){position:absolute}:host(.fixed-wrapper){width:100%;height:100%;position:fixed}";const k=[{payloadKey:"MODE_IS_INDETERMINATE",payloadDescription:"Specifies the mode of the loading indicator",payloadValue:e=>"indeterminate"===e.mode},{payloadKey:"MODE_IS_DETERMINATE",payloadDescription:"Specifies the mode of the loading indicator",payloadValue:e=>"determinate"===e.mode}];var w=function(e,t,a,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,a,i);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,a,s):r(t,a))||s);return o>3&&s&&Object.defineProperty(t,a,s),s};const y=class{constructor(a){e(this,a),this.globalSlimmers={},this.pageResizeObserverSlimmer=new f,this.vegaComponentUsageRuntimeMetricsSlimmer=new l(k),this.currentBreakpoint=m(),this.shape="circle",this.size="default",this.mode="indeterminate",this.percent=0,this.label="",this.hint="",this.status="default",this.renderCircleLoader=()=>{const e=this.getCircleLoaderRadius(this.getResponsiveSize()),a="indeterminate"===this.mode?.75:this.percent/100,i=2*Math.PI*e,r="error"===this.status?i:i*a;return t("svg",{class:"circle-loader"},t("circle",{r:e,class:"circle-loader-track",part:"circle-loader-track"}),t("circle",{r:e,class:"circle-loader-progress",part:"circle-loader-progress","stroke-linecap":"indeterminate"===this.mode?"round":"butt","stroke-dasharray":[r,i].join(" ")}),"determinate"===this.mode&&t("circle",{r:e,class:h(["circle-loader-progress-pointer",0===a&&"v-hidden"].filter(Boolean)),"stroke-dashoffset":-r,"stroke-dasharray":[0,i].join(" ")}))},this.renderBarLoader=()=>{let e=75;return"determinate"===this.mode&&(e="error"===this.status?100:this.percent),t("div",{class:"bar-loader-track"},t("div",{class:h(["bar-loader",this.getResponsiveSize()]),style:{width:`${e}%`}}))},this.renderLabelAndHint=()=>{if(this.label||this.hint)return t("vega-flex",{direction:"col",gap:"size-4",alignItems:"center"},this.label&&t("span",{class:"vega-loading-indicator-label"},this.label),this.hint&&t("span",{class:"vega-loading-indicator-hint"},this.hint))},this.getResponsiveSize=()=>p.formatCustom(this.size),this.getCircleLoaderRadius=e=>{switch(e){case"micro":return 6.5;case"small":return 10;case"large":return 52;default:return 20}}}render(){const e=h([this.getResponsiveSize(),this.mode,`status-${this.status}`,this.shape].map((e=>`vega-loading-indicator-${e}`)));return g(t(a,{class:e},t("vega-flex",{direction:"col",gap:"size-16",alignItems:"center"},"circle"===this.shape?this.renderCircleLoader():this.renderBarLoader(),this.renderLabelAndHint())),this.host)}get host(){return i(this)}};w([d()],y.prototype,"globalSlimmers",void 0),w([n()],y.prototype,"pageResizeObserverSlimmer",void 0),w([n()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=':host{display:inline-block}:host(.vega-loading-indicator-bar){width:100%}:host(.vega-loading-indicator-indeterminate) .circle-loader{animation:circle-loader-animation 2000ms linear infinite;transform:rotate(-90deg)}:host(.vega-loading-indicator-determinate) .circle-loader{transform:rotate(-180deg)}:host(.vega-loading-indicator-default) .circle-loader{width:48px;height:48px}:host(.vega-loading-indicator-micro) .circle-loader{width:16px;height:16px}:host(.vega-loading-indicator-small) .circle-loader{width:24px;height:24px}:host(.vega-loading-indicator-large) .circle-loader{width:120px;height:120px}:host .circle-loader-track{stroke:rgba(var(--v-bg-loading-track, 229, 239, 255, 1));fill:none;cy:50%;cx:50%}:host .circle-loader-progress-pointer.v-hidden{display:none}:host .circle-loader-progress-pointer,:host .circle-loader-progress{stroke:rgba(var(--v-bg-loading-progress, 153, 192, 255, 1));fill:none;cy:50%;cx:50%}:host(.vega-loading-indicator-status-success) .circle-loader-progress-pointer,:host(.vega-loading-indicator-status-success) .circle-loader-progress{stroke:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.vega-loading-indicator-status-error) .circle-loader-progress-pointer,:host(.vega-loading-indicator-status-error) .circle-loader-progress{stroke:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.vega-loading-indicator-default) .circle-loader-progress-pointer,:host(.vega-loading-indicator-default) .circle-loader-track,:host(.vega-loading-indicator-default) .circle-loader-progress{stroke-width:8px}:host .circle-loader-progress-pointer{stroke-linecap:round}:host(.vega-loading-indicator-micro) .circle-loader-progress-pointer,:host(.vega-loading-indicator-micro) .circle-loader-track,:host(.vega-loading-indicator-micro) .circle-loader-progress{stroke-width:3px}:host(.vega-loading-indicator-small) .circle-loader-progress-pointer,:host(.vega-loading-indicator-small) .circle-loader-track,:host(.vega-loading-indicator-small) .circle-loader-progress{stroke-width:4px}:host(.vega-loading-indicator-large) .circle-loader-progress-pointer,:host(.vega-loading-indicator-large) .circle-loader-track,:host(.vega-loading-indicator-large) .circle-loader-progress{stroke-width:16px}@keyframes circle-loader-animation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host .bar-loader{border-radius:9999px;position:absolute;box-sizing:border-box;height:8px;background-color:rgba(var(--v-bg-loading-progress, 153, 192, 255, 1));content:"";width:75%;top:0;left:0}:host(.vega-loading-indicator-status-success) .bar-loader{background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.vega-loading-indicator-status-error) .bar-loader{background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.vega-loading-indicator-micro) .bar-loader,:host(.vega-loading-indicator-micro) .bar-loader-track{height:3px}:host(.vega-loading-indicator-small) .bar-loader,:host(.vega-loading-indicator-small) .bar-loader-track{height:4px}:host(.vega-loading-indicator-large) .bar-loader,:host(.vega-loading-indicator-large) .bar-loader-track{height:16px}:host(.vega-loading-indicator-indeterminate) .bar-loader{animation:bar-loader-animation 1250ms cubic-bezier(0.75, 0, 0.5, 1) infinite;animation-delay:50ms}@keyframes bar-loader-animation{0%{left:0;transform:translateX(-100%)}100%{left:100%;transform:translateX(0%)}}:host .bar-loader-track{display:inline-block;border-radius:9999px;position:relative;overflow:hidden;height:8px;width:100%;background-color:rgba(var(--v-bg-loading-track, 229, 239, 255, 1))}:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;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-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-loading-indicator-hint{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-loading-indicator-hint{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-loading-indicator-hint{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-loading-indicator-hint{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}';export{u as vega_loader_wrapper,y as vega_loading_indicator}
@@ -1 +1 @@
1
- import{V as t,I as e,c as s,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-02841589.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,a as l,b as h,F as c,c as d,d as u,e as f}from"./p-a528714c.js";import{f as m,d as p}from"./p-dcd18ab1.js";import{a as v,g as b}from"./p-8b5d3a52.js";import{c as R}from"./p-6a334573.js";import{d as g,D as j}from"./p-878851f6.js";import{h as y,f as w,i as O}from"./p-33860e54.js";import{V as E}from"./p-82016096.js";import{h as V,l as F}from"./p-f0e828d8.js";import{P as I}from"./p-81dd00d0.js";import{I as C}from"./p-abd7aeaa.js";import{M as S}from"./p-78a57a17.js";import{A}from"./p-52b8f2d2.js";import{i as k}from"./p-d27ae9ff.js";import{S as T}from"./p-576fe408.js";class L{constructor(t){this.rule=t}getStatus(t,e,s){return{canEvaluate:this.rule.canEvaluate(t,e,s),isAsync:v(this.rule.evaluate)}}shouldShowError(t,e){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,e):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class M{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,e,s){return!!this.handlers.find((i=>{const r=i.getStatus(t,e,s);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new L(t))):[]}async process(t,e,s,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,e,s);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(e,s);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=b();return this.processId=t,t}postProcess(t,e,s,i){this.processId===t&&i(e,s)}}class D{run(t){const e=t.nextElementSibling;return e&&e.querySelector(".vega-error")?e.querySelector(".vega-error"):null}}class B{run(t){let e=t.nextElementSibling;return e&&!e.classList.contains("vega-error")&&(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class H{run(t){let e=t.nextElementSibling;return e||(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class U extends t{getTranslatedMessage(t){return"string"==typeof t?E.t(t):E.t(t.key,...t.args||[])}}var x=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class G extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new U,this.fieldErrorUiControllerStrategies=[new D,new B,new H],this.initTranslationObserver()}applyInputInvalidUI(t){const e=this.getInputElementContainer();if(o.notify(g.getSubject(this.host,y),{host:this.host,showError:!0}),e&&(e.classList.add("error"),t)){this.errorMessage=t;const s=this.getErrorContainer(e);s.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),F),s.classList.remove("vega-hidden")}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(g.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const e of this.fieldErrorUiControllerStrategies){const s=e.run(t);if(s)return s}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const e=this.getErrorContainer(t);e&&(e.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage),F))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}x([e()],G.prototype,"formFieldMessageTranslatorSlimmer",void 0),x([s()],G.prototype,"host",void 0),x([s()],G.prototype,"options",void 0);var P=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class W{constructor(t,e,s,i){var r,n;this.formFieldMessageTranslatorSlimmer=new U,this.fieldErrorUIController=new G,this.resizeObserverSlimmer=R(W,I,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const e=this.isVisible,s=t[0].contentRect.height>0;this.isVisible=s,this.isAutoValidationEnabled()&&m(this.host,"vega-form")&&e!==s&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new M,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,e)=>{let s=!0;return e?("rule"===t?e.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI(),s=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(s),o.notify(l,{host:this.host,detail:s}),s},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>t&&!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=e,this.defaultValue=s,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((e=>this.overrideDefaultRuleByAdditionalRule(e,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,e="rule"){const s=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,s,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,s,t,e,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((e=>e.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const e=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(e===t?[]:["touched"])}updateIsModified(t){const e=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(e===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return m(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var e,s;if(this.shouldVisitElement(this.host,null===(e=t.option)||void 0===e?void 0:e.skipDisabled,null===(s=t.option)||void 0===s?void 0:s.skipInvisible)){const e=t.defaultValueMap,s=this.host.dataset.vegaForm,i=null==e[s]?this.getDefaultValue():e[s];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,e,s){return!(!t.dataset.vegaForm||e&&t.disabled||s&&!p(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{if(this.canSubmitFormByEvent(t)){const t=m(this.host,"vega-form",{outerMost:!0});t&&o.notify(g.getSubject(t,w),{host:this.host})}}))}canSubmitFormByEvent(t){const e="Enter"===t.key||13===t.keyCode,s=e&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return s&&t.preventDefault(),s;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return e}}overrideDefaultRuleByAdditionalRule(t,e){if(t&&e){const s=e.findIndex((e=>e instanceof C&&e instanceof t.constructor&&e.overrideDefault));if(s>-1)return e.splice(s,1)[0]}return t}}P([e()],W.prototype,"formFieldMessageTranslatorSlimmer",void 0),P([e()],W.prototype,"fieldErrorUIController",void 0),P([e()],W.prototype,"resizeObserverSlimmer",void 0);var z=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class K extends t{constructor(){super(...arguments),this.fieldErrorUIController=new G,this.handleFieldErrorMessageUpdate=t=>{const{message:e,isValid:s}=t;s?this.fieldErrorUIController.resetInputInvalidUI():this.fieldErrorUIController.applyInputInvalidUI(e)}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(u,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(u,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:e}=t,s=this.host.parentElement;return s&&s===e&&"VEGA-FIELD-ERROR"===s.tagName||this.host===e}}z([s()],K.prototype,"host",void 0),z([s()],K.prototype,"options",void 0),z([e()],K.prototype,"fieldErrorUIController",void 0),z([i("setInjectFormFieldHelper")],K.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),z([i("disconnectedCallback")],K.prototype,"handleUnregisterObserver",null);var N=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class X extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const e=await this.validator.validate(t.message);if(e){const{isValid:s,message:i}=e;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:s,message:i})}}}}registerValidInvocationObserver(){j.addUniqueObserverToNode(this.host,O,this.handleValidInvocation)}handleUnregisterObserver(){j.removeUniqueObserverFromNode(this.host,O)}}N([s()],X.prototype,"host",void 0),N([s()],X.prototype,"validator",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"registerValidInvocationObserver",null),N([i("disconnectedCallback")],X.prototype,"handleUnregisterObserver",null);var q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class J extends T{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var e;null===(e=this.validator)||void 0===e||e.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}q([s()],J.prototype,"host",void 0),q([s()],J.prototype,"validator",void 0),q([i("setInjectFormFieldHelper")],J.prototype,"componentWillLoad",null);var Q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class Y extends t{constructor(t){super(),this.fieldErrorSlimmer=new K,this.formFieldValidInvokeSlimmer=new X,this.formFormStateController=new J,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}static isValidFormField(t){return t&&Boolean(t.getAttribute("data-vega-form"))}watchValidationRulesByFormControllerSlimmer(t,e){k(t,e,!1,((t,e)=>t===e?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(Y.isValidFormField(this.host)){const{defaultValue:t}=this.options,e=new W(this.getPropertyRules(),this.host,t,this.options);e.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(f,{host:this.host,detail:t}))}}),this.validator=e,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:e}=this.options;return t.map((t=>{const s=t.dependence&&"string"==typeof t.dependence?[e(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>e(t))):[null];return t.ruleFactory(e(t.propertyName),...s)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new S({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:A(),callback:this.mutationObserverCallBack})}}Q([s()],Y.prototype,"host",void 0),Q([s({writable:!0})],Y.prototype,"validationRules",void 0),Q([s()],Y.prototype,"disabled",void 0),Q([s()],Y.prototype,"autoValidation",void 0),Q([s({writable:!0})],Y.prototype,"isValid",void 0),Q([e()],Y.prototype,"fieldErrorSlimmer",void 0),Q([e()],Y.prototype,"formFieldValidInvokeSlimmer",void 0),Q([e()],Y.prototype,"mutationObserverSlimmer",void 0),Q([e()],Y.prototype,"formFormStateController",void 0),Q([i("connectedCallback")],Y.prototype,"connectedCallback",null),Q([i("disconnectedCallback")],Y.prototype,"disconnectedCallback",null),Q([i("componentDidLoad")],Y.prototype,"componentDidLoad",null),Q([i("watchValidationRules")],Y.prototype,"watchValidationRulesByFormControllerSlimmer",null),Q([i("componentWillLoad")],Y.prototype,"setInjectFormFieldHelper",null);export{Y as F}
1
+ import{V as t,I as e,c as s,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-02841589.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,a as l,b as h,F as c,c as d,d as u,e as f}from"./p-a528714c.js";import{f as m,d as p}from"./p-6e70d3cc.js";import{a as v,g as b}from"./p-8b5d3a52.js";import{c as R}from"./p-6a334573.js";import{d as g,D as j}from"./p-f28a6074.js";import{h as y,f as w,i as O}from"./p-33860e54.js";import{V as E}from"./p-82016096.js";import{h as V,l as F}from"./p-f0e828d8.js";import{P as I}from"./p-81dd00d0.js";import{I as C}from"./p-abd7aeaa.js";import{M as S}from"./p-78a57a17.js";import{A}from"./p-52b8f2d2.js";import{i as k}from"./p-d27ae9ff.js";import{S as T}from"./p-6216c30e.js";class L{constructor(t){this.rule=t}getStatus(t,e,s){return{canEvaluate:this.rule.canEvaluate(t,e,s),isAsync:v(this.rule.evaluate)}}shouldShowError(t,e){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,e):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class M{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,e,s){return!!this.handlers.find((i=>{const r=i.getStatus(t,e,s);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new L(t))):[]}async process(t,e,s,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,e,s);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(e,s);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=b();return this.processId=t,t}postProcess(t,e,s,i){this.processId===t&&i(e,s)}}class D{run(t){const e=t.nextElementSibling;return e&&e.querySelector(".vega-error")?e.querySelector(".vega-error"):null}}class B{run(t){let e=t.nextElementSibling;return e&&!e.classList.contains("vega-error")&&(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class H{run(t){let e=t.nextElementSibling;return e||(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class U extends t{getTranslatedMessage(t){return"string"==typeof t?E.t(t):E.t(t.key,...t.args||[])}}var x=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class G extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new U,this.fieldErrorUiControllerStrategies=[new D,new B,new H],this.initTranslationObserver()}applyInputInvalidUI(t){const e=this.getInputElementContainer();if(o.notify(g.getSubject(this.host,y),{host:this.host,showError:!0}),e&&(e.classList.add("error"),t)){this.errorMessage=t;const s=this.getErrorContainer(e);s.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),F),s.classList.remove("vega-hidden")}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(g.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const e of this.fieldErrorUiControllerStrategies){const s=e.run(t);if(s)return s}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const e=this.getErrorContainer(t);e&&(e.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage),F))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}x([e()],G.prototype,"formFieldMessageTranslatorSlimmer",void 0),x([s()],G.prototype,"host",void 0),x([s()],G.prototype,"options",void 0);var P=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class W{constructor(t,e,s,i){var r,n;this.formFieldMessageTranslatorSlimmer=new U,this.fieldErrorUIController=new G,this.resizeObserverSlimmer=R(W,I,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const e=this.isVisible,s=t[0].contentRect.height>0;this.isVisible=s,this.isAutoValidationEnabled()&&m(this.host,"vega-form")&&e!==s&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new M,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,e)=>{let s=!0;return e?("rule"===t?e.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI(),s=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(s),o.notify(l,{host:this.host,detail:s}),s},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>t&&!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=e,this.defaultValue=s,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((e=>this.overrideDefaultRuleByAdditionalRule(e,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,e="rule"){const s=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,s,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,s,t,e,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((e=>e.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const e=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(e===t?[]:["touched"])}updateIsModified(t){const e=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(e===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return m(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var e,s;if(this.shouldVisitElement(this.host,null===(e=t.option)||void 0===e?void 0:e.skipDisabled,null===(s=t.option)||void 0===s?void 0:s.skipInvisible)){const e=t.defaultValueMap,s=this.host.dataset.vegaForm,i=null==e[s]?this.getDefaultValue():e[s];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,e,s){return!(!t.dataset.vegaForm||e&&t.disabled||s&&!p(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{if(this.canSubmitFormByEvent(t)){const t=m(this.host,"vega-form",{outerMost:!0});t&&o.notify(g.getSubject(t,w),{host:this.host})}}))}canSubmitFormByEvent(t){const e="Enter"===t.key||13===t.keyCode,s=e&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return s&&t.preventDefault(),s;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return e}}overrideDefaultRuleByAdditionalRule(t,e){if(t&&e){const s=e.findIndex((e=>e instanceof C&&e instanceof t.constructor&&e.overrideDefault));if(s>-1)return e.splice(s,1)[0]}return t}}P([e()],W.prototype,"formFieldMessageTranslatorSlimmer",void 0),P([e()],W.prototype,"fieldErrorUIController",void 0),P([e()],W.prototype,"resizeObserverSlimmer",void 0);var z=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class K extends t{constructor(){super(...arguments),this.fieldErrorUIController=new G,this.handleFieldErrorMessageUpdate=t=>{const{message:e,isValid:s}=t;s?this.fieldErrorUIController.resetInputInvalidUI():this.fieldErrorUIController.applyInputInvalidUI(e)}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(u,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(u,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:e}=t,s=this.host.parentElement;return s&&s===e&&"VEGA-FIELD-ERROR"===s.tagName||this.host===e}}z([s()],K.prototype,"host",void 0),z([s()],K.prototype,"options",void 0),z([e()],K.prototype,"fieldErrorUIController",void 0),z([i("setInjectFormFieldHelper")],K.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),z([i("disconnectedCallback")],K.prototype,"handleUnregisterObserver",null);var N=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class X extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const e=await this.validator.validate(t.message);if(e){const{isValid:s,message:i}=e;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:s,message:i})}}}}registerValidInvocationObserver(){j.addUniqueObserverToNode(this.host,O,this.handleValidInvocation)}handleUnregisterObserver(){j.removeUniqueObserverFromNode(this.host,O)}}N([s()],X.prototype,"host",void 0),N([s()],X.prototype,"validator",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"registerValidInvocationObserver",null),N([i("disconnectedCallback")],X.prototype,"handleUnregisterObserver",null);var q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class J extends T{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var e;null===(e=this.validator)||void 0===e||e.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}q([s()],J.prototype,"host",void 0),q([s()],J.prototype,"validator",void 0),q([i("setInjectFormFieldHelper")],J.prototype,"componentWillLoad",null);var Q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class Y extends t{constructor(t){super(),this.fieldErrorSlimmer=new K,this.formFieldValidInvokeSlimmer=new X,this.formFormStateController=new J,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}static isValidFormField(t){return t&&Boolean(t.getAttribute("data-vega-form"))}watchValidationRulesByFormControllerSlimmer(t,e){k(t,e,!1,((t,e)=>t===e?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(Y.isValidFormField(this.host)){const{defaultValue:t}=this.options,e=new W(this.getPropertyRules(),this.host,t,this.options);e.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(f,{host:this.host,detail:t}))}}),this.validator=e,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:e}=this.options;return t.map((t=>{const s=t.dependence&&"string"==typeof t.dependence?[e(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>e(t))):[null];return t.ruleFactory(e(t.propertyName),...s)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new S({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:A(),callback:this.mutationObserverCallBack})}}Q([s()],Y.prototype,"host",void 0),Q([s({writable:!0})],Y.prototype,"validationRules",void 0),Q([s()],Y.prototype,"disabled",void 0),Q([s()],Y.prototype,"autoValidation",void 0),Q([s({writable:!0})],Y.prototype,"isValid",void 0),Q([e()],Y.prototype,"fieldErrorSlimmer",void 0),Q([e()],Y.prototype,"formFieldValidInvokeSlimmer",void 0),Q([e()],Y.prototype,"mutationObserverSlimmer",void 0),Q([e()],Y.prototype,"formFormStateController",void 0),Q([i("connectedCallback")],Y.prototype,"connectedCallback",null),Q([i("disconnectedCallback")],Y.prototype,"disconnectedCallback",null),Q([i("componentDidLoad")],Y.prototype,"componentDidLoad",null),Q([i("watchValidationRules")],Y.prototype,"watchValidationRulesByFormControllerSlimmer",null),Q([i("componentWillLoad")],Y.prototype,"setInjectFormFieldHelper",null);export{Y as F}
@@ -0,0 +1 @@
1
+ import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-f28a6074.js";import{d as s,e as n}from"./p-33860e54.js";import{d as r,c as i}from"./p-02841589.js";import{L as o}from"./p-6e1ab235.js";import{i as c}from"./p-83863463.js";import{T as a}from"./p-d884c644.js";import{g as l}from"./p-8b5d3a52.js";import{V as h}from"./p-8ac2d165.js";import{c as u}from"./p-a841cf13.js";import{f as d}from"./p-6e70d3cc.js";var p,f;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(p||(p={}));class T{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT",t.LIST="LIST",t.INTERNAL_WRAPPER="INTERNAL_WRAPPER"}(f||(f={}));class E extends T{}const x=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap,this.contentEntityToRootDom=new Map,this.rootDomToContentEntity=new WeakMap}register(t,e){this.isVegaRTEContent(e)?this.registerRootDomAndContentEntity(t,e):(this.domToEntity.set(t,e),this.entityToDOM.set(e,t))}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.isVegaRTEContent(t)?this.contentEntityToRootDom.get(t):this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}registerRootDomAndContentEntity(t,e){const s=this.rootDomToContentEntity.get(t);s&&s!==e&&this.contentEntityToRootDom.delete(s),this.rootDomToContentEntity.set(t,e),this.contentEntityToRootDom.set(e,t)}isVegaRTEContent(t){return t&&"VegaRTEContent"===t.constructor.name}};var g,w,A,O;!function(t){t.DELETE_CHILDREN="DELETE_CHILDREN",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILDREN="APPEND_CHILDREN",t.INSERT_CHILDREN_AFTER="INSERT_CHILDREN_AFTER",t.INSERT_CHILDREN_BEFORE="INSERT_CHILDREN_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.INSERT_NEW_PARAGRAPH="INSERT_NEW_PARAGRAPH",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK",t.UNLINK_LINK_GROUP="UNLINK_LINK_GROUP",t.LINK_GROUP_NODE_SPLIT="LINK_GROUP_NODE_SPLIT",t.DELETE_LINK_GROUP="DELETE_LINK_GROUP",t.UPDATE_CURSOR_POSITION="UPDATE_CURSOR_POSITION",t.INSERT_TEXT_TO_DECORATOR_NODE="INSERT_TEXT_TO_DECORATOR_NODE",t.INSERT_NODE_TO_NEAREST_ROOT="INSERT_NODE_TO_NEAREST_ROOT",t.PASTE_CONTENT="PASTE_CONTENT"}(g||(g={}));class m{constructor(){this.isFlushable=!1}}function N(t){const e=t.getAttribute("style");return e?e.split(";").filter(Boolean).filter((t=>" "!==t)).map((t=>{const e=t.replace(/(['"])(.*?)\1/g,"$2").split(":");return{[r(e[0].trim())]:e[1].trim().replace(";","")}})).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{}):{}}class y{constructor(){this.classNameToBeAdded=""}filterAnnotations(t){const e=t.customStyle;return e?(this.extractAndDeleteMatchedStyles(e),0===Object.keys(e).length&&delete t.customStyle,t):t}filterAndDeleteStyles(t,e){const s=new Set(e);return this.extractAndDeleteMatchedStyles(t)&&this.classNameToBeAdded&&s.add(this.classNameToBeAdded),{styles:t,classNames:Array.from(s)}}refillStyles(t){this.classNameToBeAdded&&t.classList.remove(this.classNameToBeAdded);const e=N(t),s=Object.assign(Object.assign({},this.stylesToBeFiltered),e),n=Object.entries(Object.assign({},s)).map((([t,e])=>`${i(t)}: ${e};`)).join("");t.setAttribute("style",n)}canFilter(t){return!1}canRefill(t,e){return!1}toCssText(){return""}get alwaysFilter(){return!1}extractAndDeleteMatchedStyles(t){let e=!1;const s=this.stylesToBeFiltered;if(t&&s){const n=Object.keys(s);for(const r of n)t[r]===s[r]&&(delete t[r],e=!0)}return e}buildCssTextForStyles(t,e){return`${`.${y.RTE_CONTENT_CONTAINER_CLASS_NAME}`+(e?` .${e}`:` ${t}`)} { ${Object.entries(this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")} }`}convertStylesMapToCssText(t){return Object.entries(t||this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}isBlockOrNodeStylesMatchFilterStyles(t,e){const s=t.getStyles({standalone:!0});return this.isMatchFilterStyles(s,e)}isMatchFilterStyles(t,e){return(e&&e.length>0?e:Object.keys(this.stylesToBeFiltered)).every((e=>t[e]===this.stylesToBeFiltered[e]))}}y.RTE_CONTENT_CONTAINER_CLASS_NAME="vega-rte-content",function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK",t.INLINE_HTML="INLINE_HTML",t.PLAIN_TEXT="PLAIN_TEXT"}(w||(w={}));class R extends T{}class S{static isTextBlock(t){return t===this.RTE_TEXT_BLOCK_CLASS_NAME}static isCodeBlock(t){return"RTECodeBlock"===t}static isListBlock(t){return"RTEListBlock"===t}static isListItemBlock(t){return"RTEListItemBlock"===t}static isTextNode(t){return t===this.RTE_TEXT_NODE_CLASS_NAME}static isLinkNode(t){return this.isTextNode(t.constructor.name)&&!!t.getAnnotationByType(w.LINK)}static isCodeNode(t){if(this.isTextNode(t.constructor.name)){const e=t.getAnnotationByType(w.CODE);return!!e&&e.code}return!1}static isImageNode(t){return"RTEImageNode"===t.constructor.name}static isCodeBlockNode(t){return"RTECodeBlockNode"===t.constructor.name}}S.RTE_TEXT_NODE_CLASS_NAME="RTETextNode",S.RTE_TEXT_BLOCK_CLASS_NAME="RTETextBlock";class C extends y{constructor(){super(...arguments),this.stylesToBeFiltered=b.getDefaultStyles(),this.elementTagName="a"}filterAnnotations(t){const e=t.link;return(null==e?void 0:e.customStyle)?(this.extractAndDeleteMatchedStyles(e.customStyle),0===Object.keys(e.customStyle).length&&delete e.customStyle,t):t}canFilter(t){return S.isLinkNode(t)}canRefill(t,e){return"RTETextNode"===t&&e.matches(this.elementTagName)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}filterLinkGroupInlineStyles(t){const e=t.style,s=t.class?t.class.split(" "):[],n=this.filterAndDeleteStyles(e,s);return n.styles&&Object.keys(n.styles).length>0&&(t.style=n.styles),n.classNames&&n.classNames.length>0&&(t.class=n.classNames.join(" ")),t.style&&0===Object.keys(t.style).length&&delete t.style,t}}class b extends T{constructor(t){super(),this.type=p.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}static getDefaultStyles(){return{color:"rgba(var(--v-text-link, 19, 98, 226, 1))"}}clone(){const t=new b("");return this.linkGroups.forEach(((e,s)=>{t.linkGroups.set(s,e.map((t=>t.clone(t.parent))))})),t}toString(t,e){let s=this.toJsx(t,e);return(null==e?void 0:e.filterInlineStyles)&&(s=b.linkGroupFilterStylesStrategy.filterLinkGroupInlineStyles(s)),Object.entries(s).map((([t,e])=>{const s="string"==typeof e?e:this.formatStyleToString(e);return`${i(t)}="${s}"`})).join(" ")}toJsx(t,e){const s=this.getStyle(t,e),n=this.getClass(t,e),r=this.getAttribute(t);return n.length>0&&(r.class=n.join(" ")),s&&Object.keys(s).length>0&&(r.style=s),r}getClass(t,e){const s=[];return t.link.customClass&&s.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&s.push("v-rte--link"),s}getStyle(t,e){const s={};return t.link.customStyle&&Object.assign(s,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&Object.assign(s,b.getDefaultStyles()),s}getAttribute(t){const{href:e,customAttribute:s={}}=t.link,n=t.useInternalStyle,r=s.target||(n?"_blank":"");return Object.assign(Object.assign(Object.assign({},s),e||n?{href:e}:{}),r?{target:r}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}}b.linkGroupFilterStylesStrategy=new C;class k extends E{constructor(t){super(),this.type=f.ALIGNMENT,this.textAlign=t}static from(t){return[f.ALIGNMENT,new k(t)]}static getDefaultStyles(t){switch(t){case"right":case"center":case"justify":return{textAlign:t};case"left":default:return{textAlign:"left"}}}toJSON(){return{textAlign:this.textAlign}}renderClass(t){if(null==t?void 0:t.standalone)return null;switch(this.textAlign){case"right":case"center":case"justify":return`v-rte--horizontal-alignment-${this.textAlign}`;case"left":default:return"v-rte--horizontal-alignment-left"}}clone(){return new k(this.textAlign)}renderStyle(t){return(null==t?void 0:t.standalone)?k.getDefaultStyles(this.textAlign):null}}class v extends E{constructor(t){super(),this.type=f.INDENT,this.indent=Math.max(0,t)}static from(t){return[f.INDENT,new v(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new v(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class B{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).has(t)||this.registry.get(e).set(t,new Set),this.registry.get(e).get(t).add(s)}static unregister(t,e,s){const n=this.registry.get(e);if(n){const e=n.get(t);e&&e.delete(s)}}static get(t,e){const s=t instanceof m?t.type:t.constructor.name,n=this.registry.get(e.constructor.name);if(n){const r=n.get(s);if(r&&r.size>0)return Array.from(r).find((s=>s.canIntercept(t,e)))}}}B.registry=new Map;class j{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,s)}static unregister(t,e){const s=this.registry.get(e);s&&s.delete(t)}static get(t,e){const s=this.registry.get(e);if(s)return s.get(t)}static executeTheStrategy(t,e){const s=B.get(t,e),n=()=>{const s=t instanceof m?t.type:t.constructor.name,n=j.get(s,e.constructor.name);if(n)return t.executedFlag=!0,n.execute(t,e);o.warn(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)};return s?s.intercept(n,t,e):n()}static canHandle(t,e){return!!j.get(t,e.constructor.name)}}j.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(A||(A={}));class _ extends T{}class $ extends _{constructor(t){super(),this.type=A.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[A.CUSTOM_ATTRIBUTE,new $(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new $(this.customAttribute)}toString(t=[]){const e=t.map((t=>t.split("=")[0]));return Object.keys(this.customAttribute).map((t=>e.includes(t)?null:`${t}="${this.customAttribute[t]}"`)).filter(c)}render(t={}){var e;const s=Object.assign({},this.customAttribute);return null===(e=t.filterAttributes)||void 0===e||e.forEach((t=>delete s[t])),Object.keys(s).forEach((t=>{this.BOOLEAN_ATTRS.has(t)&&""===s[t]&&(s[t]="true")})),s}}class L extends _{constructor(t){super(),this.type=A.CUSTOM_CLASS,this.customClass=t}static from(t){return[A.CUSTOM_CLASS,new L(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new L(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class D extends _{constructor(t){super(),this.type=A.CUSTOM_STYLE,this.customStyle=t}static from(t){return[A.CUSTOM_STYLE,new D(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new D(this.customStyle)}renderStyle(){return this.customStyle}removeStyles(t){const e=Object.assign({},this.customStyle);return t.forEach((t=>delete e[t])),e}toString(){return`style="${Object.entries(this.customStyle).map((([t,e])=>`${t}: ${e};`)).join(" ")}"`}}class I extends E{constructor(t){super(),this.type=f.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[f.INTERNAL_WRAPPER,new I(t)]}clone(){return new I(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class M{constructor(t){this.dtoType=t instanceof RTEBlock?"block":"node",this.annotationMap=t.annotationMap}toCssText(t={standalone:!1},e,s){return s=s||this.toJSON(t,e),Object.entries(Object.assign({},s)).map((([t,e])=>`${i(t)}: ${e};`)).join("")}toJSON(t={standalone:!1},e){const s=Array.from(this.annotationMap.values()).filter((t=>this.filterAnnotation(t)||t instanceof D)).map((e=>e.renderStyle(t))).filter(c);return e&&e.length>0?this.mergeAnnotationStyles(s,e):s.reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})}filterAnnotation(t){return"block"===this.dtoType?t instanceof E:t instanceof R}mergeAnnotationStyles(t,e){const s={};for(const n of t)for(const t in n){const r=n[t],i=s[t];s[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return s}}class F{static register(t,e){var s;const n=null!==(s=this.registry.get(t))&&void 0!==s?s:new Set;n.add(e),this.registry.set(t,n)}static getStrategies(t){var e;return Array.from(null!==(e=this.registry.get(t))&&void 0!==e?e:[])}static executeTheStrategyFilterAction(t,e,s){return this.getStrategies(t.constructor.name).filter((e=>e.canFilter(t))).reduce(((t,e)=>e.filterAndDeleteStyles(t.styles,t.classNames)),{styles:e,classNames:s})}static executeTheStrategyRefillAction(t,e){this.getStrategies(t).filter((s=>s.canRefill(t,e))).forEach((t=>{t.refillStyles(e)}))}static generateAllStylesContent(t=!1){const e=[];return t&&(e.push("/* Font-face imports begin */\n"),e.push(Object.keys(a).map((t=>`@import url('${a[t].url}');\n`)).join(" ")),e.push("/* Font-face imports end */\n")),this.registry.forEach((t=>{t.forEach((t=>{const s=t.toCssText();s&&!e.includes(s)&&e.push(s)}))})),e.join(" ")}}F.registry=new Map,function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(O||(O={}));class RTENode{constructor(t,e){this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}static from(t,e,s){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}, ${s}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return $.from(e);case"customClass":return L.from(e);case"customStyle":return D.from(e)}}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}getStyles(t={standalone:!1}){return new M(this).toJSON(t,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof R||t instanceof L)).map((e=>e.renderClass(t))).filter(c).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(A.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return x.getDOMByEntity(this)}generateAttributeString(t,...e){var s;const n=new M(this),r=n.toJSON({standalone:!0},["textDecoration"]),i=this.annotationMap.get(A.CUSTOM_CLASS);let o=r,a=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=F.executeTheStrategyFilterAction(this,r,a);o=t.styles,a=t.classNames}const l=[...(null===(s=this.getCustomAttributesAnnotation())||void 0===s?void 0:s.toString(e))||[],a&&a.length>0?`class="${a.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${n.toCssText({standalone:!0},void 0,o)}"`:null,...e].filter(c);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof m?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const n=x.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}doAnnotationActionApply(t){}doModifyActionApply(t){}}const H=new class{constructor(){this.RTE_BLOCK_DTO_CLASS_MAP=new Map,this.RTE_NODE_DTO_CLASS_MAP=new Map}registerRTEDTOClass(t,e){if(e.prototype instanceof RTEBlock)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof RTENode))throw new Error(`Invalid RTE DTO class type: ${t}`);this.RTE_NODE_DTO_CLASS_MAP.set(t,e)}}getRTEBlockClass(t){return this.RTE_BLOCK_DTO_CLASS_MAP.get(t)}getRTENodeClass(t){return this.RTE_NODE_DTO_CLASS_MAP.get(t)}};class RTEBlock{constructor(t){this.annotationMap=new Map,this.id=t}static from(t,e){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}) is not implemented. Please implement this method in the subclass.`)}static generateBlockChildren(t,e,s){return t.map((t=>{const n=H.getRTEBlockClass(t.type);if(n){const r=n.from(t,e);return r.parent=s,r}})).filter(c)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return k.from(e);case"indent":return v.from(e);case"customAttribute":return $.from(e);case"customClass":return L.from(e);case"customStyle":return D.from(e);case"internalWrapper":return I.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,s])=>{const n=this.createAnnotationEntity(e,s);c(n)&&t.set(...n)}))}shouldRenderAsInternalWrapper(){const t=this.getAnnotationByType(f.INTERNAL_WRAPPER);return!!t&&t.internalWrapper&&0===Array.from(this.annotationMap.values()).filter((t=>!(t instanceof b||t instanceof I))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof E||t instanceof _)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(n){if(this.doApply(n),n.isFlushable){const n=x.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}getFirstNode(){if(!this.children||!this.children[0])return null;const t=this.children[0];return t instanceof RTEBlock?t.getFirstNode():t}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){const e=new M(this).toJSON(t);return Object.assign(Object.assign({},e),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof E||t instanceof L)).map((e=>e.renderClass(t))).filter(c).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(A.CUSTOM_ATTRIBUTE)}generateAttributeString(t,...e){var s;const n=new M(this),r=n.toJSON({standalone:!0}),i=this.annotationMap.get(A.CUSTOM_CLASS);let o=r,a=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=F.executeTheStrategyFilterAction(this,r,a);o=t.styles,a=t.classNames}const l=[...(null===(s=this.getCustomAttributesAnnotation())||void 0===s?void 0:s.toString(e))||[],a&&a.length>0?`class="${a.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${n.toCssText({standalone:!0},void 0,o)}"`:null,...e].filter(c);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof m?j.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();if(e instanceof b||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply)this.doAnnotationActionApply(t);else{const e=j.get(t.constructor.name,this.constructor.name);e&&e.execute(t,this)}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}class P{}class J extends P{constructor(){super(...arguments),this.doSplit=!0}}class K extends T{constructor(t){super(),this.type=p.SELECTION_RANGE,this.range=t}clone(){return new K(this.range)}}const U="700",W="bold",G="italic",z="underline",V="line-through";class X extends R{constructor(t){super(),this.type=w.STRIKETHROUGH,this.strikethrough=t}static from(t){return[w.STRIKETHROUGH,new X(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new X(this.strikethrough)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.strikethrough?"v-rte--strikethrough":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.strikethrough?{textDecoration:"line-through"}:null}}class q extends R{constructor(t){super(),this.type=w.UNDERLINE,this.underline=t}static from(t){return[w.UNDERLINE,new q(t)]}toJSON(){return{underline:this.underline}}clone(){return new q(this.underline)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.underline?"v-rte--underline":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.underline?{textDecoration:"underline"}:null}}class Y extends R{constructor(t){super(),this.type=w.ITALIC,this.italic=t}static from(t){return[w.ITALIC,new Y(t)]}toJSON(){return{italic:this.italic}}clone(){return new Y(this.italic)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.italic?"v-rte--italic":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.italic?{fontStyle:"italic"}:null}}class Q extends R{constructor(t){super(),this.type=w.BOLD,this.bold=t}static from(t){return[w.BOLD,new Q(t)]}toJSON(){return{bold:this.bold}}clone(){return new Q(this.bold)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.bold?"v-rte--bold":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.bold?{fontWeight:"700"}:null}}class Z extends R{constructor(t,e=!0){super(),this.type=w.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[w.CODE,new Z(t,e)]}static getDefaultStyles(){return{fontFamily:"Roboto Mono",whiteSpace:"pre-wrap"}}toJSON(){return{code:this.code}}clone(){return new Z(this.code,this.useInternalStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.code&&this.useInternalStyle?"v-rte--code":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.code&&this.useInternalStyle?Z.getDefaultStyles():null}}const tt={key:"black",light:"#111128",dark:"#E3E3E8"},et=[tt,{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],st="​",nt=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]],rt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);class it extends R{constructor(t){super(),this.type=w.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[w.TEXT_COLOR,new it(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new it(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:h.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return et.find((e=>e.key===t))||et[0]}}class ot extends R{constructor(t,e=!0){super(),this.type=w.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[w.LINK,new ot(t,e)]}toJSON(){return{link:this.link}}clone(){return new ot(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class ct extends P{constructor(t,e,s){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=s}toAnnotation(){return new b(this.groupKey)}}class at extends P{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class lt{execute(t,e){return o.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}updateCustomStyleAnnotation(t,e){const s=t.annotationMap.get(A.CUSTOM_STYLE);s&&this.isCustomStyle(s,e)&&t.annotationMap.set(s.type,new D(s.removeStyles(e)))}createNewParagraph(t){const e=H.getRTEBlockClass("paragraph");if(e)return e.from({id:l(),type:"paragraph",nodes:[{id:l(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.constructor.name?e:this.getRootContent(e)}isCaretPositionAtBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtBlockEnd(t,e,s){return e.isContentEditable()?this.isCaretPositionAtTextBlockEnd(t,e,s):this.isCaretPositionAtDecoratorBlockEnd(t,e,s)}getDOMByEntity(t){return x.getDOMByEntity(t)}isCaretPositionAtTextBlockEnd(t,e,s){const n=t.children[t.children.length-1];return e===n&&(e.isEmpty()||s===n.text.length)}isCaretPositionAtDecoratorBlockEnd(t,e,s){return e===t.children[t.children.length-1]&&0!==s}isCustomStyle(t,e){return e.some((e=>Object.keys(t.customStyle).includes(e)))}}class ht extends m{constructor(t){super(),this.type=g.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class ut extends lt{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(p.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof J&&t.doSplit&&s){const{startContainer:t,endContainer:n,startOffset:r,endOffset:i}=s.range,o=t===n&&r===i;e.parent.children=e.parent.children.flatMap((t=>{if(t.id===e.id){if(o)return this.insertNewNode(r,e);if(this.shouldSplitSelection(s.range)&&e.isContentEditable()){const n=this.splitTextNode(s.range,e);return t.annotationMap.has("LINK")&&t.apply(new ht(n)),n}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const s=e.cloneWithText("");this.setApplyTargetNode(s);const n=e.parent.children.findIndex((t=>t===e));return 0===t||!e.isContentEditable()&&t===n?[s,e]:t===e.text.length||!e.isContentEditable()&&t===n+1?[e,s]:[e.cloneWithText(e.text.substring(0,t)),s,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:s,startOffset:n,endOffset:r}=t;return e!==s||n>0||r<(s.textContent?s.textContent.length:0)}splitTextNode(t,e){const{startContainer:s,endContainer:n,startOffset:r}=t,i=s.parentElement,o=n.parentElement,c=(t,s,n)=>{const r=t.substring(0,s),i=t.substring(s,n),o=t.substring(n);return[e.cloneWithText(r),e.cloneWithText(i),e.cloneWithText(o)]},a=i&&x.getEntityByDOM(i),l=o&&x.getEntityByDOM(o);if(a&&a.id===e.id){const i=s===n?t.endOffset:e.text.length,[o,a,l]=c(e.text,r,i);return this.setApplyTargetNode(a),[o,a,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[s,n,r]=c(e.text,0,t.endOffset);return this.setApplyTargetNode(n),[s,n,r].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}class dt extends J{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new Q(this.bold)}}class pt extends T{constructor(){super(...arguments),this.type=p.CLEAR_FORMATTING,this.items=[w.BOLD,w.ITALIC,w.UNDERLINE,w.STRIKETHROUGH,w.TEXT_COLOR,w.CODE,A.CUSTOM_STYLE]}}class ft extends J{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new pt}}class Tt extends J{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new Z(this.code)}}class Et extends P{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class xt extends J{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new Y(this.italic)}}class gt extends J{constructor({link:t,newText:e,needMergeNode:s,doSplit:n,type:r}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=s,this.newText=e,this.type=r,c(n)&&(this.doSplit=n)}toAnnotation(){return new ot(this.link)}}class wt extends J{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new X(this.strikethrough)}}class At extends J{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new q(this.underline)}}class Ot extends lt{handleAction(t,e){const s=t.toAnnotation();if(t instanceof Et)e.annotationMap.delete(t.annotationType);else{if(!(s instanceof pt))return s instanceof R||s instanceof K?(t instanceof gt&&(c(t.newText)&&(e.text=t.newText),e.parent.apply(new ct(t.link.groupKey,[e],t.type))),t instanceof Tt&&this.handleAction(new ft,e),t instanceof dt&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof xt&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof At||t instanceof wt)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(s.type,s)):void 0;s.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class mt extends m{constructor(){super(...arguments),this.type=g.DELETE_LINK_GROUP}}class Nt extends lt{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new mt)}}class yt extends m{constructor(t){super(),this.type=g.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class Rt extends lt{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,s){if(e&&e.startContainer&&e.endContainer){const{startContainer:n,endContainer:r,startOffset:i,endOffset:o}=e;let c=s.text;if(n===r&&i===o&&t)c=s.text.slice(0,i)+t+s.text.slice(i);else{const e=n.parentElement,a=r.parentElement,l=e&&x.getEntityByDOM(e),h=a&&x.getEntityByDOM(a);let u=0,d=s.text.length;l&&l===s?(u=i,d=n===r?o:d):h&&h===s&&(d=o),c=s.text.slice(0,u)+t+s.text.slice(d)}s.apply(new yt(c))}}}class St extends T{constructor(t){super(),this.type=w.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:s,customStyle:n,customClass:r,customAttribute:i}=t,o=new St(e);return o.groupId=t.groupId,o.child=s?St.from(s)[1]:void 0,o.customAttribute=i?$.from(i)[1]:void 0,o.customClass=r?L.from(r)[1]:void 0,o.customStyle=n?D.from(n)[1]:void 0,[w.INLINE_HTML,o]}clone(){var t,e,s,n;const r=new St(this.htmlTag);return r.groupId=this.groupId,r.child=null===(t=this.child)||void 0===t?void 0:t.clone(),r.customAttribute=null===(e=this.customAttribute)||void 0===e?void 0:e.clone(),r.customClass=null===(s=this.customClass)||void 0===s?void 0:s.clone(),r.customStyle=null===(n=this.customStyle)||void 0===n?void 0:n.clone(),r}renderProps(){var t,e,s;return Object.assign(Object.assign({},null===(t=this.customAttribute)||void 0===t?void 0:t.render()),{style:null===(e=this.customStyle)||void 0===e?void 0:e.renderStyle(),class:null===(s=this.customClass)||void 0===s?void 0:s.renderClass().join(" ")})}toJSON(){var t,e,s,n;return{inlineHtml:u({htmlTag:this.htmlTag,groupId:this.groupId,child:null===(t=this.child)||void 0===t?void 0:t.toJSON().inlineHtml,customAttribute:null===(e=this.customAttribute)||void 0===e?void 0:e.toJSON().customAttribute,customClass:null===(s=this.customClass)||void 0===s?void 0:s.toJSON().customClass,customStyle:null===(n=this.customStyle)||void 0===n?void 0:n.toJSON().customStyle})}}}class Ct extends lt{handleAction(t,e){const s=e.parent.getAnnotationByType(p.LINK_GROUP);if(s){const n=e.annotationMap.get("LINK").link.groupKey,r=s.linkGroups.get(n);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),s.linkGroups.set(n,r))}}}}class bt extends lt{handleAction(t,e){const s=e.parent.getAnnotationByType(p.LINK_GROUP);if(s){const t=e.annotationMap.get(w.LINK).link.groupKey,n=s.linkGroups.get(t);if(n){const r=n.indexOf(e);-1!==r&&n.splice(r,1),0===n.length&&s.linkGroups.delete(t),0===s.linkGroups.size&&e.parent.annotationMap.delete(p.LINK_GROUP)}}e.annotationMap.delete(w.LINK)}}class kt extends R{constructor(t){super(),this.type=w.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[w.PLAIN_TEXT,new kt(t)]}clone(){return new kt(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class vt extends J{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new it(this.textColor)}}class RTETextNode extends RTENode{constructor(t,e,s,n){super(t,n),this.type=O.TEXT,this.parent=s,this.text=e,this.registerModifyStrategy()}static supportsHtmlTag(t){return["span","code"].includes(t)}static from(t,e,s={autoMatchFormat:!0}){const n=new RTETextNode(t.id,t.text,e),{annotations:r}=t;return r&&(n.annotationMap=this.generateTextAnnotationMap(r,s,e,n)),n}static generateTextAnnotationMap(t,e,s,n){return new Map(Object.keys(t).map((r=>("link"===r&&t.link&&s&&n&&s.apply(new ct(t.link.groupKey,[n],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(c))}static createAnnotationEntity(t,e,s){const n=!(!s||!s.autoMatchFormat);switch(t){case"bold":return Q.from(e);case"italic":return Y.from(e);case"underline":return q.from(e);case"strikethrough":return X.from(e);case"code":return Z.from(e,n);case"textColor":return it.from(e);case"link":return ot.from(e,n);case"inlineHtml":return St.from(e);case"plainText":return kt.from(e)}return RTENode.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof R||t instanceof _||t instanceof St)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}toHtml(t){const e=this.getAnnotationByType(w.INLINE_HTML);return e?this.renderWithWrapperStr(e,t):this.renderTextStr(t)}cloneWithText(t){return new RTETextNode(l(),t,this.parent,super.cloneAnnotations())}clone(t){return new RTETextNode(this.id,this.text,t,super.cloneAnnotations())}isEmpty(){return!(this.getAnnotationByType(w.INLINE_HTML)||this.text&&"​"!==this.text&&"\n"!==this.text)}isTextNode(){return!0}getRangeEndOffset(){return!this.isContentEditable()&&this.parent?this.parent.children.indexOf(this)+1:"\n"===this.text?0:this.text.length}getRangeContainer(){const t=this.getElementRef();if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}getInlineHtmlTagAtDepth(t){const e=this.getInlineHtmlAnnotationAtDepth(t);return e?rt.has(e.htmlTag)?null:{htmlTag:e.htmlTag,attrStr:this.annotationAttrStr(e),groupId:e.groupId,annotation:e}:null}renderHtmlFromDepth(t,e){const s=this.getInlineHtmlAnnotationAtDepth(t);return s?this.renderWithWrapperStr(s,e):this.renderTextStr(e)}getInlineHtmlAnnotationAtDepth(t){let e=this.getAnnotationByType(w.INLINE_HTML);for(let s=0;s<t&&e;s++)e=e.child;return e}registerModifyStrategy(){const t=this.constructor.name;RTETextNode.registerActionStrategyStatus[t]||(this.isContentEditable()&&(j.register(g.UPDATE_TEXT,t,new Nt),j.register(g.REPLACE_SELECTED_TEXT,t,new Rt),j.register(g.LINK_GROUP_NODE_SPLIT,t,new Ct),j.register(gt.name,t,new Ot)),j.register(J.name,t,new ut),j.register(g.DELETE_LINK_GROUP,t,new bt),j.register(dt.name,t,new Ot),j.register(ft.name,t,new Ot),j.register(xt.name,t,new Ot),j.register(At.name,t,new Ot),j.register(vt.name,t,new Ot),j.register(wt.name,t,new Ot),j.register(Tt.name,t,new Ot),j.register(P.name,t,new Ot),RTETextNode.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(p.SELECTION_RANGE);if(t instanceof J&&t.doSplit&&e){const e=j.get(J.name,this.constructor.name);if(e){const s=e.execute(t,this);s&&this.applyActionToNode(s,t)}}else this.applyActionToNode(this,t);"function"==typeof this.parent.mergeNodes&&this.parent.mergeNodes(t)}doModifyActionApply(t){j.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof at)return void this.syncUpSelectedNodes(t);s instanceof K||this.syncUpSelectedNodes(t);const n=j.get(e.constructor.name,t.constructor.name);if(n)return void n.execute(e,t);const r=j.get(P.name,RTETextNode.name);r&&r.execute(e,t)}syncUpSelectedNodes(s){const r=this.getElementRef();if(r){const i=e.getSubjectFromParentNodeByEventId(r,n);i&&t.notify(i,{node:s})}}renderWithWrapperStr(t,e){const{htmlTag:s,child:n}=t,r=this.annotationAttrStr(t);return n?`<${s}${r}>${this.renderWithWrapperStr(n,e)}</${s}>`:rt.has(s)?`<${s}${r}>`:this.text?`<${s}${r}>${this.renderTextStr(e)}</${s}>`:`<${s}${r}></${s}>`}annotationAttrStr(t){const{customAttribute:e,customClass:s,customStyle:n}=t,r=[...(null==e?void 0:e.toString())||[],null==s?void 0:s.toString(),null==n?void 0:n.toString()].filter(c);return r.length>0?` ${r.join(" ")}`:""}renderTextStr(t){var e;const s=(null===(e=this.getAnnotationByType(w.CODE))||void 0===e?void 0:e.code)?"code":"span",n=super.generateAttributeString(t);return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${s}${n}>${this.text}</${s}>`}shouldRenderAsPlainText(){const t=super.getAnnotationByType(w.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof R&&!(t instanceof ot)&&!(t instanceof kt)||t instanceof _)).length}}RTETextNode.registerActionStrategyStatus={},RTETextNode.htmlTag="span";class Bt extends m{constructor(t){super(),this.type=g.APPEND_CHILDREN,this.entityToBeAppended=t}}class jt extends E{constructor(t){super(),this.type=f.TEXT_STYLE,this.textStyle=t}static from(t){return[f.TEXT_STYLE,new jt(t)]}static getDefaultStyles(t){const e={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",minHeight:"22px",fontWeight:"500"},s=Object.assign(Object.assign({},e),{marginTop:"0px",marginBottom:"0px"});switch(t){case"paragraph":return s;case"title":return Object.assign(Object.assign({},e),{fontSize:"36px",lineHeight:"40px",minHeight:"40px"});case"subtitle":return Object.assign(Object.assign({},e),{fontSize:"28px",lineHeight:"32px",minHeight:"32px"});case"heading-1":return Object.assign(Object.assign({},s),{fontSize:"22px",lineHeight:"24px",minHeight:"24px"});case"heading-2":return Object.assign(Object.assign({},s),{fontSize:"20px",lineHeight:"24px",minHeight:"24px"});case"heading-3":return Object.assign(Object.assign({},s),{fontSize:"18px"});case"heading-4":return Object.assign({},s);case"heading-5":return Object.assign(Object.assign({},s),{fontSize:"14px"});case"heading-6":return Object.assign(Object.assign({},s),{fontSize:"12px"});default:return null}}toJSON(){return{textStyle:this.textStyle}}clone(){return new jt(this.textStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.textStyle?`v-rte--text-style-${this.textStyle}`:null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.textStyle?jt.getDefaultStyles(this.textStyle):null}}class _t extends P{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new jt(this.textStyle)}}class $t extends lt{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new dt(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new Et(w.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}class Lt extends m{constructor(t,...e){super(),this.type=g.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class Dt extends m{constructor(t){super(),this.type=g.REPLACE_CHILD_NODES,this.newChildNodes=t}}class It extends lt{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,s){if(t){const n=t.text.slice(0,e),r=t.text.slice(e),i=s.children.indexOf(t);if(i>-1){const e=s.children.slice(0,i),o=s.children.slice(i+1);n&&e.push(t.cloneWithText(n)),r&&o.unshift(t.cloneWithText(r)),s.apply(new Dt(e));const c=s.cloneWithNodes(o);return s.parent.apply(new Lt(s,c)),c}}}}class Mt extends lt{handleAction(t,e){e.children=[],e.apply(new Bt(t.newChildNodes))}}class Ft extends m{constructor(t){super(),this.type=g.DELETE_CHILDREN,this.entityToBeRemoved=t}}class Ht extends lt{handleAction(t,e){const s=t.blockNeedToBeMerged;if(e.type===s.type||"image"!==e.type&&"image"!==s.type){let t=s.children;"image"!==s.type&&(t=s.children.filter((t=>t.text))),e.apply(new Bt(t)),s.parent.apply(new Ft(s))}}}class Pt extends lt{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new RTETextNode(l(),"\n",s),r=t.text.slice(0,e),i=t.text.slice(e),o=s.children.indexOf(t);if(o>-1){const e=s.children.slice(0,o),c=s.children.slice(o+1);r&&e.push(t.cloneWithText(r)),i&&c.unshift(t.cloneWithText(i)),this.mergeLineBreakNodes(e,n,c,s)}return n}}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new RTETextNode(l(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Dt([...t,e,...s]))}}class Jt extends lt{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new RTETextNode(l(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,r,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new Ft(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new RTETextNode(l(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Dt([...t,e,...s]))}}class Kt extends m{constructor(t,...e){super(),this.type=g.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class Ut extends m{constructor(t,e){super(),this.type=g.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class Wt extends P{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new k(this.textAlign)}}class Gt extends lt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class zt extends P{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new v(this.indent)}}class RTETextBlock extends RTEBlock{constructor(t,e,s){super(t),this.children=[],this.type=e;const{autoMatchFormat:n}=s||{autoMatchFormat:!0};n&&(this.annotationMap=RTETextBlock.isAcceptableTextStyle(e)?new Map([jt.from(e)]):new Map([jt.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var s,n;const r=new RTETextBlock(t.id,t.type,e),i=e.autoMatchFormat?Object.assign(Object.assign({},t.annotations),{textStyle:null!==(n=null===(s=t.annotations)||void 0===s?void 0:s.textStyle)&&void 0!==n?n:r.type}):t.annotations;return r.children=t.nodes.map((t=>{const s=H.getRTENodeClass(t.type);if(s)return s.from(t,r,e)})).filter(c),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?jt.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,s)=>{const n=e.at(-1);if(t instanceof gt&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(w.LINK),r=s.getAnnotationByType(w.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,s]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag(),s=super.generateAttributeString(t),n=this.getChildrenHtml(t);return super.shouldRenderAsInternalWrapper()?n:[`<${e}${s}>`,n,`</${e}>`].join("")}cloneWithNodes(t){const e=new RTETextBlock(l(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Bt(t)),e}clone(t){const e=new RTETextBlock(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.isEmpty()))}getLastNode(){return this.children[this.children.length-1]}getBlockTag(){switch(this.type){case"title":case"subtitle":return"div";case"heading-1":return"h1";case"heading-2":return"h2";case"heading-3":return"h3";case"heading-4":return"h4";case"heading-5":return"h5";case"heading-6":return"h6";case"paragraph":default:return"p"}}getChildrenHtml(t){const e=this.getAnnotationByType(p.LINK_GROUP);let s=this.renderGroupedNodesAtDepth(this.children,0,t);return e&&this.children.length>0&&(s=this.generateLinkHtml(e,s,t)),s}doAnnotationActionApply(t){const e=j.get(t.constructor.name,RTETextBlock.name);e&&e.execute(t,this)}renderGroupedNodesAtDepth(t,e,s){var n;let r="",i=0;for(;i<t.length;){const o=t[i].getInlineHtmlTagAtDepth(e);if(!(null==o?void 0:o.groupId)){r+=t[i].renderHtmlFromDepth(e,s),i++;continue}let c=i+1;for(;c<t.length&&(null===(n=t[c].getInlineHtmlTagAtDepth(e))||void 0===n?void 0:n.groupId)===o.groupId;)c++;if(c===i+1)r+=t[i].renderHtmlFromDepth(e,s);else{const n=this.renderGroupedNodesAtDepth(t.slice(i,c),e+1,s);r+=`<${o.htmlTag}${o.attrStr}>${n}</${o.htmlTag}>`}i=c}return r}generateLinkHtml(t,e,s){e="";let n=[];for(let r=0;r<this.children.length;r++){const i=this.children[r].getAnnotationByType(w.LINK),o=this.children[r+1]?this.children[r+1].getAnnotationByType(w.LINK):null;if(i){if(n.push(this.children[r]),!o||i.link.groupKey!==o.link.groupKey){const r=t.toString(i,{standalone:!0,filterInlineStyles:null==s?void 0:s.filterInlineStyles});e+=[`<a${r?` ${r}`:""}>`,this.renderGroupedNodesAtDepth(n,0,s),"</a>"].join(""),n=[]}}else e+=this.children[r].toHtml(s)}return e}}j.register(_t.name,RTETextBlock.name,new $t),j.register(Wt.name,RTETextBlock.name,new Gt),j.register(zt.name,RTETextBlock.name,new class extends lt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),j.register(ct.name,RTETextBlock.name,new class extends lt{handleAction(t,e){let s=e.getAnnotationByType(p.LINK_GROUP);if("update_link"===t.type){if(s){const e=s.linkGroups.get(t.groupKey);e&&s.linkGroups.set(t.groupKey,[e[0]])}}else{if(s){const e=s.linkGroups.get(t.groupKey)||[];s.linkGroups.set(t.groupKey,[...e,...t.nodes])}else s=t.toAnnotation(),s.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(p.LINK_GROUP,s)}}}),j.register(g.UNLINK_LINK_GROUP,RTETextBlock.name,new class extends lt{handleAction(t,e){const s=e.getAnnotationByType(p.LINK_GROUP);s&&(s.linkGroups.size>1?s.linkGroups.delete(t.groupKey):e.annotationMap.delete(p.LINK_GROUP))}}),j.register(g.SPLIT_BLOCK_WITH_NODE,RTETextBlock.name,new It),j.register(g.REPLACE_CHILD_NODES,RTETextBlock.name,new Mt),j.register(g.MERGE_TWO_BLOCKS_NODES,RTETextBlock.name,new Ht),j.register(g.LINE_BREAK_SINGLE_BLOCK,RTETextBlock.name,new Pt),j.register(g.LINE_BREAK_MULTIPLE_BLOCKS,RTETextBlock.name,new Jt),j.register(g.INSERT_IMAGE_TO_BLOCK,RTETextBlock.name,new class extends lt{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,s,n))e.parent.apply(new Lt(e,r));else if(this.isCaretPositionAtBlockStart(e,s,n))e.parent.apply(new Kt(e,r));else{const t=new Ut(s,n);e.apply(t),e.parent.apply(new Lt(e,r))}}}),j.register(g.TRANSFORM_LIST_BLOCK,RTETextBlock.name,new class extends lt{handleAction(t,e){const s=e.parent,n=s.createList(t.listType),r=t.selectedBlocks,i=r.map((t=>s.toListItem(t)));n.apply(new Bt(i)),s.apply(new Lt(t.selectedBlocks[0],n)),r.forEach((t=>{t.parent.apply(new Ft(t))}))}});class Vt extends lt{getPreviousNode(t){const e=t.parent,s=e.children.indexOf(t);if(s>0)return e.children[s-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,s=e.children.indexOf(t);if(e.children[s+1])return e.children[s+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,s=e.children.indexOf(t),n=e.parent;if(e.isListItemBlock()){const t=n.parent;return 0===s&&Array.isArray(n.children)&&n.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===n}return 0===s&&Array.isArray(n.children)&&n.children[0]===e}getPreviousBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(this.isRTEBlock(t.parent)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}isRTEBlock(t){return t&&"VegaRTEContent"!==t.constructor.name}}class Xt extends m{constructor(t,e){super(),this.isFlushable=!0,this.type=g.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class qt extends P{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new K(this.range)}}class RTEDecoratorNode extends RTENode{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(RTEDecoratorNode.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${RTEDecoratorNode.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=this.getElementRef();if(t)return d(t,`.${RTEDecoratorNode.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}RTEDecoratorNode.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",RTEDecoratorNode.DECORATOR_NODE_CLASS="v-internal-decorator-node";class Yt extends y{constructor(){super(...arguments),this.stylesToBeFiltered=Yt.STYLES,this.elementTagName="pre code"}canFilter(t){return S.isCodeBlockNode(t)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}Yt.STYLES={boxSizing:"border-box",color:"rgba(var(--v-text-primary, 32, 54, 69, 1))",textAlign:"left",fontFamily:'"Roboto Mono"',fontWeight:"400",lineHeight:"22px",fontSize:"16px",whiteSpace:"pre-wrap",minHeight:"22px",tabSize:"2px"};class RTECodeBlockNode extends RTEDecoratorNode{constructor(t,e,s,n){super(t),this.type=O.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s,this.annotationMap.set(A.CUSTOM_STYLE,new D(Yt.STYLES))}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}toHtml(t){return`<code${this.generateAttributeString(t)}>${this.text}</code>`}clone(t){return new RTECodeBlockNode(this.id,this.text,this.language,t)}doAnnotationActionApply(t){j.executeTheStrategy(t,this)}doModifyActionApply(t){j.executeTheStrategy(t,this)}}j.register(g.UPDATE_CODE_BLOCK,RTECodeBlockNode.name,new class extends lt{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),j.register(qt.name,RTECodeBlockNode.name,new class extends lt{handleAction(t,e){e.annotationMap.set(p.SELECTION_RANGE,t.toAnnotation())}});var Qt;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(Qt||(Qt={}));class Zt extends lt{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&"parent"in e&&e.parent&&(e.isListItemBlock()&&e.nestList&&e.nestList.length||e.parent.apply(new Ft(e)))}}class te extends y{constructor(){super(...arguments),this.stylesToBeFiltered=te.STYLES,this.elementTagName="pre"}canFilter(t){return S.isCodeBlock(t.constructor.name)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}te.STYLES={backgroundColor:"rgba(var(--v-bg-secondary, 245, 247, 247, 1))",padding:"12px"};class RTECodeBlock extends RTEBlock{constructor(t,e,s){super(t),this.type="code-block",this.annotationMap=new Map([D.from(te.STYLES)]),this.children=[new RTECodeBlockNode(`${t}-1`,e,s,this)]}static from(t){return new RTECodeBlock(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}toHtml(t){const{language:e=Qt["Plain Text"]}=this.children[0];return`<pre data-language="${e}"${super.generateAttributeString(t)}>${this.children.map((e=>e.toHtml(t)))}</pre>`}clone(t){const e=RTECodeBlock.from(this.toJSON());return e.parent=t,e}apply(n){if(n instanceof m&&j.executeTheStrategy(n,this),n.isFlushable){const n=x.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(p.SELECTION_RANGE)}}j.register(g.DELETE_CODE_BLOCK,RTECodeBlock.name,new class extends Vt{handleAction(t,e){const s=e.children[0],n=e.parent;if(n){let t=this.getPreviousNode(s),r=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(s),r=0),n.apply(new Ft(e));const i=t?x.getDOMByEntity(t):null;if(0===n.children.length){const s=RTETextBlock.from({id:l(),type:"paragraph",nodes:[{id:l(),type:"text",text:""}]});e.parent.apply(new Bt([s])),t=s.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(s,r,i,o){const c=x.getDOMByEntity(o);if(c){const o=e.getSubjectFromParentNodeByEventId(c,n);o&&t.notify(o,{node:s,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),j.register(g.DELETE_CHILDREN,RTECodeBlock.name,new Zt),j.register(g.SWITCH_OUT_FROM_CODE_BLOCK,RTECodeBlock.name,new class extends lt{handleAction(s,r){const{content:i,language:o}=s,c=i.split("\n"),a=new Xt(c.slice(0,c.length-2).join("\n"),o);a.isFlushable=!1,r.children[0].apply(a);const h=RTETextBlock.from({id:l(),type:"paragraph",nodes:[{id:l(),text:"",type:"text"}]});r.parent.apply(new Lt(r,h));const u=x.getDOMByEntity(r);if(u){const s=e.getSubjectFromParentNodeByEventId(u,n);s&&t.notify(s,{node:h.children[0]})}}}),j.register(g.INSERT_IMAGE_TO_BLOCK,RTECodeBlock.name,new class extends lt{handleAction(t,e){e.parent.apply(new Lt(e,t.imageBlockToBeInserted))}}),RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{tt as $,j as A,E as B,A as C,L as D,RTECodeBlock as E,w as F,RTEDecoratorNode as G,Wt as H,Lt as I,O as J,_ as K,Dt as L,m as M,R as N,Ut as O,rt as P,Vt as Q,F as R,at as S,_t as T,yt as U,nt as V,Zt as W,W as X,U as Y,N as Z,et as _,B as a,G as a0,V as a1,z as a2,jt as a3,S as a4,k as a5,Z as a6,C as a7,te as a8,RTECodeBlockNode as a9,Yt as aa,Qt as ab,st as ac,gt as ad,Xt as ae,qt as af,vt as ag,dt as ah,xt as ai,At as aj,Q as ak,ft as al,Tt as am,wt as an,zt as ao,H as b,RTETextNode as c,RTEBlock as d,RTETextBlock as e,M as f,lt as g,Bt as h,RTENode as i,Kt as j,p as k,g as l,P as m,Ft as n,$ as o,y as p,$t as q,Gt as r,x as s,Pt as t,Jt as u,It as v,Mt as w,Ht as x,f as y,D as z}