@heartlandone/vega 2.80.0 → 2.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-7a48292d.js → app-globals-25e1bfac.js} +6 -6
- package/dist/cjs/{aria-dialog-focusable-trap-slimmer-5a0a78fe.js → aria-dialog-focusable-trap-slimmer-ced9566d.js} +14 -69
- package/dist/cjs/{child-nodes-notify-observer-slimmer-a8d13f4c.js → child-nodes-notify-observer-slimmer-2631c381.js} +1 -1
- package/dist/cjs/{code-block-71a330a1.js → code-block-24b3d0e7.js} +802 -61
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-fd077a6c.js → component-value-history-controller-slimmer.abstract-bd662b32.js} +5 -5
- package/dist/cjs/{content-state-afa26456.js → content-state-0f26036c.js} +969 -466
- package/dist/cjs/{date-required-rule-9f0e3e99.js → date-required-rule-4377217a.js} +1 -1
- package/dist/cjs/{design-token-3f9589eb.js → design-token-40276b11.js} +2 -2
- package/dist/cjs/{dom-node-subject-observer-factory-a3a60da4.js → dom-node-subject-observer-factory-9110cb94.js} +1 -1
- package/dist/cjs/{element-appender-slimmer-7a66229b.js → element-appender-slimmer-be1b4d57.js} +4 -4
- package/dist/cjs/{event-emit-slimmer-024e26bb.js → event-emit-slimmer-bee6b676.js} +1 -1
- package/dist/cjs/{form-field-controller-slimmer-c487cf2b.js → form-field-controller-slimmer-982dbfe4.js} +3 -3
- package/dist/cjs/{image-annotation-action-4e72af4b.js → image-annotation-action-e0df5a20.js} +3 -3
- package/dist/cjs/index.cjs.js +15 -14
- package/dist/cjs/{inject-keyboard-manager-d1a82089.js → inject-keyboard-manager-12b65e98.js} +1 -1
- package/dist/cjs/{keyboard-manager-9dbbb0d4.js → keyboard-manager-c89a66d3.js} +2 -2
- package/dist/cjs/{keyboard-manager-slimmer-68cff676.js → keyboard-manager-slimmer-93fcbf46.js} +1 -1
- package/dist/cjs/loader.cjs.js +10 -10
- package/dist/cjs/{month-view-generator-65a2f883.js → month-view-generator-0d25e950.js} +1 -1
- package/dist/cjs/page-size-option-utils-d038dd3a.js +68 -0
- package/dist/cjs/{public-rules-36f202b3.js → public-rules-652ec269.js} +8 -8
- package/dist/cjs/{range-fa15d524.js → range-cdd61881.js} +2 -2
- package/dist/cjs/{responsive-format-facade-4419b4ae.js → responsive-format-facade-9cae7f27.js} +3 -3
- package/dist/cjs/{rich-text-editor-required-rule-7d4c2973.js → rich-text-editor-required-rule-4b919054.js} +1 -1
- package/dist/cjs/{split-cell-operation-19f98afb.js → split-cell-operation-3596f738.js} +58 -23
- package/dist/cjs/{string-format-strategy.abstract-c65d9861.js → string-format-strategy.abstract-ebdb2573.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-c2e04acc.js → string-input-formatter-slimmer-9b6a8399.js} +3 -3
- package/dist/cjs/{string-mask-strategy-418fc0b8.js → string-mask-strategy-6cc9f391.js} +2 -2
- package/dist/cjs/{style-formatter-3c9ce0e5.js → style-formatter-18289c4d.js} +2 -2
- package/dist/cjs/{sub-state-notify-slimmer-7a4c6061.js → sub-state-notify-slimmer-39bfcfe3.js} +1 -1
- package/dist/cjs/{sub-state-observer-slimmer-f728e068.js → sub-state-observer-slimmer-e5b50cbf.js} +2 -2
- package/dist/cjs/{time-required-rule-ad091302.js → time-required-rule-3517beff.js} +1 -1
- package/dist/cjs/{token-extension-90396de7.js → token-extension-addc97c1.js} +208 -34
- package/dist/cjs/{type-guard-d760850a.js → type-guard-362d7da3.js} +23 -0
- package/dist/cjs/{ui-9e8c9732.js → ui-ae4ee13d.js} +69 -0
- package/dist/cjs/{valid-credit-card-number-rule-5ce8e973.js → valid-credit-card-number-rule-1d8bf49c.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
- package/dist/cjs/vega-app-header-button.cjs.entry.js +6 -6
- package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/vega-banner.cjs.entry.js +5 -4
- package/dist/cjs/vega-box.cjs.entry.js +5 -5
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +27 -10
- package/dist/cjs/vega-button-circle.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-group_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-button-link.cjs.entry.js +3 -3
- package/dist/cjs/vega-button.cjs.entry.js +5 -5
- package/dist/cjs/vega-calendar_4.cjs.entry.js +7 -7
- package/dist/cjs/vega-card.cjs.entry.js +5 -5
- package/dist/cjs/vega-carousel.cjs.entry.js +5 -5
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-chip.cjs.entry.js +7 -7
- package/dist/cjs/vega-code-block.cjs.entry.js +9 -9
- package/dist/cjs/vega-color-picker.cjs.entry.js +5 -5
- package/dist/cjs/vega-combo-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +337 -279
- package/dist/cjs/vega-dialog_2.cjs.entry.js +73 -10
- package/dist/cjs/vega-divider.cjs.entry.js +5 -5
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +51 -13
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +3 -3
- package/dist/cjs/vega-file-uploader.cjs.entry.js +5 -5
- package/dist/cjs/vega-flag-icon.cjs.entry.js +3 -3
- package/dist/cjs/vega-flex.cjs.entry.js +6 -6
- package/dist/cjs/vega-font.cjs.entry.js +4 -4
- package/dist/cjs/vega-form.cjs.entry.js +8 -8
- package/dist/cjs/vega-grid.cjs.entry.js +4 -4
- package/dist/cjs/vega-icon.cjs.entry.js +4 -4
- package/dist/cjs/vega-image-uploader.cjs.entry.js +7 -7
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +9 -9
- package/dist/cjs/vega-input-numeric.cjs.entry.js +9 -9
- package/dist/cjs/vega-input-passcode.cjs.entry.js +8 -8
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +7 -7
- package/dist/cjs/vega-input-range.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-select.cjs.entry.js +7 -7
- package/dist/cjs/vega-input.cjs.entry.js +14 -11
- package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +117 -12
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +23 -7
- package/dist/cjs/vega-pagination.cjs.entry.js +43 -19
- package/dist/cjs/vega-popover_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +42 -11
- package/dist/cjs/vega-radio_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +100 -19
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +29 -18
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +8 -8
- package/dist/cjs/vega-section-title.cjs.entry.js +21 -3
- package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +7 -7
- package/dist/cjs/vega-signature-capture.cjs.entry.js +8 -8
- package/dist/cjs/vega-stepper.cjs.entry.js +6 -6
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-table_11.cjs.entry.js +7 -7
- package/dist/cjs/vega-text.cjs.entry.js +1 -1
- package/dist/cjs/vega-textarea.cjs.entry.js +5 -5
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +5 -5
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -7
- package/dist/cjs/vega.cjs.js +10 -10
- package/dist/cjs/{wait-for-component-did-render-b6aba2de.js → wait-for-component-did-render-b6d12d51.js} +1 -1
- package/dist/collection/components/vega-banner/slimmers/renderers/vega-banner-renderer.js +1 -0
- package/dist/collection/components/vega-banner/vega-banner.css +36 -0
- package/dist/collection/components/vega-box/vega-box.js +1 -1
- package/dist/collection/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-item-renderer.js +9 -6
- package/dist/collection/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-renderer.js +4 -0
- package/dist/collection/components/vega-breadcrumb/vega-breadcrumb.css +6 -0
- package/dist/collection/components/vega-breadcrumb/vega-breadcrumb.js +31 -0
- package/dist/collection/components/vega-card/vega-card.css +157 -0
- package/dist/collection/components/vega-card/vega-card.js +1 -1
- package/dist/collection/components/vega-chip/vega-chip.js +26 -1
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-current-period-controller.js +5 -10
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-is-dual-months-controller.js +64 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.js +3 -6
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.js +3 -11
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.js +2 -2
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +4 -5
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +13 -15
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +41 -2
- package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
- package/dist/collection/components/vega-divider/slimmers/controllers/vega-divider-size-controller.js +1 -1
- package/dist/collection/components/vega-divider/vega-divider.css +157 -0
- package/dist/collection/components/vega-divider/vega-divider.js +1 -1
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.js +37 -1
- package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-renderer.js +4 -1
- package/dist/collection/components/vega-flex/vega-flex.css +157 -0
- package/dist/collection/components/vega-flex/vega-flex.js +1 -1
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +4 -1
- package/dist/collection/components/vega-input/vega-input.js +25 -0
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.js +37 -1
- package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +11 -1
- package/dist/collection/components/vega-modal/vega-modal.css +2683 -7
- package/dist/collection/components/vega-modal/vega-modal.js +75 -0
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.js +85 -2
- package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.js +23 -0
- package/dist/collection/components/vega-pagination/constants/page-size.js +2 -0
- package/dist/collection/components/vega-pagination/internal/vega-pagination-page-size-selector.js +11 -7
- package/dist/collection/components/vega-pagination/slimmers/controllers/vega-pagination-page-size-observer-controller.js +11 -1
- package/dist/collection/components/vega-pagination/utils/page-size-option-utils.js +57 -0
- package/dist/collection/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-dropdown-renderer.js +15 -5
- package/dist/collection/components/vega-pagination/vega-pagination-page-size-selector-mobile/vega-pagination-page-size-selector-mobile.js +39 -3
- package/dist/collection/components/vega-pagination/vega-pagination.js +32 -11
- package/dist/collection/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-direction-controller.js +34 -3
- package/dist/collection/components/vega-progress-tracker/slimmers/renderers/vega-progress-tracker-renderer.js +3 -2
- package/dist/collection/components/vega-rich-text-editor/constants/constant.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/image-annotation.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/inline-html-annotation.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js +8 -2
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +15 -4
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/code-block.js +6 -2
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/html-block.js +9 -15
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +3 -7
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +50 -9
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +25 -6
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-block-filter-styles-strategy.js +39 -0
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-node-filter-styles-strategy.js +47 -0
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.js +64 -0
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.js +147 -14
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/image-node/image-filter-styles-strategy.js +26 -3
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.js +24 -0
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-heading-item-block-filter-styles-strategy.js +29 -0
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.js +39 -1
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-title-item-block-filter-styles-strategy.js +29 -0
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/predicate.js +94 -0
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/heading-filter-styles-strategy.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/paragraph-filter-styles-strategy.js +48 -0
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/title-filter-styles-strategy.js +16 -0
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/code-filter-styles-strategy.js +32 -3
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/link-filter-styles-strategy.js +42 -3
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.js +108 -0
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +7 -2
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +15 -4
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +84 -14
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.js +61 -6
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.js +16 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +14 -3
- package/dist/collection/components/vega-rich-text-editor/dto/setup.js +36 -6
- package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +10 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-extension.js +9 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +17 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.js +17 -18
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +19 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +21 -4
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-block/table-block-filter-styles-strategy.js +39 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-caption/table-caption-filter-styles-strategy.js +39 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-cell/table-cell-filter-styles-strategy.js +63 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +7 -0
- package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +24 -0
- package/dist/collection/components/vega-rich-text-editor/public-api.js +2 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/custom-style-annotation-handler.js +2 -25
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +8 -2
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/inline-html-annotation-handler.js +30 -53
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/link-annotation-handler.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.js +85 -17
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.js +12 -5
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/html-block-strategy.js +95 -43
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-element-to-text-node-strategy.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/predicate.js +29 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/strategy-tags.js +142 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.js +12 -2
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +1 -1
- package/dist/collection/components/vega-section-title/slimmers/renderers/vega-section-title-renderer.js +8 -2
- package/dist/collection/components/vega-section-title/vega-section-title.css +35 -0
- package/dist/collection/components/vega-section-title/vega-section-title.js +64 -0
- package/dist/collection/components/vega-stepper/vega-stepper.css +3 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-margin-formatter.js +3 -3
- package/dist/collection/helpers/slimmers/aria-dialog-focusable-trap-slimmer.js +13 -68
- package/dist/collection/types/type-guard.js +21 -0
- package/dist/collection/utils/ui.js +68 -0
- package/dist/esm/{app-globals-e77015e3.js → app-globals-80a7d395.js} +6 -6
- package/dist/esm/{aria-dialog-focusable-trap-slimmer-5a2f92be.js → aria-dialog-focusable-trap-slimmer-cc6a8c3e.js} +14 -69
- package/dist/esm/{child-nodes-notify-observer-slimmer-b7f0e419.js → child-nodes-notify-observer-slimmer-a8cb19cf.js} +1 -1
- package/dist/esm/{code-block-7d6f231b.js → code-block-cd913077.js} +796 -62
- package/dist/esm/{component-value-history-controller-slimmer.abstract-acf65b17.js → component-value-history-controller-slimmer.abstract-e595761d.js} +5 -5
- package/dist/esm/{content-state-084cd705.js → content-state-89f8eecb.js} +958 -455
- package/dist/esm/{date-required-rule-29608215.js → date-required-rule-2b08f32c.js} +1 -1
- package/dist/esm/{design-token-edcd787b.js → design-token-7566d54c.js} +2 -2
- package/dist/esm/{dom-node-subject-observer-factory-cea9248d.js → dom-node-subject-observer-factory-aca0116e.js} +1 -1
- package/dist/esm/{element-appender-slimmer-08ec429b.js → element-appender-slimmer-df2a2da2.js} +4 -4
- package/dist/esm/{event-emit-slimmer-4fba1b35.js → event-emit-slimmer-9abc9241.js} +1 -1
- package/dist/esm/{form-field-controller-slimmer-8dd39707.js → form-field-controller-slimmer-40fcb5c2.js} +3 -3
- package/dist/esm/{image-annotation-action-a6b33a81.js → image-annotation-action-6048d32e.js} +3 -3
- package/dist/esm/index.js +14 -14
- package/dist/esm/{inject-keyboard-manager-7557816f.js → inject-keyboard-manager-c6557f50.js} +1 -1
- package/dist/esm/{keyboard-manager-1846c6a5.js → keyboard-manager-c7b125d7.js} +2 -2
- package/dist/esm/{keyboard-manager-slimmer-1ae0aa4d.js → keyboard-manager-slimmer-6109039b.js} +1 -1
- package/dist/esm/loader.js +10 -10
- package/dist/esm/{month-view-generator-b700ed08.js → month-view-generator-139ace5a.js} +1 -1
- package/dist/esm/page-size-option-utils-50afc81a.js +61 -0
- package/dist/esm/{public-rules-fe2c7934.js → public-rules-e42bce9d.js} +8 -8
- package/dist/esm/{range-00afe462.js → range-b76edec7.js} +2 -2
- package/dist/esm/{responsive-format-facade-37d4d850.js → responsive-format-facade-151dbd10.js} +3 -3
- package/dist/esm/{rich-text-editor-required-rule-6487ec94.js → rich-text-editor-required-rule-1fc7c040.js} +1 -1
- package/dist/esm/{split-cell-operation-9445e642.js → split-cell-operation-548ea374.js} +58 -23
- package/dist/esm/{string-format-strategy.abstract-ec6d627b.js → string-format-strategy.abstract-6488031a.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-959dff7a.js → string-input-formatter-slimmer-625e17a2.js} +3 -3
- package/dist/esm/{string-mask-strategy-49be41f0.js → string-mask-strategy-a165d316.js} +2 -2
- package/dist/esm/{style-formatter-ad0b2bac.js → style-formatter-280757ae.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-ee8c417b.js → sub-state-notify-slimmer-6c972bb4.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-4d30fa5c.js → sub-state-observer-slimmer-53643b5c.js} +2 -2
- package/dist/esm/{time-required-rule-414b1590.js → time-required-rule-3f5a8822.js} +1 -1
- package/dist/esm/{token-extension-600b1c88.js → token-extension-5ee7a3f1.js} +208 -34
- package/dist/esm/{type-guard-23a08026.js → type-guard-f6c9c89d.js} +22 -1
- package/dist/esm/{ui-ba5a4758.js → ui-b7600a48.js} +69 -1
- package/dist/esm/{valid-credit-card-number-rule-60abddac.js → valid-credit-card-number-rule-3bf19ad6.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +6 -6
- package/dist/esm/vega-app-header-button.entry.js +6 -6
- package/dist/esm/vega-backdrop.entry.js +1 -1
- package/dist/esm/vega-banner.entry.js +5 -4
- package/dist/esm/vega-box.entry.js +5 -5
- package/dist/esm/vega-breadcrumb.entry.js +27 -10
- package/dist/esm/vega-button-circle.entry.js +6 -6
- package/dist/esm/vega-button-group_2.entry.js +5 -5
- package/dist/esm/vega-button-link.entry.js +3 -3
- package/dist/esm/vega-button.entry.js +5 -5
- package/dist/esm/vega-calendar_4.entry.js +7 -7
- package/dist/esm/vega-card.entry.js +5 -5
- package/dist/esm/vega-carousel.entry.js +5 -5
- package/dist/esm/vega-checkbox_2.entry.js +6 -6
- package/dist/esm/vega-chip.entry.js +7 -7
- package/dist/esm/vega-code-block.entry.js +9 -9
- package/dist/esm/vega-color-picker.entry.js +5 -5
- package/dist/esm/vega-combo-box.entry.js +8 -8
- package/dist/esm/vega-date-picker_2.entry.js +337 -279
- package/dist/esm/vega-dialog_2.entry.js +73 -10
- package/dist/esm/vega-divider.entry.js +5 -5
- package/dist/esm/vega-dropdown_5.entry.js +52 -14
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-label.entry.js +3 -3
- package/dist/esm/vega-file-uploader.entry.js +5 -5
- package/dist/esm/vega-flag-icon.entry.js +3 -3
- package/dist/esm/vega-flex.entry.js +6 -6
- package/dist/esm/vega-font.entry.js +4 -4
- package/dist/esm/vega-form.entry.js +8 -8
- package/dist/esm/vega-grid.entry.js +4 -4
- package/dist/esm/vega-icon.entry.js +4 -4
- package/dist/esm/vega-image-uploader.entry.js +7 -7
- package/dist/esm/vega-input-credit-card.entry.js +9 -9
- package/dist/esm/vega-input-numeric.entry.js +9 -9
- package/dist/esm/vega-input-passcode.entry.js +8 -8
- package/dist/esm/vega-input-phone-number.entry.js +7 -7
- package/dist/esm/vega-input-range.entry.js +5 -5
- package/dist/esm/vega-input-select.entry.js +7 -7
- package/dist/esm/vega-input.entry.js +14 -11
- package/dist/esm/vega-item-toggle.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +117 -12
- package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
- package/dist/esm/vega-page-notification_2.entry.js +2 -2
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +2 -2
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +23 -7
- package/dist/esm/vega-pagination.entry.js +43 -19
- package/dist/esm/vega-popover_2.entry.js +10 -10
- package/dist/esm/vega-progress-tracker_2.entry.js +42 -11
- package/dist/esm/vega-radio_2.entry.js +9 -9
- package/dist/esm/vega-rich-text-content.entry.js +100 -19
- package/dist/esm/vega-rich-text-editor_4.entry.js +29 -18
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +8 -8
- package/dist/esm/vega-section-title.entry.js +21 -3
- package/dist/esm/vega-segment-control.entry.js +3 -3
- package/dist/esm/vega-selection-chip_2.entry.js +8 -8
- package/dist/esm/vega-selection-tile_2.entry.js +7 -7
- package/dist/esm/vega-sidenav_3.entry.js +7 -7
- package/dist/esm/vega-signature-capture.entry.js +8 -8
- package/dist/esm/vega-stepper.entry.js +6 -6
- package/dist/esm/vega-tab-group_2.entry.js +3 -3
- package/dist/esm/vega-table_11.entry.js +7 -7
- package/dist/esm/vega-text.entry.js +1 -1
- package/dist/esm/vega-textarea.entry.js +5 -5
- package/dist/esm/vega-time-picker_2.entry.js +11 -11
- package/dist/esm/vega-toggle-switch.entry.js +5 -5
- package/dist/esm/vega-tooltip_2.entry.js +7 -7
- package/dist/esm/vega.js +10 -10
- package/dist/esm/{wait-for-component-did-render-03e7ccb2.js → wait-for-component-did-render-6980a1a6.js} +1 -1
- package/dist/sri/vega-sri-manifest.json +345 -341
- package/dist/types/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-item-renderer.d.ts +1 -0
- package/dist/types/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-renderer.d.ts +1 -0
- package/dist/types/components/vega-breadcrumb/vega-breadcrumb.d.ts +10 -0
- package/dist/types/components/vega-chip/vega-chip.d.ts +9 -0
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-current-period-controller.d.ts +1 -6
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-is-dual-months-controller.d.ts +28 -0
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.d.ts +1 -2
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +1 -2
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.d.ts +1 -1
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.d.ts +1 -1
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +12 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.d.ts +12 -0
- package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-renderer.d.ts +1 -0
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +1 -0
- package/dist/types/components/vega-input/types.d.ts +5 -0
- package/dist/types/components/vega-input/vega-input.d.ts +17 -1
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.d.ts +9 -0
- package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +3 -0
- package/dist/types/components/vega-modal/vega-modal.d.ts +24 -1
- package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.d.ts +17 -0
- package/dist/types/components/vega-pagination/constants/page-size.d.ts +2 -0
- package/dist/types/components/vega-pagination/internal/vega-pagination-page-size-selector.d.ts +3 -2
- package/dist/types/components/vega-pagination/slimmers/controllers/vega-pagination-page-size-observer-controller.d.ts +2 -0
- package/dist/types/components/vega-pagination/types.d.ts +9 -0
- package/dist/types/components/vega-pagination/utils/page-size-option-utils.d.ts +42 -0
- package/dist/types/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-dropdown-renderer.d.ts +2 -0
- package/dist/types/components/vega-pagination/vega-pagination-page-size-selector-mobile/vega-pagination-page-size-selector-mobile.d.ts +9 -2
- package/dist/types/components/vega-pagination/vega-pagination.d.ts +8 -3
- package/dist/types/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-direction-controller.d.ts +14 -2
- package/dist/types/components/vega-progress-tracker/slimmers/renderers/vega-progress-tracker-renderer.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +5 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/image-annotation.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/inline-html-annotation.d.ts +14 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/link-group-annotation.d.ts +8 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +4 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/code-block.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/html-block.d.ts +1 -11
- package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +15 -2
- package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +9 -3
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-block-filter-styles-strategy.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-node-filter-styles-strategy.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.d.ts +27 -1
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.d.ts +92 -8
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/image-node/image-filter-styles-strategy.d.ts +21 -3
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-heading-item-block-filter-styles-strategy.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.d.ts +25 -0
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-title-item-block-filter-styles-strategy.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/predicate.d.ts +72 -0
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/heading-filter-styles-strategy.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/paragraph-filter-styles-strategy.d.ts +34 -0
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/title-filter-styles-strategy.d.ts +11 -0
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/code-filter-styles-strategy.d.ts +25 -2
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/link-filter-styles-strategy.d.ts +24 -4
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.d.ts +62 -0
- package/dist/types/components/vega-rich-text-editor/dto/nodes/code-block-node.d.ts +7 -3
- package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +5 -3
- package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +43 -4
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.d.ts +25 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.d.ts +5 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.d.ts +7 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +9 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +5 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-block/table-block-filter-styles-strategy.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-caption/table-caption-filter-styles-strategy.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-cell/table-cell-filter-styles-strategy.d.ts +46 -0
- package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/interface.d.ts +27 -5
- package/dist/types/components/vega-rich-text-editor/public-api.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/custom-style-annotation-handler.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/inline-html-annotation-handler.d.ts +11 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.d.ts +43 -7
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.d.ts +8 -3
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/html-block-strategy.d.ts +34 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/predicate.d.ts +21 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/strategy-tags.d.ts +83 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.d.ts +6 -0
- package/dist/types/components/vega-section-title/slimmers/renderers/vega-section-title-renderer.d.ts +2 -0
- package/dist/types/components/vega-section-title/types.d.ts +1 -0
- package/dist/types/components/vega-section-title/vega-section-title.d.ts +14 -0
- package/dist/types/components.d.ts +93 -8
- package/dist/types/helpers/slimmers/aria-dialog-focusable-trap-slimmer.d.ts +4 -12
- package/dist/types/types/components.type.d.ts +3 -0
- package/dist/types/types/type-guard.d.ts +15 -1
- package/dist/types/types/ui.type.d.ts +11 -1
- package/dist/types/utils/ui.d.ts +14 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-1c45565d.js → p-001d36af.js} +1 -1
- package/dist/vega/{p-7c2fecfd.entry.js → p-01541820.entry.js} +1 -1
- package/dist/vega/p-0304c3a7.js +1 -0
- package/dist/vega/{p-2d917e2d.entry.js → p-08f03a52.entry.js} +1 -1
- package/dist/vega/{p-9390a94b.entry.js → p-0a145766.entry.js} +1 -1
- package/dist/vega/p-0d205fbf.js +1 -0
- package/dist/vega/p-0fc2ccc4.entry.js +1 -0
- package/dist/vega/p-118aeed1.entry.js +1 -0
- package/dist/vega/{p-ea21462f.js → p-1a4e8d8a.js} +1 -1
- package/dist/vega/{p-5ae4ea20.entry.js → p-23dc4064.entry.js} +1 -1
- package/dist/vega/{p-2c2df248.js → p-24b45c85.js} +1 -1
- package/dist/vega/{p-010b5e74.js → p-262a27d0.js} +1 -1
- package/dist/vega/{p-9dc23325.entry.js → p-27dc6562.entry.js} +1 -1
- package/dist/vega/p-295326ca.entry.js +1 -0
- package/dist/vega/{p-6af55f1c.entry.js → p-2beace1c.entry.js} +1 -1
- package/dist/vega/p-2ce2972f.js +1 -0
- package/dist/vega/p-2e7d5e28.entry.js +1 -0
- package/dist/vega/{p-7618dde4.js → p-2f99c511.js} +1 -1
- package/dist/vega/p-32592497.entry.js +1 -0
- package/dist/vega/{p-65900dbf.entry.js → p-37a9f4b4.entry.js} +1 -1
- package/dist/vega/{p-a99e75a1.entry.js → p-4013d954.entry.js} +1 -1
- package/dist/vega/{p-19ad4f15.entry.js → p-42da45e3.entry.js} +1 -1
- package/dist/vega/p-42e246e4.entry.js +1 -0
- package/dist/vega/p-479a169c.entry.js +1 -0
- package/dist/vega/{p-35386999.entry.js → p-47a2eec1.entry.js} +1 -1
- package/dist/vega/{p-b696a861.js → p-49ae8c79.js} +1 -1
- package/dist/vega/p-4ed416e7.js +1 -0
- package/dist/vega/{p-dc9b5063.entry.js → p-53ba1adb.entry.js} +1 -1
- package/dist/vega/{p-d1494c7c.entry.js → p-55019e55.entry.js} +1 -1
- package/dist/vega/{p-434fc427.entry.js → p-565aac6e.entry.js} +1 -1
- package/dist/vega/{p-cc055723.entry.js → p-574586c9.entry.js} +1 -1
- package/dist/vega/{p-cca5042b.entry.js → p-5781b9f4.entry.js} +1 -1
- package/dist/vega/{p-1feb4f2a.entry.js → p-57827342.entry.js} +1 -1
- package/dist/vega/p-59c6f795.js +1 -0
- package/dist/vega/{p-f48c43f4.entry.js → p-5a8be21c.entry.js} +1 -1
- package/dist/vega/p-5baff397.js +1 -0
- package/dist/vega/{p-ffa2e3a6.entry.js → p-5e9f6fb6.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-44c5cbb7.js → p-5f95a2fa.js} +1 -1
- package/dist/vega/{p-576fe408.js → p-6216c30e.js} +1 -1
- package/dist/vega/{p-367d44d9.entry.js → p-62e80151.entry.js} +1 -1
- package/dist/vega/{p-ec1d76c6.entry.js → p-63d73fa0.entry.js} +1 -1
- package/dist/vega/{p-612e3ded.js → p-64e22fe5.js} +1 -1
- package/dist/vega/{p-0313393d.entry.js → p-679b1f00.entry.js} +1 -1
- package/dist/vega/p-6e70d3cc.js +1 -0
- package/dist/vega/{p-70f1cf4e.entry.js → p-757bfca2.entry.js} +1 -1
- package/dist/vega/{p-c9201bf4.js → p-76063dcb.js} +1 -1
- package/dist/vega/{p-8adf9732.entry.js → p-76daa632.entry.js} +1 -1
- package/dist/vega/{p-1a2f92a3.entry.js → p-77c6f14a.entry.js} +1 -1
- package/dist/vega/{p-382b71a3.entry.js → p-7ac9e8ff.entry.js} +1 -1
- package/dist/vega/p-83863463.js +1 -0
- package/dist/vega/{p-e84b95d4.js → p-88e6618d.js} +1 -1
- package/dist/vega/p-90a0b9f3.entry.js +1 -0
- package/dist/vega/{p-1557ed92.entry.js → p-9324dd2c.entry.js} +1 -1
- package/dist/vega/{p-cf70c57d.js → p-98c44c03.js} +1 -1
- package/dist/vega/p-9aa1c66a.entry.js +1 -0
- package/dist/vega/p-9b01a28a.entry.js +1 -0
- package/dist/vega/{p-4eb282ef.entry.js → p-9b14ac66.entry.js} +1 -1
- package/dist/vega/p-9dcecdd3.js +1 -0
- package/dist/vega/p-a1d51bc2.js +1 -0
- package/dist/vega/{p-04e56b0c.entry.js → p-ab4b06c9.entry.js} +1 -1
- package/dist/vega/{p-b5c2fff3.entry.js → p-ac43be09.entry.js} +1 -1
- package/dist/vega/{p-7ceab8c7.entry.js → p-add63fe0.entry.js} +1 -1
- package/dist/vega/{p-89e56502.js → p-ae0f03c1.js} +1 -1
- package/dist/vega/{p-21c9e1ca.entry.js → p-b525c800.entry.js} +1 -1
- package/dist/vega/p-be651266.entry.js +1 -0
- package/dist/vega/{p-c045e4c1.entry.js → p-c0d45f77.entry.js} +1 -1
- package/dist/vega/{p-204c7d41.js → p-c2e7992b.js} +1 -1
- package/dist/vega/{p-b5a6bd0f.entry.js → p-c56aa01c.entry.js} +1 -1
- package/dist/vega/{p-2e73582d.entry.js → p-cc3c661c.entry.js} +1 -1
- package/dist/vega/{p-cda45d2a.entry.js → p-cda09e99.entry.js} +1 -1
- package/dist/vega/{p-d1ca70a1.js → p-d0ac7af8.js} +1 -1
- package/dist/vega/p-d289a6af.js +3 -0
- package/dist/vega/p-d29e8972.entry.js +1 -0
- package/dist/vega/{p-76b80a0c.js → p-d47aa28f.js} +1 -1
- package/dist/vega/p-d90eee9a.entry.js +1 -0
- package/dist/vega/{p-be3517be.entry.js → p-da742a7f.entry.js} +1 -1
- package/dist/vega/p-dc6e7a77.js +1 -0
- package/dist/vega/{p-c61279a7.entry.js → p-dcf8f58f.entry.js} +1 -1
- package/dist/vega/{p-ab21fdf6.entry.js → p-dff66a67.entry.js} +1 -1
- package/dist/vega/{p-90137c68.entry.js → p-e1117034.entry.js} +1 -1
- package/dist/vega/p-e223e0dc.entry.js +1 -0
- package/dist/vega/p-e22e5aa1.js +1 -0
- package/dist/vega/{p-df5bfbc4.entry.js → p-e753fac2.entry.js} +1 -1
- package/dist/vega/{p-7912741f.entry.js → p-e7a4b760.entry.js} +1 -1
- package/dist/vega/{p-ba415db6.entry.js → p-e8fc8495.entry.js} +1 -1
- package/dist/vega/{p-18619467.js → p-ea2b5dbb.js} +1 -1
- package/dist/vega/{p-f3456993.entry.js → p-eccabba7.entry.js} +1 -1
- package/dist/vega/{p-517434d4.entry.js → p-f0d605e9.entry.js} +1 -1
- package/dist/vega/{p-878851f6.js → p-f28a6074.js} +1 -1
- package/dist/vega/{p-840ad046.entry.js → p-f2c65579.entry.js} +1 -1
- package/dist/vega/{p-07a2b42a.js → p-f2cef51a.js} +1 -1
- package/dist/vega/{p-47ca1f69.entry.js → p-f40d479d.entry.js} +1 -1
- package/dist/vega/p-f5013494.entry.js +1 -0
- package/dist/vega/{p-60cf2a68.js → p-f509b439.js} +1 -1
- package/dist/vega/p-f5d3ce94.js +1 -0
- package/dist/vega/{p-9551da9c.entry.js → p-f69e2801.entry.js} +1 -1
- package/dist/vega/p-fa654762.entry.js +1 -0
- package/dist/vega/{p-365d21ac.entry.js → p-fbc5a7f6.entry.js} +1 -1
- package/dist/vega/{p-b3e40faf.js → p-fd5ddc55.js} +1 -1
- package/dist/vega/p-ff47aeee.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/vega/p-01883ffc.entry.js +0 -1
- package/dist/vega/p-02578a59.js +0 -1
- package/dist/vega/p-043e685a.entry.js +0 -1
- package/dist/vega/p-08780df0.entry.js +0 -1
- package/dist/vega/p-10fa4eac.js +0 -1
- package/dist/vega/p-203bc4db.entry.js +0 -1
- package/dist/vega/p-22336063.js +0 -1
- package/dist/vega/p-224b67ff.entry.js +0 -1
- package/dist/vega/p-334e3b02.entry.js +0 -1
- package/dist/vega/p-559197f8.js +0 -1
- package/dist/vega/p-68124bc5.js +0 -1
- package/dist/vega/p-6c5250b3.js +0 -1
- package/dist/vega/p-6f2e5bc6.js +0 -1
- package/dist/vega/p-716c71e6.js +0 -1
- package/dist/vega/p-7362723e.entry.js +0 -1
- package/dist/vega/p-7942c042.entry.js +0 -1
- package/dist/vega/p-8327635d.js +0 -1
- package/dist/vega/p-8b891f36.entry.js +0 -1
- package/dist/vega/p-9341c1a9.js +0 -1
- package/dist/vega/p-9862d1a8.entry.js +0 -1
- package/dist/vega/p-a4dbf2cc.js +0 -1
- package/dist/vega/p-c4e32125.entry.js +0 -1
- package/dist/vega/p-c5b698f6.entry.js +0 -1
- package/dist/vega/p-c6d62f0d.js +0 -1
- package/dist/vega/p-cdf5b2f0.entry.js +0 -1
- package/dist/vega/p-d202e69d.entry.js +0 -1
- package/dist/vega/p-dcd18ab1.js +0 -1
- package/dist/vega/p-e4726dcd.entry.js +0 -1
- package/dist/vega/p-f4190826.entry.js +0 -1
- package/dist/vega/p-fdac91c4.entry.js +0 -1
package/dist/vega/p-559197f8.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as t,d as e,b as n,g as s,A as r,T as o,o as i,H as a,p as c,k as l,q as d,r as u,t as h,u as m,v as w,I as T,m as p,S as g,i as E,B as f,w as k,c as R,x as B,y as x,n as I,z as b,s as O,N as y,D as L,E as A,F as N,G as C,l as j,J as H,M as S,K as v,L as D,U as M,O as P,P as F,Q as $,W as V,X as U,Y as z,Z as G,_ as J,$ as W,a0 as K,a1 as X,a2 as Y,R as Q}from"./p-68124bc5.js";import{g as Z}from"./p-8b5d3a52.js";import{i as _}from"./p-c6d62f0d.js";import{C as q}from"./p-2d0d575f.js";import{d as tt}from"./p-878851f6.js";import{c as et,d as nt}from"./p-33860e54.js";import{d as st}from"./p-02841589.js";import{r as rt,i as ot}from"./p-dcd18ab1.js";import{c as it}from"./p-a841cf13.js";import{L as at}from"./p-6e1ab235.js";class RTEListItemBlock extends e{constructor(t,e,n){super(t,"list-item",n),this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new RTEListItemBlock(t.id,void 0,e);s.children=t.nodes.map((t=>n.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const e=RTEListBlock.from(t);return e.parent=s,e})));const{annotations:r}=t;return r&&Object.entries(r).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);_(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(){return[`<li${super.generateAttributeString()}>`,this.children.map((t=>t.toHtml())).join(""),"</li>"].join("")}cloneWithNodes(t){const e=new RTEListItemBlock(Z());return e.children=[],e.apply(new s(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new RTEListItemBlock(Z())}clone(t){var e;const n=new RTEListItemBlock(this.id);return n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n.nestList=null===(e=this.nestList)||void 0===e?void 0:e.map((t=>t.clone(n))),n.parent=t,n}}r.register(o.name,RTEListItemBlock.name,new i),r.register(a.name,RTEListItemBlock.name,new c),r.register(l.LINE_BREAK_SINGLE_BLOCK,RTEListItemBlock.name,new d),r.register(l.LINE_BREAK_MULTIPLE_BLOCKS,RTEListItemBlock.name,new u),r.register(l.DELETE_NEST_LIST,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),r.register(l.SPLIT_BLOCK_WITH_NODE,RTEListItemBlock.name,new h),r.register(l.REPLACE_CHILD_NODES,RTEListItemBlock.name,new m),r.register(l.REPLACE_NEST_LIST,RTEListItemBlock.name,new class extends t{handleAction(t,e){t.newList.forEach((t=>{t.parent=e})),e.nestList=t.newList}}),r.register(l.MERGE_TWO_BLOCKS_NODES,RTEListItemBlock.name,new w),r.register(l.INSERT_IMAGE_TO_BLOCK,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.parent.apply(t)}});class ct extends f{constructor(){super(...arguments),this.type=k.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}renderStyle(t){return(null==t?void 0:t.standalone)?ct.getDefaultStyles():null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new ct}toJSON(){}}class RTEListBlock extends R{constructor(t,e,n){super(t),this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&this.annotationMap.set(k.LIST,new ct)}static from(t,e={autoMatchFormat:!0}){const n=new RTEListBlock(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);_(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=RTEListItemBlock.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return I.from(e);case"customClass":return x.from(e);case"customStyle":return B.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(){const t=this.getBlockTag();return[`<${t}${super.generateAttributeString()}>`,this.children.map((t=>t.toHtml())).join(""),`</${t}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(t){const e=new RTEListBlock(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getBlockTag(){return"number-list"===this.type?"ol":"ul"}}r.register(l.TRANSFORM_LIST_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,r=e.parent.createList(t.listType);if(n.every((t=>t.parent===e)))r.apply(new s(e.children)),e.parent.apply(new T(e,r)),e.parent.apply(new p(e)),n.forEach((t=>t.children.map((t=>t.apply(new g)))));else{const n=t.selectedBlocks.map((t=>e.parent.toListItem(t)));r.apply(new s(n)),e.parent.apply(new T(e,r)),t.selectedBlocks.forEach((t=>{t.parent.apply(new p(t))})),0===e.children.length&&e.parent.apply(new p(e))}}}),r.register(l.TRANSFORM_PARAGRAPH_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){let n=!1,r=!1;const o=t.selectedBlocks,i=o.map((t=>(t.children.map((t=>t.apply(new g))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new E(e,...i));else if(r)e.parent.apply(new T(e,...i));else{const t=e.children.indexOf(o[0]),n=e.children.indexOf(o[o.length-1]),r=e.parent.createList(e.type);r.apply(new s(e.children.slice(0,t)));const a=e.parent.createList(e.type);a.apply(new s(e.children.slice(n+1))),e.parent.apply(new E(e,r,...i,a)),e.parent.apply(new p(e))}o.map((t=>{e.apply(new p(t))})),0===e.children.length&&e.parent.apply(new p(e))}toParagraph(t){const n=new e(Z(),"paragraph");return n.apply(new s(t.children)),n.annotationMap=t.annotationMap,n}}),r.register(l.INSERT_IMAGE_TO_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new T(e,t.imageBlockToBeInserted):t)}});class lt{}class dt{constructor(t,e){this.childrenOutput=[],this.currentStrategy=t,this.currentElements=e}setChildrenOutput(t){this.childrenOutput=t}toDto(t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const e=this.currentStrategy.handle(this.currentElements,t);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto(t))).filter(_)),e}}const ut=new class{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(t){this.hasDuplicateStrategy(t,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(t)}registerElementToNodeStrategy(t){this.hasDuplicateStrategy(t,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(t)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(t,e){return e.includes(t)}},ht=new class{process(t,e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),s=[];for(let r=0;r<t.length;r++){if(this.isInvalidElement(t[r]))continue;let o=0;for(const i of n)if(o=i.canHandle(t,r,e),o>0){const n=t.slice(r,r+o),a=new dt(i,n);1===o&&i.shouldProceedToElementChildren()&&a.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(a),r+=o-1;break}if(0===o&&r<t.length){const n=Array.from(t[r].childNodes),o=this.process(Array.from(n),e);o.length>0&&s.push(...o)}}return s}isInvalidElement(t){return t.nodeType===Node.COMMENT_NODE||["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return ut.getElementToBlockStrategies()}};class mt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class wt extends t{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[...t.childrenToBeInserted,t.referChildren])}replaceElementWithElements(t,e,n){t.children&&(n.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?n:t)))}}class Tt extends wt{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class pt extends y{constructor(t,e){super(),this.type=L.IMAGE,this.size=t,this.alt=e}static from(t,e){return[L.IMAGE,new pt(t,e)]}static getDefaultStyles(){return{verticalAlign:"bottom"}}toJSON(){return _(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new pt(this.size,this.alt)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e=pt.getDefaultStyles();switch(this.size){case"sm":return Object.assign(Object.assign({},e),{width:"25%"});case"md":return Object.assign(Object.assign({},e),{width:"50%"});case"lg":return Object.assign(Object.assign({},e),{width:"100%"})}}}class RTEImageNode extends A{constructor(t,e,n,s){super(t,s),this.type=N.IMAGE,this.url=e,this.parent=n}static from(t,e,n={autoMatchFormat:!0}){const s=new RTEImageNode(t.id,t.url,e),r=!!n.autoMatchFormat,o=Object.assign({},t.annotations),{size:i}=o,a=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(o,["size"]),c=Object.assign(Object.assign({},a),{size:null!=i?i:r?"md":void 0});return s.annotationMap=new Map(Object.keys(c).map((t=>"size"===t||"alt"===t?pt.from(c.size,c.alt):this.createAnnotationEntity(t,c[t]))).filter(_)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof pt||t instanceof C)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return""==t.alt&&delete t.alt,Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}clone(t){return new RTEImageNode(this.id,this.url,t,super.cloneAnnotations())}toHtml(){const t=this.getAnnotationByType(L.IMAGE);return`<img${super.generateAttributeString(...[t&&t.alt?`alt="${t.alt}"`:null,`src="${this.url}"`,t&&t.size?`data-size="${t.size}"`:null].filter(_))}>`}doAnnotationActionApply(t){const e=r.get(j.name,RTEImageNode.name);e&&e.execute(t,this)}doModifyActionApply(t){r.executeTheStrategy(t,this)}}r.register(l.UPDATE_IMAGE_NODE_URL,RTEImageNode.name,new class extends t{handleAction(t,e){e.url=t.url}}),r.register(j.name,RTEImageNode.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}});class gt extends S{constructor(t,e){super(),this.type=l.INSERT_NEW_PARAGRAPH,this.startContainerNode=t,this.startOffset=e}}class RTEImageBlock extends R{constructor(t){super(t),this.type="image",this.children=[]}static from(t,e={autoMatchFormat:!0}){const n=new RTEImageBlock(t.id),{annotations:s}=t;return n.children=t.nodes.map((t=>RTEImageNode.from(t,n,e))),s&&super.convertAnnotationsToMap(n.annotationMap,s),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map((t=>t.toJSON()))})}toHtml(){const t=super.generateAttributeString(),e=this.children.map((t=>t.toHtml())).join("");return super.shouldRenderAsInternalWrapper()?e:[`<div${t}>`,e,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.url.length>0))}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new RTEImageBlock(Z())}clone(t){const e=new RTEImageBlock(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}r.register(l.MERGE_TWO_BLOCKS_NODES,RTEImageBlock.name,new w),r.register(l.REPLACE_CHILD_NODES,RTEImageBlock.name,new m),r.register(l.SPLIT_BLOCK_WITH_NODE,RTEImageBlock.name,new class extends t{handleAction(t,e){t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode,e)}splitImageNodes(t,e,n){const s=n.children.indexOf(t);if(s>-1){const t=n.children.slice(0,s+e),r=n.children.slice(s+e);n.apply(new H(t));const o=this.cloneWithNodes(r,n);return n.parent.apply(new T(n,o)),o}}cloneWithNodes(t,e){const n=e.createNewImageBlock();return n.children=[],n.apply(new s(t)),n}}),r.register(l.LINE_BREAK_SINGLE_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=new gt(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(l.LINE_BREAK_MULTIPLE_BLOCKS,RTEImageBlock.name,new class extends t{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,r){const o=e.from({id:Z(),type:"paragraph",nodes:[{id:Z(),type:"text",text:"\n"}]});r.parent.apply(new T(r,o));const i=this.concatBlocksNodes(t.slice(1));return(0===i.length||i[0]&&""===i[0].text)&&i.push(new n(Z(),"\n",o)),o.apply(new s(i)),o.children[0]}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new p(t)))})),e}}),r.register(l.INSERT_IMAGE_TO_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=t.splitPointNode,r=t.startOffsetOfNode,o=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(o.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new T(e,o)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new E(e,o)):(e.apply(new v(n,r)),e.parent.apply(new T(e,o)))}}),r.register(a.name,RTEImageBlock.name,new c);class RTEHtmlBlock extends R{constructor(t,e){super(t),this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new RTEHtmlBlock(t.id,t.htmlTag),{annotations:s}=t;return s&&super.convertAnnotationsToMap(n.annotationMap,s),n.children=this.generateBlockChildren(t.children,e,n),n}clone(t){const e=new RTEHtmlBlock(this.id,this.htmlTag);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(){const t=this.htmlTag,e=super.generateAttributeString();return RTEHtmlBlock.VOID_TAGS.has(this.htmlTag)?`<${t}${e}>`:[`<${t}${e}>`,this.children.map((t=>t.toHtml())).join(""),`</${t}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}RTEHtmlBlock.VOID_TAGS=new Set(["hr","input","col"]);class Et extends S{constructor(t){super(),this.type=l.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class ft extends D{handleAction(t,e){const{startContainerNode:n}=t;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(t,e):this.deleteDecoratorNodeContent(t,e);const s=e.parent;s&&e.isListItemBlock()&&0===s.children.length&&s.parent.apply(new p(s))}deleteTextNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;if(0!==s&&!n.isEmpty()){const r=n.text.slice(0,s-1)+n.text.slice(s);if(n.apply(new M(r)),r)return void(t.previousNode=n);{const s=this.getPreviousNode(n);return s&&s.parent===e&&"\n"===s.text||1===e.children.length?void(t.previousNode=n):(e.apply(new p(n)),void(t.previousNode=s))}}{let s=this.getPreviousNode(n),r=null;const o=n.isEmpty();if(e.children.length&&s&&s.parent!==e)o&&e.apply(new p(n)),e.type===s.parent.type&&s.parent.apply(new Et(e));else if(this.isContentFirstNode(n)&&o&&(r=this.getNextNode(n)),o&&e.apply(new p(n)),s&&s.isTextNode()&&(s.isEmpty()||!s.isContentEditable()&&s.parent===e)){const t=s;s=this.getPreviousNode(s),t.parent.apply(new p(t)),s||o||(r=n)}0===e.children.length&&e.parent.apply(new p(e)),s?t.previousNode=s:r&&(t.nextNode=r)}}deleteDecoratorNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;let r=this.getPreviousNode(n),o=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(o=this.getNextNode(n)),1===t.children.length?t.parent.apply(new p(t)):t.apply(new p(n))}else{const e=r;e&&!e.isContentEditable()&&(r=this.getPreviousNode(e),e.parent.apply(new p(e)),r||(t.nextNode=n))}r?t.previousNode=r:o&&(t.nextNode=o)}}class kt extends t{handleAction(t,e){const{startContainerNode:n}=t;t.newBlock=this.breakSingleBlock(n,t.startOffset,e)}breakSingleBlock(t,e,n){const s=this.getNewParagraph(t);if(s){if(this.isCaretPositionAtBlockEnd(n,t,e))n.parent.apply(new T(n,s));else{if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new v(t,e);return n.apply(s),s.newBlock}n.parent.apply(new E(n,s))}return s}}getNewParagraph(t){const e=this.createNewParagraph("");if(e){let n=e.children[0];return t.isTextNode()&&t.isContentEditable()&&(e.children=[],n=t.cloneWithText(""),n.annotationMap.delete(L.LINK),e.apply(new s([n]))),e}}}class Rt extends S{constructor(t,e,n=!1){super(),this.isFlushable=!0,this.type=l.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=t,this.offset=e,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class Bt extends t{handleAction(t,e){const{rteRange:n,nodeToBeInserted:s}=t,{startNode:r,startOffset:o}=n;if(r){const t=e;if(r.isContentEditable()&&r.isTextNode())if("\n"!==r.text&&r.text&&0!==o){const e=r.text.substring(0,o),n=r.text.substring(o),i=r.cloneWithText(e),a=r.cloneWithText(n),c=[i,s];n&&c.push(a),t.apply(new E(r,...c)),t.apply(new p(r))}else t.apply(new E(r,s));else t.apply(0!==o?new T(r,s):new E(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new Rt(t))}}class xt extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,o=this.createNewParagraph(n);if(o){const t=o.children[0];e.apply(0!==s?new T(r,t):new E(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new Rt(t))}}class It extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),o=this.copyInlineStyleToNewNode(t);if(r.apply(new s([o])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new v(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new E(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],o=1===n.children.length&&n.children[0].isEmpty();if(n===r&&o){const r=n.parent.parent;if("list-item"!==r.type){const o=e.from({id:Z(),type:"paragraph",nodes:[]});return o.apply(new s(t.children)),r.apply(new T(n.parent,o)),n.parent.apply(new p(n)),o}r.parent.apply(new T(r,t)),n.parent.apply(new p(n))}else n.parent.apply(new T(n,t));return t}copyInlineStyleToNewNode(t){const e=t.cloneWithText("");return e.annotationMap.delete(L.LINK),e}}class bt extends S{constructor(t){super(),this.type=l.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class Ot extends P{handleAction(t,e){super.handleAction(t,e);const n=e.parent;0===e.children.length&&n&&n.apply("list-item"===n.type?new bt(e):new p(e))}}class yt extends t{handleAction(t,e){if(e.parent){const{blocksToBeInserted:n,startNode:s,startOffset:r}=t;let o=e;if(s===e.children[0]&&0===r)e.parent.apply(new E(e,...n));else{const t=new v(s,r);e.apply(t),e.parent.apply(new T(e,...n)),o=t.newBlock}t.futureFocusBlock=o}}}const Lt=new class{registerBlockBasicStrategies(t){r.register(l.DELETE_CHILDREN,t,t===RTEListBlock.name?new Ot:new P),r.register(l.APPEND_CHILDREN,t,new mt),r.register(l.INSERT_CHILDREN_BEFORE,t,new wt),r.register(l.INSERT_CHILDREN_AFTER,t,new Tt),r.register(l.DELETE_BLOCK_CONTENT,t,new ft),r.register(l.INSERT_NEW_PARAGRAPH,t,t===RTEListItemBlock.name?new It:new kt),r.register(l.INSERT_TEXT_TO_DECORATOR_NODE,t,new xt),r.register(l.INSERT_NODE_TO_NEAREST_ROOT,t,new Bt),r.register(l.PASTE_CONTENT,t,new yt)}};class At{}class Nt extends At{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isBold(t)||e.bold?{bold:!0}:{}}isBold(t){return"STRONG"===t.nodeName||"B"===t.nodeName||t.style.fontWeight===F||t.style.fontWeight===$||t.classList.contains("v-rte--bold")}}class Ct extends At{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getAttributes(t);return Object.keys(e).length>0?{customAttribute:e}:{}}getAttributes(t){return t.getAttributeNames().filter((t=>"style"!==t&&"class"!==t&&this.isValidAttr(t))).reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{})}isValidAttr(t){return/^[a-zA-Z_][\w-]*$/.test(t)}}class jt extends At{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getCustomClass(t);return e.length>0?{customClass:e}:{}}getCustomClass(t){return t.classList.toString().split(" ").filter((t=>!t.includes("v-rte")&&""!==t))}}class Ht extends At{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.generateCustomStyleAnnotations(t);return Object.keys(e).length>0?{customStyle:e}:{}}generateCustomStyleAnnotations(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{[st(e[0].trim())]:e[1].trim().replace(";","")}})).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{}):{}}}class St extends At{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getIndent(t);return e?{indent:e}:{}}getIndent(t){const e=t.style;let n;if(e.marginLeft)n=e.marginLeft;else{if(!e.margin)return null;{const t=e.margin.split(" ");switch(t.length){case 4:n=t[3];break;case 2:case 3:n=t[1];break;default:n=t[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}}class vt extends At{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getTextAlign(t);return e?{textAlign:e}:{}}getTextAlign(t){const e=t.classList;if(e.contains("v-rte--horizontal-alignment-left"))return"left";if(e.contains("v-rte--horizontal-alignment-center"))return"center";if(e.contains("v-rte--horizontal-alignment-right"))return"right";if(e.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(t.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class Dt extends At{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isCode(t)||e.code?{code:!0}:{}}isCode(t){return t.classList.contains("v-rte--code")||"CODE"===t.nodeName||"PRE"===t.nodeName||"monospace"===t.style.fontFamily||"Roboto Mono"===t.style.fontFamily.replace(/["']/g,"")}}class Mt extends At{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){const n=this.getColor(t)||e.textColor;return n?{textColor:n}:{}}getColor(t){var e;const n=null===(e=rt(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=V.filter((t=>t.key!==U.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of V)if(t.style.color.includes(e.key))return e.key;return null}}class Pt extends At{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||t.style.fontStyle===z||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class Ft extends At{constructor(){super(...arguments),this.handlers=[new Ct,new jt,new Ht]}canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return e.link?{link:e.link}:"A"===t.tagName?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:Z()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class $t extends At{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes(G)||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class Vt extends At{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes(J)||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class Ut{static register(t,e){var n;const s=null!==(n=this.registry.get(t))&&void 0!==n?n:new Set;s.add(e),this.registry.set(t,s)}static getStrategies(t){var e;return Array.from(null!==(e=this.registry.get(t))&&void 0!==e?e:[])}}Ut.registry=new Map;class zt extends At{canHandle(t,e){return!!e.autoMatchFormat&&"RTETextBlock"===t.name}handle(t){const e=this.getTextStyle(t);return e?{textStyle:e}:{}}getTextStyle(t){const e=this.getElementTypeByDataType(t);if(e)return e;const n=this.getElementTypeByNodeName(t);if(n)return n;const s=this.getElementTypeByFontSize(t);if(s)return s;return this.getElementTypeByClassName(t)||null}getElementTypeByDataType(t){return t.nodeType!==Node.TEXT_NODE&&t.hasAttribute("data-type")?t.getAttribute("data-type"):null}getElementTypeByFontSize(t){var e;switch(null===(e=t.style)||void 0===e?void 0:e.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(t){switch(t.nodeName){case"P":return"paragraph";case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(t){if(t.className){const e=/\bv-rte--text-style-(title|subtitle|heading-1|heading-2|heading-3|heading-4|heading-5|heading-6|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class Gt extends At{canHandle(t){return"RTEImageNode"===t.name}handle(t){const e=this.getImageSize(t);return e?{size:e}:{}}getImageSize(t){return t.getAttribute("data-size")?t.getAttribute("data-size"):null}}class Jt extends At{canHandle(t){return"RTEImageNode"===t.name}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}class Wt extends At{constructor(){super(...arguments),this.customAttributeHandler=new Ct,this.customStyleAnnotationHandler=new Ht,this.customClassAnnotationHandler=new jt}canHandle(t,e){return"RTETextNode"===t.name&&!1===e.autoMatchFormat}handle(t,e){if(Wt.canHandleTags.includes(t.nodeName)){const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));if(n)return{inlineHtml:n}}return{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||1===t.childNodes.length&&t.childNodes[0].nodeType!==Node.TEXT_NODE){const e={htmlTag:t.nodeName.toLowerCase(),customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass};if(s){let n=s;for(;n.child&&t.parentNode&&n.child.htmlTag===t.parentNode.nodeName.toLowerCase();)n=n.child;n.child=e}else s=e}return s?Object.assign({},s):null}}Wt.canHandleTags=["A","ABBR","AUDIO","B","BDI","BDO","CITE","CODE","DEL","DFN","EMBED","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR","VIDEO"];const Kt=new class{constructor(){this.handlers=[new vt,new St,new Nt,new Pt,new Vt,new $t,new Mt,new Ft,new Dt,new Gt,new Jt,new Ct,new jt,new Ht,new zt,new Wt]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){const s="A"===e.tagName,r=this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof Ft)).filter((r=>e.nodeType!==Node.TEXT_NODE&&r.canHandle(t,{skipCustomAnnotations:n.skipCustomAnnotations||s,autoMatchFormat:n.autoMatchFormat}))).reduce(((t,s)=>{const r=s.handle(e,n.parentAnnotations);return Object.assign(Object.assign({},t),r)}),{});this.removeTextStyleDefaultsFromCustomStyle(r);const o=Ut.getStrategies(t.name);for(const t of o)(n.autoMatchFormat||t.alwaysFilter)&&t.filterAnnotations(r);return r}removeTextStyleDefaultsFromCustomStyle(t){const e="textStyle"in t?t.textStyle:void 0,n=t.customStyle;if(!e||!n)return t;const s=W.getDefaultStyles(e);if(!s)return t;for(const t of Object.keys(s))n[t]===s[t]&&delete n[t];return 0===Object.keys(n).length&&delete t.customStyle,t}};class Xt extends lt{constructor(){super(...arguments),this.annotationHandler=new zt}generateChildNodes(t,e,s){const r=[],o=!(!s||!1!==s.autoMatchFormat),i=Object.assign({},e);return t.forEach((t=>{const a=ut.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let c=null;if(a&&(c=a.handle([t],s,i)),c)r.push(c);else if(ot(t)&&t.childNodes.length>0){const a=Kt.generate(n,t,Object.assign({parentAnnotations:o?{inlineHtml:i.inlineHtml,link:i.link,code:i.code}:e},s));r.push(...this.generateChildNodes(Array.from(t.childNodes),a,s))}})),r}matchTextBlockType(t){var e;return null!==(e=this.annotationHandler.handle(t).textStyle)&&void 0!==e?e:"paragraph"}}class Yt extends Xt{canHandle(t,e,n){const s=t[e];return!n.autoMatchFormat&&("DIV"!==s.nodeName||s.childNodes.length>0&&"IMG"!==s.childNodes[0].nodeName)&&Yt.canHandleTags.includes(t[e].nodeName)?1:0}handle(t,e){return RTEHtmlBlock.from(this.generateHtmlBlock(t[0],e),e)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}generateHtmlBlock(t,e){return{id:Z(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:Kt.generate(RTEHtmlBlock,t,e),children:[]}}}Yt.canHandleTags=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BUTTON","CAPTION","COL","COLGROUP","DIV","DD","DETAILS","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","HEADER","HR","HX","INPUT","LEGEND","MAIN","NAV","PRE","SECTION","SUMMARY","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR"];class Qt extends Xt{canHandle(t,e){return"PRE"!==t[e].tagName&&"CODE"!==t[e].tagName||!t[e].hasAttribute("data-language")?0:1}handle(t){const e=t[0];if(e){const t=e.textContent,n=e.dataset.language;return b.from({id:Z(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class Zt extends Xt{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return RTEImageBlock.from({id:Z(),type:"image",nodes:[{id:Z(),type:"image",url:t.src,annotations:Kt.generate(RTEImageNode,t,e)}],annotations:Object.assign(Object.assign({},Kt.generate(RTEImageBlock,t.parentElement,e)),{internalWrapper:n})},e)}}class _t extends Xt{canHandle(t,e){let n=0;for(let s=e;s<t.length;s++){const e=t[s];if(e.nodeType!==Node.TEXT_NODE&&(!_t.canHandleTags.includes(e.nodeName)||""===e.textContent&&e.querySelector("IMG")))break;n++}return n}handle(t,s){const r=t[0].parentElement,o=s&&s.autoMatchFormat,i=this.generateChildNodes(t,o?Kt.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),a=o?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),c=!o&&!a;return e.from(Object.assign({id:Z(),type:a||"paragraph",nodes:i},c?{annotations:{internalWrapper:c}}:{annotations:Kt.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}}_t.canHandleTags=[...Wt.canHandleTags,"CODE","A","VEGA-RICH-TEXT-LINK-EDITOR","BR"];class qt extends lt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:Z(),type:"text",text:t,annotations:e}}}class te{get alwaysFilter(){return!1}filterAnnotations(t){const e=t.customStyle;return e?(this.extractAndDeleteMatchedStyles(e),0===Object.keys(e).length&&delete t.customStyle,t):t}extractAndDeleteMatchedStyles(t){let e=!1;if(t){const n=this.stylesToBeFiltered,s=Object.keys(n);for(const r of s)t[r]===n[r]&&(delete t[r],e=!0)}return e}}class ee extends te{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const{textAlign:e,customStyle:n}=t;return e&&n?(this.stylesToBeFiltered=K.getDefaultStyles(e),super.filterAnnotations(t)):t}}Q.registerRTEDTOClass("paragraph",e),Q.registerRTEDTOClass("title",e),Q.registerRTEDTOClass("subtitle",e),Q.registerRTEDTOClass("heading-1",e),Q.registerRTEDTOClass("heading-2",e),Q.registerRTEDTOClass("heading-3",e),Q.registerRTEDTOClass("heading-4",e),Q.registerRTEDTOClass("heading-5",e),Q.registerRTEDTOClass("heading-6",e),Q.registerRTEDTOClass("heading-6",e),Q.registerRTEDTOClass("list-item",RTEListItemBlock),Q.registerRTEDTOClass("bullet-list",RTEListBlock),Q.registerRTEDTOClass("number-list",RTEListBlock),Q.registerRTEDTOClass("image",RTEImageBlock),Q.registerRTEDTOClass("code-block",b),Q.registerRTEDTOClass("html-block",RTEHtmlBlock),Q.registerRTEDTOClass("text",n),Q.registerRTEDTOClass("image",RTEImageNode),Lt.registerBlockBasicStrategies(e.name),Lt.registerBlockBasicStrategies(RTEListBlock.name),Lt.registerBlockBasicStrategies(RTEListItemBlock.name),Lt.registerBlockBasicStrategies(RTEImageBlock.name),Lt.registerBlockBasicStrategies(RTEHtmlBlock.name),ut.registerElementToBlockStrategy(new _t),ut.registerElementToBlockStrategy(new class extends Zt{canHandle(t,e){const n=t[e];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(t,e){const n=t[0].querySelector("img");return this.createRTEImageBlock(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),ut.registerElementToBlockStrategy(new class extends Zt{canHandle(t,e){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===t[e].tagName?1:0}handle(t,e){const n=t[0],s=n.querySelector("img");if(_(s))return RTEImageBlock.from({id:Z(),type:"image",nodes:[{id:Z(),type:"image",url:s.src,annotations:Kt.generate(RTEImageNode,n,e)}],annotations:Kt.generate(RTEImageBlock,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),ut.registerElementToBlockStrategy(new class extends Zt{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),ut.registerElementToBlockStrategy(new class extends Xt{canHandle(t,e){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(t[e]))?1:0}handle(t,n){const s=this.generateChildNodes(Array.from(t[0].childNodes),{},n);return 0===s.length?null:e.from({id:Z(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:Kt.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),ut.registerElementToBlockStrategy(new Qt),ut.registerElementToBlockStrategy(new class extends Qt{canHandle(t,e){return"VEGA-CODE-BLOCK"===t[e].tagName&&0==!!t[e].querySelector("vega-code-block")||this.isCodeBlockContainer(t[e])?1:0}handle(t){const e=this.isCodeBlockContainer(t[0])?t[0].querySelector("vega-code-block"):t[0],n=e.querySelector("code");if(n)return super.handle([n]);if(e.hasAttribute("data-content")){const t=document.createElement("code");return t.textContent=e.dataset.content,t.dataset.language=e.dataset.language,super.handle([t])}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isCodeBlockContainer(t){return"PRE"===t.tagName&&t.classList.contains("code-block-container")&&1===t.querySelectorAll("vega-code-block").length}}),ut.registerElementToBlockStrategy(new class extends Xt{canHandle(t,e){if(!["UL","OL"].includes(t[e].parentElement.nodeName)&&t.some((t=>"LI"===t.nodeName))){let n=0;for(let s=e;s<t.length&&"LI"===t[s].nodeName;s++)n++;return n}return"LI"===t[e].tagName?1:0}handle(t,e){const n=t[0];return["UL","OL"].includes(n.parentElement.nodeName)?RTEListItemBlock.from(this.generateListItemBlockDTO(n,e),e):this.generateWithListBlock(t,e)}appendChildBlocks(t,e){t.nestList=e.filter((t=>["bullet-list","number-list"].includes(t.type)))}shouldProceedToElementChildren(){return!0}generateWithListBlock(t,e){return RTEListBlock.from({id:Z(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:Z(),type:"list-item",annotations:Kt.generate(RTEListItemBlock,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),Kt.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),ut.registerElementToBlockStrategy(new class extends Xt{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,o=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),i=_(s)&&["UL","OL"].includes(s.nodeName);return r&&!o&&i?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return RTEListItemBlock.from({id:Z(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),ut.registerElementToBlockStrategy(new class extends Xt{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:Z(),type:"number-list",blocks:[],annotations:Kt.generate(RTEListBlock,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof RTEListItemBlock)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),ut.registerElementToBlockStrategy(new class extends Xt{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:Z(),type:"bullet-list",blocks:[],annotations:Kt.generate(RTEListBlock,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof RTEListItemBlock)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),ut.registerElementToBlockStrategy(new Yt),ut.registerElementToNodeStrategy(new class extends qt{canHandle(t,e){const n=t[e];return!ot(n)||"BR"!==n.nodeName&&0!==n.childNodes.length?0:1}handle(t,e,s){const r=!(!e||!1!==e.autoMatchFormat),o=Object.assign({},s),i=t[0],a=Kt.generate(n,i,Object.assign({parentAnnotations:r?{inlineHtml:o.inlineHtml,link:o.link,code:o.code}:s},e));if("BR"===i.nodeName)return this.generateTextNode("\n",a);if(0===i.childNodes.length){const t=r?it(Object.assign(Object.assign({},n.supportsHtmlTag(i.nodeName.toLowerCase())?a:{}),{inlineHtml:a.inlineHtml,plainText:_(a.inlineHtml)})):a;return Object.assign({},this.generateTextNode("",t))}}}),ut.registerElementToNodeStrategy(new class extends qt{canHandle(t,e){return t[e].nodeType===Node.TEXT_NODE?1:0}handle(t,e,s){const r=Object.assign({},s),o=!(!e||!1!==e.autoMatchFormat),i=t[0],a=i.parentNode.nodeName.toLowerCase(),c=o&&!n.supportsHtmlTag(a),l=this.generateTextNode(String(i.textContent),o?it(Object.assign(Object.assign({},"span"===a?r:{link:r.link,code:"code"===a?r.code:void 0}),{inlineHtml:r.inlineHtml,plainText:c||void 0})):r);return Object.assign({},l)}}),Ut.register(RTEListBlock.name,new class extends te{constructor(){super(...arguments),this.stylesToBeFiltered=ct.getDefaultStyles()}}),Ut.register(RTEListItemBlock.name,new class extends te{constructor(){super(...arguments),this.stylesToBeFiltered=W.getDefaultStyles("paragraph")||{}}}),Ut.register(e.name,new ee),Ut.register(RTEListBlock.name,new ee),Ut.register(RTEListItemBlock.name,new ee),Ut.register(RTEImageNode.name,new class extends te{constructor(){super(...arguments),this.stylesToBeFiltered=pt.getDefaultStyles()}get alwaysFilter(){return!0}}),Ut.register(n.name,new class extends te{constructor(){super(...arguments),this.stylesToBeFiltered=Y.getDefaultStyles()}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}}),Ut.register(n.name,new class extends te{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const e=t,n=e.customStyle;if(!n)return t;e.bold&&n.fontWeight===$&&delete n.fontWeight,e.italic&&n.fontStyle===z&&delete n.fontStyle;const s=this.normalizeTextDecoration(n.textDecoration);return s&&this.shouldRemoveTextDecoration(s,e)&&delete n.textDecoration,0===Object.keys(n).length&&delete e.customStyle,t}normalizeTextDecoration(t){if(!t)return;const e=t.trim().toLowerCase().split(/\s+/);return e.some((t=>t!==J&&t!==G))?void 0:Array.from(new Set(e)).sort().join(" ")}shouldRemoveTextDecoration(t,e){const n=[];return e.underline&&n.push(J),e.strikethrough&&n.push(G),0!==n.length&&t===n.sort().join(" ")}}),Ut.register(n.name,new class extends te{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles()}filterAnnotations(t){const{code:e,customStyle:n}=t;return e&&n?super.filterAnnotations(t):t}});class ne{static preserve(t){const e=t.replace(/\s+style=/g," data-style=");return new se(e)}}class se{constructor(t){this.processedHtml=t}getProcessedHtml(){return this.processedHtml}restore(t){this.walkNodes(t)}walkNodes(t){t.forEach((t=>{if(ot(t)){const e=t.getAttribute("data-style");e&&(t.style.cssText=e,t.removeAttribute("data-style")),t.children.length>0&&this.walkNodes(Array.from(t.children))}}))}}class re{process(t){return t.replace(/(<[^>]+>)(\s+)(<[^>]+>)/g,((t,e,n,s)=>{const r=this.extractOpeningTagName(e),o=this.extractClosingTagName(s);return r&&o&&r===o?`${e}${n}${s}`:`${e}${s}`}))}extractOpeningTagName(t){const e=t.match(/<(\w[\w-]*)/);return e?e[1]:null}extractClosingTagName(t){const e=t.match(/<\/(\w[\w-]*)/);return e?e[1]:null}}class oe{process(t){return t.replace(/(>)[\n\t]+(?=.)/g,"$1")}}class ie{process(t){return t.replace(/(.?)[\n\t]+(?=<)/g,"$1")}}class ae{constructor(){this.processors=[new re,new oe,new ie]}clean(t){if(!t||0===t.trim().length)return t;let e,n=t;do{e=n;for(const t of this.processors)n=t.process(n)}while(n!==e);return n}}class VegaRTEContent{constructor(t){t.forEach((t=>{t.parent=this})),this.children=t}static fromJSON(t,e={autoMatchFormat:!0}){const n=t.map((t=>{const n=Q.getRTEBlockClass(t.type);if(n)return n.from(t,e);throw new Error(`[Vega] Unknown block type: ${t.type}`)}));return new VegaRTEContent(n)}static createEmptyContent(t={autoMatchFormat:!0}){return VegaRTEContent.fromJSON([{id:Z(),type:"paragraph",annotations:{internalWrapper:!t.autoMatchFormat},nodes:[{id:Z(),annotations:{plainText:!t.autoMatchFormat},type:"text",text:""}]}],t)}static fromHtml(t,e={autoMatchFormat:!0,skipCustomAnnotations:!1}){const n=(new ae).clean(t),s=ne.preserve(n),r=s.getProcessedHtml(),o=(new DOMParser).parseFromString(r,"text/html").body,i=Array.from(o.childNodes);s.restore(i);const a=ht.process(i,e).filter(_).map((t=>t.toDto(e))).filter(_);return new VegaRTEContent(a)}clone(t=!1){return new VegaRTEContent(t?this.children.map((t=>t.clone(this))):[...this.children])}toJSON(){return this.children.map((t=>t.toJSON()))}toHtml(t){return t&&at.warn("The 'options' parameter in toHtml method is deprecated and will be removed in the future."),this.isEmpty()?"":this.children.map((t=>t.toHtml())).join("")}isEmpty(){return 0===this.children.length||1===this.children.length&&!this.children[0].isNotEmpty()}apply(t){if(r.executeTheStrategy(t,this),t.executedFlag&&t.isFlushable){const t=O.getDOMByEntity(this);t&&q.notify(tt.getSubject(t,nt),{})}}getLastNode(){return 0===this.children.length?null:this.children[this.children.length-1].getLastNode()}toListItem(t){t.children.map((t=>t.apply(new g)));const e=new RTEListItemBlock(Z());return e.apply(new s(t.children)),e.annotationMap=t.annotationMap,e}createList(t){return new RTEListBlock(Z(),t)}findNodeById(t){return this.findNodeInBlocksById(t,this.children)}findNodeInBlocksById(t,e){for(const n of e){if("children"in n)for(const e of n.children)if(e.id===t)return e;if(n instanceof RTEListItemBlock&&n.nestList)for(const e of n.nestList){const n=this.findNodeInBlocksById(t,e.children);if(n)return n}if(n instanceof RTEListBlock&&n.children){const e=this.findNodeInBlocksById(t,n.children);if(e)return e}}return null}}r.register(l.DELETE_CHILDREN,VegaRTEContent.name,new P),r.register(l.APPEND_CHILDREN,VegaRTEContent.name,new mt),r.register(l.INSERT_CHILDREN_BEFORE,VegaRTEContent.name,new wt),r.register(l.INSERT_CHILDREN_AFTER,VegaRTEContent.name,new Tt),r.register(l.TRANSFORM_TO_CODE_BLOCK,VegaRTEContent.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,s=new b(Z(),this.getCodeContent(n),"plainText");e.apply(new E(n[0],s)),t.newCodeBlock=s,this.removeSelectBlocks(n,e)}getCodeContent(t){return t.filter((t=>"image"!==t.type&&"list-item"!==t.type)).map((t=>t.children.map((t=>t.text)).join(""))).join("\n")}removeSelectBlocks(t,e){for(let n=0;n<t.length;n++)e.apply(new p(t[n]))}}),r.register(l.UPDATE_CURSOR_POSITION,VegaRTEContent.name,new class extends t{handleAction(t,e){const{offset:n,nextFocusNode:s,immediatelyRun:r}=t,o=O.getDOMByEntity(e);o&&q.notify(tt.getSubject(o,et),{node:s,offset:n,updateDirectly:r})}});export{At as A,Xt as B,ut as E,gt as I,Et as M,yt as P,Lt as R,ne as S,Rt as U,VegaRTEContent as V,lt as a,RTEImageBlock as b,wt as c,RTEListItemBlock as d,RTEListBlock as e,RTEImageNode as f,pt as g,Kt as h,ht as i}
|
package/dist/vega/p-68124bc5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-878851f6.js";import{d as s,e as n}from"./p-33860e54.js";import{c as r}from"./p-02841589.js";import{L as i}from"./p-6e1ab235.js";import{i as o}from"./p-c6d62f0d.js";import{g as c}from"./p-8b5d3a52.js";import{V as a}from"./p-8ac2d165.js";import{c as l}from"./p-a841cf13.js";import{f as h}from"./p-dcd18ab1.js";var u,d;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(u||(u={}));class p{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT",t.LIST="LIST",t.INTERNAL_WRAPPER="INTERNAL_WRAPPER"}(d||(d={}));class f extends p{}const T=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap,this.contentEntityToRootDom=new Map,this.rootDomToContentEntity=new WeakMap}register(t,e){this.isVegaRTEContent(e)?this.registerRootDomAndContentEntity(t,e):(this.domToEntity.set(t,e),this.entityToDOM.set(e,t))}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.isVegaRTEContent(t)?this.contentEntityToRootDom.get(t):this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}registerRootDomAndContentEntity(t,e){const s=this.rootDomToContentEntity.get(t);s&&s!==e&&this.contentEntityToRootDom.delete(s),this.rootDomToContentEntity.set(t,e),this.contentEntityToRootDom.set(e,t)}isVegaRTEContent(t){return t&&"VegaRTEContent"===t.constructor.name}};var E,x,g,w;!function(t){t.DELETE_CHILDREN="DELETE_CHILDREN",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILDREN="APPEND_CHILDREN",t.INSERT_CHILDREN_AFTER="INSERT_CHILDREN_AFTER",t.INSERT_CHILDREN_BEFORE="INSERT_CHILDREN_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.INSERT_NEW_PARAGRAPH="INSERT_NEW_PARAGRAPH",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK",t.UNLINK_LINK_GROUP="UNLINK_LINK_GROUP",t.LINK_GROUP_NODE_SPLIT="LINK_GROUP_NODE_SPLIT",t.DELETE_LINK_GROUP="DELETE_LINK_GROUP",t.UPDATE_CURSOR_POSITION="UPDATE_CURSOR_POSITION",t.INSERT_TEXT_TO_DECORATOR_NODE="INSERT_TEXT_TO_DECORATOR_NODE",t.INSERT_NODE_TO_NEAREST_ROOT="INSERT_NODE_TO_NEAREST_ROOT",t.PASTE_CONTENT="PASTE_CONTENT"}(E||(E={}));class A{constructor(){this.isFlushable=!1}}class O extends p{constructor(t){super(),this.type=u.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 O("");return this.linkGroups.forEach(((e,s)=>{t.linkGroups.set(s,e.map((t=>t.clone(t.parent))))})),t}toString(t,e){const s=this.toJsx(t,e);return Object.entries(s).map((([t,e])=>{const s="string"==typeof e?e:this.formatStyleToString(e);return`${r(t)}="${s}"`})).join(" ")}toJsx(t,e){const s=this.getStyle(t,e),n=this.getClass(t,e),r=this.getAttribute(t);return n.length>0&&(r.class=n.join(" ")),s&&Object.keys(s).length>0&&(r.style=s),r}getClass(t,e){const s=[];return t.link.customClass&&s.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&s.push("v-rte--link"),s}getStyle(t,e){const s={};return t.link.customStyle&&Object.assign(s,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&Object.assign(s,O.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])=>`${r(t)}: ${e};`)).join(" ")}}class N extends f{constructor(t){super(),this.type=d.ALIGNMENT,this.textAlign=t}static from(t){return[d.ALIGNMENT,new N(t)]}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 N(this.textAlign)}renderStyle(t){return(null==t?void 0:t.standalone)?N.getDefaultStyles(this.textAlign):null}}class R extends f{constructor(t){super(),this.type=d.INDENT,this.indent=Math.max(0,t)}static from(t){return[d.INDENT,new R(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new R(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class m{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 A?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)))}}}m.registry=new Map;class y{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,s)}static unregister(t,e){const s=this.registry.get(e);s&&s.delete(t)}static get(t,e){const s=this.registry.get(e);if(s)return s.get(t)}static executeTheStrategy(t,e){const s=m.get(t,e),n=()=>{const s=t instanceof A?t.type:t.constructor.name,n=y.get(s,e.constructor.name);if(n)return t.executedFlag=!0,n.execute(t,e);i.warn(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)};return s?s.intercept(n,t,e):n()}static canHandle(t,e){return!!y.get(t,e.constructor.name)}}y.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(x||(x={}));class S extends p{}class C extends S{constructor(t){super(),this.type=x.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[x.CUSTOM_ATTRIBUTE,new C(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new C(this.customAttribute)}toString(t=[]){const e=t.map((t=>t.split("=")[0]));return Object.keys(this.customAttribute).map((t=>e.includes(t)?null:`${t}="${this.customAttribute[t]}"`)).filter(o)}render(t={}){var e;const s=Object.assign({},this.customAttribute);return null===(e=t.filterAttributes)||void 0===e||e.forEach((t=>delete s[t])),Object.keys(s).forEach((t=>{this.BOOLEAN_ATTRS.has(t)&&""===s[t]&&(s[t]="true")})),s}}class b extends S{constructor(t){super(),this.type=x.CUSTOM_CLASS,this.customClass=t}static from(t){return[x.CUSTOM_CLASS,new b(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new b(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class k extends S{constructor(t){super(),this.type=x.CUSTOM_STYLE,this.customStyle=t}static from(t){return[x.CUSTOM_STYLE,new k(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new k(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 B extends f{constructor(t){super(),this.type=d.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[d.INTERNAL_WRAPPER,new B(t)]}clone(){return new B(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}!function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK",t.INLINE_HTML="INLINE_HTML",t.PLAIN_TEXT="PLAIN_TEXT"}(g||(g={}));class v extends p{}class _{constructor(t){this.dtoType=t instanceof RTEBlock?"block":"node",this.annotationMap=t.annotationMap}toCssText(t={standalone:!1},e,s){return s=s||this.toJSON(t,e),Object.entries(Object.assign({},s)).map((([t,e])=>`${r(t)}: ${e};`)).join("")}toJSON(t={standalone:!1},e){const s=Array.from(this.annotationMap.values()).filter((t=>this.filterAnnotation(t)||t instanceof k)).map((e=>e.renderStyle(t))).filter(o);return e&&e.length>0?this.mergeAnnotationStyles(s,e):s.reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})}filterAnnotation(t){return"block"===this.dtoType?t instanceof f:t instanceof v}mergeAnnotationStyles(t,e){const s={};for(const n of t)for(const t in n){const r=n[t],i=s[t];s[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return s}}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(w||(w={}));class RTENode{constructor(t,e){this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}static from(t,e,s){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}, ${s}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return C.from(e);case"customClass":return b.from(e);case"customStyle":return k.from(e)}}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}getStyles(t={standalone:!1}){return new _(this).toJSON(t,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof b)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(x.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return T.getDOMByEntity(this)}generateAttributeString(...t){var e;const s=new _(this).toCssText({standalone:!0},["textDecoration"]),n=this.annotationMap.get(x.CUSTOM_CLASS),r=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==n?void 0:n.toString(),s?`style="${s}"`:null,...t].filter(o);return r.length?` ${r.join(" ")}`:""}doApply(t){t instanceof A?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const n=T.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}doAnnotationActionApply(t){}doModifyActionApply(t){}}const L=new class{constructor(){this.RTE_BLOCK_DTO_CLASS_MAP=new Map,this.RTE_NODE_DTO_CLASS_MAP=new Map}registerRTEDTOClass(t,e){if(e.prototype instanceof RTEBlock)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof RTENode))throw new Error(`Invalid RTE DTO class type: ${t}`);this.RTE_NODE_DTO_CLASS_MAP.set(t,e)}}getRTEBlockClass(t){return this.RTE_BLOCK_DTO_CLASS_MAP.get(t)}getRTENodeClass(t){return this.RTE_NODE_DTO_CLASS_MAP.get(t)}};class RTEBlock{constructor(t){this.annotationMap=new Map,this.id=t}static from(t,e){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}) is not implemented. Please implement this method in the subclass.`)}static generateBlockChildren(t,e,s){return t.map((t=>{const n=L.getRTEBlockClass(t.type);if(n){const r=n.from(t,e);return r.parent=s,r}})).filter(o)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return N.from(e);case"indent":return R.from(e);case"customAttribute":return C.from(e);case"customClass":return b.from(e);case"customStyle":return k.from(e);case"internalWrapper":return B.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,s])=>{const n=this.createAnnotationEntity(e,s);o(n)&&t.set(...n)}))}shouldRenderAsInternalWrapper(){const t=this.getAnnotationByType(d.INTERNAL_WRAPPER);return!!t&&t.internalWrapper&&0===Array.from(this.annotationMap.values()).filter((t=>!(t instanceof O||t instanceof B))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof S)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(n){if(this.doApply(n),n.isFlushable){const n=T.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}getFirstNode(){if(!this.children||!this.children[0])return null;const t=this.children[0];return t instanceof RTEBlock?t.getFirstNode():t}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){const e=new _(this).toJSON(t);return Object.assign(Object.assign({},e),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof b)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(x.CUSTOM_ATTRIBUTE)}generateAttributeString(...t){var e;const s=new _(this).toCssText({standalone:!0}),n=this.annotationMap.get(x.CUSTOM_CLASS),r=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==n?void 0:n.toString(),s?`style="${s}"`:null,...t].filter(o);return r.length?` ${r.join(" ")}`:""}doApply(t){t instanceof A?y.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();if(e instanceof O||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply)this.doAnnotationActionApply(t);else{const e=y.get(t.constructor.name,this.constructor.name);e&&e.execute(t,this)}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}class D{}class j extends D{constructor(){super(...arguments),this.doSplit=!0}}class I extends p{constructor(t){super(),this.type=u.SELECTION_RANGE,this.range=t}clone(){return new I(this.range)}}const $="700",M="bold",P="italic",H="underline",F="line-through";class J extends v{constructor(t){super(),this.type=g.STRIKETHROUGH,this.strikethrough=t}static from(t){return[g.STRIKETHROUGH,new J(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new J(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 K extends v{constructor(t){super(),this.type=g.UNDERLINE,this.underline=t}static from(t){return[g.UNDERLINE,new K(t)]}toJSON(){return{underline:this.underline}}clone(){return new K(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 U extends v{constructor(t){super(),this.type=g.ITALIC,this.italic=t}static from(t){return[g.ITALIC,new U(t)]}toJSON(){return{italic:this.italic}}clone(){return new U(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 W extends v{constructor(t){super(),this.type=g.BOLD,this.bold=t}static from(t){return[g.BOLD,new W(t)]}toJSON(){return{bold:this.bold}}clone(){return new W(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 G extends v{constructor(t,e=!0){super(),this.type=g.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[g.CODE,new G(t,e)]}static getDefaultStyles(){return{fontFamily:"Roboto Mono",whiteSpace:"pre-wrap"}}toJSON(){return{code:this.code}}clone(){return new G(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?G.getDefaultStyles():null}}const z={key:"black",light:"#111128",dark:"#E3E3E8"},V=[z,{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"}],X="",q=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]];class Y extends v{constructor(t){super(),this.type=g.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[g.TEXT_COLOR,new Y(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new Y(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:a.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return V.find((e=>e.key===t))||V[0]}}class Q extends v{constructor(t,e=!0){super(),this.type=g.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[g.LINK,new Q(t,e)]}toJSON(){return{link:this.link}}clone(){return new Q(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class Z extends D{constructor(t,e,s){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=s}toAnnotation(){return new O(this.groupKey)}}class tt extends D{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class et{execute(t,e){return i.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}updateCustomStyleAnnotation(t,e){const s=t.annotationMap.get(x.CUSTOM_STYLE);s&&this.isCustomStyle(s,e)&&t.annotationMap.set(s.type,new k(s.removeStyles(e)))}createNewParagraph(t){const e=L.getRTEBlockClass("paragraph");if(e)return e.from({id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.constructor.name?e:this.getRootContent(e)}isCaretPositionAtBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtBlockEnd(t,e,s){return e.isContentEditable()?this.isCaretPositionAtTextBlockEnd(t,e,s):this.isCaretPositionAtDecoratorBlockEnd(t,e,s)}getDOMByEntity(t){return T.getDOMByEntity(t)}isCaretPositionAtTextBlockEnd(t,e,s){const n=t.children[t.children.length-1];return e===n&&(e.isEmpty()||s===n.text.length)}isCaretPositionAtDecoratorBlockEnd(t,e,s){return e===t.children[t.children.length-1]&&0!==s}isCustomStyle(t,e){return e.some((e=>Object.keys(t.customStyle).includes(e)))}}class st extends A{constructor(t){super(),this.type=E.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class nt extends et{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(u.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 st(n)),n}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const s=e.cloneWithText("");this.setApplyTargetNode(s);const n=e.parent.children.findIndex((t=>t===e));return 0===t||!e.isContentEditable()&&t===n?[s,e]:t===e.text.length||!e.isContentEditable()&&t===n+1?[e,s]:[e.cloneWithText(e.text.substring(0,t)),s,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:s,startOffset:n,endOffset:r}=t;return e!==s||n>0||r<(s.textContent?s.textContent.length:0)}splitTextNode(t,e){const{startContainer:s,endContainer:n,startOffset:r}=t,i=s.parentElement,o=n.parentElement,c=(t,s,n)=>{const r=t.substring(0,s),i=t.substring(s,n),o=t.substring(n);return[e.cloneWithText(r),e.cloneWithText(i),e.cloneWithText(o)]},a=i&&T.getEntityByDOM(i),l=o&&T.getEntityByDOM(o);if(a&&a.id===e.id){const i=s===n?t.endOffset:e.text.length,[o,a,l]=c(e.text,r,i);return this.setApplyTargetNode(a),[o,a,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[s,n,r]=c(e.text,0,t.endOffset);return this.setApplyTargetNode(n),[s,n,r].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}class rt extends j{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new W(this.bold)}}class it extends p{constructor(){super(...arguments),this.type=u.CLEAR_FORMATTING,this.items=[g.BOLD,g.ITALIC,g.UNDERLINE,g.STRIKETHROUGH,g.TEXT_COLOR,g.CODE,x.CUSTOM_STYLE]}}class ot extends j{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new it}}class ct extends j{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new G(this.code)}}class at extends D{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class lt extends j{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new U(this.italic)}}class ht 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,o(n)&&(this.doSplit=n)}toAnnotation(){return new Q(this.link)}}class ut extends j{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new J(this.strikethrough)}}class dt extends j{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new K(this.underline)}}class pt extends et{handleAction(t,e){const s=t.toAnnotation();if(t instanceof at)e.annotationMap.delete(t.annotationType);else{if(!(s instanceof it))return s instanceof v||s instanceof I?(t instanceof ht&&(o(t.newText)&&(e.text=t.newText),e.parent.apply(new Z(t.link.groupKey,[e],t.type))),t instanceof ct&&this.handleAction(new ot,e),t instanceof rt&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof lt&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof dt||t instanceof ut)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(s.type,s)):void 0;s.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class ft extends A{constructor(){super(...arguments),this.type=E.DELETE_LINK_GROUP}}class Tt extends et{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new ft)}}class Et extends A{constructor(t){super(),this.type=E.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class xt extends et{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,s){if(e&&e.startContainer&&e.endContainer){const{startContainer:n,endContainer:r,startOffset:i,endOffset:o}=e;let c=s.text;if(n===r&&i===o&&t)c=s.text.slice(0,i)+t+s.text.slice(i);else{const e=n.parentElement,a=r.parentElement,l=e&&T.getEntityByDOM(e),h=a&&T.getEntityByDOM(a);let u=0,d=s.text.length;l&&l===s?(u=i,d=n===r?o:d):h&&h===s&&(d=o),c=s.text.slice(0,u)+t+s.text.slice(d)}s.apply(new Et(c))}}}class gt extends p{constructor(t){super(),this.type=g.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:s,customStyle:n,customClass:r,customAttribute:i}=t,o=new gt(e);return o.child=s?gt.from(s)[1]:void 0,o.customAttribute=i?C.from(i)[1]:void 0,o.customClass=r?b.from(r)[1]:void 0,o.customStyle=n?k.from(n)[1]:void 0,[g.INLINE_HTML,o]}clone(){var t,e,s,n;const r=new gt(this.htmlTag);return r.child=null===(t=this.child)||void 0===t?void 0:t.clone(),r.customAttribute=null===(e=this.customAttribute)||void 0===e?void 0:e.clone(),r.customClass=null===(s=this.customClass)||void 0===s?void 0:s.clone(),r.customStyle=null===(n=this.customStyle)||void 0===n?void 0:n.clone(),r}toJSON(){var t,e,s,n;return{inlineHtml:l({htmlTag:this.htmlTag,child:null===(t=this.child)||void 0===t?void 0:t.toJSON().inlineHtml,customAttribute:null===(e=this.customAttribute)||void 0===e?void 0:e.toJSON().customAttribute,customClass:null===(s=this.customClass)||void 0===s?void 0:s.toJSON().customClass,customStyle:null===(n=this.customStyle)||void 0===n?void 0:n.toJSON().customStyle})}}}class wt extends et{handleAction(t,e){const s=e.parent.getAnnotationByType(u.LINK_GROUP);if(s){const n=e.annotationMap.get("LINK").link.groupKey,r=s.linkGroups.get(n);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),s.linkGroups.set(n,r))}}}}class At extends et{handleAction(t,e){const s=e.parent.getAnnotationByType(u.LINK_GROUP);if(s){const t=e.annotationMap.get(g.LINK).link.groupKey,n=s.linkGroups.get(t);if(n){const r=n.indexOf(e);-1!==r&&n.splice(r,1),0===n.length&&s.linkGroups.delete(t),0===s.linkGroups.size&&e.parent.annotationMap.delete(u.LINK_GROUP)}}e.annotationMap.delete(g.LINK)}}class Ot extends v{constructor(t){super(),this.type=g.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[g.PLAIN_TEXT,new Ot(t)]}clone(){return new Ot(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class Nt extends j{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new Y(this.textColor)}}class RTETextNode extends RTENode{constructor(t,e,s,n){super(t,n),this.type=w.TEXT,this.parent=s,this.text=e,this.registerModifyStrategy()}static supportsHtmlTag(t){return["span","code"].includes(t)}static from(t,e,s={autoMatchFormat:!0}){const n=new RTETextNode(t.id,t.text,e),{annotations:r}=t;return r&&(n.annotationMap=this.generateTextAnnotationMap(r,s,e,n)),n}static generateTextAnnotationMap(t,e,s,n){return new Map(Object.keys(t).map((r=>("link"===r&&t.link&&s&&n&&s.apply(new Z(t.link.groupKey,[n],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(o))}static createAnnotationEntity(t,e,s){const n=!(!s||!s.autoMatchFormat);switch(t){case"bold":return W.from(e);case"italic":return U.from(e);case"underline":return K.from(e);case"strikethrough":return J.from(e);case"code":return G.from(e,n);case"textColor":return Y.from(e);case"link":return Q.from(e,n);case"inlineHtml":return gt.from(e);case"plainText":return Ot.from(e)}return RTENode.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof S||t instanceof gt)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}toHtml(){const t=this.getAnnotationByType(g.INLINE_HTML);return t?this.renderWithWrapperStr(t):this.renderTextStr()}cloneWithText(t){return new RTETextNode(c(),t,this.parent,super.cloneAnnotations())}clone(t){return new RTETextNode(this.id,this.text,t,super.cloneAnnotations())}isEmpty(){return!this.text||""===this.text||"\n"===this.text}isTextNode(){return!0}getRangeEndOffset(){return!this.isContentEditable()&&this.parent?this.parent.children.indexOf(this)+1:"\n"===this.text?0:this.text.length}getRangeContainer(){const t=this.getElementRef();if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}registerModifyStrategy(){const t=this.constructor.name;RTETextNode.registerActionStrategyStatus[t]||(this.isContentEditable()&&(y.register(E.UPDATE_TEXT,t,new Tt),y.register(E.REPLACE_SELECTED_TEXT,t,new xt),y.register(E.LINK_GROUP_NODE_SPLIT,t,new wt),y.register(ht.name,t,new pt)),y.register(j.name,t,new nt),y.register(E.DELETE_LINK_GROUP,t,new At),y.register(rt.name,t,new pt),y.register(ot.name,t,new pt),y.register(lt.name,t,new pt),y.register(dt.name,t,new pt),y.register(Nt.name,t,new pt),y.register(ut.name,t,new pt),y.register(ct.name,t,new pt),y.register(D.name,t,new pt),RTETextNode.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(u.SELECTION_RANGE);if(t instanceof j&&t.doSplit&&e){const e=y.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){y.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof tt)return void this.syncUpSelectedNodes(t);s instanceof I||this.syncUpSelectedNodes(t);const n=y.get(e.constructor.name,t.constructor.name);if(n)return void n.execute(e,t);const r=y.get(D.name,RTETextNode.name);r&&r.execute(e,t)}syncUpSelectedNodes(s){const r=this.getElementRef();if(r){const i=e.getSubjectFromParentNodeByEventId(r,n);i&&t.notify(i,{node:s})}}renderWithWrapperStr(t){const{htmlTag:e,customAttribute:s,customClass:n,customStyle:r,child:i}=t,c=[...(null==s?void 0:s.toString())||[],null==n?void 0:n.toString(),null==r?void 0:r.toString()].filter(o),a=c.length>0?` ${c.join(" ")}`:"";return i?`<${e}${a}>${this.renderWithWrapperStr(i)}</${e}>`:`<${e}${a}>${this.renderTextStr()}</${e}>`}renderTextStr(){var t;const e=(null===(t=this.getAnnotationByType(g.CODE))||void 0===t?void 0:t.code)?"code":"span",s=super.generateAttributeString();return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${e}${s}>${this.text}</${e}>`}shouldRenderAsPlainText(){const t=super.getAnnotationByType(g.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof v&&!(t instanceof Q)&&!(t instanceof Ot)||t instanceof S)).length}}RTETextNode.registerActionStrategyStatus={},RTETextNode.htmlTag="span";class Rt extends A{constructor(t){super(),this.type=E.APPEND_CHILDREN,this.entityToBeAppended=t}}class mt extends f{constructor(t){super(),this.type=d.TEXT_STYLE,this.textStyle=t}static from(t){return[d.TEXT_STYLE,new mt(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 mt(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?mt.getDefaultStyles(this.textStyle):null}}class yt extends D{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new mt(this.textStyle)}}class St extends et{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new rt(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new at(g.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}class Ct extends A{constructor(t,...e){super(),this.type=E.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class bt extends A{constructor(t){super(),this.type=E.REPLACE_CHILD_NODES,this.newChildNodes=t}}class kt extends et{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 bt(e));const c=s.cloneWithNodes(o);return s.parent.apply(new Ct(s,c)),c}}}}class Bt extends et{handleAction(t,e){e.children=[],e.apply(new Rt(t.newChildNodes))}}class vt extends A{constructor(t){super(),this.type=E.DELETE_CHILDREN,this.entityToBeRemoved=t}}class _t extends et{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 Rt(t)),s.parent.apply(new vt(s))}}}class Lt extends et{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new RTETextNode(c(),"\n",s),r=t.text.slice(0,e),i=t.text.slice(e),o=s.children.indexOf(t);if(o>-1){const e=s.children.slice(0,o),c=s.children.slice(o+1);r&&e.push(t.cloneWithText(r)),i&&c.unshift(t.cloneWithText(i)),this.mergeLineBreakNodes(e,n,c,s)}return n}}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new RTETextNode(c(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new bt([...t,e,...s]))}}class Dt extends et{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new RTETextNode(c(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,r,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new vt(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new RTETextNode(c(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new bt([...t,e,...s]))}}class jt extends A{constructor(t,...e){super(),this.type=E.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class It extends A{constructor(t,e){super(),this.type=E.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class $t extends D{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new N(this.textAlign)}}class Mt extends et{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class Pt extends D{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new R(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([mt.from(e)]):new Map([mt.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var s,n;const r=new RTETextBlock(t.id,t.type,e),i=e.autoMatchFormat?Object.assign(Object.assign({},t.annotations),{textStyle:null!==(n=null===(s=t.annotations)||void 0===s?void 0:s.textStyle)&&void 0!==n?n:r.type}):t.annotations;return r.children=t.nodes.map((t=>{const s=L.getRTENodeClass(t.type);if(s)return s.from(t,r,e)})).filter(o),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?mt.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 ht&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(g.LINK),r=s.getAnnotationByType(g.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,s]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}toHtml(){const t=this.getBlockTag(),e=super.generateAttributeString(),s=this.getChildrenHtml();return super.shouldRenderAsInternalWrapper()?s:[`<${t}${e}>`,s,`</${t}>`].join("")}cloneWithNodes(t){const e=new RTETextBlock(c(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Rt(t)),e}clone(t){const e=new RTETextBlock(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.isEmpty()))}getLastNode(){return this.children[this.children.length-1]}getBlockTag(){switch(this.type){case"title":case"subtitle":return"div";case"heading-1":return"h1";case"heading-2":return"h2";case"heading-3":return"h3";case"heading-4":return"h4";case"heading-5":return"h5";case"heading-6":return"h6";case"paragraph":default:return"p"}}getChildrenHtml(){const t=this.getAnnotationByType(u.LINK_GROUP);let e=this.children.map((t=>t.toHtml())).join("");return t&&this.children.length>0&&(e=this.generateLinkHtml(t,e)),e}doAnnotationActionApply(t){const e=y.get(t.constructor.name,RTETextBlock.name);e&&e.execute(t,this)}generateLinkHtml(t,e){e="";let s=[];for(let n=0;n<this.children.length;n++){const r=this.children[n].getAnnotationByType(g.LINK),i=this.children[n+1]?this.children[n+1].getAnnotationByType(g.LINK):null;if(r){if(s.push(this.children[n]),!i||r.link.groupKey!==i.link.groupKey){const n=t.toString(r,{standalone:!0});e+=[`<a${n?` ${n}`:""}>`,s.map((t=>t.toHtml())).join(""),"</a>"].join(""),s=[]}}else e+=this.children[n].toHtml()}return e}}y.register(yt.name,RTETextBlock.name,new St),y.register($t.name,RTETextBlock.name,new Mt),y.register(Pt.name,RTETextBlock.name,new class extends et{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),y.register(Z.name,RTETextBlock.name,new class extends et{handleAction(t,e){let s=e.getAnnotationByType(u.LINK_GROUP);if("update_link"===t.type){if(s){const e=s.linkGroups.get(t.groupKey);e&&s.linkGroups.set(t.groupKey,[e[0]])}}else{if(s){const e=s.linkGroups.get(t.groupKey)||[];s.linkGroups.set(t.groupKey,[...e,...t.nodes])}else s=t.toAnnotation(),s.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(u.LINK_GROUP,s)}}}),y.register(E.UNLINK_LINK_GROUP,RTETextBlock.name,new class extends et{handleAction(t,e){const s=e.getAnnotationByType(u.LINK_GROUP);s&&(s.linkGroups.size>1?s.linkGroups.delete(t.groupKey):e.annotationMap.delete(u.LINK_GROUP))}}),y.register(E.SPLIT_BLOCK_WITH_NODE,RTETextBlock.name,new kt),y.register(E.REPLACE_CHILD_NODES,RTETextBlock.name,new Bt),y.register(E.MERGE_TWO_BLOCKS_NODES,RTETextBlock.name,new _t),y.register(E.LINE_BREAK_SINGLE_BLOCK,RTETextBlock.name,new Lt),y.register(E.LINE_BREAK_MULTIPLE_BLOCKS,RTETextBlock.name,new Dt),y.register(E.INSERT_IMAGE_TO_BLOCK,RTETextBlock.name,new class extends et{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,s,n))e.parent.apply(new Ct(e,r));else if(this.isCaretPositionAtBlockStart(e,s,n))e.parent.apply(new jt(e,r));else{const t=new It(s,n);e.apply(t),e.parent.apply(new Ct(e,r))}}}),y.register(E.TRANSFORM_LIST_BLOCK,RTETextBlock.name,new class extends et{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 Rt(i)),s.apply(new Ct(t.selectedBlocks[0],n)),r.forEach((t=>{t.parent.apply(new vt(t))}))}});class Ht extends et{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 Ft extends A{constructor(t,e){super(),this.isFlushable=!0,this.type=E.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class Jt extends D{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new I(this.range)}}class RTEDecoratorNode extends RTENode{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(RTEDecoratorNode.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${RTEDecoratorNode.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=this.getElementRef();if(t)return h(t,`.${RTEDecoratorNode.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}RTEDecoratorNode.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",RTEDecoratorNode.DECORATOR_NODE_CLASS="v-internal-decorator-node";class RTECodeBlockNode extends RTEDecoratorNode{constructor(t,e,s,n){super(t),this.type=w.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}toHtml(){return`<code style='box-sizing: border-box;color: rgba(var(--v-text-primary, 32, 54, 69, 1));text-align: left;font-family: "Roboto Mono";font-weight: 400;line-height: 22px;font-size: 16px;white-space: pre-wrap;min-height: 22px;tab-size: 2px;'>${this.text}</code>`}clone(t){return new RTECodeBlockNode(this.id,this.text,this.language,t)}doAnnotationActionApply(t){y.executeTheStrategy(t,this)}doModifyActionApply(t){y.executeTheStrategy(t,this)}}y.register(E.UPDATE_CODE_BLOCK,RTECodeBlockNode.name,new class extends et{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),y.register(Jt.name,RTECodeBlockNode.name,new class extends et{handleAction(t,e){e.annotationMap.set(u.SELECTION_RANGE,t.toAnnotation())}});var Kt;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(Kt||(Kt={}));class Ut extends et{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 vt(e)))}}class RTECodeBlock extends RTEBlock{constructor(t,e,s){super(t),this.type="code-block",this.children=[new RTECodeBlockNode(`${t}-1`,e,s,this)]}static from(t){return new RTECodeBlock(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}toHtml(){const{language:t=Kt["Plain Text"]}=this.children[0];return`<pre data-language="${t}" style="background-color: rgba(var(--v-bg-secondary, 245, 247, 247, 1)); padding: 12px">${this.children.map((t=>t.toHtml()))}</pre>`}clone(t){const e=RTECodeBlock.from(this.toJSON());return e.parent=t,e}apply(n){if(n instanceof A&&y.executeTheStrategy(n,this),n.isFlushable){const n=T.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(u.SELECTION_RANGE)}}y.register(E.DELETE_CODE_BLOCK,RTECodeBlock.name,new class extends Ht{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 vt(e));const i=t?T.getDOMByEntity(t):null;if(0===n.children.length){const s=RTETextBlock.from({id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:""}]});e.parent.apply(new Rt([s])),t=s.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(s,r,i,o){const c=T.getDOMByEntity(o);if(c){const o=e.getSubjectFromParentNodeByEventId(c,n);o&&t.notify(o,{node:s,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),y.register(E.DELETE_CHILDREN,RTECodeBlock.name,new Ut),y.register(E.SWITCH_OUT_FROM_CODE_BLOCK,RTECodeBlock.name,new class extends et{handleAction(s,r){const{content:i,language:o}=s,a=i.split("\n"),l=new Ft(a.slice(0,a.length-2).join("\n"),o);l.isFlushable=!1,r.children[0].apply(l);const h=RTETextBlock.from({id:c(),type:"paragraph",nodes:[{id:c(),text:"",type:"text"}]});r.parent.apply(new Ct(r,h));const u=T.getDOMByEntity(r);if(u){const s=e.getSubjectFromParentNodeByEventId(u,n);s&&t.notify(s,{node:h.children[0]})}}}),y.register(E.INSERT_IMAGE_TO_BLOCK,RTECodeBlock.name,new class extends et{handleAction(t,e){e.parent.apply(new Ct(e,t.imageBlockToBeInserted))}}),RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{mt as $,y as A,f as B,x as C,g as D,RTEDecoratorNode as E,w as F,S as G,$t as H,Ct as I,bt as J,It as K,Ht as L,A as M,v as N,Ut as O,M as P,$ as Q,L as R,tt as S,yt as T,Et as U,q as V,V as W,z as X,P as Y,F as Z,H as _,m as a,N as a0,G as a1,O as a2,Kt as a3,X as a4,ht as a5,Ft as a6,Jt as a7,Nt as a8,RTECodeBlockNode as a9,rt as aa,lt as ab,dt as ac,W as ad,ot as ae,ct as af,ut as ag,Pt as ah,RTETextNode as b,RTEBlock as c,RTETextBlock as d,_ as e,et as f,Rt as g,RTENode as h,jt as i,u as j,E as k,D as l,vt as m,C as n,St as o,Mt as p,Lt as q,Dt as r,T as s,kt as t,Bt as u,_t as v,d as w,k as x,b as y,RTECodeBlock as z}
|
package/dist/vega/p-6c5250b3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t}from"./p-8b5d3a52.js";import{a as e,g as n,D as s,f as o,r as i}from"./p-dcd18ab1.js";import{L as r,I as a}from"./p-6e1ab235.js";import{I as l,c}from"./p-593e0f80.js";import{I as h}from"./p-781fd6e0.js";import{c as d}from"./p-6a334573.js";import{P as u}from"./p-81dd00d0.js";import{i as p}from"./p-3d2d267d.js";import{V as f}from"./p-82016096.js";import{R as g,E as b,h as w,U as y,V as m,B as v,a as C,I as x,b as T,c as E,P as S,A as k,d as A}from"./p-559197f8.js";import{s as R,A as O,a as I,R as L,M as B,b as j,c as N,d as _,e as M,f as D,I as V,g as P,h as H,i as F,j as K,k as $,B as z,l as W,m as G,C as U,n as Z}from"./p-68124bc5.js";import{i as J}from"./p-c6d62f0d.js";import{R as X}from"./p-fcabf0dc.js";import{V as q}from"./p-a7b5f497.js";import{V as Q}from"./p-e1fbfd20.js";import{v as Y}from"./p-4866e390.js";import{D as tt,d as et}from"./p-878851f6.js";import{V as nt,a as st,b as ot,c as it}from"./p-c5eb0fa6.js";import{R as rt,a as at,S as lt,T as ct,b as ht,C as dt,M as ut,c as pt,d as ft,e as gt,f as bt,g as wt,h as yt,i as mt,j as vt,k as Ct,l as xt,m as Tt,n as Et,o as St,p as kt,q as At,s as Rt,r as Ot,t as It,I as Lt,u as Bt,v as jt,w as Nt,x as _t,y as Mt,z as Dt,A as Vt,B as Pt,D as Ht,E as Ft,F as Kt,G as $t,H as zt,J as Wt,K as Gt,L as Ut,N as Zt,O as Jt,P as Xt,Q as qt,U as Qt,W as Yt,X as te,Y as ee}from"./p-02578a59.js";import{r as ne}from"./p-77e64f26.js";import{V as se,a as oe,b as ie}from"./p-33860e54.js";import{V as re}from"./p-8ac2d165.js";import{t as ae}from"./p-b75ee3ba.js";import{p as le}from"./p-0c667d6a.js";import{c as ce}from"./p-a841cf13.js";import{C as he}from"./p-2d0d575f.js";import{d as de}from"./p-1bc5b3bc.js";const ue=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaLoaderController is called",canAccept:(t,e)=>"VegaLoaderController"===t&&"load"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaLoaderController is called",canAccept:(t,e)=>"VegaLoaderController"===t&&"close"===e,payloadValue:()=>!0}];class pe{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(pe,["load","close"],ue)}load(t={}){let e=t.containerSelector||"body",n=document.querySelector(e);if(n&&pe.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY.includes(n.tagName)&&(e="body",n=document.querySelector("body")),!n)return r.error("Container is not found by selector: ",e),null;const s=this.createLoadingIndicator(t.indicatorOptions),o=this.createLoader(e);return o.append(s),this.appendLoader(o,n)}close(t){const e=this.findLoader(t);if(e){if(e.dataset.container){const t=document.querySelector(e.dataset.container);t&&t.dataset.vegaLoaderOriginPosition&&(t.style.position=t.dataset.vegaLoaderOriginPosition)}e.remove()}}findLoader(t){var e,n;let s;if(t.includes(">>>")){const[o,i]=t.split(">>>");s=null===(n=null===(e=document.querySelector(o))||void 0===e?void 0:e.shadowRoot)||void 0===n?void 0:n.getElementById(i)}else s=document.getElementById(t);return s}createLoader(n){const s=document.createElement("vega-loader-wrapper");return s.className=e(["body"===n?"fixed-wrapper":"absolute-wrapper"]),s.dataset.container=n,s.id=`vega-loader-${t()}`,s}createLoadingIndicator(t={}){const e=document.createElement("vega-loading-indicator");return Object.assign(e,t),e}appendLoader(t,e){return e.dataset.vegaLoaderOriginPosition=e.style.position,e.style.position="relative",e.shadowRoot?(e.shadowRoot.append(t),`${t.dataset.container}>>>${t.id}`):(e.append(t),t.id)}}pe.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY=["VEGA-MODAL"],function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],pe.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const fe=new pe,ge=[{payloadKey:"IS_OPEN_METHOD_CALLED",payloadDescription:"Indicate if the method open of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"open"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"close"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSEALL_METHOD_CALLED",payloadDescription:"Indicate if the method closeAll of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"closeAll"===e,payloadValue:()=>!0}];var be=function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r};class we{constructor(){this.resizeObserverSlimmer=d(we,u,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{var e;!(t[0].contentRect.height>0)&&(null===(e=this.container)||void 0===e?void 0:e.classList.contains("hydrated"))&&(h.removeZIndex(this.container,"top"),this.container.remove(),this.container=null)},target:()=>this.container}]),this.vegaPublicAPIRuntimeMetricsSlimmer=c(we,["open","close","closeAll"],ge)}async open(t){const e=this.createPageNotification(t);return this.getContainer().append(e),e.id}async closeAll(){this.container&&Array.from(this.container.children).forEach((t=>{t.close()}))}async close(t){await document.getElementById(t).close()}connectResizeObserver(){}createPageNotification(e){const o=document.createElement("vega-page-notification");return Object.keys(e).forEach((t=>{void 0!==e[t]&&(o[t]=e[t])})),o.style.marginBottom=n()===s.MOBILE?"12px":"16px",o.id=`vega-page-notification-${t()}`,o}getContainer(){return this.container||(this.container=document.createElement("vega-page-notification-list"),h.setZIndex(this.container,"top"),n()===s.MOBILE?this.container.classList.add("vega-page-notification-list-bottom"):this.container.classList.add("vega-page-notification-list-topRight"),document.body.append(this.container),this.connectResizeObserver()),this.container}}be([a()],we.prototype,"resizeObserverSlimmer",void 0),be([l()],we.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const ye=new we,me=[{payloadKey:"IS_SETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method setSemantics of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:()=>!0},{payloadKey:"IS_GETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method getSemantics of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"getSemantics"===e,payloadValue:()=>!0},{payloadKey:"IS_GETENABLEDEVENTIDSBYCOMPONENT_METHOD_CALLED",payloadDescription:"Indicate if the method getEnabledEventIdsByComponent of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"getEnabledEventIdsByComponent"===e,payloadValue:()=>!0},{payloadKey:"globalEventIsNative",payloadDescription:"Indicate if the vega components will emit events without the vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>!(!t.global||"native"!==t.global.namespace)},{payloadKey:"eventOfSpecificComponentsIsNative",payloadDescription:"Indicate if the vega components will emit events with the vega prefix, but special components will emit events without vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.components){const t=Object.keys(e.components);return!!(t.length>0&&"native"===e.components[t[0]].namespace)}return!1}},{payloadKey:"eventOfSpecificComponentsIsVega",payloadDescription:"Indicate if the vega components will emit events without the vega prefix, but special components will emit events with vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.global&&e.components){const t=Object.keys(e.components);return!!("native"===e.global.namespace&&t.length>0&&"vega"===e.components[t[0]].namespace)}return!1}},{payloadKey:"globalJqueryDelegatedEventIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>!(!t.global||!0!==t.global.jqueryDelegatedEvent)},{payloadKey:"jqueryDelegatedEventIsCustomStrategy",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;return!!(e.global&&Array.isArray(e.global.jqueryDelegatedEvent)&&e.global.jqueryDelegatedEvent.length>0)}},{payloadKey:"jqueryDelegatedEventOfSpecialComponentsIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.components){const t=Object.keys(e.components);return!!(t.length>0&&!0===e.components[t[0]].jqueryDelegatedEvent)}return!1}}];class ve{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(ve,["setSemantics","getSemantics","getEnabledEventIdsByComponent"],me)}setSemantics(t){p.setSemantics(t)}getSemantics(t){return p.getSemantics(t)}getEnabledEventIdsByComponent(t){return p.getEnabledEventIdsByComponent(t)}}!function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],ve.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ce=new ve,xe=[{payloadKey:"IS_OVERRIDEZINDEXBASICVALUES_METHOD_CALLED",payloadDescription:"Indicate if the method overrideZIndexBasicValues of public API ZIndexManager is called",canAccept:(t,e)=>"VegaZIndexManager"===t&&"overrideZIndexBasicValues"===e,payloadValue:()=>!0},{payloadKey:"zIndexBasicValuesGreatThanTenThousand",payloadDescription:"Indicate if the basic z-index value is great than ten thousand",canAccept:(t,e)=>"VegaZIndexManager"===t&&"overrideZIndexBasicValues"===e,payloadValue:t=>t.base>1e4}];class Te{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Te,["overrideZIndexBasicValues"],xe)}overrideZIndexBasicValues(t){h.overrideZIndexBasicValues(t)}}!function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],Te.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ee=new Te,Se=[{payloadKey:"IS_WAITFORVEGA_METHOD_CALLED",payloadDescription:"Indicate if the method waitForVega of public API WaitForVegaHandler is called",canAccept:(t,e)=>"WaitForVegaHandler"===t&&"handle"===e,payloadValue:()=>!0}];class ke{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(ke,["handle"],Se)}async handle(){return await Promise.all(Array.from(document.querySelectorAll("*:not(.hydrated)")).filter((t=>t.tagName.startsWith("VEGA"))).map((t=>{var e;return null===(e=t.componentOnReady)||void 0===e?void 0:e.call(t)})))}}!function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],ke.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ae=new ke,Re=async()=>Ae.handle(),Oe=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"load"===e,payloadValue:()=>!0},{payloadKey:"IS_UNLOAD_METHOD_CALLED",payloadDescription:"Indicate if the method unLoad of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"unLoad"===e,payloadValue:()=>!0},{payloadKey:"IS_UNLOADALL_METHOD_CALLED",payloadDescription:"Indicate if the method unLoadAll of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"unLoadAll"===e,payloadValue:()=>!0}];class Ie{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Ie,["load","unLoad","unLoadAll"],Oe),this.loaderMap=new Map}load({target:e,type:n="text",width:s,height:o,items:i,layout:r}){const a=Array.from(document.body.querySelectorAll(e)),l=`vega-skeleton-loader-${t()}`,c=[];return a.forEach((t=>{const e=i?i.map(this.createSkeleton):[this.createSkeleton({type:n,width:s,height:o})],a=(r?[this.wrapLayout(e,r)]:e).map((t=>(t.dataset[Ie.LOADER_DATA_SET_KEY]=l,t)));c.push(...a),t.append(...a)})),this.loaderMap.set(l,c),l}unLoad(t){this.loaderMap.has(t)&&(this.loaderMap.get(t).forEach((t=>t.remove())),this.loaderMap.delete(t))}unLoadAll(){for(const t of this.loaderMap.values())t.forEach((t=>t.remove()));this.loaderMap.clear()}createSkeleton(t){const{type:e,width:n,height:s}=t,o=document.createElement("vega-skeleton");return Object.assign(o,{animated:!0,type:e,width:n,height:s}),o}wrapLayout(t,e){const n=document.createElement("vega-flex");return Object.assign(n,Object.assign({className:"vega-skeleton-loader-template-container"},e.props)),Object.assign(n.style,e.style),n.append(...t),n}}Ie.LOADER_DATA_SET_KEY="vegaSkeletonLoaderKey",function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],Ie.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Le=new Ie,Be=[{payloadKey:"IS_INIT_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.init is called",canAccept:(t,e)=>"TranslationController"===t&&"init"===e,payloadValue:()=>!0},{payloadKey:"IS_CHANGE_LANGUAGE_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.changeLanguage is called",canAccept:(t,e)=>"TranslationController"===t&&"changeLanguage"===e,payloadValue:()=>!0}];class je{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(je,["init","changeLanguage"],Be)}get currentLanguage(){return f.currentLanguage}init(t){f.init(t)}changeLanguage(t){f.changeLanguage(t)}}!function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],je.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ne=new je,_e=new class{constructor(){this.extensionContextMap=new WeakMap}setExtensionContext(t){t&&t.host&&this.extensionContextMap.set(t.host,t)}getExtensionContext(t){return t?this.extensionContextMap.get(t):null}};class Me extends q{injectRTEScopeStyles(){return""}render(t,e,n){var s;const o=this.doRender(n,t,e);return this.fallbackRegisterRef(o,t),this.appendChildren((null===(s=o.childrenContainerGetter)||void 0===s?void 0:s.call(o))||o,t,e,n),o}useRef(t){return t[Me.REGISTER_REF_FLAG]=!0,function(e){e&&R.register(e,t)}}getDTORenderer(t){return X.getRTERenderer(t)}getExtensionContext(t){return _e.getExtensionContext(t)}appendChildren(t,e,n,s){Array.isArray(e.children)&&e.children.length&&!t.t&&(t.t=e.children.map((t=>this.renderChildren(t,n,s))).filter(J))}renderChildren(t,e,n){const s=this.getDTORenderer(t.type);if(s)return s.render(t,e,n)}fallbackRegisterRef(t,e){e[Me.REGISTER_REF_FLAG]||!t.o||t.o.ref||(t.o.ref=this.useRef(e))}}Me.REGISTER_REF_FLAG="__registeredRef__";class De{constructor(){this.extensionContext=null,this.hasCustomStylesRenderers=new Set}static registerActionHandleStrategy(t,e,n){O.register(e,t,n)}static registerActionHandlerInterceptor(t,e,n){I.register(e,t,n)}initialExtension(t){this.extensionContext=t,_e.setExtensionContext(t)}destroyExtension(){}collectExtensionRendererStyles(){let t="";return this.hasCustomStylesRenderers.size>0&&this.hasCustomStylesRenderers.forEach((e=>{t+=`${e.injectRTEScopeStyles()}\n`})),t}registerNode(t,e){L.registerRTEDTOClass(t,e)}registerRenderer(t,e){X.registerRTEDTORenderer(t,e),e instanceof Me&&e.injectRTEScopeStyles()&&this.hasCustomStylesRenderers.add(e)}registerToolbarButtonRenderer(t,e){X.registerRTEToolbarButtonRenderer(t,e)}registerBlockBasicStrategies(t){g.registerBlockBasicStrategies(t)}unRegisterStrategy(t,e){O.unregister(t,e)}unRegisterInterceptor(t,e,n){I.unregister(t,e,n)}registerElementToBlockDTOClassStrategy(t){b.registerElementToBlockStrategy(t)}registerElementToNodeDTOClassStrategy(t){b.registerElementToNodeStrategy(t)}getElementToNodeDTOClassStrategies(){return b.getElementToNodeStrategies()}registerAnnotationHandler(t){w.registerHandler(t)}}class Ve{isHidden(t){return t.sourceEditMode}getExtensionContext(t){return _e.getExtensionContext(t)}renderDropdown(t,e,n,s){return t("vega-dropdown",Object.assign({trigger:"click",searchable:!1,maxWidth:"200",itemDisplayRule:"ellipsis",ref:t=>{tt.addUniqueObserverToNode(t,nt,(t=>{this.handleDropdownClick(t.detail,e)}))}},n),s)}renderDropdownListTemplate(t,e){return t("div",{slot:"items",onMouseDown:this.preventDefault,class:"rte-dropdown-list"},[t("style",{nonce:Y.nonce},".rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }"),...e.map((e=>"children"in e?this.renderDropdownGroup(t,e):this.renderDropdownItem(t,e)))])}renderDropdownItem(t,e){return t("vega-dropdown-item",{key:e.key,itemKey:e.key,label:e.label,prefixIcon:e.icon})}renderDropdownGroup(t,e){return t("vega-dropdown-group",{key:e.key,label:e.label,divide:!1},e.children.map((e=>"children"in e?this.renderDropdownGroup(t,e):this.renderDropdownItem(t,e))))}renderButton(t,e,n){const{icon:s,label:o,showArrowIcon:i}=n,r=this.isDisabled(e);return t("vega-rich-text-editor-toolbar-button",{disabled:r,icon:s,hidden:this.isHidden(e),selected:this.isSelected(e),ref:t=>{tt.addUniqueObserverToNode(t,st,(()=>this.handleButtonClick(e)))},onMouseDown:this.preventDefault},[this.renderButtonLabel(t,e,o),i?t("vega-icon",{size:"size-8",color:r?"text-disabled":"text-secondary",style:{marginLeft:"8px"},icon:Q.getIconKey("chevron-down")}):null].filter(J))}renderButtonLabel(t,e,n){return n?t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary"},n):null}isDisabled(t){return t.host.disabled}isSelected(t){return!1}preventDefault(t){t.preventDefault()}getListItemByKey(t,e){for(const n of t)if("children"in n){const t=this.getListItemByKey(n.children,e);if(t)return t}else if(n.key===e)return n;return null}}class Pe extends B{constructor(t,e){super(),this.type="INSERT_TOKEN_NODE",this.rteRange=null,this.actionHandleResult=!1,this.rteRange=t,this.token=e}}class He extends Ve{constructor(t){super(),this.tokenList=[],this.tokenList=t}render(t,e){return this.renderDropdown(t,e,{},[this.renderButton(t,e,{label:"Tokens",showArrowIcon:!0}),this.renderDropdownListTemplate(t,this.tokenList)])}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,[s]=n();return s?t.disabled||!O.canHandle("INSERT_TOKEN_NODE",s.parent):t.disabled}return!1}handleButtonClick(t){}handleDropdownClick(t,e){const n=this.getListItemByKey(this.tokenList,t),{rteRange:s}=e,{startNode:o}=s;if(o&&o.parent){const t=new Pe(s,n);o.parent.apply(t),t.actionHandleResult&&this.flushEditorUI(e)}}flushEditorUI(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,flushValue:n}=e;n(t.value)}}}class RTETokenNode extends j{constructor(t,e,n,s,o){super(t,n,s,o),this.type="token",this.token=e,this.text=n}static from(t,e){const n=new RTETokenNode(t.id,t.token,t.text,e);return t.annotations&&(n.annotationMap=this.generateTextAnnotationMap(t.annotations)),n}toJSON(){const t=super.toJSON();return Object.assign({id:this.id,type:this.type,text:this.text,token:this.token},t.annotations?{annotations:t.annotations}:{})}isContentEditable(){return!1}clone(t){return new RTETokenNode(this.id,this.token,this.text,t,this.annotationMap)}toHtml(){return`<span class="token" contenteditable="false" template-token-key="${this.token}" token-key="${this.token}"${super.generateAttributeString()}>${this.text}</span>`}}class Fe extends Me{doRender(t,e,n){const{id:s,token:o}=e;return t("span",Object.assign(Object.assign({key:s,"template-token-key":o,"token-key":o,contenteditable:"false",style:e.getStyles(),class:`token ${e.getClasses()}`},this.additionalAttributes(e)),{ref:this.useRef(e),onClick:t=>{t.preventDefault(),n&&!1!==n.editable&&this.handleTokenElementClick(t,e,n.host)}}),e.text)}injectRTEScopeStyles(){return"span[token-key]{padding: 0 2px; margin: 0 1px; background-color: rgba(var(--v-bg-status-info, 205,209,211))}"}handleTokenElementClick(t,e,n){t.preventDefault(),n&&n.value.apply(new y(e,void 0,!0))}additionalAttributes(t){const e=t.getCustomAttributesAnnotation();let n={wrapped:"true"};return e&&(n=Object.assign(Object.assign({},n),e.render())),n}}class Ke extends Ve{constructor(t,e,n){super(),this.languageList=[],this.selectedLanguage="Select Language",this.labelRef=null,this.handleDropdownClick=t=>{this.setSelectedLanguage(t),"function"==typeof this.languageChangeCallback&&this.languageChangeCallback(this.selectedLanguage)},this.languageList=t,this.selectedLanguage=n,this.languageChangeCallback=e}setSelectedLanguage(t){this.selectedLanguage=t,this.labelRef&&(this.labelRef.textContent=this.getLanguageLabelByKey(t))}isHidden(){return!1}render(t,e){return this.renderDropdown(t,e,{source:this.languageList},[this.renderButton(t,e,{label:this.getLanguageLabelByKey(this.selectedLanguage),showArrowIcon:!0})])}renderButtonLabel(t,e,n){return t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary",ref:t=>this.labelRef=t},n)}handleButtonClick(t){}getLanguageLabelByKey(t){return this.getListItemByKey(this.languageList,t).label}}class $e extends De{constructor(t,e){super(),this.languageState={selectedLanguage:"",contentMap:{}},this.languageChangeCallBack=t=>{const e=this.languageState.selectedLanguage;this.extensionContext&&e&&(this.languageState.contentMap[e]=this.getRTELatestValue(this.extensionContext.host)),this.languageState.selectedLanguage=t,this.applyLanguageContent(t,this.languageState.contentMap)},e&&(this.languageState=Object.assign(Object.assign({},this.languageState),e)),!this.languageState.selectedLanguage&&t.length>0&&(this.languageState.selectedLanguage=t[0].key),this.languageToolbarButtonRenderer=new Ke(t,this.languageChangeCallBack,this.languageState.selectedLanguage),this.registerToolbarButtonRenderer("languages",this.languageToolbarButtonRenderer)}initialExtension(t){super.initialExtension(t);const{selectedLanguage:e,contentMap:n}=this.languageState;n&&n[e]&&this.applyLanguageContent(this.languageState.selectedLanguage,this.languageState.contentMap)}setState(t){const{selectedLanguage:e,contentMap:n}=t;this.languageToolbarButtonRenderer.setSelectedLanguage(e),this.languageState.selectedLanguage=e,this.languageState.contentMap=Object.assign({},n),this.applyLanguageContent(e,n)}getState(){const{selectedLanguage:t,contentMap:e}=this.languageState;return this.extensionContext&&(e[t]=this.getRTELatestValue(this.extensionContext.host)),this.languageState}applyLanguageContent(t,e){if(this.extensionContext&&e){let n=e[t];const{host:s,flushValue:o}=this.extensionContext;n=n?n instanceof m?n:m.fromJSON(n,s.sourceEditConfig):m.createEmptyContent(),s.value!==n&&o(n,!0)}}getRTELatestValue(t){let e=t.value;if(this.extensionContext&&this.extensionContext.isSourceEditMode()&&t.shadowRoot){const n=t.shadowRoot.querySelector(".source-view-container vega-code-block");n&&(e=m.fromHtml(n.value.code,{autoMatchFormat:t.sourceEditConfig.autoMatchFormat}))}return e}}class ze extends B{constructor(t){super(),this.type="INSERT_FUNCTION_BLOCK",this.functionType=t}}class RTEFunctionBlock extends N{constructor(t){super(t),this.type="function-block",this.children=[]}static from(t,e){const n=new RTEFunctionBlock(t.id),s={customClass:["statement"]};let{annotations:o}=t;return o=o?Object.assign(Object.assign({},o),s):s,super.convertAnnotationsToMap(n.annotationMap,o),n.children=this.generateBlockChildren(t.children,e,n),n}toHtml(){return`<div class="statement">${this.children.map((t=>t instanceof _?`<div class="statementelement"${this.getFunctionContentStyle(t)}>${t.getChildrenHtml()}</div>`:t.toHtml())).join("")}</div>`}clone(e){const n=new RTEFunctionBlock(t());return n.parent=e,n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,children:this.children.map((t=>t.toJSON()))})}getFunctionContentStyle(t){const e=new M(t);let n=e.toCssText({standalone:!0});const s=t.getAnnotationByType("TEXT_STYLE");if(s&&"paragraph"===s.textStyle){const t=e.toCssText(void 0,void 0,s.renderStyle({standalone:!0}));n=n.replace(t,"").trim()}return n?` style="${n}"`:""}}class We extends D{handleAction(t,e){const{functionType:n}=t,s=this.getFunctionBlock(n),o=this.createNewParagraph(""),i=this.getReferenceBlock(e);i?i.parent.apply(new V(i,s,o)):e.apply(new P([s,o])),o&&(t.nextFocusNode=o.children[0])}getFunctionBlock(e){const n=t();return RTEFunctionBlock.from({id:n,type:"function-block",children:[{id:`${n}-1`,type:"logic-control-block",statementText:e.toUpperCase()},{id:`${n}-2`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${n}-2-1`,type:"text",text:" "}]},{id:`${n}-3`,type:"logic-control-block",statementText:"SHOW"},{id:`${n}-4`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${n}-4-1`,type:"text",text:" "}]}]})}getReferenceBlock(t){if(!(t instanceof m)){const e=t.parent;return e instanceof RTEFunctionBlock?e:t}}}class RTELogicControlNode extends H{constructor(t,e,n){super(t),this.type="logic-control-node",this.text="",this.text=e,this.parent=n}clone(){return new RTELogicControlNode(this.id,this.text,this.parent)}toHtml(){return this.text}toJSON(){return{id:this.id,type:this.type,text:this.text}}getRangeEndOffset(){return 1}getRangeContainer(){const t=R.getDOMByEntity(this);if(t)return t.parentElement}isContentEditable(){return!1}}class RTELogicControlBlock extends N{constructor(t,e,n){super(t),this.type="logic-control-block",this.children=[],this.statementText="",this.statementText=e,this.children=[new RTELogicControlNode(`${t}-node-1`,e,this)],n&&(this.parent=n)}static from(t){return new RTELogicControlBlock(t.id,t.statementText)}isNotEmpty(){return!0}getLastNode(){return this.children[this.children.length-1]}toHtml(){return`<div class='statementsyntax' contenteditable='false'>${this.statementText}</div>`}clone(t){return new RTELogicControlBlock(this.id,this.statementText,t)}toJSON(){return{id:this.id,type:this.type,statementText:this.statementText}}}class Ge extends Ve{render(t,e){return this.renderDropdown(t,e,{},[this.renderButton(t,e,{label:"Functions",showArrowIcon:!0}),this.renderDropdownListTemplate(t,Ge.FUNCTION_LIST)])}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,s=n()[0];let o=!0;return s&&(o=O.canHandle("INSERT_FUNCTION_BLOCK",s.parent)),t.disabled||!o}return!1}handleButtonClick(){throw new Error("Method not implemented.")}handleDropdownClick(t,e){if(e){const n=this.getExtensionContext(e.host);if(n){const{host:e,getSelectedNodes:s}=n,o=s()[0],i=new ze(t);o?o.parent&&o.parent.apply(i):e.value.apply(i),i.nextFocusNode&&e.value.apply(new y(i.nextFocusNode,1))}}}}Ge.FUNCTION_LIST=[{key:"IF",label:"Conditional"},{key:"FOREACH",label:"Foreach"}];class Ue extends Me{doRender(t,e){return t("div",{key:e.id,class:"statementsyntax",ref:this.useRef(e)},t("span",{key:`${e.id}-1`,contenteditable:"false",ref:this.useRef(e.children[0])},e.statementText))}}class Ze extends v{constructor(){super(...arguments),this.blockClassName="statementsyntax"}canHandle(t,e){const n=t[e];return n&&n.nodeType===Node.ELEMENT_NODE&&n.classList.contains(this.blockClassName)&&this.isFunctionBlockChild(n)?1:0}handle(e){const n=e[0];return RTELogicControlBlock.from({id:t(),type:"logic-control-block",statementText:n.innerText})}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isFunctionBlockChild(t){return!(!t.parentElement||!t.parentElement.classList.contains("statement"))}}class Je extends Me{doRender(t,e){return t("div",{key:e.id,class:this.getElementClassName(e),ref:this.useRef(e)})}injectRTEScopeStyles(){return"div.statement{padding:2px 4px;background:rgba(var(--v-bg-accent3-secondary, 255, 239, 200));border:1px solid rgba(var(--v-bg-accent3-primary, 255, 220, 131));border-radius:4px;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;gap:4px}div.statement .statementsyntax{padding:3px 0;line-height:22px}.rich-text-content div.statement .statementsyntax,.rich-text-content div.statement .statementelement{display:inline-block}div.statement+div.statement{margin-top:2px}div.statement .statementsyntax span{color:rgb(38, 42, 255);font-weight:bold}div.statement .statementelement{padding:2px 4px;background:rgba(var(--v-bg-secondary, 245, 247, 247));border:1px solid rgba(var(--v-border-color-input-field, 171, 198, 216));border-radius:4px;margin:0;min-width:8px}"}getElementClassName(t){let e=t.getClasses();return e.indexOf("statement")<0&&(e="statement "+e),e.trim()}}class Xe{}class qe extends Xe{canIntercept(t,e){return e.parent&&e.parent instanceof RTEFunctionBlock}intercept(t,e,n){const s=new x(n.children[0],0);s.isFlushable=!0,n.parent.apply(s)}}class Qe extends D{handleAction(t,e){const n=this.createNewParagraph("");n&&(e.parent.apply(new V(e,n)),t.newBlock=n,this.focusToNextLine(n))}focusToNextLine(t){const e=this.getRootContent(t);e&&e.apply(new y(t.children[0],1))}}class Ye extends B{constructor(t,e,n){super(),this.type="PASTE_PLAIN_TEXT",this.blocksToBeInserted=t,this.startNode=e,this.startOffset=n}}class tn extends qe{intercept(t,e,n){const{blocksToBeInserted:s,rteRange:o}=e;let{startNode:i,startOffset:r}=e;o&&(i=o.startNode,r=o.startOffset);const a=new Ye(s,i,r);n.apply(a)}}class en extends D{handleAction(t,e){const{blocksToBeInserted:n,startNode:s,startOffset:o}=t;if(s instanceof j){const t=n.flatMap((t=>t instanceof _?(this.copyLinkGroupAnnotations(e.annotationMap,t.annotationMap),t.children):[]));t.length>0&&(e.apply(o>0?new V(s,...t):new F(s,...t)),this.focusToNextLine(t[t.length-1],t[t.length-1].getRangeEndOffset()))}}focusToNextLine(t,e){const n=this.getRootContent(t);n&&n.apply(new y(t,e))}copyLinkGroupAnnotations(t,e){if(e&&e.has(K.LINK_GROUP)){const n=e.get(K.LINK_GROUP);t.has(K.LINK_GROUP)?n.linkGroups.forEach(((e,n)=>{t.get(K.LINK_GROUP).linkGroups.set(n,e)})):t.set(K.LINK_GROUP,e.get(K.LINK_GROUP))}}}const nn=new Ze,sn=new class extends Ze{constructor(){super(...arguments),this.blockClassName="statementelement"}handle(e,n){const s=w.generate(_,e[0]),o=Array.from(e[0].childNodes);return _.from({id:t(),type:"paragraph",annotations:Object.assign({customClass:[this.blockClassName]},s),nodes:this.generateChildNodes(o,void 0,n)})}},on=new class extends C{canHandle(t,e){const n=t[e];return n&&"DIV"===n.tagName&&n.classList.contains("statement")&&n.childNodes.length&&n.querySelector(".statementsyntax")?1:0}handle(){return RTEFunctionBlock.from({id:t(),type:"function-block",annotations:{customClass:["statement"]},children:[]})}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}};class rn extends De{constructor(){super(),this.toolbarButtonRenderer=new Ge,this.registerBlockBasicStrategies(RTELogicControlBlock.name),this.registerBlockBasicStrategies(RTEFunctionBlock.name),this.preventFunctionBlockDefaultInsertNewParagraph(),this.registerNode("logic-control-block",RTELogicControlBlock),this.registerRenderer("logic-control-block",new Ue),this.registerNode("function-block",RTEFunctionBlock),this.registerRenderer("function-block",new Je),this.registerToolbarButtonRenderer("functions",this.toolbarButtonRenderer),this.registerElementToBlockDTOClassStrategy(nn),this.registerElementToBlockDTOClassStrategy(sn),this.registerElementToBlockDTOClassStrategy(on)}preventFunctionBlockDefaultInsertNewParagraph(){this.unRegisterStrategy($.INSERT_NEW_PARAGRAPH,RTELogicControlBlock.name),this.unRegisterStrategy($.APPEND_CHILDREN,RTEFunctionBlock.name),this.unRegisterStrategy($.INSERT_CHILDREN_AFTER,RTEFunctionBlock.name),this.unRegisterStrategy($.INSERT_CHILDREN_BEFORE,RTEFunctionBlock.name),this.unRegisterStrategy($.PASTE_CONTENT,RTELogicControlBlock.name),De.registerActionHandleStrategy(RTEFunctionBlock.name,$.INSERT_NEW_PARAGRAPH,new Qe)}}(()=>{const t=new We;De.registerActionHandleStrategy(m.name,"INSERT_FUNCTION_BLOCK",t),De.registerActionHandleStrategy(_.name,"INSERT_FUNCTION_BLOCK",t),De.registerActionHandleStrategy(T.name,"INSERT_FUNCTION_BLOCK",t),De.registerActionHandleStrategy(RTELogicControlBlock.name,"INSERT_FUNCTION_BLOCK",t),De.registerActionHandleStrategy(_.name,"PASTE_PLAIN_TEXT",new en),De.registerActionHandlerInterceptor(_.name,$.INSERT_NEW_PARAGRAPH,new qe),De.registerActionHandlerInterceptor(_.name,$.PASTE_CONTENT,new tn)})();class an extends B{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_BLOCK",this.tableBlock=t}}class ln extends z{constructor(){super(...arguments),this.type=rt.CAPTION}clone(){return new ln}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--extension-table-caption"}renderStyle(t){return(null==t?void 0:t.standalone)?{padding:"8px",border:"1px solid #ddd",borderBottom:"none",backgroundColor:this.getCaptionBackgroundColor(),position:"relative",textAlign:"center",minHeight:"22px"}:null}toJSON(){return{caption:{padding:"8px 12px",border:"1px solid #ddd",borderBottom:"none",backgroundColor:this.getCaptionBackgroundColor(),position:"relative",textAlign:"center",minHeight:"22px"}}}getCaptionBackgroundColor(){return re.isDarkMode()?at.dark:at.light}}class RTETableCaptionBlock extends N{constructor(t,e){super(t),this.type="table-caption";const{autoMatchFormat:n}=e||{autoMatchFormat:!0};n&&this.annotationMap.set(rt.CAPTION,new ln)}static from(t,e){const n=new RTETableCaptionBlock(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new RTETableCaptionBlock(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.isNotEmpty()))}toHtml(){const t=this.children.map((t=>t.toHtml())).join("");return`<caption${super.generateAttributeString()}>${t}</caption>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}O.register($.INSERT_CHILDREN_BEFORE,RTETableCaptionBlock.name,new E),O.register($.PASTE_CONTENT,RTETableCaptionBlock.name,new S);class cn extends B{constructor(t){super(),this.type="TOGGLE_TABLE_CAPTION",this.isFlushable=!0,this.shouldEnable=t}}class hn extends lt{canHandle(t){return t[0]===ct.CAPTION}execute(t,e,n){const s="rte-table-caption"===t[1],o=new cn(s),i=n.getCaption();if(s){const t=i&&i.isNotEmpty()?i:this.createCaptionBlock(null==i?void 0:i.id);i&&t===i||n.setCaption(t),o.nextFocusNode=t.getLastNode()}else i&&(n.setCaption(null),o.nextFocusNode=n.getFirstNode());this.syncCursorPosition(n,o.nextFocusNode)}syncCursorPosition(t,e){super.syncCursorPosition(t,e)}createCaptionBlock(e){const n={id:null!=e?e:t(),type:"table-caption",children:[{id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]}]};return RTETableCaptionBlock.from(n)}}class dn{constructor(t){this.renderContext=t}getTableExtensionContext(){return this.renderContext?_e.getExtensionContext(this.renderContext.host):null}}class un extends dn{constructor(){super(...arguments),this.settingHandlers=[new ht,new hn,new dt,new ut,new pt],this.handleTableClick=(t,e)=>{const n=t.target.closest("table");if(e!==n)return this.popoverRef.hide(),void this.tableDynamicPopover.hide();this.tableDynamicPopover.hide(),this.popoverShow||(ne.call(et.getSubject(this.popoverRef,se),n),this.popoverRef.show())},this.syncSelectedCells=()=>{if(this.tableSettingRef){const t=this.getTableSelectedCells();this.tableSettingRef.selectedCells=t}},this.handleSettingMenuClick=t=>{const e=this.settingHandlers.find((e=>e.canHandle(t.detail)));if(e){const n=this.getTableExtensionContext();n&&e.execute(t.detail,n,this.tableData),t.detail[0]===ct.CAPTION&&this.updateTableSettingCaption()}t.detail[0]!==ct.TABLE&&t.detail[0]!==ct.CELL||(this.popoverRef.hide(),this.tableDynamicPopover.show(t.detail[0]))},this.handleTableSettingPopoverShow=()=>{this.syncSelectedCells(),this.popoverShow=!0}}render(t,e,n,s){return this.tableData=e,this.tableDynamicPopover=s,t("vega-popover",{trigger:"click",isScreenPosition:!0,class:"rte-table-setting-popover",ref:t=>{this.popoverRef=t,this.popoverRef&&(tt.addUniqueObserverToNode(t,ot,this.handleTableSettingPopoverShow),tt.addUniqueObserverToNode(t,it,(()=>this.popoverShow=!1)))}},[t("div",{slot:"popover"},[t("vega-rich-text-table-setting",{ref:t=>{this.tableSettingRef=t,t&&(t.target=n())},selectedCells:this.getTableSelectedCells(),onVegaClick:this.handleSettingMenuClick})])])}updateTableSettingCaption(){const t=this.tableData.hasCaption();this.tableSettingRef&&this.tableSettingRef.hasCaption!==t&&(this.tableSettingRef.hasCaption=t)}getTableSelectedCells(){let t=[];const e=this.getTableExtensionContext();if(e&&e.tableSelection){const{tableSelection:n}=e;t=n.getSelectedCells()}return t}}class pn{static generateTablePropertiesForm(t){const e=t.annotationMap.get(rt.TABLE);let n={borderStyle:"none",borderColor:"",borderWidth:"",backgroundColor:"",width:"",height:"",textAlign:"center"};if(e){const t=e.toJSON().table,{style:s="none",color:o="",width:i=""}=t.border||{style:"none",color:"",width:""};n={backgroundColor:t.backgroundColor||"",width:t.width||"",height:t.height||"",textAlign:t.alignment,borderStyle:s,borderColor:o,borderWidth:i}}return n}updateCursorPosition(t,e){t&&e&&t.host.value.apply(new y(e,0))}}class fn extends W{constructor(t){super(),this.isFlushable=!0;const{textAlign:e,width:n,borderWidth:s,borderColor:o,borderStyle:i,height:r}=t,a=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(n[s[o]]=t[s[o]])}return n}(t,["textAlign","width","borderWidth","borderColor","borderStyle","height"]);this.tableProperties=Object.assign(Object.assign({},a),{alignment:e,border:{style:i,color:o,width:s?le(s):""},width:n?le(n):"",height:r?le(r):""})}toAnnotation(){return new ft(this.tableProperties)}}class gn extends pn{handle(t,e,n,s){e.apply(new fn(n)),this.updateCursorPosition(t,s)}}class bn extends pn{handle(t,e,n,s){t&&t.host&&(t.flushValue(t.host.value),this.updateCursorPosition(t,s))}}class wn extends pn{handle(t,e,n){const s=new fn(n);s.isFlushable=!1,e.apply(s)}}class yn extends W{constructor(t,e){super(),this.isFlushable=!0,this.cellAnnotation=t,this.originAnnotation=e}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}updateOriginAnnotation(){Object.keys(this.cellAnnotation).forEach((t=>{this.originAnnotation[t]=this.cellAnnotation[t]}))}}class mn extends yn{constructor(t,e){super(t,e),this.isFlushable=!0}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}}var vn=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(n[s[o]]=t[s[o]])}return n};class Cn{static getStyleCollectionFromCell(t){return t.reduce(((t,e)=>{const n=e.getAnnotationByType(rt.CELL);if(t[e.id]={},n){const s=n.toJSON().tableCell,{border:o}=s,i=vn(s,["border"]),r={};o&&(r.borderStyle=o.style,r.borderColor=o.color,r.borderWidth=o.width),t[e.id]=ce(Object.assign(Object.assign({},i),r))}return t}),{})}static convertStyleMapToFormField(t){const e={};for(const n in t){const s=t[n];for(const t in s)e[t]?e[t].push(s[t]):e[t]=[s[t]]}const n=Object.keys(t).length,s={};for(const t in e){const o=e[t],i=new Set(o);o.length===n&&1===i.size&&(s[t]=o[0])}return s}applyProperties(t,e,n){t.tableSelection.getSelectedCells().forEach((t=>{const s=e[t.id];if(s){const e=this.convertToVegaTableCellAnnotation(Object.assign({},s));this.applyAnnotation(t,e,n)}}))}updateCursorPosition(t,e){t&&e&&t.host.value.apply(new y(e,0))}convertToVegaTableCellAnnotation(t){const{borderStyle:e,borderWidth:n,borderColor:s}=t,o=vn(t,["borderStyle","borderWidth","borderColor"]),i=ce({style:e,width:n?le(n):"",color:s});return ce(Object.assign(Object.assign({},o),{backgroundColor:o.backgroundColor||"",padding:o.padding?le(o.padding):"",width:o.width?le(o.width):"",height:o.height?le(o.height):"",verticalAlign:o.verticalAlign||"",textAlign:o.textAlign||"",border:i}))}applyAnnotation(t,e,n){const s=t.getAnnotationByType(rt.CELL)||new gt({},!1),o=t instanceof bt?new mn(e,s):new yn(e,s);o.isFlushable=n,t.apply(o)}}class xn extends Cn{handle(t,e,n){t&&t.host&&(t.flushValue(t.host.value),this.updateCursorPosition(t,n))}}class Tn extends Cn{handle(t,e){this.applyProperties(t,e,!1)}}class En extends Cn{handle(t,e,n){this.applyProperties(t,e,!0),this.updateCursorPosition(t,n)}}class Sn extends dn{constructor(t,e){super(e),this.tableColorSchema=[],this.popoverCloseType="none",this.tablePropertiesHandlerMap={save:new bn,cancel:new gn,change:new wn},this.cellPropertiesHandlerMap={save:new xn,cancel:new En,change:new Tn},this.handleTablePropertiesUpdate=t=>{const e=t.type.replace("vega","").toLowerCase();this.popoverCloseType=e,"change"!==e&&this.hide();const n=this.getTableExtensionContext();n&&this.tablePropertiesHandlerMap[e].handle(n,this.currentTableBlock,t.detail,this.currentFocusNode),"change"===e&&this.popoverRef&&this.popoverRef.show(!0)},this.handleCellPropertiesUpdate=t=>{const e=t.type.replace("vega","").toLowerCase();this.popoverCloseType=e,"change"!==e&&this.hide();const n=this.getTableExtensionContext();n&&this.cellPropertiesHandlerMap[e].handle(n,t.detail,this.currentFocusNode),"change"===e&&this.popoverRef&&this.popoverRef.show(!0)},this.tableColorSchema=t}destroy(){this.selectionAnchorRef&&this.selectionAnchorRef.parentNode&&(tt.removeUniqueObserverFromNode(this.selectionAnchorRef,oe),this.selectionAnchorRef.parentNode.removeChild(this.selectionAnchorRef),this.selectionAnchorRef=null)}async show(t){let e=this.getTableRef();const n=this.getTableExtensionContext();let s=[];if(n&&(s=n.tableSelection.getSelectedCells()),t===ct.CELL&&s.length>1){const t=this.getOrCreateSelectionAnchor(s,e);t&&(e=t)}else t===ct.CELL&&1===s.length&&(e=R.getDOMByEntity(s[0]));this.updateContent(t),this.storeCurrentFocusNode(),ne.call(et.getSubject(this.popoverRef,se),e),await this.popoverRef.show()}async hide(){await this.popoverRef.hide()}render(t,e,n){return this.getTableRef=e,this.currentTableBlock=n,t("vega-popover",{trigger:"click",isScreenPosition:!0,class:"rte-table-dynamic-popover",ref:t=>{this.popoverRef=t,tt.addUniqueObserverToNode(t,it,(()=>{const t=this.getTableExtensionContext();"change"===this.popoverCloseType&&t&&t.flushValue(t.host.value)}))}},[t("div",{slot:"popover",class:"rte-table-dynamic-popover-content"},[t("vega-rich-text-table-properties",{ref:t=>this.tablePropertiesFormRef=t,colors:this.tableColorSchema,type:ct.TABLE,onVegaCancel:this.handleTablePropertiesUpdate,onVegaChange:this.handleTablePropertiesUpdate,onVegaSave:this.handleTablePropertiesUpdate}),t("vega-rich-text-table-properties",{ref:t=>this.cellPropertiesFormRef=t,colors:this.tableColorSchema,type:ct.CELL,onVegaCancel:this.handleCellPropertiesUpdate,onVegaChange:this.handleCellPropertiesUpdate,onVegaSave:this.handleCellPropertiesUpdate})])])}updateContent(t){this.popoverCloseType="none";const e=this.getTableExtensionContext();this.tablePropertiesFormRef&&"TABLE"===t?(this.tablePropertiesFormRef.classList.remove("vega-hidden"),this.cellPropertiesFormRef.classList.add("vega-hidden"),this.tablePropertiesFormRef.defaultValue=pn.generateTablePropertiesForm(this.currentTableBlock)):this.cellPropertiesFormRef&&"CELL"===t&&(this.cellPropertiesFormRef.classList.remove("vega-hidden"),this.tablePropertiesFormRef.classList.add("vega-hidden"),e&&(this.cellPropertiesFormRef.styleMap=Cn.getStyleCollectionFromCell(e.tableSelection.getSelectedCells())),this.cellPropertiesFormRef.defaultValue=Cn.convertStyleMapToFormField(this.cellPropertiesFormRef.styleMap)),e&&e.getSelection().removeAllRanges()}storeCurrentFocusNode(){const t=this.getTableExtensionContext();t&&(this.currentFocusNode=t.getSelectedNodes()[0])}getOrCreateSelectionAnchor(t,e){const n=ae();if(n&&e){const s=e.closest(".rich-text-content"),o=s.getBoundingClientRect();let i=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;t.map((t=>R.getDOMByEntity(t))).filter(J).forEach((t=>{const e=t.getBoundingClientRect();i=Math.min(i,e.left-o.left),r=Math.max(r,e.right-o.left),a=Math.min(a,e.top-o.top),l=Math.max(l,e.bottom-o.top)}));const c=r-i,h=l-a;return this.selectionAnchorRef=s.querySelector(".rte-table-selection-popover-anchor"),this.selectionAnchorRef||(this.selectionAnchorRef=n.createElement("div"),this.selectionAnchorRef.className="rte-table-selection-popover-anchor",this.selectionAnchorRef.style.position="absolute",this.selectionAnchorRef.style.pointerEvents="none",s.appendChild(this.selectionAnchorRef),tt.addUniqueObserverToNode(this.selectionAnchorRef,oe,(()=>{this.destroy()}))),this.selectionAnchorRef.style.left=`${i}px`,this.selectionAnchorRef.style.top=`${a}px`,this.selectionAnchorRef.style.width=`${c}px`,this.selectionAnchorRef.style.height=`${h}px`,this.selectionAnchorRef}}}class kn extends Me{doRender(t,e,n){const s=new un(n),o=new Sn(wt.getTableColors(),n);let i;const r=this.renderTable(t,e,(t=>i=t)),a=s.render(t,e,(()=>i),o),l=o.render(t,(()=>i),e),c=e.getAnnotationByType(rt.TABLE),h=n.editable?[t("vega-rich-text-table-selection-widget",{onVegaRemove:t=>{t.stopPropagation(),this.handleTableRemove(e,i)},onClick:t=>s.handleTableClick(t,i),onMouseLeave:()=>{s.syncSelectedCells()}},[t("div",{contentEditable:!0,ref:this.useRef(e)},[r,a,l])])]:[r],d={};if(c){const t=c.renderStyle();d.width=t.width,d.margin=t.margin}const u=t("div",{class:"v-rte--extension-table-container",style:Object.assign({},d)},h);return u.childrenContainerGetter=()=>r,u}injectRTEScopeStyles(){return".v-rte--extension-table-container{display:table}table.v-rte--extension-table{border-collapse:collapse}table.v-rte--extension-table th,table.v-rte--extension-table td{border:1px solid #ddd;padding:12px;text-align:left;vertical-align:middle;min-width:55px;box-sizing:border-box;position:relative}table.v-rte--extension-table th{background-color:#f2f2f2}.rte-table-setting-popover,.rte-table-dynamic-popover{display:block}table.v-rte--extension-table .v-rte-table-cell-focused::after,table.v-rte--extension-table .v-rte-table-cell-selected::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;background-color:rgba(158, 207, 250, 0.3)}table.v-rte--extension-table:has(.v-rte-table-cell-selected){caret-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::selection{background-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::-moz-selection{background-color:transparent}.v-rte--extension-table-caption{padding:8px;border:1px solid #ddd;border-bottom:none;background-color:rgba(var(--v-bg-table-header, 24, 24, 48));position:relative;display:table-caption;caption-side:top;min-height:22px;text-align:center;word-break:break-word;overflow-wrap:break-word}.v-rte--extension-table-caption.showPlaceholder::before{position:absolute;left:0;right:0;content:attr(data-placeholder);font-family:'Inter', sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"}renderTable(t,e,n){var s;return t("table",Object.assign(Object.assign({key:e.id},null===(s=e.getCustomAttributesAnnotation())||void 0===s?void 0:s.render()),{style:e.getStyles(),class:e.getClasses(),ref:t=>{this.useRef(e)(t),n(t)}}))}handleTableRemove(t,e){t.parent.apply(new an(t)),this.destroySelectionAnchor(e)}destroySelectionAnchor(t){const e=t.closest(".rich-text-content");if(e){const t=e.querySelector(".rte-table-selection-popover-anchor");t&&he.notify(et.getSubject(t,oe),{host:t})}}}class An extends Me{doRender(t,e){return t("thead",{key:e.id,ref:this.useRef(e)})}}class Rn extends Me{doRender(t,e){return t("tr",{key:e.id,ref:this.useRef(e)})}}class On extends Me{doRender(t,e,n){return this.renderByCellType(t,e,n,"td")}renderByCellType(t,e,n,s){var o;return t(s,Object.assign(Object.assign(Object.assign({key:`${e.id}-${s}`,ref:this.useRef(e)},null===(o=e.getCustomAttributesAnnotation())||void 0===o?void 0:o.render()),{style:e.getStyles(n),class:e.getClasses()}),n.editable?this.onSelectionListeners(e,n):void 0))}onSelectionListeners(t,e){return{onMouseDown:t=>{const n=o(t.target,"table"),s=o(t.currentTarget,"table")===n,i=t.target.closest("td, th");if(s&&i){const t=this.getExtensionContext(e.host);t&&t.tableSelection.focusCell(i)}},onMouseMove:n=>{n.stopPropagation(),n.preventDefault();const s=this.getExtensionContext(e.host);s&&s.tableSelection.dragOver(t)},onMouseUp:()=>{const t=this.getExtensionContext(e.host);t&&t.tableSelection.endDrag()}}}}class In extends Me{doRender(t,e){return t("tbody",{key:e.id,ref:this.useRef(e)})}}class Ln extends On{doRender(t,e,n){return super.renderByCellType(t,e,n,"th")}}class Bn extends B{constructor(t,e){super(),this.type="INSERT_TABLE_BLOCK",this.rowCount=t,this.columnCount=e}}class jn extends dn{constructor(){super(...arguments),this.hoveredRows=1,this.hoveredCols=1}render(t,e){return t("vega-popover",{trigger:"click",alignment:"start",placement:"bottom",showArrow:!1,ref:t=>{t&&(this.tablePickerPopoverRef=t,tt.addUniqueObserverToNode(t,ot,(()=>{this.resetPicker()})))}},[t("div",{slot:"popover"},[this.generatePickerStyles(t),this.generateTableSizeGrid(t)]),t("div",{slot:"popover-content"},e)])}generateTableSizeGrid(t){const e=[];for(let n=1;n<=10;n++)for(let s=1;s<=10;s++)e.push(t("button",{class:"rte-table-picker__cell","data-row":n,"data-col":s,onMouseenter:this.handlePickerCellHover.bind(this,n,s),onClick:this.handlePickerClick.bind(this,n,s)},[]));return t("div",{class:"rte-table-picker"},[t("div",{class:"rte-table-picker__grid",ref:t=>{t&&(this.tablePickerGridRef=t)},style:{gridTemplateColumns:"repeat(10, 16px)",gridTemplateRows:"repeat(10, 16px)"}},e),t("div",{class:"rte-table-picker__hint"},t("vega-hint",{ref:t=>{t&&(this.selectedHintRef=t)}},[`${this.hoveredRows} × ${this.hoveredCols}`]))])}generatePickerStyles(t){return t("style",{},["\n.rte-table-picker__grid { display: grid; gap: 2px; }\n.rte-table-picker__cell {\n box-sizing: border-box;\n border: 1px solid #ccc;\n background-color: transparent;\n cursor: pointer;\n}\n.rte-table-picker__cell:hover {\n background-color: #cae1fc;\n}\n.rte-table-picker__cell.active {\n background-color: #cae1fc;\n}\n.rte-table-picker__hint {\n text-align: center;\n}\n "])}createTable(t,e){const n=this.getTableExtensionContext();if(n){const{host:s,getSelectedNodes:o}=n,i=o()[0],r=new Bn(t,e);i?i.parent&&i.parent.apply(r):s.value.apply(r),r.nextFocusNode&&s.value.apply(new y(r.nextFocusNode,1))}}handlePickerClick(t,e){this.createTable(t,e),this.tablePickerPopoverRef.hide()}handlePickerCellHover(t,e){this.hoveredRows=t,this.hoveredCols=e,Array.from(this.tablePickerGridRef.children).forEach((t=>{const e=Number(t.dataset.row),n=Number(t.dataset.col);e<=this.hoveredRows&&n<=this.hoveredCols?t.classList.add("active"):t.classList.remove("active")})),this.selectedHintRef.textContent=`${this.hoveredRows} × ${this.hoveredCols}`}resetPicker(){this.handlePickerCellHover(1,1)}}class Nn extends Ve{render(t,e){return new jn(e).render(t,super.renderButton(t,e,{showArrowIcon:!0,icon:"rte-table"}))}isDisabled(t){let e=super.isDisabled(t);const n=this.getExtensionContext(t.host);if(n){const{host:t,getSelectedNodes:s}=n,o=s()[0];let i=!0;o&&(i=O.canHandle("INSERT_TABLE_BLOCK",o.parent)&&O.canHandle($.INSERT_CHILDREN_AFTER,o.parent.parent)),e=t.disabled||!i}return e}handleButtonClick(){}handleDropdownClick(){}}Q.register({"rte-table":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 264V160H232V264H48zm0 48H232V432H64c-8.8 0-16-7.2-16-16V312zM280 432V312H464V416c0 8.8-7.2 16-16 16H280zM464 264H280V160H464V264zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"/></svg>'}});class _n extends D{handleAction(t,e){const n=this.createTableBlock(t.rowCount,t.columnCount),s=super.createNewParagraph(""),o=this.getReferenceBlock(e);o?o.parent.apply(new V(o,n,s)):e.apply(new P([n,s])),t.nextFocusNode=n.getFirstNode()}createTableBlock(e,n){const s=Math.max(e,1),o=Math.max(n,1);return yt.from({id:t(),type:"table-block",children:[mt(s,o)]})}getReferenceBlock(t){if(!(t instanceof m))return t}}class Mn extends Xe{canIntercept(t,e){const n=e.parent;return n instanceof vt&&1===n.children.length&&0===t.startOffset}intercept(){}}class Dn extends D{handleAction(t){const e=t.tableBlock,n=e.parent,s=super.getRootContent(e),o=super.createNewParagraph("");n.apply(new V(e,o)),n.apply(new G(e)),s&&s.apply(new y(o.getLastNode()))}}class Vn extends Xe{canIntercept(t,e){return t.entityToBeRemoved&&1===e.children.length}intercept(e,n,s){if(!(n.entityToBeRemoved instanceof _)){const e=_.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]});return s.children=[],void s.apply(new P([e]))}n.entityToBeRemoved.apply(new P([new j(t(),"",n.entityToBeRemoved)]))}}class Pn extends Me{doRender(t,e){return t("caption",{key:e.id,ref:this.useRef(e),style:e.getStyles(),class:[e.getClasses(),e.isNotEmpty()?null:"showPlaceholder"].filter(J).join(" "),"data-placeholder":"Enter table caption"})}}class Hn extends D{getRowsMaxCellCount(t){let e=0;for(const n of t){let t=0;for(const e of n.children)t+=e.colSpan;e=Math.max(e,t)}return e}getRowCellStartCols(t){const e=this.getRowsMaxCellCount(t),n=new Array(t.length),s=new Array(e).fill(0);for(let e=0;e<t.length;e++){const o=t[e].children,i=new Array(o.length);let r=0;for(let t=0;t<o.length;t++){const e=o[t];for(;r<s.length&&s[r]>0;)r++;i[t]=r;const n=Math.max(e.colSpan,Hn.DEFAULT_CELLSPAN);if(e.rowSpan>Hn.DEFAULT_CELLSPAN)for(let t=0;t<n;t++){const n=r+t;n<s.length&&(s[n]=Math.max(s[n],e.rowSpan))}r+=n}n[e]=i;for(let t=0;t<s.length;t++)s[t]>0&&s[t]--}return n}updateCellSpan(t,e,n){const s=t.getCustomAttributesAnnotation();if(n<=Hn.DEFAULT_CELLSPAN){if(s){const n=s.render();delete n[e],t.annotationMap.set(U.CUSTOM_ATTRIBUTE,new Z(n))}}else{const o=s?s.render():{};o[e]=n.toString(),t.annotationMap.set(U.CUSTOM_ATTRIBUTE,new Z(o))}}insertMovedCells(t,e,n){t.forEach(((t,s)=>{const o=e[s];if(o){const e=n[s]||[];t.sort(((t,e)=>t.logicalStartCol===e.logicalStartCol?e.cellIndex-t.cellIndex:e.logicalStartCol-t.logicalStartCol)),t.forEach((t=>{const{cell:n,logicalStartCol:s}=t;if(0===o.children.length)return o.apply(new P([n])),void(e[0]=s);const i=e.findIndex((t=>t>=s));-1===i?(o.apply(new V(o.children[o.children.length-1],n)),e.push(s)):0===i?(o.apply(new F(o.children[0],n)),e.unshift(s)):(o.apply(new F(o.children[i],n)),e.splice(i,0,s))}))}}))}splitRowsBySection(t){const e=[],n=[];return t.forEach((t=>{t.parent instanceof Ct?e.push(t):n.push(t)})),[e,n]}buildSelectedIndices(t,e){return new Set(t.map((t=>e.indexOf(t))).filter((t=>t>=0)))}intersectsRemovalRange(t,e,n,s){return t<=s&&e>=n}countRemovedRows(t,e,n){let s=0;for(let o=t;o<=e;o++)n.has(o)&&s++;return s}getHeadCellLength(t){let e=0;for(let n=0;n<t.children.length;n++){const s=t.children[n];if(!(s instanceof bt))break;e+=s.colSpan}return e}getTheStartSpanCell(t,e,n,s){const o={rowIndex:n};for(let i=n;i>=0;i--){const n=e[i];if(n.includes(s)){o.cell=t[i].children[n.indexOf(s)],o.rowIndex=i;break}}return o}getDefaultCellBlockTemplate(e,n,s=1){const o=ce({colspan:n>1?n.toString():null,rowspan:s>1?s.toString():null}),i=t(),r={id:i,type:e,children:[{id:`${i}-p`,type:"paragraph",nodes:[{id:`${i}-p-t`,type:"text",text:""}]}]};return Object.keys(o).length>0&&(r.annotations={customAttribute:o}),r}getSortedValuesByNumericKey(t){return Array.from(t.entries()).sort((([t],[e])=>t-e)).map((([,t])=>t))}}Hn.DEFAULT_CELLSPAN=1;class Fn extends Hn{handleAction(t,e){const{rowsToBeRemoved:n}=t,s=this.getFutureFocusRow(n[0],n[n.length-1],e),o=this.splitRowsBySection(n);if(this.removeRows(o[0]),this.removeRows(o[1]),s){const t=this.getRootContent(e);if(t){const e=s.getLastNode();t.apply(new y(e,e.getRangeEndOffset()))}}}removeRows(t){if(0===t.length)return;const e=t[0].parent,n=e.children,s=this.buildSelectedIndices(t,n);if(s.size>0){if(n.length===t.length)return void e.parent.apply(new G(e));const o=Math.min(...s),i=Math.max(...s),r=this.getRowCellStartCols(n),a=this.collectCellsToMove(n,r,s,o,i);this.insertMovedCells(a,n,r),t.forEach((t=>{t.parent.apply(new G(t))}))}}collectCellsToMove(t,e,n,s,o){const i=new Map,r=t.length;for(let a=0;a<r;a++){const l=t[a],c=l.children.length;for(let t=0;t<c;t++){const c=l.children[t],h=c.rowSpan;if(h<=Hn.DEFAULT_CELLSPAN)continue;const d=a+h-1;if(!this.intersectsRemovalRange(a,d,s,o))continue;const u=h-this.countRemovedRows(a,d,n);if(a<s&&d>=s)this.updateCellSpan(c,"rowspan",u);else if(a>=s&&d>o){const s=o+1;if(s<r&&!n.has(s)){const n=e[a][t];i.has(s)||i.set(s,[]),i.get(s).push({cell:this.cloneCellWithRowSpan(c,u),newRowSpan:u,cellIndex:t,logicalStartCol:n})}}}}return i}cloneCellWithRowSpan(t,e){const n=t.clone(t.parent);return this.updateCellSpan(n,"rowspan",e),n}getFutureFocusRow(t,e,n){const s=n.children.filter((t=>t instanceof Ct||t instanceof xt)).flatMap((t=>t.children)),o=s.indexOf(t),i=s.indexOf(e);return s[o-1]?s[o-1]:s[i+1]?s[i+1]:void 0}}class Kn{constructor(){this.dragging=!1,this.anchorCell=null,this.selectedCells=new Set,this.syncRTESelectionWithDebounce=de(this.syncRTESelection,100,this),this.handleSelectionChangeWithDebounce=de(this.handleSelectionChange,10,this),this.filterSelectedCell=(t,e)=>{const n=new Set;if(t.intersectsNode(e)){if(e.nodeType===Node.TEXT_NODE){const t=R.getEntityByDOM(e.parentElement);if(t){const e=Tt(t.parent,vt);if(e)return n.add(e),Array.from(n)}}e.childNodes.forEach((e=>this.filterSelectedCell(t,e).forEach((t=>{n.add(t)}))))}return Array.from(n)},this.updateSelectedStyles=(t,e)=>{const n=1===e?"v-rte-table-cell-focused":"v-rte-table-cell-selected",s=R.getDOMByEntity(t);s&&s.classList.add(n)},this.handleDocMouseUp=()=>{this.endDrag();const t=ae();t&&t.removeEventListener("mouseup",this.handleDocMouseUp)},this.handleContentClick=()=>{this.clearSelection();const t=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");t&&t.removeEventListener("mousedown",this.handleContentClick,!0)}}static computeRectRange(t,e){const n=t.parent.parent.parent;if(n!==e.parent.parent.parent)return[];const s=[];n.children.forEach((t=>{t.children.forEach((t=>s.push(t)))}));const{grid:o,cellMeta:i}=Kn.buildCellGrid(s),r=i.get(t),a=i.get(e);if(!r||!a)return[];const l=r.row+r.rowSpan-1,c=r.col,h=r.col+r.colSpan-1,d=a.row+a.rowSpan-1,u=a.col,p=a.col+a.colSpan-1,f=Math.min(r.row,a.row),g=Math.max(l,d),b=Math.min(c,u),w=Math.max(h,p),y=new Set;for(let t=f;t<=g;t++){const e=o[t];for(let t=b;t<=w;t++){const n=e[t];n&&y.add(n)}}return Array.from(y)}static getCellSpan(t){let e=1,n=1;const s=t.getAnnotationByType(U.CUSTOM_ATTRIBUTE);if(s&&s.customAttribute){const t=s.customAttribute;t.rowSpan&&(e=parseInt(t.rowSpan,10)),t.colSpan&&(n=parseInt(t.colSpan,10))}if(1===e&&1===n){const s=R.getDOMByEntity(t);if(s){const t=s.getAttribute("rowSpan"),o=s.getAttribute("colSpan");t&&(e=parseInt(t,10)),o&&(n=parseInt(o,10))}}return{rowSpan:Number.isFinite(e)&&e>0?e:1,colSpan:Number.isFinite(n)&&n>0?n:1}}static buildCellGrid(t){const e=[],n=new Map;for(let s=0;s<t.length;s++){const o=t[s];e[s]||(e[s]=[]);let i=0;for(let t=0;t<o.children.length;t++){const r=o.children[t];for(;e[s][i];)i+=1;const{rowSpan:a,colSpan:l}=Kn.getCellSpan(r);n.set(r,{row:s,col:i,rowSpan:a,colSpan:l});for(let t=0;t<a;t++){const n=s+t;e[n]||(e[n]=[]);for(let t=0;t<l;t++)e[n][i+t]=r}i+=l}}return{grid:e,cellMeta:n}}destroy(){this.removeSelectionChangeListener()}init(t){this.context=t,this.addSelectionChangeListener()}setSelectedCells(t){const e=Array.from(this.selectedCells)[0]||t[0];this.updateSelectedCells(t),this.emitCellSelectionChange(e,t)}getSelectedCells(){return Array.from(this.selectedCells)}focusCell(t){const e=R.getEntityByDOM(t);e&&(this.anchorCell=e,this.setSelectedCells([e]),this.addListeners())}dragOver(t){if(!this.anchorCell)return;const e=Kn.computeRectRange(this.anchorCell,t);e.length>1&&this.startDrag(),this.dragging&&(this.preventTextSelection(e),this.updateSelectedCells(e,{debounceSync:!0}))}endDrag(){this.dragging=!1,this.anchorCell=null}emitCellSelectionChange(t,e){const n=Tt(t,yt);if(n){const t=R.getDOMByEntity(n);t&&he.notify(et.getSubject(t,ie),{host:t,detail:e})}}clearSelection(){this.selectedCells.forEach((t=>{const e=R.getDOMByEntity(t);e&&e.classList.remove("v-rte-table-cell-selected","v-rte-table-cell-focused")})),this.selectedCells.clear()}addSelectionChangeListener(){const t=ae();t&&t.addEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}removeSelectionChangeListener(){const t=ae();t&&t.removeEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}handleSelectionChange(){if(this.dragging)return void this.syncRTESelectionWithDebounce();const t=this.context.getSelection();if(t.rangeCount>0){const e=t.getRangeAt(0),n=e.commonAncestorContainer;if(o(n,"table")){const t=this.filterSelectedCell(e,n);this.setSelectedCells(t)}}}startDrag(){this.dragging=!0}updateSelectedCells(t,{debounceSync:e}={}){this.clearSelection(),t.forEach((e=>{this.selectedCells.add(e),this.updateSelectedStyles(e,t.length)})),e?this.syncRTESelectionWithDebounce():this.syncRTESelection()}syncRTESelection(){const t=Array.from(this.selectedCells),e=t.flatMap((t=>t.children.flatMap((t=>t.children.flatMap((t=>{if(t instanceof H)return t})))))).filter(J);t.length>1&&this.context.setSelectedNodes(e,{startNode:e[0],endNode:e[e.length-1],startOffset:0,endOffset:e[e.length-1].getRangeEndOffset()})}preventTextSelection(t){const e=this.context.getSelection();if(e.removeAllRanges(),t.length>0){const n=R.getDOMByEntity(t[0]);if(n){const t=new Range;t.setStart(n,0),t.setEnd(n,0),e.addRange(t)}}}addListeners(){const t=ae();t&&t.addEventListener("mouseup",this.handleDocMouseUp);const e=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");e&&e.addEventListener("mousedown",this.handleContentClick,!0)}}class $n extends Hn{handleAction(t,e){const{selectedRows:n}=t,[s,o]=this.splitRowsBySection(n);o.length>0?this.convertToHeaderRows(o,e):this.revertToBodyRows(s,e);const i=this.getRootContent(e);if(i){const t=n[0].getFirstNode();t&&i.apply(new y(t,0))}}convertToHeaderRows(e,n){let s=n.children.find((t=>t instanceof Ct));const o=e[0].parent;s||(s=Ct.from({id:t(),type:"table-head",children:[]}),n.apply(new F(o,s)));const i=o.children.indexOf(e[e.length-1]),r=o.children.slice(0,i+1),a=this.buildSelectedIndices(r,o.children),l=Math.min(...a),c=Math.max(...a);if(a.size>0){if(a.size<o.children.length){const t=this.getRowCellStartCols(o.children),e=this.collectCellsToMove(o.children,t,a,l,c);this.insertMovedCells(e,o.children,t)}this.convertBodyRowsToHeaderRows(o,s,r)}}convertBodyRowsToHeaderRows(t,e,n){for(let e=0;e<n.length;e++){const s=n[e];s.children=s.children.map((t=>this.convertTdToTh(t))),t.apply(new G(s))}e.apply(new P(n))}revertToBodyRows(e,n){let s=n.children.find((t=>t instanceof xt));const o=e[0].parent;s||(s=xt.from({id:t(),type:"table-body",children:[]}),n.apply(new V(o,s)));const i=o.children.indexOf(e[0]),r=o.children.slice(i),a=this.buildSelectedIndices(r,o.children);if(a.size>0){const t=this.getRowCellStartCols(o.children),e=this.collectCellsToMove(o.children,t,a,Math.min(...a),Math.max(...a));this.insertMovedCells(e,o.children,t),this.convertHeadRowsToBodyRows(o,s,r)}}convertHeadRowsToBodyRows(t,e,n){const s=e.children[0],o=this.getRowCellStartCols(n);for(let i=0;i<n.length;i++){const r=n[i];t.apply(new G(r));const a=s?this.getHeadCellLength(s):0;r.children=this.convertThToTd(r,o[i],a),s&&e.apply(new F(s,r))}s||e.apply(new P(n))}collectCellsToMove(t,e,n,s,o){const i=new Map,r=t.length;for(let a=0;a<r;a++){const l=t[a],c=l.children.length;for(let t=0;t<c;t++){const c=l.children[t],h=c.rowSpan;if(h<=Hn.DEFAULT_CELLSPAN)continue;const d=a+h-1;if(!this.intersectsRemovalRange(a,d,s,o))continue;const u=this.countRemovedRows(a,d,n),p=h-u;if(a<s&&d>=s){this.updateCellSpan(c,"rowspan",p);const o=s;if(o<r&&n.has(o)){const n=e[a][t];i.has(o)||i.set(o,[]),i.get(o).push({cell:this.cloneCellWithRowSpan(c,u),newRowSpan:u,cellIndex:t,logicalStartCol:n})}}else if(a>=s&&d>o){this.updateCellSpan(c,"rowspan",u);const s=o+1;if(s<r&&!n.has(s)){const n=e[a][t];i.has(s)||i.set(s,[]),i.get(s).push({cell:this.cloneCellWithRowSpan(c,p),newRowSpan:p,cellIndex:t,logicalStartCol:n})}}}}return i}convertTdToTh(t){if(t instanceof bt)return t;const e=bt.from(t.toJSON());return e.parent=t.parent,e}convertThToTd(t,e,n){return t.children.map(((s,o)=>{let i=s;const r=e[o]<n,a=s.toJSON();return i=r?s:vt.from(this.deleteHeadCellDefaultBackground(a)),i.parent=t,i}))}cloneCellWithRowSpan(e,n){const s=e.clone(e.parent);s.id=t(),s.children=[];const o=this.createNewParagraph("");return o&&s.apply(new P([o])),this.updateCellSpan(s,"rowspan",n),s}deleteHeadCellDefaultBackground(t){var e;if(t&&t.annotations&&t.annotations.customStyle){delete t.annotations.tableCell;const n=t.annotations.customStyle.backgroundColor,s=Et.getDefaultBackgroundColor();!n||n!==s&&(null===(e=i(n))||void 0===e?void 0:e.toUpperCase())!==s||delete t.annotations.customStyle.backgroundColor}return t}}class zn extends St{handleAction(t,e){const{insertDirection:n,tableCellInsertRange:s}=t,o=new Set(s.map((t=>t.id))),i=kt(e),r=At(i),[a,l]=this.getBoundaryCellColumnRange(s,i,r),c=n===Lt.LEFT?a:l+1,h=this.hasSelectedCellInsideTargetColumn(i,r,c,o),d=new Set;i.forEach(((t,s)=>{if(d.has(s))return;const a=this.findExpandableCell(t,s,c,r,n,o,h);if(a){const t=a.rowSpan;if(Rt(a,a.colSpan+1,a.rowSpan,e,!0),t>1)for(let e=1;e<t;e++)d.add(s+e);return}const l=this.findInsertPosition(t,s,c,r,i);if(l){const e=this.generateTableCell(l.templateCell);t.apply(l.before?new F(l.anchorCell,e):new V(l.anchorCell,e))}}))}findExpandableCell(t,e,n,s,o,i,r){const a=s[e],l=t.children.reduce(((t,e)=>t+(i.has(e.id)?1:0)),0);for(const c of t.children){const t=a.indexOf(c.id),h=t+c.colSpan,d=n===h,u=e+c.rowSpan>=s.length,p=i.has(c.id),f=n>t&&n<h;if(o===Lt.LEFT?f:f&&(!p||!u)||d&&c.colSpan>1&&p&&!u&&1===l&&!r)return c}return null}hasSelectedCellInsideTargetColumn(t,e,n,s){for(let o=0;o<t.length;o++){const i=t[o],r=e[o];for(const t of i.children){if(!s.has(t.id))continue;const e=r.indexOf(t.id),o=e+t.colSpan;if(n>e&&n<o)return!0}}return!1}findInsertPosition(t,e,n,s,o){const i=s[e];let r=t.children[0];if(n>=0&&n<i.length){const t=Ot(o,i[n]);t&&(r=t)}let a=0;for(let e=0;e<t.children.length;e++){const s=t.children[e];for(;a<i.length&&i[a]!==s.id;)a++;if(a>=n)return{anchorCell:s,templateCell:r,before:!0};const o=a+s.colSpan;if(o>n||e===t.children.length-1)return{anchorCell:s,templateCell:r,before:!1};a=o}return null}generateTableCell(t){return t instanceof bt?bt.from(It(t.type)):vt.from(It(t.type))}}class Wn extends St{handleAction(t,e){const n=kt(e),s=At(n),[o,i]=this.getBoundaryCellColumnRange(t.tableCellDeleteRange,n,s),r=Math.max(n.indexOf(t.tableCellDeleteRange[t.tableCellDeleteRange.length-1].parent),0),{coveredCellIds:a,coveredCells:l,adjustmentCellInfo:c}=this.getDeleteCellsInfo(n,o,i,s),h=this.findNextFocusableCell(n,s,o,i,a,r);this.deleteCells(l,c,e);const d=this.getRootContent(e),u=Nt(h);d&&u&&d.apply(new y(u))}getDeleteCellsInfo(t,e,n,s){const o=[],i=new Set,r=[],a=Bt(s);return t.forEach((t=>{t.children.forEach((t=>{const s=a.get(t.id);if(void 0===s)return;const{colSpan:l,rowSpan:c}=_t(t),h=this.getColumnOverlapCount(s,l,e,n);if(h<=0)return;if(h===l)return o.push(t),void i.add(t.id);const d=Math.max(1,l-h);r.push({cell:t,nextColSpan:d,rowSpan:c})}))})),{coveredCells:o,coveredCellIds:i,adjustmentCellInfo:r}}findNextFocusableCell(t,e,n,s,o,i){for(let r=0;r<t.length;r++){const a=this.findFocusableCellIdInGridRow(e[(i+r)%t.length],n,s,o);if(!a)continue;const l=Ot(t,a);if(l)return l}return null}findFocusableCellIdInGridRow(t,e,n,s){for(let e=n+1;e<t.length;e++){const n=t[e];if(n&&!s.has(n))return n}for(let n=e-1;n>=0;n--){const e=t[n];if(e&&!s.has(e))return e}return null}deleteCells(t,e,n){t.forEach((t=>{t.parent.apply(new G(t))}));const s=new Set;e.forEach((({cell:t,nextColSpan:e,rowSpan:o})=>{s.add(t.id),Rt(t,e,o,n)})),this.normalizeRemainingCellSpans(n,s)}normalizeRemainingCellSpans(t,e){kt(t).forEach((n=>{n.children.forEach((n=>{const{colSpan:s,rowSpan:o}=_t(n);if(e.has(n.id)){const e=jt(t);if(!(o>1&&s===e))return}Rt(n,s,o,t)}))}))}getColumnOverlapCount(t,e,n,s){const o=t+e-1,i=Math.max(t,n),r=Math.min(o,s);return i<=r?r-i+1:0}}class Gn extends B{constructor(t){super(),this.isFlushable=!0,this.type="CREATE_SEGMENT_TABLE_CELL",this.payload=t}}class Un extends D{handleAction(t,e){const{table:n,sourceCell:s,colSpan:o,cellType:i,keepSourceContent:r}=t.payload,a=r?this.convertCellType(s,i):Mt(i);Rt(a,o,s.rowSpan,n),e.apply(new F(s,a))}convertCellType(t,e){return"table-head-cell"===e?bt.from(t.toJSON()):vt.from(t.toJSON())}}class Zn extends D{handleAction(t,e){const{cell:n,targetCellType:s}=t.payload,o="table-head-cell"===s?bt.from(n.toJSON()):vt.from(n.toJSON());e.apply(new F(n,o)),e.apply(new G(n))}}class Jn extends D{handleAction(t,e){const{table:n,cell:s,col:o,cellStartCol:i,endCol:r,targetCellType:a}=t.payload,l=i+s.colSpan-1,c=o>i?o-i:0,h=Math.min(r,l),d=h-o+1,u=l-h;c>0&&e.apply(new Gn({table:n,sourceCell:s,colSpan:c,cellType:s.type,keepSourceContent:!0})),e.apply(new Gn({table:n,sourceCell:s,colSpan:d,cellType:a,keepSourceContent:0===c})),u>0&&e.apply(new Gn({table:n,sourceCell:s,colSpan:u,cellType:s.type,keepSourceContent:0===c&&d===s.colSpan})),e.apply(new G(s))}}class Xn extends St{handleAction(t,e){const n=kt(e),s=At(n),o=Bt(s),[i,r]=this.getBoundaryCellColumnRange(t.tableCellSelectRange,n,s),a=[],l=new Set;n.forEach((t=>{t.children.forEach((t=>{const e=o.get(t.id);void 0!==e&&e>=i&&e<=r&&!l.has(t.id)&&(l.add(t.id),a.push(t))}))})),t.selectCellCallback(a)}}class qn extends Xe{canIntercept(t){return t.childrenToBeInserted.some((t=>!(t instanceof vt)))}intercept(){}}class Qn extends D{handleAction(t,e){const{targetCell:n,mergeCells:s,colSpan:o,rowSpan:i,direction:r}=t;this.mergeContentToTargetCell(n,s),Rt(n,o,i,e),this.deleteOtherSelectedCells(s,n),r!==Dt.MERGE_CELL_LEFT&&r!==Dt.MERGE_CELL_RIGHT&&i>1&&this.clearRowSpanIfUniformAcrossRow(n,e,i);const a=this.getRootContent(e),l=Nt(n);a&&l&&a.apply(new y(l))}mergeContentToTargetCell(t,e){const n=e.flatMap((t=>t.children)),s=n.filter((t=>t.isNotEmpty()));t.children=(s.length>0?s:[n[0]]).map((e=>e.clone(t)))}deleteOtherSelectedCells(t,e){t.forEach((t=>{t!==e&&t.parent.apply(new G(t))}))}clearRowSpanIfUniformAcrossRow(t,e,n){const s=t.parent.parent.children,o=At(s),i=[];for(let e=0;e<o.length;e++)o[e].includes(t.id)&&i.push(e);if(i.length>1){const t=i[0],r=t+n-1,a=new Set;let l=Number.POSITIVE_INFINITY;for(let e=0;e<o[0].length;e++){let n=o[t][e],s=1,i=!1;for(let c=t+1;c<=r;c++)o[c][e]!==n?(s>1&&(i=!0,l=Math.min(l,s),a.add(n)),s=1,n=o[c][e]):s++;if(s<2&&!i){a.clear();break}s>1&&(l=Math.min(l,s),a.add(n))}a.size>0&&s.forEach((t=>{t.children.forEach((t=>{if(a.has(t.id)){const{rowSpan:n,colSpan:s}=_t(t);Rt(t,s,n-l+1,e)}}))}))}}}class Yn extends C{canHandle(t,e){const n=t[e];return n&&"TABLE"===n.tagName?1:0}handle(e,n){return yt.from({id:t(),type:"table-block",annotations:w.generate(yt,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class ts extends v{canHandle(t,e){const n=t[e];return n&&"THEAD"===n.tagName?1:0}handle(e,n){return Ct.from({id:t(),type:"table-head",annotations:w.generate(Ct,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class es extends v{canHandle(t,e){const n=t[e];return n&&"TBODY"===n.tagName?1:0}handle(e,n){return xt.from({id:t(),type:"table-body",annotations:w.generate(xt,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class ns extends v{canHandle(t,e){const n=t[e];return n&&"TR"===n.tagName?1:0}handle(e,n){return Vt.from({id:t(),type:"table-row",annotations:w.generate(Vt,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class ss extends v{canHandle(t,e){const n=t[e];return!n||"TD"!==n.tagName&&"TH"!==n.tagName?0:1}handle(e,n){const s=e[0],o=[{id:t(),type:"paragraph",annotations:{internalWrapper:n&&!n.autoMatchFormat},nodes:[{id:t(),type:"text",annotations:{plainText:n&&!n.autoMatchFormat},text:""}]}];return"TH"===s.tagName?bt.from({id:t(),type:"table-head-cell",annotations:this.getTableHeadCellAnnotations(s,n),children:o},n):vt.from({id:t(),type:"table-cell",annotations:w.generate(bt,s,n),children:o},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}getTableHeadCellAnnotations(t,e){const n=w.generate(vt,t,e);return n&&n.tableCell&&wt.getColorKey(n.tableCell.backgroundColor,!0)===at.key&&(delete n.tableCell.backgroundColor,n.customStyle&&delete n.customStyle.backgroundColor),n}}class os extends C{canHandle(t,e){const n=t[e];return n&&n.parentElement&&"TABLE"===n.parentElement.tagName&&"CAPTION"===n.tagName?1:0}handle(e,n){return RTETableCaptionBlock.from({id:t(),type:"table-caption",annotations:this.getTableCaptionAnnotations(e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}getTableCaptionAnnotations(t,e){const n=w.generate(RTETableCaptionBlock,t,e);return n&&n.customStyle&&n.customStyle.backgroundColor&&wt.getColorKey(n.customStyle.backgroundColor,!0)===at.key&&delete n.customStyle.backgroundColor,n}}class is extends k{getBackgroundColor(t){return t.style.backgroundColor?wt.getColorKey(t.style.backgroundColor)||t.style.backgroundColor:null}getBorder(t){const e=t.style,n=e.borderStyle,s=e.borderWidth,o=e.borderColor;if(o||n||s){const t="initial"===o?"":o;return{style:"initial"===n?"":n,width:"initial"===s?"":s,color:wt.getColorKey(t)||t}}return null}getWidth(t){if(t.style.width)return t.style.width;const e=t.getAttribute("width");return e?/^\d+$/.test(e)?`${e}px`:e:null}getHeight(t){if(t.style.height)return t.style.height;const e=t.getAttribute("height");return e?/^\d+$/.test(e)?`${e}px`:e:null}}class rs extends is{canHandle(t){return"RTETableBlock"===t.name}handle(t){const e=ce({backgroundColor:this.getBackgroundColor(t),border:this.getBorder(t),width:this.getWidth(t),height:this.getHeight(t),alignment:this.getAlignment(t)});return Object.keys(e).length>0?{table:e}:{}}getAlignment(t){const e=t.classList;if(e.contains("v-rte--extension-table-align-left"))return"left";if(e.contains("v-rte--extension-table-align-center"))return"center";if(e.contains("v-rte--extension-table-align-right"))return"right";const n=t.style,s=n.marginLeft,o=n.marginRight;if("auto"===s&&"auto"===o)return"center";if("0"===s||"0px"===s)return"left";if("0"===o||"0px"===o)return"right";const i=t.getAttribute("align");return i&&["left","center","right"].includes(i)?i:null}}class as extends is{canHandle(t){return"RTETableCellBlock"===t.name}handle(t){const e=ce({backgroundColor:this.getBackgroundColor(t),padding:this.getPadding(t),border:this.getBorder(t),width:this.getWidth(t),height:this.getHeight(t),textAlign:this.getTextAlign(t),verticalAlign:this.getVerticalAlign(t),minWidth:this.getMinWidth(t),boxSizing:this.getBoxSizing(t)});return Object.keys(e).length>0?{tableCell:e}:{}}getMinWidth(t){return t.style.minWidth?t.style.minWidth:null}getBoxSizing(t){return t.style.boxSizing?t.style.boxSizing:null}getPadding(t){return t.style.padding?t.style.padding:null}getTextAlign(t){if(t.style.textAlign){const e=t.style.textAlign;if(["left","center","right","justify"].includes(e))return e}const e=t.getAttribute("align");return e&&["left","center","right","justify"].includes(e)?e:null}getVerticalAlign(t){if(t.style.verticalAlign){const e=t.style.verticalAlign;if(["top","middle","bottom"].includes(e))return e}return null}}class ls extends as{canHandle(t){return"RTETableHeadCellBlock"===t.name}}class cs extends D{handleAction(t,e){const n=t.toAnnotation(),s=this.getDOMByEntity(e);if(s){const t=s.closest(".v-rte--extension-table-container"),{backgroundColorAnnotation:o,width:i,height:r}=n;s.style.backgroundColor=o.renderStyle().color,s.style.border=n.borderStr,s.style.width=i,s.style.height=r;const a=n.renderAlignmentStyle().margin;s.style.margin=a,t&&(t.style.width=i,t.style.height=r,t.style.margin=a),this.updateCustomStyleAnnotation(e,["backgroundColor","border","width","height","margin"])}}}class hs extends D{handleAction(t,e){const n=t.toAnnotation(),s=this.getDOMByEntity(e);if(s){const{width:t,height:o,borderStr:i,padding:r,textAlign:a,verticalAlign:l}=n,c=n.renderStyle().backgroundColor||"";s.style.backgroundColor=c,s.style.border=i,s.style.width=t,s.style.height=o,s.style.padding=r,s.style.textAlign=a,s.style.verticalAlign=l,this.updateCustomStyleAnnotation(e,["backgroundColor","border","width","height","padding","textAlign","verticalAlign"])}}}class ds extends D{handleAction(t,e){const n=e.parent,s=n.parent,o=Tt(n,yt),i=kt(o),r=i.indexOf(n),{colSpan:a,rowSpan:l}=_t(e),c=Pt(e,i),h=Math.ceil(l/2),d=Math.max(1,l-h),u=1===l;Rt(e,a,h,o);const p=r+h,f=Mt(e.type);if(Rt(f,a,d,o),u){const t=this.createNewRowWithCell(s,f),r=s.children.indexOf(n);s.apply(new V(s.children[r],t)),i.splice(p,0,t),this.updateCellsSpanningThroughInsertionPoint(i,p,e,o)}else{const t=i[p],e=this.findInsertPosition(t,c,i,p);t.children.splice(e,0,f),f.parent=t}}findInsertPosition(t,e,n,s){let o=0;for(let t=0;t<s;t++){const i=n[t];for(const r of i.children){const{colSpan:i,rowSpan:a}=_t(r);t+a>s&&Pt(r,n)<e&&(o+=i)}}let i=o;for(let n=0;n<t.children.length;n++){if(i>=e)return n;const s=t.children[n],{colSpan:o}=_t(s);i+=o}return t.children.length}createNewRowWithCell(e,n){const s={id:t(),type:"table-row",children:[]},o=Vt.from(s);return o.parent=e,o.children.push(n),n.parent=o,o}updateCellsSpanningThroughInsertionPoint(t,e,n,s){for(let o=0;o<e;o++){const i=t[o];for(const t of i.children){if(t===n)continue;const{colSpan:i,rowSpan:r}=_t(t);o+r>=e&&Rt(t,i,r+1,s)}}}}class us extends D{handleAction(t,e){const n=e.parent,s=Tt(n,yt),o=kt(s),i=o.indexOf(n),{colSpan:r,rowSpan:a}=_t(e),l=Pt(e,o),c=l+r-1,h=Math.ceil(r/2),d=Math.floor(r/2);Rt(e,h,a,s);const u=Mt(e.type);Rt(u,d,a,s),n.apply(new V(e,u));const p=1===r?1:0;p>0&&this.updateOtherRowsCells(o,i,l,c,a,p,s)}updateOtherRowsCells(t,e,n,s,o,i,r){for(let a=0;a<t.length;a++){const l=t[a];if(!(a>=e&&a<e+o))for(const e of l.children){const o=Pt(e,t),{colSpan:a,rowSpan:l}=_t(e);if(o+a-1>=n&&o<=s){Rt(e,a+i,l,r);break}}}}}class ps extends Hn{handleAction(e,n){const{selectedRows:s}=e,o=s[s.length-1];let i=n.children.find((t=>t instanceof xt));const r={id:t(),type:"table-row",children:[]};let a=0,l=null;i?(l=i.children[0],a=this.getHeadCellLength(l)):(i=xt.from({id:t(),type:"table-body",children:[]}),n.apply(new P([i])));const c=o.parent.children,h=this.getRowsMaxCellCount(c);if(this.getRowsMaxCellCount([o])<h){const t=c.indexOf(o),e=this.getRowCellStartCols(c),n=new Map;for(let s=0;s<h;s++){const o=s<a?"table-head-cell":"table-cell",{cell:i}=this.getTheStartSpanCell(c,e,t,s);if(i){const t=i.colSpan;n.set(s,this.getDefaultCellBlockTemplate(o,t)),s+=t-1}}r.children=this.getSortedValuesByNumericKey(n)}else r.children=this.createTableCells(o,a);const d=l?new F(l,Vt.from(r)):new P([Vt.from(r)]);i.apply(d)}createTableCells(t,e){const n=[];let s=0;for(const o of t.children)n.push(this.getDefaultCellBlockTemplate(s<e?"table-head-cell":"table-cell",o.colSpan)),s+=o.colSpan;return n}}class fs extends Hn{handleAction(e){const{insertDirection:n,selectedRows:s}=e,o=n===Ht.ABOVE?s[0]:s[s.length-1],i={id:t(),type:"table-row",children:[]},r=o.parent.children,a=this.getRowsMaxCellCount(r),l=r.indexOf(o),c=this.getRowCellStartCols(r),h=new Map;for(let t=0;t<a;t++){const{cell:e,rowIndex:s}=this.getTheStartSpanCell(r,c,l,t);if(e){const{colSpan:o,rowSpan:i}=e;if(n===Ht.ABOVE?s!==l:s+i>l+1){this.updateCellSpan(e,"rowspan",i+1),t+=o-1;continue}h.set(t,this.getDefaultCellBlockTemplate(e.type,o)),t+=o-1}}i.children=this.getSortedValuesByNumericKey(h);const d=Vt.from(i),u=n===Ht.ABOVE?new F(o,d):new V(o,d);o.parent.apply(u)}}class gs extends Xe{canIntercept(t,e){return Boolean(e.parent)}intercept(t,e,n){const s=this.createNewParagraph("");s&&(n.parent.apply(0===e.startOffset?new F(n,s):new V(n,s)),e.newBlock=s)}createNewParagraph(e){const n=L.getRTEBlockClass("paragraph");if(n)return n.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:e}]})}}class bs extends De{constructor(t=Ft){super(),this.toolbarButtonRenderer=new Nn,this.tableBlockRenderer=new kn,this.tableRowBlockRenderer=new Rn,this.tableCellRenderer=new On,this.tableHeadCellRenderer=new Ln,this.tableSelection=new Kn,wt.setTableColors(t),this.registerToolbarButtonRenderer("table",this.toolbarButtonRenderer),this.registerBlockBasicStrategies(yt.name),this.registerBlockBasicStrategies(Ct.name),this.registerBlockBasicStrategies(bt.name),this.registerBlockBasicStrategies(Vt.name),this.registerBlockBasicStrategies(vt.name),this.registerBlockBasicStrategies(xt.name),this.registerRenderer("table-block",this.tableBlockRenderer),this.registerRenderer("table-head",new An),this.registerRenderer("table-head-cell",this.tableHeadCellRenderer),this.registerRenderer("table-row",this.tableRowBlockRenderer),this.registerRenderer("table-cell",this.tableCellRenderer),this.registerRenderer("table-body",new In),this.registerRenderer("table-caption",new Pn),this.registerNode("table-block",yt),this.registerNode("table-head",Ct),this.registerNode("table-head-cell",bt),this.registerNode("table-row",Vt),this.registerNode("table-cell",vt),this.registerNode("table-body",xt),this.registerNode("table-caption",RTETableCaptionBlock),this.registerElementToBlockDTOClassStrategy(new Yn),this.registerElementToBlockDTOClassStrategy(new ts),this.registerElementToBlockDTOClassStrategy(new es),this.registerElementToBlockDTOClassStrategy(new ns),this.registerElementToBlockDTOClassStrategy(new ss),this.registerElementToBlockDTOClassStrategy(new os),this.registerAnnotationHandler(new rs),this.registerAnnotationHandler(new as),this.registerAnnotationHandler(new ls)}initialExtension(t){this.tableSelection.init(t);const e=Object.assign(Object.assign({},t),{tableSelection:this.tableSelection});super.initialExtension(e)}destroyExtension(){this.tableSelection.destroy()}}(()=>{const t=new _n,e=new Dn;De.registerActionHandleStrategy(m.name,"INSERT_TABLE_BLOCK",t),De.registerActionHandleStrategy(m.name,"DELETE_TABLE_BLOCK",e),De.registerActionHandleStrategy(vt.name,"DELETE_TABLE_BLOCK",e),De.registerActionHandleStrategy(bt.name,"DELETE_TABLE_BLOCK",e),De.registerActionHandleStrategy(_.name,"INSERT_TABLE_BLOCK",t),De.registerActionHandleStrategy(T.name,"INSERT_TABLE_BLOCK",t),De.registerActionHandleStrategy(yt.name,Kt,new ps),De.registerActionHandleStrategy(yt.name,$t,new fs),De.registerActionHandleStrategy(yt.name,zt,new Fn),De.registerActionHandleStrategy(yt.name,Wt,new $n),De.registerActionHandleStrategy(yt.name,Gt,new zn),De.registerActionHandleStrategy(yt.name,Ut,new Wn),De.registerActionHandleStrategy(yt.name,Zt,new Jt),De.registerActionHandleStrategy(Vt.name,Xt,new Jn),De.registerActionHandleStrategy(Vt.name,"CREATE_SEGMENT_TABLE_CELL",new Un),De.registerActionHandleStrategy(Vt.name,qt,new Zn),De.registerActionHandleStrategy(vt.name,Qt,new ds),De.registerActionHandleStrategy(vt.name,Yt,new us),De.registerActionHandleStrategy(bt.name,Qt,new ds),De.registerActionHandleStrategy(bt.name,Yt,new us),De.registerActionHandleStrategy(yt.name,te,new Xn),De.registerActionHandleStrategy(yt.name,ee,new Qn),De.registerActionHandleStrategy(yt.name,fn.name,new cs),De.registerActionHandleStrategy(vt.name,yn.name,new hs),De.registerActionHandleStrategy(bt.name,mn.name,new hs),De.registerActionHandlerInterceptor(_.name,$.DELETE_BLOCK_CONTENT,new Mn),De.registerActionHandlerInterceptor(Vt.name,$.INSERT_CHILDREN_BEFORE,new qn),De.registerActionHandlerInterceptor(vt.name,$.DELETE_CHILDREN,new Vn),De.registerActionHandlerInterceptor(bt.name,$.DELETE_CHILDREN,new Vn),De.registerActionHandlerInterceptor(yt.name,$.INSERT_NEW_PARAGRAPH,new gs)})();class ws extends B{constructor(t,e){super(),this.type=$.INSERT_NODE_TO_NEAREST_ROOT,this.rteRange=t,this.nodeToBeInserted=e}}class ys extends D{handleAction(e,n){const{rteRange:s,token:o}=e;if(s&&s.startNode){const{key:i,label:r,customAttrs:a={wrapped:"true"}}=o,l=new RTETokenNode(t(),i,r,n);l.annotationMap.set("CUSTOM_ATTRIBUTE",new Z(a)),n.apply(new ws(s,l)),e.actionHandleResult=!0}}}const ms=new class extends C{canHandle(t,e){const n=t[e];return"SPAN"===n.nodeName&&n.classList.contains("token")&&n.hasAttribute("token-key")?1:0}handle(e){const n=e[0],s=n.getAttribute("token-key"),o=n.textContent,i=w.generate(j,n),{customAttribute:r}=i,a=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(n[s[o]]=t[s[o]])}return n}(i,["customAttribute","customClass"]);return{id:t(),type:"token",token:s,text:o,annotations:Object.assign(Object.assign({},a),{customAttribute:this.createCustomAttrs(r)})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}createCustomAttrs(t){const e=Object.assign(Object.assign({},t),{contenteditable:null,"template-token-key":null,"token-key":null,wrapped:"false"===t.wrapped?"false":"true"});return ce(e)}};class vs extends De{constructor(t=[]){super(),this.tokenRenderer=new Fe,this.registerNode("token",RTETokenNode),this.registerRenderer("token",this.tokenRenderer),this.tokenToolbarButtonRenderer=new He(t),this.registerToolbarButtonRenderer("token",this.tokenToolbarButtonRenderer),this.registerElementToNodeDTOClassStrategy(ms)}}(()=>{const t=new ys;De.registerActionHandleStrategy(_.name,"INSERT_TOKEN_NODE",t),De.registerActionHandleStrategy(A.name,"INSERT_TOKEN_NODE",t)})();export{Xe as A,ws as I,He as R,fe as V,ye as a,Ce as b,Ee as c,Le as d,Ne as e,vs as f,$e as g,rn as h,bs as i,De as j,Me as k,Ve as l,RTETokenNode as m,Fe as n,Ke as o,Re as w}
|
package/dist/vega/p-6f2e5bc6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{M as t,V as i}from"./p-6e1ab235.js";import{l as s,e}from"./p-dcd18ab1.js";import{S as n}from"./p-1fb56e14.js";import{O as a}from"./p-331a62d5.js";import{C as o}from"./p-2d0d575f.js";import{C as c}from"./p-33860e54.js";import{d as h}from"./p-878851f6.js";var l=function(t,i,s,e){var n,a=arguments.length,o=a<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var c=t.length-1;c>=0;c--)(n=t[c])&&(o=(a<3?n(o):a>3?n(i,s,o):n(i,s))||o);return a>3&&o&&Object.defineProperty(i,s,o),o};const r=["a[href]","area[href]","button","input","select","textarea","iframe","object","embed",'[contenteditable="true"]','[contenteditable=""]',"[tabindex]"].join(",");class d extends i{constructor(t){super(),this.isVoiceOverClick=!1,this.focusTriggerElement=null,this.focusDialogTaskQueue=new n,this.dialogContentReadyObserver=null,this.dialogContentReadySubject=null,this.isChildFocused=!1,this.eventListenerHandler=()=>{(this.entry.triggerEl()||window).addEventListener("click",this.handleClickEvent,{capture:!0})},this.eventListenerRemover=()=>{const t=this.entry.triggerEl();t&&t.removeEventListener("click",this.handleClickEvent,{capture:!0}),window.removeEventListener("click",this.handleClickEvent,{capture:!0})},this.handleClickEvent=t=>{this.isVoiceOverClick=s(t),this.isVoiceOverClick||(this.focusTriggerElement=null)},this.getFirstFocusableElement=t=>{const i=t=>{if(t instanceof HTMLElement&&this.isFocusableElement(t))return t;const s=Array.from(t.querySelectorAll("*"));for(const t of s){if(this.isFocusableElement(t))return t;if(t.shadowRoot){const s=i(t.shadowRoot);if(s)return s}}return null};return t instanceof HTMLElement&&t.shadowRoot?this.isFocusableElement(t)?t:i(t)||i(t.shadowRoot):i(t)},this.isFocusableElement=t=>!!t.matches(r)&&!t.hasAttribute("disabled")&&!t.hasAttribute("inert")&&"true"!==t.getAttribute("aria-hidden")&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&t.tabIndex>=0,this.focusOnFirstFocusableElement=()=>{if(!this.isChildFocused){const t=this.entry.dialogEl(),i=this.getFirstFocusableElement(t);i?(this.isChildFocused=!0,i.focus()):t.focus()}},this.entry=t}connectedCallback(){this.eventListenerHandler(),this.subscribeDialogContentReady()}disconnectedCallback(){this.eventListenerRemover(),this.unsubscribeDialogContentReady()}componentDidLoad(){this.eventListenerHandler(),this.subscribeDialogContentReady()}async componentDidRender(){await this.focusDialogTaskQueue.runTask()}async toggle(t){t?await this.show():await this.hide()}async show(){const t=e(document,!0);t&&(this.isChildFocused=!1,await this.focusDialogTaskQueue.enqueue({run:async()=>{this.isVoiceOverClick&&(this.focusTriggerElement=t,this.focusOnFirstFocusableElement())}},!1))}async hide(){this.focusTriggerElement&&await this.focusDialogTaskQueue.enqueue({run:async()=>{this.focusTriggerElement&&this.focusTriggerElement.focus(),this.focusTriggerElement=null}},!1)}subscribeDialogContentReady(){this.entry.dialogEl()&&!this.dialogContentReadySubject&&(this.dialogContentReadySubject=h.getSubject(this.entry.dialogEl(),c),this.dialogContentReadyObserver=new a((()=>!0),(()=>{this.isVoiceOverClick&&this.focusOnFirstFocusableElement()})),o.register(this.dialogContentReadySubject,this.dialogContentReadyObserver))}unsubscribeDialogContentReady(){this.dialogContentReadyObserver&&this.dialogContentReadySubject&&(o.unregister(this.dialogContentReadySubject,this.dialogContentReadyObserver),this.dialogContentReadyObserver=null,this.dialogContentReadySubject=null)}}l([t("connectedCallback")],d.prototype,"connectedCallback",null),l([t("disconnectedCallback")],d.prototype,"disconnectedCallback",null),l([t("componentDidLoad")],d.prototype,"componentDidLoad",null),l([t("componentDidRender")],d.prototype,"componentDidRender",null);export{d as A}
|
package/dist/vega/p-716c71e6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{x as t,y as e,q as a,z as r,h as s,E as o,G as n,H as i,I as u,J as d,K as l,L as m,N as c,O as f,r as p,P as $,B as b,Q as v}from"./p-c6d62f0d.js";import{L as g}from"./p-6e1ab235.js";import{G as h,F as x,a as T,b as w,c as y,d as j,T as k}from"./p-d4ea8e22.js";import{g as O,c as I}from"./p-49a2e141.js";import{i as N}from"./p-262ec334.js";import{p as C}from"./p-0c667d6a.js";import{B as E}from"./p-ed45b3b6.js";import{s as R}from"./p-d27ae9ff.js";import{F as A}from"./p-18e8d9b7.js";class F{format(e){return t(e)?Object.keys(e).map((t=>this.formatToken(e[t],"default"!==t?t:void 0))).join(" "):this.formatToken(e)}}const S={top:"pt",bottom:"pb",left:"pl",right:"pr",x:"px",y:"py"},D=new class extends F{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-p-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${S[e]}-${t[e]}`)).join(" "):(g.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},G={top:"mt",bottom:"mb",left:"ml",right:"mr",x:"mx",y:"my"},_=new class extends F{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-m-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${G[e]}-${t[e]}`)).join(" "):(g.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},B={x:"gap-col",y:"gap-row"},H=new class extends F{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-gap-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${B[e]}-${t[e]}`)).join(" "):(g.warn(`The gap value ${t} is invalid, it must be a value of: `,s),"")}},J=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],L=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],z=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return o(t)?`${r}v-grid-cols-${t}`:(g.warn(`The column value ${t} is invalid, it must be a value of: `,L),"")}},K=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return n(t)?`${r}v-grid-rows-${t}`:(g.warn(`The row value ${t} is invalid, it must be a value of: `,J),"")}},P=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return i(t)?`${r}v-justify-items-${t}`:(g.warn(`The grid justifyItems value ${t} is invalid, it must be a value of: `,h),"")}},V=new class{format(e){const a=O();return"number"!=typeof e&&"string"!=typeof e||isNaN(e)?"string"==typeof e&&N(e)?e:t(e)?(e=I(e))[a]:null:Number(e)}},W=new class{format(e){if(u(e))return e;if(t(e)){const t=O();return(e=I(e))[t]}return null}},q=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return"string"==typeof t&&"false"===t||!1===t?`${r}v-hidden`:"string"==typeof t&&"true"===t||!0===t?`${r}v-block`:(g.warn(`The display value ${t} is invalid, it must be a boolean`),"")}},M=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return d(t)?`${r}v-flex-${t}`:(g.warn(`The direction value ${t} is invalid, it must be a value of: `,x),"")}},Q=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return l(t)?`${r}v-items-${t}`:(g.warn(`The flex alignItem value ${t} is invalid, it must be a value of: `,T),"")}},U=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return m(t)?`${r}v-justify-${this.mapInput(t)}`:(g.warn(`The flex justifyContent value ${t} is invalid, it must be a value of: `,w),"")}mapInput(t){switch(t){case"start":return"start";case"center":return"center";case"end":return"end";case"space-around":return"around";case"space-between":return"between";case"space-evenly":return"evenly"}}},X=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return c(t)?`${r}v-flex-${t}`:(g.warn(`The flex flexWrap value ${t} is invalid, it must be a value of: `,y),"")}},Y=new class{format(e){const a=O();return t(e)?(e=I(e))[a]:e}},Z=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return f(t)?"none"==t?`${r}v-hidden`:`${r}v-${t}`:(g.warn(`The box display value ${t} is invalid, it must be a value of: `,j),"")}},tt=new class{format(e){const a=O();return t(e)?(e=I(e),C(e[a])):C(e)}},et={top:"t",right:"r",bottom:"b",left:"l","top-left":"tl","top-right":"tr","bottom-left":"bl","bottom-right":"br"},at=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return p(t)?`${r}v-${this.transformRoundedNoneAndFill(t)}`:$(t)?Object.keys(t).map((e=>`${r}v-rounded-${et[e]}-${this.transformRoundedNoneAndFill(t[e]).replace("rounded-","")}`)).join(" "):(g.warn(`The border radius value ${t} is invalid, it must be a value of: `,b),"")}transformRoundedNoneAndFill(t){return t.replace("rounded-none","rounded-0").replace("rounded-full","rounded-9999")}},rt=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return v(t)?`${r}v-text-${t}`:(g.warn(`The text align value ${t} is invalid, it must be a value of: `,k),"")}};class st{format(e){return t(e)?Object.keys(e).map((t=>this.generateCssText(this.formatToken(e[t],"default"!==t?t:void 0),t))).join(" "):this.generateCssText(this.formatToken(e))}generateCssText(t,e){let a="";return t&&(a=e&&"default"!==e?`@media (min-width:${E[e]}px){:host{${t}}}`:`:host{${t}}`),a}}const ot={top:["padding-top"],bottom:["padding-bottom"],left:["padding-left"],right:["padding-right"],x:["padding-left","padding-right"],y:["padding-top","padding-bottom"]},nt=new class extends st{formatToken(t){return a(t)?`padding:${s[t]}px`:r(t)?Object.keys(t).map((e=>ot[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(g.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},it={top:["margin-top"],bottom:["margin-bottom"],left:["margin-left"],right:["margin-right"],x:["margin-left","margin-right"],y:["margin-top","margin-bottom"]},ut=new class extends st{formatToken(t){return a(t)?`margin:${s[t]}px`:r(t)?Object.keys(t).map((e=>it[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(g.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},dt={top:["border-top-left-radius","border-top-right-radius"],right:["border-top-right-radius","border-bottom-right-radius"],bottom:["border-bottom-left-radius","border-bottom-right-radius"],left:["border-top-left-radius","border-bottom-left-radius"],"top-left":["border-top-left-radius"],"top-right":["border-top-right-radius"],"bottom-left":["border-bottom-left-radius"],"bottom-right":["border-bottom-right-radius"]},lt=new class extends st{formatToken(t){return p(t)?`border-radius:${b[t]}px`:$(t)?this.getDirectionKeys(t).map((e=>dt[e].map((a=>`${a}:${b[t[e]]}px`)).join(";"))).join(";"):(g.warn(`The border radius value ${t} is invalid, it must be a value of: `,b),"")}getDirectionKeys(t){const e=Object.keys(t);return A.isEnabled("VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR")?R(e,(e=>t[e]),void 0,Object.keys(b)):e}},mt=new class{format(t,e){switch(e){case"padding":return D.format(t);case"margin":return _.format(t);case"gap":return H.format(t);case"gridColumn":return z.format(t);case"gridRow":return K.format(t);case"gridJustifyItems":return P.format(t);case"size":return V.format(t);case"translocation":return W.format(t);case"display":return q.format(t);case"flexDirection":return M.format(t);case"flexAlignItem":return Q.format(t);case"flexJustifyContent":return U.format(t);case"flexWrap":return X.format(t);case"boxDisplay":return Z.format(t);case"widthAndHeight":return tt.format(t);case"corners":return at.format(t);case"textAlign":return rt.format(t);case"paddingStyle":return nt.format(t);case"marginStyle":return ut.format(t);case"cornersStyle":return lt.format(t);default:throw new Error(`Invalid flag ${e} passed into ResponsiveFormatFacade`)}}formatCustom(t){return Y.format(t)}};export{L as G,mt as R,J as a}
|