@globalpayments/vega 2.89.0 → 2.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-4872f4e6.js → app-globals-7bb10088.js} +21 -11
- package/dist/cjs/{aria-dialog-focusable-trap-slimmer-a0ff1263.js → aria-dialog-focusable-trap-slimmer-73b4c0cb.js} +1 -1
- package/dist/cjs/{child-nodes-event-prevent-slimmer-85a7fdb0.js → child-nodes-event-prevent-slimmer-76d19d56.js} +2 -2
- package/dist/cjs/{code-block-7c49d175.js → code-block-c1039791.js} +9 -3
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-aae22ddf.js → component-value-history-controller-slimmer.abstract-1d36641d.js} +59 -4
- package/dist/cjs/{content-state-76b81780.js → content-state-a6105949.js} +3 -3
- package/dist/cjs/{create-public-api-runtime-metrics-slimmer-122350c3.js → create-public-api-runtime-metrics-slimmer-91b0cbfb.js} +3 -2
- package/dist/cjs/{date-required-rule-71f71b32.js → date-required-rule-c4997459.js} +1 -1
- package/dist/cjs/{design-token-c80d3f32.js → design-token-f65eab4a.js} +4 -4
- package/dist/cjs/{element-appender-slimmer-e95427b5.js → element-appender-slimmer-316668d0.js} +4 -4
- package/dist/cjs/{event-emit-slimmer-146316b2.js → event-emit-slimmer-5bab10c2.js} +1 -1
- package/dist/cjs/{feature-flag-controller-5fa21654.js → feature-flag-controller-438a1510.js} +12 -0
- package/dist/cjs/{file-uploader-required-rule-313ec9e3.js → file-uploader-required-rule-cc51d4ab.js} +1 -1
- package/dist/cjs/{form-field-controller-slimmer-430b4f02.js → form-field-controller-slimmer-b0c35330.js} +3 -3
- package/dist/cjs/{icon-manager-e855446d.js → icon-manager-be358b32.js} +2 -2
- package/dist/cjs/{image-annotation-action-7959fd77.js → image-annotation-action-e4596726.js} +28 -4
- package/dist/cjs/index-58ea899e.js +4 -4
- package/dist/cjs/index.cjs.js +32 -30
- package/dist/cjs/{inject-keyboard-manager-3ccf1cb6.js → inject-keyboard-manager-1f5bbb19.js} +1 -1
- package/dist/cjs/internal-calendar-period-factory-9c66cf36.js +78 -0
- package/dist/cjs/{internal-icon-manager-66c48800.js → internal-icon-manager-40bcac72.js} +1 -1
- package/dist/cjs/{internal-translation-controller-5582d789.js → internal-translation-controller-5905469e.js} +9 -0
- package/dist/cjs/{internal-vega-event-manager-6e49d1ca.js → internal-vega-event-manager-7196a847.js} +3 -1
- package/dist/cjs/{keyboard-manager-5babfda8.js → keyboard-manager-61e8ce38.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-a73354ca.js → keyboard-manager-slimmer-079a7e87.js} +1 -1
- package/dist/cjs/{legend-input-processor-1e53e5bc.js → legend-input-processor-ce9b38f8.js} +1 -1
- package/dist/cjs/link-extension-a7ac28f3.js +583 -0
- package/dist/cjs/loader.cjs.js +21 -21
- package/dist/cjs/month-view-generator-48215a05.js +33 -0
- package/dist/cjs/{public-rules-b23ab52d.js → public-rules-66540638.js} +13 -11
- package/dist/cjs/{range-abe1b989.js → range-dea19a90.js} +1 -1
- package/dist/cjs/{replace-selected-text-action-ef079fed.js → replace-selected-text-action-6d1ebbf9.js} +1 -1
- package/dist/cjs/{required-field-rule-d73c1d8c.js → required-field-rule-b12a29e1.js} +10 -1
- package/dist/cjs/{responsive-format-facade-cc368403.js → responsive-format-facade-10ff730e.js} +2 -2
- package/dist/cjs/{rich-text-editor-required-rule-bbd727a2.js → rich-text-editor-required-rule-63492ca3.js} +1 -1
- package/dist/cjs/{split-cell-operation-b1fe91b5.js → split-cell-operation-30e5dd4a.js} +5 -5
- package/dist/cjs/{state-border-formatter-398134c1.js → state-border-formatter-e7779964.js} +1 -1
- package/dist/cjs/{string-format-strategy.abstract-67421e2b.js → string-format-strategy.abstract-a22f0cb1.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-e84530b9.js → string-input-formatter-slimmer-8179eb40.js} +3 -3
- package/dist/cjs/{string-mask-strategy-f9806f9b.js → string-mask-strategy-8b9bb0c1.js} +2 -2
- package/dist/cjs/{style-formatter-da3a556b.js → style-formatter-380b9a86.js} +2 -2
- package/dist/cjs/{sub-state-notify-slimmer-450277b6.js → sub-state-notify-slimmer-18891389.js} +1 -1
- package/dist/cjs/{sub-state-observer-slimmer-5bfe8e97.js → sub-state-observer-slimmer-eee2f0ae.js} +1 -1
- package/dist/cjs/{time-required-rule-618109fa.js → time-required-rule-080d975b.js} +1 -1
- package/dist/cjs/{token-extension-dfee303a.js → token-extension-619379a3.js} +150 -502
- package/dist/cjs/{translation-slimmer-1a7a2b6d.js → translation-slimmer-2af6f141.js} +17 -1
- package/dist/cjs/{type-guard-474dec0d.js → type-guard-0171e779.js} +119 -4
- package/dist/cjs/{typography-4560e7f1.js → typography-3ea4fe41.js} +10 -10
- package/dist/cjs/{valid-credit-card-number-rule-00c18527.js → valid-credit-card-number-rule-fdfca83e.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +14 -14
- package/dist/cjs/vega-app-footer.cjs.entry.js +61 -7
- package/dist/cjs/vega-app-header-button.cjs.entry.js +14 -14
- package/dist/cjs/vega-banner.cjs.entry.js +7 -7
- package/dist/cjs/vega-bar-chart.cjs.entry.js +3 -3
- package/dist/cjs/vega-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-brand-logo.cjs.entry.js +3 -3
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +5 -5
- package/dist/cjs/vega-button-circle.cjs.entry.js +12 -12
- package/dist/cjs/vega-button-group_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-button-link.cjs.entry.js +5 -5
- package/dist/cjs/vega-button.cjs.entry.js +10 -10
- package/dist/cjs/{vega-calendar_4.cjs.entry.js → vega-calendar_5.cjs.entry.js} +669 -398
- package/dist/cjs/vega-card.cjs.entry.js +7 -7
- package/dist/cjs/vega-carousel.cjs.entry.js +8 -8
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +22 -15
- package/dist/cjs/vega-chip.cjs.entry.js +11 -11
- package/dist/cjs/vega-code-block.cjs.entry.js +18 -18
- package/dist/cjs/vega-color-picker.cjs.entry.js +10 -8
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +15 -15
- package/dist/cjs/vega-color-swatch.cjs.entry.js +5 -5
- package/dist/cjs/vega-combo-box.cjs.entry.js +18 -18
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +26 -26
- package/dist/cjs/{vega-dialog-controller-6df7825e.js → vega-dialog-controller-16be85d5.js} +2 -2
- package/dist/cjs/vega-dialog_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-divider.cjs.entry.js +7 -7
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +17 -17
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/{vega-event-id-37c1716f.js → vega-event-id-df22d80e.js} +2 -0
- package/dist/cjs/vega-field-label.cjs.entry.js +6 -6
- package/dist/cjs/vega-file-uploader.cjs.entry.js +15 -13
- package/dist/cjs/vega-flag-icon.cjs.entry.js +10 -10
- package/dist/cjs/vega-flex.cjs.entry.js +8 -8
- package/dist/cjs/vega-font.cjs.entry.js +14 -8
- package/dist/cjs/vega-form.cjs.entry.js +12 -12
- package/dist/cjs/vega-grid.cjs.entry.js +7 -7
- package/dist/cjs/vega-icon.cjs.entry.js +9 -9
- package/dist/cjs/vega-image-uploader.cjs.entry.js +17 -17
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +29 -19
- package/dist/cjs/vega-input-numeric.cjs.entry.js +15 -15
- package/dist/cjs/vega-input-passcode.cjs.entry.js +14 -14
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +15 -15
- package/dist/cjs/vega-input-range.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-select.cjs.entry.js +19 -27
- package/dist/cjs/vega-input.cjs.entry.js +19 -17
- package/dist/cjs/{vega-internal-event-id-e138d4d6.js → vega-internal-event-id-ecc5b87a.js} +2 -0
- package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +18 -18
- package/dist/cjs/vega-line-chart.cjs.entry.js +3 -3
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +5 -5
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +4 -4
- package/dist/cjs/vega-pagination.cjs.entry.js +11 -11
- package/dist/cjs/vega-pie-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-popover_2.cjs.entry.js +15 -15
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-radio_2.cjs.entry.js +27 -20
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +72 -40
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +90 -45
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +9 -9
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +17 -17
- package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +28 -15
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +14 -14
- package/dist/cjs/vega-signature-capture.cjs.entry.js +18 -18
- package/dist/cjs/vega-stepper.cjs.entry.js +9 -9
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +13 -10
- package/dist/cjs/vega-table_11.cjs.entry.js +16 -16
- package/dist/cjs/vega-textarea.cjs.entry.js +11 -11
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +17 -17
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +7 -7
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +9 -9
- package/dist/cjs/vega.cjs.js +21 -21
- package/dist/cjs/{wait-for-component-did-render-762084fc.js → wait-for-component-did-render-02ca4bee.js} +1 -1
- package/dist/cjs/{y-axis-input-processor-54a26515.js → y-axis-input-processor-d3a3839c.js} +1 -1
- package/dist/collection/collection-manifest.json +10 -8
- package/dist/collection/components/vega-app-footer/slimmers/renderers/vega-app-footer-additional-links-renderer.js +45 -0
- package/dist/collection/components/vega-app-footer/vega-app-footer.js +63 -12
- package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-current-period-controller.js +21 -24
- package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.js +13 -79
- package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-current-period-controller.js +153 -0
- package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-state-controller.js +32 -0
- package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/slimmers/renderers/vega-calendar-period-renderer.js +55 -0
- package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/vega-calendar-period-switcher.css +20 -0
- package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/vega-calendar-period-switcher.js +309 -0
- package/dist/collection/components/vega-calendar/vega-calendar.css +0 -9
- package/dist/collection/components/vega-calendar/vega-calendar.js +73 -1
- package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.css +8 -11
- package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.js +35 -7
- package/dist/collection/components/vega-combo-box/vega-combo-box.js +1 -1
- package/dist/collection/components/vega-field-label/vega-field-label.js +2 -2
- package/dist/collection/components/vega-font/slimmers/controllers/vega-font-classes-controller.js +7 -0
- package/dist/collection/components/vega-font/vega-font.css +72 -10
- package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +35 -1
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +1 -9
- package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.css +8 -11
- package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.js +35 -7
- package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.css +3 -1
- package/dist/collection/components/vega-rich-text-editor/constants/constant.js +5 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.js +36 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +15 -12
- package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +11 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.js +30 -16
- package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-toolbar-button-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/link/link-extension.js +34 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/link/type.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/link/utils.js +22 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/rte-extension-state-store.js +37 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-toolbar-button-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/public-api.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +55 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.js +5 -3
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +10 -1
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +2 -2
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +42 -11
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.js +13 -4
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/slimmers/renderers/vega-selection-chip-group-renderer.js +4 -1
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.js +34 -0
- package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-pages-controller.js +4 -2
- package/dist/collection/components/vega-tab-group/vega-tab-group.js +5 -4
- package/dist/collection/constants/tokens/typography.js +10 -10
- package/dist/collection/constants/ui.js +1 -0
- package/dist/collection/global/scripts/before-vega-load.js +10 -0
- package/dist/collection/helpers/calendar/calendar-period/day-period.js +9 -0
- package/dist/collection/helpers/calendar/calendar-period/internal-calendar-period-factory.js +76 -0
- package/dist/collection/helpers/calendar/calendar-period/month-period.js +9 -0
- package/dist/collection/helpers/calendar/calendar-period/vega-calendar-period-factory.js +19 -0
- package/dist/collection/helpers/calendar/calendar-period/week-period.js +14 -0
- package/dist/collection/helpers/calendar/index.js +1 -0
- package/dist/collection/helpers/common/wait-for-vega-handler.js +1 -1
- package/dist/collection/helpers/dialog/vega-dialog-controller.js +1 -1
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +3 -1
- package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +1 -0
- package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
- package/dist/collection/helpers/event-manager/vega-event-manager.js +1 -1
- package/dist/collection/helpers/feature-control/feature-flags-map.js +12 -0
- package/dist/collection/helpers/icon/icon-manager.js +1 -1
- package/dist/collection/helpers/loading-indicator/vega-loader-controller.js +1 -1
- package/dist/collection/helpers/notify/vega-notify-controller.js +1 -1
- package/dist/collection/helpers/public-api.js +1 -0
- package/dist/collection/helpers/skeleton-loader/vega-skeleton-loader-controller.js +1 -1
- package/dist/collection/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.js +3 -2
- package/dist/collection/helpers/slimmers/translation/translation-slimmer.js +16 -0
- package/dist/collection/helpers/theme/theme-manager.js +1 -1
- package/dist/collection/helpers/translation/locales/en.js +9 -0
- package/dist/collection/helpers/translation/translation.js +1 -1
- package/dist/collection/helpers/validator/rules/required-field-rule.js +10 -1
- package/dist/collection/helpers/zindex/vega-z-index-manager.js +1 -1
- package/dist/esm/{app-globals-081bbfd9.js → app-globals-6041f52f.js} +21 -11
- package/dist/esm/{aria-dialog-focusable-trap-slimmer-7db3d5a7.js → aria-dialog-focusable-trap-slimmer-1332c071.js} +1 -1
- package/dist/esm/{child-nodes-event-prevent-slimmer-1e3ac106.js → child-nodes-event-prevent-slimmer-50022584.js} +2 -2
- package/dist/esm/{code-block-17f596fc.js → code-block-37294847.js} +9 -4
- package/dist/esm/{component-value-history-controller-slimmer.abstract-21e9126a.js → component-value-history-controller-slimmer.abstract-45ccddc9.js} +59 -4
- package/dist/esm/{content-state-96741bb0.js → content-state-67950b80.js} +4 -4
- package/dist/esm/{create-public-api-runtime-metrics-slimmer-da6615bf.js → create-public-api-runtime-metrics-slimmer-48f85199.js} +3 -2
- package/dist/esm/{date-required-rule-d6ce832c.js → date-required-rule-958cf380.js} +1 -1
- package/dist/esm/{design-token-0a575bf2.js → design-token-e7e78f18.js} +4 -4
- package/dist/esm/{element-appender-slimmer-44bbb5c6.js → element-appender-slimmer-ebda526d.js} +4 -4
- package/dist/esm/{event-emit-slimmer-3eb4d8ad.js → event-emit-slimmer-b94cec83.js} +1 -1
- package/dist/esm/{feature-flag-controller-5ebc0cec.js → feature-flag-controller-2a89f20c.js} +12 -0
- package/dist/esm/{file-uploader-required-rule-ad886d01.js → file-uploader-required-rule-82188a61.js} +1 -1
- package/dist/esm/{form-field-controller-slimmer-03894a51.js → form-field-controller-slimmer-0a2ba886.js} +3 -3
- package/dist/esm/{icon-manager-691c8682.js → icon-manager-4ef3f6dd.js} +2 -2
- package/dist/esm/{image-annotation-action-e8ab7b64.js → image-annotation-action-7f7a5678.js} +28 -5
- package/dist/esm/index-090d31ca.js +4 -4
- package/dist/esm/index.js +28 -28
- package/dist/esm/{inject-keyboard-manager-e5874185.js → inject-keyboard-manager-2b19c121.js} +1 -1
- package/dist/esm/internal-calendar-period-factory-fff8aaee.js +76 -0
- package/dist/esm/{internal-icon-manager-276f968f.js → internal-icon-manager-e7c57096.js} +1 -1
- package/dist/esm/{internal-translation-controller-84958bc9.js → internal-translation-controller-aa09ca87.js} +9 -0
- package/dist/esm/{internal-vega-event-manager-a9758b6e.js → internal-vega-event-manager-956cf128.js} +3 -1
- package/dist/esm/{keyboard-manager-404b9c17.js → keyboard-manager-3e5b157f.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-c8fcfe60.js → keyboard-manager-slimmer-ba5cc767.js} +1 -1
- package/dist/esm/{legend-input-processor-122008c5.js → legend-input-processor-3b2de4b7.js} +1 -1
- package/dist/esm/link-extension-afb404fb.js +576 -0
- package/dist/esm/loader.js +21 -21
- package/dist/esm/month-view-generator-7a0c869c.js +31 -0
- package/dist/esm/{public-rules-09387dcf.js → public-rules-f64b0b78.js} +13 -11
- package/dist/esm/{range-47d9f95e.js → range-4d09a305.js} +1 -1
- package/dist/esm/{replace-selected-text-action-a217dc89.js → replace-selected-text-action-12bc8b82.js} +1 -1
- package/dist/esm/{required-field-rule-ab4bdc47.js → required-field-rule-a4634842.js} +10 -1
- package/dist/esm/{responsive-format-facade-51c0c2e1.js → responsive-format-facade-844c5e09.js} +2 -2
- package/dist/esm/{rich-text-editor-required-rule-cca16fd0.js → rich-text-editor-required-rule-d62d418e.js} +1 -1
- package/dist/esm/{split-cell-operation-ddde4106.js → split-cell-operation-c515669e.js} +5 -5
- package/dist/esm/{state-border-formatter-50394e9c.js → state-border-formatter-f53847a5.js} +1 -1
- package/dist/esm/{string-format-strategy.abstract-de17b899.js → string-format-strategy.abstract-a0327405.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-c3d483ef.js → string-input-formatter-slimmer-12de4a25.js} +3 -3
- package/dist/esm/{string-mask-strategy-87efdb9e.js → string-mask-strategy-3bb03155.js} +2 -2
- package/dist/esm/{style-formatter-c20c1988.js → style-formatter-df7bf8ec.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-d5a21bb3.js → sub-state-notify-slimmer-7ef94141.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-d924288a.js → sub-state-observer-slimmer-d9ad2bdd.js} +1 -1
- package/dist/esm/{time-required-rule-026c17a1.js → time-required-rule-db0dee53.js} +1 -1
- package/dist/esm/{token-extension-76323d76.js → token-extension-8ff92d14.js} +82 -433
- package/dist/esm/{translation-slimmer-7f195ba8.js → translation-slimmer-4904e7fe.js} +17 -1
- package/dist/esm/{type-guard-30eec79c.js → type-guard-a2cbaae9.js} +117 -3
- package/dist/esm/{typography-396de03f.js → typography-19c3b9be.js} +10 -10
- package/dist/esm/{valid-credit-card-number-rule-1ac471e8.js → valid-credit-card-number-rule-a3f9858d.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +14 -14
- package/dist/esm/vega-app-footer.entry.js +63 -9
- package/dist/esm/vega-app-header-button.entry.js +14 -14
- package/dist/esm/vega-banner.entry.js +7 -7
- package/dist/esm/vega-bar-chart.entry.js +3 -3
- package/dist/esm/vega-box.entry.js +8 -8
- package/dist/esm/vega-brand-logo.entry.js +3 -3
- package/dist/esm/vega-breadcrumb.entry.js +5 -5
- package/dist/esm/vega-button-circle.entry.js +12 -12
- package/dist/esm/vega-button-group_2.entry.js +8 -8
- package/dist/esm/vega-button-link.entry.js +5 -5
- package/dist/esm/vega-button.entry.js +10 -10
- package/dist/esm/{vega-calendar_4.entry.js → vega-calendar_5.entry.js} +666 -396
- package/dist/esm/vega-card.entry.js +7 -7
- package/dist/esm/vega-carousel.entry.js +8 -8
- package/dist/esm/vega-checkbox_2.entry.js +22 -15
- package/dist/esm/vega-chip.entry.js +11 -11
- package/dist/esm/vega-code-block.entry.js +18 -18
- package/dist/esm/vega-color-picker.entry.js +10 -8
- package/dist/esm/vega-color-swatch-picker.entry.js +15 -15
- package/dist/esm/vega-color-swatch.entry.js +5 -5
- package/dist/esm/vega-combo-box.entry.js +18 -18
- package/dist/esm/vega-date-picker_2.entry.js +26 -26
- package/dist/esm/{vega-dialog-controller-389e7f7c.js → vega-dialog-controller-726b74f9.js} +2 -2
- package/dist/esm/vega-dialog_2.entry.js +11 -11
- package/dist/esm/vega-divider.entry.js +7 -7
- package/dist/esm/vega-dropdown_5.entry.js +17 -17
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-event-id-92848bf5.js → vega-event-id-268f8def.js} +2 -1
- package/dist/esm/vega-field-label.entry.js +6 -6
- package/dist/esm/vega-file-uploader.entry.js +15 -13
- package/dist/esm/vega-flag-icon.entry.js +10 -10
- package/dist/esm/vega-flex.entry.js +8 -8
- package/dist/esm/vega-font.entry.js +14 -8
- package/dist/esm/vega-form.entry.js +12 -12
- package/dist/esm/vega-grid.entry.js +7 -7
- package/dist/esm/vega-icon.entry.js +9 -9
- package/dist/esm/vega-image-uploader.entry.js +17 -17
- package/dist/esm/vega-input-credit-card.entry.js +29 -19
- package/dist/esm/vega-input-numeric.entry.js +15 -15
- package/dist/esm/vega-input-passcode.entry.js +14 -14
- package/dist/esm/vega-input-phone-number.entry.js +15 -15
- package/dist/esm/vega-input-range.entry.js +10 -10
- package/dist/esm/vega-input-select.entry.js +19 -27
- package/dist/esm/vega-input.entry.js +19 -17
- package/dist/esm/{vega-internal-event-id-913e8be6.js → vega-internal-event-id-22151a4d.js} +2 -1
- package/dist/esm/vega-item-toggle.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +18 -18
- package/dist/esm/vega-line-chart.entry.js +3 -3
- package/dist/esm/vega-loader-wrapper_2.entry.js +5 -5
- package/dist/esm/vega-page-notification_2.entry.js +1 -1
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +4 -4
- package/dist/esm/vega-pagination.entry.js +11 -11
- package/dist/esm/vega-pie-chart.entry.js +2 -2
- package/dist/esm/vega-popover_2.entry.js +15 -15
- package/dist/esm/vega-progress-tracker_2.entry.js +11 -11
- package/dist/esm/vega-radio_2.entry.js +27 -20
- package/dist/esm/vega-rich-text-content.entry.js +49 -17
- package/dist/esm/vega-rich-text-editor_4.entry.js +89 -44
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +9 -9
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +17 -17
- package/dist/esm/vega-segment-control.entry.js +3 -3
- package/dist/esm/vega-selection-chip_2.entry.js +28 -15
- package/dist/esm/vega-selection-tile_2.entry.js +11 -11
- package/dist/esm/vega-sidenav_3.entry.js +14 -14
- package/dist/esm/vega-signature-capture.entry.js +18 -18
- package/dist/esm/vega-stepper.entry.js +9 -9
- package/dist/esm/vega-tab-group_2.entry.js +13 -10
- package/dist/esm/vega-table_11.entry.js +16 -16
- package/dist/esm/vega-textarea.entry.js +11 -11
- package/dist/esm/vega-time-picker_2.entry.js +17 -17
- package/dist/esm/vega-toggle-switch.entry.js +7 -7
- package/dist/esm/vega-tooltip_2.entry.js +9 -9
- package/dist/esm/vega.js +21 -21
- package/dist/esm/{wait-for-component-did-render-b378bf16.js → wait-for-component-did-render-0488922a.js} +1 -1
- package/dist/esm/{y-axis-input-processor-c7e05353.js → y-axis-input-processor-c6b2a914.js} +1 -1
- package/dist/sri/vega-sri-manifest.json +416 -416
- package/dist/types/components/vega-app-footer/slimmers/renderers/vega-app-footer-additional-links-renderer.d.ts +13 -0
- package/dist/types/components/vega-app-footer/vega-app-footer.d.ts +18 -1
- package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-current-period-controller.d.ts +11 -6
- package/dist/types/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.d.ts +2 -29
- package/dist/types/components/vega-calendar/types.d.ts +7 -1
- package/dist/types/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-current-period-controller.d.ts +63 -0
- package/dist/types/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-state-controller.d.ts +10 -0
- package/dist/types/components/vega-calendar/vega-calendar-period-switcher/slimmers/renderers/vega-calendar-period-renderer.d.ts +11 -0
- package/dist/types/components/vega-calendar/vega-calendar-period-switcher/vega-calendar-period-switcher.d.ts +82 -0
- package/dist/types/components/vega-calendar/vega-calendar.d.ts +15 -1
- package/dist/types/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.d.ts +10 -1
- package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +2 -10
- package/dist/types/components/vega-input-credit-card/vega-input-credit-card.d.ts +10 -0
- package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +0 -1
- package/dist/types/components/vega-radio/vega-radio-group/vega-radio-group.d.ts +10 -1
- package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +5 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.d.ts +3 -1
- package/dist/types/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.d.ts +8 -5
- package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +9 -0
- package/dist/types/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.d.ts +16 -12
- package/dist/types/components/vega-rich-text-editor/extensions/link/link-extension.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/extensions/link/type.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/extensions/link/utils.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/extensions/rte-extension-state-store.d.ts +30 -0
- package/dist/types/components/vega-rich-text-editor/public-api.d.ts +2 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +22 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +27 -2
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.d.ts +1 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip-group/slimmers/renderers/vega-selection-chip-group-renderer.d.ts +1 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.d.ts +10 -0
- package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-pages-controller.d.ts +3 -2
- package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +4 -3
- package/dist/types/components.d.ts +149 -8
- package/dist/types/constants/ui.d.ts +1 -1
- package/dist/types/helpers/calendar/calendar-period/calendar-period.abstract.d.ts +6 -0
- package/dist/types/helpers/calendar/calendar-period/day-period.d.ts +4 -0
- package/dist/types/helpers/calendar/calendar-period/internal-calendar-period-factory.d.ts +33 -0
- package/dist/types/helpers/calendar/calendar-period/month-period.d.ts +4 -0
- package/dist/types/helpers/calendar/calendar-period/vega-calendar-period-factory.d.ts +16 -0
- package/dist/types/helpers/calendar/calendar-period/week-period.d.ts +5 -0
- package/dist/types/helpers/calendar/index.d.ts +1 -0
- package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
- package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
- package/dist/types/helpers/feature-control/feature-flag.d.ts +3 -1
- package/dist/types/helpers/public-api.d.ts +1 -0
- package/dist/types/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.d.ts +2 -1
- package/dist/types/helpers/slimmers/translation/translation-slimmer.d.ts +11 -0
- package/dist/types/helpers/translation/interface.d.ts +10 -1
- package/dist/types/types/components.type.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-76454c9a.js → p-014e2cf9.js} +1 -1
- package/dist/vega/{p-6a3ea3f0.entry.js → p-044496e0.entry.js} +1 -1
- package/dist/vega/{p-157a2459.entry.js → p-0605c656.entry.js} +1 -1
- package/dist/vega/{p-3390bb20.js → p-0707aa21.js} +1 -1
- package/dist/vega/{p-be6c1415.js → p-0e03daa6.js} +1 -1
- package/dist/vega/{p-cdde6e64.entry.js → p-12b5c5e3.entry.js} +1 -1
- package/dist/vega/{p-3a49089e.js → p-141f74ff.js} +1 -1
- package/dist/vega/p-144d4b30.js +1 -0
- package/dist/vega/p-14bfc113.js +1 -0
- package/dist/vega/p-15da9d58.entry.js +1 -0
- package/dist/vega/{p-fc0ce3b5.entry.js → p-1acd5f04.entry.js} +1 -1
- package/dist/vega/{p-dbb02b32.entry.js → p-216ef41e.entry.js} +1 -1
- package/dist/vega/p-21775cc7.js +1 -0
- package/dist/vega/p-2944c76e.entry.js +1 -0
- package/dist/vega/p-2b22091e.js +1 -0
- package/dist/vega/{p-baef217a.entry.js → p-2f48162f.entry.js} +1 -1
- package/dist/vega/{p-44d2f9e7.entry.js → p-316a1e5c.entry.js} +1 -1
- package/dist/vega/{p-1827a459.entry.js → p-329c808e.entry.js} +1 -1
- package/dist/vega/{p-a0705cd0.entry.js → p-335e3237.entry.js} +1 -1
- package/dist/vega/{p-efe6e4e6.entry.js → p-3372f34a.entry.js} +1 -1
- package/dist/vega/p-3863187f.entry.js +1 -0
- package/dist/vega/{p-740f3325.entry.js → p-3911e760.entry.js} +1 -1
- package/dist/vega/{p-8666f206.entry.js → p-3cf298a4.entry.js} +1 -1
- package/dist/vega/{p-d1cc3544.entry.js → p-3fe43f7a.entry.js} +1 -1
- package/dist/vega/p-4037126d.js +1 -0
- package/dist/vega/{p-5fd29f29.entry.js → p-42a1d300.entry.js} +1 -1
- package/dist/vega/{p-78a6e741.entry.js → p-42ed76ee.entry.js} +1 -1
- package/dist/vega/{p-57b34bf9.entry.js → p-42f3c0b1.entry.js} +1 -1
- package/dist/vega/p-4644ccf9.entry.js +1 -0
- package/dist/vega/{p-35e800ac.js → p-4979fd7d.js} +1 -1
- package/dist/vega/p-49b4ab2b.js +1 -0
- package/dist/vega/{p-46e0c6ca.js → p-4cef4812.js} +1 -1
- package/dist/vega/p-507612f6.entry.js +1 -0
- package/dist/vega/{p-9a35a34f.entry.js → p-50d7a1c4.entry.js} +1 -1
- package/dist/vega/p-522dd15f.entry.js +1 -0
- package/dist/vega/p-53ed3b1f.js +1 -0
- package/dist/vega/p-57f7c257.js +1 -0
- package/dist/vega/p-58a00869.entry.js +1 -0
- package/dist/vega/{p-fae4d64e.js → p-5a4e598f.js} +1 -1
- package/dist/vega/{p-2f2201d6.entry.js → p-5bed3fd2.entry.js} +1 -1
- package/dist/vega/{p-ed0cc518.entry.js → p-5df53125.entry.js} +1 -1
- package/dist/vega/p-5e1cd1cc.js +1 -0
- package/dist/vega/p-5e1ec2b8.entry.js +1 -0
- package/dist/vega/{p-363e453b.js → p-5e282e41.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-93cbc231.entry.js → p-5fcb825c.entry.js} +1 -1
- package/dist/vega/{p-3a93730e.js → p-5ffc7cb8.js} +1 -1
- package/dist/vega/{p-724df1f5.js → p-6031bed1.js} +1 -1
- package/dist/vega/{p-8e34b266.js → p-6096ffc3.js} +1 -1
- package/dist/vega/p-61d42e9b.entry.js +1 -0
- package/dist/vega/p-63ae5ada.entry.js +1 -0
- package/dist/vega/{p-43af604c.entry.js → p-64b5fe2a.entry.js} +1 -1
- package/dist/vega/p-66905cbf.js +1 -0
- package/dist/vega/{p-9a562813.entry.js → p-6820b488.entry.js} +1 -1
- package/dist/vega/{p-c4bd6cf8.entry.js → p-689070f9.entry.js} +1 -1
- package/dist/vega/{p-d93574dd.entry.js → p-6e7c1b19.entry.js} +1 -1
- package/dist/vega/{p-4694fe27.entry.js → p-6ecb3c7d.entry.js} +1 -1
- package/dist/vega/p-70352240.entry.js +1 -0
- package/dist/vega/p-73b9868f.js +1 -0
- package/dist/vega/{p-6c484462.entry.js → p-74fa0f5b.entry.js} +1 -1
- package/dist/vega/{p-e4917e76.js → p-7b9ed949.js} +1 -1
- package/dist/vega/p-7bb39b97.js +1 -0
- package/dist/vega/{p-89d55444.entry.js → p-7f086e54.entry.js} +1 -1
- package/dist/vega/p-7f139b74.js +1 -0
- package/dist/vega/{p-c91e0a43.js → p-8019c156.js} +1 -1
- package/dist/vega/p-81591449.entry.js +1 -0
- package/dist/vega/{p-328dbe8e.js → p-822f70b0.js} +1 -1
- package/dist/vega/p-85d78ac1.js +1 -0
- package/dist/vega/p-8982796b.entry.js +1 -0
- package/dist/vega/{p-df71c830.entry.js → p-8bc23bcf.entry.js} +1 -1
- package/dist/vega/{p-a9b6ce74.js → p-92a144bc.js} +1 -1
- package/dist/vega/{p-8865613a.entry.js → p-94845302.entry.js} +1 -1
- package/dist/vega/{p-059ba5f5.entry.js → p-9756c6b9.entry.js} +1 -1
- package/dist/vega/{p-00d2a013.entry.js → p-9abf7d0a.entry.js} +1 -1
- package/dist/vega/{p-976536c7.entry.js → p-9e327397.entry.js} +1 -1
- package/dist/vega/p-9f608b97.js +1 -0
- package/dist/vega/p-9fb3aeeb.entry.js +1 -0
- package/dist/vega/{p-1d16a7fa.entry.js → p-a04b95aa.entry.js} +1 -1
- package/dist/vega/p-a14d8767.js +1 -0
- package/dist/vega/{p-f7cab150.entry.js → p-a4826f3f.entry.js} +1 -1
- package/dist/vega/{p-8ce92f5f.entry.js → p-aaa6e976.entry.js} +1 -1
- package/dist/vega/{p-fa398acc.entry.js → p-aca134a3.entry.js} +1 -1
- package/dist/vega/{p-8457b6b7.entry.js → p-ae728041.entry.js} +1 -1
- package/dist/vega/{p-2abdca42.js → p-aea912ac.js} +1 -1
- package/dist/vega/{p-9a6bd32c.js → p-afcd8f04.js} +1 -1
- package/dist/vega/{p-fbde6153.js → p-b2f89dbd.js} +1 -1
- package/dist/vega/{p-bd5566e3.entry.js → p-b2f9698a.entry.js} +1 -1
- package/dist/vega/p-b438e68b.js +1 -0
- package/dist/vega/p-b504a8b4.entry.js +1 -0
- package/dist/vega/{p-285b161c.entry.js → p-b77e85e0.entry.js} +1 -1
- package/dist/vega/{p-e80e7cd9.entry.js → p-b7b0930a.entry.js} +1 -1
- package/dist/vega/{p-600f0316.entry.js → p-bb0040d4.entry.js} +1 -1
- package/dist/vega/{p-dcf162e9.js → p-bc73ce30.js} +1 -1
- package/dist/vega/{p-5a6e2c08.entry.js → p-bd94b904.entry.js} +1 -1
- package/dist/vega/{p-1be90bab.entry.js → p-c04a90d8.entry.js} +1 -1
- package/dist/vega/p-c0c2a917.js +3 -0
- package/dist/vega/p-c40555c4.entry.js +1 -0
- package/dist/vega/{p-92e493ea.entry.js → p-c65a5778.entry.js} +1 -1
- package/dist/vega/{p-df3a649c.entry.js → p-c75872a4.entry.js} +1 -1
- package/dist/vega/{p-1ab4c08d.js → p-c87c7ef4.js} +1 -1
- package/dist/vega/{p-fcefb62c.js → p-cb4033ef.js} +1 -1
- package/dist/vega/p-cc8bf6e7.entry.js +1 -0
- package/dist/vega/{p-d2916121.js → p-cd21adb8.js} +1 -1
- package/dist/vega/{p-f7e8081e.js → p-cd2a1ffb.js} +1 -1
- package/dist/vega/{p-2c5352fe.entry.js → p-ce27c273.entry.js} +1 -1
- package/dist/vega/p-cec8ffdc.js +1 -0
- package/dist/vega/{p-ad89f499.js → p-d0060bdb.js} +1 -1
- package/dist/vega/p-d00b3910.js +1 -0
- package/dist/vega/{p-a58cacca.js → p-d14ddf80.js} +1 -1
- package/dist/vega/{p-f597b65e.entry.js → p-da067259.entry.js} +1 -1
- package/dist/vega/p-da2b1fd0.entry.js +1 -0
- package/dist/vega/p-dc78e8d6.js +1 -0
- package/dist/vega/{p-091fbc35.js → p-ddc2d219.js} +1 -1
- package/dist/vega/p-e75e75c9.entry.js +1 -0
- package/dist/vega/p-e8f50fc5.js +1 -0
- package/dist/vega/{p-3ef9c69d.entry.js → p-e9a82603.entry.js} +1 -1
- package/dist/vega/{p-d7790113.js → p-ef44d516.js} +1 -1
- package/dist/vega/p-f362c07b.entry.js +1 -0
- package/dist/vega/{p-b9bd85d6.entry.js → p-fb1ef3e6.entry.js} +1 -1
- package/dist/vega/p-fc103347.entry.js +1 -0
- package/dist/vega/p-fea33425.js +1 -0
- package/dist/vega/{p-1704ff25.js → p-ffdc25ec.js} +1 -1
- package/dist/vega/vega.css +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/style/vega.css +1 -1
- package/dist/cjs/base-renderer-0a3b62b7.js +0 -9
- package/dist/cjs/dto-renderer-manager-7eb5c5ce.js +0 -98
- package/dist/cjs/month-view-generator-43e75062.js +0 -101
- package/dist/esm/base-renderer-101f6d04.js +0 -7
- package/dist/esm/dto-renderer-manager-abc7eb5f.js +0 -96
- package/dist/esm/month-view-generator-d341fa5a.js +0 -97
- package/dist/vega/p-018756ad.entry.js +0 -1
- package/dist/vega/p-09deb867.entry.js +0 -1
- package/dist/vega/p-0bb860cc.js +0 -1
- package/dist/vega/p-1e68e217.entry.js +0 -1
- package/dist/vega/p-2649051e.entry.js +0 -1
- package/dist/vega/p-26a54a73.entry.js +0 -1
- package/dist/vega/p-280cbcdb.js +0 -1
- package/dist/vega/p-2e86aee5.js +0 -1
- package/dist/vega/p-337440ce.entry.js +0 -1
- package/dist/vega/p-3a5737fa.js +0 -1
- package/dist/vega/p-46cab60a.js +0 -1
- package/dist/vega/p-48ea74b5.entry.js +0 -1
- package/dist/vega/p-4b34df4c.entry.js +0 -1
- package/dist/vega/p-4c6baf92.entry.js +0 -1
- package/dist/vega/p-50e7020c.js +0 -1
- package/dist/vega/p-5f09aba8.js +0 -1
- package/dist/vega/p-61536fcf.entry.js +0 -1
- package/dist/vega/p-630cd479.js +0 -1
- package/dist/vega/p-66b2a285.entry.js +0 -1
- package/dist/vega/p-73508c24.js +0 -1
- package/dist/vega/p-7fbd11b0.js +0 -1
- package/dist/vega/p-8258dc37.entry.js +0 -1
- package/dist/vega/p-894fb9c9.entry.js +0 -1
- package/dist/vega/p-89947a43.js +0 -1
- package/dist/vega/p-8a34c08a.js +0 -1
- package/dist/vega/p-8a3d12e6.js +0 -1
- package/dist/vega/p-94a064a3.js +0 -1
- package/dist/vega/p-9cb92fa3.entry.js +0 -1
- package/dist/vega/p-a18d280f.js +0 -3
- package/dist/vega/p-a7b5f497.js +0 -1
- package/dist/vega/p-b2488adb.js +0 -1
- package/dist/vega/p-b3b22e36.entry.js +0 -1
- package/dist/vega/p-b66d46ce.js +0 -1
- package/dist/vega/p-b6be1f33.js +0 -1
- package/dist/vega/p-b6c3ce6d.js +0 -1
- package/dist/vega/p-c016b230.entry.js +0 -1
- package/dist/vega/p-c3be0c29.entry.js +0 -1
- package/dist/vega/p-ca4773c3.entry.js +0 -1
- package/dist/vega/p-d884c644.js +0 -1
- package/dist/vega/p-dd529875.js +0 -1
- package/dist/vega/p-efe48ed5.entry.js +0 -1
- package/dist/vega/p-f764b62e.entry.js +0 -1
- package/dist/vega/p-f7c6af07.js +0 -1
- package/dist/vega/p-ff24b342.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t}from"./p-8b5d3a52.js";import{a as e,g as n,D as i,f as r,r as a}from"./p-528748fa.js";import{L as s,I as o}from"./p-6e1ab235.js";import{I as l,c}from"./p-afcd8f04.js";import{I as h}from"./p-781fd6e0.js";import{c as d}from"./p-6a334573.js";import{P as u}from"./p-81dd00d0.js";import{i as p}from"./p-53ed3b1f.js";import{V as f}from"./p-ddc2d219.js";import{I as w}from"./p-73b9868f.js";import{U as g,V as b,B as m,E as v,h as y,I as x,R as L,a as C,P as S,A as k,b as T}from"./p-c0c2a917.js";import{R as A,a as E,b as I}from"./p-cec8ffdc.js";import{M as O,A as R,R as N,a as j,b as D,c as _,d as B,I as M,e as V,f as H,s as P,g as K,h as F,i as z,B as $,j as q,k as G,C as W,l as U,m as Z,n as J,o as Q,S as X,U as Y,N as tt,p as et,q as nt,r as it}from"./p-9f608b97.js";import{i as rt}from"./p-2b22091e.js";import{V as at}from"./p-6031bed1.js";import{v as st}from"./p-4866e390.js";import{D as ot,d as lt}from"./p-526e3634.js";import{V as ct,a as ht,b as dt,c as ut}from"./p-cb4033ef.js";import{R as pt,a as ft,S as wt,T as gt,b as bt,c as mt,d as vt,e as yt,C as xt,M as Lt,f as Ct,g as St,h as kt,i as Tt,j as At,k as Et,l as It,m as Ot,n as Rt,o as Nt,p as jt,q as Dt,s as _t,r as Bt,t as Mt,I as Vt,u as Ht,v as Pt,w as Kt,x as Ft,y as zt,z as $t,A as qt,B as Gt,D as Wt,E as Ut,F as Zt,G as Jt,H as Qt,J as Xt,K as Yt,L as te,N as ee,O as ne,P as ie,Q as re,U as ae,W as se,X as oe,Y as le}from"./p-49b4ab2b.js";import{C as ce}from"./p-2d0d575f.js";import{V as he,a as de,b as ue}from"./p-5ffc7cb8.js";import{r as pe}from"./p-77e64f26.js";import{V as fe}from"./p-3e09aeed.js";import{t as we}from"./p-b75ee3ba.js";import{p as ge}from"./p-0c667d6a.js";import{c as be}from"./p-a841cf13.js";import{d as me}from"./p-1bc5b3bc.js";import{R as ve}from"./p-4037126d.js";const ye=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaLoaderController is called",canAccept:(t,e)=>"VegaLoaderController"===t&&"load"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaLoaderController is called",canAccept:(t,e)=>"VegaLoaderController"===t&&"close"===e,payloadValue:()=>!0}];class xe{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(xe,["load","close"],ye,"VegaLoaderController")}load(t={}){let e=t.containerSelector||"body",n=document.querySelector(e);if(n&&xe.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY.includes(n.tagName)&&(e="body",n=document.querySelector("body")),!n)return s.error("Container is not found by selector: ",e),null;const i=this.createLoadingIndicator(t.indicatorOptions),r=this.createLoader(e);return r.append(i),this.appendLoader(r,n)}close(t){const e=this.findLoader(t);if(e){if(e.dataset.container){const t=document.querySelector(e.dataset.container);t&&t.dataset.vegaLoaderOriginPosition&&(t.style.position=t.dataset.vegaLoaderOriginPosition)}e.remove()}}findLoader(t){var e,n;let i;if(t.includes(">>>")){const[r,a]=t.split(">>>");i=null===(n=null===(e=document.querySelector(r))||void 0===e?void 0:e.shadowRoot)||void 0===n?void 0:n.getElementById(a)}else i=document.getElementById(t);return i}createLoader(n){const i=document.createElement("vega-loader-wrapper");return i.className=e(["body"===n?"fixed-wrapper":"absolute-wrapper"]),i.dataset.container=n,i.id=`vega-loader-${t()}`,i}createLoadingIndicator(t={}){const e=document.createElement("vega-loading-indicator");return Object.assign(e,t),e}appendLoader(t,e){return e.dataset.vegaLoaderOriginPosition=e.style.position,e.style.position="relative",e.shadowRoot?(e.shadowRoot.append(t),`${t.dataset.container}>>>${t.id}`):(e.append(t),t.id)}}xe.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY=["VEGA-MODAL"],function(t,e,n,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(a<3?r(s):a>3?r(e,n,s):r(e,n))||s);a>3&&s&&Object.defineProperty(e,n,s)}([l()],xe.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Le=new xe,Ce=[{payloadKey:"IS_OPEN_METHOD_CALLED",payloadDescription:"Indicate if the method open of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"open"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"close"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSEALL_METHOD_CALLED",payloadDescription:"Indicate if the method closeAll of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"closeAll"===e,payloadValue:()=>!0}];var Se=function(t,e,n,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(a<3?r(s):a>3?r(e,n,s):r(e,n))||s);return a>3&&s&&Object.defineProperty(e,n,s),s};class ke{constructor(){this.resizeObserverSlimmer=d(ke,u,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{var e;!(t[0].contentRect.height>0)&&(null===(e=this.container)||void 0===e?void 0:e.classList.contains("hydrated"))&&(h.removeZIndex(this.container,"top"),this.container.remove(),this.container=null)},target:()=>this.container}]),this.vegaPublicAPIRuntimeMetricsSlimmer=c(ke,["open","close","closeAll"],Ce,"VegaNotifyController")}async open(t){const e=this.createPageNotification(t);return this.getContainer().append(e),e.id}async closeAll(){this.container&&Array.from(this.container.children).forEach((t=>{t.close()}))}async close(t){await document.getElementById(t).close()}connectResizeObserver(){}createPageNotification(e){const r=document.createElement("vega-page-notification");return Object.keys(e).forEach((t=>{void 0!==e[t]&&(r[t]=e[t])})),r.style.marginBottom=n()===i.MOBILE?"12px":"16px",r.id=`vega-page-notification-${t()}`,r}getContainer(){return this.container||(this.container=document.createElement("vega-page-notification-list"),h.setZIndex(this.container,"top"),n()===i.MOBILE?this.container.classList.add("vega-page-notification-list-bottom"):this.container.classList.add("vega-page-notification-list-topRight"),document.body.append(this.container),this.connectResizeObserver()),this.container}}Se([o()],ke.prototype,"resizeObserverSlimmer",void 0),Se([l()],ke.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Te=new ke,Ae=[{payloadKey:"IS_SETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method setSemantics of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:()=>!0},{payloadKey:"IS_GETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method getSemantics of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"getSemantics"===e,payloadValue:()=>!0},{payloadKey:"IS_GETENABLEDEVENTIDSBYCOMPONENT_METHOD_CALLED",payloadDescription:"Indicate if the method getEnabledEventIdsByComponent of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"getEnabledEventIdsByComponent"===e,payloadValue:()=>!0},{payloadKey:"globalEventIsNative",payloadDescription:"Indicate if the vega components will emit events without the vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>!(!t.global||"native"!==t.global.namespace)},{payloadKey:"eventOfSpecificComponentsIsNative",payloadDescription:"Indicate if the vega components will emit events with the vega prefix, but special components will emit events without vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.components){const t=Object.keys(e.components);return!!(t.length>0&&"native"===e.components[t[0]].namespace)}return!1}},{payloadKey:"eventOfSpecificComponentsIsVega",payloadDescription:"Indicate if the vega components will emit events without the vega prefix, but special components will emit events with vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.global&&e.components){const t=Object.keys(e.components);return!!("native"===e.global.namespace&&t.length>0&&"vega"===e.components[t[0]].namespace)}return!1}},{payloadKey:"globalJqueryDelegatedEventIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>!(!t.global||!0!==t.global.jqueryDelegatedEvent)},{payloadKey:"jqueryDelegatedEventIsCustomStrategy",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;return!!(e.global&&Array.isArray(e.global.jqueryDelegatedEvent)&&e.global.jqueryDelegatedEvent.length>0)}},{payloadKey:"jqueryDelegatedEventOfSpecialComponentsIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.components){const t=Object.keys(e.components);return!!(t.length>0&&!0===e.components[t[0]].jqueryDelegatedEvent)}return!1}}];class Ee{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Ee,["setSemantics","getSemantics","getEnabledEventIdsByComponent"],Ae,"VegaEventManager")}setSemantics(t){p.setSemantics(t)}getSemantics(t){return p.getSemantics(t)}getEnabledEventIdsByComponent(t){return p.getEnabledEventIdsByComponent(t)}}!function(t,e,n,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(a<3?r(s):a>3?r(e,n,s):r(e,n))||s);a>3&&s&&Object.defineProperty(e,n,s)}([l()],Ee.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ie=new Ee,Oe=[{payloadKey:"IS_OVERRIDEZINDEXBASICVALUES_METHOD_CALLED",payloadDescription:"Indicate if the method overrideZIndexBasicValues of public API ZIndexManager is called",canAccept:(t,e)=>"VegaZIndexManager"===t&&"overrideZIndexBasicValues"===e,payloadValue:()=>!0},{payloadKey:"zIndexBasicValuesGreatThanTenThousand",payloadDescription:"Indicate if the basic z-index value is great than ten thousand",canAccept:(t,e)=>"VegaZIndexManager"===t&&"overrideZIndexBasicValues"===e,payloadValue:t=>t.base>1e4}];class Re{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Re,["overrideZIndexBasicValues"],Oe,"VegaZIndexManager")}overrideZIndexBasicValues(t){h.overrideZIndexBasicValues(t)}}!function(t,e,n,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(a<3?r(s):a>3?r(e,n,s):r(e,n))||s);a>3&&s&&Object.defineProperty(e,n,s)}([l()],Re.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ne=new Re,je=[{payloadKey:"IS_WAITFORVEGA_METHOD_CALLED",payloadDescription:"Indicate if the method waitForVega of public API WaitForVegaHandler is called",canAccept:(t,e)=>"WaitForVegaHandler"===t&&"handle"===e,payloadValue:()=>!0}];class De{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(De,["handle"],je,"WaitForVegaHandler")}async handle(){return await Promise.all(Array.from(document.querySelectorAll("*:not(.hydrated)")).filter((t=>t.tagName.startsWith("VEGA"))).map((t=>{var e;return null===(e=t.componentOnReady)||void 0===e?void 0:e.call(t)})))}}!function(t,e,n,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(a<3?r(s):a>3?r(e,n,s):r(e,n))||s);a>3&&s&&Object.defineProperty(e,n,s)}([l()],De.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const _e=new De,Be=async()=>_e.handle(),Me=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"load"===e,payloadValue:()=>!0},{payloadKey:"IS_UNLOAD_METHOD_CALLED",payloadDescription:"Indicate if the method unLoad of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"unLoad"===e,payloadValue:()=>!0},{payloadKey:"IS_UNLOADALL_METHOD_CALLED",payloadDescription:"Indicate if the method unLoadAll of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"unLoadAll"===e,payloadValue:()=>!0}];class Ve{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Ve,["load","unLoad","unLoadAll"],Me,"VegaSkeletonLoaderController"),this.loaderMap=new Map}load({target:e,type:n="text",width:i,height:r,items:a,layout:s}){const o=Array.from(document.body.querySelectorAll(e)),l=`vega-skeleton-loader-${t()}`,c=[];return o.forEach((t=>{const e=a?a.map(this.createSkeleton):[this.createSkeleton({type:n,width:i,height:r})],o=(s?[this.wrapLayout(e,s)]:e).map((t=>(t.dataset[Ve.LOADER_DATA_SET_KEY]=l,t)));c.push(...o),t.append(...o)})),this.loaderMap.set(l,c),l}unLoad(t){this.loaderMap.has(t)&&(this.loaderMap.get(t).forEach((t=>t.remove())),this.loaderMap.delete(t))}unLoadAll(){for(const t of this.loaderMap.values())t.forEach((t=>t.remove()));this.loaderMap.clear()}createSkeleton(t){const{type:e,width:n,height:i}=t,r=document.createElement("vega-skeleton");return Object.assign(r,{animated:!0,type:e,width:n,height:i}),r}wrapLayout(t,e){const n=document.createElement("vega-flex");return Object.assign(n,Object.assign({className:"vega-skeleton-loader-template-container"},e.props)),Object.assign(n.style,e.style),n.append(...t),n}}Ve.LOADER_DATA_SET_KEY="vegaSkeletonLoaderKey",function(t,e,n,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(a<3?r(s):a>3?r(e,n,s):r(e,n))||s);a>3&&s&&Object.defineProperty(e,n,s)}([l()],Ve.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const He=new Ve,Pe=[{payloadKey:"IS_INIT_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.init is called",canAccept:(t,e)=>"TranslationController"===t&&"init"===e,payloadValue:()=>!0},{payloadKey:"IS_CHANGE_LANGUAGE_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.changeLanguage is called",canAccept:(t,e)=>"TranslationController"===t&&"changeLanguage"===e,payloadValue:()=>!0}];class Ke{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Ke,["init","changeLanguage"],Pe,"TranslationController")}get currentLanguage(){return f.currentLanguage}init(t){f.init(t)}changeLanguage(t){f.changeLanguage(t)}}!function(t,e,n,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(a<3?r(s):a>3?r(e,n,s):r(e,n))||s);a>3&&s&&Object.defineProperty(e,n,s)}([l()],Ke.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Fe=new Ke;class ze{static fromDate(t,e="month",n,i=!0){const r=w.createCalendarPeriod(t,e,n,i);return w.toCalendarPeriodType(r)}}class $e{constructor(){this.dropdownEl=null,this.itemsContainerEl=null,this.buttonEl=null}isHidden(t){return t.sourceEditMode}getExtensionContext(t){return A.getExtensionContext(t)}renderDropdown(t,e,n,i){return t("vega-dropdown",Object.assign({trigger:"click",searchable:!1,maxWidth:"200",itemDisplayRule:"ellipsis",ref:t=>{this.dropdownEl=t,ot.addUniqueObserverToNode(t,ct,(t=>{this.handleDropdownClick(t.detail,e)}))}},n),i)}renderDropdownListTemplate(t,e,n){return t("div",{slot:"items",onMouseDown:this.preventDefault,onKeyDown:t=>this.handleItemsKeyDown(t),ref:t=>{this.itemsContainerEl=t},class:"rte-dropdown-list"},[t("style",{nonce:st.nonce},".rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }"),...e.map((e=>"children"in e?this.renderDropdownGroup(t,e,n):this.renderDropdownItem(t,e,n)))])}renderDropdownItem(t,e,n){return t("vega-dropdown-item",{key:e.key,itemKey:e.key,label:n.translation.t(e.label),prefixIcon:e.icon})}renderDropdownGroup(t,e,n){return t("vega-dropdown-group",{key:e.key,label:n.translation.t(e.label),divide:!1},e.children.map((e=>"children"in e?this.renderDropdownGroup(t,e,n):this.renderDropdownItem(t,e,n))))}renderButton(t,e,n){const{icon:i,label:r,showArrowIcon:a,tooltip:s}=n,o=this.isDisabled(e),l=t("vega-rich-text-editor-toolbar-button",{disabled:o,icon:i,hidden:this.isHidden(e),selected:this.isSelected(e),ref:t=>{this.buttonEl=t,ot.addUniqueObserverToNode(t,ht,(()=>this.handleButtonClick(e)))},onMouseDown:this.preventDefault,onKeyDown:t=>this.handleButtonKeyDown(t)},[this.renderButtonLabel(t,e,r),a?t("vega-icon",{size:"size-8",color:o?"text-disabled":"text-secondary",style:{marginLeft:"8px"},icon:at.getIconKey("chevron-down")}):null].filter(rt));return(null==s?void 0:s.text)?t("vega-tooltip",{text:e.translation.t(s.text),placement:["bottom","top"]},[l]):l}renderButtonLabel(t,e,n){return n?t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary"},e.translation.t(n)):null}isDisabled(t){return t.host.disabled}isSelected(t){return!1}preventDefault(t){t.preventDefault()}getListItemByKey(t,e){for(const n of t)if("children"in n){const t=this.getListItemByKey(n.children,e);if(t)return t}else if(n.key===e)return n;return null}handleButtonKeyDown(t){this.dropdownEl&&("Enter"===t.code||"Space"===t.code?(t.preventDefault(),t.stopPropagation(),this.dropdownEl.dispatchEvent(new MouseEvent("click",{bubbles:!0}))):"ArrowDown"!==t.code&&"ArrowUp"!==t.code||(t.preventDefault(),t.stopPropagation(),this.dropdownEl.show().then((()=>{this.focusDropdownItem("ArrowDown"===t.code?"first":"last")}))))}handleItemsKeyDown(t){var e,n,i;if("Escape"===t.code)return t.preventDefault(),t.stopPropagation(),this.dropdownEl&&this.dropdownEl.hide(),void(null===(e=this.buttonEl)||void 0===e||e.focus());if("ArrowDown"!==t.code&&"ArrowUp"!==t.code)return;t.preventDefault(),t.stopPropagation();const r=this.getDropdownItems();if(0===r.length)return;const a=r.findIndex((t=>{var e,n;return(null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("li"))===(null===(n=t.shadowRoot)||void 0===n?void 0:n.activeElement)})),s="ArrowDown"===t.code?1:-1,o=-1===a?"ArrowDown"===t.code?0:r.length-1:a+s;for(let t=0;t<r.length;t++){const e=(o+t*s+r.length)%r.length;if(!r[e].disabled)return void(null===(i=null===(n=r[e].shadowRoot)||void 0===n?void 0:n.querySelector("li"))||void 0===i||i.focus())}}focusDropdownItem(t){var e,n;const i=this.getDropdownItems(),r="first"===t?i:[...i].reverse();for(const t of r)if(!t.disabled)return void(null===(n=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("li"))||void 0===n||n.focus())}getDropdownItems(){return this.itemsContainerEl?Array.from(this.itemsContainerEl.querySelectorAll("vega-dropdown-item")):[]}}class qe extends O{constructor(t,e){super(),this.type="INSERT_TOKEN_NODE",this.rteRange=null,this.actionHandleResult=!1,this.rteRange=t,this.token=e}}class Ge extends $e{constructor(t){super(),this.tokenList=[],this.tokenList=t}render(t,e){return this.renderDropdown(t,e,{},[this.renderButton(t,e,{label:"Tokens",showArrowIcon:!0,tooltip:{text:"Insert token"}}),this.renderDropdownListTemplate(t,this.tokenList,e)])}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,[i]=n();return i?t.disabled||!R.canHandle("INSERT_TOKEN_NODE",i.parent):t.disabled}return!1}handleButtonClick(t){}handleDropdownClick(t,e){const n=this.getListItemByKey(this.tokenList,t),{rteRange:i}=e,{startNode:r}=i;if(r&&r.parent){const t=new qe(i,n);r.parent.apply(t),t.actionHandleResult&&this.flushEditorUI(e)}}flushEditorUI(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,flushValue:n}=e;n(t.value)}}}class We extends N{constructor(t,e,n,i,r){super(t,n,i,r),this.dtoName=We.dtoName,this.type="token",this.token=e,this.text=n}static from(t,e){const n=new We(t.id,t.token,t.text,e);return t.annotations&&(n.annotationMap=this.generateTextAnnotationMap(t.annotations)),n}toJSON(){const t=super.toJSON();return Object.assign({id:this.id,type:this.type,text:this.text,token:this.token},t.annotations?{annotations:t.annotations}:{})}isContentEditable(){return!1}clone(t){return new We(this.id,this.token,this.text,t,this.annotationMap)}toHtml(){return`<span class="token" contenteditable="false" template-token-key="${this.token}" token-key="${this.token}"${super.generateAttributeString()}>${this.text}</span>`}}We.dtoName="RTETokenNode";class Ue extends E{doRender(t,e,n){const{id:i,token:r}=e;return t("span",Object.assign(Object.assign({key:i,"template-token-key":r,"token-key":r,contenteditable:"false",style:e.getStyles(),class:`token ${e.getClasses()}`},this.additionalAttributes(e)),{ref:this.useRef(e),onClick:t=>{t.preventDefault(),n&&!1!==n.editable&&this.handleTokenElementClick(t,e,n.host)}}),e.text)}injectRTEScopeStyles(){return"span[token-key]{padding: 0 2px; margin: 0 1px; background-color: rgba(var(--v-bg-status-info, 205,209,211))}"}handleTokenElementClick(t,e,n){t.preventDefault(),n&&n.value.apply(new g(e,void 0,!0))}additionalAttributes(t){const e=t.getCustomAttributesAnnotation();let n={wrapped:"true"};return e&&(n=Object.assign(Object.assign({},n),e.render())),n}}class Ze extends $e{constructor(t,e,n=""){super(),this.languageList=[],this.languageChangeCallback=null,this.selectedLanguage="",this.labelRef=null,this.translation=null,this.handleDropdownClick=t=>{this.setSelectedLanguage(t),"function"==typeof this.languageChangeCallback&&this.languageChangeCallback(t)},this.languageList=t,this.languageChangeCallback=e,this.selectedLanguage=n}setSelectedLanguage(t){var e;if(this.selectedLanguage=t,(null===(e=this.labelRef)||void 0===e?void 0:e.firstChild)&&this.translation){const e=this.getLanguageLabelByKey(t);this.labelRef.firstChild.nodeValue=this.translation.t(e)}}isHidden(){return!1}render(t,e){const n=this.languageList.map((t=>this.translateDropdownEntry(t,e)));return this.renderDropdown(t,e,{source:n},[this.renderButton(t,e,{label:this.getLanguageLabelByKey(this.selectedLanguage),showArrowIcon:!0,tooltip:{text:"Select language"}})])}renderButtonLabel(t,e,n){return this.translation=e.translation,t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary",ref:t=>{this.labelRef=t}},e.translation.t(n))}handleButtonClick(t){}getLanguageLabelByKey(t){var e;const n=this.getListItemByKey(this.languageList,t);return null!==(e=null==n?void 0:n.label)&&void 0!==e?e:"Select Language"}translateDropdownEntry(t,e){const n=e.translation.t(t.label);return Object.assign(Object.assign({},t),"children"in t?{label:n,children:t.children.map((t=>this.translateDropdownEntry(t,e)))}:{label:n})}}class Je extends I{constructor(t,e){super(),this.languageToolbarButtonRenderer=null,this.languageState={selectedLanguage:"",contentMap:{}},this.languageChangeCallBack=t=>{const e=this.languageState.selectedLanguage;this.extensionContext&&e&&(this.languageState.contentMap[e]=this.getRTELatestValue(this.extensionContext.host)),this.languageState.selectedLanguage=t,this.applyLanguageContent(t,this.languageState.contentMap)},this.languageList=t,e&&(this.languageState=Object.assign(Object.assign({},this.languageState),e)),!this.languageState.selectedLanguage&&t.length>0&&(this.languageState.selectedLanguage=t[0].key)}prepareBeforeLoad(t){this.languageToolbarButtonRenderer=new Ze(this.languageList,this.languageChangeCallBack,this.languageState.selectedLanguage),this.registerToolbarButtonRenderer("languages",this.languageToolbarButtonRenderer,t)}initialExtensionAfterLoad(t){super.initialExtensionAfterLoad(t);const{selectedLanguage:e,contentMap:n}=this.languageState;this.languageToolbarButtonRenderer&&this.languageToolbarButtonRenderer.setSelectedLanguage(e),n&&n[e]&&this.applyLanguageContent(this.languageState.selectedLanguage,this.languageState.contentMap)}setState(t){const{selectedLanguage:e,contentMap:n}=t;this.languageToolbarButtonRenderer&&this.languageToolbarButtonRenderer.setSelectedLanguage(e),this.languageState.selectedLanguage=e,this.languageState.contentMap=Object.assign({},n),this.applyLanguageContent(e,n)}getState(){const{selectedLanguage:t,contentMap:e}=this.languageState;return this.extensionContext&&(e[t]=this.getRTELatestValue(this.extensionContext.host)),this.languageState}applyLanguageContent(t,e){if(this.extensionContext&&e){let n=e[t];const{host:i,flushValue:r}=this.extensionContext;n=n?n instanceof b?n:b.fromJSON(n,i.sourceEditConfig):b.createEmptyContent(),i.value!==n&&r(n,!0)}}getRTELatestValue(t){var e;let n=t.value;if(this.extensionContext&&this.extensionContext.isSourceEditMode()&&t.shadowRoot){const i=t.shadowRoot.querySelector(".source-view-container vega-code-block");if(i){let r;t.sourceEditConfig&&(r={autoMatchFormat:null===(e=t.sourceEditConfig.autoMatchFormat)||void 0===e||e,filterInlineStyles:t.sourceEditConfig.filterInlineStyles}),n=b.fromHtml(i.value.code,r)}}return n}}class Qe extends O{constructor(t){super(),this.type="INSERT_FUNCTION_BLOCK",this.functionType=t}}class Xe extends j{constructor(t){super(t),this.dtoName=Xe.dtoName,this.type="function-block",this.children=[]}static from(t,e){const n=new Xe(t.id),i={customClass:["statement"]};let{annotations:r}=t;return r=r?Object.assign(Object.assign({},r),i):i,super.convertAnnotationsToMap(n.annotationMap,r),n.children=this.generateBlockChildren(t.children,e,n),n}toHtml(){return`<div class="statement">${this.children.map((t=>t instanceof D?`<div class="statementelement"${this.getFunctionContentStyle(t)}>${t.getChildrenHtml()}</div>`:t.toHtml())).join("")}</div>`}clone(e){const n=new Xe(t());return n.parent=e,n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,children:this.children.map((t=>t.toJSON()))})}getFunctionContentStyle(t){const e=new _(t);let n=e.toCssText({standalone:!0});const i=t.getAnnotationByType("TEXT_STYLE");if(i&&"paragraph"===i.textStyle){const t=e.toCssText(void 0,void 0,i.renderStyle({standalone:!0}));n=n.replace(t,"").trim()}return n?` style="${n}"`:""}}Xe.dtoName="RTEFunctionBlock";class Ye extends B{handleAction(t,e){const{functionType:n}=t,i=this.getFunctionBlock(n),r=this.createNewParagraph(""),a=this.getReferenceBlock(e);a?a.parent.apply(new M(a,i,r)):e.apply(new V([i,r])),r&&(t.nextFocusNode=r.children[0])}getFunctionBlock(e){const n=t();return Xe.from({id:n,type:"function-block",children:[{id:`${n}-1`,type:"logic-control-block",statementText:e.toUpperCase()},{id:`${n}-2`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${n}-2-1`,type:"text",text:" "}]},{id:`${n}-3`,type:"logic-control-block",statementText:"SHOW"},{id:`${n}-4`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${n}-4-1`,type:"text",text:" "}]}]})}getReferenceBlock(t){if(!(t instanceof b)){const e=t.parent;return e instanceof Xe?e:t}}}class tn extends H{constructor(t,e,n){super(t),this.dtoName=tn.dtoName,this.type="logic-control-node",this.text="",this.text=e,this.parent=n}clone(){return new tn(this.id,this.text,this.parent)}toHtml(){return this.text}toJSON(){return{id:this.id,type:this.type,text:this.text}}getRangeEndOffset(){return 1}getRangeContainer(){const t=P.getDOMByEntity(this);if(t)return t.parentElement}isContentEditable(){return!1}}tn.dtoName="RTELogicControlNode";class en extends j{constructor(t,e,n){super(t),this.dtoName=en.dtoName,this.type="logic-control-block",this.children=[],this.statementText="",this.statementText=e,this.children=[new tn(`${t}-node-1`,e,this)],n&&(this.parent=n)}static from(t){return new en(t.id,t.statementText)}isNotEmpty(){return!0}getLastNode(){return this.children[this.children.length-1]}toHtml(){return`<div class='statementsyntax' contenteditable='false'>${this.statementText}</div>`}clone(t){return new en(this.id,this.statementText,t)}toJSON(){return{id:this.id,type:this.type,statementText:this.statementText}}}en.dtoName="RTELogicControlBlock";class nn extends $e{render(t,e){return this.renderDropdown(t,e,{},[this.renderButton(t,e,{label:"Functions",showArrowIcon:!0,tooltip:{text:"Insert function"}}),this.renderDropdownListTemplate(t,nn.FUNCTION_LIST,e)])}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,i=n()[0];let r=!0;return i&&(r=R.canHandle("INSERT_FUNCTION_BLOCK",i.parent)),t.disabled||!r}return!1}handleButtonClick(){throw new Error("Method not implemented.")}handleDropdownClick(t,e){if(e){const n=this.getExtensionContext(e.host);if(n){const{host:e,getSelectedNodes:i}=n,r=i()[0],a=new Qe(t);r?r.parent&&r.parent.apply(a):e.value.apply(a),a.nextFocusNode&&e.value.apply(new g(a.nextFocusNode,1))}}}}nn.FUNCTION_LIST=[{key:"IF",label:"Conditional"},{key:"FOREACH",label:"Foreach"}];class rn extends E{doRender(t,e){return t("div",{key:e.id,class:"statementsyntax",ref:this.useRef(e)},t("span",{key:`${e.id}-1`,contenteditable:"false",ref:this.useRef(e.children[0])},e.statementText))}}class an extends m{constructor(){super(...arguments),this.blockClassName="statementsyntax"}canHandle(t,e){const n=t[e];return n&&n.nodeType===Node.ELEMENT_NODE&&n.classList.contains(this.blockClassName)&&this.isFunctionBlockChild(n)?1:0}handle(e){const n=e[0];return en.from({id:t(),type:"logic-control-block",statementText:n.innerText})}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isFunctionBlockChild(t){return!(!t.parentElement||!t.parentElement.classList.contains("statement"))}}class sn extends E{doRender(t,e){return t("div",{key:e.id,class:this.getElementClassName(e),ref:this.useRef(e)})}injectRTEScopeStyles(){return"div.statement{padding:2px 4px;background:rgba(var(--v-bg-accent3-secondary, 255, 239, 200));border:1px solid rgba(var(--v-bg-accent3-primary, 255, 220, 131));border-radius:4px;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;gap:4px}div.statement .statementsyntax{padding:3px 0;line-height:22px}.rich-text-content div.statement .statementsyntax,.rich-text-content div.statement .statementelement{display:inline-block}div.statement+div.statement{margin-top:2px}div.statement .statementsyntax span{color:rgb(38, 42, 255);font-weight:bold}div.statement .statementelement{padding:2px 4px;background:rgba(var(--v-bg-secondary, 245, 247, 247));border:1px solid rgba(var(--v-border-color-input-field, 171, 198, 216));border-radius:4px;margin:0;min-width:8px}"}getElementClassName(t){let e=t.getClasses();return e.indexOf("statement")<0&&(e="statement "+e),e.trim()}}class on{}class ln extends on{canIntercept(t,e){return e.parent&&e.parent instanceof Xe}intercept(t,e,n){const i=new x(n.children[0],0);i.isFlushable=!0,n.parent.apply(i)}}class cn extends B{handleAction(t,e){const n=this.createNewParagraph("");n&&(e.parent.apply(new M(e,n)),t.newBlock=n,this.focusToNextLine(n))}focusToNextLine(t){const e=this.getRootContent(t);e&&e.apply(new g(t.children[0],1))}}class hn extends O{constructor(t,e,n){super(),this.type="PASTE_PLAIN_TEXT",this.blocksToBeInserted=t,this.startNode=e,this.startOffset=n}}class dn extends ln{intercept(t,e,n){const{blocksToBeInserted:i,rteRange:r}=e;let{startNode:a,startOffset:s}=e;r&&(a=r.startNode,s=r.startOffset);const o=new hn(i,a,s);n.apply(o)}}class un extends B{handleAction(t,e){const{blocksToBeInserted:n,startNode:i,startOffset:r}=t;if(i instanceof N){const t=n.flatMap((t=>t instanceof D?(this.copyLinkGroupAnnotations(e.annotationMap,t.annotationMap),t.children):[]));t.length>0&&(e.apply(r>0?new M(i,...t):new K(i,...t)),this.focusToNextLine(t[t.length-1],t[t.length-1].getRangeEndOffset()))}}focusToNextLine(t,e){const n=this.getRootContent(t);n&&n.apply(new g(t,e))}copyLinkGroupAnnotations(t,e){if(e&&e.has(F.LINK_GROUP)){const n=e.get(F.LINK_GROUP);t.has(F.LINK_GROUP)?n.linkGroups.forEach(((e,n)=>{t.get(F.LINK_GROUP).linkGroups.set(n,e)})):t.set(F.LINK_GROUP,e.get(F.LINK_GROUP))}}}const pn=new an,fn=new class extends an{constructor(){super(...arguments),this.blockClassName="statementelement"}handle(e,n){const i=y.generate(D,e[0]),r=Array.from(e[0].childNodes);return D.from({id:t(),type:"paragraph",annotations:Object.assign({customClass:[this.blockClassName]},i),nodes:this.generateChildNodes(r,void 0,n)})}},wn=new class extends v{canHandle(t,e){const n=t[e];return n&&"DIV"===n.tagName&&n.classList.contains("statement")&&n.childNodes.length&&n.querySelector(".statementsyntax")?1:0}handle(){return Xe.from({id:t(),type:"function-block",annotations:{customClass:["statement"]},children:[]})}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}};class gn extends I{constructor(){super(),this.registerBlockBasicStrategies(en.name),this.registerBlockBasicStrategies(Xe.name),this.preventFunctionBlockDefaultInsertNewParagraph(),this.registerNode("logic-control-block",en),this.registerRenderer("logic-control-block",new rn),this.registerNode("function-block",Xe),this.registerRenderer("function-block",new sn),this.registerElementToBlockDTOClassStrategy(pn),this.registerElementToBlockDTOClassStrategy(fn),this.registerElementToBlockDTOClassStrategy(wn)}prepareBeforeLoad(t){this.registerToolbarButtonRenderer("functions",new nn,t)}preventFunctionBlockDefaultInsertNewParagraph(){this.unRegisterStrategy(z.INSERT_NEW_PARAGRAPH,en.name),this.unRegisterStrategy(z.APPEND_CHILDREN,Xe.name),this.unRegisterStrategy(z.INSERT_CHILDREN_AFTER,Xe.name),this.unRegisterStrategy(z.INSERT_CHILDREN_BEFORE,Xe.name),this.unRegisterStrategy(z.PASTE_CONTENT,en.name),I.registerActionHandleStrategy(Xe.name,z.INSERT_NEW_PARAGRAPH,new cn)}}(()=>{const t=new Ye;I.registerActionHandleStrategy(b.name,"INSERT_FUNCTION_BLOCK",t),I.registerActionHandleStrategy(D.name,"INSERT_FUNCTION_BLOCK",t),I.registerActionHandleStrategy(L.name,"INSERT_FUNCTION_BLOCK",t),I.registerActionHandleStrategy(en.name,"INSERT_FUNCTION_BLOCK",t),I.registerActionHandleStrategy(D.name,"PASTE_PLAIN_TEXT",new un),I.registerActionHandlerInterceptor(D.name,z.INSERT_NEW_PARAGRAPH,new ln),I.registerActionHandlerInterceptor(D.name,z.PASTE_CONTENT,new dn)})();class bn extends O{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_BLOCK",this.tableBlock=t}}class mn extends ${constructor(){super(...arguments),this.type=pt.CAPTION}static getDefaultStyles(){return{padding:"8px",border:"1px solid #ddd",borderBottom:"none",position:"relative",textAlign:"center",minHeight:"22px"}}clone(){return new mn}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--extension-table-caption"}renderStyle(t){return(null==t?void 0:t.standalone)?Object.assign(Object.assign({},mn.getDefaultStyles()),{backgroundColor:this.getCaptionBackgroundColor()}):null}toJSON(){return{caption:!0}}getCaptionBackgroundColor(){return fe.isDarkMode()?ft.dark:ft.light}}class vn extends j{constructor(t,e){super(t),this.dtoName=vn.dtoName,this.type="table-caption";const{autoMatchFormat:n}=e||{autoMatchFormat:!0};n&&this.annotationMap.set(pt.CAPTION,new mn)}static from(t,e){const n=new vn(t.id,e),i=t.annotations||{},{caption:r}=i,a=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}(i,["caption"]);return r&&n.annotationMap.set(pt.CAPTION,new mn),super.convertAnnotationsToMap(n.annotationMap,Object.assign({},a)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new vn(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.isNotEmpty()))}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<caption${super.generateAttributeString(t)}>${e}</caption>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}R.register(z.INSERT_CHILDREN_BEFORE,vn.name,new C),R.register(z.PASTE_CONTENT,vn.name,new S),vn.dtoName="RTETableCaptionBlock";class yn extends O{constructor(t){super(),this.type="TOGGLE_TABLE_CAPTION",this.isFlushable=!0,this.shouldEnable=t}}class xn extends wt{canHandle(t){return t[0]===gt.CAPTION}execute(t,e,n){const i="rte-table-caption"===t[1],r=new yn(i),a=n.getCaption();if(i){const t=a&&a.isNotEmpty()?a:this.createCaptionBlock(null==a?void 0:a.id);a&&t===a||n.setCaption(t),r.nextFocusNode=t.getLastNode()}else a&&(n.setCaption(null),r.nextFocusNode=n.getFirstNode());this.syncCursorPosition(n,r.nextFocusNode)}syncCursorPosition(t,e){super.syncCursorPosition(t,e)}createCaptionBlock(e){const n={id:null!=e?e:t(),type:"table-caption",children:[{id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]}]};return vn.from(n)}}class Ln{static generateTablePropertiesForm(t){const e=t.annotationMap.get(pt.TABLE);let n={borderStyle:"none",borderColor:"",borderWidth:"",backgroundColor:"",width:"",height:"",textAlign:"center"};if(e){const t=e.toJSON().table,{style:i="none",color:r="",width:a=""}=t.border||{style:"none",color:"",width:""};n={backgroundColor:t.backgroundColor||"",width:t.width||"",height:t.height||"",textAlign:t.alignment,borderStyle:i,borderColor:r,borderWidth:a}}return n}updateCursorPosition(t,e){t&&e&&t.host.value.apply(new g(e,0))}}class Cn extends q{constructor(t){super(),this.isFlushable=!0;const{textAlign:e,width:n,borderWidth:i,borderColor:r,borderStyle:a,height:s}=t,o=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}(t,["textAlign","width","borderWidth","borderColor","borderStyle","height"]);this.tableProperties=Object.assign(Object.assign({},o),{alignment:e,border:{style:a,color:r,width:i?ge(i):""},width:n?ge(n):"",height:s?ge(s):""})}toAnnotation(){return new bt(this.tableProperties)}}class Sn extends Ln{handle(t,e,n,i){e.apply(new Cn(n)),this.updateCursorPosition(t,i)}}class kn extends Ln{handle(t,e,n,i){t&&t.host&&(t.flushValue(t.host.value),this.updateCursorPosition(t,i))}}class Tn extends Ln{handle(t,e,n){const i=new Cn(n);i.isFlushable=!1,e.apply(i)}}class An extends q{constructor(t,e){super(),this.isFlushable=!0,this.cellAnnotation=t,this.originAnnotation=e}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}updateOriginAnnotation(){Object.keys(this.cellAnnotation).forEach((t=>{this.originAnnotation[t]=this.cellAnnotation[t]}))}}class En extends An{constructor(t,e){super(t,e),this.isFlushable=!0}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}}var In=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n};class On{static getStyleCollectionFromCell(t){return t.reduce(((t,e)=>{const n=e.getAnnotationByType(pt.CELL);if(t[e.id]={},n){const i=n.toJSON().tableCell,{border:r}=i,a=In(i,["border"]),s={};r&&(s.borderStyle=r.style,s.borderColor=r.color,s.borderWidth=r.width),t[e.id]=be(Object.assign(Object.assign({},a),s))}return t}),{})}static convertStyleMapToFormField(t){const e={};for(const n in t){const i=t[n];for(const t in i)e[t]?e[t].push(i[t]):e[t]=[i[t]]}const n=Object.keys(t).length,i={};for(const t in e){const r=e[t],a=new Set(r);r.length===n&&1===a.size&&(i[t]=r[0])}return i}applyProperties(t,e,n){t.tableSelection.getSelectedCells().forEach((t=>{const i=e[t.id];if(i){const e=this.convertToVegaTableCellAnnotation(Object.assign({},i));this.applyAnnotation(t,e,n)}}))}updateCursorPosition(t,e){t&&e&&t.host.value.apply(new g(e,0))}convertToVegaTableCellAnnotation(t){const{borderStyle:e,borderWidth:n,borderColor:i}=t,r=In(t,["borderStyle","borderWidth","borderColor"]),a=be({style:e,width:n?ge(n):"",color:i});return be(Object.assign(Object.assign({},r),{backgroundColor:r.backgroundColor||"",padding:r.padding?ge(r.padding):"",width:r.width?ge(r.width):"",height:r.height?ge(r.height):"",verticalAlign:r.verticalAlign||"",textAlign:r.textAlign||"",border:a}))}applyAnnotation(t,e,n){const i=t.getAnnotationByType(pt.CELL)||new mt({},!1),r=t instanceof vt?new En(e,i):new An(e,i);r.isFlushable=n,t.apply(r)}}class Rn extends On{handle(t,e,n){t&&t.host&&(t.flushValue(t.host.value),this.updateCursorPosition(t,n))}}class Nn extends On{handle(t,e){this.applyProperties(t,e,!1)}}class jn extends On{handle(t,e,n){this.applyProperties(t,e,!0),this.updateCursorPosition(t,n)}}class Dn{constructor(t){this.renderContext=t}getTableExtensionContext(){return this.renderContext?A.getExtensionContext(this.renderContext.host):null}}class _n extends Dn{constructor(t,e){super(e),this.popoverCloseType="none",this.tablePropertiesHandlerMap={save:new kn,cancel:new Sn,change:new Tn},this.cellPropertiesHandlerMap={save:new Rn,cancel:new jn,change:new Nn},this.handleTablePropertiesUpdate=t=>{const e=t.type.replace("vega","").toLowerCase();this.popoverCloseType=e,"change"!==e&&this.hide();const n=this.getTableExtensionContext();n&&this.tablePropertiesHandlerMap[e].handle(n,this.currentTableBlock,t.detail,this.currentFocusNode),"change"===e&&this.popoverRef.show(!0)},this.handleCellPropertiesUpdate=t=>{const e=t.type.replace("vega","").toLowerCase();this.popoverCloseType=e,"change"!==e&&this.hide();const n=this.getTableExtensionContext();n&&this.cellPropertiesHandlerMap[e].handle(n,t.detail,this.currentFocusNode),"change"===e&&this.popoverRef.show(!0)},this.tableColorSchema=t}destroy(){this.selectionAnchorRef&&this.selectionAnchorRef.parentNode&&(ot.removeUniqueObserverFromNode(this.selectionAnchorRef,he),this.selectionAnchorRef.parentNode.removeChild(this.selectionAnchorRef),this.selectionAnchorRef=null)}async show(t){let e=this.getTableRef();const n=this.getTableExtensionContext();let i=[];if(n&&(i=n.tableSelection.getSelectedCells()),t===gt.CELL&&i.length>1){const t=this.getOrCreateSelectionAnchor(i,e);t&&(e=t)}else t===gt.CELL&&1===i.length&&(e=P.getDOMByEntity(i[0]));this.updateContent(t),this.storeCurrentFocusNode(),pe.call(lt.getSubject(this.popoverRef,de),e),await this.popoverRef.show()}async hide(){await this.popoverRef.hide()}reTarget(t,e){this.getTableRef=e,this.currentTableBlock=t}render(){const t=we();if(t){const e=t.createElement("vega-popover");e.trigger="click",e.isScreenPosition=!0,e.className="rte-table-dynamic-popover",ot.addUniqueObserverToNode(e,dt,(()=>{const t=this.getTableExtensionContext();"change"===this.popoverCloseType&&t&&t.flushValue(t.host.value)}));const n=t.createElement("div");n.setAttribute("slot","popover"),n.className="rte-table-dynamic-popover-content";const i=t.createElement("vega-rich-text-table-properties");i.colors=this.tableColorSchema,i.type=gt.TABLE,i.setAttribute("type",gt.TABLE),i.addEventListener("vegaCancel",this.handleTablePropertiesUpdate),i.addEventListener("vegaChange",this.handleTablePropertiesUpdate),i.addEventListener("vegaSave",this.handleTablePropertiesUpdate);const r=t.createElement("vega-rich-text-table-properties");return r.colors=this.tableColorSchema,r.type=gt.CELL,r.setAttribute("type",gt.CELL),r.addEventListener("vegaCancel",this.handleCellPropertiesUpdate),r.addEventListener("vegaChange",this.handleCellPropertiesUpdate),r.addEventListener("vegaSave",this.handleCellPropertiesUpdate),n.appendChild(i),n.appendChild(r),e.appendChild(n),this.popoverRef=e,this.tablePropertiesFormRef=i,this.cellPropertiesFormRef=r,e}}updateContent(t){this.popoverCloseType="none";const e=this.getTableExtensionContext();"TABLE"===t?(this.tablePropertiesFormRef.classList.remove("vega-hidden"),this.cellPropertiesFormRef.classList.add("vega-hidden"),this.tablePropertiesFormRef.defaultValue=Ln.generateTablePropertiesForm(this.currentTableBlock)):"CELL"===t&&(this.cellPropertiesFormRef.classList.remove("vega-hidden"),this.tablePropertiesFormRef.classList.add("vega-hidden"),e&&(this.cellPropertiesFormRef.styleMap=On.getStyleCollectionFromCell(e.tableSelection.getSelectedCells())),this.cellPropertiesFormRef.defaultValue=On.convertStyleMapToFormField(this.cellPropertiesFormRef.styleMap)),e&&e.getSelection().removeAllRanges()}storeCurrentFocusNode(){const t=this.getTableExtensionContext();t&&(this.currentFocusNode=t.getSelectedNodes()[0])}getOrCreateSelectionAnchor(t,e){const n=we();if(n&&e){const i=e.closest(".rich-text-content"),r=i.getBoundingClientRect();let a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;t.map((t=>P.getDOMByEntity(t))).filter(rt).forEach((t=>{const e=t.getBoundingClientRect();a=Math.min(a,e.left-r.left),s=Math.max(s,e.right-r.left),o=Math.min(o,e.top-r.top),l=Math.max(l,e.bottom-r.top)}));const c=s-a,h=l-o;return this.selectionAnchorRef=i.querySelector(".rte-table-selection-popover-anchor"),this.selectionAnchorRef||(this.selectionAnchorRef=n.createElement("div"),this.selectionAnchorRef.className="rte-table-selection-popover-anchor",this.selectionAnchorRef.style.position="absolute",this.selectionAnchorRef.style.pointerEvents="none",i.appendChild(this.selectionAnchorRef),ot.addUniqueObserverToNode(this.selectionAnchorRef,he,(()=>{this.destroy()}))),this.selectionAnchorRef.style.left=`${a}px`,this.selectionAnchorRef.style.top=`${o}px`,this.selectionAnchorRef.style.width=`${c}px`,this.selectionAnchorRef.style.height=`${h}px`,this.selectionAnchorRef}}}class Bn extends Dn{constructor(t){super(t),this.settingHandlers=[new yt,new xn,new xt,new Lt,new Ct],this.handleTableClick=(t,e,n)=>{const i=t.target.closest("table");i===n()&&(t.stopPropagation(),this.reTarget(e,n),this.tableDynamicPopover.hide(),pe.call(lt.getSubject(this.popoverRef,de),i),this.popoverRef.show(!0))},this.syncSelectedCells=()=>{this.tableSettingRef&&(this.tableSettingRef.selectedCells=this.getTableSelectedCells())},this.handleSettingMenuClick=t=>{const e=this.settingHandlers.find((e=>e.canHandle(t.detail)));if(e){const n=this.getTableExtensionContext();n&&e.execute(t.detail,n,this.tableBlock),t.detail[0]===gt.CAPTION&&this.updateTableSettingCaption()}t.detail[0]!==gt.TABLE&&t.detail[0]!==gt.CELL||(this.popoverRef.hide(),this.tableDynamicPopover.show(t.detail[0]))},this.handleTableSettingPopoverShow=()=>{this.syncSelectedCells()},this.tableDynamicPopover=new _n(St.getTableColors(),t)}destroy(){this.tableDynamicPopover.destroy(),this.popoverContainer&&this.popoverContainer.remove()}render(){const t=we();if(t&&this.renderContext){this.popoverContainer=t.createElement("div"),this.renderContext.host.appendChild(this.popoverContainer);const e=this.tableDynamicPopover.render(),n=t.createElement("vega-popover");n.trigger="click",n.isScreenPosition=!0,n.className="rte-table-setting-popover",ot.addUniqueObserverToNode(n,ut,this.handleTableSettingPopoverShow);const i=t.createElement("div");i.setAttribute("slot","popover");const r=t.createElement("vega-rich-text-table-setting");r.addEventListener("vegaClick",this.handleSettingMenuClick),i.appendChild(r),n.appendChild(i),this.popoverContainer.appendChild(n),this.popoverContainer.appendChild(e),this.popoverRef=n,this.tableSettingRef=r}}updateTableSettingCaption(){const t=this.tableBlock.hasCaption();this.tableSettingRef&&this.tableSettingRef.hasCaption!==t&&(this.tableSettingRef.hasCaption=t)}reTarget(t,e){this.tableSettingRef&&(this.tableBlock=t,this.tableSettingRef.target=e(),this.tableSettingRef.selectedCells=this.getTableSelectedCells(),this.tableDynamicPopover.reTarget(t,e))}getTableSelectedCells(){let t=[];const e=this.getTableExtensionContext();if(e&&e.tableSelection){const{tableSelection:n}=e;t=n.getSelectedCells()}return t}}class Mn extends E{doRender(t,e,n){let i;const r=this.renderTable(t,e,(t=>i=t));this.renderTableToolbar(n);const a=e.getAnnotationByType(pt.TABLE),s=n.editable?[t("vega-rich-text-table-selection-widget",{onVegaRemove:t=>{t.stopPropagation(),this.handleTableRemove(e,i)},onClick:t=>{this.tableToolbar&&this.tableToolbar.handleTableClick(t,e,(()=>i))},onMouseLeave:()=>{this.tableToolbar&&this.tableToolbar.syncSelectedCells()}},[t("div",{contentEditable:!0,ref:this.useRef(e)},[r])])]:[r],o={};if(a){const t=a.renderStyle();o.width=t.width,o.margin=t.margin}const l=t("div",{class:"v-rte--extension-table-container",style:Object.assign({},o)},s);return l.childrenContainerGetter=()=>r,l}destroy(){this.destroyTableToolbar()}injectRTEScopeStyles(){return".v-rte--extension-table-container{display:table}table.v-rte--extension-table{border-collapse:collapse}table.v-rte--extension-table th,table.v-rte--extension-table td{border:1px solid #ddd;padding:12px;text-align:left;vertical-align:middle;min-width:55px;box-sizing:border-box;position:relative}table.v-rte--extension-table th{background-color:#f2f2f2}.rte-table-setting-popover,.rte-table-dynamic-popover{display:block}table.v-rte--extension-table .v-rte-table-cell-focused::after,table.v-rte--extension-table .v-rte-table-cell-selected::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;background-color:rgba(158, 207, 250, 0.3)}table.v-rte--extension-table:has(.v-rte-table-cell-selected){caret-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::selection{background-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::-moz-selection{background-color:transparent}.v-rte--extension-table-caption{padding:8px;border:1px solid #ddd;border-bottom:none;background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));position:relative;display:table-caption;caption-side:top;min-height:22px;text-align:center;word-break:break-word;overflow-wrap:break-word}.v-rte--extension-table-caption.showPlaceholder::before{position:absolute;left:0;right:0;content:attr(data-placeholder);font-family:'Inter', sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"}renderTable(t,e,n){var i;return t("table",Object.assign(Object.assign({key:e.id},null===(i=e.getCustomAttributesAnnotation())||void 0===i?void 0:i.render()),{style:e.getStyles(),class:e.getClasses(),ref:t=>{this.useRef(e)(t),n(t)}}))}handleTableRemove(t,e){t.parent.apply(new bn(t)),this.destroySelectionAnchor(e)}destroySelectionAnchor(t){const e=t.closest(".rich-text-content");if(e){const t=e.querySelector(".rte-table-selection-popover-anchor");t&&ce.notify(lt.getSubject(t,he),{host:t})}}renderTableToolbar(t){t.editable?this.tableToolbar||(this.tableToolbar=new Bn(t),this.tableToolbar.render()):this.destroyTableToolbar()}destroyTableToolbar(){var t;null===(t=this.tableToolbar)||void 0===t||t.destroy(),this.tableToolbar=null}}class Vn extends E{doRender(t,e){return t("thead",{key:e.id,ref:this.useRef(e)})}}class Hn extends E{doRender(t,e){return t("tr",{key:e.id,ref:this.useRef(e)})}}class Pn extends E{doRender(t,e,n){return this.renderByCellType(t,e,n,"td")}renderByCellType(t,e,n,i){var r;return t(i,Object.assign(Object.assign(Object.assign({key:`${e.id}-${i}`,ref:this.useRef(e)},null===(r=e.getCustomAttributesAnnotation())||void 0===r?void 0:r.render()),{style:e.getStyles(n),class:e.getClasses()}),n.editable?this.onSelectionListeners(e,n):void 0))}onSelectionListeners(t,e){return{onMouseDown:t=>{const n=r(t.target,"table"),i=r(t.currentTarget,"table")===n,a=t.target.closest("td, th");if(i&&a){const t=this.getExtensionContext(e.host);t&&t.tableSelection.focusCell(a)}},onMouseMove:n=>{n.stopPropagation(),n.preventDefault();const i=this.getExtensionContext(e.host);i&&i.tableSelection.dragOver(t)},onMouseUp:()=>{const t=this.getExtensionContext(e.host);t&&t.tableSelection.endDrag()}}}}class Kn extends E{doRender(t,e){return t("tbody",{key:e.id,ref:this.useRef(e)})}}class Fn extends Pn{doRender(t,e,n){return super.renderByCellType(t,e,n,"th")}}class zn extends O{constructor(t,e){super(),this.type="INSERT_TABLE_BLOCK",this.rowCount=t,this.columnCount=e}}class $n extends Dn{constructor(){super(...arguments),this.hoveredRows=1,this.hoveredCols=1}render(t,e){return t("vega-popover",{trigger:"click",alignment:"start",placement:"bottom",showArrow:!1,ref:t=>{t&&(this.tablePickerPopoverRef=t,ot.addUniqueObserverToNode(t,ut,(()=>{this.resetPicker()})))}},[t("div",{slot:"popover"},[this.generatePickerStyles(t),this.generateTableSizeGrid(t)]),t("div",{slot:"popover-content"},e)])}generateTableSizeGrid(t){const e=[];for(let n=1;n<=10;n++)for(let i=1;i<=10;i++)e.push(t("button",{class:"rte-table-picker__cell","data-row":n,"data-col":i,onMouseenter:this.handlePickerCellHover.bind(this,n,i),onClick:this.handlePickerClick.bind(this,n,i)},[]));return t("div",{class:"rte-table-picker"},[t("div",{class:"rte-table-picker__grid",ref:t=>{t&&(this.tablePickerGridRef=t)},style:{gridTemplateColumns:"repeat(10, 16px)",gridTemplateRows:"repeat(10, 16px)"}},e),t("div",{class:"rte-table-picker__hint"},t("vega-hint",{ref:t=>{t&&(this.selectedHintRef=t)}},[`${this.hoveredRows} × ${this.hoveredCols}`]))])}generatePickerStyles(t){return t("style",{},["\n.rte-table-picker__grid { display: grid; gap: 2px; }\n.rte-table-picker__cell {\n box-sizing: border-box;\n border: 1px solid #ccc;\n background-color: transparent;\n cursor: pointer;\n}\n.rte-table-picker__cell:hover {\n background-color: #cae1fc;\n}\n.rte-table-picker__cell.active {\n background-color: #cae1fc;\n}\n.rte-table-picker__hint {\n text-align: center;\n}\n "])}createTable(t,e){const n=this.getTableExtensionContext();if(n){const{host:i,getSelectedNodes:r}=n,a=r()[0],s=new zn(t,e);a?a.parent&&a.parent.apply(s):i.value.apply(s),s.nextFocusNode&&i.value.apply(new g(s.nextFocusNode,1))}}handlePickerClick(t,e){this.createTable(t,e),this.tablePickerPopoverRef.hide()}handlePickerCellHover(t,e){this.hoveredRows=t,this.hoveredCols=e,Array.from(this.tablePickerGridRef.children).forEach((t=>{const e=Number(t.dataset.row),n=Number(t.dataset.col);e<=this.hoveredRows&&n<=this.hoveredCols?t.classList.add("active"):t.classList.remove("active")})),this.selectedHintRef.textContent=`${this.hoveredRows} × ${this.hoveredCols}`}resetPicker(){this.handlePickerCellHover(1,1)}}class qn extends $e{render(t,e){return new $n(e).render(t,super.renderButton(t,e,{showArrowIcon:!0,icon:"rte-table",tooltip:{text:"Insert table"}}))}isDisabled(t){let e=super.isDisabled(t);const n=this.getExtensionContext(t.host);if(n){const{host:t,getSelectedNodes:i}=n,r=i()[0];let a=!0;r&&(a=R.canHandle("INSERT_TABLE_BLOCK",r.parent)&&R.canHandle(z.INSERT_CHILDREN_AFTER,r.parent.parent)),e=t.disabled||!a}return e}handleButtonClick(){}handleDropdownClick(){}}at.register({"rte-table":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 264V160H232V264H48zm0 48H232V432H64c-8.8 0-16-7.2-16-16V312zM280 432V312H464V416c0 8.8-7.2 16-16 16H280zM464 264H280V160H464V264zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"/></svg>'}});class Gn extends B{handleAction(t,e){const n=this.createTableBlock(t.rowCount,t.columnCount),i=super.createNewParagraph(""),r=this.getReferenceBlock(e);r?r.parent.apply(new M(r,n,i)):e.apply(new V([n,i])),t.nextFocusNode=n.getFirstNode()}createTableBlock(e,n){const i=Math.max(e,1),r=Math.max(n,1);return kt.from({id:t(),type:"table-block",children:[Tt(i,r)]})}getReferenceBlock(t){if(!(t instanceof b))return t}}class Wn extends on{canIntercept(t,e){const n=e.parent;return n instanceof At&&1===n.children.length&&0===t.startOffset}intercept(){}}class Un extends B{handleAction(t){const e=t.tableBlock,n=e.parent,i=super.getRootContent(e),r=super.createNewParagraph("");n.apply(new M(e,r)),n.apply(new G(e)),i&&i.apply(new g(r.getLastNode()))}}class Zn extends on{canIntercept(t,e){return t.entityToBeRemoved&&1===e.children.length}intercept(e,n,i){if(!(n.entityToBeRemoved instanceof D)){const e=D.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]});return i.children=[],void i.apply(new V([e]))}n.entityToBeRemoved.apply(new V([new N(t(),"",n.entityToBeRemoved)]))}}class Jn extends E{doRender(t,e){return t("caption",{key:e.id,ref:this.useRef(e),style:e.getStyles(),class:[e.getClasses(),e.isNotEmpty()?null:"showPlaceholder"].filter(rt).join(" "),"data-placeholder":"Enter table caption"})}}class Qn extends B{getRowsMaxCellCount(t){let e=0;for(const n of t){let t=0;for(const e of n.children)t+=e.colSpan;e=Math.max(e,t)}return e}getRowCellStartCols(t){const e=this.getRowsMaxCellCount(t),n=new Array(t.length),i=new Array(e).fill(0);for(let e=0;e<t.length;e++){const r=t[e].children,a=new Array(r.length);let s=0;for(let t=0;t<r.length;t++){const e=r[t];for(;s<i.length&&i[s]>0;)s++;a[t]=s;const n=Math.max(e.colSpan,Qn.DEFAULT_CELLSPAN);if(e.rowSpan>Qn.DEFAULT_CELLSPAN)for(let t=0;t<n;t++){const n=s+t;n<i.length&&(i[n]=Math.max(i[n],e.rowSpan))}s+=n}n[e]=a;for(let t=0;t<i.length;t++)i[t]>0&&i[t]--}return n}updateCellSpan(t,e,n){const i=t.getCustomAttributesAnnotation();if(n<=Qn.DEFAULT_CELLSPAN){if(i){const n=i.render();delete n[e],t.annotationMap.set(W.CUSTOM_ATTRIBUTE,new U(n))}}else{const r=i?i.render():{};r[e]=n.toString(),t.annotationMap.set(W.CUSTOM_ATTRIBUTE,new U(r))}}insertMovedCells(t,e,n){t.forEach(((t,i)=>{const r=e[i];if(r){const e=n[i]||[];t.sort(((t,e)=>t.logicalStartCol===e.logicalStartCol?e.cellIndex-t.cellIndex:e.logicalStartCol-t.logicalStartCol)),t.forEach((t=>{const{cell:n,logicalStartCol:i}=t;if(0===r.children.length)return r.apply(new V([n])),void(e[0]=i);const a=e.findIndex((t=>t>=i));-1===a?(r.apply(new M(r.children[r.children.length-1],n)),e.push(i)):0===a?(r.apply(new K(r.children[0],n)),e.unshift(i)):(r.apply(new K(r.children[a],n)),e.splice(a,0,i))}))}}))}splitRowsBySection(t){const e=[],n=[];return t.forEach((t=>{t.parent instanceof Et?e.push(t):n.push(t)})),[e,n]}buildSelectedIndices(t,e){return new Set(t.map((t=>e.indexOf(t))).filter((t=>t>=0)))}intersectsRemovalRange(t,e,n,i){return t<=i&&e>=n}countRemovedRows(t,e,n){let i=0;for(let r=t;r<=e;r++)n.has(r)&&i++;return i}getHeadCellLength(t){let e=0;for(let n=0;n<t.children.length;n++){const i=t.children[n];if(!(i instanceof vt))break;e+=i.colSpan}return e}getTheStartSpanCell(t,e,n,i){const r={rowIndex:n};for(let a=n;a>=0;a--){const n=e[a];if(n.includes(i)){r.cell=t[a].children[n.indexOf(i)],r.rowIndex=a;break}}return r}getDefaultCellBlockTemplate(e,n,i=1){const r=be({colspan:n>1?n.toString():null,rowspan:i>1?i.toString():null}),a=t(),s={id:a,type:e,children:[{id:`${a}-p`,type:"paragraph",nodes:[{id:`${a}-p-t`,type:"text",text:""}]}]};return Object.keys(r).length>0&&(s.annotations={customAttribute:r}),s}getSortedValuesByNumericKey(t){return Array.from(t.entries()).sort((([t],[e])=>t-e)).map((([,t])=>t))}}Qn.DEFAULT_CELLSPAN=1;class Xn extends Qn{handleAction(t,e){const{rowsToBeRemoved:n}=t,i=this.getFutureFocusRow(n[0],n[n.length-1],e),r=this.splitRowsBySection(n);if(this.removeRows(r[0]),this.removeRows(r[1]),i){const t=this.getRootContent(e);if(t){const e=i.getLastNode();t.apply(new g(e,e.getRangeEndOffset()))}}}removeRows(t){if(0===t.length)return;const e=t[0].parent,n=e.children,i=this.buildSelectedIndices(t,n);if(i.size>0){if(n.length===t.length)return void e.parent.apply(new G(e));const r=Math.min(...i),a=Math.max(...i),s=this.getRowCellStartCols(n),o=this.collectCellsToMove(n,s,i,r,a);this.insertMovedCells(o,n,s),t.forEach((t=>{t.parent.apply(new G(t))}))}}collectCellsToMove(t,e,n,i,r){const a=new Map,s=t.length;for(let o=0;o<s;o++){const l=t[o],c=l.children.length;for(let t=0;t<c;t++){const c=l.children[t],h=c.rowSpan;if(h<=Qn.DEFAULT_CELLSPAN)continue;const d=o+h-1;if(!this.intersectsRemovalRange(o,d,i,r))continue;const u=h-this.countRemovedRows(o,d,n);if(o<i&&d>=i)this.updateCellSpan(c,"rowspan",u);else if(o>=i&&d>r){const i=r+1;if(i<s&&!n.has(i)){const n=e[o][t];a.has(i)||a.set(i,[]),a.get(i).push({cell:this.cloneCellWithRowSpan(c,u),newRowSpan:u,cellIndex:t,logicalStartCol:n})}}}}return a}cloneCellWithRowSpan(t,e){const n=t.clone(t.parent);return this.updateCellSpan(n,"rowspan",e),n}getFutureFocusRow(t,e,n){const i=n.children.filter((t=>t instanceof Et||t instanceof It)).flatMap((t=>t.children)),r=i.indexOf(t),a=i.indexOf(e);return i[r-1]?i[r-1]:i[a+1]?i[a+1]:void 0}}class Yn{constructor(){this.dragging=!1,this.anchorCell=null,this.selectedCells=new Set,this.syncRTESelectionWithDebounce=me(this.syncRTESelection,100,this),this.handleSelectionChangeWithDebounce=me(this.handleSelectionChange,10,this),this.filterSelectedCell=(t,e)=>{const n=new Set;if(t.intersectsNode(e)){if(e.nodeType===Node.TEXT_NODE){const t=P.getEntityByDOM(e.parentElement);if(t){const e=Ot(t.parent,At);if(e)return n.add(e),Array.from(n)}}e.childNodes.forEach((e=>this.filterSelectedCell(t,e).forEach((t=>{n.add(t)}))))}return Array.from(n)},this.updateSelectedStyles=(t,e)=>{const n=1===e?"v-rte-table-cell-focused":"v-rte-table-cell-selected",i=P.getDOMByEntity(t);i&&i.classList.add(n)},this.handleDocMouseUp=()=>{this.endDrag();const t=we();t&&t.removeEventListener("mouseup",this.handleDocMouseUp)},this.handleContentClick=()=>{this.clearSelection();const t=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");t&&t.removeEventListener("mousedown",this.handleContentClick,!0)}}static computeRectRange(t,e){const n=t.parent.parent.parent;if(n!==e.parent.parent.parent)return[];const i=[];n.children.forEach((t=>{t.children.forEach((t=>i.push(t)))}));const{grid:r,cellMeta:a}=Yn.buildCellGrid(i),s=a.get(t),o=a.get(e);if(!s||!o)return[];const l=s.row+s.rowSpan-1,c=s.col,h=s.col+s.colSpan-1,d=o.row+o.rowSpan-1,u=o.col,p=o.col+o.colSpan-1,f=Math.min(s.row,o.row),w=Math.max(l,d),g=Math.min(c,u),b=Math.max(h,p),m=new Set;for(let t=f;t<=w;t++){const e=r[t];for(let t=g;t<=b;t++){const n=e[t];n&&m.add(n)}}return Array.from(m)}static getCellSpan(t){let e=1,n=1;const i=t.getAnnotationByType(W.CUSTOM_ATTRIBUTE);if(i&&i.customAttribute){const t=i.customAttribute;t.rowSpan&&(e=parseInt(t.rowSpan,10)),t.colSpan&&(n=parseInt(t.colSpan,10))}if(1===e&&1===n){const i=P.getDOMByEntity(t);if(i){const t=i.getAttribute("rowSpan"),r=i.getAttribute("colSpan");t&&(e=parseInt(t,10)),r&&(n=parseInt(r,10))}}return{rowSpan:Number.isFinite(e)&&e>0?e:1,colSpan:Number.isFinite(n)&&n>0?n:1}}static buildCellGrid(t){const e=[],n=new Map;for(let i=0;i<t.length;i++){const r=t[i];e[i]||(e[i]=[]);let a=0;for(let t=0;t<r.children.length;t++){const s=r.children[t];for(;e[i][a];)a+=1;const{rowSpan:o,colSpan:l}=Yn.getCellSpan(s);n.set(s,{row:i,col:a,rowSpan:o,colSpan:l});for(let t=0;t<o;t++){const n=i+t;e[n]||(e[n]=[]);for(let t=0;t<l;t++)e[n][a+t]=s}a+=l}}return{grid:e,cellMeta:n}}destroy(){this.removeSelectionChangeListener()}init(t){this.context=t,this.addSelectionChangeListener()}setSelectedCells(t){const e=Array.from(this.selectedCells)[0]||t[0];this.updateSelectedCells(t),this.emitCellSelectionChange(e,t)}getSelectedCells(){return Array.from(this.selectedCells)}focusCell(t){const e=P.getEntityByDOM(t);e&&(this.anchorCell=e,this.setSelectedCells([e]),this.addListeners())}dragOver(t){if(!this.anchorCell)return;const e=Yn.computeRectRange(this.anchorCell,t);e.length>1&&this.startDrag(),this.dragging&&(this.preventTextSelection(e),this.updateSelectedCells(e,{debounceSync:!0}))}endDrag(){this.dragging=!1,this.anchorCell=null}emitCellSelectionChange(t,e){const n=Ot(t,kt);if(n){const t=P.getDOMByEntity(n);t&&ce.notify(lt.getSubject(t,ue),{host:t,detail:e})}}clearSelection(){this.selectedCells.forEach((t=>{const e=P.getDOMByEntity(t);e&&e.classList.remove("v-rte-table-cell-selected","v-rte-table-cell-focused")})),this.selectedCells.clear()}addSelectionChangeListener(){const t=we();t&&t.addEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}removeSelectionChangeListener(){const t=we();t&&t.removeEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}handleSelectionChange(){if(this.dragging)return void this.syncRTESelectionWithDebounce();const t=this.context.getSelection();if(t.rangeCount>0){const e=t.getRangeAt(0),n=e.commonAncestorContainer;if(r(n,"table")){const t=this.filterSelectedCell(e,n);this.setSelectedCells(t)}}}startDrag(){this.dragging=!0}updateSelectedCells(t,{debounceSync:e}={}){this.clearSelection(),t.forEach((e=>{this.selectedCells.add(e),this.updateSelectedStyles(e,t.length)})),e?this.syncRTESelectionWithDebounce():this.syncRTESelection()}syncRTESelection(){const t=Array.from(this.selectedCells),e=t.flatMap((t=>t.children.flatMap((t=>t.children.flatMap((t=>{if(t instanceof H)return t})))))).filter(rt);t.length>1&&this.context.setSelectedNodes(e,{startNode:e[0],endNode:e[e.length-1],startOffset:0,endOffset:e[e.length-1].getRangeEndOffset()})}preventTextSelection(t){const e=this.context.getSelection();if(e.removeAllRanges(),t.length>0){const n=P.getDOMByEntity(t[0]);if(n){const t=new Range;t.setStart(n,0),t.setEnd(n,0),e.addRange(t)}}}addListeners(){const t=we();t&&t.addEventListener("mouseup",this.handleDocMouseUp);const e=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");e&&e.addEventListener("mousedown",this.handleContentClick,!0)}}class ti extends Qn{handleAction(t,e){const{selectedRows:n}=t,[i,r]=this.splitRowsBySection(n);r.length>0?this.convertToHeaderRows(r,e):this.revertToBodyRows(i,e);const a=this.getRootContent(e);if(a){const t=n[0].getFirstNode();t&&a.apply(new g(t,0))}}convertToHeaderRows(e,n){let i=n.children.find((t=>t instanceof Et));const r=e[0].parent;i||(i=Et.from({id:t(),type:"table-head",children:[]}),n.apply(new K(r,i)));const a=r.children.indexOf(e[e.length-1]),s=r.children.slice(0,a+1),o=this.buildSelectedIndices(s,r.children),l=Math.min(...o),c=Math.max(...o);if(o.size>0){if(o.size<r.children.length){const t=this.getRowCellStartCols(r.children),e=this.collectCellsToMove(r.children,t,o,l,c);this.insertMovedCells(e,r.children,t)}this.convertBodyRowsToHeaderRows(r,i,s)}}convertBodyRowsToHeaderRows(t,e,n){for(let e=0;e<n.length;e++){const i=n[e];i.children=i.children.map((t=>this.convertTdToTh(t))),t.apply(new G(i))}e.apply(new V(n))}revertToBodyRows(e,n){let i=n.children.find((t=>t instanceof It));const r=e[0].parent;i||(i=It.from({id:t(),type:"table-body",children:[]}),n.apply(new M(r,i)));const a=r.children.indexOf(e[0]),s=r.children.slice(a),o=this.buildSelectedIndices(s,r.children);if(o.size>0){const t=this.getRowCellStartCols(r.children),e=this.collectCellsToMove(r.children,t,o,Math.min(...o),Math.max(...o));this.insertMovedCells(e,r.children,t),this.convertHeadRowsToBodyRows(r,i,s)}}convertHeadRowsToBodyRows(t,e,n){const i=e.children[0],r=this.getRowCellStartCols(n);for(let a=0;a<n.length;a++){const s=n[a];t.apply(new G(s));const o=i?this.getHeadCellLength(i):0;s.children=this.convertThToTd(s,r[a],o),i&&e.apply(new K(i,s))}i||e.apply(new V(n))}collectCellsToMove(t,e,n,i,r){const a=new Map,s=t.length;for(let o=0;o<s;o++){const l=t[o],c=l.children.length;for(let t=0;t<c;t++){const c=l.children[t],h=c.rowSpan;if(h<=Qn.DEFAULT_CELLSPAN)continue;const d=o+h-1;if(!this.intersectsRemovalRange(o,d,i,r))continue;const u=this.countRemovedRows(o,d,n),p=h-u;if(o<i&&d>=i){this.updateCellSpan(c,"rowspan",p);const r=i;if(r<s&&n.has(r)){const n=e[o][t];a.has(r)||a.set(r,[]),a.get(r).push({cell:this.cloneCellWithRowSpan(c,u),newRowSpan:u,cellIndex:t,logicalStartCol:n})}}else if(o>=i&&d>r){this.updateCellSpan(c,"rowspan",u);const i=r+1;if(i<s&&!n.has(i)){const n=e[o][t];a.has(i)||a.set(i,[]),a.get(i).push({cell:this.cloneCellWithRowSpan(c,p),newRowSpan:p,cellIndex:t,logicalStartCol:n})}}}}return a}convertTdToTh(t){if(t instanceof vt)return t;const e=vt.from(t.toJSON());return e.parent=t.parent,e}convertThToTd(t,e,n){return t.children.map(((i,r)=>{let a=i;const s=e[r]<n,o=i.toJSON();return a=s?i:At.from(this.deleteHeadCellDefaultBackground(o)),a.parent=t,a}))}cloneCellWithRowSpan(e,n){const i=e.clone(e.parent);i.id=t(),i.children=[];const r=this.createNewParagraph("");return r&&i.apply(new V([r])),this.updateCellSpan(i,"rowspan",n),i}deleteHeadCellDefaultBackground(t){var e;if(t&&t.annotations&&t.annotations.customStyle){delete t.annotations.tableCell;const n=t.annotations.customStyle.backgroundColor,i=Rt.getDefaultBackgroundColor();!n||n!==i&&(null===(e=a(n))||void 0===e?void 0:e.toUpperCase())!==i||delete t.annotations.customStyle.backgroundColor}return t}}class ei extends Nt{handleAction(t,e){const{insertDirection:n,tableCellInsertRange:i}=t,r=new Set(i.map((t=>t.id))),a=jt(e),s=Dt(a),[o,l]=this.getBoundaryCellColumnRange(i,a,s),c=n===Vt.LEFT?o:l+1,h=this.hasSelectedCellInsideTargetColumn(a,s,c,r),d=new Set;a.forEach(((t,i)=>{if(d.has(i))return;const o=this.findExpandableCell(t,i,c,s,n,r,h);if(o){const t=o.rowSpan;if(_t(o,o.colSpan+1,o.rowSpan,e,!0),t>1)for(let e=1;e<t;e++)d.add(i+e);return}const l=this.findInsertPosition(t,i,c,s,a);if(l){const e=this.generateTableCell(l.templateCell);t.apply(l.before?new K(l.anchorCell,e):new M(l.anchorCell,e))}}))}findExpandableCell(t,e,n,i,r,a,s){const o=i[e],l=t.children.reduce(((t,e)=>t+(a.has(e.id)?1:0)),0);for(const c of t.children){const t=o.indexOf(c.id),h=t+c.colSpan,d=n===h,u=e+c.rowSpan>=i.length,p=a.has(c.id),f=n>t&&n<h;if(r===Vt.LEFT?f:f&&(!p||!u)||d&&c.colSpan>1&&p&&!u&&1===l&&!s)return c}return null}hasSelectedCellInsideTargetColumn(t,e,n,i){for(let r=0;r<t.length;r++){const a=t[r],s=e[r];for(const t of a.children){if(!i.has(t.id))continue;const e=s.indexOf(t.id),r=e+t.colSpan;if(n>e&&n<r)return!0}}return!1}findInsertPosition(t,e,n,i,r){const a=i[e];let s=t.children[0];if(n>=0&&n<a.length){const t=Bt(r,a[n]);t&&(s=t)}let o=0;for(let e=0;e<t.children.length;e++){const i=t.children[e];for(;o<a.length&&a[o]!==i.id;)o++;if(o>=n)return{anchorCell:i,templateCell:s,before:!0};const r=o+i.colSpan;if(r>n||e===t.children.length-1)return{anchorCell:i,templateCell:s,before:!1};o=r}return null}generateTableCell(t){return t instanceof vt?vt.from(Mt(t.type)):At.from(Mt(t.type))}}class ni extends Nt{handleAction(t,e){const n=jt(e),i=Dt(n),[r,a]=this.getBoundaryCellColumnRange(t.tableCellDeleteRange,n,i),s=Math.max(n.indexOf(t.tableCellDeleteRange[t.tableCellDeleteRange.length-1].parent),0),{coveredCellIds:o,coveredCells:l,adjustmentCellInfo:c}=this.getDeleteCellsInfo(n,r,a,i),h=this.findNextFocusableCell(n,i,r,a,o,s);this.deleteCells(l,c,e);const d=this.getRootContent(e),u=Kt(h);d&&u&&d.apply(new g(u))}getDeleteCellsInfo(t,e,n,i){const r=[],a=new Set,s=[],o=Ht(i);return t.forEach((t=>{t.children.forEach((t=>{const i=o.get(t.id);if(void 0===i)return;const{colSpan:l,rowSpan:c}=Ft(t),h=this.getColumnOverlapCount(i,l,e,n);if(h<=0)return;if(h===l)return r.push(t),void a.add(t.id);const d=Math.max(1,l-h);s.push({cell:t,nextColSpan:d,rowSpan:c})}))})),{coveredCells:r,coveredCellIds:a,adjustmentCellInfo:s}}findNextFocusableCell(t,e,n,i,r,a){for(let s=0;s<t.length;s++){const o=this.findFocusableCellIdInGridRow(e[(a+s)%t.length],n,i,r);if(!o)continue;const l=Bt(t,o);if(l)return l}return null}findFocusableCellIdInGridRow(t,e,n,i){for(let e=n+1;e<t.length;e++){const n=t[e];if(n&&!i.has(n))return n}for(let n=e-1;n>=0;n--){const e=t[n];if(e&&!i.has(e))return e}return null}deleteCells(t,e,n){t.forEach((t=>{t.parent.apply(new G(t))}));const i=new Set;e.forEach((({cell:t,nextColSpan:e,rowSpan:r})=>{i.add(t.id),_t(t,e,r,n)})),this.normalizeRemainingCellSpans(n,i)}normalizeRemainingCellSpans(t,e){jt(t).forEach((n=>{n.children.forEach((n=>{const{colSpan:i,rowSpan:r}=Ft(n);if(e.has(n.id)){const e=Pt(t);if(!(r>1&&i===e))return}_t(n,i,r,t)}))}))}getColumnOverlapCount(t,e,n,i){const r=t+e-1,a=Math.max(t,n),s=Math.min(r,i);return a<=s?s-a+1:0}}class ii extends O{constructor(t){super(),this.isFlushable=!0,this.type="CREATE_SEGMENT_TABLE_CELL",this.payload=t}}class ri extends B{handleAction(t,e){const{table:n,sourceCell:i,colSpan:r,cellType:a,keepSourceContent:s}=t.payload,o=s?this.convertCellType(i,a):zt(a);_t(o,r,i.rowSpan,n),e.apply(new K(i,o))}convertCellType(t,e){return"table-head-cell"===e?vt.from(t.toJSON()):At.from(t.toJSON())}}class ai extends B{handleAction(t,e){const{cell:n,targetCellType:i}=t.payload,r="table-head-cell"===i?vt.from(n.toJSON()):At.from(n.toJSON());e.apply(new K(n,r)),e.apply(new G(n))}}class si extends B{handleAction(t,e){const{table:n,cell:i,col:r,cellStartCol:a,endCol:s,targetCellType:o}=t.payload,l=a+i.colSpan-1,c=r>a?r-a:0,h=Math.min(s,l),d=h-r+1,u=l-h;c>0&&e.apply(new ii({table:n,sourceCell:i,colSpan:c,cellType:i.type,keepSourceContent:!0})),e.apply(new ii({table:n,sourceCell:i,colSpan:d,cellType:o,keepSourceContent:0===c})),u>0&&e.apply(new ii({table:n,sourceCell:i,colSpan:u,cellType:i.type,keepSourceContent:0===c&&d===i.colSpan})),e.apply(new G(i))}}class oi extends Nt{handleAction(t,e){const n=jt(e),i=Dt(n),r=Ht(i),[a,s]=this.getBoundaryCellColumnRange(t.tableCellSelectRange,n,i),o=[],l=new Set;n.forEach((t=>{t.children.forEach((t=>{const e=r.get(t.id);void 0!==e&&e>=a&&e<=s&&!l.has(t.id)&&(l.add(t.id),o.push(t))}))})),t.selectCellCallback(o)}}class li extends on{canIntercept(t){return t.childrenToBeInserted.some((t=>!(t instanceof At)))}intercept(){}}class ci extends B{handleAction(t,e){const{targetCell:n,mergeCells:i,colSpan:r,rowSpan:a,direction:s}=t;this.mergeContentToTargetCell(n,i),_t(n,r,a,e),this.deleteOtherSelectedCells(i,n),s!==$t.MERGE_CELL_LEFT&&s!==$t.MERGE_CELL_RIGHT&&a>1&&this.clearRowSpanIfUniformAcrossRow(n,e,a);const o=this.getRootContent(e),l=Kt(n);o&&l&&o.apply(new g(l))}mergeContentToTargetCell(t,e){const n=e.flatMap((t=>t.children)),i=n.filter((t=>t.isNotEmpty()));t.children=(i.length>0?i:[n[0]]).map((e=>e.clone(t)))}deleteOtherSelectedCells(t,e){t.forEach((t=>{t!==e&&t.parent.apply(new G(t))}))}clearRowSpanIfUniformAcrossRow(t,e,n){const i=t.parent.parent.children,r=Dt(i),a=[];for(let e=0;e<r.length;e++)r[e].includes(t.id)&&a.push(e);if(a.length>1){const t=a[0],s=t+n-1,o=new Set;let l=Number.POSITIVE_INFINITY;for(let e=0;e<r[0].length;e++){let n=r[t][e],i=1,a=!1;for(let c=t+1;c<=s;c++)r[c][e]!==n?(i>1&&(a=!0,l=Math.min(l,i),o.add(n)),i=1,n=r[c][e]):i++;if(i<2&&!a){o.clear();break}i>1&&(l=Math.min(l,i),o.add(n))}o.size>0&&i.forEach((t=>{t.children.forEach((t=>{if(o.has(t.id)){const{rowSpan:n,colSpan:i}=Ft(t);_t(t,i,n-l+1,e)}}))}))}}}class hi extends v{canHandle(t,e){const n=t[e];return n&&"TABLE"===n.tagName?1:0}handle(e,n){return kt.from({id:t(),type:"table-block",annotations:y.generate(kt,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class di extends m{canHandle(t,e){const n=t[e];return n&&"THEAD"===n.tagName?1:0}handle(e,n){return Et.from({id:t(),type:"table-head",annotations:y.generate(Et,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class ui extends m{canHandle(t,e){const n=t[e];return n&&"TBODY"===n.tagName?1:0}handle(e,n){return It.from({id:t(),type:"table-body",annotations:y.generate(It,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class pi extends m{canHandle(t,e){const n=t[e];return n&&"TR"===n.tagName?1:0}handle(e,n){return qt.from({id:t(),type:"table-row",annotations:y.generate(qt,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class fi extends m{canHandle(t,e){const n=t[e];return!n||"TD"!==n.tagName&&"TH"!==n.tagName?0:1}handle(e,n){const i=e[0],r=[{id:t(),type:"paragraph",annotations:{internalWrapper:n&&!n.autoMatchFormat},nodes:[{id:t(),type:"text",annotations:{plainText:n&&!n.autoMatchFormat},text:""}]}];return"TH"===i.tagName?vt.from({id:t(),type:"table-head-cell",annotations:this.getTableHeadCellAnnotations(i,n),children:r},n):At.from({id:t(),type:"table-cell",annotations:y.generate(At,i,n),children:r},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}getTableHeadCellAnnotations(t,e){const n=y.generate(vt,t,e);return n&&n.tableCell&&St.getColorKey(n.tableCell.backgroundColor,!0)===ft.key&&(delete n.tableCell.backgroundColor,n.customStyle&&delete n.customStyle.backgroundColor),n}}class wi extends v{canHandle(t,e){const n=t[e];return n&&n.parentElement&&"TABLE"===n.parentElement.tagName&&"CAPTION"===n.tagName?1:0}handle(e,n){const i=this.getTableCaptionAnnotations(e[0],n);return vn.from({id:t(),type:"table-caption",annotations:Object.assign(Object.assign({},i),{caption:!0}),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}getTableCaptionAnnotations(t,e){const n=y.generate(vn,t,e);return n&&n.customStyle&&n.customStyle.backgroundColor&&St.getColorKey(n.customStyle.backgroundColor,!0)===ft.key&&delete n.customStyle.backgroundColor,n}}class gi extends k{getBackgroundColor(t){return t.style.backgroundColor?St.getColorKey(t.style.backgroundColor)||t.style.backgroundColor:null}getBorder(t){const e=t.style,n=e.borderStyle,i=e.borderWidth,r=e.borderColor;if(r||n||i){const t="initial"===r?"":r;return{style:"initial"===n?"":n,width:"initial"===i?"":i,color:St.getColorKey(t)||t}}return null}getWidth(t){if(t.style.width)return t.style.width;const e=t.getAttribute("width");return e?/^\d+$/.test(e)?`${e}px`:e:null}getHeight(t){if(t.style.height)return t.style.height;const e=t.getAttribute("height");return e?/^\d+$/.test(e)?`${e}px`:e:null}}class bi extends gi{canHandle(t){return"RTETableBlock"===t.dtoName}handle(t){const e=be({backgroundColor:this.getBackgroundColor(t),border:this.getBorder(t),width:this.getWidth(t),height:this.getHeight(t),alignment:this.getAlignment(t)});return Object.keys(e).length>0?{table:e}:{}}getAlignment(t){const e=t.classList;if(e.contains("v-rte--extension-table-align-left"))return"left";if(e.contains("v-rte--extension-table-align-center"))return"center";if(e.contains("v-rte--extension-table-align-right"))return"right";const n=t.style,i=n.marginLeft,r=n.marginRight;if("auto"===i&&"auto"===r)return"center";if("0"===i||"0px"===i)return"left";if("0"===r||"0px"===r)return"right";const a=t.getAttribute("align");return a&&["left","center","right"].includes(a)?a:null}}class mi extends gi{canHandle(t){return"RTETableCellBlock"===t.dtoName}handle(t){const e=be({backgroundColor:this.getBackgroundColor(t),padding:this.getPadding(t),border:this.getBorder(t),width:this.getWidth(t),height:this.getHeight(t),textAlign:this.getTextAlign(t),verticalAlign:this.getVerticalAlign(t),minWidth:this.getMinWidth(t),boxSizing:this.getBoxSizing(t)});return Object.keys(e).length>0?{tableCell:e}:{}}getMinWidth(t){return t.style.minWidth?t.style.minWidth:null}getBoxSizing(t){return t.style.boxSizing?t.style.boxSizing:null}getPadding(t){return t.style.padding?t.style.padding:null}getTextAlign(t){if(t.style.textAlign){const e=t.style.textAlign;if(["left","center","right","justify"].includes(e))return e}const e=t.getAttribute("align");return e&&["left","center","right","justify"].includes(e)?e:null}getVerticalAlign(t){if(t.style.verticalAlign){const e=t.style.verticalAlign;if(["top","middle","bottom"].includes(e))return e}return null}}class vi extends mi{canHandle(t){return"RTETableHeadCellBlock"===t.dtoName}}class yi extends B{handleAction(t,e){const n=t.toAnnotation(),i=this.getDOMByEntity(e);if(i){const t=i.closest(".v-rte--extension-table-container"),{backgroundColorAnnotation:r,width:a,height:s}=n;i.style.backgroundColor=r.renderStyle().color,i.style.border=n.borderStr,i.style.width=a,i.style.height=s;const o=n.renderAlignmentStyle().margin;i.style.margin=o,t&&(t.style.width=a,t.style.height=s,t.style.margin=o),this.updateCustomStyleAnnotation(e,["backgroundColor","border","width","height","margin"])}}}class xi extends B{handleAction(t,e){const n=t.toAnnotation(),i=this.getDOMByEntity(e);if(i){const{width:t,height:r,borderStr:a,padding:s,textAlign:o,verticalAlign:l}=n,c=n.renderStyle().backgroundColor||"";i.style.backgroundColor=c,i.style.border=a,i.style.width=t,i.style.height=r,i.style.padding=s,i.style.textAlign=o,i.style.verticalAlign=l,this.updateCustomStyleAnnotation(e,["backgroundColor","border","width","height","padding","textAlign","verticalAlign"])}}}class Li extends B{handleAction(t,e){const n=e.parent,i=n.parent,r=Ot(n,kt),a=jt(r),s=a.indexOf(n),{colSpan:o,rowSpan:l}=Ft(e),c=Gt(e,a),h=Math.ceil(l/2),d=Math.max(1,l-h),u=1===l;_t(e,o,h,r);const p=s+h,f=zt(e.type);if(_t(f,o,d,r),u){const t=this.createNewRowWithCell(i,f),s=i.children.indexOf(n);i.apply(new M(i.children[s],t)),a.splice(p,0,t),this.updateCellsSpanningThroughInsertionPoint(a,p,e,r)}else{const t=a[p],e=this.findInsertPosition(t,c,a,p);t.children.splice(e,0,f),f.parent=t}}findInsertPosition(t,e,n,i){let r=0;for(let t=0;t<i;t++){const a=n[t];for(const s of a.children){const{colSpan:a,rowSpan:o}=Ft(s);t+o>i&&Gt(s,n)<e&&(r+=a)}}let a=r;for(let n=0;n<t.children.length;n++){if(a>=e)return n;const i=t.children[n],{colSpan:r}=Ft(i);a+=r}return t.children.length}createNewRowWithCell(e,n){const i={id:t(),type:"table-row",children:[]},r=qt.from(i);return r.parent=e,r.children.push(n),n.parent=r,r}updateCellsSpanningThroughInsertionPoint(t,e,n,i){for(let r=0;r<e;r++){const a=t[r];for(const t of a.children){if(t===n)continue;const{colSpan:a,rowSpan:s}=Ft(t);r+s>=e&&_t(t,a,s+1,i)}}}}class Ci extends B{handleAction(t,e){const n=e.parent,i=Ot(n,kt),r=jt(i),a=r.indexOf(n),{colSpan:s,rowSpan:o}=Ft(e),l=Gt(e,r),c=l+s-1,h=Math.ceil(s/2),d=Math.floor(s/2);_t(e,h,o,i);const u=zt(e.type);_t(u,d,o,i),n.apply(new M(e,u));const p=1===s?1:0;p>0&&this.updateOtherRowsCells(r,a,l,c,o,p,i)}updateOtherRowsCells(t,e,n,i,r,a,s){for(let o=0;o<t.length;o++){const l=t[o];if(!(o>=e&&o<e+r))for(const e of l.children){const r=Gt(e,t),{colSpan:o,rowSpan:l}=Ft(e);if(r+o-1>=n&&r<=i){_t(e,o+a,l,s);break}}}}}class Si extends Qn{handleAction(e,n){const{selectedRows:i}=e,r=i[i.length-1];let a=n.children.find((t=>t instanceof It));const s={id:t(),type:"table-row",children:[]};let o=0,l=null;a?(l=a.children[0],o=this.getHeadCellLength(l)):(a=It.from({id:t(),type:"table-body",children:[]}),n.apply(new V([a])));const c=r.parent.children,h=this.getRowsMaxCellCount(c);if(this.getRowsMaxCellCount([r])<h){const t=c.indexOf(r),e=this.getRowCellStartCols(c),n=new Map;for(let i=0;i<h;i++){const r=i<o?"table-head-cell":"table-cell",{cell:a}=this.getTheStartSpanCell(c,e,t,i);if(a){const t=a.colSpan;n.set(i,this.getDefaultCellBlockTemplate(r,t)),i+=t-1}}s.children=this.getSortedValuesByNumericKey(n)}else s.children=this.createTableCells(r,o);const d=l?new K(l,qt.from(s)):new V([qt.from(s)]);a.apply(d)}createTableCells(t,e){const n=[];let i=0;for(const r of t.children)n.push(this.getDefaultCellBlockTemplate(i<e?"table-head-cell":"table-cell",r.colSpan)),i+=r.colSpan;return n}}class ki extends Qn{handleAction(e){const{insertDirection:n,selectedRows:i}=e,r=n===Wt.ABOVE?i[0]:i[i.length-1],a={id:t(),type:"table-row",children:[]},s=r.parent.children,o=this.getRowsMaxCellCount(s),l=s.indexOf(r),c=this.getRowCellStartCols(s),h=new Map;for(let t=0;t<o;t++){const{cell:e,rowIndex:i}=this.getTheStartSpanCell(s,c,l,t);if(e){const{colSpan:r,rowSpan:a}=e;if(n===Wt.ABOVE?i!==l:i+a>l+1){this.updateCellSpan(e,"rowspan",a+1),t+=r-1;continue}h.set(t,this.getDefaultCellBlockTemplate(e.type,r)),t+=r-1}}a.children=this.getSortedValuesByNumericKey(h);const d=qt.from(a),u=n===Wt.ABOVE?new K(r,d):new M(r,d);r.parent.apply(u)}}class Ti extends on{canIntercept(t,e){return Boolean(e.parent)}intercept(t,e,n){const i=this.createNewParagraph("");i&&(n.parent.apply(0===e.startOffset?new K(n,i):new M(n,i)),e.newBlock=i)}createNewParagraph(e){const n=Z.getRTEBlockClass("paragraph");if(n)return n.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:e}]})}}class Ai extends J{constructor(){super(...arguments),this.stylesToBeFiltered=bt.getDefaultStyles(),this.elementTagName="table"}canFilter(t){return this.isTableBlock(t.dtoName)}canRefill(t,e){return this.isTableBlock(t)&&e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableBlock(t){return"RTETableBlock"===t}}class Ei extends J{constructor(){super(...arguments),this.stylesToBeFiltered=mn.getDefaultStyles(),this.elementTagName="table caption"}canFilter(t){return this.isTableCaption(t.dtoName)}canRefill(t,e){return this.isTableCaption(t)&&"CAPTION"===e.nodeName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableCaption(t){return"RTETableCaptionBlock"===t}}class Ii extends J{constructor(t="td"){super(),this.stylesToBeFiltered=mt.getDefaultStyles(),this.elementTagName="",this.stylesWithRGBColor=mt.getDefaultStyles(!1),this.cellBlockClassName="",this.elementTagName=t,this.cellBlockClassName="td"===t?"RTETableCellBlock":"RTETableHeadCellBlock"}canFilter(t){return this.isTableCell(t.dtoName)}filterAndDeleteStyles(t,e){return this.convertDefaultBorderColorFromRGBToHex(t),super.filterAndDeleteStyles(t,e)}canRefill(t,e){return this.isTableCell(t)&&e.nodeName===this.elementTagName.toUpperCase()}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableCell(t){return t===this.cellBlockClassName}convertDefaultBorderColorFromRGBToHex(t){t&&t.border&&t.border===this.stylesWithRGBColor.border&&(t.border=this.stylesToBeFiltered.border)}}class Oi extends I{constructor(t=Ut){super(),this.toolbarButtonRenderer=new qn,this.tableBlockRenderer=new Mn,this.tableRowBlockRenderer=new Hn,this.tableCellRenderer=new Pn,this.tableHeadCellRenderer=new Fn,this.tableSelection=new Yn,St.setTableColors(t),this.registerToolbarButtonRenderer("table",this.toolbarButtonRenderer),this.registerBlockBasicStrategies(kt.name),this.registerBlockBasicStrategies(Et.name),this.registerBlockBasicStrategies(vt.name),this.registerBlockBasicStrategies(qt.name),this.registerBlockBasicStrategies(At.name),this.registerBlockBasicStrategies(It.name),this.registerRenderer("table-block",this.tableBlockRenderer),this.registerRenderer("table-head",new Vn),this.registerRenderer("table-head-cell",this.tableHeadCellRenderer),this.registerRenderer("table-row",this.tableRowBlockRenderer),this.registerRenderer("table-cell",this.tableCellRenderer),this.registerRenderer("table-body",new Kn),this.registerRenderer("table-caption",new Jn),this.registerNode("table-block",kt),this.registerNode("table-head",Et),this.registerNode("table-head-cell",vt),this.registerNode("table-row",qt),this.registerNode("table-cell",At),this.registerNode("table-body",It),this.registerNode("table-caption",vn),this.registerElementToBlockDTOClassStrategy(new hi),this.registerElementToBlockDTOClassStrategy(new di),this.registerElementToBlockDTOClassStrategy(new ui),this.registerElementToBlockDTOClassStrategy(new pi),this.registerElementToBlockDTOClassStrategy(new fi),this.registerElementToBlockDTOClassStrategy(new wi),this.registerAnnotationHandler(new bi),this.registerAnnotationHandler(new mi),this.registerAnnotationHandler(new vi)}initialExtensionAfterLoad(t){this.tableSelection.init(t);const e=Object.assign(Object.assign({},t),{tableSelection:this.tableSelection});super.initialExtensionAfterLoad(e)}destroyExtension(){this.tableBlockRenderer.destroy(),this.tableSelection.destroy()}}(()=>{const t=new Gn,e=new Un;I.registerActionHandleStrategy(b.name,"INSERT_TABLE_BLOCK",t),I.registerActionHandleStrategy(b.name,"DELETE_TABLE_BLOCK",e),I.registerActionHandleStrategy(At.name,"DELETE_TABLE_BLOCK",e),I.registerActionHandleStrategy(vt.name,"DELETE_TABLE_BLOCK",e),I.registerActionHandleStrategy(D.name,"INSERT_TABLE_BLOCK",t),I.registerActionHandleStrategy(L.name,"INSERT_TABLE_BLOCK",t),I.registerActionHandleStrategy(kt.name,Zt,new Si),I.registerActionHandleStrategy(kt.name,Jt,new ki),I.registerActionHandleStrategy(kt.name,Qt,new Xn),I.registerActionHandleStrategy(kt.name,Xt,new ti),I.registerActionHandleStrategy(kt.name,Yt,new ei),I.registerActionHandleStrategy(kt.name,te,new ni),I.registerActionHandleStrategy(kt.name,ee,new ne),I.registerActionHandleStrategy(qt.name,ie,new si),I.registerActionHandleStrategy(qt.name,"CREATE_SEGMENT_TABLE_CELL",new ri),I.registerActionHandleStrategy(qt.name,re,new ai),I.registerActionHandleStrategy(At.name,ae,new Li),I.registerActionHandleStrategy(At.name,se,new Ci),I.registerActionHandleStrategy(vt.name,ae,new Li),I.registerActionHandleStrategy(vt.name,se,new Ci),I.registerActionHandleStrategy(kt.name,oe,new oi),I.registerActionHandleStrategy(kt.name,le,new ci),I.registerActionHandleStrategy(kt.name,Cn.name,new yi),I.registerActionHandleStrategy(At.name,An.name,new xi),I.registerActionHandleStrategy(vt.name,En.name,new xi),I.registerActionHandlerInterceptor(D.name,z.DELETE_BLOCK_CONTENT,new Wn),I.registerActionHandlerInterceptor(qt.name,z.INSERT_CHILDREN_BEFORE,new li),I.registerActionHandlerInterceptor(At.name,z.DELETE_CHILDREN,new Zn),I.registerActionHandlerInterceptor(vt.name,z.DELETE_CHILDREN,new Zn),I.registerActionHandlerInterceptor(kt.name,z.INSERT_NEW_PARAGRAPH,new Ti),I.registerFilterStylesStrategy(kt.dtoName,new Ai),I.registerFilterStylesStrategy(vn.dtoName,new Ei),I.registerFilterStylesStrategy(At.dtoName,new Ii),I.registerFilterStylesStrategy(vt.dtoName,new Ii("th"))})();class Ri extends Q{constructor(t,e,n){super(t,n),this.type="horizontal-line",this.parent=e}toJSON(){return{id:this.id,type:"horizontal-line"}}clone(t){return new Ri(this.id,t,super.cloneAnnotations())}toHtml(){return"<hr>"}}const Ni={display:"inline-block",width:"100%",height:"4px",backgroundColor:"rgb(222, 222, 222)",borderWidth:"0px"};class ji extends J{constructor(){super(...arguments),this.stylesToBeFiltered=Ni,this.elementTagName="hr"}canFilter(t){return class{static isHorizontalLineBlock(t){return"RTEHorizontalLineBlock"===t}}.isHorizontalLineBlock(t.dtoName)}canRefill(t,e){return e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}var Di;!function(t){t.HORIZONTAL_LINE="HORIZONTAL_LINE"}(Di||(Di={}));class _i extends ${constructor(){super(...arguments),this.type=Di.HORIZONTAL_LINE}static from(){return[Di.HORIZONTAL_LINE,new _i]}static getDefaultStyles(){return Ni}toJSON(){return null}clone(){return new _i}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte-horizontal-line-hr"}renderStyle(t){return(null==t?void 0:t.standalone)?_i.getDefaultStyles():null}}class Bi extends j{constructor(t,e){super(t),this.dtoName=Bi.dtoName,this.type="horizontal-line",this.children=[];const{autoMatchFormat:n=!0}=null!=e?e:{};n&&(this.annotationMap=new Map([_i.from()]))}static from(e,n={autoMatchFormat:!0}){var i,r;const a=new Bi(e.id,n),s=(null===(r=null===(i=e.children)||void 0===i?void 0:i[0])||void 0===r?void 0:r.id)||t(),o=new Ri(s,a);return a.children=[o],e.annotations&&j.convertAnnotationsToMap(a.annotationMap,e.annotations),a}static create(e,n={autoMatchFormat:!0}){const i=new Bi(t(),n),r=new Ri(t(),i);return i.children=[r],e&&j.convertAnnotationsToMap(i.annotationMap,e),i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"horizontal-line",children:this.children.map((t=>t.toJSON()))})}toHtml(t){return`<hr${super.generateAttributeString(t)}>`}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1]}clone(t){const e=new Bi(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}Bi.dtoName="RTEHorizontalLineBlock";class Mi extends E{doRender(t,e,n){const i=e.children[0],r=e.getStyles(n),a=e.getClasses(n),s=[Q.DECORATOR_NODE_CLASS,a].filter(Boolean).join(" ");return t("div",{key:e.id,class:`v-rte-horizontal-line ${Q.DECORATOR_CONTAINER_CLASS}`,ref:this.useRef(e)},[t("hr",{key:(null==i?void 0:i.id)||e.id+"-hr",class:s,style:Object.keys(r).length>0?r:void 0,ref:i?this.useRef(i):void 0})])}injectRTEScopeStyles(){return".v-rte-horizontal-line{padding:8px 0;overflow:hidden}.v-rte-horizontal-line .v-rte-horizontal-line-hr{display:inline-block;width:100%;height:4px;border-width:0px;background-color:rgb(222, 222, 222)}"}}class Vi extends O{constructor(t,e=0){super(),this.type="INSERT_HORIZONTAL_LINE_BLOCK",this.splitPointNode=t,this.startOffsetOfNode=e}}class Hi extends $e{render(t,e){return this.renderButton(t,e,{icon:"horizontal-line",tooltip:{text:f.t("Horizontal line")}})}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,[i]=n();return i?t.disabled||!R.canHandle("INSERT_HORIZONTAL_LINE_BLOCK",i.parent):t.disabled}return!1}handleButtonClick(t){if(this.isDisabled(t))return;const e=this.getExtensionContext(t.host);if(e){const{host:n,getSelectedNodes:i,flushValue:r}=e,a=i()[0],s=new Vi(a,t.rteRange.startOffset);a?a.parent&&a.parent.apply(s):n.value.apply(s),s.nextFocusNode&&n.value.apply(new g(s.nextFocusNode,0)),r(n.value)}}handleDropdownClick(){}}at.register({"horizontal-line":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M0 224H32 608h32v64H608 32 0V224z"/></svg>'}});class Pi extends v{canHandle(t,e){return"HR"===t[e].tagName?1:0}handle(t,e){const n=y.generate(Bi,t[0],e);return Bi.create(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class Ki extends B{handleAction(t,e){const n=Bi.create();if(t.splitPointNode instanceof N){const i=t.splitPointNode,r=t.startOffsetOfNode;if(this.isCaretPositionAtBlockEnd(e,i,r))this.insertAfterWithFocus(t,e,n);else if(this.isCaretPositionAtBlockStart(e,i,r))e.parent.apply(new K(e,n)),t.nextFocusNode=e.getFirstNode();else{const a=new X(i,r);e.apply(a);const s=this.getNextSiblingBlock(e);e.parent.apply(new M(e,n)),t.nextFocusNode=s.getFirstNode()}}else if(t.splitPointNode)this.insertAfterWithFocus(t,e,n);else{const i=super.createNewParagraph("");e.apply(new V([n,i])),t.nextFocusNode=i.children[0]}}insertAfterWithFocus(t,e,n){const i=this.getNextSiblingBlock(e),r=null==i?void 0:i.getFirstNode();if(r instanceof N)e.parent.apply(new M(e,n)),t.nextFocusNode=r;else{const i=super.createNewParagraph("");e.parent.apply(new M(e,n,i)),t.nextFocusNode=i.children[0]}}getNextSiblingBlock(t){const e=t.parent.children,n=e.indexOf(t);return e[n+1]}}class Fi extends I{constructor(){super(),this.blockRenderer=new Mi,this.toolbarButtonRenderer=new Hi,this.registerBlockBasicStrategies(Bi.name),this.registerNode("horizontal-line",Bi),this.registerRenderer("horizontal-line",this.blockRenderer),this.registerToolbarButtonRenderer("horizontalLine",this.toolbarButtonRenderer),this.registerElementToBlockDTOClassStrategy(new Pi),I.registerFilterStylesStrategy(Bi.dtoName,new ji)}}(()=>{const t=new Ki;I.registerActionHandleStrategy(b.name,"INSERT_HORIZONTAL_LINE_BLOCK",t),I.registerActionHandleStrategy(D.name,"INSERT_HORIZONTAL_LINE_BLOCK",t),I.registerActionHandleStrategy(L.name,"INSERT_HORIZONTAL_LINE_BLOCK",t),I.registerActionHandleStrategy(Bi.name,"INSERT_HORIZONTAL_LINE_BLOCK",t)})();const zi={key:"latin",label:"Latin",characters:[{character:"Ā",title:"Latin capital letter a with macron"},{character:"ā",title:"Latin small letter a with macron"},{character:"Ă",title:"Latin capital letter a with breve"},{character:"ă",title:"Latin small letter a with breve"},{character:"Ą",title:"Latin capital letter a with ogonek"},{character:"ą",title:"Latin small letter a with ogonek"},{character:"Ć",title:"Latin capital letter c with acute"},{character:"ć",title:"Latin small letter c with acute"},{character:"Ĉ",title:"Latin capital letter c with circumflex"},{character:"ĉ",title:"Latin small letter c with circumflex"},{character:"Ċ",title:"Latin capital letter c with dot above"},{character:"ċ",title:"Latin small letter c with dot above"},{character:"Č",title:"Latin capital letter c with caron"},{character:"č",title:"Latin small letter c with caron"},{character:"Ď",title:"Latin capital letter d with caron"},{character:"ď",title:"Latin small letter d with caron"},{character:"Đ",title:"Latin capital letter d with stroke"},{character:"đ",title:"Latin small letter d with stroke"},{character:"Ē",title:"Latin capital letter e with macron"},{character:"ē",title:"Latin small letter e with macron"},{character:"Ĕ",title:"Latin capital letter e with breve"},{character:"ĕ",title:"Latin small letter e with breve"},{character:"Ė",title:"Latin capital letter e with dot above"},{character:"ė",title:"Latin small letter e with dot above"},{character:"Ę",title:"Latin capital letter e with ogonek"},{character:"ę",title:"Latin small letter e with ogonek"},{character:"Ě",title:"Latin capital letter e with caron"},{character:"ě",title:"Latin small letter e with caron"},{character:"Ĝ",title:"Latin capital letter g with circumflex"},{character:"ĝ",title:"Latin small letter g with circumflex"},{character:"Ğ",title:"Latin capital letter g with breve"},{character:"ğ",title:"Latin small letter g with breve"},{character:"Ġ",title:"Latin capital letter g with dot above"},{character:"ġ",title:"Latin small letter g with dot above"},{character:"Ģ",title:"Latin capital letter g with cedilla"},{character:"ģ",title:"Latin small letter g with cedilla"},{character:"Ĥ",title:"Latin capital letter h with circumflex"},{character:"ĥ",title:"Latin small letter h with circumflex"},{character:"Ħ",title:"Latin capital letter h with stroke"},{character:"ħ",title:"Latin small letter h with stroke"},{character:"Ĩ",title:"Latin capital letter i with tilde"},{character:"ĩ",title:"Latin small letter i with tilde"},{character:"Ī",title:"Latin capital letter i with macron"},{character:"ī",title:"Latin small letter i with macron"},{character:"Ĭ",title:"Latin capital letter i with breve"},{character:"ĭ",title:"Latin small letter i with breve"},{character:"Į",title:"Latin capital letter i with ogonek"},{character:"į",title:"Latin small letter i with ogonek"},{character:"İ",title:"Latin capital letter i with dot above"},{character:"ı",title:"Latin small letter dotless i"},{character:"IJ",title:"Latin capital ligature ij"},{character:"ij",title:"Latin small ligature ij"},{character:"Ĵ",title:"Latin capital letter j with circumflex"},{character:"ĵ",title:"Latin small letter j with circumflex"},{character:"Ķ",title:"Latin capital letter k with cedilla"},{character:"ķ",title:"Latin small letter k with cedilla"},{character:"ĸ",title:"Latin small letter kra"},{character:"Ĺ",title:"Latin capital letter l with acute"},{character:"ĺ",title:"Latin small letter l with acute"},{character:"Ļ",title:"Latin capital letter l with cedilla"},{character:"ļ",title:"Latin small letter l with cedilla"},{character:"Ľ",title:"Latin capital letter l with caron"},{character:"ľ",title:"Latin small letter l with caron"},{character:"Ŀ",title:"Latin capital letter l with middle dot"},{character:"ŀ",title:"Latin small letter l with middle dot"},{character:"Ł",title:"Latin capital letter l with stroke"},{character:"ł",title:"Latin small letter l with stroke"},{character:"Ń",title:"Latin capital letter n with acute"},{character:"ń",title:"Latin small letter n with acute"},{character:"Ņ",title:"Latin capital letter n with cedilla"},{character:"ņ",title:"Latin small letter n with cedilla"},{character:"Ň",title:"Latin capital letter n with caron"},{character:"ň",title:"Latin small letter n with caron"},{character:"ʼn",title:"Latin small letter n preceded by apostrophe"},{character:"Ŋ",title:"Latin capital letter eng"},{character:"ŋ",title:"Latin small letter eng"},{character:"Ō",title:"Latin capital letter o with macron"},{character:"ō",title:"Latin small letter o with macron"},{character:"Ŏ",title:"Latin capital letter o with breve"},{character:"ŏ",title:"Latin small letter o with breve"},{character:"Ő",title:"Latin capital letter o with double acute"},{character:"ő",title:"Latin small letter o with double acute"},{character:"Œ",title:"Latin capital ligature oe"},{character:"œ",title:"Latin small ligature oe"},{character:"Ŕ",title:"Latin capital letter r with acute"},{character:"ŕ",title:"Latin small letter r with acute"},{character:"Ŗ",title:"Latin capital letter r with cedilla"},{character:"ŗ",title:"Latin small letter r with cedilla"},{character:"Ř",title:"Latin capital letter r with caron"},{character:"ř",title:"Latin small letter r with caron"},{character:"Ś",title:"Latin capital letter s with acute"},{character:"ś",title:"Latin small letter s with acute"},{character:"Ŝ",title:"Latin capital letter s with circumflex"},{character:"ŝ",title:"Latin small letter s with circumflex"},{character:"Ş",title:"Latin capital letter s with cedilla"},{character:"ş",title:"Latin small letter s with cedilla"},{character:"Š",title:"Latin capital letter s with caron"},{character:"š",title:"Latin small letter s with caron"},{character:"Ţ",title:"Latin capital letter t with cedilla"},{character:"ţ",title:"Latin small letter t with cedilla"},{character:"Ť",title:"Latin capital letter t with caron"},{character:"ť",title:"Latin small letter t with caron"},{character:"Ŧ",title:"Latin capital letter t with stroke"},{character:"ŧ",title:"Latin small letter t with stroke"},{character:"Ũ",title:"Latin capital letter u with tilde"},{character:"ũ",title:"Latin small letter u with tilde"},{character:"Ū",title:"Latin capital letter u with macron"},{character:"ū",title:"Latin small letter u with macron"},{character:"Ŭ",title:"Latin capital letter u with breve"},{character:"ŭ",title:"Latin small letter u with breve"},{character:"Ů",title:"Latin capital letter u with ring above"},{character:"ů",title:"Latin small letter u with ring above"},{character:"Ű",title:"Latin capital letter u with double acute"},{character:"ű",title:"Latin small letter u with double acute"},{character:"Ų",title:"Latin capital letter u with ogonek"},{character:"ų",title:"Latin small letter u with ogonek"},{character:"Ŵ",title:"Latin capital letter w with circumflex"},{character:"ŵ",title:"Latin small letter w with circumflex"},{character:"Ŷ",title:"Latin capital letter y with circumflex"},{character:"ŷ",title:"Latin small letter y with circumflex"},{character:"Ÿ",title:"Latin capital letter y with diaeresis"},{character:"Ź",title:"Latin capital letter z with acute"},{character:"ź",title:"Latin small letter z with acute"},{character:"Ż",title:"Latin capital letter z with dot above"},{character:"ż",title:"Latin small letter z with dot above"},{character:"Ž",title:"Latin capital letter z with caron"},{character:"ž",title:"Latin small letter z with caron"},{character:"ſ",title:"Latin small letter long s"}]},$i={key:"mathematical",label:"Mathematical",characters:[{character:"<",title:"Less-than sign"},{character:">",title:"Greater-than sign"},{character:"≤",title:"Less-than or equal to"},{character:"≥",title:"Greater-than or equal to"},{character:"–",title:"En dash"},{character:"—",title:"Em dash"},{character:"¯",title:"Macron"},{character:"‾",title:"Overline"},{character:"°",title:"Degree sign"},{character:"−",title:"Minus sign"},{character:"±",title:"Plus-minus sign"},{character:"÷",title:"Division sign"},{character:"⁄",title:"Fraction slash"},{character:"×",title:"Multiplication sign"},{character:"ƒ",title:"Latin small letter f with hook"},{character:"∫",title:"Integral"},{character:"∑",title:"N-ary summation"},{character:"∞",title:"Infinity"},{character:"√",title:"Square root"},{character:"∼",title:"Tilde operator"},{character:"≅",title:"Approximately equal to"},{character:"≈",title:"Almost equal to"},{character:"≠",title:"Not equal to"},{character:"≡",title:"Identical to"},{character:"∈",title:"Element of"},{character:"∉",title:"Not an element of"},{character:"∋",title:"Contains as member"},{character:"∏",title:"N-ary product"},{character:"∧",title:"Logical and"},{character:"∨",title:"Logical or"},{character:"¬",title:"Not sign"},{character:"∩",title:"Intersection"},{character:"∪",title:"Union"},{character:"∂",title:"Partial differential"},{character:"∀",title:"For all"},{character:"∃",title:"There exists"},{character:"∅",title:"Empty set"},{character:"∇",title:"Nabla"},{character:"∗",title:"Asterisk operator"},{character:"∝",title:"Proportional to"},{character:"∠",title:"Angle"},{character:"¼",title:"Vulgar fraction one quarter"},{character:"½",title:"Vulgar fraction one half"},{character:"¾",title:"Vulgar fraction three quarters"}]},qi={key:"arrows",label:"Arrows",characters:[{character:"←",title:"leftwards simple arrow"},{character:"→",title:"rightwards simple arrow"},{character:"↑",title:"upwards simple arrow"},{character:"↓",title:"downwards simple arrow"},{character:"⇐",title:"leftwards double arrow"},{character:"⇒",title:"rightwards double arrow"},{character:"⇑",title:"upwards double arrow"},{character:"⇓",title:"downwards double arrow"},{character:"⇠",title:"leftwards dashed arrow"},{character:"⇢",title:"rightwards dashed arrow"},{character:"⇡",title:"upwards dashed arrow"},{character:"⇣",title:"downwards dashed arrow"},{character:"⇤",title:"leftwards arrow to bar"},{character:"⇥",title:"rightwards arrow to bar"},{character:"⤒",title:"upwards arrow to bar"},{character:"⤓",title:"downwards arrow to bar"},{character:"↨",title:"up down arrow with base"},{character:"🔙",title:"back with leftwards arrow above"},{character:"🔚",title:"end with leftwards arrow above"},{character:"🔛",title:"on with exclamation mark with left right arrow above"},{character:"🔜",title:"soon with rightwards arrow above"},{character:"🔝",title:"top with upwards arrow above"}]},Gi={key:"currency",label:"Currency",characters:[{character:"$",title:"Dollar sign"},{character:"€",title:"Euro sign"},{character:"¥",title:"Yen sign"},{character:"£",title:"Pound sign"},{character:"¢",title:"Cent sign"},{character:"₠",title:"Euro-currency sign"},{character:"₡",title:"Colon sign"},{character:"₢",title:"Cruzeiro sign"},{character:"₣",title:"French franc sign"},{character:"₤",title:"Lira sign"},{character:"¤",title:"Currency sign"},{character:"₿",title:"Bitcoin sign"},{character:"₥",title:"Mill sign"},{character:"₦",title:"Naira sign"},{character:"₧",title:"Peseta sign"},{character:"₨",title:"Rupee sign"},{character:"₩",title:"Won sign"},{character:"₪",title:"New sheqel sign"},{character:"₫",title:"Dong sign"},{character:"₭",title:"Kip sign"},{character:"₮",title:"Tugrik sign"},{character:"₯",title:"Drachma sign"},{character:"₰",title:"German penny sign"},{character:"₱",title:"Peso sign"},{character:"₲",title:"Guarani sign"},{character:"₳",title:"Austral sign"},{character:"₴",title:"Hryvnia sign"},{character:"₵",title:"Cedi sign"},{character:"₶",title:"Livre tournois sign"},{character:"₷",title:"Spesmilo sign"},{character:"₸",title:"Tenge sign"},{character:"₹",title:"Indian rupee sign"},{character:"₺",title:"Turkish lira sign"},{character:"₻",title:"Nordic mark sign"},{character:"₼",title:"Manat sign"},{character:"₽",title:"Ruble sign"}]},Wi={key:"text",label:"Text",characters:[{character:"‹",title:"Single left-pointing angle quotation mark"},{character:"›",title:"Single right-pointing angle quotation mark"},{character:"«",title:"Left-pointing double angle quotation mark"},{character:"»",title:"Right-pointing double angle quotation mark"},{character:"‘",title:"Left single quotation mark"},{character:"’",title:"Right single quotation mark"},{character:"“",title:"Left double quotation mark"},{character:"”",title:"Right double quotation mark"},{character:"‚",title:"Single low-9 quotation mark"},{character:"„",title:"Double low-9 quotation mark"},{character:"¡",title:"Inverted exclamation mark"},{character:"¿",title:"Inverted question mark"},{character:"‥",title:"Two dot leader"},{character:"…",title:"Horizontal ellipsis"},{character:"‡",title:"Double dagger"},{character:"‰",title:"Per mille sign"},{character:"‱",title:"Per ten thousand sign"},{character:"‼",title:"Double exclamation mark"},{character:"⁈",title:"Question exclamation mark"},{character:"⁉",title:"Exclamation question mark"},{character:"⁇",title:"Double question mark"},{character:"©",title:"Copyright sign"},{character:"®",title:"Registered sign"},{character:"™",title:"Trade mark sign"},{character:"§",title:"Section sign"},{character:"¶",title:"Paragraph sign"},{character:"⁋",title:"Reversed paragraph sign"}]},Ui=[Gi,Wi,$i,qi,zi];class Zi extends $e{constructor(t){super(),this.panelRef=null,this.categories=t}render(t,e){return t("vega-popover",{trigger:"click",alignment:"start",placement:"bottom",showArrow:!1,isScreenPosition:!0,ref:t=>{t&&ot.addUniqueObserverToNode(t,ut,(()=>{this.handlePopoverShow()}))}},[t("div",{slot:"popover"},[t("vega-rich-text-special-characters-panel",{categories:this.categories,ref:t=>{t&&(this.panelRef=t,ot.addUniqueObserverToNode(t,ht,(t=>{this.insertCharacter(e,t.detail)})))}})]),t("div",{slot:"popover-content"},this.renderButton(t,e,{icon:"rte-special-characters",tooltip:{text:"Special Characters"}}))])}handleButtonClick(){}handleDropdownClick(){}handlePopoverShow(){this.panelRef&&this.panelRef.resetPanel()}insertCharacter(t,e){const n=t.rteRange,i=n.startNode;if(!i)return;const r=this.isCaretOnLineBreak(i,n)?this.insertAtLineBreak(i,e,n):this.insertAtTextNode(i,e,n);t.host.value.apply(new g(r.node,r.offset))}isCaretOnLineBreak(t,e){return t instanceof N&&"\n"===t.text&&e.startOffset===e.endOffset}insertAtTextNode(t,e,n){const i=new ve(e,n);return i.isFlushable=!0,t.apply(i),{node:t,offset:Math.min(n.startOffset+e.length,t.getRangeEndOffset())}}insertAtLineBreak(t,e,n){return{node:this.insertTextToLineBreakNode(t,e,n),offset:e.length}}insertTextToLineBreakNode(t,e,n){const i=t.parent,r=i.children.indexOf(t);if(0===n.startOffset&&i.children[r+1]){const n=t.cloneWithText(e),r=new K(t,n);return r.isFlushable=!0,i.apply(r),n}const a=new Y(e);return a.isFlushable=!0,t.apply(a),t}}at.register({"rte-special-characters":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M224 80C126.8 80 48 158.8 48 256c0 63.7 33.8 119.5 84.6 150.4c11.4 7 19.4 19.6 19.4 34.2c0 21.8-17.6 39.4-39.4 39.4H24c-13.3 0-24-10.7-24-24s10.7-24 24-24H85.4C33.4 391 0 327.4 0 256C0 132.3 100.3 32 224 32s224 100.3 224 224c0 71.4-33.4 135-85.4 176H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H335.4c-21.8 0-39.4-17.6-39.4-39.4c0-14.6 8-27.2 19.4-34.2C366.2 375.5 400 319.7 400 256c0-97.2-78.8-176-176-176z"/></svg>'}});class Ji extends I{constructor(t){super(),this.categories=this.buildCategories(t)}prepareBeforeLoad(t){this.registerToolbarButtonRenderer("special-characters",new Zi(this.categories),t)}buildCategories(t){const e=!1!==(null==t?void 0:t.includeDefaults)?Ui:[];return(null==t?void 0:t.categories)?[...e,...t.categories]:e}}const Qi=[{title:"0.5",value:"0.5"},{title:"1",value:"1"},{title:"1.5",value:"1.5"},{title:"2",value:"2"},{title:"2.5",value:"2.5"}];var Xi;!function(t){t.LINE_HEIGHT="LINE_HEIGHT"}(Xi||(Xi={}));class Yi extends ${constructor(t){super(),this.type=Xi.LINE_HEIGHT,this.lineHeight=t}static from(t){return[Xi.LINE_HEIGHT,new Yi(t)]}static getDefaultStyles(t){return{lineHeight:t}}toJSON(){return{lineHeight:this.lineHeight}}renderClass(){return null}clone(){return new Yi(this.lineHeight)}renderStyle(){return Yi.getDefaultStyles(this.lineHeight)}}class tr extends q{constructor(t){super(),this.isFlushable=!0,this.lineHeight=t}toAnnotation(){return new Yi(this.lineHeight)}}class er extends B{handleAction(t,e){this.updateCustomStyleAnnotation(e,["lineHeight"])}}class nr extends $e{constructor(t){super(),this.options=t}render(t,e){const n=this.options.map((t=>{var e;return{key:t.value,label:null!==(e=t.title)&&void 0!==e?e:t.value}}));return this.renderDropdown(t,e,{selectType:"single",selectedSourceKey:this.getSelectedSourceValue(e)},[this.renderButton(t,e,{icon:"line-height",showArrowIcon:!0,tooltip:{text:f.t("Line Height")}}),this.renderDropdownListTemplate(t,n,e)])}isSelected(){return!1}isDisabled(t){var e;if(t.host.disabled)return!0;const n=this.getExtensionContext(t.host);return!!(null!==(e=null==n?void 0:n.getSelectedNodes())&&void 0!==e?e:[]).some((t=>{var e;return(null===(e=t.getAnnotationByType(tt.CODE))||void 0===e?void 0:e.code)||t.parent instanceof et}))||this.getSelectedBlocks(t).some((t=>t instanceof et||t instanceof L||!R.canHandle(tr.name,t)))}handleDropdownClick(t,e){const n=t;this.getSelectedBlocks(e).forEach((t=>{t.apply(new tr(n))}))}handleButtonClick(){}getSelectedSourceValue(t){const e=this.getSelectedBlocks(t);if(0===e.length)return"";const n=e[0].getAnnotationByType(Xi.LINE_HEIGHT);return e.every((t=>{const e=t.getAnnotationByType(Xi.LINE_HEIGHT);return(null==e?void 0:e.lineHeight)===(null==n?void 0:n.lineHeight)}))&&n?n.lineHeight:""}getSelectedBlocks(t){var e,n;const i=this.getExtensionContext(t.host),r=null!==(e=null==i?void 0:i.getSelectedNodes())&&void 0!==e?e:[],a=[];return r.forEach((t=>{t.parent instanceof j&&!a.includes(t.parent)&&a.push(t.parent)})),0===a.length&&(null===(n=t.rteRange.startNode)||void 0===n?void 0:n.parent)instanceof j&&a.push(t.rteRange.startNode.parent),a}}at.register({"line-height":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M113.8 39.9c-4.6-5.1-11-7.9-17.8-7.9s-13.3 2.9-17.8 7.9l-72 80c-8.9 9.9-8.1 25 1.8 33.9s25 8.1 33.9-1.8L72 118.5V393.5L41.8 359.9c-8.9-9.9-24-10.7-33.9-1.8s-10.7 24-1.8 33.9l72 80c4.6 5.1 11 7.9 17.8 7.9s13.3-2.9 17.8-7.9l72-80c8.9-9.9 8.1-25-1.8-33.9s-25-8.1-33.9 1.8L120 393.5V118.5l30.2 33.5c8.9 9.9 24 10.7 33.9 1.8s10.7-24 1.8-33.9l-72-80zM248 72c-13.3 0-24 10.7-24 24s10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248zm0 160c-13.3 0-24 10.7-24 24s10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248zM224 416c0 13.3 10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248c-13.3 0-24 10.7-24 24z"/></svg>'}});const ir=new Set([D.name,T.name]);class rr extends k{constructor(t=Qi){super(),this.allowedLineHeights=new Set(t.map((t=>t.value)))}canHandle(t){return ir.has(t.name)}handle(t){var e,n;const i=null!==(n=null===(e=null==t?void 0:t.style.lineHeight)||void 0===e?void 0:e.trim())&&void 0!==n?n:"";return i&&this.allowedLineHeights.has(i)?{lineHeight:i}:{}}}class ar extends J{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const e=t,n=e.lineHeight,i=e.customStyle;return n&&i&&i.lineHeight===n&&delete i.lineHeight,i&&0===Object.keys(i).length&&delete e.customStyle,t}}const sr=new WeakMap,or=new WeakSet;class lr extends I{constructor(t=Qi){super(),this.options=t,this.toolbarButtonRenderer=null,this.registerAnnotationHandler(new rr(this.options)),[D,T].forEach((t=>{!function(t,e){sr.set(t,new Set(e.map((t=>t.value))))}(t,this.options)}))}prepareBeforeLoad(t){this.toolbarButtonRenderer=new nr(this.options),this.registerToolbarButtonRenderer("lineHeight",this.toolbarButtonRenderer,t)}}[D,T].forEach((t=>{I.registerActionHandleStrategy(t.name,tr.name,new er),it.register(t.name,new ar),function(t){or.has(t)||(or.add(t),I.attachAnnotationFromJson(t,"lineHeight",((e,n)=>{if("string"!=typeof n||""===n)return;e.annotationMap.set(...Yi.from(n));const i=sr.get(t);i&&i.size>0&&function(t,e){const n=t.annotationMap.get(Xi.LINE_HEIGHT);if(!n||e.has(n.lineHeight))return;const i=n.lineHeight;t.annotationMap.delete(Xi.LINE_HEIGHT);const r=t.annotationMap.get(W.CUSTOM_STYLE);r?r.customStyle=Object.assign(Object.assign({},r.customStyle),{lineHeight:i}):t.annotationMap.set(...nt.from({lineHeight:i}))}(e,i)})))}(t)}));class cr extends O{constructor(t,e){super(),this.type=z.INSERT_NODE_TO_NEAREST_ROOT,this.rteRange=t,this.nodeToBeInserted=e}}class hr extends B{handleAction(e,n){const{rteRange:i,token:r}=e;if(i&&i.startNode){const{key:a,label:s,customAttrs:o={wrapped:"true"}}=r,l=new We(t(),a,s,n);l.annotationMap.set("CUSTOM_ATTRIBUTE",new U(o)),n.apply(new cr(i,l)),e.actionHandleResult=!0}}}const dr=new class extends v{canHandle(t,e){const n=t[e];return"SPAN"===n.nodeName&&n.classList.contains("token")&&n.hasAttribute("token-key")?1:0}handle(e){const n=e[0],i=n.getAttribute("token-key"),r=n.textContent,a=y.generate(N,n),{customAttribute:s}=a,o=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}(a,["customAttribute","customClass"]);return{id:t(),type:"token",token:i,text:r,annotations:Object.assign(Object.assign({},o),{customAttribute:this.createCustomAttrs(s)})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}createCustomAttrs(t){const e=Object.assign(Object.assign({},t),{contenteditable:null,"template-token-key":null,"token-key":null,wrapped:"false"===t.wrapped?"false":"true"});return be(e)}};class ur extends I{constructor(t=[]){super(),this.tokenRenderer=new Ue,this.tokenList=t,this.registerNode("token",We),this.registerRenderer("token",this.tokenRenderer),this.registerElementToNodeDTOClassStrategy(dr)}prepareBeforeLoad(t){this.registerToolbarButtonRenderer("token",new Ge(this.tokenList),t)}}(()=>{const t=new hr;I.registerActionHandleStrategy(D.name,"INSERT_TOKEN_NODE",t),I.registerActionHandleStrategy(T.name,"INSERT_TOKEN_NODE",t)})();export{on as A,cr as I,Ge as R,Le as V,Te as a,Ie as b,Ne as c,He as d,Fe as e,ur as f,Je as g,Qi as h,gn as i,Oi as j,Fi as k,Ji as l,Ui as m,zi as n,$i as o,qi as p,Gi as q,Wi as r,lr as s,ze as t,$e as u,We as v,Be as w,Ue as x,Ze as y}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,c as i,H as n,g as s}from"./p-6b2342e0.js";import{I as o}from"./p-abd7aeaa.js";import{M as a,a as r}from"./p-f0ff4463.js";import{M as l,a as p}from"./p-cdbbdcc2.js";import{R as c}from"./p-14bfc113.js";import{s as d}from"./p-519a7d55.js";import{C as h}from"./p-75b58efe.js";import{c as u,V as f,M as g,I as v}from"./p-6e1ab235.js";import{s as m}from"./p-6bd5c49b.js";import{V as x,I as b}from"./p-8ce9e214.js";import{F as w}from"./p-141f74ff.js";import{c as y}from"./p-ef44d516.js";import{a as C,B as j,V as k,j as R,J as I,K as S,L as z,M as O,N as D}from"./p-cb4033ef.js";import{S as E}from"./p-5e282e41.js";import{S as T}from"./p-014e2cf9.js";import{i as V}from"./p-2b22091e.js";import{S as M}from"./p-b2f89dbd.js";import{i as L}from"./p-d27ae9ff.js";import{d as N}from"./p-a841cf13.js";import{o as F,p as A,q as P,l as B}from"./p-5ffc7cb8.js";import{D as $,d as _}from"./p-526e3634.js";import{P as U}from"./p-81dd00d0.js";import{S as W}from"./p-d14ddf80.js";import{V as K}from"./p-6031bed1.js";import{c as q}from"./p-3a620268.js";import{C as H}from"./p-2d0d575f.js";import{F as G}from"./p-cb378636.js";import{C as J}from"./p-8187878e.js";import{A as X}from"./p-bdb5180c.js";import{M as Y}from"./p-78a57a17.js";import"./p-262ec334.js";import"./p-bc73ce30.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-ddc2d219.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-52b8f2d2.js";import"./p-53ed3b1f.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-57f7c257.js";import"./p-49a2e141.js";import"./p-ffdc25ec.js";import"./p-afcd8f04.js";const Q=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)])$/;class Z extends o{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=Q.test(t.toLowerCase());return{isValid:e,message:e?"":"Please enter the correct email format."}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t&&t.length>0}}class tt extends f{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);o>3&&a&&Object.defineProperty(e,i,a)}([u()],tt.prototype,"disableCopyPaste",void 0);var et=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class it extends f{render(){const e=this.hasPrefixSlot();if(this.prefixIcon||e)return t("div",{class:{"vega-input-prefix":!0,"vega-input-prefix-slot":e},part:"prefix-icon-container"},this.prefixIcon&&!e?t("vega-icon",{icon:this.prefixIcon,size:"size-16","aria-hidden":"true"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}et([u()],it.prototype,"host",void 0),et([u()],it.prototype,"prefixIcon",void 0);class nt extends T{constructor(t=!1){super(),this.overrideValue=t}format(t){if(!t.length)return t;const e=Number(t.replace(/,/g,""));return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e.toLocaleString("en-US"):t}calculateCaretPosition(t,e){const i=this.format(t),n=t.substring(0,e),s=i.substring(0,e),o=(n.match(/,/g)||[]).length;return e+((s.match(/,/g)||[]).length-o)}}class st extends T{constructor(t,e=!1){super(),this.maskConfig={allowNegative:!0},this.skipFormat=t=>this.maskConfig.allowNegative&&"-"===t||null!=this.maskConfig.precision&&this.maskConfig.precision>0&&t.split(".").length-1==1&&t.endsWith(".")&&!t.startsWith("."),this.maskConfig=Object.assign(Object.assign({},this.maskConfig),t),this.overrideValue=e,this.mask=new RegExp(this.getRegExp())}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t)&&i.pop()}return i.join("")}calculateCaretPosition(t,e){if(V(e)){const i=this.redressAbnormalNumber(t);return e-(t.length-i.length)}}inputNeedFormat(t){return!this.mask.test(t)}redressAbnormalNumber(t){let e=t.replace(/^0+(?!$)/,"");return e.startsWith(".")&&(e=`0${e}`),e}getRegExp(){const t=this.maskConfig.allowNegative?"(\\-)?":"";let e;return e=0===this.maskConfig.precision?`^${t}(0|[1-9][0-9]*)$`:this.maskConfig.precision&&this.maskConfig.precision>0?`^${t}(0|0\\.\\d{1,${this.maskConfig.precision}}|[1-9][0-9]*(\\.\\d{1,${this.maskConfig.precision}})?)$`:`^${t}(0|0\\.\\d*|[1-9][0-9]*(\\.\\d*)?)$`,e}}class ot extends T{constructor(t,e=!1,i=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e,this.overrideValue=i}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(V(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class at extends st{constructor(t,e=!1){super(t,e)}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t.replace(/,/g,""))&&i.pop()}return this.thousandCommaFormat(i.join(""))}calculateCaretPosition(t,e){const i=this.redressAbnormalNumber(t),n=this.format(t),s=t.substring(0,e),o=n.substring(0,e),a=(s.match(/,/g)||[]).length;return e+((o.match(/,/g)||[]).length-a)-(t.length-i.length)}thousandCommaFormat(t){if(!t.length)return t;const e=t.replace(/[^\d.-]/g,""),i=e.indexOf("."),n=e.length>1&&i>=1?e.slice(i):"",s=Number(e.split(".")[0]);return!isNaN(s)&&s<=Number.MAX_SAFE_INTEGER?s.toLocaleString("en-US")+n:e}}var rt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class lt extends M{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRenderer.getInputRef(),this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}connectedCallback(){this.initSetupMaskConfigObserver()}disconnectedCallback(){this.removeSetupMaskConfigObserver()}watchValue(t,e){t!==e&&this.formatValueAfterValueChange()}watchMaskChange(t,e){this.areMaskConfigsEqual(t,e)||this.setup()}watchTypeChange(t,e){"number"!==t&&"number"!==e||this.setup()}generateMaskStrategy(t){let e=null;Array.isArray(this.maskConfig)?e=this.maskConfig.find((e=>"blur"===t?this.isBlurModeMaskConfig(e):!this.isBlurModeMaskConfig(e))):this.maskConfig&&("blur"===t&&this.isBlurModeMaskConfig(this.maskConfig)?e=this.maskConfig:"input"!==t||this.isBlurModeMaskConfig(this.maskConfig)||(e=this.maskConfig));let i=null;switch(null==e?void 0:e.type){case"phone":i=E.getPhoneMaskStrategy(e.overrideValue);break;case"taxId":i=E.getTaxIdMaskStrategy(e.overrideValue);break;case"zipcode":i=E.getZipcodeMaskStrategy(e.overrideValue);break;case"thousand-comma":i=new nt(e.overrideValue);break;case"number":i=this.getNumberTypeMaskStrategy(e.options,e.overrideValue);break;case"custom":i=e.strategy?e.strategy():new E(e.options,e.overrideValue);break;case"custom-formatter":i=new ot(e.formatter,e.resetCaretPosition,e.overrideValue)}return"number"!==this.type||"input"!==t||e||(i=new st({},null==e?void 0:e.overrideValue)),i}getNumberTypeMaskStrategy(t,e=!1){return t&&t.thousandComma?new at(t,e):new st(t,e)}isBlurModeMaskConfig(t){return"blur"===t.trigger}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return L(i,n,!0,((t,e)=>N(t,e)?0:-1))}initSetupMaskConfigObserver(){$.addUniqueObserverToNode(this.host,F,this.setup.bind(this))}removeSetupMaskConfigObserver(){$.removeUniqueObserverFromNode(this.host,F)}}rt([u()],lt.prototype,"maskConfig",void 0),rt([u()],lt.prototype,"disableCopyPaste",void 0),rt([u()],lt.prototype,"type",void 0),rt([u()],lt.prototype,"inputRenderer",void 0),rt([g("connectedCallback")],lt.prototype,"connectedCallback",null),rt([g("disconnectedCallback")],lt.prototype,"disconnectedCallback",null),rt([g("watchValue")],lt.prototype,"watchValue",null),rt([g("watchMaskChange")],lt.prototype,"watchMaskChange",null),rt([g("watchTypeChange")],lt.prototype,"watchTypeChange",null);const pt=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!1===t.autoValidation},{payloadKey:"EMAIL_IS_TRUE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!0===t.email},{payloadKey:"EMAIL_IS_FALSE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!1===t.email}];var ct=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class dt extends f{componentDidLoad(){this.setInputAutoWidth()}watchValue(){this.setInputAutoWidth()}watchSuffixText(){this.setInputAutoWidth()}setInputAutoWidth(){const t=this.host.shadowRoot.querySelector(".vega-input-container"),e=null==t?void 0:t.querySelector(".vega-input-input"),i=null==e?void 0:e.querySelector("input");if(i&&(t.classList.remove("auto-width"),i.style.removeProperty("width"),this.isCompactInputWidth&&this.suffixText)){const n=this.getActualInputWidth();e.getBoundingClientRect().width>n&&(i.style.width=`${n}px`,t.classList.add("auto-width"))}}getActualInputWidth(){const t=this.getCalculateTextWidthContainer();t.style.display="inline-block",t.textContent=`${this.value||this.placeholder||""}`;const e=t.getBoundingClientRect().width;return t.style.display="none",e}getCalculateTextWidthContainer(){if(!this.calculateTextWidthContainer){const t=document.createElement("div");t.classList.add("v-font-field-value"),t.style.visibility="hidden",t.style.display="none",this.host.shadowRoot.append(t),this.calculateTextWidthContainer=t}return this.calculateTextWidthContainer}}ct([u()],dt.prototype,"host",void 0),ct([u()],dt.prototype,"value",void 0),ct([u()],dt.prototype,"placeholder",void 0),ct([u()],dt.prototype,"isCompactInputWidth",void 0),ct([u()],dt.prototype,"suffixText",void 0),ct([g("componentDidLoad")],dt.prototype,"componentDidLoad",null),ct([g("watchValue")],dt.prototype,"watchValue",null),ct([g("watchSuffixText")],dt.prototype,"watchSuffixText",null);var ht=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class ut extends W{constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"prefixText",parentStateName:"prefixText"},{subStateName:"suffixText",parentStateName:"suffixText"},{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}ht([u()],ut.prototype,"host",void 0),ht([u({writable:!0})],ut.prototype,"prefixText",void 0),ht([u({writable:!0})],ut.prototype,"suffixText",void 0),ht([u({writable:!0})],ut.prototype,"isCompactInputWidth",void 0);var ft=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class gt extends f{render(){return t("vega-button-circle",{icon:K.getIconKey(this.isPasswordDisplay?"eye":"eye-slash"),variant:"icon-only",size:"small",class:"password-eye-button",ref:t=>{this.addEyeIconObserver(t)}})}addEyeIconObserver(t){$.addUniqueObserverToNode(t,C,(()=>{this.isPasswordDisplay=!this.isPasswordDisplay}))}}K.register({eye:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>'},"eye-slash":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"/></svg>'}}),ft([u()],gt.prototype,"host",void 0),ft([u({writable:!0})],gt.prototype,"isPasswordDisplay",void 0),ft([u()],gt.prototype,"type",void 0);var vt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class mt extends f{constructor(){super(...arguments),this.renderPrefixText=()=>this.prefixText&&t("div",{class:"prefix-text"},this.prefixText),this.renderSuffixText=()=>this.suffixText&&t("div",{class:"suffix-text"},this.suffixText),this.onClickClearIcon=()=>{H.notify(_.getSubject(this.host,A),"")},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value),this.onClearInputFocus=()=>{this.inputContainerRef.classList.add("no-focus")},this.onClearInputBlur=()=>{this.inputContainerRef.classList.remove("no-focus")},this.onContainerClick=()=>{H.notify(_.getSubject(this.host,P),{})}}getInputContainerRef(){return this.inputContainerRef}render(){return t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:{"vega-input-container":!0,"with-value":!!this.value,[`vega-input-size-${this.size}`]:!0,"vega-input-disabled":this.disabled,"compact-input-width":this.isCompactInputWidth},onClick:this.onContainerClick,"aria-disabled":this.disabled?"true":void 0,onKeyDown:q()},this.prefixSlotRenderer.render(),this.renderPrefixText(),this.inputRenderer.render(),this.renderSuffixText(),"password"===this.type?this.passwordEyeRenderer.render():this.showClearIcon&&this.renderClearIcon())}renderClearIcon(){return t("div",{class:{"vega-input-clear-icon":!0,invisible:!this.isClearIconVisible()},tabIndex:this.disabled?-1:0,"aria-label":"clear input",role:"button",onClick:this.onClickClearIcon,onKeyDown:q(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}}vt([u()],mt.prototype,"host",void 0),vt([u()],mt.prototype,"value",void 0),vt([u()],mt.prototype,"size",void 0),vt([u()],mt.prototype,"disabled",void 0),vt([u()],mt.prototype,"type",void 0),vt([u()],mt.prototype,"showClearIcon",void 0),vt([u()],mt.prototype,"prefixText",void 0),vt([u()],mt.prototype,"suffixText",void 0),vt([u()],mt.prototype,"isCompactInputWidth",void 0),vt([u()],mt.prototype,"prefixSlotRenderer",void 0),vt([u()],mt.prototype,"passwordEyeRenderer",void 0),vt([u()],mt.prototype,"inputRenderer",void 0);var xt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class bt extends f{constructor(){super(...arguments),this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.notifySetupMaskConfig())},this.handleInputFocus=t=>{this.focusEventEmitter.emit(void 0,t)},this.handleInputBlur=t=>{this.blurEventEmitter.emit(void 0,t)},this.handleInputPaste=t=>{this.pasteEventEmitter.emit(t.clipboardData).defaultPrevented&&t.preventDefault()},this.onInputHandler=()=>{"change"!==this.valueUpdateTrigger&&this.notifyInputValueChange()},this.inputChangeHandler=()=>{"change"===this.valueUpdateTrigger&&this.notifyInputValueChange()}}connectedCallback(){this.initInputFocusObserver()}disconnectedCallback(){this.removeInputFocusObserver()}doFocus(){this.focusInput()}doBlur(){this.inputRef.blur()}getInputRef(){return this.inputRef}render(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:this.getInputType(),autoComplete:this.autocomplete,inputmode:this.inputmode,enterkeyhint:this.enterkeyhint,readOnly:this.readOnly,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,minLength:this.minLength,maxLength:this.maxLength,onBlur:t=>this.handleInputBlur(t),onFocus:t=>this.handleInputFocus(t),onChange:this.inputChangeHandler,onInput:this.onInputHandler,onPaste:t=>this.handleInputPaste(t)},this.copyPasteController.getCopyPasteProps())))}getInputType(){switch(this.type){case"number":return"text";case"password":return this.isPasswordDisplay?"text":"password";default:return this.type}}notifyInputValueChange(){this.inputRef.value!==this.value&&this.nativeInputChangeEventEmitter.emit(this.inputRef.value),H.notify(_.getSubject(this.host,A),this.inputRef.value)}notifySetupMaskConfig(){H.notify(_.getSubject(this.host,F),{})}initInputFocusObserver(){$.addUniqueObserverToNode(this.host,P,this.focusInput.bind(this))}removeInputFocusObserver(){$.removeUniqueObserverFromNode(this.host,P)}focusInput(){this.inputRef.focus()}}xt([u()],bt.prototype,"host",void 0),xt([u()],bt.prototype,"value",void 0),xt([u()],bt.prototype,"disabled",void 0),xt([u()],bt.prototype,"type",void 0),xt([u()],bt.prototype,"name",void 0),xt([u()],bt.prototype,"autocomplete",void 0),xt([u()],bt.prototype,"inputmode",void 0),xt([u()],bt.prototype,"enterkeyhint",void 0),xt([u()],bt.prototype,"readOnly",void 0),xt([u()],bt.prototype,"placeholder",void 0),xt([u()],bt.prototype,"minLength",void 0),xt([u()],bt.prototype,"maxLength",void 0),xt([u()],bt.prototype,"isPasswordDisplay",void 0),xt([u()],bt.prototype,"valueUpdateTrigger",void 0),xt([u()],bt.prototype,"focusEventEmitter",void 0),xt([u()],bt.prototype,"blurEventEmitter",void 0),xt([u()],bt.prototype,"pasteEventEmitter",void 0),xt([u()],bt.prototype,"copyPasteController",void 0),xt([u()],bt.prototype,"nativeInputChangeEventEmitter",void 0),xt([g("connectedCallback")],bt.prototype,"connectedCallback",null),xt([g("disconnectedCallback")],bt.prototype,"disconnectedCallback",null),xt([g("doFocus")],bt.prototype,"doFocus",null),xt([g("doBlur")],bt.prototype,"doBlur",null);var wt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class yt extends f{constructor(){super(...arguments),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()},this.handleLabelClick=()=>{H.notify(_.getSubject(this.host,P),{})}}render(){return t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),this.renderInputContainer(),this.renderHintDom())}renderInputContainer(){return this.renderModeController.isSource()||this.renderModeController.isTemplate()?this.inputSuggestionsRenderer.render(this.inputContainerRenderer.render()):this.inputContainerRenderer.render()}renderLabelDom(){return t("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label,optional:this.optional,suffixButtonProps:this.labelSuffixButtonProps,suffixButtonConfig:this.labelSuffixButtonConfig,ref:t=>{$.addUniqueObserverToNode(t,j,this.handleLabelButtonClick),$.addUniqueObserverToNode(t,C,this.handleLabelClick)}})}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}}wt([u()],yt.prototype,"host",void 0),wt([u()],yt.prototype,"disabled",void 0),wt([u()],yt.prototype,"required",void 0),wt([u()],yt.prototype,"label",void 0),wt([u()],yt.prototype,"hint",void 0),wt([u()],yt.prototype,"labelSuffixButtonProps",void 0),wt([u()],yt.prototype,"labelSuffixButtonConfig",void 0),wt([u()],yt.prototype,"optional",void 0),wt([u()],yt.prototype,"labelButtonClickEventEmitter",void 0),wt([u()],yt.prototype,"inputContainerRenderer",void 0),wt([u()],yt.prototype,"inputSuggestionsRenderer",void 0),wt([u()],yt.prototype,"renderModeController",void 0);var Ct=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class jt extends f{connectedCallback(){this.initValueUpdateObserver()}disconnectedCallback(){this.removeValueUpdateObserver()}watchValue(t){this.changeEventEmitter.emit(t);const e=this.inputRenderer.getInputRef();e.value!==this.value&&(e.value=this.value),H.notify(G,{host:this.host,detail:this.value})}initValueUpdateObserver(){$.addUniqueObserverToNode(this.host,A,this.setValue.bind(this))}removeValueUpdateObserver(){$.removeUniqueObserverFromNode(this.host,A)}setValue(t){this.value=t}}Ct([u()],jt.prototype,"host",void 0),Ct([u({writable:!0})],jt.prototype,"value",void 0),Ct([u()],jt.prototype,"changeEventEmitter",void 0),Ct([u()],jt.prototype,"inputRenderer",void 0),Ct([g("connectedCallback")],jt.prototype,"connectedCallback",null),Ct([g("disconnectedCallback")],jt.prototype,"disconnectedCallback",null),Ct([g("watchValue")],jt.prototype,"watchValue",null);var kt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class Rt extends f{constructor(){super(...arguments),this.templateItems=[],this.onDropdownItemClick=async t=>{const e=this.renderModeController.isTemplate()?this.templateItems:this.suggestionsDropdownSource,i=this.findItem(e,t.detail);if(i){const t=this.suggestionItemClickEventEmitter.emit(i);H.notify(_.getSubject(this.host,A),t.defaultPrevented?this.value:i.label)}}}appendHostItemsToDropdown(){this.renderModeController.isTemplate()&&this.itemsSlotRef&&this.dropdownRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(this.host.querySelector("[slot=items]")))}async showSuggestionsDropdown(t={}){this.suggestionsDropdownConfig=t,await this.showSuggestions()}async hideSuggestionsDropdown(){await this.dropdownRef.hide()}async watchValue(){await this.searchSuggestions()}async watchSuggestionsDropdownSource(){await this.searchSuggestions()}render(e){return t("vega-dropdown",Object.assign({},this.suggestionsDropdownConfig,{source:this.suggestionsDropdownSource,trigger:new J,matchTargetWidth:!0,searchable:!1,placement:["top","bottom"],translocation:{X:0,Y:6},ref:t=>{this.dropdownRef=t,this.addDropdownObserver(t)},style:{display:"block"}}),e,this.renderItemsSlot())}renderItemsSlot(){return this.renderModeController.isTemplate()&&t("div",{slot:"items",ref:t=>{this.itemsSlotRef=t}})}addDropdownObserver(t){$.addUniqueObserverToNode(t,k,this.onDropdownItemClick.bind(this)),$.addUniqueObserverToNode(t,B,(t=>{this.templateItems=Array.from(t).map((t=>({key:t.itemKey,label:t.label})))}))}findItem(t,e){for(const i of t){if(i.children&&i.children.length>0){const t=this.findItem(i.children,e);if(t)return t}if(i.key.toString()===e)return i}return null}async showSuggestions(){this.dropdownRef&&(this.renderModeController.isSource()||this.renderModeController.isTemplate())&&await this.dropdownRef.show()}async searchSuggestions(){this.dropdownRef&&this.renderModeController.isSource()&&this.suggestionsDropdownSource.length>0&&await this.dropdownRef.search(this.value)}}kt([u()],Rt.prototype,"host",void 0),kt([u()],Rt.prototype,"value",void 0),kt([u({writable:!0})],Rt.prototype,"suggestionsDropdownConfig",void 0),kt([u()],Rt.prototype,"suggestionsDropdownSource",void 0),kt([u()],Rt.prototype,"renderModeController",void 0),kt([u()],Rt.prototype,"suggestionItemClickEventEmitter",void 0),kt([g("componentDidLoad")],Rt.prototype,"appendHostItemsToDropdown",null),kt([g("showSuggestionsDropdown")],Rt.prototype,"showSuggestionsDropdown",null),kt([g("hideSuggestionsDropdown")],Rt.prototype,"hideSuggestionsDropdown",null),kt([g("watchValue")],Rt.prototype,"watchValue",null),kt([g("watchSuggestionsDropdownSource")],Rt.prototype,"watchSuggestionsDropdownSource",null);var It=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class St extends f{constructor(){super(...arguments),this.hasItemsSlot=!1}connectedCallback(){this.setRenderMode()}isSource(){return Array.isArray(this.suggestionsDropdownSource)}isTemplate(){return this.hasItemsSlot}setRenderMode(){this.hasItemsSlot=!!this.host.querySelector("[slot=items]")}}It([u()],St.prototype,"host",void 0),It([u()],St.prototype,"suggestionsDropdownSource",void 0),It([g("connectedCallback")],St.prototype,"connectedCallback",null);var zt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class Ot extends Y{constructor(t){super({options:{attributes:!0,attributeFilter:[Ot.OBSERVED_ATTRIBUTE]},callback:()=>{this.performMapping()}}),this.targetGetter=t}componentDidLoad(){this.performMapping(),super.componentDidLoad&&super.componentDidLoad()}componentDidRender(){this.performMapping()}performMapping(){const t=this.targetGetter?this.targetGetter():null;if(!t)return;const e=this.host.getAttribute(Ot.OBSERVED_ATTRIBUTE);if(this.shouldRemoveTabIndex(e))return void t.removeAttribute("tabindex");const i=String(e);t.getAttribute("tabindex")!==i&&t.setAttribute("tabindex",i)}shouldRemoveTabIndex(t){if(null==t)return!0;const e=String(t).trim().toLowerCase();return""===e||"null"===e||"undefined"===e}}Ot.OBSERVED_ATTRIBUTE="data-tabindex",zt([g("componentDidLoad")],Ot.prototype,"componentDidLoad",null),zt([g("componentDidRender")],Ot.prototype,"componentDidRender",null);var Dt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};const Et=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaNativeInputChange=i(this,"vegaNativeInputChange",7),this.nativeInputChange=i(this,"nativeInputChange",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",7),this.labelButtonClick=i(this,"labelButtonClick",7),this.vegaPaste=i(this,"vegaPaste",7),this.paste=i(this,"paste",7),this.vegaSuggestionItemClick=i(this,"vegaSuggestionItemClick",7),this.suggestionItemClick=i(this,"suggestionItemClick",7),this.globalSlimmers={},this.ariaAttributesValueMapper=new X((()=>this.host.shadowRoot.querySelector("input")),{"aria-label":{dependency:["data-aria-label","label"],defaultValue:"No label defined"},"aria-hidden":{dependency:["data-aria-hidden"],defaultValue:null}}),this.dataTabIndexValueMapper=new Ot((()=>this.host.shadowRoot.querySelector("input"))),this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new c:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new a({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new r({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new l({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new p({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new Z:null},{propertyName:"type",ruleFactory:t=>"email"===t?new Z:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRenderer.getInputContainerRef(),touchableAreaGetter:()=>[this.inputRenderer.getInputRef()]}),this.pageResizeObserverSlimmer=new U({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.renderModeController=new St,this.copyPasteController=new tt,this.compactWidthController=new dt,this.stateController=new ut,this.maskConfigController=new lt,this.valueController=new jt,this.prefixSlotRenderer=new it,this.renderer=new yt,this.inputContainerRenderer=new mt,this.inputRenderer=new bt,this.inputSuggestionsRenderer=new Rt,this.changeEventEmitter=y(Et,R),this.nativeInputChangeEventEmitter=y(Et,I),this.focusEventEmitter=y(Et,S),this.blurEventEmitter=y(Et,z),this.labelButtonClickEventEmitter=y(Et,j),this.suggestionItemClickEventEmitter=y(Et,O),this.pasteEventEmitter=y(Et,D),this.vegaComponentUsageRuntimeMetricsSlimmer=new x(pt),this.passwordEyeRenderer=new gt,this.label="",this.labelSuffixButtonProps=null,this.labelSuffixButtonConfig=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.readOnly=!1,this.email=!1,this.required=!1,this.optional=!1,this.min=null,this.max=null,this.minLength=null,this.maxLength=null,this.showClearIcon=!0,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.disabled=!1,this.hint="",this.disableCopyPaste=!1}watchSuffixText(){}watchValue(t){}watchTypeChange(t,e){}watchValidationRules(){}watchMaskChange(t,e){}watchSuggestionsDropdownSource(){}async doFocus(){}async doBlur(){}async showSuggestionsDropdown(t){}async hideSuggestionsDropdown(){}render(){return m(t("slot",null)),d(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.renderer.render()),this.host)}get host(){return s(this)}static get watchers(){return{suffixText:["watchSuffixText"],value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"],suggestionsDropdownSource:["watchSuggestionsDropdownSource"]}}};Dt([b()],Et.prototype,"globalSlimmers",void 0),Dt([v()],Et.prototype,"ariaAttributesValueMapper",void 0),Dt([v()],Et.prototype,"dataTabIndexValueMapper",void 0),Dt([v()],Et.prototype,"formFieldController",void 0),Dt([v()],Et.prototype,"pageResizeObserverSlimmer",void 0),Dt([v()],Et.prototype,"renderModeController",void 0),Dt([v()],Et.prototype,"copyPasteController",void 0),Dt([v()],Et.prototype,"compactWidthController",void 0),Dt([v()],Et.prototype,"stateController",void 0),Dt([v()],Et.prototype,"maskConfigController",void 0),Dt([v()],Et.prototype,"valueController",void 0),Dt([v()],Et.prototype,"prefixSlotRenderer",void 0),Dt([v()],Et.prototype,"renderer",void 0),Dt([v()],Et.prototype,"inputContainerRenderer",void 0),Dt([v()],Et.prototype,"inputRenderer",void 0),Dt([v()],Et.prototype,"inputSuggestionsRenderer",void 0),Dt([v()],Et.prototype,"changeEventEmitter",void 0),Dt([v()],Et.prototype,"nativeInputChangeEventEmitter",void 0),Dt([v()],Et.prototype,"focusEventEmitter",void 0),Dt([v()],Et.prototype,"blurEventEmitter",void 0),Dt([v()],Et.prototype,"labelButtonClickEventEmitter",void 0),Dt([v()],Et.prototype,"suggestionItemClickEventEmitter",void 0),Dt([v()],Et.prototype,"pasteEventEmitter",void 0),Dt([v()],Et.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Dt([v()],Et.prototype,"passwordEyeRenderer",void 0),Dt([h()],Et.prototype,"watchMaskChange",null),Et.style=':host{cursor:text;display:block;text-align:left;line-height:normal}:host(.vega-input-inline-block){display:inline-block;width:100%}:host(.vega-input-hidden){display:none}vega-field-label{margin-bottom:8px}.vega-input-container{display:flex;align-items:center;border-radius:8px;gap:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))}.vega-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-container.vega-input-disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled input{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.vega-input-container.with-value{border-width:1px;border-style:solid;border-radius:8px}.vega-input-container:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}.vega-input-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-input-container.error:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.vega-input-container.error .vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}.vega-input-prefix{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}.vega-input-prefix.vega-input-prefix-slot{height:24px;overflow:hidden}.vega-input-input{flex:1 1 0%;position:relative}.vega-input-input input{width:100%;outline:2px solid transparent;outline-offset:2px;border-style:none;height:24px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-input input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-input-size-small{padding-top:8px;padding-right:12px;padding-bottom:8px;padding-left:12px}.vega-input-size-default{padding-top:12px;padding-right:16px;padding-bottom:12px;padding-left:16px}.vega-input-input input:disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.vega-hint{padding-top:12px;padding-right:8px;padding-left:8px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-input-clear-icon{width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border-radius:4px;padding:2px}.vega-input-clear-icon.invisible{visibility:hidden}.vega-input-clear-icon vega-icon{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=password]::-ms-reveal{display:none}.vega-input-container.compact-input-width{gap:0px}.vega-input-container.compact-input-width .vega-input-prefix{margin-right:8px}.vega-input-container.compact-input-width .prefix-text,.vega-input-container.compact-input-width .suffix-text{margin-right:2px}.vega-input-container.compact-input-width .vega-input-clear-icon{margin-left:2px}.vega-input-container.compact-input-width .vega-input-input input{padding:0px;min-width:1px}.vega-input-container.compact-input-width.auto-width .vega-input-input{flex-grow:0}.vega-input-container.compact-input-width.auto-width .suffix-text{flex-grow:1}.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0;flex-grow:0}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-container .password-eye-button{width:16px;height:16px}.vega-input-container .password-eye-button::part(button){width:16px;height:16px;padding:0px}.vega-input-container .password-eye-button::part(button):hover{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}@supports (-webkit-touch-callout: none){:host([data-vega-form=pageSelectorMobile_goTo]) .vega-input-container input{box-sizing:border-box;padding-left:0px;padding-right:0px}}';export{Et as vega_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as t,c as r,H as i,g as s}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{c as a,M as n,V as l,I as c}from"./p-6e1ab235.js";import{V as p,I as h}from"./p-8ce9e214.js";import{c as d}from"./p-
|
|
1
|
+
import{h as e,r as t,c as r,H as i,g as s}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{c as a,M as n,V as l,I as c}from"./p-6e1ab235.js";import{V as p,I as h}from"./p-8ce9e214.js";import{c as d}from"./p-ef44d516.js";import{j as u,a as f}from"./p-cb4033ef.js";import{D as v}from"./p-526e3634.js";import{K as m}from"./p-66905cbf.js";import{T as b}from"./p-fea33425.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-53ed3b1f.js";import"./p-b75ee3ba.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-21775cc7.js";import"./p-2b22091e.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-ddc2d219.js";import"./p-cb378636.js";var g=function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};class _ extends l{constructor(){super(...arguments),this.gridRef=null,this.selectRef=null,this.preventLostFocus=e=>{e.preventDefault()},this.handleCellMouseEnter=e=>{var t;const r=Number(e.currentTarget.dataset.index);this.hoveredItem=null!==(t=this.getActiveCharacters()[r])&&void 0!==t?t:null},this.handleCellMouseLeave=()=>{this.hoveredItem=null},this.handleCellFocus=e=>{const t=Number(e.currentTarget.dataset.index);Number.isFinite(t)&&(this.focusedCellIndex=t)},this.handleCellClick=e=>{const t=Number(e.currentTarget.dataset.index),r=this.getActiveCharacters()[t];r&&(this.focusedCellIndex=t,this.clickEventEmitter.emit(r.character))}}resetPanel(){this.activeCategoryKey="__all__",this.hoveredItem=null,this.focusedCellIndex=null,this.focusSelect()}getGridRef(){return this.gridRef}getCellCount(){return this.getActiveCharacters().length}getActiveCellIndex(){var e;return null!==(e=this.focusedCellIndex)&&void 0!==e?e:0}focusCellByIndex(e){if(this.focusedCellIndex=e,this.gridRef){const t=this.gridRef.querySelector(`[data-index="${e}"]`);t&&t.focus()}}render(){return e("div",{class:"panel",role:"presentation",onMouseDown:this.preventLostFocus},this.renderHeader(),e("vega-divider",{direction:"horizontal"}),e("div",{class:"panel__body"},this.renderCategorySelect(),this.renderCharacterGrid()),e("vega-divider",{direction:"horizontal"}),this.renderFooter())}focusSelect(){if(this.selectRef&&this.selectRef.shadowRoot){const e=this.selectRef.shadowRoot.querySelector('[tabindex="0"], button');e&&e.focus()}}renderHeader(){return e("div",{class:"panel__header"},e("vega-font",null,this.translationSlimmer.t("Special Characters")))}renderCategorySelect(){const t={id:"__all__",displayName:this.translationSlimmer.t("All")};return e("vega-input-select",{class:"panel__select",size:"small",source:[t,...this.categories.map((e=>({id:e.key,displayName:this.translationSlimmer.t(e.label)})))],value:this.activeCategoryKey,ref:e=>{e&&(this.selectRef=e,v.addUniqueObserverToNode(e,u,(e=>{this.activeCategoryKey=e.detail,this.hoveredItem=null,this.focusedCellIndex=null})))}})}renderCharacterGrid(){var t;const r=this.getActiveCharacters(),i=null!==(t=this.focusedCellIndex)&&void 0!==t?t:0;return e("div",{class:"panel__grid",role:"grid","aria-label":this.translationSlimmer.t("Special Characters"),style:{"--vega-special-characters-grid-columns":String(10)},ref:e=>{this.gridRef=e}},r.map(((t,r)=>{const s=r===i,o=this.translationSlimmer.t(t.title);return e("button",{key:t.character,class:"panel__cell",role:"gridcell","aria-label":o,title:o,"data-index":r,tabindex:s?0:-1,onMouseEnter:this.handleCellMouseEnter,onMouseLeave:this.handleCellMouseLeave,onFocus:this.handleCellFocus,onClick:this.handleCellClick},t.character)})))}renderFooter(){var t;const r=null!==this.focusedCellIndex?this.getActiveCharacters()[this.focusedCellIndex]:null,i=null!==(t=this.hoveredItem)&&void 0!==t?t:r,s=i?this.getCodePoint(i.character):"",o=i?this.translationSlimmer.t(i.title):"";return e("div",{class:"panel__footer"},e("vega-font",{class:"panel__footer-name",variant:"font-footnote1-long",color:"text-secondary"},o),e("vega-font",{class:"panel__footer-code",variant:"font-footnote1-long",color:"text-secondary"},s))}getCodePoint(e){const t=e.codePointAt(0);return void 0===t?"":`U+${t.toString(16).toUpperCase().padStart(4,"0")}`}getActiveCharacters(){if("__all__"===this.activeCategoryKey)return this.categories.flatMap((e=>e.characters));const e=this.categories.find((e=>e.key===this.activeCategoryKey));return e?e.characters:[]}}g([a()],_.prototype,"categories",void 0),g([a()],_.prototype,"clickEventEmitter",void 0),g([a()],_.prototype,"translationSlimmer",void 0),g([a({writable:!0})],_.prototype,"activeCategoryKey",void 0),g([a({writable:!0})],_.prototype,"hoveredItem",void 0),g([a({writable:!0})],_.prototype,"focusedCellIndex",void 0),g([n("resetPanel")],_.prototype,"resetPanel",null);class x extends m{constructor(){super((()=>[{keyCode:["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],eventName:"keydown",activeElementInScope:()=>[this.renderer.getGridRef()],preventDefault:!0,callback:e=>{this.handleNavigation(e)}}]))}handleNavigation(e){const t=this.renderer,r=t.getCellCount();if(0===r)return;const i=Math.min(Math.max(t.getActiveCellIndex(),0),r-1),s=Math.floor(i/10),o=i%10,a=Math.floor((r-1)/10),n=e=>e===a?(r-1)%10:9;let l=i;switch(e.code){case"ArrowLeft":o>0&&(l=i-1);break;case"ArrowRight":o<n(s)&&(l=i+1);break;case"ArrowUp":s>0&&(l=i-10);break;case"ArrowDown":if(s<a){const e=i+10;l=e<r?e:10*a+n(a)}}l!==i&&t.focusCellByIndex(l)}}!function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);o>3&&a&&Object.defineProperty(t,r,a)}([a()],x.prototype,"renderer",void 0);var j=function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};const y=class{constructor(e){t(this,e),this.vegaClick=r(this,"vegaClick",7),this.click=r(this,"click",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.translationSlimmer=new b,this.clickEventEmitter=d(y,f),this.renderer=new _,this.keyboardController=new x,this.activeCategoryKey="__all__",this.hoveredItem=null,this.focusedCellIndex=null,this.categories=[]}async resetPanel(){}render(){return o(e(i,null,this.renderer.render()),this.host)}get host(){return s(this)}};j([h()],y.prototype,"globalSlimmers",void 0),j([c()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),j([c()],y.prototype,"translationSlimmer",void 0),j([c()],y.prototype,"clickEventEmitter",void 0),j([c()],y.prototype,"renderer",void 0),j([c()],y.prototype,"keyboardController",void 0),y.style=':host .panel{box-sizing:border-box;width:320px}:host .panel__header{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px}:host .panel__body{padding-top:12px;padding-bottom:12px}:host .panel__select{margin-bottom:8px}:host .panel__grid{display:grid;gap:2px;overflow-y:auto;grid-template-columns:repeat(var(--vega-special-characters-grid-columns), 1fr);max-height:240px}:host .panel__cell{display:flex;align-items:center;justify-content:center;color:rgba(var(--v-text-primary, 32, 54, 69, 1));border-radius:4px;cursor:pointer;border:none;width:28px;height:28px;background:transparent;font-family:"Inter";font-size:16px;line-height:1}:host .panel__cell:hover{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1));border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .panel__cell:active{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}:host .panel__cell:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:-2px}:host .panel__footer{display:flex;align-items:center;justify-content:space-between;padding-top:8px;min-height:20px}:host .panel__footer-name{text-transform:uppercase}';export{y as vega_rich_text_special_characters_panel}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as n}from"./p-
|
|
1
|
+
import{K as n}from"./p-21775cc7.js";function t(t){return i=>{const{connectedCallback:o,componentDidLoad:s,disconnectedCallback:e}=i;i.connectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.register(t),null==o?void 0:o.call(this)},i.componentDidLoad=function(){return this.keyboardEventListeners=t(this),n.register(this.keyboardEventListeners),null==s?void 0:s.call(this)},i.disconnectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.deregister(t),null==e?void 0:e.call(this)}}}export{t as I}
|