@heartlandone/vega 2.81.0 → 2.82.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 (468) hide show
  1. package/dist/cjs/{app-globals-25e1bfac.js → app-globals-3350d580.js} +7 -7
  2. package/dist/cjs/{aria-dialog-focusable-trap-slimmer-ced9566d.js → aria-dialog-focusable-trap-slimmer-5507f917.js} +1 -1
  3. package/dist/cjs/{child-nodes-event-prevent-slimmer-dd0bb8b6.js → child-nodes-event-prevent-slimmer-9b7095a4.js} +1 -1
  4. package/dist/cjs/{code-block-24b3d0e7.js → code-block-b1f8aded.js} +3 -3
  5. package/dist/cjs/{component-value-history-controller-slimmer.abstract-bd662b32.js → component-value-history-controller-slimmer.abstract-99fbd1f2.js} +4 -4
  6. package/dist/cjs/{content-state-0f26036c.js → content-state-648652b4.js} +3 -3
  7. package/dist/cjs/{dark-mode-style-controller-3a04af3d.js → dark-mode-style-controller-bd765afb.js} +2 -322
  8. package/dist/cjs/{date-required-rule-4377217a.js → date-required-rule-6addf5dd.js} +1 -1
  9. package/dist/cjs/{design-token-40276b11.js → design-token-93070bb8.js} +6 -130
  10. package/dist/cjs/drop-file-accept-filter-slimmer-cd619cc7.js +64 -0
  11. package/dist/cjs/{element-appender-slimmer-be1b4d57.js → element-appender-slimmer-dedd3a34.js} +3 -3
  12. package/dist/cjs/{event-emit-slimmer-bee6b676.js → event-emit-slimmer-bcb458b2.js} +1 -1
  13. package/dist/cjs/{form-field-controller-slimmer-982dbfe4.js → form-field-controller-slimmer-0f3a028e.js} +3 -3
  14. package/dist/cjs/{image-annotation-action-e0df5a20.js → image-annotation-action-0339e983.js} +3 -3
  15. package/dist/cjs/index-58ea899e.js +4 -0
  16. package/dist/cjs/index.cjs.js +18 -16
  17. package/dist/cjs/{inject-keyboard-manager-12b65e98.js → inject-keyboard-manager-2d9c4f92.js} +1 -1
  18. package/dist/cjs/{internal-translation-controller-9f58a4e4.js → internal-translation-controller-fb1532f4.js} +3 -0
  19. package/dist/cjs/{internal-vega-event-manager-cc0f511c.js → internal-vega-event-manager-fef893bf.js} +1 -0
  20. package/dist/cjs/{keyboard-manager-c89a66d3.js → keyboard-manager-5ed6c472.js} +1 -1
  21. package/dist/cjs/{keyboard-manager-slimmer-93fcbf46.js → keyboard-manager-slimmer-879ff4f3.js} +1 -1
  22. package/dist/cjs/loader.cjs.js +13 -12
  23. package/dist/cjs/{month-view-generator-0d25e950.js → month-view-generator-d262e6ce.js} +1 -1
  24. package/dist/cjs/{public-rules-652ec269.js → public-rules-bce88d4e.js} +10 -9
  25. package/dist/cjs/{range-cdd61881.js → range-5bd6d72b.js} +1 -1
  26. package/dist/cjs/{responsive-format-facade-9cae7f27.js → responsive-format-facade-2cab7344.js} +1 -1
  27. package/dist/cjs/{rich-text-editor-required-rule-4b919054.js → rich-text-editor-required-rule-e8a922be.js} +1 -1
  28. package/dist/cjs/{split-cell-operation-3596f738.js → split-cell-operation-bb388de6.js} +4 -4
  29. package/dist/cjs/state-border-formatter-4e5e4ed0.js +133 -0
  30. package/dist/cjs/{string-format-strategy.abstract-ebdb2573.js → string-format-strategy.abstract-9a35e3b4.js} +1 -1
  31. package/dist/cjs/{string-input-formatter-slimmer-9b6a8399.js → string-input-formatter-slimmer-1018ddec.js} +3 -3
  32. package/dist/cjs/{string-mask-strategy-6cc9f391.js → string-mask-strategy-3aa17744.js} +2 -2
  33. package/dist/cjs/{style-formatter-18289c4d.js → style-formatter-2226c869.js} +2 -2
  34. package/dist/cjs/{sub-state-notify-slimmer-39bfcfe3.js → sub-state-notify-slimmer-b33171b0.js} +1 -1
  35. package/dist/cjs/{sub-state-observer-slimmer-e5b50cbf.js → sub-state-observer-slimmer-b8f6f27b.js} +1 -1
  36. package/dist/cjs/{time-required-rule-3517beff.js → time-required-rule-970dfdca.js} +1 -1
  37. package/dist/cjs/tinycolor-polyfill-502efaa8.js +325 -0
  38. package/dist/cjs/{token-extension-addc97c1.js → token-extension-9b213b6b.js} +8 -8
  39. package/dist/cjs/{translation-slimmer-c069ca84.js → translation-slimmer-d0c77ad2.js} +1 -1
  40. package/dist/cjs/{type-guard-362d7da3.js → type-guard-3ec852d7.js} +28 -1
  41. package/dist/cjs/{valid-credit-card-number-rule-1d8bf49c.js → valid-credit-card-number-rule-99d1bb34.js} +1 -1
  42. package/dist/cjs/vega-accordion.cjs.entry.js +7 -6
  43. package/dist/cjs/vega-app-footer.cjs.entry.js +2 -1
  44. package/dist/cjs/vega-app-header-button.cjs.entry.js +8 -7
  45. package/dist/cjs/vega-banner.cjs.entry.js +2 -2
  46. package/dist/cjs/vega-box.cjs.entry.js +6 -5
  47. package/dist/cjs/vega-brand-logo.cjs.entry.js +2 -1
  48. package/dist/cjs/vega-breadcrumb.cjs.entry.js +3 -3
  49. package/dist/cjs/vega-button-circle.cjs.entry.js +9 -8
  50. package/dist/cjs/vega-button-group_2.cjs.entry.js +102 -13
  51. package/dist/cjs/vega-button-link.cjs.entry.js +3 -3
  52. package/dist/cjs/vega-button.cjs.entry.js +8 -8
  53. package/dist/cjs/vega-calendar_4.cjs.entry.js +10 -10
  54. package/dist/cjs/vega-card.cjs.entry.js +5 -4
  55. package/dist/cjs/vega-carousel.cjs.entry.js +5 -5
  56. package/dist/cjs/vega-checkbox_2.cjs.entry.js +7 -7
  57. package/dist/cjs/vega-chip.cjs.entry.js +8 -7
  58. package/dist/cjs/vega-code-block.cjs.entry.js +14 -13
  59. package/dist/cjs/vega-color-picker.cjs.entry.js +26 -8
  60. package/dist/cjs/vega-color-swatch.cjs.entry.js +245 -0
  61. package/dist/cjs/vega-combo-box.cjs.entry.js +10 -10
  62. package/dist/cjs/vega-date-picker_2.cjs.entry.js +20 -20
  63. package/dist/cjs/vega-dialog_2.cjs.entry.js +55 -244
  64. package/dist/cjs/vega-divider.cjs.entry.js +5 -4
  65. package/dist/cjs/vega-dropdown_5.cjs.entry.js +33 -15
  66. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  67. package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
  68. package/dist/cjs/vega-file-uploader.cjs.entry.js +40 -90
  69. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -4
  70. package/dist/cjs/vega-flex.cjs.entry.js +6 -5
  71. package/dist/cjs/vega-font.cjs.entry.js +5 -4
  72. package/dist/cjs/vega-form.cjs.entry.js +9 -9
  73. package/dist/cjs/vega-grid.cjs.entry.js +5 -4
  74. package/dist/cjs/vega-icon.cjs.entry.js +5 -4
  75. package/dist/cjs/vega-image-uploader.cjs.entry.js +78 -13
  76. package/dist/cjs/vega-input-credit-card.cjs.entry.js +11 -11
  77. package/dist/cjs/vega-input-numeric.cjs.entry.js +11 -11
  78. package/dist/cjs/vega-input-passcode.cjs.entry.js +10 -10
  79. package/dist/cjs/vega-input-phone-number.cjs.entry.js +9 -9
  80. package/dist/cjs/vega-input-range.cjs.entry.js +8 -8
  81. package/dist/cjs/vega-input-select.cjs.entry.js +50 -15
  82. package/dist/cjs/vega-input.cjs.entry.js +11 -11
  83. package/dist/cjs/{vega-internal-event-id-a1837fa2.js → vega-internal-event-id-87014e4f.js} +2 -0
  84. package/dist/cjs/vega-item-toggle.cjs.entry.js +2 -2
  85. package/dist/cjs/vega-left-nav_5.cjs.entry.js +14 -12
  86. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  87. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +3 -3
  88. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +3 -3
  89. package/dist/cjs/vega-pagination.cjs.entry.js +8 -8
  90. package/dist/cjs/vega-popover_2.cjs.entry.js +12 -11
  91. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +35 -11
  92. package/dist/cjs/vega-radio_2.cjs.entry.js +10 -10
  93. package/dist/cjs/vega-rich-text-content.cjs.entry.js +10 -9
  94. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +21 -20
  95. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +13 -12
  96. package/dist/cjs/vega-segment-control.cjs.entry.js +2 -2
  97. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +10 -10
  98. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +8 -8
  99. package/dist/cjs/vega-sidenav_3.cjs.entry.js +8 -8
  100. package/dist/cjs/vega-signature-capture.cjs.entry.js +11 -10
  101. package/dist/cjs/vega-stepper.cjs.entry.js +9 -9
  102. package/dist/cjs/vega-tab-group_2.cjs.entry.js +3 -3
  103. package/dist/cjs/vega-table_11.cjs.entry.js +434 -287
  104. package/dist/cjs/vega-text.cjs.entry.js +6 -2
  105. package/dist/cjs/vega-textarea.cjs.entry.js +7 -7
  106. package/dist/cjs/vega-time-picker_2.cjs.entry.js +14 -14
  107. package/dist/cjs/vega-toggle-switch.cjs.entry.js +6 -6
  108. package/dist/cjs/vega-tooltip_2.cjs.entry.js +9 -8
  109. package/dist/cjs/vega.cjs.js +13 -12
  110. package/dist/cjs/{wait-for-component-did-render-b6d12d51.js → wait-for-component-did-render-16863a21.js} +1 -1
  111. package/dist/collection/collection-manifest.json +6 -0
  112. package/dist/collection/components/vega-button/vega-button.css +4 -0
  113. package/dist/collection/components/vega-button-group/slimmers/controllers/vega-button-group-all-items-disabled-controller.js +64 -0
  114. package/dist/collection/components/vega-button-group/vega-button-group-item/slimmers/controllers/vega-button-group-item-sub-state-controller.js +7 -0
  115. package/dist/collection/components/vega-button-group/vega-button-group-item/slimmers/renderers/vega-button-group-item-renderer.js +6 -2
  116. package/dist/collection/components/vega-button-group/vega-button-group-item/vega-button-group-item.js +4 -2
  117. package/dist/collection/components/vega-button-group/vega-button-group.js +20 -1
  118. package/dist/collection/components/vega-color-picker/vega-color-picker.css +0 -1
  119. package/dist/collection/components/vega-color-picker/vega-color-picker.js +40 -1
  120. package/dist/collection/components/vega-color-swatch/slimmers/renderers/vega-color-swatch-renderer.js +127 -0
  121. package/dist/collection/components/vega-color-swatch/vega-color-swatch.css +155 -0
  122. package/dist/collection/components/vega-color-swatch/vega-color-swatch.js +314 -0
  123. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/controllers/vega-dropdown-item-state-controller.js +7 -0
  124. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +5 -1
  125. package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.js +2 -1
  126. package/dist/collection/components/vega-dropdown/vega-dropdown.js +38 -0
  127. package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +2 -2
  128. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-default-content-renderer.js +45 -1
  129. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-preview-content-renderer.js +16 -1
  130. package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +5 -0
  131. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +17 -4
  132. package/dist/collection/components/vega-input-select/vega-input-select.js +76 -0
  133. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +0 -4
  134. package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +28 -28
  135. package/dist/collection/components/vega-modal/vega-modal.css +2 -2
  136. package/dist/collection/components/vega-modal/vega-modal.js +0 -5
  137. package/dist/collection/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-step-controller.js +10 -2
  138. package/dist/collection/components/vega-progress-tracker/slimmers/renderers/vega-progress-tracker-renderer.js +1 -1
  139. package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +37 -0
  140. package/dist/collection/components/vega-stepper/vega-stepper.css +12 -0
  141. package/dist/collection/components/vega-stepper/vega-stepper.js +2 -1
  142. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-render-input-controller.js +25 -2
  143. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.js +28 -1
  144. package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +12 -10
  145. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +14 -12
  146. package/dist/collection/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.js +5 -4
  147. package/dist/collection/components/vega-table/vega-table-head-row/vega-table-head-row.js +8 -1
  148. package/dist/collection/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.js +6 -2
  149. package/dist/collection/components/vega-text/vega-text.js +1 -1
  150. package/dist/collection/components/vega-tooltip/slimmers/controllers/vega-tooltip-element-appender-controller.js +1 -0
  151. package/dist/collection/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.css +1 -0
  152. package/dist/collection/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.js +1 -1
  153. package/dist/collection/components/vega-tooltip/vega-tooltip.js +1 -1
  154. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +1 -0
  155. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
  156. package/dist/collection/{components/vega-file-uploader/slimmers/controllers/vega-file-uploader-drop-file-filter-controller.js → helpers/slimmers/drop-file-accept-filter-slimmer.js} +13 -5
  157. package/dist/collection/helpers/slimmers/vega-table-child-render-input-consumer-slimmer.js +96 -0
  158. package/dist/collection/helpers/translation/locales/en.js +3 -0
  159. package/dist/collection/types/type-guard.js +26 -0
  160. package/dist/esm/{app-globals-80a7d395.js → app-globals-0b7e8b50.js} +7 -7
  161. package/dist/esm/{aria-dialog-focusable-trap-slimmer-cc6a8c3e.js → aria-dialog-focusable-trap-slimmer-853a91de.js} +1 -1
  162. package/dist/esm/{child-nodes-event-prevent-slimmer-2ecc3e1f.js → child-nodes-event-prevent-slimmer-9c24d4fc.js} +1 -1
  163. package/dist/esm/{code-block-cd913077.js → code-block-b8be290a.js} +3 -3
  164. package/dist/esm/{component-value-history-controller-slimmer.abstract-e595761d.js → component-value-history-controller-slimmer.abstract-10ccf8e6.js} +4 -4
  165. package/dist/esm/{content-state-89f8eecb.js → content-state-72b513d1.js} +3 -3
  166. package/dist/esm/{dark-mode-style-controller-82e5c1c6.js → dark-mode-style-controller-e9a6b097.js} +1 -321
  167. package/dist/esm/{date-required-rule-2b08f32c.js → date-required-rule-891a6a57.js} +1 -1
  168. package/dist/esm/{design-token-7566d54c.js → design-token-59d07aa2.js} +6 -130
  169. package/dist/esm/drop-file-accept-filter-slimmer-ad759e4a.js +62 -0
  170. package/dist/esm/{element-appender-slimmer-df2a2da2.js → element-appender-slimmer-5aca1bca.js} +3 -3
  171. package/dist/esm/{event-emit-slimmer-9abc9241.js → event-emit-slimmer-32da9d90.js} +1 -1
  172. package/dist/esm/{form-field-controller-slimmer-40fcb5c2.js → form-field-controller-slimmer-899864a8.js} +3 -3
  173. package/dist/esm/{image-annotation-action-6048d32e.js → image-annotation-action-ebd6c421.js} +3 -3
  174. package/dist/esm/index-090d31ca.js +4 -0
  175. package/dist/esm/index.js +18 -16
  176. package/dist/esm/{inject-keyboard-manager-c6557f50.js → inject-keyboard-manager-dc1d7135.js} +1 -1
  177. package/dist/esm/{internal-translation-controller-b08aa9ab.js → internal-translation-controller-4fb104b2.js} +3 -0
  178. package/dist/esm/{internal-vega-event-manager-59f5bd47.js → internal-vega-event-manager-8a657bac.js} +1 -0
  179. package/dist/esm/{keyboard-manager-c7b125d7.js → keyboard-manager-6ea9968b.js} +1 -1
  180. package/dist/esm/{keyboard-manager-slimmer-6109039b.js → keyboard-manager-slimmer-7eed4734.js} +1 -1
  181. package/dist/esm/loader.js +13 -12
  182. package/dist/esm/{month-view-generator-139ace5a.js → month-view-generator-aaa27fce.js} +1 -1
  183. package/dist/esm/{public-rules-e42bce9d.js → public-rules-f2005e11.js} +10 -9
  184. package/dist/esm/{range-b76edec7.js → range-ed532278.js} +1 -1
  185. package/dist/esm/{responsive-format-facade-151dbd10.js → responsive-format-facade-e9926018.js} +1 -1
  186. package/dist/esm/{rich-text-editor-required-rule-1fc7c040.js → rich-text-editor-required-rule-b559cf1a.js} +1 -1
  187. package/dist/esm/{split-cell-operation-548ea374.js → split-cell-operation-5587f594.js} +4 -4
  188. package/dist/esm/state-border-formatter-be51463d.js +129 -0
  189. package/dist/esm/{string-format-strategy.abstract-6488031a.js → string-format-strategy.abstract-0157b3c5.js} +1 -1
  190. package/dist/esm/{string-input-formatter-slimmer-625e17a2.js → string-input-formatter-slimmer-33ed3478.js} +3 -3
  191. package/dist/esm/{string-mask-strategy-a165d316.js → string-mask-strategy-b58891b5.js} +2 -2
  192. package/dist/esm/{style-formatter-280757ae.js → style-formatter-9662ae88.js} +2 -2
  193. package/dist/esm/{sub-state-notify-slimmer-6c972bb4.js → sub-state-notify-slimmer-1f907173.js} +1 -1
  194. package/dist/esm/{sub-state-observer-slimmer-53643b5c.js → sub-state-observer-slimmer-090c500a.js} +1 -1
  195. package/dist/esm/{time-required-rule-3f5a8822.js → time-required-rule-a9dc8473.js} +1 -1
  196. package/dist/esm/tinycolor-polyfill-7be0eb93.js +322 -0
  197. package/dist/esm/{token-extension-5ee7a3f1.js → token-extension-9d717a35.js} +8 -8
  198. package/dist/esm/{translation-slimmer-35b1d0fa.js → translation-slimmer-4faae5a3.js} +1 -1
  199. package/dist/esm/{type-guard-f6c9c89d.js → type-guard-152070e9.js} +28 -2
  200. package/dist/esm/{valid-credit-card-number-rule-3bf19ad6.js → valid-credit-card-number-rule-a7907cb7.js} +1 -1
  201. package/dist/esm/vega-accordion.entry.js +7 -6
  202. package/dist/esm/vega-app-footer.entry.js +2 -1
  203. package/dist/esm/vega-app-header-button.entry.js +8 -7
  204. package/dist/esm/vega-banner.entry.js +2 -2
  205. package/dist/esm/vega-box.entry.js +6 -5
  206. package/dist/esm/vega-brand-logo.entry.js +2 -1
  207. package/dist/esm/vega-breadcrumb.entry.js +3 -3
  208. package/dist/esm/vega-button-circle.entry.js +9 -8
  209. package/dist/esm/vega-button-group_2.entry.js +102 -13
  210. package/dist/esm/vega-button-link.entry.js +3 -3
  211. package/dist/esm/vega-button.entry.js +8 -8
  212. package/dist/esm/vega-calendar_4.entry.js +10 -10
  213. package/dist/esm/vega-card.entry.js +5 -4
  214. package/dist/esm/vega-carousel.entry.js +5 -5
  215. package/dist/esm/vega-checkbox_2.entry.js +7 -7
  216. package/dist/esm/vega-chip.entry.js +8 -7
  217. package/dist/esm/vega-code-block.entry.js +14 -13
  218. package/dist/esm/vega-color-picker.entry.js +26 -8
  219. package/dist/esm/vega-color-swatch.entry.js +241 -0
  220. package/dist/esm/vega-combo-box.entry.js +10 -10
  221. package/dist/esm/vega-date-picker_2.entry.js +20 -20
  222. package/dist/esm/vega-dialog_2.entry.js +55 -244
  223. package/dist/esm/vega-divider.entry.js +5 -4
  224. package/dist/esm/vega-dropdown_5.entry.js +33 -15
  225. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  226. package/dist/esm/vega-field-label.entry.js +2 -2
  227. package/dist/esm/vega-file-uploader.entry.js +40 -90
  228. package/dist/esm/vega-flag-icon.entry.js +5 -4
  229. package/dist/esm/vega-flex.entry.js +6 -5
  230. package/dist/esm/vega-font.entry.js +5 -4
  231. package/dist/esm/vega-form.entry.js +9 -9
  232. package/dist/esm/vega-grid.entry.js +5 -4
  233. package/dist/esm/vega-icon.entry.js +5 -4
  234. package/dist/esm/vega-image-uploader.entry.js +78 -13
  235. package/dist/esm/vega-input-credit-card.entry.js +11 -11
  236. package/dist/esm/vega-input-numeric.entry.js +11 -11
  237. package/dist/esm/vega-input-passcode.entry.js +10 -10
  238. package/dist/esm/vega-input-phone-number.entry.js +9 -9
  239. package/dist/esm/vega-input-range.entry.js +8 -8
  240. package/dist/esm/vega-input-select.entry.js +50 -15
  241. package/dist/esm/vega-input.entry.js +11 -11
  242. package/dist/esm/{vega-internal-event-id-70bd893d.js → vega-internal-event-id-194bac82.js} +2 -1
  243. package/dist/esm/vega-item-toggle.entry.js +2 -2
  244. package/dist/esm/vega-left-nav_5.entry.js +14 -12
  245. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  246. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
  247. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +3 -3
  248. package/dist/esm/vega-pagination.entry.js +8 -8
  249. package/dist/esm/vega-popover_2.entry.js +12 -11
  250. package/dist/esm/vega-progress-tracker_2.entry.js +35 -11
  251. package/dist/esm/vega-radio_2.entry.js +10 -10
  252. package/dist/esm/vega-rich-text-content.entry.js +10 -9
  253. package/dist/esm/vega-rich-text-editor_4.entry.js +21 -20
  254. package/dist/esm/vega-rich-text-table-properties_3.entry.js +13 -12
  255. package/dist/esm/vega-segment-control.entry.js +2 -2
  256. package/dist/esm/vega-selection-chip_2.entry.js +10 -10
  257. package/dist/esm/vega-selection-tile_2.entry.js +8 -8
  258. package/dist/esm/vega-sidenav_3.entry.js +8 -8
  259. package/dist/esm/vega-signature-capture.entry.js +11 -10
  260. package/dist/esm/vega-stepper.entry.js +9 -9
  261. package/dist/esm/vega-tab-group_2.entry.js +3 -3
  262. package/dist/esm/vega-table_11.entry.js +434 -287
  263. package/dist/esm/vega-text.entry.js +6 -2
  264. package/dist/esm/vega-textarea.entry.js +7 -7
  265. package/dist/esm/vega-time-picker_2.entry.js +14 -14
  266. package/dist/esm/vega-toggle-switch.entry.js +6 -6
  267. package/dist/esm/vega-tooltip_2.entry.js +9 -8
  268. package/dist/esm/vega.js +13 -12
  269. package/dist/esm/{wait-for-component-did-render-6980a1a6.js → wait-for-component-did-render-30cde59c.js} +1 -1
  270. package/dist/sri/vega-sri-manifest.json +362 -346
  271. package/dist/types/components/vega-button-group/slimmers/controllers/vega-button-group-all-items-disabled-controller.d.ts +21 -0
  272. package/dist/types/components/vega-button-group/vega-button-group-item/slimmers/controllers/vega-button-group-item-sub-state-controller.d.ts +1 -0
  273. package/dist/types/components/vega-button-group/vega-button-group-item/slimmers/renderers/vega-button-group-item-renderer.d.ts +1 -0
  274. package/dist/types/components/vega-button-group/vega-button-group-item/vega-button-group-item.d.ts +1 -0
  275. package/dist/types/components/vega-button-group/vega-button-group.d.ts +5 -0
  276. package/dist/types/components/vega-color-picker/vega-color-picker.d.ts +14 -0
  277. package/dist/types/components/vega-color-swatch/slimmers/renderers/vega-color-swatch-renderer.d.ts +48 -0
  278. package/dist/types/components/vega-color-swatch/types.d.ts +5 -0
  279. package/dist/types/components/vega-color-swatch/vega-color-swatch.d.ts +86 -0
  280. package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/controllers/vega-dropdown-item-state-controller.d.ts +1 -0
  281. package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.d.ts +1 -0
  282. package/dist/types/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.d.ts +4 -0
  283. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +10 -0
  284. package/dist/types/components/vega-file-uploader/vega-file-uploader.d.ts +2 -2
  285. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-default-content-renderer.d.ts +25 -0
  286. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-preview-content-renderer.d.ts +10 -0
  287. package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +2 -0
  288. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +3 -0
  289. package/dist/types/components/vega-input-select/types.d.ts +14 -0
  290. package/dist/types/components/vega-input-select/vega-input-select.d.ts +19 -1
  291. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +0 -1
  292. package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +3 -2
  293. package/dist/types/components/vega-modal/vega-modal.d.ts +0 -2
  294. package/dist/types/components/vega-pagination/types.d.ts +7 -1
  295. package/dist/types/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-step-controller.d.ts +1 -0
  296. package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +16 -0
  297. package/dist/types/components/vega-table/slimmers/controllers/vega-table-render-input-controller.d.ts +8 -1
  298. package/dist/types/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.d.ts +5 -1
  299. package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +5 -0
  300. package/dist/types/components/vega-table/vega-table-head-cell/vega-table-head-cell.d.ts +5 -0
  301. package/dist/types/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.d.ts +1 -0
  302. package/dist/types/components/vega-table/vega-table-head-row/vega-table-head-row.d.ts +4 -0
  303. package/dist/types/components/vega-text/types.d.ts +5 -3
  304. package/dist/types/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.d.ts +4 -0
  305. package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +4 -0
  306. package/dist/types/components.d.ts +154 -5
  307. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
  308. package/dist/types/helpers/formatter/string-formatter/string-mask-strategy.d.ts +56 -3
  309. package/dist/types/helpers/slimmers/drop-file-accept-filter-slimmer.d.ts +29 -0
  310. package/dist/types/helpers/slimmers/vega-table-child-render-input-consumer-slimmer.d.ts +48 -0
  311. package/dist/types/helpers/translation/interface.d.ts +4 -1
  312. package/dist/types/types/components.type.d.ts +7 -0
  313. package/dist/types/types/public-api.d.ts +3 -1
  314. package/dist/types/types/type-guard.d.ts +15 -1
  315. package/dist/vega/index.esm.js +1 -1
  316. package/dist/vega/{p-2f99c511.js → p-02467b61.js} +1 -1
  317. package/dist/vega/p-075bb809.entry.js +1 -0
  318. package/dist/vega/{p-59c6f795.js → p-085de8fc.js} +1 -1
  319. package/dist/vega/{p-0fc2ccc4.entry.js → p-0915a8d3.entry.js} +1 -1
  320. package/dist/vega/{p-a1d51bc2.js → p-0caf52e0.js} +1 -1
  321. package/dist/vega/{p-42da45e3.entry.js → p-0dbd7723.entry.js} +1 -1
  322. package/dist/vega/{p-98c44c03.js → p-103d20f5.js} +1 -1
  323. package/dist/vega/p-115d6053.entry.js +1 -0
  324. package/dist/vega/{p-0304c3a7.js → p-116e3963.js} +1 -1
  325. package/dist/vega/p-14de7ba0.entry.js +1 -0
  326. package/dist/vega/{p-42e246e4.entry.js → p-19a30f98.entry.js} +1 -1
  327. package/dist/vega/{p-e1117034.entry.js → p-1ca95601.entry.js} +1 -1
  328. package/dist/vega/{p-f5d3ce94.js → p-1dd6ba67.js} +1 -1
  329. package/dist/vega/{p-118aeed1.entry.js → p-1efb47fe.entry.js} +1 -1
  330. package/dist/vega/p-23c840dc.entry.js +1 -0
  331. package/dist/vega/{p-90a0b9f3.entry.js → p-246eb001.entry.js} +1 -1
  332. package/dist/vega/p-25ab7a33.entry.js +1 -0
  333. package/dist/vega/p-264b3309.entry.js +1 -0
  334. package/dist/vega/{p-c0d45f77.entry.js → p-280f63fa.entry.js} +1 -1
  335. package/dist/vega/p-29d31c98.entry.js +1 -0
  336. package/dist/vega/{p-7ac9e8ff.entry.js → p-29f42c27.entry.js} +1 -1
  337. package/dist/vega/p-2b5cf2b3.js +1 -0
  338. package/dist/vega/{p-679b1f00.entry.js → p-30445cd9.entry.js} +1 -1
  339. package/dist/vega/p-318f0df5.js +1 -0
  340. package/dist/vega/p-337a5e76.js +1 -0
  341. package/dist/vega/p-3505f7cc.entry.js +1 -0
  342. package/dist/vega/p-38af89b9.js +1 -0
  343. package/dist/vega/p-3fae8d3f.entry.js +1 -0
  344. package/dist/vega/{p-49ae8c79.js → p-42141782.js} +1 -1
  345. package/dist/vega/{p-d0ac7af8.js → p-44044ed7.js} +1 -1
  346. package/dist/vega/p-475bd8bf.entry.js +1 -0
  347. package/dist/vega/{p-e753fac2.entry.js → p-47611a83.entry.js} +1 -1
  348. package/dist/vega/p-4e95248c.entry.js +1 -0
  349. package/dist/vega/p-4f938ee4.entry.js +1 -0
  350. package/dist/vega/{p-eccabba7.entry.js → p-513f51ec.entry.js} +1 -1
  351. package/dist/vega/{p-e8fc8495.entry.js → p-51d2e0ab.entry.js} +1 -1
  352. package/dist/vega/{p-dff66a67.entry.js → p-58b6ac33.entry.js} +1 -1
  353. package/dist/vega/p-596bc4f6.entry.js +1 -0
  354. package/dist/vega/{p-757bfca2.entry.js → p-597588d0.entry.js} +1 -1
  355. package/dist/vega/p-5f377954.js +1 -1
  356. package/dist/vega/{p-4ed416e7.js → p-5ffdea8e.js} +1 -1
  357. package/dist/vega/{p-3224e47c.js → p-6572e038.js} +1 -1
  358. package/dist/vega/{p-ac43be09.entry.js → p-6d95390b.entry.js} +1 -1
  359. package/dist/vega/p-6e9f832f.js +1 -0
  360. package/dist/vega/p-783531cf.entry.js +1 -0
  361. package/dist/vega/{p-47a2eec1.entry.js → p-7d85cc74.entry.js} +1 -1
  362. package/dist/vega/p-7df43192.entry.js +1 -0
  363. package/dist/vega/p-7faaa5e1.entry.js +1 -0
  364. package/dist/vega/{p-f0d605e9.entry.js → p-8583dd34.entry.js} +1 -1
  365. package/dist/vega/p-85abe824.entry.js +1 -0
  366. package/dist/vega/p-874bf8b2.js +1 -0
  367. package/dist/vega/p-88b6184c.entry.js +1 -0
  368. package/dist/vega/p-8aee6b74.js +1 -0
  369. package/dist/vega/{p-9324dd2c.entry.js → p-8b217c7e.entry.js} +1 -1
  370. package/dist/vega/p-8da66d41.entry.js +1 -0
  371. package/dist/vega/{p-fd5ddc55.js → p-956b170c.js} +1 -1
  372. package/dist/vega/{p-001d36af.js → p-9751c801.js} +1 -1
  373. package/dist/vega/{p-add63fe0.entry.js → p-97f36f4e.entry.js} +1 -1
  374. package/dist/vega/p-988401c3.entry.js +1 -0
  375. package/dist/vega/{p-f40d479d.entry.js → p-9c1a48b9.entry.js} +1 -1
  376. package/dist/vega/p-9d854d43.js +1 -0
  377. package/dist/vega/{p-64e22fe5.js → p-a07c0f8c.js} +1 -1
  378. package/dist/vega/{p-6216c30e.js → p-a0c3968b.js} +1 -1
  379. package/dist/vega/{p-e22e5aa1.js → p-a30ae8a1.js} +1 -1
  380. package/dist/vega/p-a5bd3ecd.entry.js +1 -0
  381. package/dist/vega/p-a6dbc63d.entry.js +1 -0
  382. package/dist/vega/p-aa985d73.js +1 -0
  383. package/dist/vega/{p-5f95a2fa.js → p-ab829745.js} +1 -1
  384. package/dist/vega/p-b08a70e6.entry.js +1 -0
  385. package/dist/vega/p-b19b1c08.js +1 -0
  386. package/dist/vega/p-b5497af2.entry.js +1 -0
  387. package/dist/vega/p-b7624ce4.js +1 -0
  388. package/dist/vega/{p-83863463.js → p-b9386dd0.js} +1 -1
  389. package/dist/vega/{p-88e6618d.js → p-b9947846.js} +1 -1
  390. package/dist/vega/p-b9a95aca.entry.js +1 -0
  391. package/dist/vega/{p-53ba1adb.entry.js → p-bb46d8e6.entry.js} +1 -1
  392. package/dist/vega/{p-63d73fa0.entry.js → p-c366e7f7.entry.js} +1 -1
  393. package/dist/vega/p-c36afa21.entry.js +1 -0
  394. package/dist/vega/{p-f509b439.js → p-c8435185.js} +1 -1
  395. package/dist/vega/{p-ab4b06c9.entry.js → p-c8d41cdc.entry.js} +1 -1
  396. package/dist/vega/{p-ff47aeee.entry.js → p-cab70b95.entry.js} +1 -1
  397. package/dist/vega/p-cc18970f.entry.js +1 -0
  398. package/dist/vega/p-d320496e.entry.js +1 -0
  399. package/dist/vega/{p-ae0f03c1.js → p-d32e83e7.js} +1 -1
  400. package/dist/vega/{p-37a9f4b4.entry.js → p-d456386a.entry.js} +1 -1
  401. package/dist/vega/{p-d289a6af.js → p-d4f1f007.js} +1 -1
  402. package/dist/vega/{p-82016096.js → p-d5531d3c.js} +1 -1
  403. package/dist/vega/{p-9b14ac66.entry.js → p-d7bd2470.entry.js} +1 -1
  404. package/dist/vega/p-d872beb1.entry.js +1 -0
  405. package/dist/vega/{p-f5013494.entry.js → p-d9d5c693.entry.js} +1 -1
  406. package/dist/vega/{p-c2e7992b.js → p-dd6211cd.js} +1 -1
  407. package/dist/vega/{p-5a8be21c.entry.js → p-e340d58c.entry.js} +1 -1
  408. package/dist/vega/{p-dc6e7a77.js → p-e71864ff.js} +1 -1
  409. package/dist/vega/{p-5e9f6fb6.entry.js → p-ea564928.entry.js} +1 -1
  410. package/dist/vega/p-eb0ebf50.entry.js +1 -0
  411. package/dist/vega/p-ebdb489c.entry.js +1 -0
  412. package/dist/vega/{p-01541820.entry.js → p-ed01657b.entry.js} +1 -1
  413. package/dist/vega/p-eda7cd76.entry.js +1 -0
  414. package/dist/vega/{p-68a531cf.js → p-edda10f7.js} +1 -1
  415. package/dist/vega/{p-24b45c85.js → p-ef59f6f0.js} +1 -1
  416. package/dist/vega/{p-77c6f14a.entry.js → p-efc8c09e.entry.js} +1 -1
  417. package/dist/vega/p-f020738c.entry.js +1 -0
  418. package/dist/vega/{p-f2cef51a.js → p-f7a5746b.js} +1 -1
  419. package/dist/vega/{p-27dc6562.entry.js → p-f89cf75a.entry.js} +1 -1
  420. package/dist/vega/p-fb5ea4b2.js +1 -0
  421. package/dist/vega/p-fc7ab79d.js +1 -0
  422. package/dist/vega/vega.esm.js +1 -1
  423. package/package.json +1 -1
  424. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.js +0 -182
  425. package/dist/types/components/vega-file-uploader/slimmers/controllers/vega-file-uploader-drop-file-filter-controller.d.ts +0 -22
  426. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.d.ts +0 -51
  427. package/dist/vega/p-08f03a52.entry.js +0 -1
  428. package/dist/vega/p-0a145766.entry.js +0 -1
  429. package/dist/vega/p-0d205fbf.js +0 -1
  430. package/dist/vega/p-1a4e8d8a.js +0 -1
  431. package/dist/vega/p-23dc4064.entry.js +0 -1
  432. package/dist/vega/p-262a27d0.js +0 -1
  433. package/dist/vega/p-2beace1c.entry.js +0 -1
  434. package/dist/vega/p-2ce2972f.js +0 -1
  435. package/dist/vega/p-2e7d5e28.entry.js +0 -1
  436. package/dist/vega/p-32592497.entry.js +0 -1
  437. package/dist/vega/p-33860e54.js +0 -1
  438. package/dist/vega/p-3d2d267d.js +0 -1
  439. package/dist/vega/p-3f3c771a.entry.js +0 -1
  440. package/dist/vega/p-4013d954.entry.js +0 -1
  441. package/dist/vega/p-479a169c.entry.js +0 -1
  442. package/dist/vega/p-55019e55.entry.js +0 -1
  443. package/dist/vega/p-565aac6e.entry.js +0 -1
  444. package/dist/vega/p-574586c9.entry.js +0 -1
  445. package/dist/vega/p-5781b9f4.entry.js +0 -1
  446. package/dist/vega/p-57827342.entry.js +0 -1
  447. package/dist/vega/p-5baff397.js +0 -1
  448. package/dist/vega/p-62e80151.entry.js +0 -1
  449. package/dist/vega/p-76daa632.entry.js +0 -1
  450. package/dist/vega/p-8ac2d165.js +0 -1
  451. package/dist/vega/p-9aa1c66a.entry.js +0 -1
  452. package/dist/vega/p-9b01a28a.entry.js +0 -1
  453. package/dist/vega/p-b525c800.entry.js +0 -1
  454. package/dist/vega/p-be651266.entry.js +0 -1
  455. package/dist/vega/p-c56aa01c.entry.js +0 -1
  456. package/dist/vega/p-c8feb644.entry.js +0 -1
  457. package/dist/vega/p-cc3c661c.entry.js +0 -1
  458. package/dist/vega/p-cda09e99.entry.js +0 -1
  459. package/dist/vega/p-d29e8972.entry.js +0 -1
  460. package/dist/vega/p-d47aa28f.js +0 -1
  461. package/dist/vega/p-d90eee9a.entry.js +0 -1
  462. package/dist/vega/p-dcf8f58f.entry.js +0 -1
  463. package/dist/vega/p-e223e0dc.entry.js +0 -1
  464. package/dist/vega/p-ea2b5dbb.js +0 -1
  465. package/dist/vega/p-f2c65579.entry.js +0 -1
  466. package/dist/vega/p-f69e2801.entry.js +0 -1
  467. package/dist/vega/p-fa654762.entry.js +0 -1
  468. package/dist/vega/p-fbc5a7f6.entry.js +0 -1
@@ -1 +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}
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-aa985d73.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-b9386dd0.js";import{T as a}from"./p-d884c644.js";import{g as l}from"./p-8b5d3a52.js";import{V as h}from"./p-8aee6b74.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}
@@ -1 +1 @@
1
- import{c as e,M as t,V as c}from"./p-6e1ab235.js";import{V as s}from"./p-82016096.js";var a=function(e,t,c,s){var a,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,c):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,c,s);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(l=(o<3?a(l):o>3?a(t,c,l):a(t,c))||l);return o>3&&l&&Object.defineProperty(t,c,l),l};class o extends c{disconnectedCallback(){s.unRegisterComponent(this.host)}t(e,...t){return s.registerComponent(this.host),s.t(e,...t)}}a([e()],o.prototype,"host",void 0),a([t("disconnectedCallback")],o.prototype,"disconnectedCallback",null);export{o as T}
1
+ import{c as e,M as t,V as c}from"./p-6e1ab235.js";import{V as s}from"./p-d5531d3c.js";var a=function(e,t,c,s){var a,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,c):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,c,s);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(l=(o<3?a(l):o>3?a(t,c,l):a(t,c))||l);return o>3&&l&&Object.defineProperty(t,c,l),l};class o extends c{disconnectedCallback(){s.unRegisterComponent(this.host)}t(e,...t){return s.registerComponent(this.host),s.t(e,...t)}}a([e()],o.prototype,"host",void 0),a([t("disconnectedCallback")],o.prototype,"disconnectedCallback",null);export{o as T}
@@ -1 +1 @@
1
- import{h as t,r as e,H as i,g as o}from"./p-6b2342e0.js";import{c as r,V as s,I as a}from"./p-6e1ab235.js";import{V as n,I as l}from"./p-4415ad28.js";import{s as f}from"./p-519a7d55.js";import{D as c,d as p}from"./p-f28a6074.js";import{B as h,H as v,a as d,h as m}from"./p-c5eb0fa6.js";import{n as u,c as g}from"./p-262ec334.js";import{f as b}from"./p-6e70d3cc.js";import{C as j}from"./p-2d0d575f.js";import{u as y}from"./p-33860e54.js";import{C as x}from"./p-68a531cf.js";import"./p-331a62d5.js";import"./p-3d2d267d.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";var R=function(t,e,i,o){var r,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};class C extends s{constructor(){super(...arguments),this.handleChange=()=>{if(this.inputRef.value){const t=u(g(this.inputRef.value,1),1,this.pageCount);this.inputRef.value=t.toString(),this.prevAndNextButtonRenderer.notifyParentPagination(t.toString())}}}render(){return"pageSelectorMobile"===this.type?this.renderPageSelectorMobile():this.renderPageSelectorMobileAndGoTo()}renderPageSelectorMobile(){return t("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},this.prevAndNextButtonRenderer.render("prev"),t("vega-font",{variant:"font-field-label",color:"text-primary"},this.current.toString()),t("vega-font",{variant:"font-field-label",color:"text-primary"},"/"),t("vega-font",{variant:"font-field-label",color:"text-primary"},this.pageCount.toString()),this.prevAndNextButtonRenderer.render("next"))}renderPageSelectorMobileAndGoTo(){return t("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},this.prevAndNextButtonRenderer.render("prev"),t("vega-form",{ref:t=>{c.addUniqueObserverToNode(t,h,this.handleChange)}},t("vega-input",{"data-vega-form":"pageSelectorMobile_goTo",size:"small",showClearIcon:!1,style:{width:"54px"},maskConfig:{type:"number",options:{allowNegative:!1,precision:0}},value:this.current.toString(),ref:t=>{this.inputRef=t,c.addUniqueObserverToNode(t,v,this.handleChange)}})),t("vega-font",{variant:"font-field-label",color:"text-primary"},"/"),t("vega-font",{variant:"font-field-label",color:"text-primary"},this.pageCount.toString()),this.prevAndNextButtonRenderer.render("next"))}}R([r()],C.prototype,"host",void 0),R([r()],C.prototype,"type",void 0),R([r()],C.prototype,"current",void 0),R([r()],C.prototype,"pageCount",void 0),R([r()],C.prototype,"prevAndNextButtonRenderer",void 0);var w=function(t,e,i,o){var r,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};class S extends s{constructor(){super(...arguments),this.pagerButton=(e,i,o)=>t("vega-button-circle",{variant:"icon-only",icon:e,iconColor:"text-link",size:"small",disabled:i,ref:t=>{c.addUniqueObserverToNode(t,d,o)}}),this.renderPrevButton=()=>this.pagerButton("chevron-left",0===this.total||1===this.current,(()=>{this.notifyParentPagination((this.current-1).toString())})),this.renderNextButton=()=>this.pagerButton("chevron-right",0===this.total||this.current===this.pageCount,(()=>{this.notifyParentPagination((this.current+1).toString())}))}notifyParentPagination(t){const e=b(this.host,"vega-pagination");e&&j.notify(p.getSubject(e,y),{host:this.host,detail:t})}render(t){return"prev"===t?this.renderPrevButton():this.renderNextButton()}}w([r()],S.prototype,"host",void 0),w([r()],S.prototype,"current",void 0),w([r()],S.prototype,"total",void 0),w([r()],S.prototype,"pageCount",void 0);var M=function(t,e,i,o){var r,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const O=class{constructor(t){e(this,t),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new n,this.childEventPrevent=new x([m],(()=>this.host)),this.pageSelectorMobileRenderer=new C,this.prevAndNextButtonRenderer=new S,this.pageCount=0,this.current=1,this.total=0}render(){return f(t(i,null,this.pageSelectorMobileRenderer.render()),this.host)}get host(){return o(this)}};M([l()],O.prototype,"globalSlimmers",void 0),M([a()],O.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),M([a()],O.prototype,"childEventPrevent",void 0),M([a()],O.prototype,"pageSelectorMobileRenderer",void 0),M([a()],O.prototype,"prevAndNextButtonRenderer",void 0),O.style=":host{display:inline-block}";export{O as vega_pagination_page_selector_mobile}
1
+ import{h as t,r as e,H as i,g as o}from"./p-6b2342e0.js";import{c as r,V as s,I as a}from"./p-6e1ab235.js";import{V as n,I as l}from"./p-4415ad28.js";import{s as f}from"./p-519a7d55.js";import{D as c,d as p}from"./p-f28a6074.js";import{B as h,H as v,a as d,h as m}from"./p-c5eb0fa6.js";import{n as u,c as g}from"./p-262ec334.js";import{f as b}from"./p-6e70d3cc.js";import{C as j}from"./p-2d0d575f.js";import{u as y}from"./p-aa985d73.js";import{C as x}from"./p-edda10f7.js";import"./p-331a62d5.js";import"./p-6e9f832f.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";var R=function(t,e,i,o){var r,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};class C extends s{constructor(){super(...arguments),this.handleChange=()=>{if(this.inputRef.value){const t=u(g(this.inputRef.value,1),1,this.pageCount);this.inputRef.value=t.toString(),this.prevAndNextButtonRenderer.notifyParentPagination(t.toString())}}}render(){return"pageSelectorMobile"===this.type?this.renderPageSelectorMobile():this.renderPageSelectorMobileAndGoTo()}renderPageSelectorMobile(){return t("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},this.prevAndNextButtonRenderer.render("prev"),t("vega-font",{variant:"font-field-label",color:"text-primary"},this.current.toString()),t("vega-font",{variant:"font-field-label",color:"text-primary"},"/"),t("vega-font",{variant:"font-field-label",color:"text-primary"},this.pageCount.toString()),this.prevAndNextButtonRenderer.render("next"))}renderPageSelectorMobileAndGoTo(){return t("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},this.prevAndNextButtonRenderer.render("prev"),t("vega-form",{ref:t=>{c.addUniqueObserverToNode(t,h,this.handleChange)}},t("vega-input",{"data-vega-form":"pageSelectorMobile_goTo",size:"small",showClearIcon:!1,style:{width:"54px"},maskConfig:{type:"number",options:{allowNegative:!1,precision:0}},value:this.current.toString(),ref:t=>{this.inputRef=t,c.addUniqueObserverToNode(t,v,this.handleChange)}})),t("vega-font",{variant:"font-field-label",color:"text-primary"},"/"),t("vega-font",{variant:"font-field-label",color:"text-primary"},this.pageCount.toString()),this.prevAndNextButtonRenderer.render("next"))}}R([r()],C.prototype,"host",void 0),R([r()],C.prototype,"type",void 0),R([r()],C.prototype,"current",void 0),R([r()],C.prototype,"pageCount",void 0),R([r()],C.prototype,"prevAndNextButtonRenderer",void 0);var w=function(t,e,i,o){var r,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};class S extends s{constructor(){super(...arguments),this.pagerButton=(e,i,o)=>t("vega-button-circle",{variant:"icon-only",icon:e,iconColor:"text-link",size:"small",disabled:i,ref:t=>{c.addUniqueObserverToNode(t,d,o)}}),this.renderPrevButton=()=>this.pagerButton("chevron-left",0===this.total||1===this.current,(()=>{this.notifyParentPagination((this.current-1).toString())})),this.renderNextButton=()=>this.pagerButton("chevron-right",0===this.total||this.current===this.pageCount,(()=>{this.notifyParentPagination((this.current+1).toString())}))}notifyParentPagination(t){const e=b(this.host,"vega-pagination");e&&j.notify(p.getSubject(e,y),{host:this.host,detail:t})}render(t){return"prev"===t?this.renderPrevButton():this.renderNextButton()}}w([r()],S.prototype,"host",void 0),w([r()],S.prototype,"current",void 0),w([r()],S.prototype,"total",void 0),w([r()],S.prototype,"pageCount",void 0);var M=function(t,e,i,o){var r,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const O=class{constructor(t){e(this,t),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new n,this.childEventPrevent=new x([m],(()=>this.host)),this.pageSelectorMobileRenderer=new C,this.prevAndNextButtonRenderer=new S,this.pageCount=0,this.current=1,this.total=0}render(){return f(t(i,null,this.pageSelectorMobileRenderer.render()),this.host)}get host(){return o(this)}};M([l()],O.prototype,"globalSlimmers",void 0),M([a()],O.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),M([a()],O.prototype,"childEventPrevent",void 0),M([a()],O.prototype,"pageSelectorMobileRenderer",void 0),M([a()],O.prototype,"prevAndNextButtonRenderer",void 0),O.style=":host{display:inline-block}";export{O as vega_pagination_page_selector_mobile}
@@ -0,0 +1 @@
1
+ import{d as e,a as t,V as a,e as s,f as n,g as r,h as c,i as o,j as i,k as g,l as v,m as u,n as l,o as h,p,q as d,r as b,s as m,t as w,u as x,v as f,w as k,x as E,y,z as S,A as T,B as j,C as A,D as M,E as I,F as O,G as B,H as C,I as D,J as N,K as R,L as $,M as F,N as G,O as H,P as L,Q as q,R as z,S as J,T as K,U as P,b as Q,c as U,W as V,X as W,Y as X,Z as Y,_ as Z,$ as _,a0 as ee,a1 as te,a2 as ae}from"./p-c5eb0fa6.js";import{L as se}from"./p-6e1ab235.js";const ne=new Map([["vega-accordion",[e]],["vega-app-header-button",[t,a,s]],["vega-banner",[n,r]],["vega-breadcrumb",[t]],["vega-button",[t]],["vega-button-circle",[t]],["vega-button-group",[t]],["vega-button-link",[t]],["vega-calendar",[c,o,i,g,v]],["vega-carousel",[u]],["vega-checkbox",[c]],["vega-checkbox-group",[c]],["vega-chip",[n,t]],["vega-code-block",[c,l]],["vega-color-picker",[c]],["vega-color-swatch",[t]],["vega-combo-box",[c,h,p]],["vega-date-picker",[c,d]],["vega-date-picker-calendar",[b,d,m]],["vega-dropdown",[w,x,a,s,h,f,k]],["vega-dropdown-item",[t]],["vega-field-label",[t,E]],["vega-file-uploader",[c,y,l,S,T]],["vega-form",[j,A,M]],["vega-image-uploader",[c,l,I]],["vega-input",[c,O,B,C,E,D,N]],["vega-input-credit-card",[c,C,B]],["vega-input-numeric",[c]],["vega-input-passcode",[c,R]],["vega-input-phone-number",[c,$]],["vega-input-range",[c]],["vega-input-select",[c,p,k,F,G,E]],["vega-item-toggle",[H]],["vega-modal",[L,n]],["vega-left-nav",[q]],["vega-left-nav-group",[z]],["vega-left-nav-link",[J]],["vega-left-nav-section",[K]],["vega-pagination",[c,P]],["vega-popover",[Q,U]],["vega-progress-tracker",[V]],["vega-radio",[c,B,C]],["vega-radio-group",[c]],["vega-rich-text-editor",[c,W,X]],["vega-rich-text-editor-toolbar-button",[t]],["vega-rich-text-image-editor",[c]],["vega-rich-text-link-editor",[c]],["vega-segment-control",[c]],["vega-selection-chip",[c]],["vega-selection-chip-group",[c]],["vega-selection-tile",[c]],["vega-selection-tile-group",[c]],["vega-sidenav",[q]],["vega-sidenav-link",[t]],["vega-signature-capture",[c]],["vega-stepper",[c]],["vega-tab-group",[t]],["vega-table",[c,Y,Z,_,ee,te,ae]],["vega-table-head-cell",[t]],["vega-table-row",[t,e]],["vega-textarea",[c,C,E]],["vega-time-picker",[c]],["vega-toggle-switch",[c]]]);class re{getHostName(){return this.vegaComponentName}getEventName(){return this.eventName}handle(e,t){const a=this.createEventTarget(e);a.style.display="none",e.appendChild(a);const s=this.createEvent(this.eventName);return t&&Object.defineProperty(s,"detail",{configurable:!0,value:t}),a.dispatchEvent(s),a.remove(),s}copyAttributesToTarget(e,t){e&&t&&Array.from(e.attributes).filter((e=>!e.name.startsWith("on"))).forEach((a=>{try{t.setAttribute(a.name,a.value)}catch(t){se.error(`Delegated strategy copy ${e.tagName} attribute '${a.name}' error.`)}}))}createEvent(e){let t=new Event(e,{bubbles:!0,cancelable:!0});return"click"===e&&(t=new MouseEvent(e,{bubbles:!0,cancelable:!0})),t}}class ce extends re{constructor(){super(...arguments),this.eventName="click",this.vegaComponentName="vega-button"}createEventTarget(e){const t=document.createElement("button");return this.copyAttributesToTarget(e,t),t.type=e.type,t}}class oe extends re{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-checkbox"}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type="checkbox",t.checked=e.checked,t}}class ie extends re{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-input-select"}createEventTarget(e){const t=document.createElement("select");return this.copyAttributesToTarget(e,t),e.value&&(t.value=e.value.toString()),t}}class ge extends re{constructor(e){super(),this.vegaComponentName="vega-input",this.eventName=e}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type=e.type,t.value=e.value,t}}class ve extends re{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-radio"}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type="radio",t.checked=e.checked,t}}class ue extends re{constructor(){super(...arguments),this.vegaComponentName="vega-textarea",this.eventName="change"}createEventTarget(e){const t=document.createElement("textarea");return this.copyAttributesToTarget(e,t),t.value=e.value,t}}const le=new class{constructor(){this.strategyRegistry=new Map,this.updateStrategyRegistry([new ce,new ge("change"),new ge("focus"),new ge("blur"),new ie,new ue,new oe,new ve])}isSupportDelegated(e,t){let a=!1;const s=e.tagName.toLowerCase();return this.strategyRegistry.get(s)&&this.strategyRegistry.get(s).get(t.getNativeName())&&(a=!0),a}updateRegistryFromEventSemantics(e){let t=[];const{global:a,components:s}=e;if(a&&Array.isArray(a.jqueryDelegatedEvent)&&(t=t.concat(a.jqueryDelegatedEvent)),s)for(const e in s)Array.isArray(s[e].jqueryDelegatedEvent)&&(t=t.concat(s[e].jqueryDelegatedEvent));t.length&&this.updateStrategyRegistry(t)}getStrategy(e,t){const a=e.tagName.toLowerCase();if(this.strategyRegistry&&this.strategyRegistry.get(a))return this.strategyRegistry.get(a).get(t.getNativeName())}updateStrategyRegistry(e){e.forEach((e=>{const t=e.getHostName(),a=e.getEventName();if(this.strategyRegistry.get(t))this.strategyRegistry.get(t).set(a,e);else{const s=new Map;s.set(a,e),this.strategyRegistry.set(t,s)}}))}},he=new class{constructor(){this.config={},this.defaultEventSemantics={namespace:"vega"}}setSemantics(e){this.config=e,le.updateRegistryFromEventSemantics(e)}getSemantics(e){return Object.assign({},this.defaultEventSemantics,this.getSemanticsInGlobal(),this.getSemanticsInComponents(e))}getEnabledEventIdsByComponent(e){return ne.get(e)}getSemanticsInGlobal(){return this.config.global}getSemanticsInComponents(e){const t=e.tagName.toLocaleLowerCase();return this.config.components&&Object.prototype.hasOwnProperty.call(this.config.components,t)?this.config.components[t]:null}};export{re as B,he as i,le as j}
@@ -0,0 +1 @@
1
+ import{h as e,F as t,r as i,c as o,H as n,g as a}from"./p-6b2342e0.js";import{s}from"./p-519a7d55.js";import{c as r,M as l,V as c,I as d}from"./p-6e1ab235.js";import{s as p}from"./p-6bd5c49b.js";import{V as h,I as f}from"./p-4415ad28.js";import{P as v}from"./p-81dd00d0.js";import{e as u}from"./p-272440e8.js";import{F as g}from"./p-18e8d9b7.js";import{l as m,m as x,f as b}from"./p-6e70d3cc.js";import{V as C}from"./p-e1fbfd20.js";import{I as w}from"./p-781fd6e0.js";import{g as y}from"./p-49a2e141.js";import{I as j}from"./p-318f0df5.js";import{c as k}from"./p-44044ed7.js";import{Q as O,R,S,a as L,T as H}from"./p-c5eb0fa6.js";import{C as I}from"./p-2bb5a232.js";import{D as A,d as z}from"./p-f28a6074.js";import{N as V,O as M,P as N,Q as E,R as _}from"./p-aa985d73.js";import{c as G}from"./p-874bf8b2.js";import{B as D}from"./p-7cd2b93b.js";import{V as W}from"./p-8aee6b74.js";import{c as B}from"./p-1ec763ab.js";import{c as U}from"./p-613ddaab.js";import{C as T}from"./p-2d0d575f.js";import{O as Z}from"./p-331a62d5.js";import{S as F}from"./p-a0c3968b.js";import{c as K}from"./p-2a9960c9.js";import{f as P}from"./p-b7624ce4.js";import"./p-b75ee3ba.js";import"./p-5a25014f.js";import"./p-e6adf829.js";import"./p-593e0f80.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-262ec334.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-085de8fc.js";import"./p-b9386dd0.js";import"./p-d884c644.js";import"./p-d5531d3c.js";import"./p-a528714c.js";import"./p-6e9f832f.js";import"./p-4866e390.js";import"./p-f0e828d8.js";import"./p-fb5ea4b2.js";import"./p-a841cf13.js";import"./p-fc7ab79d.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-2b5cf2b3.js";var X=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class $ extends v{constructor(){super({callback:()=>{this.updateMainContentUI(this.openState)}}),this.isVoiceOverClick=!1,this.triggerElement=null,this.handleClickEvent=e=>{this.isVoiceOverClick=m(e)}}componentDidLoad(){!0===this.open?(this.openState="open",g.isEnabled("VEGA_LEFT_NAV.DISABLE_ANIMATION_ON_LOAD")&&this.host.classList.add("disableAnimation")):this.openState="close",window.addEventListener("click",this.handleClickEvent,{capture:!0})}componentDidRender(){}async toggle(){"close"===this.openState?(this.triggerElement=document.activeElement,this.openState="open"):this.openState="close"}watchOpen(e){this.openState=e?"open":"close"}watchOpenState(e){this.updateMainContentUI(e),"open"===e?this.open=!0:(this.open=!1,g.isEnabled("VEGA_LEFT_NAV.DISABLE_ANIMATION_ON_LOAD")&&this.host.classList.contains("disableAnimation")&&this.host.classList.remove("disableAnimation")),this.stateUpdateEventEmitter.emit(this.openState),"open"===e?this.focusFirstFocusableInDialog():this.focusFirstFocusableOutsideDialog()}watchShowAsOverlay(){this.updateMainContentUI(this.openState)}setOpenState(e){this.openState=e}focusFirstFocusableInDialog(){if(!this.isVoiceOverClick)return;const e=this.host,t=x(e);t&&u((()=>t.focus()),e,300)}focusFirstFocusableOutsideDialog(){var e;const t=this.triggerElement;this.triggerElement=null;const i=this.host;if(t&&t.isConnected)return void(null!==(e=x(t))&&void 0!==e?e:t).focus();const o=this.findFirstFocusableOutside(i);o&&o.focus()}findFirstFocusableOutside(e){const t=i=>{const o=Array.from(i.children);for(const i of o){if(i===e||e.contains(i))continue;if(i.contains(e)){const e=t(i);if(e)return e;continue}const o=x(i);if(o)return o}return null};return t(document.body)}updateMainContentUI(e){const t=document.querySelector("body"),i=document.querySelector("vega-left-nav + .vega-left-nav-content");"open"===e?(this.host.style.display="flex",setTimeout((()=>{this.host.classList.add("open"),i&&!this.backdropController.shouldShowBackdrop()?(null==t||t.classList.remove("vega-overflow-hidden"),i.classList.add("open")):(null==t||t.classList.add("vega-overflow-hidden"),i&&i.classList.remove("open"))}))):(this.host.classList.remove("open"),null==t||t.classList.remove("vega-overflow-hidden"),i&&i.classList.remove("open"),u((()=>{this.open||(this.host.style.display="none")}),this.host))}}X([r()],$.prototype,"host",void 0),X([r({writable:!0})],$.prototype,"open",void 0),X([r({writable:!0})],$.prototype,"openState",void 0),X([r()],$.prototype,"stateUpdateEventEmitter",void 0),X([r()],$.prototype,"backdropController",void 0),X([l("componentDidLoad")],$.prototype,"componentDidLoad",null),X([l("componentDidRender")],$.prototype,"componentDidRender",null),X([l("toggle")],$.prototype,"toggle",null),X([l("watchOpen")],$.prototype,"watchOpen",null),X([l("watchOpenState")],$.prototype,"watchOpenState",null),X([l("watchShowAsOverlay")],$.prototype,"watchShowAsOverlay",null);const Q=()=>e("div",{class:"header-footer-separator-container"},e("div",{class:"header-footer-separator"}));var q=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class J extends c{componentWillLoad(){this.hasHeaderSlot=!!this.host.querySelector('[slot="header-slot"]')}render(){return this.renderHeader()}renderHeader(){const{title:i,subtitle:o}=this.headerConfig;return e(t,null,e("div",{class:"header-container"},this.hasHeaderSlot?e("slot",{name:"header-slot"}):i?e("div",{class:"header-title"},i):this.renderHeaderLogo(),o&&e("div",{class:"header-subtitle"},o)),e(Q,null))}renderHeaderLogo(){return"gp"===this.currentBranding?e("vega-brand-logo",{name:"global-payments",size:"small"}):"genius"===this.currentBranding?e("vega-brand-logo",{name:"genius",size:"small"}):e("vega-icon",{icon:C.getIconKey("heartland-logo")})}}C.register({"heartland-logo":{icon:'<svg width="142" height="26" viewBox="0 0 142 26" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H5.38012V9.88886H14.7732V0H20.2857V24.7222H14.9056V13.9144H5.42422V24.7659H0V0ZM81.3186 0H86.4784V24.7222H81.3186V0ZM141.868 0.0435179H136.708C136.708 3.19395 136.708 6.38814 136.664 9.58233C135.959 8.53217 134.856 7.78833 133.666 7.48204C131.461 6.86946 129.079 7.35077 127.227 8.70716C125.727 9.97612 124.669 11.7264 124.317 13.6516C123.92 15.4894 123.92 17.4147 124.317 19.2962C124.669 21.1339 125.684 22.7966 127.182 23.8906C128.77 24.8969 130.667 25.2907 132.519 25.0282C134.283 24.8531 135.826 23.8468 136.664 22.2716C136.664 22.824 136.703 23.3764 136.742 23.9288C136.762 24.2077 136.782 24.4867 136.796 24.7656H142C141.912 23.5843 141.868 22.3591 141.868 21.1777V0.0435179ZM129.784 13.039C130.137 11.9889 130.976 10.9388 132.166 10.6762C133.357 10.3262 134.636 10.6762 135.518 11.5514C136.444 12.4702 136.753 13.8267 136.841 15.0956C136.885 16.7583 136.753 18.4648 135.959 19.9525C135.076 21.4839 132.916 22.2716 131.284 21.3964C130.094 20.7401 129.609 19.3399 129.388 18.071C129.124 16.3645 129.256 14.6581 129.784 13.039ZM70.3382 4.15601L75.4537 2.31827V7.52523H79.5991V10.9382H75.4537V17.1515C75.4096 18.1142 75.4537 19.0768 75.5859 20.0394C75.6742 20.5645 76.1152 21.0021 76.6443 21.1334C77.6146 21.3084 78.5847 21.3084 79.5549 21.1771V24.5026C77.7469 25.0276 75.8506 25.1589 73.9984 24.9401C72.94 24.8088 71.9258 24.3276 71.2202 23.5399C70.6028 22.7085 70.3382 21.7021 70.3823 20.6958C70.3382 15.1826 70.3382 9.66925 70.3382 4.15601ZM35.5 8.2703C33.6037 7.04514 31.3106 6.56382 29.1056 7.00138C26.9889 7.35143 25.1367 8.48907 23.946 10.2831C22.4907 12.3396 22.1379 14.9212 22.2261 17.3716C22.3584 19.4718 22.9758 21.7909 24.4752 23.3224C25.9746 24.8538 28.1795 25.3789 30.2522 25.4664C32.0603 25.5539 33.9124 25.1601 35.5441 24.3725C37.264 23.4099 38.3665 21.6158 38.4546 19.6469H33.7361C33.6037 20.2595 33.2509 20.8283 32.81 21.3095C32.2808 21.7471 31.6193 22.0097 30.9577 22.0097C29.8553 22.1409 28.7969 21.7471 28.0473 20.9158C27.2534 19.9094 27.077 18.5967 27.1211 17.4153H38.8515C38.9838 15.7963 38.8075 14.1774 38.4106 12.6021C37.9696 10.8519 36.9553 9.32044 35.5 8.2703ZM27.2975 14.1774C27.2975 13.1272 27.6503 12.1208 28.3118 11.2895C29.5025 9.93302 32.0603 10.0205 32.9864 11.5958C33.4274 12.3833 33.6037 13.3022 33.6037 14.1774H27.2975ZM42.5126 8.75203C44.056 7.39558 46.2169 7.00178 48.2014 6.95802C50.1859 6.91427 52.3908 7.30807 54.0225 8.62074C55.2131 9.5834 55.6983 11.1586 55.7865 12.6463C55.8368 13.696 55.8297 14.7314 55.8225 15.7689V15.769C55.8171 16.5478 55.8117 17.3278 55.8306 18.1158C55.8389 18.5271 55.8425 18.9415 55.8461 19.3576V19.3576C55.8618 21.1545 55.8777 22.982 56.2715 24.723H51.553C51.4206 23.9791 51.3766 23.1915 51.3766 22.4039C50.4504 23.8478 48.9069 24.8105 47.1871 25.0293C45.776 25.2043 44.3207 25.0293 42.9536 24.5042C41.7629 23.9353 40.8368 22.8852 40.484 21.5725C39.9548 19.8661 40.2635 18.0283 41.2778 16.5844C42.2921 15.3154 43.6592 14.4403 45.2468 14.0465C46.9417 13.606 48.6735 13.5686 50.3747 13.5319C50.5325 13.5285 50.6901 13.5251 50.8474 13.5214C50.8474 13.4493 50.8477 13.377 50.848 13.3045V13.3038V13.3032V13.3026C50.8514 12.4946 50.8548 11.662 50.4504 10.9399C49.6567 9.80219 48.1132 9.53961 46.9666 10.3273C46.8343 10.4148 46.7461 10.5023 46.6579 10.5898C46.2169 11.0711 45.9964 11.7274 46.0847 12.3838H41.0132C40.9691 11.0711 41.4983 9.71469 42.5126 8.75203ZM47.0989 17.0657C46.4374 17.2844 45.8641 17.7657 45.5113 18.3783C45.0263 19.4285 45.3349 20.6536 46.261 21.3537C47.5399 22.1851 49.2598 21.8351 50.0977 20.5661C50.8914 19.3847 50.8914 17.9408 50.8914 16.5844C49.6126 16.4531 48.2896 16.5844 47.0989 17.0657ZM96.1373 6.95649C94.1088 6.95649 91.9474 7.35029 90.4039 8.70676C89.3901 9.66934 88.8168 11.0258 88.8605 12.426H93.9322C93.844 11.7259 94.1525 10.982 94.6821 10.5007C95.7405 9.66934 97.2394 9.80063 98.1658 10.7633C98.7448 11.5023 98.742 12.5111 98.7395 13.428C98.7393 13.4882 98.7392 13.5481 98.7392 13.6074C96.7543 13.6074 94.7704 13.6511 92.8738 14.1762C91.3741 14.5701 90.0071 15.4451 89.0816 16.7141C87.9786 18.3331 87.8021 20.3458 88.5519 22.1398C89.037 23.3212 89.9634 24.2401 91.1538 24.6777C92.477 25.0714 93.844 25.2027 95.2109 25.0277C96.8863 24.8527 98.3424 23.7151 99.2679 22.4023C99.2679 23.19 99.3125 23.9338 99.4445 24.7214H104.119C103.671 22.7031 103.674 20.573 103.678 18.5029V18.5028V18.5016V18.5003C103.678 18.3274 103.678 18.1549 103.678 17.983C103.678 16.189 103.678 14.3513 103.634 12.5135C103.502 11.1133 103.061 9.58184 101.914 8.66297C100.326 7.35029 98.1658 6.95649 96.1373 6.95649ZM93.5354 18.1143C93.9322 17.5455 94.5493 17.1516 95.2554 16.9329C96.4013 16.5828 97.5925 16.4953 98.7392 16.5828L98.7394 16.7751C98.7413 18.0786 98.7434 19.4825 97.9447 20.6084C97.1074 21.8335 95.4311 22.1835 94.1525 21.396C93.0941 20.6521 92.8293 19.2081 93.5354 18.1143ZM112.982 7.74535C114.526 6.95774 116.334 6.73897 118.01 7.13276C119.641 7.43906 121.009 8.53297 121.671 10.0644C122.123 11.1017 122.163 12.221 122.204 13.3359L122.204 13.3364C122.214 13.6322 122.225 13.9276 122.243 14.2212V24.7226H116.952V13.2148C116.952 12.2522 116.379 11.3771 115.496 10.8958C113.953 10.1957 112.145 10.8083 111.351 12.2959C110.93 13.169 110.941 14.1409 110.951 15.0687V15.0698C110.952 15.2111 110.954 15.3514 110.954 15.4901V24.6789H105.75V13.4336C105.75 13.0309 105.752 12.6264 105.754 12.2206C105.761 10.5979 105.768 8.95287 105.662 7.30779H110.602L110.63 7.84104C110.664 8.49637 110.699 9.15749 110.734 9.84562C111.263 9.01425 112.057 8.27042 112.982 7.74535ZM68.8393 7.35106C67.5163 7.21979 66.1933 7.48232 65.0026 8.09491C64.0325 8.7075 63.3268 9.58258 62.8859 10.7202C62.8859 9.6286 62.8419 8.53696 62.798 7.44526L62.7977 7.43857H57.9467C58.1672 9.58258 58.2554 11.7704 58.2114 13.9144C58.2114 15.125 58.2065 16.3356 58.2016 17.5462C58.1918 19.9674 58.1819 22.3886 58.2114 24.8097H63.3268V15.8398C63.3268 14.7021 63.5915 13.3894 64.5617 12.6893C65.7965 11.8142 67.384 11.8142 68.8393 11.9454V7.35106Z" fill="#596063" /></svg>',autoSize:!0}}),q([r()],J.prototype,"host",void 0),q([r()],J.prototype,"headerConfig",void 0),q([r()],J.prototype,"currentBranding",void 0),q([l("componentWillLoad")],J.prototype,"componentWillLoad",null);var Y=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ee extends c{componentWillLoad(){this.hasFooterSlot=!!this.host.querySelector('[slot="footer-slot"]')}render(){return this.renderFooter()}renderFooter(){return(this.footnote||this.hasFooterSlot)&&e(t,null,e(Q,null),e("div",{class:"footer-container"},this.hasFooterSlot?e("slot",{name:"footer-slot"}):e("div",{class:"footer-footnote"},this.footnote)))}}Y([r()],ee.prototype,"host",void 0),Y([r()],ee.prototype,"footnote",void 0),Y([l("componentWillLoad")],ee.prototype,"componentWillLoad",null);var te=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ie extends c{watchOpenState(){this.updateZIndex()}updateZIndex(){const e=this.backdropController.getBackdrop();"open"==this.openState?(w.setZIndex(e,"base"),w.setZIndex(this.host,"base")):u((()=>{w.removeZIndex(e,"base"),w.removeZIndex(this.host,"base")}),this.host,300)}}te([r()],ie.prototype,"host",void 0),te([r()],ie.prototype,"openState",void 0),te([r()],ie.prototype,"backdropController",void 0),te([l("watchOpenState")],ie.prototype,"watchOpenState",null);var oe=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ne extends v{constructor(){super({callback:()=>{this.updateBackdropUI(this.openState)}})}connectedCallback(){this.backdrop=this.createBackdrop()}disconnectedCallback(){this.backdrop&&this.backdrop.remove()}watchOpenState(e){this.updateBackdropUI(e)}watchShowAsOverlay(){this.updateBackdropUI(this.openState)}getBackdrop(){return this.backdrop}shouldShowBackdrop(){return!(this.isLargeScreen()&&!this.showAsOverlay)}createBackdrop(){const e=document.createElement("vega-backdrop");return e.visible=!1,e.duration=150,e.addEventListener("vegaClick",(()=>{this.openStateController.setOpenState("close")})),document.body.append(e),e}updateBackdropUI(e){const t=document.querySelector("vega-left-nav + .vega-left-nav-content");this.backdrop.visible="open"===e&&!(t&&!this.shouldShowBackdrop())}isLargeScreen(){const e=y();return"L"==e||"XL"==e}}oe([r()],ne.prototype,"openState",void 0),oe([r()],ne.prototype,"showAsOverlay",void 0),oe([r()],ne.prototype,"openStateController",void 0),oe([l("connectedCallback")],ne.prototype,"connectedCallback",null),oe([l("disconnectedCallback")],ne.prototype,"disconnectedCallback",null),oe([l("watchOpenState")],ne.prototype,"watchOpenState",null),oe([l("watchShowAsOverlay")],ne.prototype,"watchShowAsOverlay",null);class ae extends c{render(){var t;return e("div",{class:"vega-nav-list-container"},(null===(t=this.source)||void 0===t?void 0:t.length)?this.renderListBySource():e("slot",null))}renderListBySource(){return e(t,null,this.source.map((i=>e(t,null,this.renderLeftNavSourceItem(i)))))}renderLeftNavSourceItem(e){return"section"==e.type?this.renderSection(e):"group"==e.type?this.renderGroup(e):this.renderLink(e)}renderSection(t){var i;return e("vega-left-nav-section",{itemKey:t.key,sectionHeader:t.sectionHeader},null===(i=t.children)||void 0===i?void 0:i.map((e=>"group"==e.type?this.renderGroup(e):this.renderLink(e))))}renderGroup(t){var i;return e("vega-left-nav-group",{itemKey:t.key,key:t.key||t.name,icon:t.icon,label:t.name,"open-by-default":t.openByDefault},null===(i=t.children)||void 0===i?void 0:i.map((e=>"group"==e.type?this.renderGroup(e):this.renderLink(e))))}renderLink(t){return e("vega-left-nav-link",{itemKey:t.key,key:t.key||t.name,icon:t.icon,url:t.url,target:t.target,selected:t.selected,counterBadge:t.counterBadge},t.name)}}!function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);a>3&&s&&Object.defineProperty(t,i,s)}([r()],ae.prototype,"source",void 0);var se=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class re extends c{registerMenuClickObserver(){A.addUniqueObserverToNode(this.host,V,(()=>{this.shouldAutoCollapse()&&this.openStateController.setOpenState("close")}))}unregisterMenuClickObserver(){A.removeUniqueObserverFromNode(this.host,V)}shouldAutoCollapse(){return this.autoCollapseOnOverlay&&this.backdropController.shouldShowBackdrop()&&"open"===this.openState}}se([r()],re.prototype,"host",void 0),se([r()],re.prototype,"openState",void 0),se([r()],re.prototype,"autoCollapseOnOverlay",void 0),se([r()],re.prototype,"showAsOverlay",void 0),se([r()],re.prototype,"backdropController",void 0),se([r()],re.prototype,"openStateController",void 0),se([l("connectedCallback")],re.prototype,"registerMenuClickObserver",null),se([l("disconnectedCallback")],re.prototype,"unregisterMenuClickObserver",null);const le=[{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the left nav",payloadValue:e=>!e.source||0===e.source.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the left nav",payloadValue:e=>!!e.source&&e.source.length>0}];var ce=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const de=class{constructor(e){i(this,e),this.vegaStateUpdate=o(this,"vegaStateUpdate",7),this.stateUpdate=o(this,"stateUpdate",7),this.globalSlimmers={},this.headerRenderer=new J,this.footerRenderer=new ee,this.openStateController=new $,this.backdropController=new ne,this.zIndexController=new ie,this.listRenderer=new ae,this.vegaLeftNavAutoCollapseController=new re,this.stateUpdateEventEmitter=k(de,O),this.componentGlobalStyleSlimmer=new I(".vega-left-nav-content{transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-duration:200ms;transition-property:margin}vega-left-nav.disableAnimation+.vega-left-nav-content.open{transition-duration:0s}.vega-left-nav-content.open{margin-left:300px}"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h(le),this.autoCollapseGroupsNotifySlimmer=G(de,"autoCollapseGroups","watchAutoCollapseGroups"),this.brandSwitchControllerSlimmer=new D,this.currentBranding=W.getBranding(),this.openState="close",this.open=!1,this.headerConfig={},this.footnote="",this.showAsOverlay=!0,this.autoCollapseOnOverlay=!1,this.autoCollapseGroups=!1}watchOpenState(){}watchOpen(){}watchShowAsOverlay(){}watchAutoCollapseGroups(){}componentWillLoad(){"string"==typeof this.autoCollapseGroups&&(this.autoCollapseGroups.includes("true")?this.autoCollapseGroups=!0:this.autoCollapseGroups.includes("false")&&(this.autoCollapseGroups=!1))}async toggle(){}render(){return p(e("slot",null)),s(e(n,null,this.headerRenderer.render(),this.listRenderer.render(),this.footerRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{openState:["watchOpenState"],open:["watchOpen"],showAsOverlay:["watchShowAsOverlay"],autoCollapseGroups:["watchAutoCollapseGroups"]}}};ce([f()],de.prototype,"globalSlimmers",void 0),ce([d()],de.prototype,"headerRenderer",void 0),ce([d()],de.prototype,"footerRenderer",void 0),ce([d()],de.prototype,"openStateController",void 0),ce([d()],de.prototype,"backdropController",void 0),ce([d()],de.prototype,"zIndexController",void 0),ce([d()],de.prototype,"listRenderer",void 0),ce([d()],de.prototype,"vegaLeftNavAutoCollapseController",void 0),ce([d()],de.prototype,"stateUpdateEventEmitter",void 0),ce([d()],de.prototype,"componentGlobalStyleSlimmer",void 0),ce([d()],de.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ce([d()],de.prototype,"autoCollapseGroupsNotifySlimmer",void 0),ce([d()],de.prototype,"brandSwitchControllerSlimmer",void 0),ce([j((e=>[{keyCode:"Escape",activeElementInScope:()=>{const t=e.backdropController.getBackdrop();return t&&t.visible?[document.body]:[e.host]},callback:()=>{const t=e.backdropController.getBackdrop();t&&t.visible&&e.openStateController.setOpenState("close")}}]))],de.prototype,"host",void 0),de.style=':host{display:none;flex-direction:column;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:fixed;top:0px;right:0px;bottom:0px;left:0px;text-align:left;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);width:300px;transition-duration:200ms;transition-property:transform;transform:translateX(-320px)}:host(.open.disableAnimation){transition-duration:0s}:host(.open){transform:translateX(0px)}.header-container{padding-left:24px;padding-right:24px;padding-top:24px;padding-bottom:16px}.header-container .header-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:24px;font-weight:700;line-height:32px;letter-spacing:0px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){.header-container .header-title{font-family:"Inter", sans-serif;font-size:24px;font-weight:700;line-height:32px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.header-container .header-title{font-family:"Inter", sans-serif;font-size:24px;font-weight:700;line-height:32px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.header-container .header-title{font-family:"Inter", sans-serif;font-size:28px;font-weight:700;line-height:36px;letter-spacing:0px}}.header-container .header-subtitle{color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;margin-top:2px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){.header-container .header-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){.header-container .header-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){.header-container .header-subtitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}.header-footer-separator-container{padding-left:12px;padding-right:12px}.header-footer-separator{width:100%;height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1))}.vega-nav-list-container{flex-grow:1;padding-left:12px;padding-right:12px;padding-top:12px;overflow-y:auto;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-nav-list-container .vega-links-icon .prefix-icon{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:20px;height:20px}a .vega-links-name{flex:1 1 0%;overflow:hidden;overflow-wrap:break-word}.footer-container{padding-top:16px;padding-bottom:16px;padding-left:24px;padding-right:24px}.footer-container .footer-footnote{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){.footer-container .footer-footnote{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.footer-container .footer-footnote{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.footer-container .footer-footnote{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}}body.vega-overflow-hidden{overflow:hidden}.header-container vega-icon[icon="v-internal-icon heartland-logo"]+.header-subtitle{margin-top:8px}';var pe=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class he extends c{constructor(){super(...arguments),this.handleClick=e=>{const t=e.currentTarget;if(t&&"$1"===t.dataset.root){e.preventDefault(),this.vegaLeftNavGroupOpenStateController.toggle();const t=this.vegaLeftNavGroupOpenStateController.isOpen();this.groupClickEventEmitter.emit(t?"EXPAND":"COLLAPSE"),this.notifyOtherGroup()}}}getGroupContainer(){return this.groupContainer}render(){return e("div",{class:"vega-li-main "+(this.openByDefault?"open":""),ref:e=>this.groupContainer=e},e("a",{href:`#${this.label}`,role:"button",tabIndex:0,"data-root":"$1",onClick:this.handleClick,"aria-label":this.label||"No label defined"},this.icon&&e("div",{class:"vega-links-icon"},e("div",{class:"prefix-icon"},e("vega-icon",{icon:this.icon,size:"size-16"}))),e("span",{class:"vega-links-name"},this.label),e("div",{class:"suffix-icons"},e("vega-icon",{icon:C.getIconKey("chevron-down"),size:"size-12"}),e("vega-icon",{icon:C.getIconKey("chevron-up"),size:"size-12"}))),e("div",{class:"vega-nav-list-sub"},e("slot",null)))}notifyOtherGroup(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.notify(z.getSubject(e,M),{host:this.host})}}C.register({"chevron-up":B,"chevron-down":U}),pe([r()],he.prototype,"host",void 0),pe([r()],he.prototype,"autoCollapseGroups",void 0),pe([r()],he.prototype,"icon",void 0),pe([r()],he.prototype,"label",void 0),pe([r()],he.prototype,"groupClickEventEmitter",void 0),pe([r()],he.prototype,"vegaLeftNavHierarchyController",void 0),pe([r()],he.prototype,"openByDefault",void 0),pe([r()],he.prototype,"itemKey",void 0),pe([r()],he.prototype,"vegaLeftNavGroupOpenStateController",void 0);var fe=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ve extends c{disconnectedCallback(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.unregister(z.getSubject(e,N),this.observer)}componentWillLoad(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&(this.observer=new Z(this.isAcceptableObserver.bind(this),this.observerListener.bind(this)),T.register(z.getSubject(e,N),this.observer))}isAcceptableObserver(e){return!this.host.contains(e.host)}shouldCollapse(){return"on-link-click"===this.autoCollapseGroups||!0===this.autoCollapseGroups||!1===this.autoCollapseGroups||"always"===this.autoCollapseGroups}observerListener(){this.shouldCollapse()&&this.vegaLeftNavGroupOpenStateController.close()}}fe([r()],ve.prototype,"host",void 0),fe([r()],ve.prototype,"autoCollapseGroups",void 0),fe([r()],ve.prototype,"vegaLeftNavGroupOpenStateController",void 0),fe([r()],ve.prototype,"vegaLeftNavHierarchyController",void 0),fe([r()],ve.prototype,"openByDefault",void 0),fe([l("disconnectedCallback")],ve.prototype,"disconnectedCallback",null),fe([l("componentWillLoad")],ve.prototype,"componentWillLoad",null);var ue=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ge extends c{disconnectedCallback(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.unregister(z.getSubject(e,M),this.observer)}componentWillLoad(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&(this.observer=new Z(this.isAcceptableObserver.bind(this),this.observerListener.bind(this)),T.register(z.getSubject(e,M),this.observer))}isAcceptableObserver(e){return e.host!==this.host&&!this.host.contains(e.host)}shouldCollapse(){return 1==this.autoCollapseGroups||"on-group-click"===this.autoCollapseGroups||"always"===this.autoCollapseGroups}observerListener(){this.shouldCollapse()&&this.vegaLeftNavGroupOpenStateController.close()}}ue([r()],ge.prototype,"host",void 0),ue([r()],ge.prototype,"autoCollapseGroups",void 0),ue([r()],ge.prototype,"vegaLeftNavGroupOpenStateController",void 0),ue([r()],ge.prototype,"vegaLeftNavHierarchyController",void 0),ue([l("disconnectedCallback")],ge.prototype,"disconnectedCallback",null),ue([l("componentWillLoad")],ge.prototype,"componentWillLoad",null);var me=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class xe extends F{constructor(){super({parent:"vega-left-nav",subStates:[{subStateName:"autoCollapseGroups",parentStateName:"autoCollapseGroups"}]})}}me([r()],xe.prototype,"host",void 0),me([r({writable:!0})],xe.prototype,"autoCollapseGroups",void 0);class be extends c{isOpen(){return this.renderer.getGroupContainer().classList.contains("open")}open(){this.renderer.getGroupContainer().classList.add("open")}close(){this.renderer.getGroupContainer().classList.remove("open")}toggle(){this.isOpen()?this.close():this.open()}}!function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);a>3&&s&&Object.defineProperty(t,i,s)}([r()],be.prototype,"renderer",void 0);var Ce=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class we extends c{componentWillLoad(){const e=b(this.host,"vega-left-nav"),t=b(this.host,"vega-nav-card");(e||t)&&(this.parent=e||t)}getTopParent(){return this.parent}}Ce([r()],we.prototype,"host",void 0),Ce([l("componentWillLoad")],we.prototype,"componentWillLoad",null);var ye=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class je extends c{disconnectedCallback(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.unregister(z.getSubject(e,E),this.observer)}componentWillLoad(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&!this.openByDefault&&(this.observer=new Z(this.isAcceptableObserver.bind(this),this.observerListener.bind(this)),T.register(z.getSubject(e,E),this.observer))}isAcceptableObserver(e){return this.host.contains(e.host)}observerListener(){this.vegaLeftNavGroupOpenStateController.open()}}ye([r()],je.prototype,"host",void 0),ye([r()],je.prototype,"vegaLeftNavGroupOpenStateController",void 0),ye([r()],je.prototype,"vegaLeftNavHierarchyController",void 0),ye([r()],je.prototype,"openByDefault",void 0),ye([l("disconnectedCallback")],je.prototype,"disconnectedCallback",null),ye([l("componentWillLoad")],je.prototype,"componentWillLoad",null);var ke=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const Oe=class{constructor(e){i(this,e),this.vegaGroupClick=o(this,"vegaGroupClick",7),this.groupClick=o(this,"groupClick",7),this.globalSlimmers={},this.renderer=new he,this.vegaLeftNavHierarchyController=new we,this.linkClickObserverController=new ve,this.otherGroupsClickObserverController=new ge,this.groupClickEventEmitter=k(Oe,R),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.vegaLeftNavGroupStateController=new xe,this.vegaLeftNavGroupOpenStateController=new be,this.vegaLeftNavGroupForInitializeSelectedController=new je,this.autoCollapseGroups=!1,this.label="",this.openByDefault=!1}render(){return p(e("slot",null)),e(n,{"data-key":this.itemKey},s(this.renderer.render(),this.host))}get host(){return a(this)}};ke([f()],Oe.prototype,"globalSlimmers",void 0),ke([d()],Oe.prototype,"renderer",void 0),ke([d()],Oe.prototype,"vegaLeftNavHierarchyController",void 0),ke([d()],Oe.prototype,"linkClickObserverController",void 0),ke([d()],Oe.prototype,"otherGroupsClickObserverController",void 0),ke([d()],Oe.prototype,"groupClickEventEmitter",void 0),ke([d()],Oe.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ke([d()],Oe.prototype,"vegaLeftNavGroupStateController",void 0),ke([d()],Oe.prototype,"vegaLeftNavGroupOpenStateController",void 0),ke([d()],Oe.prototype,"vegaLeftNavGroupForInitializeSelectedController",void 0),Oe.style=':host{display:block}.suffix-icons{padding-left:8px}.suffix-icons vega-icon,.vega-li-main.open>a>.suffix-icons vega-icon:first-of-type{display:none}.suffix-icons vega-icon:first-of-type,.vega-li-main.open>a>.suffix-icons vega-icon:last-of-type{display:inline-flex}.vega-nav-list-sub{display:none}.vega-li-main.open>.vega-nav-list-sub{display:block}.vega-li-main>a{display:flex;align-items:center;overflow:hidden;padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;border-radius:8px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px;cursor:pointer;text-decoration:none}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-li-main>a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-li-main>a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-li-main>a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}.vega-li-main>a:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.vega-li-main>a:hover{background-color:rgba(var(--v-bg-tertiary, 240, 243, 247, 1))}.vega-li-main>a .vega-links-name{flex:1 1 0%;overflow:hidden;overflow-wrap:break-word}.vega-links-icon{color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-right:12px;box-sizing:border-box}.vega-links-icon .prefix-icon{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:20px;height:20px}::slotted(vega-left-nav-group){padding-left:32px}::slotted(vega-left-nav-link){padding-left:32px}';var Re=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Se extends c{constructor(){super(...arguments),this.handleClick=()=>{this.selected||this.customSelectionEnabled||this.controller.setSelected(!0),this.menuClickEventEmitter.emit(),this.notifyVegaLeftNav(),this.notifyVegaLeftGroup()}}render(){return e(n,{class:!0===this.selected?"selected":"","data-key":this.itemKey},e("a",{href:this.url||"javascript:void(0);",target:this.target,onClick:this.handleClick},this.icon&&e("div",{class:"vega-links-icon"},e("div",{class:"prefix-icon"},e("vega-icon",{icon:this.icon,size:"size-16"}))),e("span",{class:"vega-links-name"},e("slot",null)),!!this.deprecatedPropertySlimmer.getValue()&&e("div",{class:"vega-counter-badge"},e("vega-counter-badge",{count:this.deprecatedPropertySlimmer.getValue(),color:this.counterBadge.color}))))}notifyVegaLeftNav(){const e=b(this.host,"vega-left-nav");e&&T.notify(z.getSubject(e,V),{host:this.host})}notifyVegaLeftGroup(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.notify(z.getSubject(e,N),{host:this.host})}}Re([r()],Se.prototype,"host",void 0),Re([r()],Se.prototype,"selected",void 0),Re([r()],Se.prototype,"url",void 0),Re([r()],Se.prototype,"counterBadge",void 0),Re([r()],Se.prototype,"icon",void 0),Re([r()],Se.prototype,"menuClickEventEmitter",void 0),Re([r()],Se.prototype,"controller",void 0),Re([r()],Se.prototype,"deprecatedPropertySlimmer",void 0),Re([r()],Se.prototype,"customSelectionEnabled",void 0),Re([r()],Se.prototype,"itemKey",void 0),Re([r()],Se.prototype,"target",void 0),Re([r()],Se.prototype,"vegaLeftNavHierarchyController",void 0);var Le=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class He extends c{disconnectedCallback(){const e=this.getObserverSubject();e&&T.unregister(e,this.observer)}componentWillLoad(){this.observer=new Z(this.isAcceptableNavListObserver.bind(this),this.observerListener.bind(this));const e=this.getObserverSubject();e&&T.register(e,this.observer)}isAcceptableNavListObserver(e){return e instanceof HTMLElement&&b(this.host,".vega-nav-list-container")===b(e,".vega-nav-list-container")}}Le([l("disconnectedCallback")],He.prototype,"disconnectedCallback",null),Le([l("componentWillLoad")],He.prototype,"componentWillLoad",null);var Ie=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ae extends He{componentWillRender(){if(this.selected){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.notify(z.getSubject(e,E),{host:this.host})}}componentDidRender(){if(this.selected){const e=this.getObserverSubject();e&&T.notify(e,this.host)}}setSelected(e){this.customSelectionEnabled||(this.selected=e)}observerListener(e){e!==this.host&&this.setSelected(!1)}getObserverSubject(){const e=this.vegaLeftNavHierarchyController.getTopParent();return e?z.getSubject(e,_):null}}Ie([r()],Ae.prototype,"host",void 0),Ie([r({writable:!0})],Ae.prototype,"selected",void 0),Ie([r()],Ae.prototype,"customSelectionEnabled",void 0),Ie([r()],Ae.prototype,"vegaLeftNavHierarchyController",void 0),Ie([l("componentWillRender")],Ae.prototype,"componentWillRender",null),Ie([l("componentDidRender")],Ae.prototype,"componentDidRender",null);var ze=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const Ve=class{constructor(e){i(this,e),this.vegaMenuClick=o(this,"vegaMenuClick",7),this.menuClick=o(this,"menuClick",7),this.globalSlimmers={},this.renderer=new Se,this.vegaLeftNavHierarchyController=new we,this.controller=new Ae,this.menuClickEventEmitter=k(Ve,S),this.deprecatedPropertySlimmer=K(Ve,"counterBadge.count","counterBadge.counter",void 0),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.selected=!1,this.customSelectionEnabled=!1,this.target="_self"}render(){return p(e("slot",null)),s(this.renderer.render(),this.host)}get host(){return a(this)}};ze([f()],Ve.prototype,"globalSlimmers",void 0),ze([d()],Ve.prototype,"renderer",void 0),ze([d()],Ve.prototype,"vegaLeftNavHierarchyController",void 0),ze([d()],Ve.prototype,"controller",void 0),ze([d()],Ve.prototype,"menuClickEventEmitter",void 0),ze([d()],Ve.prototype,"deprecatedPropertySlimmer",void 0),ze([d()],Ve.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ve.style=':host{display:block}:host(.selected) .vega-links-icon{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host(.selected) a{background-color:rgba(var(--v-bg-selected, 0, 151, 255, 0.3))}:host .vega-counter-badge{position:relative;width:32px;height:20px}:host vega-counter-badge{position:absolute;top:10px;left:18px}:host a{display:flex;align-items:center;overflow:hidden;padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;border-radius:8px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px;cursor:pointer;text-decoration:none}@media screen and (min-width: 768px) and (max-width: 1023px){:host a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}:host a .vega-links-name{flex:1 1 0%;overflow:hidden;overflow-wrap:break-word}:host .vega-links-icon{color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-right:12px;box-sizing:border-box}:host .vega-links-icon .prefix-icon{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:20px;height:20px}:host(:not(.selected)) a:hover{background-color:rgba(var(--v-bg-tertiary, 240, 243, 247, 1))}:host>a:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}';var Me=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ne extends c{render(){return e(n,{"data-key":this.itemKey},this.renderSectionHeader(),e("slot",null),this.renderListSeparator())}renderListSeparator(){return e("div",{class:"list-separator-container"},e("div",{class:"list-separator"}))}renderSectionHeader(){var t;return(null===(t=this.sectionHeader)||void 0===t?void 0:t.title)&&e("div",{class:"section-header"},e("div",{class:"section-header-title"},this.sectionHeader.title),this.sectionHeader.actionTitle&&e("vega-button-link",{label:this.sectionHeader.actionTitle,size:"small",link:this.sectionHeader.actionLink,eventful:this.sectionHeader.actionEventful,ref:e=>{A.addUniqueObserverToNode(e,L,(()=>{this.actionClickEventEmitter.emit()}))}}))}}Me([r()],Ne.prototype,"sectionHeader",void 0),Me([r()],Ne.prototype,"actionClickEventEmitter",void 0),Me([r()],Ne.prototype,"itemKey",void 0);var Ee=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const _e=class{constructor(e){i(this,e),this.vegaActionClick=o(this,"vegaActionClick",7),this.actionClick=o(this,"actionClick",7),this.globalSlimmers={},this.renderer=new Ne,this.actionClickEventEmitter=k(_e,H),this.vegaComponentUsageRuntimeMetricsSlimmer=new h}render(){return p(e("slot",null)),s(this.renderer.render(),this.host)}get host(){return a(this)}};Ee([f()],_e.prototype,"globalSlimmers",void 0),Ee([d()],_e.prototype,"renderer",void 0),Ee([d()],_e.prototype,"actionClickEventEmitter",void 0),Ee([d()],_e.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_e.style=':host{display:block}:host(:last-child) .list-separator-container{display:none}.list-separator-container{padding-left:12px;padding-right:12px;padding-top:20px;padding-bottom:20px}.list-separator{width:100%;height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1))}.section-header{display:flex;align-items:center;gap:12px;padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;border-radius:4px}.section-header>.section-header-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;flex:1 1 0%;overflow:hidden;text-transform:uppercase}@media screen and (min-width: 768px) and (max-width: 1023px){.section-header>.section-header-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.section-header>.section-header-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.section-header>.section-header-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}.section-header>vega-button-link{flex-basis:0}';var Ge=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class De extends v{constructor(){super({callback:()=>{this.updateMaxHeight()}})}watchMaxHeight(){this.updateMaxHeight()}updateMaxHeight(){const e=P(this.maxHeight,"widthAndHeight");this.currentMaxHeight=e}}Ge([r()],De.prototype,"maxHeight",void 0),Ge([r({writable:!0})],De.prototype,"currentMaxHeight",void 0),Ge([l("watchMaxHeight")],De.prototype,"watchMaxHeight",null);const We=[{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the nav card",payloadValue:e=>!e.source||0===e.source.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the nav card",payloadValue:e=>!!e.source&&e.source.length>0}];var Be=function(e,t,i,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const Ue=class{constructor(e){i(this,e),this.globalSlimmers={},this.listRenderer=new ae,this.maxHeightController=new De,this.vegaComponentUsageRuntimeMetricsSlimmer=new h(We)}watchMaxHeight(){}render(){return p(e("slot",null)),s(e(n,{style:{maxHeight:this.currentMaxHeight}},this.listRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{maxHeight:["watchMaxHeight"]}}};Be([f()],Ue.prototype,"globalSlimmers",void 0),Be([d()],Ue.prototype,"listRenderer",void 0),Be([d()],Ue.prototype,"maxHeightController",void 0),Be([d()],Ue.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ue.style=":host{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:12px;box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));text-align:left;overflow-y:auto;width:300px}.vega-nav-list-container{padding:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-nav-list-container .vega-links-icon .prefix-icon{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:20px;height:20px}a .vega-links-name{flex:1 1 0%;overflow:hidden;overflow-wrap:break-word}";export{de as vega_left_nav,Oe as vega_left_nav_group,Ve as vega_left_nav_link,_e as vega_left_nav_section,Ue as vega_nav_card}
@@ -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-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
+ 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-fc7ab79d.js";import{g as m}from"./p-49a2e141.js";import{P as f}from"./p-81dd00d0.js";import"./p-262ec334.js";import"./p-b9386dd0.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-d5531d3c.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}