@heartlandone/vega 2.74.0-RTE-table-preview → 2.75.0-RTE-table-preview
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-be2e868e.js → app-globals-6c9a0e62.js} +11 -10
- package/dist/cjs/{child-nodes-event-prevent-slimmer-536d29fc.js → child-nodes-event-prevent-slimmer-aca87dac.js} +1 -1
- package/dist/cjs/click-outside-only-to-dismiss-strategy-407f6d1e.js +32 -0
- package/dist/cjs/{code-block-22ee2550.js → code-block-d9001f03.js} +2 -2
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-3486cbc0.js → component-value-history-controller-slimmer.abstract-b00e9f58.js} +4 -4
- package/dist/cjs/{content-state-0be6fda3.js → content-state-466f277f.js} +3 -3
- package/dist/cjs/{date-required-rule-99cca681.js → date-required-rule-30ee62d0.js} +1 -1
- package/dist/cjs/{design-token-505997df.js → design-token-a569577e.js} +2 -2
- package/dist/cjs/{dom-node-subject-observer-factory-1c8f7880.js → dom-node-subject-observer-factory-b5e71bf6.js} +4 -0
- package/dist/cjs/{element-appender-slimmer-26420c09.js → element-appender-slimmer-b7fdd82e.js} +160 -36
- package/dist/cjs/{event-emit-slimmer-6a591353.js → event-emit-slimmer-2dacabbd.js} +2 -2
- package/dist/cjs/{form-field-controller-slimmer-56c551ea.js → form-field-controller-slimmer-3ea2464a.js} +2 -2
- package/dist/cjs/{image-annotation-action-462fd073.js → image-annotation-action-4435d531.js} +3 -31
- package/dist/cjs/{index-fc538f17.js → index-19e5b936.js} +1 -1
- package/dist/cjs/index.cjs.js +22 -22
- package/dist/cjs/{inject-keyboard-manager-a6101379.js → inject-keyboard-manager-d21b4387.js} +1 -1
- package/dist/cjs/{internal-vega-event-manager-d587a33c.js → internal-vega-event-manager-6befeb34.js} +13 -2
- package/dist/cjs/{keyboard-manager-d8adb0ed.js → keyboard-manager-3dea6b28.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-15e65357.js → keyboard-manager-slimmer-0d45f944.js} +1 -1
- package/dist/cjs/{language-extension-414149c2.js → language-extension-26331915.js} +2 -2
- package/dist/cjs/loader.cjs.js +15 -15
- package/dist/cjs/{month-view-generator-706c5477.js → month-view-generator-49cc5fc2.js} +1 -1
- package/dist/cjs/{public-rules-2d18cf41.js → public-rules-942bd931.js} +7 -7
- package/dist/cjs/{range-439a0c0c.js → range-cafe69a9.js} +1 -1
- package/dist/cjs/{responsive-format-facade-0ececeb3.js → responsive-format-facade-6c22bbbd.js} +5 -4
- package/dist/cjs/{rich-text-editor-required-rule-5a4f3626.js → rich-text-editor-required-rule-0dcb08c8.js} +1 -1
- package/dist/cjs/sanitize-fb222510.js +131 -0
- package/dist/cjs/{styles.constants-3aff0b56.js → split-cell-operation-9930fde8.js} +1230 -403
- package/dist/cjs/{string-format-strategy.abstract-a8264fca.js → string-format-strategy.abstract-63514c60.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-a8f4a9b1.js → string-input-formatter-slimmer-655d0322.js} +3 -3
- package/dist/cjs/{string-mask-strategy-4e7d3780.js → string-mask-strategy-d23ac21a.js} +2 -2
- package/dist/cjs/{style-formatter-142500c0.js → style-formatter-0e0ae896.js} +2 -2
- package/dist/cjs/{sub-state-notify-slimmer-011866d9.js → sub-state-notify-slimmer-3fa87162.js} +1 -1
- package/dist/cjs/{sub-state-observer-slimmer-23d43f1e.js → sub-state-observer-slimmer-77deba40.js} +1 -1
- package/dist/cjs/{table-extension-2a20da57.js → table-extension-5f27207f.js} +676 -373
- package/dist/cjs/{time-required-rule-9d39a620.js → time-required-rule-c96ecdc9.js} +1 -1
- package/dist/cjs/{type-guard-69d2cf01.js → type-guard-a0f026d8.js} +12 -0
- package/dist/cjs/{valid-credit-card-number-rule-9f40d1d9.js → valid-credit-card-number-rule-c854bed9.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +12 -12
- package/dist/cjs/vega-app-header-button.cjs.entry.js +13 -13
- package/dist/cjs/vega-banner.cjs.entry.js +3 -3
- package/dist/cjs/vega-box.cjs.entry.js +12 -12
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +4 -4
- package/dist/cjs/vega-button-circle.cjs.entry.js +12 -12
- package/dist/cjs/vega-button-group_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-link.cjs.entry.js +4 -4
- package/dist/cjs/vega-button.cjs.entry.js +11 -11
- package/dist/cjs/vega-calendar_4.cjs.entry.js +8 -8
- package/dist/cjs/vega-card.cjs.entry.js +12 -12
- package/dist/cjs/vega-carousel.cjs.entry.js +11 -11
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-chip.cjs.entry.js +13 -13
- package/dist/cjs/vega-code-block.cjs.entry.js +10 -10
- package/dist/cjs/vega-color-picker.cjs.entry.js +5 -5
- package/dist/cjs/vega-combo-box.cjs.entry.js +11 -10
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +392 -345
- package/dist/cjs/vega-dialog_2.cjs.entry.js +14 -14
- package/dist/cjs/vega-divider.cjs.entry.js +13 -13
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +40 -22
- 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 +11 -11
- package/dist/cjs/vega-flex.cjs.entry.js +13 -13
- package/dist/cjs/vega-font.cjs.entry.js +12 -12
- package/dist/cjs/vega-form.cjs.entry.js +8 -8
- package/dist/cjs/vega-grid.cjs.entry.js +12 -12
- package/dist/cjs/vega-icon.cjs.entry.js +12 -12
- package/dist/cjs/vega-image-uploader.cjs.entry.js +14 -14
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-numeric.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-passcode.cjs.entry.js +9 -9
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +14 -14
- package/dist/cjs/vega-input-range.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-select.cjs.entry.js +21 -16
- package/dist/cjs/vega-input.cjs.entry.js +339 -98
- package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +12 -12
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination.cjs.entry.js +13 -13
- package/dist/cjs/vega-popover_2.cjs.entry.js +15 -15
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-radio_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +13 -16
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +143 -194
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +312 -104
- package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +14 -14
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +15 -15
- package/dist/cjs/vega-signature-capture.cjs.entry.js +14 -14
- package/dist/cjs/vega-stepper.cjs.entry.js +6 -6
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-table_11.cjs.entry.js +13 -13
- package/dist/cjs/vega-textarea.cjs.entry.js +6 -6
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +19 -18
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +5 -5
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +14 -14
- package/dist/cjs/vega.cjs.js +15 -15
- package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +1 -1
- package/dist/collection/components/vega-button-group/vega-button-group-item/vega-button-group-item.js +1 -1
- package/dist/collection/components/vega-calendar/vega-calendar.js +1 -1
- package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.js +2 -1
- package/dist/collection/components/vega-date-picker/assets/icons.js +4 -1
- package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-calendar-open-state-controller.js +2 -1
- package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +2 -2
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.js +109 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.js +4 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.js +42 -70
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +12 -56
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +435 -108
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +5 -0
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-search-controller.js +5 -1
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-source-controller.js +7 -0
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +3 -2
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +21 -6
- package/dist/collection/components/vega-field-label/vega-field-label.js +1 -1
- package/dist/collection/components/vega-input/slimmers/controllers/vega-input-render-mode-controller.js +51 -0
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +6 -0
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-suggestions-renderer.js +142 -0
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-renderer.js +12 -1
- package/dist/collection/components/vega-input/vega-input.js +200 -3
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +8 -3
- package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.js +9 -1
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +0 -10
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.js +74 -28
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.js +120 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.js +143 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.js +80 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +9 -30
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +26 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +26 -11
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +52 -12
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.js +66 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.js +11 -6
- package/dist/collection/components/vega-rich-text-editor/extensions/table/constants/styles.constants.js +8 -8
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +32 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.js +3 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +2 -9
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.js +4 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.js +19 -15
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.js +100 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.js +57 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +14 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-selection.js +102 -13
- package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.js +51 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/utils.js +253 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/controllers/vega-rich-text-table-properties-color-controller.js +33 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-cell-properties-form-field-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.js +38 -6
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-field-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-renderer.js +20 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.css +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.js +24 -14
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.js +117 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +6 -4
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.js +6 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.js +15 -8
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.js +41 -46
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.js +69 -48
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.js +50 -54
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.js +106 -14
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.js +204 -9
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.js +32 -0
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-dto.test.js +583 -6
- package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.js +114 -25
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +0 -5
- package/dist/collection/components/vega-selection-chip/vega-selection-chip.js +1 -1
- package/dist/collection/components/vega-time-picker/slimmers/controllers/vega-time-picker-range-dropdown-controller.js +2 -1
- package/dist/collection/components/vega-time-picker/slimmers/controllers/vega-time-picker-single-dropdown-controller.js +2 -1
- package/dist/collection/constants/ui.js +2 -0
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +13 -2
- package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +2 -0
- package/dist/collection/helpers/event-manager/test/component-event-id-map.test.js +3 -1
- package/dist/collection/helpers/event-manager/test/vega-event-manager.test.js +3 -1
- package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +60 -32
- package/dist/collection/helpers/slimmers/element-appender/test/element-appender-slimmer.test.js +3 -2
- package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/click-outside-only-to-dismiss-strategy.js +28 -0
- package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/click-trigger-strategy.js +33 -0
- package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/hover-trigger-strategy.js +42 -0
- package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/none-trigger-strategy.js +22 -0
- package/dist/collection/helpers/slimmers/element-appender/trigger-strategies/trigger-strategy.interface.js +1 -0
- package/dist/collection/types/test/type-guard.test.js +8 -1
- package/dist/collection/types/type-guard.js +11 -0
- package/dist/collection/utils/sanitize.js +126 -0
- package/dist/collection/utils/test/sanitize.test.js +65 -0
- package/dist/esm/{app-globals-8b873b6f.js → app-globals-4146c01c.js} +9 -8
- package/dist/esm/{child-nodes-event-prevent-slimmer-a6afdb1e.js → child-nodes-event-prevent-slimmer-225e7b58.js} +1 -1
- package/dist/esm/click-outside-only-to-dismiss-strategy-3d286c1b.js +30 -0
- package/dist/esm/{code-block-76b29be1.js → code-block-36393b45.js} +3 -3
- package/dist/esm/{component-value-history-controller-slimmer.abstract-e1b0e163.js → component-value-history-controller-slimmer.abstract-82339b2b.js} +4 -4
- package/dist/esm/{content-state-03f1d302.js → content-state-e8ef033a.js} +3 -3
- package/dist/esm/{date-required-rule-a9980386.js → date-required-rule-47ecc28f.js} +1 -1
- package/dist/esm/{design-token-8fedb532.js → design-token-c57a58b4.js} +2 -2
- package/dist/esm/{dom-node-subject-observer-factory-e998eba4.js → dom-node-subject-observer-factory-d4e16f66.js} +3 -1
- package/dist/esm/{element-appender-slimmer-7b9326e2.js → element-appender-slimmer-a7341fc1.js} +160 -36
- package/dist/esm/{event-emit-slimmer-bbf6668c.js → event-emit-slimmer-1bb4b533.js} +2 -2
- package/dist/esm/{form-field-controller-slimmer-a0cff4d3.js → form-field-controller-slimmer-907bf7c2.js} +2 -2
- package/dist/esm/{image-annotation-action-47cdc068.js → image-annotation-action-82cef6e4.js} +4 -31
- package/dist/esm/{index-da7e5fe5.js → index-2466b0c0.js} +1 -1
- package/dist/esm/index.js +21 -21
- package/dist/esm/{inject-keyboard-manager-9241968c.js → inject-keyboard-manager-83d76ff5.js} +1 -1
- package/dist/esm/{internal-vega-event-manager-e799c54a.js → internal-vega-event-manager-2cbb828a.js} +13 -2
- package/dist/esm/{keyboard-manager-89acac79.js → keyboard-manager-c92808d8.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-e303cb7d.js → keyboard-manager-slimmer-79c78ce8.js} +1 -1
- package/dist/esm/{language-extension-de6e6caf.js → language-extension-dcc43702.js} +2 -2
- package/dist/esm/loader.js +15 -15
- package/dist/esm/{month-view-generator-4bec99fd.js → month-view-generator-16192182.js} +1 -1
- package/dist/esm/{public-rules-c48cc5c9.js → public-rules-b8ea651f.js} +7 -7
- package/dist/esm/{range-af6150a8.js → range-872aad9f.js} +1 -1
- package/dist/esm/{responsive-format-facade-16da4623.js → responsive-format-facade-9278eae4.js} +5 -4
- package/dist/esm/{rich-text-editor-required-rule-7255832e.js → rich-text-editor-required-rule-36dd4242.js} +1 -1
- package/dist/esm/sanitize-fd0cb40d.js +129 -0
- package/dist/esm/{styles.constants-0dd6f7fa.js → split-cell-operation-6749f654.js} +1218 -405
- package/dist/esm/{string-format-strategy.abstract-75540c16.js → string-format-strategy.abstract-fc60db79.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-82f85b0b.js → string-input-formatter-slimmer-7a1e8754.js} +3 -3
- package/dist/esm/{string-mask-strategy-4a18ed1a.js → string-mask-strategy-0b0accaa.js} +2 -2
- package/dist/esm/{style-formatter-6ca58f6b.js → style-formatter-e937952a.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-4060c333.js → sub-state-notify-slimmer-2ecdba12.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-bfa5e63e.js → sub-state-observer-slimmer-2d5dba8d.js} +1 -1
- package/dist/esm/{table-extension-c83b7a56.js → table-extension-6b31754b.js} +587 -283
- package/dist/esm/{time-required-rule-8ec1faf5.js → time-required-rule-5fa43804.js} +1 -1
- package/dist/esm/{type-guard-b48aec98.js → type-guard-c65a227d.js} +12 -1
- package/dist/esm/{valid-credit-card-number-rule-96eaf9b1.js → valid-credit-card-number-rule-666c415d.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +12 -12
- package/dist/esm/vega-app-header-button.entry.js +13 -13
- package/dist/esm/vega-banner.entry.js +3 -3
- package/dist/esm/vega-box.entry.js +12 -12
- package/dist/esm/vega-breadcrumb.entry.js +4 -4
- package/dist/esm/vega-button-circle.entry.js +12 -12
- package/dist/esm/vega-button-group_2.entry.js +6 -6
- package/dist/esm/vega-button-link.entry.js +4 -4
- package/dist/esm/vega-button.entry.js +11 -11
- package/dist/esm/vega-calendar_4.entry.js +8 -8
- package/dist/esm/vega-card.entry.js +12 -12
- package/dist/esm/vega-carousel.entry.js +11 -11
- package/dist/esm/vega-checkbox_2.entry.js +6 -6
- package/dist/esm/vega-chip.entry.js +13 -13
- package/dist/esm/vega-code-block.entry.js +10 -10
- package/dist/esm/vega-color-picker.entry.js +5 -5
- package/dist/esm/vega-combo-box.entry.js +11 -10
- package/dist/esm/vega-date-picker_2.entry.js +392 -345
- package/dist/esm/vega-dialog_2.entry.js +14 -14
- package/dist/esm/vega-divider.entry.js +13 -13
- package/dist/esm/vega-dropdown_5.entry.js +40 -22
- 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 +11 -11
- package/dist/esm/vega-flex.entry.js +13 -13
- package/dist/esm/vega-font.entry.js +12 -12
- package/dist/esm/vega-form.entry.js +8 -8
- package/dist/esm/vega-grid.entry.js +12 -12
- package/dist/esm/vega-icon.entry.js +12 -12
- package/dist/esm/vega-image-uploader.entry.js +14 -14
- package/dist/esm/vega-input-credit-card.entry.js +10 -10
- package/dist/esm/vega-input-numeric.entry.js +10 -10
- package/dist/esm/vega-input-passcode.entry.js +9 -9
- package/dist/esm/vega-input-phone-number.entry.js +14 -14
- package/dist/esm/vega-input-range.entry.js +6 -6
- package/dist/esm/vega-input-select.entry.js +21 -16
- package/dist/esm/vega-input.entry.js +340 -99
- package/dist/esm/vega-item-toggle.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +12 -12
- package/dist/esm/vega-loader-wrapper_2.entry.js +13 -13
- package/dist/esm/vega-page-notification_2.entry.js +1 -1
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +1 -1
- package/dist/esm/vega-pagination.entry.js +13 -13
- package/dist/esm/vega-popover_2.entry.js +15 -15
- package/dist/esm/vega-progress-tracker_2.entry.js +12 -12
- package/dist/esm/vega-radio_2.entry.js +9 -9
- package/dist/esm/vega-rich-text-content.entry.js +14 -17
- package/dist/esm/vega-rich-text-editor_4.entry.js +144 -195
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +293 -85
- package/dist/esm/vega-segment-control.entry.js +3 -3
- package/dist/esm/vega-selection-chip_2.entry.js +14 -14
- package/dist/esm/vega-selection-tile_2.entry.js +7 -7
- package/dist/esm/vega-sidenav_3.entry.js +15 -15
- package/dist/esm/vega-signature-capture.entry.js +14 -14
- package/dist/esm/vega-stepper.entry.js +6 -6
- package/dist/esm/vega-tab-group_2.entry.js +4 -4
- package/dist/esm/vega-table_11.entry.js +13 -13
- package/dist/esm/vega-textarea.entry.js +6 -6
- package/dist/esm/vega-time-picker_2.entry.js +19 -18
- package/dist/esm/vega-toggle-switch.entry.js +5 -5
- package/dist/esm/vega-tooltip_2.entry.js +14 -14
- package/dist/esm/vega.js +15 -15
- package/dist/sri/vega-sri-manifest.json +339 -715
- package/dist/types/components/vega-date-picker/assets/icons.d.ts +1 -1
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.d.ts +20 -0
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +1 -0
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.d.ts +4 -11
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.d.ts +4 -9
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +2 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-source-controller.d.ts +2 -0
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +9 -4
- package/dist/types/components/vega-input/slimmers/controllers/vega-input-render-mode-controller.d.ts +27 -0
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +1 -0
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-suggestions-renderer.d.ts +40 -0
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-renderer.d.ts +3 -0
- package/dist/types/components/vega-input/types.d.ts +4 -0
- package/dist/types/components/vega-input/vega-input.d.ts +55 -1
- package/dist/types/components/vega-rich-text-content/vega-rich-text-content.d.ts +3 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/custom-attribute-annotation.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +0 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.d.ts +17 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.d.ts +38 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.d.ts +43 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.d.ts +33 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.d.ts +14 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +15 -6
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +11 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.d.ts +43 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/constants/styles.constants.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.d.ts +2 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +1 -8
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.d.ts +44 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.d.ts +2 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.d.ts +31 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +3 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/table-selection.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.d.ts +26 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/utils/utils.d.ts +102 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/controllers/vega-rich-text-table-properties-color-controller.d.ts +16 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.d.ts +18 -6
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-renderer.d.ts +7 -1
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.d.ts +14 -11
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.d.ts +3 -3
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.d.ts +23 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.d.ts +9 -6
- package/dist/types/components/vega-rich-text-editor/interface.d.ts +0 -5
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.d.ts +8 -1
- package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +0 -2
- package/dist/types/components.d.ts +72 -30
- package/dist/types/constants/ui.d.ts +1 -1
- package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +2 -0
- package/dist/types/helpers/slimmers/element-appender/element-appender-slimmer.d.ts +4 -9
- package/dist/types/helpers/slimmers/element-appender/trigger-strategies/click-outside-only-to-dismiss-strategy.d.ts +21 -0
- package/dist/types/helpers/slimmers/element-appender/trigger-strategies/click-trigger-strategy.d.ts +21 -0
- package/dist/types/helpers/slimmers/element-appender/trigger-strategies/hover-trigger-strategy.d.ts +22 -0
- package/dist/types/helpers/slimmers/element-appender/trigger-strategies/none-trigger-strategy.d.ts +18 -0
- package/dist/types/helpers/slimmers/element-appender/trigger-strategies/trigger-strategy.interface.d.ts +37 -0
- package/dist/types/types/components.type.d.ts +3 -1
- package/dist/types/types/type-guard.d.ts +8 -0
- package/dist/types/types/ui.type.d.ts +9 -0
- package/dist/types/utils/sanitize.d.ts +71 -0
- package/dist/types/utils/spec-utils.d.ts +2 -0
- package/dist/types/utils/test/sanitize.test.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -57
- package/dist/vega/{p-780cbfb0.entry.js → p-01dc2e48.entry.js} +1 -1
- package/dist/vega/p-0459a474.entry.js +1 -0
- package/dist/vega/p-0770a0eb.entry.js +1 -0
- package/dist/vega/{p-a924c1e2.entry.js → p-0bf4a3a7.entry.js} +1 -1
- package/dist/vega/{p-ff9a0e6e.js → p-0d57293b.js} +1 -1
- package/dist/vega/{p-22da15d7.entry.js → p-1199ebf6.entry.js} +1 -1
- package/dist/vega/p-11a6c1b7.js +1 -0
- package/dist/vega/{p-79e8236a.entry.js → p-1415d93b.entry.js} +1 -1
- package/dist/vega/p-1431c8b9.js +1 -0
- package/dist/vega/p-18560714.entry.js +1 -0
- package/dist/vega/{p-a007b493.entry.js → p-1a161082.entry.js} +1 -1
- package/dist/vega/{p-161b9c5b.js → p-1f83cebf.js} +1 -1
- package/dist/vega/{p-16af7681.js → p-20010bd6.js} +1 -1
- package/dist/vega/p-205d8401.js +1 -0
- package/dist/vega/{p-29a9c8f5.entry.js → p-20a98a99.entry.js} +1 -1
- package/dist/vega/{p-86caa739.entry.js → p-228784f7.entry.js} +1 -1
- package/dist/vega/{p-b91c2c9d.js → p-22989693.js} +1 -1
- package/dist/vega/{p-1bda4016.entry.js → p-273911b2.entry.js} +1 -1
- package/dist/vega/{p-e797bf8d.entry.js → p-28e630b2.entry.js} +1 -1
- package/dist/vega/{p-d466baf7.js → p-29f6b2d5.js} +1 -1
- package/dist/vega/{p-6d9731c1.entry.js → p-2af2e1ad.entry.js} +1 -1
- package/dist/vega/{p-d55365b9.entry.js → p-2af78c38.entry.js} +1 -1
- package/dist/vega/{p-c3d388b5.entry.js → p-2c830cba.entry.js} +1 -1
- package/dist/vega/{p-61ae4e9c.entry.js → p-3224d794.entry.js} +1 -1
- package/dist/vega/{p-216f3436.entry.js → p-326b5392.entry.js} +1 -1
- package/dist/vega/{p-69af3422.entry.js → p-3413a678.entry.js} +1 -1
- package/dist/vega/p-3532aa12.js +1 -0
- package/dist/vega/p-395cdd84.entry.js +1 -0
- package/dist/vega/{p-9aac9879.entry.js → p-3a6ff599.entry.js} +1 -1
- package/dist/vega/p-3be82c0f.entry.js +1 -0
- package/dist/vega/p-3c0f55f7.entry.js +1 -0
- package/dist/vega/{p-10ffb765.js → p-3e30567a.js} +1 -1
- package/dist/vega/p-3e5f362f.js +1 -0
- package/dist/vega/p-42cd1fde.js +1 -0
- package/dist/vega/p-476a173a.js +1 -0
- package/dist/vega/p-4b6c60cb.entry.js +1 -0
- package/dist/vega/{p-12a97dad.entry.js → p-4c36b528.entry.js} +1 -1
- package/dist/vega/{p-fa34ace2.entry.js → p-4ecf0ee7.entry.js} +1 -1
- package/dist/vega/{p-813b2915.entry.js → p-4f4c7593.entry.js} +1 -1
- package/dist/vega/p-585edae4.entry.js +1 -0
- package/dist/vega/{p-39d56e3d.js → p-5b048141.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-63246470.js → p-5fdb9047.js} +1 -1
- package/dist/vega/{p-d4e35d2e.entry.js → p-60483e3d.entry.js} +1 -1
- package/dist/vega/{p-de70aac1.js → p-60851f9d.js} +1 -1
- package/dist/vega/{p-73688c4e.entry.js → p-61145506.entry.js} +1 -1
- package/dist/vega/{p-8162980c.js → p-61ddae59.js} +1 -1
- package/dist/vega/{p-98b78c75.entry.js → p-64386be8.entry.js} +1 -1
- package/dist/vega/{p-73689ec0.entry.js → p-6490b69a.entry.js} +1 -1
- package/dist/vega/{p-50a506ea.entry.js → p-6bc1552e.entry.js} +1 -1
- package/dist/vega/{p-206245d2.entry.js → p-6e4e7192.entry.js} +1 -1
- package/dist/vega/{p-8ac453cb.entry.js → p-76d144f5.entry.js} +1 -1
- package/dist/vega/{p-dc2813eb.entry.js → p-76eb9cd0.entry.js} +1 -1
- package/dist/vega/{p-e788598a.entry.js → p-77c9949d.entry.js} +1 -1
- package/dist/vega/p-8187878e.js +1 -0
- package/dist/vega/p-8198a77c.js +1 -0
- package/dist/vega/{p-0e4cecbd.entry.js → p-82ad1006.entry.js} +1 -1
- package/dist/vega/{p-8a4d8139.entry.js → p-839c9d62.entry.js} +1 -1
- package/dist/vega/{p-d07d04e0.entry.js → p-849f78a7.entry.js} +1 -1
- package/dist/vega/{p-ac4bd1f8.js → p-85bfa0f7.js} +1 -1
- package/dist/vega/{p-dd5d917b.entry.js → p-87764570.entry.js} +1 -1
- package/dist/vega/{p-abf871cd.entry.js → p-88c894e8.entry.js} +1 -1
- package/dist/vega/{p-c00adad9.js → p-89083d63.js} +1 -1
- package/dist/vega/{p-a8dad05d.js → p-920719ad.js} +1 -1
- package/dist/vega/p-9472d19a.js +1 -0
- package/dist/vega/{p-c6d98c60.entry.js → p-96657262.entry.js} +1 -1
- package/dist/vega/p-979e4bd4.entry.js +1 -0
- package/dist/vega/{p-f6eab527.entry.js → p-9c624e03.entry.js} +1 -1
- package/dist/vega/{p-088f4613.entry.js → p-a01f985f.entry.js} +1 -1
- package/dist/vega/{p-a4ec6575.js → p-a2aeb646.js} +1 -1
- package/dist/vega/{p-22c76be7.entry.js → p-a495463f.entry.js} +1 -1
- package/dist/vega/p-b4ea3fad.js +1 -0
- package/dist/vega/{p-151b1deb.js → p-b56b0b89.js} +1 -1
- package/dist/vega/{p-3bc7e162.entry.js → p-b5b75a2f.entry.js} +1 -1
- package/dist/vega/{p-d991fb11.js → p-badad9ed.js} +1 -1
- package/dist/vega/{p-24766b9d.entry.js → p-bccaf3d2.entry.js} +1 -1
- package/dist/vega/{p-e13c163c.entry.js → p-bde5c990.entry.js} +1 -1
- package/dist/vega/{p-ab0e013c.entry.js → p-beb6c1ce.entry.js} +1 -1
- package/dist/vega/{p-068ee55e.entry.js → p-c02b01ec.entry.js} +1 -1
- package/dist/vega/p-c1fdcb62.js +1 -0
- package/dist/vega/{p-5d2704c1.entry.js → p-c5e7035b.entry.js} +1 -1
- package/dist/vega/{p-5367eaab.js → p-c841be8d.js} +1 -1
- package/dist/vega/{p-6f08e3e1.entry.js → p-cd078909.entry.js} +1 -1
- package/dist/vega/{p-d1d0f08a.js → p-d0e31633.js} +1 -1
- package/dist/vega/{p-a439e59b.entry.js → p-d5c09a94.entry.js} +1 -1
- package/dist/vega/{p-c8ad47c9.js → p-d907f8a2.js} +1 -1
- package/dist/vega/{p-6c1ef2ed.js → p-dd11f735.js} +1 -1
- package/dist/vega/{p-c9541fc2.entry.js → p-de850e98.entry.js} +1 -1
- package/dist/vega/{p-3d85411d.js → p-e16b3adf.js} +1 -1
- package/dist/vega/{p-34a994a1.entry.js → p-e1dd23f8.entry.js} +1 -1
- package/dist/vega/{p-7ca9f6f1.js → p-e1de1cdc.js} +1 -1
- package/dist/vega/{p-1f4a814e.entry.js → p-e7cfb6b6.entry.js} +1 -1
- package/dist/vega/{p-ddf81373.js → p-e819940c.js} +1 -1
- package/dist/vega/{p-e0cefd90.entry.js → p-e95ed6f3.entry.js} +1 -1
- package/dist/vega/p-ebb14c84.js +1 -0
- package/dist/vega/{p-f519cdc3.entry.js → p-f0a8aed3.entry.js} +1 -1
- package/dist/vega/p-f2b8abd3.entry.js +1 -0
- package/dist/vega/{p-d4719c14.entry.js → p-fb238751.entry.js} +1 -1
- package/dist/vega/p-fdebc47f.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -172
- package/package.json +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.js +0 -51
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.js +0 -26
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.d.ts +0 -22
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.d.ts +0 -22
- package/dist/vega/app-globals-955a2b3b.js +0 -427
- package/dist/vega/child-nodes-event-prevent-slimmer-a604a6dd.js +0 -156
- package/dist/vega/design-token-56b26205.js +0 -402
- package/dist/vega/element-appender-slimmer-8355fb28.js +0 -1508
- package/dist/vega/event-emit-slimmer-7a14f5e9.js +0 -265
- package/dist/vega/internal-vega-event-manager-8c62c88e.js +0 -458
- package/dist/vega/p-08b4d097.entry.js +0 -1
- package/dist/vega/p-207cfa6a.js +0 -1
- package/dist/vega/p-213be5e9.entry.js +0 -1
- package/dist/vega/p-224a4f3f.entry.js +0 -1
- package/dist/vega/p-40660c09.js +0 -1
- package/dist/vega/p-550ce71a.entry.js +0 -1
- package/dist/vega/p-6665d083.entry.js +0 -1
- package/dist/vega/p-7172332a.entry.js +0 -1
- package/dist/vega/p-82ec9721.entry.js +0 -1
- package/dist/vega/p-99e3dcab.js +0 -1
- package/dist/vega/p-9a83a6b0.js +0 -1
- package/dist/vega/p-a4d0ab07.js +0 -1
- package/dist/vega/p-a6e03df4.entry.js +0 -1
- package/dist/vega/p-c335088c.js +0 -1
- package/dist/vega/p-c674b07c.js +0 -1
- package/dist/vega/p-d1349401.entry.js +0 -1
- package/dist/vega/p-d2033624.js +0 -1
- package/dist/vega/p-db482ee1.js +0 -1
- package/dist/vega/p-f4b46f6b.entry.js +0 -1
- package/dist/vega/p-fbfb4c70.entry.js +0 -1
- package/dist/vega/p-ff57c872.js +0 -1
- package/dist/vega/p-ff921d10.js +0 -1
- package/dist/vega/public-api-8dd022fa.js +0 -6043
- package/dist/vega/public-api-baaf7593.js +0 -4
- package/dist/vega/responsive-format-facade-98596535.js +0 -913
- package/dist/vega/style-formatter-0ae102e9.js +0 -32
- package/dist/vega/vega-accordion.entry.js +0 -291
- package/dist/vega/vega-app-header-button.entry.js +0 -452
- package/dist/vega/vega-banner.entry.js +0 -351
- package/dist/vega/vega-box.entry.js +0 -353
- package/dist/vega/vega-breadcrumb.entry.js +0 -249
- package/dist/vega/vega-button-circle.entry.js +0 -245
- package/dist/vega/vega-button-group.entry.js +0 -203
- package/dist/vega/vega-button-link.entry.js +0 -226
- package/dist/vega/vega-button.entry.js +0 -259
- package/dist/vega/vega-calendar.entry.js +0 -3884
- package/dist/vega/vega-card.entry.js +0 -226
- package/dist/vega/vega-carousel.entry.js +0 -540
- package/dist/vega/vega-checkbox-group.entry.js +0 -266
- package/dist/vega/vega-checkbox.entry.js +0 -335
- package/dist/vega/vega-chip.entry.js +0 -321
- package/dist/vega/vega-code-block.entry.js +0 -4372
- package/dist/vega/vega-color-picker.entry.js +0 -258
- package/dist/vega/vega-combo-box.entry.js +0 -748
- package/dist/vega/vega-date-picker-calendar.entry.js +0 -1381
- package/dist/vega/vega-date-picker.entry.js +0 -1646
- package/dist/vega/vega-dialog.entry.js +0 -158
- package/dist/vega/vega-divider.entry.js +0 -179
- package/dist/vega/vega-dropdown-content-box.entry.js +0 -57
- package/dist/vega/vega-dropdown-item.entry.js +0 -352
- package/dist/vega/vega-dropdown.entry.js +0 -2136
- package/dist/vega/vega-field-label.entry.js +0 -182
- package/dist/vega/vega-file-uploader.entry.js +0 -751
- package/dist/vega/vega-flag-icon.entry.js +0 -216
- package/dist/vega/vega-flex.entry.js +0 -224
- package/dist/vega/vega-font.entry.js +0 -327
- package/dist/vega/vega-form.entry.js +0 -1008
- package/dist/vega/vega-grid.entry.js +0 -129
- package/dist/vega/vega-icon.entry.js +0 -256
- package/dist/vega/vega-image-uploader.entry.js +0 -977
- package/dist/vega/vega-input-credit-card.entry.js +0 -549
- package/dist/vega/vega-input-numeric.entry.js +0 -471
- package/dist/vega/vega-input-passcode.entry.js +0 -728
- package/dist/vega/vega-input-phone-number.entry.js +0 -9143
- package/dist/vega/vega-input-range.entry.js +0 -693
- package/dist/vega/vega-input-select.entry.js +0 -1268
- package/dist/vega/vega-input.entry.js +0 -1735
- package/dist/vega/vega-item-toggle.entry.js +0 -190
- package/dist/vega/vega-left-nav-group.entry.js +0 -433
- package/dist/vega/vega-left-nav-link.entry.js +0 -317
- package/dist/vega/vega-left-nav-section.entry.js +0 -97
- package/dist/vega/vega-left-nav.entry.js +0 -654
- package/dist/vega/vega-loading-indicator.entry.js +0 -209
- package/dist/vega/vega-modal.entry.js +0 -1287
- package/dist/vega/vega-nav-card.entry.js +0 -163
- package/dist/vega/vega-pagination-page-selector-mobile.entry.js +0 -214
- package/dist/vega/vega-pagination.entry.js +0 -629
- package/dist/vega/vega-popover-content-box.entry.js +0 -101
- package/dist/vega/vega-popover.entry.js +0 -362
- package/dist/vega/vega-progress-tracker.entry.js +0 -757
- package/dist/vega/vega-radio-group.entry.js +0 -496
- package/dist/vega/vega-radio.entry.js +0 -272
- package/dist/vega/vega-rich-text-editor-toolbar-button.entry.js +0 -169
- package/dist/vega/vega-rich-text-editor.entry.js +0 -4107
- package/dist/vega/vega-rich-text-image-editor.entry.js +0 -216
- package/dist/vega/vega-rich-text-link-editor.entry.js +0 -238
- package/dist/vega/vega-rich-text-table-properties.entry.js +0 -641
- package/dist/vega/vega-rich-text-table-setting.entry.js +0 -525
- package/dist/vega/vega-segment-control.entry.js +0 -350
- package/dist/vega/vega-selection-chip-group.entry.js +0 -447
- package/dist/vega/vega-selection-chip.entry.js +0 -443
- package/dist/vega/vega-selection-tile-group.entry.js +0 -438
- package/dist/vega/vega-selection-tile.entry.js +0 -409
- package/dist/vega/vega-sidenav-link.entry.js +0 -160
- package/dist/vega/vega-sidenav.entry.js +0 -766
- package/dist/vega/vega-signature-capture.entry.js +0 -589
- package/dist/vega/vega-stepper.entry.js +0 -292
- package/dist/vega/vega-tab-group-panel.entry.js +0 -79
- package/dist/vega/vega-tab-group.entry.js +0 -1281
- package/dist/vega/vega-table-body.entry.js +0 -48
- package/dist/vega/vega-table-cell.entry.js +0 -243
- package/dist/vega/vega-table-foot-cell.entry.js +0 -169
- package/dist/vega/vega-table-foot-row.entry.js +0 -219
- package/dist/vega/vega-table-foot.entry.js +0 -136
- package/dist/vega/vega-table-head-cell.entry.js +0 -339
- package/dist/vega/vega-table-head-row.entry.js +0 -416
- package/dist/vega/vega-table-head.entry.js +0 -113
- package/dist/vega/vega-table-row.entry.js +0 -666
- package/dist/vega/vega-table.entry.js +0 -3707
- package/dist/vega/vega-textarea.entry.js +0 -329
- package/dist/vega/vega-time-picker.entry.js +0 -2039
- package/dist/vega/vega-toggle-switch.entry.js +0 -194
- package/dist/vega/vega-tooltip.entry.js +0 -339
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as r}from"./p-
|
|
1
|
+
import{R as r}from"./p-1f83cebf.js";import{I as e}from"./p-abd7aeaa.js";class s extends e{constructor(r){super(),this.config=r}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e} for range mode`);const s=Array.isArray(e)&&2===e.length&&e.every((e=>r(e,this.config.timeFormat)));return{isValid:s,message:s?"":"This field is required"}}canEvaluate(r,e){return e?this.isAcceptedInputType(r)&&!e.disabled&&e.visible:this.isAcceptedInputType(r)}shouldShowError(r){return!r.disabled&&r.visible&&(r.touched||r.modified)}isAcceptedInputType(r){return null==r||Array.isArray(r)}}class t extends e{constructor(r){super(),this.config=r}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e}`);const s=r(e,this.config.timeFormat);return{isValid:s,message:s?"":"This field is required"}}canEvaluate(r,e){return e?this.isAcceptedInputType(r)&&!e.disabled&&e.visible:this.isAcceptedInputType(r)}shouldShowError(r){return!r.disabled&&r.visible&&(r.touched||r.modified)}isAcceptedInputType(r){return null==r||"string"==typeof r}}export{s as T,t as a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as o,H as e,g as i}from"./p-6b2342e0.js";import{s}from"./p-519a7d55.js";import{j as r,f as d,k as l}from"./p-
|
|
1
|
+
import{r as t,h as o,H as e,g as i}from"./p-6b2342e0.js";import{s}from"./p-519a7d55.js";import{j as r,f as d,k as l}from"./p-5fdb9047.js";import{a as n}from"./p-d9671d27.js";import{c as a,M as h,V as c,I as p}from"./p-6e1ab235.js";import{V as b,I as m}from"./p-d849e0f5.js";import{v}from"./p-4866e390.js";import{R as f}from"./p-ebb14c84.js";import{P as g}from"./p-10ac8b57.js";import{f as j}from"./p-8198a77c.js";import"./p-1f83cebf.js";import"./p-ed45b3b6.js";import"./p-40f39194.js";import"./p-d884c644.js";import"./p-f69f84a7.js";import"./p-2d0d575f.js";import"./p-a528714c.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-b75ee3ba.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-205d8401.js";import"./p-3532aa12.js";import"./p-11a6c1b7.js";import"./p-331a62d5.js";import"./p-b56b0b89.js";import"./p-5b048141.js";import"./p-1b44db34.js";import"./p-02841589.js";import"./p-ef9cbad1.js";import"./p-112455b1.js";import"./p-bf19682d.js";import"./p-8c9ea6f4.js";import"./p-42cd1fde.js";import"./p-fcabf0dc.js";import"./p-a7b5f497.js";import"./p-77e64f26.js";import"./p-1bc5b3bc.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";var y=function(t,o,e,i){var s,r=arguments.length,d=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(t,o,e,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(d=(r<3?s(d):r>3?s(o,e,d):s(o,e))||d);return r>3&&d&&Object.defineProperty(o,e,d),d};class w extends c{componentWillLoad(){this.appendAllStateStyles()}watchBorder(){this.appendStateStyles(this.border,"border"),this.makeBorderColorAfterBorder()}watchShadow(){this.appendStateStyles(this.shadow,"shadow")}watchBorderColor(){this.appendStateStyles(this.borderColor,"borderColor"),this.makeBorderColorAfterBorder()}watchBackgroundColor(){this.appendStateStyles(this.backgroundColor,"backgroundColor")}appendStateStyles(t,o){var e;if(null===(e=this.host.shadowRoot.querySelector(`style#state-styles-${o}`))||void 0===e||e.remove(),r(t,o)){const e=document.createElement("style");e.setAttribute("id",`state-styles-${o}`),v.nonce&&e.setAttribute("nonce",v.nonce),e.innerHTML=r(t,o),this.host.shadowRoot.append(e)}}makeBorderColorAfterBorder(){const t=this.host.shadowRoot.querySelector("style#state-styles-borderColor"),o=this.host.shadowRoot.querySelector("style#state-styles-border");t&&o&&o.after(t)}appendAllStateStyles(){this.appendStateStyles(this.backgroundColor,"backgroundColor"),this.appendStateStyles(this.border,"border"),this.appendStateStyles(this.borderColor,"borderColor"),this.appendStateStyles(this.shadow,"shadow")}}y([a()],w.prototype,"host",void 0),y([a()],w.prototype,"backgroundColor",void 0),y([a()],w.prototype,"borderColor",void 0),y([a()],w.prototype,"border",void 0),y([a()],w.prototype,"shadow",void 0),y([h("componentWillLoad")],w.prototype,"componentWillLoad",null),y([h("watchBorder")],w.prototype,"watchBorder",null),y([h("watchShadow")],w.prototype,"watchShadow",null),y([h("watchBorderColor")],w.prototype,"watchBorderColor",null),y([h("watchBackgroundColor")],w.prototype,"watchBackgroundColor",null);var u=function(t,o,e,i){var s,r=arguments.length,d=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(t,o,e,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(d=(r<3?s(d):r>3?s(o,e,d):s(o,e))||d);return r>3&&d&&Object.defineProperty(o,e,d),d};class k extends c{constructor(){super(...arguments),this.paddingStyleRef=null,this.marginStyleRef=null,this.cornersStyleRef=null}setDefaultStyle(){this.generatePaddingStyle(),this.generateMarginStyle(),this.generateCornersStyle()}generatePaddingStyle(){const t=d(this.padding,"paddingStyle");this.attachStyle("padding",t)}generateMarginStyle(){const t=d(this.margin,"marginStyle");this.attachStyle("margin",t)}generateCornersStyle(){const t=d(this.corners,"cornersStyle");this.attachStyle("corners",t)}attachStyle(t,o){if(o){const e=`${t}StyleRef`,i=this.host.shadowRoot;this[e]||(this[e]=document.createElement("style"),v.nonce&&this[e].setAttribute("nonce",v.nonce),i.appendChild(this[e])),this[e].innerHTML=o}}}u([a()],k.prototype,"host",void 0),u([a()],k.prototype,"padding",void 0),u([a()],k.prototype,"margin",void 0),u([a()],k.prototype,"corners",void 0),u([h("componentWillLoad")],k.prototype,"setDefaultStyle",null),u([h("watchPaddingChange")],k.prototype,"generatePaddingStyle",null),u([h("watchMarginChange")],k.prototype,"generateMarginStyle",null),u([h("watchCornersChange")],k.prototype,"generateCornersStyle",null);var C=function(t,o,e,i){var s,r=arguments.length,d=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(t,o,e,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(d=(r<3?s(d):r>3?s(o,e,d):s(o,e))||d);return r>3&&d&&Object.defineProperty(o,e,d),d};const S=class{constructor(o){t(this,o),this.globalSlimmers={},this.pageResizeSlimmer=new g,this.stateStyleController=new w,this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.responsiveStyleController=new k}watchPaddingChange(){}watchMarginChange(){}watchBorder(){}watchShadow(){}watchBorderColor(){}watchBackgroundColor(){}watchCornersChange(){}render(){const t=[d(this.padding,"padding"),d(this.margin,"margin"),d(this.display,"boxDisplay"),d(this.corners,"corners"),l(this.borderStyle),f.formatCustom(this.responsiveClass)],i=Object.assign({width:d(this.width,"widthAndHeight"),height:d(this.height,"widthAndHeight"),minHeight:d(this.minHeight,"widthAndHeight"),maxHeight:d(this.maxHeight,"widthAndHeight"),order:this.order&&`${f.formatCustom(this.order)}`,alignSelf:this.alignSelf&&`${f.formatCustom(this.alignSelf)}`,justifySelf:this.justifySelf&&`${f.formatCustom(this.justifySelf)}`},j(this.flex,this.flexGrow,this.flexShrink,this.flexBasis));return this.gridArea?i.gridArea=`${f.formatCustom(this.gridArea)}`:(i.gridColumn=this.gridColumn&&`${f.formatCustom(this.gridColumn)}`,i.gridRow=this.gridRow&&`${f.formatCustom(this.gridRow)}`),s(o(e,{style:i,class:n(t)},o("slot",null)),this.host)}get host(){return i(this)}static get watchers(){return{padding:["watchPaddingChange"],margin:["watchMarginChange"],border:["watchBorder"],shadow:["watchShadow"],borderColor:["watchBorderColor"],backgroundColor:["watchBackgroundColor"],corners:["watchCornersChange"]}}};C([m()],S.prototype,"globalSlimmers",void 0),C([p()],S.prototype,"pageResizeSlimmer",void 0),C([p()],S.prototype,"stateStyleController",void 0),C([p()],S.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),C([p()],S.prototype,"responsiveStyleController",void 0),S.style=":host(.v-block),.v-block{display:block}:host(.v-inline-block),.v-inline-block{display:inline-block}:host(.v-hidden),.v-hidden{display:none}@media (min-width: 320px){:host(.S\\:v-block),.S\\:v-block{display:block}:host(.S\\:v-inline-block),.S\\:v-inline-block{display:inline-block}:host(.S\\:v-hidden),.S\\:v-hidden{display:none}}@media (min-width: 768px){:host(.M\\:v-block),.M\\:v-block{display:block}:host(.M\\:v-inline-block),.M\\:v-inline-block{display:inline-block}:host(.M\\:v-hidden),.M\\:v-hidden{display:none}}@media (min-width: 1024px){:host(.L\\:v-block),.L\\:v-block{display:block}:host(.L\\:v-inline-block),.L\\:v-inline-block{display:inline-block}:host(.L\\:v-hidden),.L\\:v-hidden{display:none}}@media (min-width: 1440px){:host(.XL\\:v-block),.XL\\:v-block{display:block}:host(.XL\\:v-inline-block),.XL\\:v-inline-block{display:inline-block}:host(.XL\\:v-hidden),.XL\\:v-hidden{display:none}}:host(.v-border-solid),.v-border-solid{border-style:solid}:host(.v-border-dashed),.v-border-dashed{border-style:dashed}:host(.v-border-dotted),.v-border-dotted{border-style:dotted}:host(.v-border-double),.v-border-double{border-style:double}:host(.v-border-none),.v-border-none{border-style:none}:host{display:block}";export{S as vega_box}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t}from"./p-b75ee3ba.js";class e{static sanitizeHtmlLabel(t){return this.sanitize(t,this.LABEL_ALLOWED_TAGS)}static sanitize(e,s){if(""===e.trim())return"";const n=t();if(!n)return"";const i=(new DOMParser).parseFromString(e,"text/html"),r=n.createDocumentFragment();return i.body.childNodes.forEach((t=>{const e=this.sanitizeNode(t,s,n);e&&r.appendChild(e)})),this.serializeFragment(r,n)}static sanitizeNode(t,e,s){switch(t.nodeType){case Node.TEXT_NODE:return t.cloneNode(!0);case Node.ELEMENT_NODE:return this.sanitizeElement(t,e,s);default:return null}}static sanitizeElement(t,e,s){if(!e.has(t.tagName)){const n=s.createDocumentFragment();return t.childNodes.forEach((t=>{const i=this.sanitizeNode(t,e,s);i&&n.appendChild(i)})),n}const n=s.createElement(t.tagName.toLowerCase());return t.childNodes.forEach((t=>{const i=this.sanitizeNode(t,e,s);i&&n.appendChild(i)})),n}static serializeFragment(t,e){var s;const n=e.createElement("div");return n.appendChild(t),0===n.children.length?null!==(s=n.textContent)&&void 0!==s?s:"":n.innerHTML}}function s(t){return e.sanitizeHtmlLabel(t)}e.LABEL_ALLOWED_TAGS=new Set(["B","I","STRONG","EM"]);export{s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t,e,b as n,h as s,A as r,T as o,n as i,H as a,o as l,c,p as d,q as h,r as u,t as m,u as w,I as T,m as p,S as E,j as g,B as k,v as f,f as R,w as B,x as I,C as x,y as b,s as O,N as L,z as A,D as N,E as y,F as C,l as j,G as H,M as S,J as v,K as D,U as M,L as P,O as V,P as F,R as U}from"./p-39d56e3d.js";import{g as z}from"./p-a4670e23.js";import{i as $}from"./p-161b9c5b.js";import{C as G}from"./p-2d0d575f.js";import{d as J}from"./p-ff57c872.js";import{d as W,e as K}from"./p-1b44db34.js";import{d as X}from"./p-02841589.js";import{r as Y,i as Z}from"./p-d9671d27.js";import{c as _}from"./p-bf19682d.js";import{L as Q}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 l),r.register(c.LINE_BREAK_SINGLE_BLOCK,RTEListItemBlock.name,new d),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,RTEListItemBlock.name,new h),r.register(c.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(c.SPLIT_BLOCK_WITH_NODE,RTEListItemBlock.name,new u),r.register(c.REPLACE_CHILD_NODES,RTEListItemBlock.name,new m),r.register(c.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(c.MERGE_TWO_BLOCKS_NODES,RTEListItemBlock.name,new w),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.parent.apply(t)}});class q extends k{constructor(){super(...arguments),this.type=f.LIST}renderStyle(t){return(null==t?void 0:t.standalone)?{paddingLeft:"8px",marginLeft:"16px"}:null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new q}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(f.LIST,new q)}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 x.from(e);case"customClass":return I.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(c.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 E)))));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(c.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 E))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new g(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 g(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(c.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 tt{}class et{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 nt=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)}},st=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 et(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 nt.getElementToBlockStrategies()}};class rt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class ot 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 it extends ot{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class at extends L{constructor(t,e){super(),this.type=A.IMAGE,this.size=t,this.alt=e}static from(t,e){return[A.IMAGE,new at(t,e)]}toJSON(){return $(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new at(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={verticalAlign:"bottom"};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 N{constructor(t,e,n,s){super(t,s),this.type=y.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"]),l=Object.assign(Object.assign({},a),{size:null!=i?i:r?"md":void 0});return s.annotationMap=new Map(Object.keys(l).map((t=>"size"===t||"alt"===t?at.from(l.size,l.alt):this.createAnnotationEntity(t,l[t]))).filter($)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof at||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(A.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(c.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 lt extends S{constructor(t,e){super(),this.type=c.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(c.MERGE_TWO_BLOCKS_NODES,RTEImageBlock.name,new w),r.register(c.REPLACE_CHILD_NODES,RTEImageBlock.name,new m),r.register(c.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(c.LINE_BREAK_SINGLE_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=new lt(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(c.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(c.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 g(e,o)):(e.apply(new v(n,r)),e.parent.apply(new T(e,o)))}}),r.register(a.name,RTEImageBlock.name,new l);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;return[`<${t}${super.generateAttributeString()}>`,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()))})}}class ct extends S{constructor(t){super(),this.type=c.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class dt 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 ct(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 ht 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 g(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(A.LINK),e.apply(new s([n]))),e}}}class ut extends S{constructor(t,e,n=!1){super(),this.isFlushable=!0,this.type=c.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=t,this.offset=e,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class mt 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),l=[i,s];n&&l.push(a),t.apply(new g(r,...l)),t.apply(new p(r))}else t.apply(new g(r,s));else t.apply(0!==o?new T(r,s):new g(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new ut(t))}}class wt 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 g(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new ut(t))}}class Tt 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 g(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(A.LINK),e}}class pt extends S{constructor(t){super(),this.type=c.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class Et 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 pt(e):new p(e))}}class gt 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 g(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 kt=new class{registerBlockBasicStrategies(t){r.register(c.DELETE_CHILDREN,t,t===RTEListBlock.name?new Et:new P),r.register(c.APPEND_CHILDREN,t,new rt),r.register(c.INSERT_CHILDREN_BEFORE,t,new ot),r.register(c.INSERT_CHILDREN_AFTER,t,new it),r.register(c.DELETE_BLOCK_CONTENT,t,new dt),r.register(c.INSERT_NEW_PARAGRAPH,t,t===RTEListItemBlock.name?new Tt:new ht),r.register(c.INSERT_TEXT_TO_DECORATOR_NODE,t,new wt),r.register(c.INSERT_NODE_TO_NEAREST_ROOT,t,new mt),r.register(c.PASTE_CONTENT,t,new gt)}};class ft{}class Rt extends ft{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||"bold"===t.style.fontWeight||"700"===t.style.fontWeight||t.classList.contains("v-rte--bold")}}class Bt extends ft{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 It extends ft{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 xt extends ft{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{[X(e[0].trim())]:e[1].trim().replace(";","")}})).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{}):{}}}class bt extends ft{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 Ot extends ft{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 Lt extends ft{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 At extends ft{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=Y(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=V.filter((t=>t.key!==F.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 Nt extends ft{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||"italic"===t.style.fontStyle||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class yt extends ft{constructor(){super(...arguments),this.handlers=[new Bt,new It,new xt]}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 Ct extends ft{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes("line-through")||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class jt extends ft{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes("underline")||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class Ht extends ft{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"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|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class St extends ft{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 vt extends ft{canHandle(t){return"RTEImageNode"===t.name}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}class Dt extends ft{constructor(){super(...arguments),this.customAttributeHandler=new Bt,this.customStyleAnnotationHandler=new xt,this.customClassAnnotationHandler=new It}canHandle(t,e){return"RTETextNode"===t.name&&!1===e.autoMatchFormat}handle(t,e){if(Dt.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}}Dt.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 Mt=new class{constructor(){this.handlers=[new Ot,new bt,new Rt,new Nt,new jt,new Ct,new At,new yt,new Lt,new St,new vt,new Bt,new It,new xt,new yt,new Ht,new Dt]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){const s="A"===e.tagName;return this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof yt)).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)}),{})}};class Pt extends tt{constructor(){super(...arguments),this.annotationHandler=new Ht}generateChildNodes(t,e,s){const r=[],o=!(!s||!1!==s.autoMatchFormat),i=Object.assign({},e);return t.forEach((t=>{const a=nt.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let l=null;if(a&&(l=a.handle([t],s,i)),l)r.push(l);else if(Z(t)&&t.childNodes.length>0){const a=Mt.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 Vt extends Pt{canHandle(t,e,n){const s=t[e];return!n.autoMatchFormat&&("DIV"!==s.nodeName||s.childNodes.length>0&&"IMG"!==s.childNodes[0].nodeName)&&Vt.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:Mt.generate(RTEHtmlBlock,t,e),children:[]}}}Vt.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 Ft extends Pt{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 Ut extends Pt{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:Mt.generate(RTEImageNode,t,e)}],annotations:Object.assign(Object.assign({},Mt.generate(RTEImageBlock,t.parentElement,e)),{internalWrapper:n})},e)}}class zt extends Pt{canHandle(t,e){let n=0;for(let s=e;s<t.length;s++){const e=t[s];if(e.nodeType!==Node.TEXT_NODE&&(!zt.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?Mt.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),a=o?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),l=!o&&!a;return e.from(Object.assign({id:z(),type:a||"paragraph",nodes:i},l?{annotations:{internalWrapper:l}}:{annotations:Mt.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}}zt.canHandleTags=[...Dt.canHandleTags,"CODE","A","VEGA-RICH-TEXT-LINK-EDITOR","BR"];class $t extends tt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:z(),type:"text",text:t,annotations:e}}}U.registerRTEDTOClass("paragraph",e),U.registerRTEDTOClass("title",e),U.registerRTEDTOClass("subtitle",e),U.registerRTEDTOClass("heading-1",e),U.registerRTEDTOClass("heading-2",e),U.registerRTEDTOClass("heading-3",e),U.registerRTEDTOClass("heading-4",e),U.registerRTEDTOClass("heading-5",e),U.registerRTEDTOClass("heading-6",e),U.registerRTEDTOClass("heading-6",e),U.registerRTEDTOClass("list-item",RTEListItemBlock),U.registerRTEDTOClass("bullet-list",RTEListBlock),U.registerRTEDTOClass("number-list",RTEListBlock),U.registerRTEDTOClass("image",RTEImageBlock),U.registerRTEDTOClass("code-block",b),U.registerRTEDTOClass("html-block",RTEHtmlBlock),U.registerRTEDTOClass("text",n),U.registerRTEDTOClass("image",RTEImageNode),kt.registerBlockBasicStrategies(e.name),kt.registerBlockBasicStrategies(RTEListBlock.name),kt.registerBlockBasicStrategies(RTEListItemBlock.name),kt.registerBlockBasicStrategies(RTEImageBlock.name),kt.registerBlockBasicStrategies(RTEHtmlBlock.name),nt.registerElementToBlockStrategy(new zt),nt.registerElementToBlockStrategy(new class extends Ut{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}}),nt.registerElementToBlockStrategy(new class extends Ut{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:Mt.generate(RTEImageNode,n,e)}],annotations:Mt.generate(RTEImageBlock,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),nt.registerElementToBlockStrategy(new class extends Ut{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),nt.registerElementToBlockStrategy(new class extends Pt{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:Mt.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),nt.registerElementToBlockStrategy(new Ft),nt.registerElementToBlockStrategy(new class extends Ft{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}}),nt.registerElementToBlockStrategy(new class extends Pt{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:Mt.generate(RTEListItemBlock,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),Mt.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),nt.registerElementToBlockStrategy(new class extends Pt{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}}),nt.registerElementToBlockStrategy(new class extends Pt{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:Mt.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}}),nt.registerElementToBlockStrategy(new class extends Pt{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:Mt.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}}),nt.registerElementToBlockStrategy(new Vt),nt.registerElementToNodeStrategy(new class extends $t{canHandle(t,e){const n=t[e];return!Z(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=Mt.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?_(Object.assign(Object.assign({},n.supportsHtmlTag(i.nodeName.toLowerCase())?a:{}),{inlineHtml:a.inlineHtml,plainText:$(a.inlineHtml)})):a;return Object.assign({},this.generateTextNode("",t))}}}),nt.registerElementToNodeStrategy(new class extends $t{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(),l=o&&!n.supportsHtmlTag(a),c=this.generateTextNode(String(i.textContent),o?_(Object.assign(Object.assign({},"span"===a?r:{link:r.link,code:"code"===a?r.code:void 0}),{inlineHtml:r.inlineHtml,plainText:l||void 0})):r);return Object.assign({},c)}});class Gt{static preserve(t){const e=t.replace(/\s+style=/g," data-style=");return new Jt(e)}}class Jt{constructor(t){this.processedHtml=t}getProcessedHtml(){return this.processedHtml}restore(t){this.walkNodes(t)}walkNodes(t){t.forEach((t=>{if(Z(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 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=U.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=t.replace(/>\s+<\/?/g,(t=>t.endsWith("</")?t:"><")).replace(/(>)[\n\t]+(?=[a-zA-Z0-9_\W])/g,"$1").replace(/([a-zA-Z0-9_\W])[\n\t]+(?=<)/g,"$1"),s=Gt.preserve(n),r=s.getProcessedHtml(),o=(new DOMParser).parseFromString(r,"text/html").body,i=Array.from(o.childNodes);s.restore(i);const a=st.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&&Q.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&&G.notify(J.getSubject(t,K),{})}}getLastNode(){return 0===this.children.length?null:this.children[this.children.length-1].getLastNode()}toListItem(t){t.children.map((t=>t.apply(new E)));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(c.DELETE_CHILDREN,VegaRTEContent.name,new P),r.register(c.APPEND_CHILDREN,VegaRTEContent.name,new rt),r.register(c.INSERT_CHILDREN_BEFORE,VegaRTEContent.name,new ot),r.register(c.INSERT_CHILDREN_AFTER,VegaRTEContent.name,new it),r.register(c.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 g(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(c.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&&G.notify(J.getSubject(o,W),{node:s,offset:n,updateDirectly:r})}});export{ft as A,Pt as B,nt as E,lt as I,ct as M,gt as P,kt as R,Gt as S,ut as U,VegaRTEContent as V,tt as a,RTEListItemBlock as b,RTEImageBlock as c,ot as d,RTEListBlock as e,RTEImageNode as f,at as g,Mt as h,st as i}
|
|
1
|
+
import{d as t,e,b as n,h as s,A as r,T as o,o as i,H as a,p as l,c,q as d,r as h,t as u,u as m,v as w,I as T,m as p,S as E,j as g,B as k,w as f,f as R,x as B,y as I,C as b,z as x,s as O,N as L,D as A,E as N,F as y,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 V,Q as F,R as U}from"./p-5b048141.js";import{g as z}from"./p-a4670e23.js";import{i as $}from"./p-1f83cebf.js";import{C as G}from"./p-2d0d575f.js";import{d as J}from"./p-11a6c1b7.js";import{d as W,e as K}from"./p-1b44db34.js";import{d as Q}from"./p-02841589.js";import{r as X,i as Y}from"./p-d9671d27.js";import{c as Z}from"./p-bf19682d.js";import{L as _}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 l),r.register(c.LINE_BREAK_SINGLE_BLOCK,RTEListItemBlock.name,new d),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,RTEListItemBlock.name,new h),r.register(c.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(c.SPLIT_BLOCK_WITH_NODE,RTEListItemBlock.name,new u),r.register(c.REPLACE_CHILD_NODES,RTEListItemBlock.name,new m),r.register(c.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(c.MERGE_TWO_BLOCKS_NODES,RTEListItemBlock.name,new w),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.parent.apply(t)}});class q extends k{constructor(){super(...arguments),this.type=f.LIST}renderStyle(t){return(null==t?void 0:t.standalone)?{paddingLeft:"8px",marginLeft:"16px"}:null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new q}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(f.LIST,new q)}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 b.from(e);case"customClass":return I.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(c.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 E)))));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(c.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 E))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new g(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 g(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(c.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 tt{}class et{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 nt=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)}},st=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 et(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 nt.getElementToBlockStrategies()}};class rt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class ot 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 it extends ot{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class at extends L{constructor(t,e){super(),this.type=A.IMAGE,this.size=t,this.alt=e}static from(t,e){return[A.IMAGE,new at(t,e)]}toJSON(){return $(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new at(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={verticalAlign:"bottom"};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 N{constructor(t,e,n,s){super(t,s),this.type=y.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"]),l=Object.assign(Object.assign({},a),{size:null!=i?i:r?"md":void 0});return s.annotationMap=new Map(Object.keys(l).map((t=>"size"===t||"alt"===t?at.from(l.size,l.alt):this.createAnnotationEntity(t,l[t]))).filter($)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof at||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(A.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(c.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 lt extends S{constructor(t,e){super(),this.type=c.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(c.MERGE_TWO_BLOCKS_NODES,RTEImageBlock.name,new w),r.register(c.REPLACE_CHILD_NODES,RTEImageBlock.name,new m),r.register(c.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(c.LINE_BREAK_SINGLE_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=new lt(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(c.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(c.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 g(e,o)):(e.apply(new v(n,r)),e.parent.apply(new T(e,o)))}}),r.register(a.name,RTEImageBlock.name,new l);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;return[`<${t}${super.generateAttributeString()}>`,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()))})}}class ct extends S{constructor(t){super(),this.type=c.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class dt 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 ct(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 ht 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 g(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(A.LINK),e.apply(new s([n]))),e}}}class ut extends S{constructor(t,e,n=!1){super(),this.isFlushable=!0,this.type=c.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=t,this.offset=e,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class mt 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),l=[i,s];n&&l.push(a),t.apply(new g(r,...l)),t.apply(new p(r))}else t.apply(new g(r,s));else t.apply(0!==o?new T(r,s):new g(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new ut(t))}}class wt 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 g(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new ut(t))}}class Tt 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 g(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(A.LINK),e}}class pt extends S{constructor(t){super(),this.type=c.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class Et 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 pt(e):new p(e))}}class gt 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 g(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 kt=new class{registerBlockBasicStrategies(t){r.register(c.DELETE_CHILDREN,t,t===RTEListBlock.name?new Et:new P),r.register(c.APPEND_CHILDREN,t,new rt),r.register(c.INSERT_CHILDREN_BEFORE,t,new ot),r.register(c.INSERT_CHILDREN_AFTER,t,new it),r.register(c.DELETE_BLOCK_CONTENT,t,new dt),r.register(c.INSERT_NEW_PARAGRAPH,t,t===RTEListItemBlock.name?new Tt:new ht),r.register(c.INSERT_TEXT_TO_DECORATOR_NODE,t,new wt),r.register(c.INSERT_NODE_TO_NEAREST_ROOT,t,new mt),r.register(c.PASTE_CONTENT,t,new gt)}};class ft{}class Rt extends ft{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||"bold"===t.style.fontWeight||"700"===t.style.fontWeight||t.classList.contains("v-rte--bold")}}class Bt extends ft{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 It extends ft{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 bt extends ft{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{[Q(e[0].trim())]:e[1].trim().replace(";","")}})).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{}):{}}}class xt extends ft{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 Ot extends ft{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 Lt extends ft{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 At extends ft{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=X(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=V.filter((t=>t.key!==F.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 Nt extends ft{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||"italic"===t.style.fontStyle||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class yt extends ft{constructor(){super(...arguments),this.handlers=[new Bt,new It,new bt]}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 Ct extends ft{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes("line-through")||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class jt extends ft{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes("underline")||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class Ht extends ft{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"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|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class St extends ft{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 vt extends ft{canHandle(t){return"RTEImageNode"===t.name}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}class Dt extends ft{constructor(){super(...arguments),this.customAttributeHandler=new Bt,this.customStyleAnnotationHandler=new bt,this.customClassAnnotationHandler=new It}canHandle(t,e){return"RTETextNode"===t.name&&!1===e.autoMatchFormat}handle(t,e){if(Dt.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}}Dt.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 Mt=new class{constructor(){this.handlers=[new Ot,new xt,new Rt,new Nt,new jt,new Ct,new At,new yt,new Lt,new St,new vt,new Bt,new It,new bt,new yt,new Ht,new Dt]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){const s="A"===e.tagName;return this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof yt)).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)}),{})}};class Pt extends tt{constructor(){super(...arguments),this.annotationHandler=new Ht}generateChildNodes(t,e,s){const r=[],o=!(!s||!1!==s.autoMatchFormat),i=Object.assign({},e);return t.forEach((t=>{const a=nt.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let l=null;if(a&&(l=a.handle([t],s,i)),l)r.push(l);else if(Y(t)&&t.childNodes.length>0){const a=Mt.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 Vt extends Pt{canHandle(t,e,n){const s=t[e];return!n.autoMatchFormat&&("DIV"!==s.nodeName||s.childNodes.length>0&&"IMG"!==s.childNodes[0].nodeName)&&Vt.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:Mt.generate(RTEHtmlBlock,t,e),children:[]}}}Vt.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 Ft extends Pt{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 x.from({id:z(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class Ut extends Pt{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:Mt.generate(RTEImageNode,t,e)}],annotations:Object.assign(Object.assign({},Mt.generate(RTEImageBlock,t.parentElement,e)),{internalWrapper:n})},e)}}class zt extends Pt{canHandle(t,e){let n=0;for(let s=e;s<t.length;s++){const e=t[s];if(e.nodeType!==Node.TEXT_NODE&&(!zt.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?Mt.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),a=o?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),l=!o&&!a;return e.from(Object.assign({id:z(),type:a||"paragraph",nodes:i},l?{annotations:{internalWrapper:l}}:{annotations:Mt.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}}zt.canHandleTags=[...Dt.canHandleTags,"CODE","A","VEGA-RICH-TEXT-LINK-EDITOR","BR"];class $t extends tt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:z(),type:"text",text:t,annotations:e}}}U.registerRTEDTOClass("paragraph",e),U.registerRTEDTOClass("title",e),U.registerRTEDTOClass("subtitle",e),U.registerRTEDTOClass("heading-1",e),U.registerRTEDTOClass("heading-2",e),U.registerRTEDTOClass("heading-3",e),U.registerRTEDTOClass("heading-4",e),U.registerRTEDTOClass("heading-5",e),U.registerRTEDTOClass("heading-6",e),U.registerRTEDTOClass("heading-6",e),U.registerRTEDTOClass("list-item",RTEListItemBlock),U.registerRTEDTOClass("bullet-list",RTEListBlock),U.registerRTEDTOClass("number-list",RTEListBlock),U.registerRTEDTOClass("image",RTEImageBlock),U.registerRTEDTOClass("code-block",x),U.registerRTEDTOClass("html-block",RTEHtmlBlock),U.registerRTEDTOClass("text",n),U.registerRTEDTOClass("image",RTEImageNode),kt.registerBlockBasicStrategies(e.name),kt.registerBlockBasicStrategies(RTEListBlock.name),kt.registerBlockBasicStrategies(RTEListItemBlock.name),kt.registerBlockBasicStrategies(RTEImageBlock.name),kt.registerBlockBasicStrategies(RTEHtmlBlock.name),nt.registerElementToBlockStrategy(new zt),nt.registerElementToBlockStrategy(new class extends Ut{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}}),nt.registerElementToBlockStrategy(new class extends Ut{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:Mt.generate(RTEImageNode,n,e)}],annotations:Mt.generate(RTEImageBlock,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),nt.registerElementToBlockStrategy(new class extends Ut{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),nt.registerElementToBlockStrategy(new class extends Pt{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:Mt.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),nt.registerElementToBlockStrategy(new Ft),nt.registerElementToBlockStrategy(new class extends Ft{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}}),nt.registerElementToBlockStrategy(new class extends Pt{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:Mt.generate(RTEListItemBlock,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),Mt.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),nt.registerElementToBlockStrategy(new class extends Pt{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}}),nt.registerElementToBlockStrategy(new class extends Pt{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:Mt.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}}),nt.registerElementToBlockStrategy(new class extends Pt{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:Mt.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}}),nt.registerElementToBlockStrategy(new Vt),nt.registerElementToNodeStrategy(new class extends $t{canHandle(t,e){const n=t[e];return!Y(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=Mt.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?Z(Object.assign(Object.assign({},n.supportsHtmlTag(i.nodeName.toLowerCase())?a:{}),{inlineHtml:a.inlineHtml,plainText:$(a.inlineHtml)})):a;return Object.assign({},this.generateTextNode("",t))}}}),nt.registerElementToNodeStrategy(new class extends $t{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(),l=o&&!n.supportsHtmlTag(a),c=this.generateTextNode(String(i.textContent),o?Z(Object.assign(Object.assign({},"span"===a?r:{link:r.link,code:"code"===a?r.code:void 0}),{inlineHtml:r.inlineHtml,plainText:l||void 0})):r);return Object.assign({},c)}});class Gt{static preserve(t){const e=t.replace(/\s+style=/g," data-style=");return new Jt(e)}}class Jt{constructor(t){this.processedHtml=t}getProcessedHtml(){return this.processedHtml}restore(t){this.walkNodes(t)}walkNodes(t){t.forEach((t=>{if(Y(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 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=U.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=t.replace(/>\s+<\/?/g,(t=>t.endsWith("</")?t:"><")).replace(/(>)[\n\t]+(?=[a-zA-Z0-9_\W])/g,"$1").replace(/([a-zA-Z0-9_\W])[\n\t]+(?=<)/g,"$1"),s=Gt.preserve(n),r=s.getProcessedHtml(),o=(new DOMParser).parseFromString(r,"text/html").body,i=Array.from(o.childNodes);s.restore(i);const a=st.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&&_.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&&G.notify(J.getSubject(t,K),{})}}getLastNode(){return 0===this.children.length?null:this.children[this.children.length-1].getLastNode()}toListItem(t){t.children.map((t=>t.apply(new E)));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(c.DELETE_CHILDREN,VegaRTEContent.name,new P),r.register(c.APPEND_CHILDREN,VegaRTEContent.name,new rt),r.register(c.INSERT_CHILDREN_BEFORE,VegaRTEContent.name,new ot),r.register(c.INSERT_CHILDREN_AFTER,VegaRTEContent.name,new it),r.register(c.TRANSFORM_TO_CODE_BLOCK,VegaRTEContent.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,s=new x(z(),this.getCodeContent(n),"plainText");e.apply(new g(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(c.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&&G.notify(J.getSubject(o,W),{node:s,offset:n,updateDirectly:r})}});export{ft as A,Pt as B,nt as E,lt as I,ct as M,gt as P,kt as R,Gt as S,ut as U,VegaRTEContent as V,tt as a,RTEListItemBlock as b,RTEImageBlock as c,ot as d,RTEListBlock as e,RTEImageNode as f,at as g,Mt as h,st as i}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,F as t,r as i,c as n,H as s,g as o}from"./p-6b2342e0.js";import{s as a}from"./p-519a7d55.js";import{c as r,V as l,M as c,I as d}from"./p-6e1ab235.js";import{V as h,I as g}from"./p-d849e0f5.js";import{c as m}from"./p-
|
|
1
|
+
import{h as e,F as t,r as i,c as n,H as s,g as o}from"./p-6b2342e0.js";import{s as a}from"./p-519a7d55.js";import{c as r,V as l,M as c,I as d}from"./p-6e1ab235.js";import{V as h,I as g}from"./p-d849e0f5.js";import{c as m}from"./p-c841be8d.js";import{i as p}from"./p-11a6c1b7.js";import{P as f}from"./p-10ac8b57.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-3532aa12.js";import"./p-b75ee3ba.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-40f39194.js";import"./p-ed45b3b6.js";var v=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class b extends l{render(){var t;return e("div",{class:"vega-segment-control-container"},null===(t=this.segments)||void 0===t?void 0:t.map((e=>this.segmentRenderer.render(e))))}}v([r()],b.prototype,"segments",void 0),v([r()],b.prototype,"segmentRenderer",void 0);var x=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class u extends l{componentWillLoad(){this.setDefaultSelected()}watchSegments(){this.setDefaultSelected()}watchSelected(){this.changeEventEmitter.emit(this.selected)}setSelected(e){this.selected=e.key}setDefaultSelected(){var e;(null===(e=this.segments)||void 0===e?void 0:e.length)>0&&!this.segments.find((e=>e.key===this.selected))&&(this.selected=this.segments[0].key)}}x([r({writable:!0})],u.prototype,"selected",void 0),x([r()],u.prototype,"segments",void 0),x([r()],u.prototype,"changeEventEmitter",void 0),x([c("componentWillLoad")],u.prototype,"componentWillLoad",null),x([c("watchSegments")],u.prototype,"watchSegments",null),x([c("watchSelected")],u.prototype,"watchSelected",null);var w=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class j extends l{watchSegments(){this.setIsOverflowBlockSegments()}watchBlock(){this.setIsOverflowBlockSegments()}watchSize(){this.setIsOverflowBlockSegments()}setIsOverflowBlockSegments(){this.isOverflowBlockSegments=this.isExceedContainerWidth()}isExceedContainerWidth(){if(this.block){const e=this.host.shadowRoot.querySelector(".vega-segment-control-container");return e.clientWidth<e.children.length*j.SEGMENTS_OVERFLOW_THRESHOLD[this.size]+4*(e.children.length-1)+5}return!1}}j.SEGMENTS_OVERFLOW_THRESHOLD={medium:101.9,small:82},w([r()],j.prototype,"host",void 0),w([r()],j.prototype,"block",void 0),w([r()],j.prototype,"size",void 0),w([r({writable:!0})],j.prototype,"isOverflowBlockSegments",void 0),w([c("watchSegments")],j.prototype,"watchSegments",null),w([c("watchBlock")],j.prototype,"watchBlock",null),w([c("watchSize")],j.prototype,"watchSize",null);var y=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class S extends l{render(t){return e("button",{key:t.key,class:{"vega-segment":!0,selected:this.selected===t.key,disabled:t.disabled,[`${this.size}`]:!0},onClick:()=>this.selectedController.setSelected(t),disabled:t.disabled},this.renderSegments(t))}renderSegments(i){return e(t,null,(this.isOverflowBlockSegments||!this.isOverflowBlockSegments&&"text-only"!==this.variant)&&i.icon&&this.renderIcon(i),(this.isOverflowBlockSegments&&!i.icon||!this.isOverflowBlockSegments&&"icon-only"!==this.variant)&&i.text&&this.renderText(i))}renderIcon(t){return e("vega-tooltip",{text:t.text,trigger:t.text&&(this.isOverflowBlockSegments||!this.isOverflowBlockSegments&&"icon-only"===this.variant)?"hover":"none",placement:["bottom","top"],disableInteractive:!1},e("vega-icon",{icon:t.icon,size:"size-16"}))}renderText(t){return e("vega-text",{overflow:"ellipsis",tooltip:{placement:["bottom","top"]}},t.text)}}y([r()],S.prototype,"host",void 0),y([r()],S.prototype,"size",void 0),y([r()],S.prototype,"selected",void 0),y([r()],S.prototype,"variant",void 0),y([r()],S.prototype,"block",void 0),y([r()],S.prototype,"isOverflowBlockSegments",void 0),y([r()],S.prototype,"selectedController",void 0);var k=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const R=class{constructor(e){i(this,e),this.vegaChange=n(this,"vegaChange",7),this.change=n(this,"change",7),this.globalSlimmers={},this.segmentControlRenderer=new b,this.segmentOverflowController=new j,this.segmentRenderer=new S,this.selectedController=new u,this.changeEventEmitter=m(R,p),this.pageResizeObserverSlimmer=new f({callback:()=>{this.segmentControlWidth=this.host.clientWidth,this.segmentOverflowController.setIsOverflowBlockSegments()},shouldTrigger:()=>this.host.clientWidth!==this.segmentControlWidth}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.segmentControlWidth=0,this.isOverflowBlockSegments=!1,this.block=!1,this.size="medium",this.segments=[],this.variant="default"}watchBlock(){}watchSize(){}watchSegments(){}watchSelected(){}componentWillLoad(){}render(){return a(e(s,{class:{"vega-segment-control-block":this.block}},this.segmentControlRenderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{block:["watchBlock"],size:["watchSize"],segments:["watchSegments"],selected:["watchSelected"]}}};k([g()],R.prototype,"globalSlimmers",void 0),k([d()],R.prototype,"segmentControlRenderer",void 0),k([d()],R.prototype,"segmentOverflowController",void 0),k([d()],R.prototype,"segmentRenderer",void 0),k([d()],R.prototype,"selectedController",void 0),k([d()],R.prototype,"changeEventEmitter",void 0),k([d()],R.prototype,"pageResizeObserverSlimmer",void 0),k([d()],R.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),R.style=':host{display:inline-block}.vega-segment-control-container{display:flex;gap:4px;border-radius:9999px;background-color:rgba(var(--v-bg-segment-control, 89, 96, 99, 0.1));padding:3px}:host(.vega-segment-control-block){display:block}:host(.vega-segment-control-block) .vega-segment{flex-basis:0;flex-grow:1}.vega-segment{display:flex;align-items:center;justify-content:center;gap:8px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));border-radius:9999px;cursor:pointer;text-align:center;border-width:1px;border-style:solid;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border-color:transparent}.vega-segment vega-icon{vertical-align:middle}.vega-segment.medium{padding-left:24px;padding-right:24px;padding-top:8px;padding-bottom:8px;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.vega-segment.small{padding-left:16px;padding-right:16px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;padding-top:3px;padding-bottom:3px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-segment.disabled{color:rgba(var(--v-text-disabled, 176, 180, 181, 1));pointer-events:none}.vega-segment:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.vega-segment:hover{background-color:rgba(var(--v-bg-segment-hover, 205, 209, 211, 1))}.vega-segment.selected{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-chip, 205, 209, 211, 1))}';export{R as vega_segment_control}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as n}from"./p-
|
|
1
|
+
import{i as n}from"./p-1f83cebf.js";class r{canFormat(r,t,i){if("init"===r||"change"===r){if("component"===t&&n(null==i?void 0:i.isBlurred))return!1;if(this.shouldTriggerAtInit())return!0}if("input"===r&&"native-input"===t)return!0;if("change"===r&&("component"===t||"native-input"===t))return!0;if("blur"===r&&(null==i?void 0:i.isBlurred)){if("component"===t&&this.shouldOverrideComponentValueAfterBlur())return!0;if("native-input"===t)return!0}return!1}shouldOverrideComponentValueAfterBlur(){return!1}shouldTriggerAtInit(){return!1}}export{r as S}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,F as t,r as i,c as a,H as n,g as r}from"./p-6b2342e0.js";import{c as s,V as o,I as d}from"./p-6e1ab235.js";import{g as l,D as m}from"./p-d9671d27.js";import{V as p,I as c}from"./p-d849e0f5.js";import{D as h,a as f}from"./p-
|
|
1
|
+
import{h as e,F as t,r as i,c as a,H as n,g as r}from"./p-6b2342e0.js";import{c as s,V as o,I as d}from"./p-6e1ab235.js";import{g as l,D as m}from"./p-d9671d27.js";import{V as p,I as c}from"./p-d849e0f5.js";import{D as h,a as f}from"./p-11a6c1b7.js";import{s as g}from"./p-519a7d55.js";import{C as b}from"./p-89083d63.js";import{c as x}from"./p-c841be8d.js";import{C as v}from"./p-c616c592.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-3532aa12.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-6a334573.js";import"./p-b75ee3ba.js";import"./p-4866e390.js";var u=function(e,t,i,a){var n,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class w extends o{getBreadcrumbContainerRef(){return this.vegaBreadcrumbContainerRef}render(){return e("div",{class:{"vega-breadcrumb":!0,"compact-mode":this.isCompactMode,collapsed:this.isCollapsed(),single:1===this.items.length},ref:e=>this.vegaBreadcrumbContainerRef=e},this.renderItems())}renderItems(){const i=this.items.map(((e,t)=>this.itemRenderer.render(e,{isCompactMode:this.isCompactMode,isLastItem:this.items.length===t+1})));return this.isCollapsed()&&i.splice(1,0,this.collapsedItemRenderer.render(this.items.slice(1,this.items.length-1))),e(t,null,i)}isCollapsed(){return!this.isCompactMode&&"none"!==this.maxItems&&this.maxItems>=4&&this.items.length>this.maxItems}get isCompactMode(){return this.compactOnMobile&&l()===m.MOBILE}}u([s()],w.prototype,"items",void 0),u([s()],w.prototype,"compactOnMobile",void 0),u([s()],w.prototype,"maxItems",void 0),u([s()],w.prototype,"itemRenderer",void 0),u([s()],w.prototype,"collapsedItemRenderer",void 0);class y extends o{render(t){return e("div",{class:"vega-breadcrumb-item"},e("vega-dropdown",{placement:["bottom"],alignment:"center",maxHeight:200},e("vega-text",null,"..."),e("vega-box",{slot:"items"},t.map((t=>e("vega-dropdown-item",{key:t.label,label:t.label},this.itemRenderer.render(t,{isInDropdown:!0})))))),e("vega-icon",{icon:"chevron-right-rounded",size:"size-12",color:"text-secondary"}))}}!function(e,t,i,a){var n,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([s()],y.prototype,"itemRenderer",void 0);class j extends o{constructor(){super(...arguments),this.onButtonLinkClick=(e,t)=>{const i=this.clickEventEmitter.emit(t);i&&i.defaultPrevented&&e.preventDefault()}}render(t,i){return e("div",{class:"vega-breadcrumb-item",key:t.label},this.renderContent(t,i))}renderContent(i,a){return a.isCompactMode&&!a.isLastItem?e(t,null,this.renderIcon("chevron-left-rounded","text-link"),this.renderLabel(i)):a.isLastItem?this.renderLabel(i,!0):a.isInDropdown?this.renderLink(i,!1,!0):e(t,null,this.renderLabel(i),this.renderIcon("chevron-right-rounded","text-secondary"))}renderIcon(t,i){return e("vega-icon",{icon:t,size:"size-12",color:i})}renderLabel(t,i){return t.tooltip?e("vega-tooltip",{text:t.tooltip,placement:["bottom"]},this.renderLink(t,i)):this.renderLink(t,i)}renderLink(t,i,a=!1){return i?e("span",{class:"vega-breadcrumb-last-label"},t.label):e("vega-button-link",{label:t.label,link:t.href,eventful:!0,class:{"vega-breadcrumb-dropdown-link":a},ref:e=>{h.addUniqueObserverToNode(e,f,(e=>{this.onButtonLinkClick(e,t)}))}})}}!function(e,t,i,a){var n,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([s()],j.prototype,"clickEventEmitter",void 0);var I=function(e,t,i,a){var n,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const z=class{constructor(e){i(this,e),this.vegaClick=a(this,"vegaClick",7),this.click=a(this,"click",7),this.globalSlimmers={},this.renderer=new w,this.collapsedItemRenderer=new y,this.itemRenderer=new j,this.eventsPrevent=new b([f],(()=>this.renderer.getBreadcrumbContainerRef())),this.clickEventEmitter=x(z,f),this.componentGlobalStyleSlimmer=new v(".vega-breadcrumb-dropdown-link::part(label-text){color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}"),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.maxItems=4,this.items=[],this.compactOnMobile=!0}render(){return g(e(n,null,this.renderer.render()),this.host)}get host(){return r(this)}};I([c()],z.prototype,"globalSlimmers",void 0),I([d()],z.prototype,"renderer",void 0),I([d()],z.prototype,"collapsedItemRenderer",void 0),I([d()],z.prototype,"itemRenderer",void 0),I([d()],z.prototype,"eventsPrevent",void 0),I([d()],z.prototype,"clickEventEmitter",void 0),I([d()],z.prototype,"componentGlobalStyleSlimmer",void 0),I([d()],z.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),z.style=':host{display:block}:host .vega-breadcrumb{display:flex;gap:8px;flex-wrap:wrap}:host .vega-breadcrumb-hidden{display:none !important}:host .vega-breadcrumb-item{display:flex;gap:8px;align-items:center}:host .vega-breadcrumb-item vega-button-link::part(label-text){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-breadcrumb-item vega-button-link::part(label-text){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-breadcrumb-item vega-button-link::part(label-text){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-breadcrumb-item vega-button-link::part(label-text){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-breadcrumb-item vega-dropdown vega-text{cursor:pointer;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-breadcrumb-item vega-dropdown vega-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-breadcrumb-item vega-dropdown vega-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-breadcrumb-item vega-dropdown vega-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-breadcrumb-item vega-icon{flex-shrink:0}:host .vega-breadcrumb-item .vega-breadcrumb-last-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-breadcrumb-item .vega-breadcrumb-last-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-breadcrumb-item .vega-breadcrumb-last-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-breadcrumb-item .vega-breadcrumb-last-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-breadcrumb-item vega-button-link::part(label-container){text-decoration:none}:host .vega-breadcrumb.compact-mode>.vega-breadcrumb-item{display:none}:host .vega-breadcrumb.compact-mode .vega-breadcrumb-item:nth-last-child(2){display:flex}:host .vega-breadcrumb.compact-mode.single .vega-breadcrumb-item{display:flex;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-breadcrumb.compact-mode.single .vega-breadcrumb-item{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-breadcrumb.compact-mode.single .vega-breadcrumb-item{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-breadcrumb.compact-mode.single .vega-breadcrumb-item{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-breadcrumb.collapsed .vega-breadcrumb-item:nth-child(n+3):not(:last-child){display:none}';export{z as vega_breadcrumb}
|